create-harness-vibe-coding 0.8.19 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +49 -0
- package/README-CN.md +4 -2
- package/README.md +23 -4
- package/package.json +17 -2
- package/src/generator.js +19 -6
- package/src/index.js +531 -38
- package/src/prompts.js +4 -4
- package/src/ui/dist/assets/AgentsRoute-BGGs90wH.js +7 -0
- package/src/ui/dist/assets/Assistant-Bold-gm-uSS1B.woff2 +0 -0
- package/src/ui/dist/assets/Assistant-Medium-DrcxCXg3.woff2 +0 -0
- package/src/ui/dist/assets/Assistant-Regular-DVxZuzxb.woff2 +0 -0
- package/src/ui/dist/assets/Assistant-SemiBold-SCI4bEL9.woff2 +0 -0
- package/src/ui/dist/assets/Combination-DhBLEmof.js +42 -0
- package/src/ui/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/src/ui/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/src/ui/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/src/ui/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/src/ui/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/src/ui/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/src/ui/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/src/ui/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/src/ui/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/src/ui/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/src/ui/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/src/ui/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/src/ui/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/src/ui/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/src/ui/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/src/ui/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/src/ui/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/src/ui/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/src/ui/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/src/ui/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/src/ui/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/src/ui/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/src/ui/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/src/ui/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/src/ui/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/src/ui/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/src/ui/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/src/ui/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/src/ui/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/src/ui/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/src/ui/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/src/ui/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/src/ui/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/src/ui/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/src/ui/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/src/ui/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/src/ui/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/src/ui/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/src/ui/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/src/ui/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/src/ui/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/src/ui/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/src/ui/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/src/ui/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/src/ui/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/src/ui/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/src/ui/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/src/ui/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/src/ui/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/src/ui/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/src/ui/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/src/ui/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/src/ui/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/src/ui/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/src/ui/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/src/ui/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/src/ui/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/src/ui/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/src/ui/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/src/ui/dist/assets/RolesRoute-DnodCSz0.js +2 -0
- package/src/ui/dist/assets/RuntimePicker-CucD8TGn.js +7 -0
- package/src/ui/dist/assets/SettingsRoute-DquMWjac.js +2 -0
- package/src/ui/dist/assets/TaskList-Bxc0Uktx.js +7 -0
- package/src/ui/dist/assets/TerminalDrawer-CDusYltc.js +36 -0
- package/src/ui/dist/assets/WorkflowRoute-BN8yHmUs.css +1 -0
- package/src/ui/dist/assets/WorkflowRoute-D-0wVDpY.js +334 -0
- package/src/ui/dist/assets/abnfDiagram-VRR7QNED-zkRKkaxO.js +2 -0
- package/src/ui/dist/assets/apl-B4CMkyY2.js +2 -0
- package/src/ui/dist/assets/ar-SA-G6X2FPQ2-BiHaArx5.js +11 -0
- package/src/ui/dist/assets/arc-CBnLtOFO.js +2 -0
- package/src/ui/dist/assets/architectureDiagram-ZJ3FMSHR-DWXRXsh1.js +37 -0
- package/src/ui/dist/assets/asciiarmor-Df11BRmG.js +2 -0
- package/src/ui/dist/assets/asn1-EdZsLKOL.js +2 -0
- package/src/ui/dist/assets/asterisk-B-8jnY81.js +2 -0
- package/src/ui/dist/assets/az-AZ-76LH7QW2-CiT05voO.js +2 -0
- package/src/ui/dist/assets/bg-BG-XCXSNQG7-L-UM9tNf.js +6 -0
- package/src/ui/dist/assets/blockDiagram-677ZJIJ3-BIyh3Bry.js +133 -0
- package/src/ui/dist/assets/bn-BD-2XOGV67Q-NdgbA0bC.js +6 -0
- package/src/ui/dist/assets/brainfuck-C4LP7Hcl.js +2 -0
- package/src/ui/dist/assets/c4Diagram-LMCZKHZV-CA54vWWM.js +11 -0
- package/src/ui/dist/assets/ca-ES-6MX7JW3Y-BKZZsQ5J.js +9 -0
- package/src/ui/dist/assets/channel-Da_-zcAu.js +2 -0
- package/src/ui/dist/assets/chunk-2Q5K7J3B-DE4cxr1v.js +2 -0
- package/src/ui/dist/assets/chunk-32BRIVSS-i7FwbEU9.js +2 -0
- package/src/ui/dist/assets/chunk-5VM5RSS4-BhIcOYSu.js +16 -0
- package/src/ui/dist/assets/chunk-EX3LRPZG-Ci9zZRIs.js +232 -0
- package/src/ui/dist/assets/chunk-JWPE2WC7-BFdkcz-G.js +2 -0
- package/src/ui/dist/assets/chunk-MOJQB5TN-Dzmapl_S.js +89 -0
- package/src/ui/dist/assets/chunk-RYQCIY6F-RTmp7FOy.js +2 -0
- package/src/ui/dist/assets/chunk-V7JOEXUC-DInU3v3D.js +207 -0
- package/src/ui/dist/assets/chunk-VR4S4FIN-BHoyGBQO.js +2 -0
- package/src/ui/dist/assets/chunk-XXDRQBXY-DfeLZNZx.js +2 -0
- package/src/ui/dist/assets/classDiagram-OUVF2IWQ-FKbUS0bu.js +2 -0
- package/src/ui/dist/assets/classDiagram-v2-EOCWNBFH-FKbUS0bu.js +2 -0
- package/src/ui/dist/assets/clike-B9uivgTg.js +2 -0
- package/src/ui/dist/assets/clojure-BMjYHr_A.js +2 -0
- package/src/ui/dist/assets/cmake-BQqOBYOt.js +2 -0
- package/src/ui/dist/assets/cobol-CWcv1MsR.js +2 -0
- package/src/ui/dist/assets/coffeescript-S37ZYGWr.js +2 -0
- package/src/ui/dist/assets/commonlisp-DBKNyK5s.js +2 -0
- package/src/ui/dist/assets/cose-bilkent-JH36ORCC-_5PUJ615.js +2 -0
- package/src/ui/dist/assets/crystal-SjHAIU92.js +2 -0
- package/src/ui/dist/assets/cs-CZ-2BRQDIVT-DnkfnhDU.js +12 -0
- package/src/ui/dist/assets/css-BnMrqG3P.js +2 -0
- package/src/ui/dist/assets/cynefin-VYW2F7L2-CmkcFv-b.js +179 -0
- package/src/ui/dist/assets/cynefinDiagram-TSTJHNR4-D72VZn8H.js +63 -0
- package/src/ui/dist/assets/cypher-C_CwsFkJ.js +2 -0
- package/src/ui/dist/assets/cytoscape.esm-DTSO7Bv0.js +332 -0
- package/src/ui/dist/assets/d-pRatUO7H.js +2 -0
- package/src/ui/dist/assets/da-DK-5WZEPLOC-C54tQUgd.js +6 -0
- package/src/ui/dist/assets/dagre-VKFMJZFB-0BsAkrmo.js +5 -0
- package/src/ui/dist/assets/de-DE-XR44H4JA-DGfZlR10.js +9 -0
- package/src/ui/dist/assets/defaultLocale-DX6XiGOO.js +2 -0
- package/src/ui/dist/assets/diagram-FQU43EPY-C1ZJDOca.js +4 -0
- package/src/ui/dist/assets/diagram-G47NLZAW-D3pr3FSP.js +25 -0
- package/src/ui/dist/assets/diagram-NH7WQ7WH-Bwry0NV-.js +25 -0
- package/src/ui/dist/assets/diagram-OA4YK3LP-L6g09cmV.js +31 -0
- package/src/ui/dist/assets/diagram-WEI45ONY-Bh1puYVX.js +42 -0
- package/src/ui/dist/assets/diff-DbItnlRl.js +2 -0
- package/src/ui/dist/assets/directory-open-01563666-DWU9wJ6I.js +2 -0
- package/src/ui/dist/assets/directory-open-4ed118d0-CunoC1EB.js +2 -0
- package/src/ui/dist/assets/dockerfile-BKs6k2Af.js +2 -0
- package/src/ui/dist/assets/dtd-DF_7sFjM.js +2 -0
- package/src/ui/dist/assets/dylan-DwRh75JA.js +2 -0
- package/src/ui/dist/assets/ebnf-CDyGwa7X.js +2 -0
- package/src/ui/dist/assets/ebnfDiagram-CCIWWBDH-BC_mBRR5.js +2 -0
- package/src/ui/dist/assets/ecl-Cabwm37j.js +2 -0
- package/src/ui/dist/assets/eiffel-CnydiIhH.js +2 -0
- package/src/ui/dist/assets/el-GR-BZB4AONW-DsnwWweL.js +11 -0
- package/src/ui/dist/assets/elm-vLlmbW-K.js +2 -0
- package/src/ui/dist/assets/erDiagram-Q63AITRT-Bkxam36l.js +86 -0
- package/src/ui/dist/assets/erlang-BNw1qcRV.js +2 -0
- package/src/ui/dist/assets/es-ES-U4NZUMDT-CRxBcQgC.js +10 -0
- package/src/ui/dist/assets/eu-ES-A7QVB2H4-CTd_E7YR.js +12 -0
- package/src/ui/dist/assets/excalidraw-default-bMWIgNCy.svg +1 -0
- package/src/ui/dist/assets/fa-IR-HGAKTJCU-DO56k7eG.js +9 -0
- package/src/ui/dist/assets/factor-kuTfRLto.js +2 -0
- package/src/ui/dist/assets/fcl-Kvtd6kyn.js +2 -0
- package/src/ui/dist/assets/fi-FI-Z5N7JZ37-DEDCF9WB.js +7 -0
- package/src/ui/dist/assets/file-open-002ab408-DIuFHtCF.js +2 -0
- package/src/ui/dist/assets/file-open-7c801643-684qeFg4.js +2 -0
- package/src/ui/dist/assets/file-save-3189631c-C1wFhQhH.js +2 -0
- package/src/ui/dist/assets/file-save-745eba88-Bb9F9Kg7.js +2 -0
- package/src/ui/dist/assets/flowDiagram-23GEKE2U-C3SAEao7.js +157 -0
- package/src/ui/dist/assets/forth-Ffai-XNe.js +2 -0
- package/src/ui/dist/assets/fortran-DYz_wnZ1.js +2 -0
- package/src/ui/dist/assets/fr-FR-RHASNOE6-DE2nPyDt.js +10 -0
- package/src/ui/dist/assets/ganttDiagram-NO4QXBWP-U-J_Xi-_.js +293 -0
- package/src/ui/dist/assets/gas-Bneqetm1.js +2 -0
- package/src/ui/dist/assets/gherkin-heZmZLOM.js +2 -0
- package/src/ui/dist/assets/gitGraphDiagram-IHSO6WYX-BADVbD-a.js +107 -0
- package/src/ui/dist/assets/gl-ES-HMX3MZ6V-mCqVgQHC.js +11 -0
- package/src/ui/dist/assets/graph-C9eacEi8.js +2 -0
- package/src/ui/dist/assets/groovy-D9Dt4D0W.js +2 -0
- package/src/ui/dist/assets/haskell-Cw1EW3IL.js +2 -0
- package/src/ui/dist/assets/haxe-H-WmDvRZ.js +2 -0
- package/src/ui/dist/assets/he-IL-6SHJWFNN-KnaLrCzw.js +11 -0
- package/src/ui/dist/assets/hi-IN-IWLTKZ5I-wuqiaaWt.js +5 -0
- package/src/ui/dist/assets/http-DBlCnlav.js +2 -0
- package/src/ui/dist/assets/hu-HU-A5ZG7DT2-DLg_zm22.js +8 -0
- package/src/ui/dist/assets/id-ID-SAP4L64H-MB2mXqcR.js +11 -0
- package/src/ui/dist/assets/idl-BEugSyMb.js +2 -0
- package/src/ui/dist/assets/image-blob-reduce.esm-HwCm7IZ0.js +8 -0
- package/src/ui/dist/assets/index-39SJtrt0.js +2 -0
- package/src/ui/dist/assets/index-BQ0LIrW-.js +2 -0
- package/src/ui/dist/assets/index-BcAUh2Nm.css +1 -0
- package/src/ui/dist/assets/index-BcThOK-i.js +331 -0
- package/src/ui/dist/assets/index-BnxV3k_S.js +3 -0
- package/src/ui/dist/assets/index-C7MZBHbT.js +117 -0
- package/src/ui/dist/assets/index-CCvKI2rM.js +2 -0
- package/src/ui/dist/assets/index-CZvmcCab.js +8 -0
- package/src/ui/dist/assets/index-Cp3hLKNl.js +2 -0
- package/src/ui/dist/assets/index-D7ayFxcx.js +2 -0
- package/src/ui/dist/assets/index-DAYxSQGU.js +2 -0
- package/src/ui/dist/assets/index-DD-HeMV0.css +1 -0
- package/src/ui/dist/assets/index-DPMxd3Qn.js +2 -0
- package/src/ui/dist/assets/index-DSe2jx3k.js +4 -0
- package/src/ui/dist/assets/index-DUirCkgW.js +2 -0
- package/src/ui/dist/assets/index-DaKPQ2hN.js +159 -0
- package/src/ui/dist/assets/index-DzpuR0Jg.js +2 -0
- package/src/ui/dist/assets/index-POndwsCI.js +2 -0
- package/src/ui/dist/assets/index-R8NM9I_9.js +2 -0
- package/src/ui/dist/assets/index-TCDuDhBj.js +2 -0
- package/src/ui/dist/assets/index-TckzASdM.js +2 -0
- package/src/ui/dist/assets/index-Yi5ytFFr.js +2 -0
- package/src/ui/dist/assets/infoDiagram-FWYZ7A6U-CiGBlFqH.js +3 -0
- package/src/ui/dist/assets/init-Gi6I4Gst.js +2 -0
- package/src/ui/dist/assets/ishikawaDiagram-FXEZZL3T-B1aheRbz.js +71 -0
- package/src/ui/dist/assets/it-IT-JPQ66NNP-DT3HSU7X.js +12 -0
- package/src/ui/dist/assets/ja-JP-DBVTYXUO-CsfJjjWt.js +9 -0
- package/src/ui/dist/assets/javascript-iXu5QeM3.js +2 -0
- package/src/ui/dist/assets/journeyDiagram-5HDEW3XC-DtnJPxub.js +140 -0
- package/src/ui/dist/assets/julia-DuME0IfC.js +2 -0
- package/src/ui/dist/assets/kaa-6HZHGXH3-DQz-1-Gn.js +2 -0
- package/src/ui/dist/assets/kab-KAB-ZGHBKWFO-CaH-LSoK.js +9 -0
- package/src/ui/dist/assets/kanban-definition-HUTT4EX6-CZatSm3e.js +90 -0
- package/src/ui/dist/assets/katex-C5jXJg4s.js +258 -0
- package/src/ui/dist/assets/kk-KZ-P5N5QNE5-BMXmcm55.js +2 -0
- package/src/ui/dist/assets/km-KH-HSX4SM5Z-ZeoJNBpN.js +12 -0
- package/src/ui/dist/assets/ko-KR-MTYHY66A-BeaLRKph.js +10 -0
- package/src/ui/dist/assets/ku-TR-6OUDTVRD-B_28KrkR.js +10 -0
- package/src/ui/dist/assets/layout-DEXfKzaS.js +2 -0
- package/src/ui/dist/assets/linear-CpEDnQRC.js +2 -0
- package/src/ui/dist/assets/livescript-BwQOo05w.js +2 -0
- package/src/ui/dist/assets/lt-LT-XHIRWOB4-BxDcnUhp.js +4 -0
- package/src/ui/dist/assets/lua-VAEuO923.js +2 -0
- package/src/ui/dist/assets/lv-LV-5QDEKY6T-DpKDl1_y.js +8 -0
- package/src/ui/dist/assets/map-Czzmt4hB.js +2 -0
- package/src/ui/dist/assets/mathematica-DTrFuWx2.js +2 -0
- package/src/ui/dist/assets/mbox-CNhZ1qSd.js +2 -0
- package/src/ui/dist/assets/mermaidLoader-CBO31t0J.js +305 -0
- package/src/ui/dist/assets/mermaidLoader-CEK31ho9.css +1 -0
- package/src/ui/dist/assets/mindmap-definition-LN4V7U3C-CQ0TccEr.js +97 -0
- package/src/ui/dist/assets/mirc-CjQqDB4T.js +2 -0
- package/src/ui/dist/assets/mllike-CXdrOF99.js +2 -0
- package/src/ui/dist/assets/modelica-Dc1JOy9r.js +2 -0
- package/src/ui/dist/assets/mr-IN-CRQNXWMA-BKCZT58p.js +14 -0
- package/src/ui/dist/assets/mscgen-BA5vi2Kp.js +2 -0
- package/src/ui/dist/assets/mumps-BT43cFF4.js +2 -0
- package/src/ui/dist/assets/my-MM-5M5IBNSE-D34k0G9T.js +2 -0
- package/src/ui/dist/assets/nb-NO-T6EIAALU-DXr_KW8J.js +11 -0
- package/src/ui/dist/assets/nginx-DdIZxoE0.js +2 -0
- package/src/ui/dist/assets/nl-NL-IS3SIHDZ-C1L0aVDR.js +9 -0
- package/src/ui/dist/assets/nn-NO-6E72VCQL-CLWVSxbZ.js +9 -0
- package/src/ui/dist/assets/nsis-LdVXkNf5.js +2 -0
- package/src/ui/dist/assets/ntriples-BfvgReVJ.js +2 -0
- package/src/ui/dist/assets/oc-FR-POXYY2M6-nf8_J3eR.js +9 -0
- package/src/ui/dist/assets/octave-Ck1zUtKM.js +2 -0
- package/src/ui/dist/assets/ordinal-Cboi1Yqb.js +2 -0
- package/src/ui/dist/assets/oz-BzwKVEFT.js +2 -0
- package/src/ui/dist/assets/pa-IN-N4M65BXN-CAMJ-xd6.js +5 -0
- package/src/ui/dist/assets/pascal--L3eBynH.js +2 -0
- package/src/ui/dist/assets/pegDiagram-2B236MQR-Bj2RcmRd.js +2 -0
- package/src/ui/dist/assets/percentages-BXMCSKIN-s9yWFdr6.js +160 -0
- package/src/ui/dist/assets/perl-CdXCOZ3F.js +2 -0
- package/src/ui/dist/assets/pica-BGv_AhAB.js +8 -0
- package/src/ui/dist/assets/pieDiagram-ENE6RG2P-obpzz8dC.js +40 -0
- package/src/ui/dist/assets/pig-CevX1Tat.js +2 -0
- package/src/ui/dist/assets/pl-PL-T2D74RX3-DKJ5H85v.js +10 -0
- package/src/ui/dist/assets/powershell-CFHJl5sT.js +2 -0
- package/src/ui/dist/assets/properties-C78fOPTZ.js +2 -0
- package/src/ui/dist/assets/protobuf-ChK-085T.js +2 -0
- package/src/ui/dist/assets/{proxy-D0vUbds5.js → proxy-BSmwef4H.js} +2 -2
- package/src/ui/dist/assets/pt-BR-5N22H2LF-B5kow-kN.js +10 -0
- package/src/ui/dist/assets/pt-PT-UZXXM6DQ-B2G34fso.js +10 -0
- package/src/ui/dist/assets/pug-DeIclll2.js +2 -0
- package/src/ui/dist/assets/puppet-DMA9R1ak.js +2 -0
- package/src/ui/dist/assets/python-BuPzkPfP.js +2 -0
- package/src/ui/dist/assets/q-pXgVlZs6.js +2 -0
- package/src/ui/dist/assets/quadrantDiagram-ABIIQ3AL-Cl-T7NkJ.js +8 -0
- package/src/ui/dist/assets/r-B6wPVr8A.js +2 -0
- package/src/ui/dist/assets/railroadDiagram-RFXS5EU6-DMq82RHg.js +2 -0
- package/src/ui/dist/assets/{refresh-cw-JNmExijd.js → refresh-cw-CbFd7guV.js} +2 -2
- package/src/ui/dist/assets/requirementDiagram-TGXJPOKE-tGInMDgU.js +85 -0
- package/src/ui/dist/assets/ro-RO-JPDTUUEW-BwLdZW91.js +12 -0
- package/src/ui/dist/assets/roundRect-0PYZxl1G.js +2 -0
- package/src/ui/dist/assets/rpm-CTu-6PCP.js +2 -0
- package/src/ui/dist/assets/ru-RU-B4JR7IUQ-DpdAgIJc.js +10 -0
- package/src/ui/dist/assets/ruby-B2Rjki9n.js +2 -0
- package/src/ui/dist/assets/runtimeBrand-BoKPimsz.js +2 -0
- package/src/ui/dist/assets/sankeyDiagram-HTMAVEWB-C7X-ET4m.js +41 -0
- package/src/ui/dist/assets/sas-B4kiWyti.js +2 -0
- package/src/ui/dist/assets/save-D1CXHwBw.js +12 -0
- package/src/ui/dist/assets/scheme-C41bIUwD.js +2 -0
- package/src/ui/dist/assets/sequenceDiagram-DBY2YBRQ-Bn24i_nY.js +163 -0
- package/src/ui/dist/assets/settings-2-DtSNAAcU.js +22 -0
- package/src/ui/dist/assets/shell-CjFT_Tl9.js +2 -0
- package/src/ui/dist/assets/shield-check-BVbJ8T_N.js +7 -0
- package/src/ui/dist/assets/si-LK-N5RQ5JYF-naJaUy5u.js +2 -0
- package/src/ui/dist/assets/sieve-C3Gn_uJK.js +2 -0
- package/src/ui/dist/assets/simple-mode-GW_nhZxv.js +2 -0
- package/src/ui/dist/assets/sizeCapture-X5ZJPWSS-DAQHfm82.js +2 -0
- package/src/ui/dist/assets/sk-SK-C5VTKIMK-1NPz1J_d.js +7 -0
- package/src/ui/dist/assets/sl-SI-NN7IZMDC-D8RfmNQw.js +7 -0
- package/src/ui/dist/assets/smalltalk-CnHTOXQT.js +2 -0
- package/src/ui/dist/assets/solr-DehyRSwq.js +2 -0
- package/src/ui/dist/assets/sparql-DkYu6x3z.js +2 -0
- package/src/ui/dist/assets/spreadsheet-BCZA_wO0.js +2 -0
- package/src/ui/dist/assets/sql-D0XecflT.js +2 -0
- package/src/ui/dist/assets/stateDiagram-2N3HPSRC-Ck48D1ck.js +2 -0
- package/src/ui/dist/assets/stateDiagram-v2-6OUMAXLB-CdfRCJAJ.js +2 -0
- package/src/ui/dist/assets/stex-C3f8Ysf7.js +2 -0
- package/src/ui/dist/assets/style-C3QI7VPf.css +1 -0
- package/src/ui/dist/assets/stylus-B533Al4x.js +2 -0
- package/src/ui/dist/assets/subset-shared.chunk-eAtLHmbi.js +85 -0
- package/src/ui/dist/assets/subset-worker.chunk-DeHCTnTk.js +2 -0
- package/src/ui/dist/assets/sv-SE-XGPEYMSR-BeOYCU-8.js +11 -0
- package/src/ui/dist/assets/swift-BzpIVaGY.js +2 -0
- package/src/ui/dist/assets/swimlanes-5IMT3BWC-DOy22UjP.js +3 -0
- package/src/ui/dist/assets/swimlanesDiagram-G3AALYLV-sicPbVOg.js +9 -0
- package/src/ui/dist/assets/ta-IN-2NMHFXQM-CtS68WDd.js +10 -0
- package/src/ui/dist/assets/tcl-DVfN8rqt.js +2 -0
- package/src/ui/dist/assets/{terminal-BBQvnOAK.js → terminal-DEby5Y_P.js} +2 -2
- package/src/ui/dist/assets/terminalControl-BkFeDVXo.js +134 -0
- package/src/ui/dist/assets/textile-CnDTJFAw.js +2 -0
- package/src/ui/dist/assets/th-TH-HPSO5L25-DCHY9-Co.js +3 -0
- package/src/ui/dist/assets/tiddlywiki-DO-Gjzrf.js +2 -0
- package/src/ui/dist/assets/tiki-DGYXhP31.js +2 -0
- package/src/ui/dist/assets/timeline-definition-FHXFAJF6-DVkG72qO.js +121 -0
- package/src/ui/dist/assets/toml-Bm5Em-hy.js +2 -0
- package/src/ui/dist/assets/tr-TR-DEFEU3FU-y5-vjTv8.js +8 -0
- package/src/ui/dist/assets/troff-wAsdV37c.js +2 -0
- package/src/ui/dist/assets/ttcn-CfJYG6tj.js +2 -0
- package/src/ui/dist/assets/ttcn-cfg-B9xdYoR4.js +2 -0
- package/src/ui/dist/assets/turtle-B1tBg_DP.js +2 -0
- package/src/ui/dist/assets/uk-UA-QMV73CPH-BRbR5It6.js +7 -0
- package/src/ui/dist/assets/useReducedMotion-D07XP52Q.js +12 -0
- package/src/ui/dist/assets/vb-CmGdzxic.js +2 -0
- package/src/ui/dist/assets/vbscript-BuJXcnF6.js +2 -0
- package/src/ui/dist/assets/velocity-D8B20fx6.js +2 -0
- package/src/ui/dist/assets/vennDiagram-L72KCM5P-DwMwBlf-.js +35 -0
- package/src/ui/dist/assets/verilog-C6RDOZhf.js +2 -0
- package/src/ui/dist/assets/vhdl-lSbBsy5d.js +2 -0
- package/src/ui/dist/assets/vi-VN-M7AON7JQ-s6wSBv2s.js +6 -0
- package/src/ui/dist/assets/wardleyDiagram-EHGQE667-CNuuvzEg.js +79 -0
- package/src/ui/dist/assets/webidl-ZXfAyPTL.js +2 -0
- package/src/ui/dist/assets/{x-DoIOGAJz.js → x-B84wq78k.js} +2 -2
- package/src/ui/dist/assets/xquery-DzFWVndE.js +2 -0
- package/src/ui/dist/assets/xychartDiagram-FW5EYKEG-dUpZxmn6.js +8 -0
- package/src/ui/dist/assets/yacas-BJ4BC0dw.js +2 -0
- package/src/ui/dist/assets/z80-Hz9HOZM7.js +2 -0
- package/src/ui/dist/assets/zh-CN-LNUGB5OW-Cu_-POQN.js +11 -0
- package/src/ui/dist/assets/zh-HK-E62DVLB3-BCx4W4qZ.js +2 -0
- package/src/ui/dist/assets/zh-TW-RAJ6MFWO-02wx_Mrj.js +10 -0
- package/src/ui/dist/icons/excalidraw.svg +1 -0
- package/src/ui/dist/icons/markdown.svg +1 -0
- package/src/ui/dist/index.html +2 -2
- package/src/ui/package.json +10 -0
- package/src/ui/playwright.config.ts +36 -0
- package/src/ui/pnpm-workspace.yaml +2 -0
- package/src/ui/public/icons/excalidraw.svg +1 -0
- package/src/ui/public/icons/markdown.svg +1 -0
- package/src/ui/tsconfig.json +2 -1
- package/src/ui/vite.config.ts +1 -0
- package/src/wf-ui-server/__tests__/a2a-store.test.mjs +432 -15
- package/src/wf-ui-server/__tests__/action-registry-loader.test.mjs +156 -0
- package/src/wf-ui-server/__tests__/claude-stream-json.test.mjs +397 -0
- package/src/wf-ui-server/__tests__/codex-appserver.test.mjs +392 -0
- package/src/wf-ui-server/__tests__/component-node-api.test.mjs +881 -0
- package/src/wf-ui-server/__tests__/component-node-store.test.mjs +401 -0
- package/src/wf-ui-server/__tests__/control-plane-acceptance.test.mjs +2027 -0
- package/src/wf-ui-server/__tests__/control-plane-cli-smoke.test.mjs +1014 -0
- package/src/wf-ui-server/__tests__/dispatch-lifecycle.test.mjs +330 -0
- package/src/wf-ui-server/__tests__/effort-compatibility-red-092.test.mjs +151 -0
- package/src/wf-ui-server/__tests__/graph-layout-agent-tree.test.mjs +254 -0
- package/src/wf-ui-server/__tests__/graph-layout-tidy.test.mjs +260 -0
- package/src/wf-ui-server/__tests__/graph-layout.test.mjs +84 -0
- package/src/wf-ui-server/__tests__/node-config-api.test.mjs +384 -0
- package/src/wf-ui-server/__tests__/opencode-server.test.mjs +526 -0
- package/src/wf-ui-server/__tests__/peer-capsule.test.mjs +2 -2
- package/src/wf-ui-server/__tests__/pty-adapter.test.mjs +71 -1
- package/src/wf-ui-server/__tests__/runtime-config.test.mjs +3 -3
- package/src/wf-ui-server/__tests__/runtime-detector.test.mjs +21 -0
- package/src/wf-ui-server/__tests__/runtime-review.test.mjs +828 -0
- package/src/wf-ui-server/__tests__/server.integration.test.mjs +1463 -11
- package/src/wf-ui-server/__tests__/session-cleanup.test.mjs +159 -0
- package/src/wf-ui-server/__tests__/session-registry.test.mjs +52 -3
- package/src/wf-ui-server/__tests__/settings.test.mjs +12 -2
- package/src/wf-ui-server/__tests__/spawn-gate.test.mjs +78 -0
- package/src/wf-ui-server/__tests__/task-group-parser.test.mjs +120 -0
- package/src/wf-ui-server/__tests__/task-group-tag.test.mjs +264 -0
- package/src/wf-ui-server/__tests__/task-parser.test.mjs +49 -3
- package/src/wf-ui-server/__tests__/terminal-context-hardening.test.mjs +122 -0
- package/src/wf-ui-server/__tests__/terminal-context.test.mjs +164 -0
- package/src/wf-ui-server/__tests__/terminal-store.test.mjs +4 -4
- package/src/wf-ui-server/__tests__/wf-browser-api.test.mjs +599 -0
- package/src/wf-ui-server/__tests__/wf-browser-store.test.mjs +184 -0
- package/src/wf-ui-server/__tests__/workflow-action-registry.test.mjs +282 -0
- package/src/wf-ui-server/__tests__/workflow-agent-communication.test.mjs +411 -0
- package/src/wf-ui-server/__tests__/workflow-agent-context.test.mjs +323 -0
- package/src/wf-ui-server/__tests__/workflow-agent-cooperation-permissions.test.mjs +318 -0
- package/src/wf-ui-server/__tests__/workflow-agent-messages-structured.test.mjs +458 -0
- package/src/wf-ui-server/__tests__/workflow-agent-routing.test.mjs +434 -0
- package/src/wf-ui-server/__tests__/workflow-agent-runtime.test.mjs +324 -0
- package/src/wf-ui-server/__tests__/workflow-api-integration.test.mjs +263 -0
- package/src/wf-ui-server/__tests__/workflow-api-phase3.test.mjs +1213 -0
- package/src/wf-ui-server/__tests__/workflow-claude-materialize.test.mjs +209 -0
- package/src/wf-ui-server/__tests__/workflow-cli-registry-manuals.test.mjs +173 -0
- package/src/wf-ui-server/__tests__/workflow-cli-surface.test.mjs +176 -0
- package/src/wf-ui-server/__tests__/workflow-codex-resume-id.test.mjs +556 -0
- package/src/wf-ui-server/__tests__/workflow-cooperation-enforcement.test.mjs +553 -0
- package/src/wf-ui-server/__tests__/workflow-depth-resume-dock.test.mjs +846 -0
- package/src/wf-ui-server/__tests__/workflow-display-node.test.mjs +150 -0
- package/src/wf-ui-server/__tests__/workflow-edge-update.test.mjs +296 -0
- package/src/wf-ui-server/__tests__/workflow-file-cache-lock-watch.test.mjs +380 -0
- package/src/wf-ui-server/__tests__/workflow-file-formats.test.mjs +994 -0
- package/src/wf-ui-server/__tests__/workflow-file-node-actions.test.mjs +294 -0
- package/src/wf-ui-server/__tests__/workflow-goal-actions.test.mjs +357 -0
- package/src/wf-ui-server/__tests__/workflow-goal-task-autoclose.test.mjs +256 -0
- package/src/wf-ui-server/__tests__/workflow-graceful-stop.test.mjs +108 -0
- package/src/wf-ui-server/__tests__/workflow-graph-undo.test.mjs +524 -0
- package/src/wf-ui-server/__tests__/workflow-layout.test.mjs +732 -0
- package/src/wf-ui-server/__tests__/workflow-magnetic-topology.test.mjs +222 -0
- package/src/wf-ui-server/__tests__/workflow-markdown-lock.test.mjs +359 -0
- package/src/wf-ui-server/__tests__/workflow-mcp-hub.test.mjs +174 -0
- package/src/wf-ui-server/__tests__/workflow-node-manual-schema.test.mjs +241 -0
- package/src/wf-ui-server/__tests__/workflow-node-runtime.test.mjs +1991 -0
- package/src/wf-ui-server/__tests__/workflow-node-store-utils.test.mjs +125 -0
- package/src/wf-ui-server/__tests__/workflow-registry-drift.test.mjs +296 -0
- package/src/wf-ui-server/__tests__/workflow-resource-handle-four-side.test.mjs +217 -0
- package/src/wf-ui-server/__tests__/workflow-role-profile.test.mjs +234 -0
- package/src/wf-ui-server/__tests__/workflow-set-model.test.mjs +261 -0
- package/src/wf-ui-server/__tests__/workflow-skill-group-context-enabled.test.mjs +131 -0
- package/src/wf-ui-server/__tests__/workflow-skill-group-enable-disable.test.mjs +186 -0
- package/src/wf-ui-server/__tests__/workflow-skills-hub.test.mjs +125 -0
- package/src/wf-ui-server/__tests__/workflow-state-reconcile.test.mjs +139 -0
- package/src/wf-ui-server/__tests__/workflow-subagent-strategy-matrix.test.mjs +529 -0
- package/src/wf-ui-server/__tests__/workflow-team-flow.test.mjs +278 -0
- package/src/wf-ui-server/__tests__/workflow-terminal-control-live.test.mjs +294 -0
- package/src/wf-ui-server/__tests__/workflow-terminal-control.test.mjs +631 -0
- package/src/wf-ui-server/__tests__/workflow-timer-wakeup.test.mjs +318 -0
- package/src/wf-ui-server/__tests__/workflow-unified-resume.test.mjs +537 -0
- package/src/wf-ui-server/__tests__/workspace-api-hardening.test.mjs +187 -0
- package/src/wf-ui-server/__tests__/workspace-api.test.mjs +382 -0
- package/src/wf-ui-server/__tests__/workspace-reveal.test.mjs +138 -0
- package/src/wf-ui-server/__tests__/workspace-store-hardening.test.mjs +255 -0
- package/src/wf-ui-server/__tests__/workspace-store.test.mjs +208 -0
- package/src/wf-ui-server/__tests__/ws-events.integration.test.mjs +52 -25
- package/src/wf-ui-server/__tests__/ws-terminal.integration.test.mjs +12 -6
- package/src/wf-ui-server/__tests__/ws-wf-browser.integration.test.mjs +488 -0
- package/src/wf-ui-server/a2a-store.mjs +3007 -89
- package/src/wf-ui-server/action-registry.mjs +277 -0
- package/src/wf-ui-server/bridge-store.mjs +276 -0
- package/src/wf-ui-server/chat-driver.mjs +220 -0
- package/src/wf-ui-server/chat-store.mjs +109 -0
- package/src/wf-ui-server/claude-transcript-materializer.mjs +235 -0
- package/src/wf-ui-server/codex-update-prompt.mjs +53 -0
- package/src/wf-ui-server/component-node-store.mjs +689 -0
- package/src/wf-ui-server/composition-api.mjs +436 -0
- package/src/wf-ui-server/control-plane-token.mjs +17 -0
- package/src/wf-ui-server/dispatch-contract.mjs +150 -0
- package/src/wf-ui-server/drivers/claude-stream-json.mjs +371 -0
- package/src/wf-ui-server/drivers/codex-appserver.mjs +513 -0
- package/src/wf-ui-server/drivers/opencode-server.mjs +486 -0
- package/src/wf-ui-server/excalidraw-svg.mjs +141 -0
- package/src/wf-ui-server/file-format-adapters.mjs +511 -0
- package/src/wf-ui-server/file-watcher.mjs +215 -0
- package/src/wf-ui-server/graph-layout.mjs +778 -0
- package/src/wf-ui-server/harness-env.mjs +46 -0
- package/src/wf-ui-server/json-store-utils.mjs +48 -0
- package/src/wf-ui-server/model-capability.mjs +773 -0
- package/src/wf-ui-server/node-config-store.mjs +233 -0
- package/src/wf-ui-server/node-store-utils.mjs +88 -0
- package/src/wf-ui-server/peer-capsule.mjs +56 -1
- package/src/wf-ui-server/pty-adapter.mjs +513 -11
- package/src/wf-ui-server/reveal-foreground.mjs +69 -0
- package/src/wf-ui-server/runtime-detector.mjs +52 -6
- package/src/wf-ui-server/server.mjs +5613 -403
- package/src/wf-ui-server/session-cleanup.mjs +363 -0
- package/src/wf-ui-server/session-registry.mjs +179 -3
- package/src/wf-ui-server/settings.mjs +25 -0
- package/src/wf-ui-server/spawn-gate.mjs +46 -0
- package/src/wf-ui-server/task-parser.mjs +88 -3
- package/src/wf-ui-server/terminal-store.mjs +225 -11
- package/src/wf-ui-server/timer-wakeup-scheduler.mjs +226 -0
- package/src/wf-ui-server/wf-browser-store.mjs +733 -0
- package/src/wf-ui-server/workflow-agent-context.mjs +1731 -0
- package/src/wf-ui-server/workflow-capability-node-store.mjs +676 -0
- package/src/wf-ui-server/workflow-event-node-store.mjs +623 -0
- package/src/wf-ui-server/workflow-goal-node-store.mjs +328 -0
- package/src/wf-ui-server/workflow-graph-store.mjs +623 -0
- package/src/wf-ui-server/workflow-mcp-hub.mjs +286 -0
- package/src/wf-ui-server/workflow-node-runtime.mjs +1767 -0
- package/src/wf-ui-server/workflow-node-settings-store.mjs +339 -0
- package/src/wf-ui-server/workflow-node-types/agent-node.mjs +920 -0
- package/src/wf-ui-server/workflow-node-types/display-node.mjs +151 -0
- package/src/wf-ui-server/workflow-node-types/excalidraw-node.mjs +145 -0
- package/src/wf-ui-server/workflow-node-types/file-node.mjs +484 -0
- package/src/wf-ui-server/workflow-node-types/github-trigger-node.mjs +207 -0
- package/src/wf-ui-server/workflow-node-types/goal-node.mjs +491 -0
- package/src/wf-ui-server/workflow-node-types/markdown-node.mjs +225 -0
- package/src/wf-ui-server/workflow-node-types/mcp-connector-node.mjs +71 -0
- package/src/wf-ui-server/workflow-node-types/role-profile-store.mjs +191 -0
- package/src/wf-ui-server/workflow-node-types/skill-group-node.mjs +98 -0
- package/src/wf-ui-server/workflow-node-types/timer-node.mjs +607 -0
- package/src/wf-ui-server/workflow-ontology.mjs +681 -0
- package/src/wf-ui-server/workflow-operation-store.mjs +115 -0
- package/src/wf-ui-server/workflow-skills-hub.mjs +366 -0
- package/src/wf-ui-server/workflow-skills-market.mjs +723 -0
- package/src/wf-ui-server/workspace-store.mjs +951 -0
- package/src/wf-ui-server/ws-chat.mjs +299 -0
- package/src/wf-ui-server/ws-events.mjs +45 -20
- package/src/wf-ui-server/ws-terminal.mjs +165 -22
- package/src/wf-ui-server/ws-wf-browser.mjs +419 -0
- package/templates/common/.claude/agents/review-manager.md +33 -29
- package/templates/common/.claude/commands/wf-browser.md +1 -1
- package/templates/common/.claude/commands/wf-help.md +5 -3
- package/templates/common/.claude/commands/wf-init.md +44 -0
- package/templates/common/.claude/commands/wf-learn.md +34 -8
- package/templates/common/.claude/commands/wf-max.md +19 -9
- package/templates/common/.claude/commands/wf-review.md +3 -3
- package/templates/common/.claude/commands/wf-search.md +55 -0
- package/templates/common/.claude/commands/wf-task-archive.md +5 -4
- package/templates/common/.claude/commands/wf-task-list.md +6 -3
- package/templates/common/.claude/commands/wf-task-record.md +10 -2
- package/templates/common/.claude/commands/wf-ui.md +12 -5
- package/templates/common/.claude/commands/wf-update.md +4 -0
- package/templates/common/.claude/commands/wf.md +12 -1
- package/templates/common/.claude/rules/ecc/common.md +10 -1
- package/templates/common/.claude/skills/wf/SKILL.md +36 -0
- package/templates/common/.claude/skills/wf-browser/SKILL.md +427 -122
- package/templates/common/.claude/skills/wf-browser/references/BROWSER_CONTROL_PATTERNS.md +43 -0
- package/templates/common/.claude/skills/wf-init/SKILL.md +33 -0
- package/templates/common/.claude/skills/wf-learn/SKILL.md +106 -26
- package/templates/common/.claude/skills/wf-max/SKILL.md +45 -11
- package/templates/common/.claude/skills/wf-review/SKILL.md +26 -54
- package/templates/common/.claude/skills/wf-search/SKILL.md +122 -0
- package/templates/common/.claude/skills/wf-search/references/evidence-contract.md +77 -0
- package/templates/common/.claude/skills/wf-search/references/policies/compare.md +38 -0
- package/templates/common/.claude/skills/wf-search/references/policies/fact.md +39 -0
- package/templates/common/.claude/skills/wf-search/references/policies/troubleshoot.md +39 -0
- package/templates/common/.claude/skills/wf-search/references/policies/verify.md +44 -0
- package/templates/common/.claude/skills/wf-search/references/source-routing.md +40 -0
- package/templates/common/.claude/skills/wf-search/references/tool-adapters.md +38 -0
- package/templates/common/.claude/skills/wf-ui/SKILL.md +146 -12
- package/templates/common/.claude/skills/wf-update/SKILL.md +5 -1
- package/templates/common/.harness-version +188 -85
- package/templates/common/.opencode/agents/review-manager.md +31 -27
- package/templates/common/.opencode/commands/wf-browser.md +1 -1
- package/templates/common/.opencode/commands/wf-help.md +5 -3
- package/templates/common/.opencode/commands/wf-init.md +44 -0
- package/templates/common/.opencode/commands/wf-learn.md +34 -8
- package/templates/common/.opencode/commands/wf-max.md +19 -9
- package/templates/common/.opencode/commands/wf-review.md +3 -3
- package/templates/common/.opencode/commands/wf-search.md +55 -0
- package/templates/common/.opencode/commands/wf-task-archive.md +5 -7
- package/templates/common/.opencode/commands/wf-task-list.md +6 -6
- package/templates/common/.opencode/commands/wf-task-record.md +10 -5
- package/templates/common/.opencode/commands/wf-ui.md +12 -5
- package/templates/common/.opencode/commands/wf-update.md +4 -0
- package/templates/common/.opencode/commands/wf.md +12 -1
- package/templates/common/CLAUDE.md +61 -3
- package/templates/common/Harness/MEMORY.md +8 -5
- package/templates/common/Harness/README.md +14 -10
- package/templates/common/Harness/a2a/action-registry.json +4397 -0
- package/templates/common/Harness/a2a/role-graph.json +16 -3
- package/templates/common/Harness/a2a/skills/terminal-control.json +45 -1
- package/templates/common/Harness/a2a/skills/wf-ui-map.json +50 -0
- package/templates/common/Harness/a2a/skills/workflow-agent-node.json +143 -0
- package/templates/common/Harness/a2a/skills/workflow-context.json +95 -0
- package/templates/common/Harness/a2a/skills/workflow-diagram-node.json +60 -0
- package/templates/common/Harness/a2a/skills/workflow-display-node.json +69 -0
- package/templates/common/Harness/a2a/skills/workflow-file-node.json +92 -0
- package/templates/common/Harness/a2a/skills/workflow-goal-node.json +76 -0
- package/templates/common/Harness/a2a/skills/workflow-markdown-node.json +79 -0
- package/templates/common/Harness/a2a/skills/workflow-mcp-connector-node.json +59 -0
- package/templates/common/Harness/a2a/skills/workflow-node-actions.json +105 -0
- package/templates/common/Harness/a2a/skills/workflow-node-map.json +71 -0
- package/templates/common/Harness/a2a/skills/workflow-ontology.json +54 -0
- package/templates/common/Harness/a2a/skills/workflow-resource-node.json +68 -0
- package/templates/common/Harness/a2a/skills/workflow-skill-group-node.json +56 -0
- package/templates/common/Harness/a2a/skills/workflow-timer-node.json +81 -0
- package/templates/common/Harness/a2a/workflows.json +33 -0
- package/templates/common/Harness/ownership.manifest.json +263 -2
- package/templates/common/Harness/project/architecture.md +499 -0
- package/templates/common/Harness/research/README.md +20 -0
- package/templates/common/Harness/scripts/README.md +70 -6
- package/templates/common/Harness/scripts/a2a-terminal.mjs +12 -4
- package/templates/common/Harness/scripts/context-budget.mjs +7 -3
- package/templates/common/Harness/scripts/lib/memory-context.mjs +400 -0
- package/templates/common/Harness/scripts/lib/path-scope.mjs +77 -0
- package/templates/common/Harness/scripts/lib/research-policy.mjs +99 -0
- package/templates/common/Harness/scripts/lib/wf-search.mjs +189 -0
- package/templates/common/Harness/scripts/memory-context.mjs +63 -0
- package/templates/common/Harness/scripts/research-policy.mjs +27 -0
- package/templates/common/Harness/scripts/task-context.mjs +547 -0
- package/templates/common/Harness/scripts/task-group-index.mjs +242 -0
- package/templates/common/Harness/scripts/task-state.mjs +659 -95
- package/templates/common/Harness/scripts/validate-harness.mjs +70 -28
- package/templates/common/Harness/scripts/wf-auto-update-prompt.mjs +24 -0
- package/templates/common/Harness/scripts/wf-remove.mjs +10 -0
- package/templates/common/Harness/scripts/wf-search.mjs +10 -0
- package/templates/common/Harness/scripts/wf-ui-control.mjs +3144 -0
- package/templates/common/Harness/scripts/wf-update-check.mjs +274 -51
- package/templates/common/Harness/scripts/wf-update-runner.mjs +53 -16
- package/templates/common/Harness/settings.json +10 -0
- package/templates/common/Harness/specs/guides/SETUP.md +4 -3
- package/templates/common/Harness/specs/protocols/HARNESS_BRIDGE.md +429 -48
- package/templates/common/Harness/specs/protocols/MEMORY_PROTOCOL.md +24 -0
- package/templates/common/Harness/specs/protocols/TASK_ARCHIVE.md +14 -11
- package/templates/common/Harness/specs/runtime/command-surface.json +28 -0
- package/templates/common/Harness/specs/runtime/context-loading.md +6 -0
- package/templates/common/Harness/specs/runtime/dispatch.md +9 -1
- package/templates/common/Harness/specs/runtime/subagents.md +20 -5
- package/templates/common/Harness/specs/workflows/WF-AUTO-SPARK.md +19 -0
- package/templates/common/Harness/specs/workflows/WF-AUTO.md +21 -0
- package/templates/common/Harness/specs/workflows/WF-KERNEL.md +4 -2
- package/templates/common/Harness/specs/workflows/WF-MAX.md +39 -12
- package/templates/common/Harness/specs/workflows/WF-STATE.md +62 -14
- package/templates/common/Harness/specs/workflows/WF.md +32 -0
- package/templates/common/Harness/tasks/INDEX.json +7 -0
- package/templates/common/Harness/tasks/INDEX.md +12 -0
- package/templates/common/Harness/tasks/_template/PLAN.md +6 -0
- package/templates/common/Harness/tasks/_template/PROGRESS.md +5 -0
- package/templates/common/Harness/tasks/_template/STATE.json +22 -0
- package/templates/common/Harness/templates/TEST_PLAN.template.md +5 -4
- package/templates/common/Harness/templates/UI_CONTRACT.template.md +7 -5
- package/templates/common/Harness/wf-browser/README.md +69 -0
- package/templates/common/README.md +17 -0
- package/src/ui/dist/assets/AgentsRoute-CuSKYmFu.js +0 -17
- package/src/ui/dist/assets/AgentsRoute-CuSKYmFu.js.map +0 -1
- package/src/ui/dist/assets/RolesRoute-DOzTYVRm.js +0 -7
- package/src/ui/dist/assets/RolesRoute-DOzTYVRm.js.map +0 -1
- package/src/ui/dist/assets/SettingsRoute-DPU7jSQm.js +0 -12
- package/src/ui/dist/assets/SettingsRoute-DPU7jSQm.js.map +0 -1
- package/src/ui/dist/assets/TaskList-BN4r8s1i.js +0 -50
- package/src/ui/dist/assets/TaskList-BN4r8s1i.js.map +0 -1
- package/src/ui/dist/assets/TerminalDrawer-Cej4PxsH.js +0 -74
- package/src/ui/dist/assets/TerminalDrawer-Cej4PxsH.js.map +0 -1
- package/src/ui/dist/assets/WorkflowRoute-BnuhLJ6X.css +0 -1
- package/src/ui/dist/assets/WorkflowRoute-C-clKe-j.js +0 -39
- package/src/ui/dist/assets/WorkflowRoute-C-clKe-j.js.map +0 -1
- package/src/ui/dist/assets/index-BOVYWntB.js +0 -117
- package/src/ui/dist/assets/index-BOVYWntB.js.map +0 -1
- package/src/ui/dist/assets/index-DaUObq0H.css +0 -1
- package/src/ui/dist/assets/maximize-2-LNrr_rKr.js +0 -7
- package/src/ui/dist/assets/maximize-2-LNrr_rKr.js.map +0 -1
- package/src/ui/dist/assets/plus-QuTJyoT3.js +0 -7
- package/src/ui/dist/assets/plus-QuTJyoT3.js.map +0 -1
- package/src/ui/dist/assets/proxy-D0vUbds5.js.map +0 -1
- package/src/ui/dist/assets/refresh-cw-JNmExijd.js.map +0 -1
- package/src/ui/dist/assets/terminal-BBQvnOAK.js.map +0 -1
- package/src/ui/dist/assets/useReducedMotion-BqmH0Tf7.js +0 -7
- package/src/ui/dist/assets/useReducedMotion-BqmH0Tf7.js.map +0 -1
- package/src/ui/dist/assets/x-DoIOGAJz.js.map +0 -1
- package/src/ui/pnpm-lock.yaml +0 -1582
- package/src/ui/src/App.tsx +0 -86
- package/src/ui/src/api.ts +0 -93
- package/src/ui/src/components/AgentsRoute.tsx +0 -503
- package/src/ui/src/components/Footer.tsx +0 -69
- package/src/ui/src/components/Header.tsx +0 -175
- package/src/ui/src/components/LoadingView.tsx +0 -22
- package/src/ui/src/components/RolesRoute.tsx +0 -169
- package/src/ui/src/components/SettingsRoute.tsx +0 -166
- package/src/ui/src/components/TaskList.tsx +0 -388
- package/src/ui/src/components/TerminalDrawer.tsx +0 -611
- package/src/ui/src/components/WorkflowRoute.tsx +0 -670
- package/src/ui/src/hooks/useReducedMotion.ts +0 -17
- package/src/ui/src/hooks/useServerConnection.ts +0 -114
- package/src/ui/src/index.css +0 -281
- package/src/ui/src/main.tsx +0 -11
- package/src/ui/src/types.ts +0 -108
- /package/src/ui/dist/assets/{TerminalDrawer-6GBZ9nXN.css → terminalControl-6GBZ9nXN.css} +0 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BnxV3k_S.js","assets/index-C7MZBHbT.js","assets/index-DD-HeMV0.css","assets/WorkflowRoute-D-0wVDpY.js","assets/terminalControl-BkFeDVXo.js","assets/terminalControl-6GBZ9nXN.css","assets/RuntimePicker-CucD8TGn.js","assets/runtimeBrand-BoKPimsz.js","assets/mermaidLoader-CBO31t0J.js","assets/proxy-BSmwef4H.js","assets/mermaidLoader-CEK31ho9.css","assets/useReducedMotion-D07XP52Q.js","assets/settings-2-DtSNAAcU.js","assets/x-B84wq78k.js","assets/shield-check-BVbJ8T_N.js","assets/save-D1CXHwBw.js","assets/terminal-DEby5Y_P.js","assets/refresh-cw-CbFd7guV.js","assets/WorkflowRoute-BN8yHmUs.css","assets/Combination-DhBLEmof.js","assets/index-DPMxd3Qn.js","assets/index-CZvmcCab.js","assets/index-R8NM9I_9.js","assets/index-39SJtrt0.js","assets/index-BQ0LIrW-.js","assets/index-POndwsCI.js","assets/index-DzpuR0Jg.js","assets/index-DUirCkgW.js","assets/index-DSe2jx3k.js","assets/index-CCvKI2rM.js","assets/index-Yi5ytFFr.js","assets/index-Cp3hLKNl.js","assets/index-DAYxSQGU.js","assets/index-D7ayFxcx.js","assets/dockerfile-BKs6k2Af.js","assets/simple-mode-GW_nhZxv.js","assets/factor-kuTfRLto.js","assets/nsis-LdVXkNf5.js","assets/pug-DeIclll2.js","assets/javascript-iXu5QeM3.js","assets/index-TCDuDhBj.js","assets/index-TckzASdM.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Fj=Object.defineProperty;var CE=t=>{throw TypeError(t)};var jj=(t,e,n)=>e in t?Fj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var se=(t,e,n)=>jj(t,typeof e!="symbol"?e+"":e,n),wE=(t,e,n)=>e.has(t)||CE("Cannot "+n);var wi=(t,e,n)=>(wE(t,e,"read from private field"),n?n.call(t):e.get(t)),kE=(t,e,n)=>e.has(t)?CE("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Kx=(t,e,n,i)=>(wE(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n);import{r as R,j as Y,v as C,g as i1,$ as Eh,_ as ce}from"./index-C7MZBHbT.js";import{f as EE,c as Zj,g as zj,j as Tb,p as Xj,z as Wj,k as Hj,l as y0,m as e6,V as mi,o as yr,q as r1,t as Qm,u as Jx,v as Uj,w as TE,x as ln,y as Ur,A as qr,B as Ji,D as Sa,E as gs,F as Sf,G as qj,r as au,H as Yj,I as Gj,J as Kj,K as Jj,L as eZ,M as tZ,N as nZ,O as iZ,P as rZ,_ as Mn,Q as jf,S as sZ,T as hC,U as oZ,W as aZ,X as lZ,Y as Vm,Z as t6}from"./WorkflowRoute-D-0wVDpY.js";import{u as uZ,o as cZ,s as hZ,f as fZ,a as dZ,b as pZ,h as mZ,l as gZ,c as OZ,d as fC,R as dC,_ as PE}from"./Combination-DhBLEmof.js";const xZ={}.hasOwnProperty;function n6(t,e){let n=-1,i;if(e.extensions)for(;++n<e.extensions.length;)n6(t,e.extensions[n]);for(i in e)if(xZ.call(e,i))switch(i){case"extensions":break;case"unsafe":{AE(t[i],e[i]);break}case"join":{AE(t[i],e[i]);break}case"handlers":{yZ(t[i],e[i]);break}default:t.options[i]=e[i]}return t}function AE(t,e){e&&t.push(...e)}function yZ(t,e){e&&Object.assign(t,e)}const vZ=[bZ];function bZ(t,e,n,i){if(e.type==="code"&&EE(e,i)&&(t.type==="list"||t.type===e.type&&EE(t,i)))return!1;if("spread"in n&&typeof n.spread=="boolean")return t.type==="paragraph"&&(t.type===e.type||e.type==="definition"||e.type==="heading"&&Zj(e,i))?void 0:n.spread?1:0}const Il=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],SZ=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:`
|
|
3
|
+
`,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:Il},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
|
|
4
|
+
]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:Il},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
|
|
5
|
+
*])`},{character:"*",inConstruct:"phrasing",notInConstruct:Il},{atBreak:!0,character:"+",after:`(?:[ \r
|
|
6
|
+
])`},{atBreak:!0,character:"-",after:`(?:[ \r
|
|
7
|
+
-])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r
|
|
8
|
+
]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:Il},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:Il},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:Il},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:Il},{atBreak:!0,character:"~"}];function _Z(t){return t.label||!t.identifier?t.label||"":zj(t.identifier)}function CZ(t){if(!t._compiled){const e=(t.atBreak?"[\\r\\n][\\t ]*":"")+(t.before?"(?:"+t.before+")":"");t._compiled=new RegExp((e?"("+e+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(t.character)?"\\":"")+t.character+(t.after?"(?:"+t.after+")":""),"g")}return t._compiled}function wZ(t,e,n){const i=e.indexStack,r=t.children||[],s=[];let o=-1,a=n.before,l;i.push(-1);let u=e.createTracker(n);for(;++o<r.length;){const c=r[o];let h;if(i[i.length-1]=o,o+1<r.length){let m=e.handle.handlers[r[o+1].type];m&&m.peek&&(m=m.peek),h=m?m(r[o+1],t,e,{before:"",after:"",...u.current()}).charAt(0):""}else h=n.after;s.length>0&&(a==="\r"||a===`
|
|
9
|
+
`)&&c.type==="html"&&(s[s.length-1]=s[s.length-1].replace(/(\r?\n|\r)$/," "),a=" ",u=e.createTracker(n),u.move(s.join("")));let f=e.handle(c,t,e,{...u.current(),after:h,before:a});l&&l===f.slice(0,1)&&(f=Tb(l.charCodeAt(0))+f.slice(1));const p=e.attentionEncodeSurroundingInfo;e.attentionEncodeSurroundingInfo=void 0,l=void 0,p&&(s.length>0&&p.before&&a===s[s.length-1].slice(-1)&&(s[s.length-1]=s[s.length-1].slice(0,-1)+Tb(a.charCodeAt(0))),p.after&&(l=h)),u.move(f),s.push(f),a=f.slice(-1)}return i.pop(),s.join("")}function kZ(t,e,n){const i=e.indexStack,r=t.children||[],s=e.createTracker(n),o=[];let a=-1;for(i.push(-1);++a<r.length;){const l=r[a];i[i.length-1]=a,o.push(s.move(e.handle(l,t,e,{before:`
|
|
10
|
+
`,after:`
|
|
11
|
+
`,...s.current()}))),l.type!=="list"&&(e.bulletLastUsed=void 0),a<r.length-1&&o.push(s.move(EZ(l,r[a+1],t,e)))}return i.pop(),o.join("")}function EZ(t,e,n,i){let r=i.join.length;for(;r--;){const s=i.join[r](t,e,n,i);if(s===!0||s===1)break;if(typeof s=="number")return`
|
|
12
|
+
`.repeat(1+s);if(s===!1)return`
|
|
13
|
+
|
|
14
|
+
<!---->
|
|
15
|
+
|
|
16
|
+
`}return`
|
|
17
|
+
|
|
18
|
+
`}const TZ=/\r?\n|\r/g;function PZ(t,e){const n=[];let i=0,r=0,s;for(;s=TZ.exec(t);)o(t.slice(i,s.index)),n.push(s[0]),i=s.index+s[0].length,r++;return o(t.slice(i)),n.join("");function o(a){n.push(e(a,r,!a))}}function AZ(t,e,n){const i=(n.before||"")+(e||"")+(n.after||""),r=[],s=[],o={};let a=-1;for(;++a<t.unsafe.length;){const c=t.unsafe[a];if(!Xj(t.stack,c))continue;const h=t.compilePattern(c);let f;for(;f=h.exec(i);){const p="before"in c||!!c.atBreak,m="after"in c,g=f.index+(p?f[1].length:0);r.includes(g)?(o[g].before&&!p&&(o[g].before=!1),o[g].after&&!m&&(o[g].after=!1)):(r.push(g),o[g]={before:p,after:m})}}r.sort($Z);let l=n.before?n.before.length:0;const u=i.length-(n.after?n.after.length:0);for(a=-1;++a<r.length;){const c=r[a];c<l||c>=u||c+1<u&&r[a+1]===c+1&&o[c].after&&!o[c+1].before&&!o[c+1].after||r[a-1]===c-1&&o[c].before&&!o[c-1].before&&!o[c-1].after||(l!==c&&s.push($E(i.slice(l,c),"\\")),l=c,/[!-/:-@[-`{-~]/.test(i.charAt(c))&&(!n.encode||!n.encode.includes(i.charAt(c)))?s.push("\\"):(s.push(Tb(i.charCodeAt(c))),l++))}return s.push($E(i.slice(l,u),n.after)),s.join("")}function $Z(t,e){return t-e}function $E(t,e){const n=/\\(?=[!-/:-@[-`{-~])/g,i=[],r=[],s=t+e;let o=-1,a=0,l;for(;l=n.exec(s);)i.push(l.index);for(;++o<i.length;)a!==i[o]&&r.push(t.slice(a,i[o])),r.push("\\"),a=i[o];return r.push(t.slice(a)),r.join("")}function IZ(t){const e=t||{},n=e.now||{};let i=e.lineShift||0,r=n.line||1,s=n.column||1;return{move:l,current:o,shift:a};function o(){return{now:{line:r,column:s},lineShift:i}}function a(u){i+=u}function l(u){const c=u||"",h=c.split(/\r?\n|\r/g),f=h[h.length-1];return r+=h.length-1,s=h.length===1?s+f.length:1+f.length+i,c}}function i6(t,e){const n=e||{},i={associationId:_Z,containerPhrasing:LZ,containerFlow:DZ,createTracker:IZ,compilePattern:CZ,enter:s,handlers:{...Hj},handle:void 0,indentLines:PZ,indexStack:[],join:[...vZ],options:{},safe:QZ,stack:[],unsafe:[...SZ]};n6(i,n),i.options.tightDefinitions&&i.join.push(NZ),i.handle=Wj("type",{invalid:RZ,unknown:MZ,handlers:i.handlers});let r=i.handle(t,void 0,i,{before:`
|
|
19
|
+
`,after:`
|
|
20
|
+
`,now:{line:1,column:1},lineShift:0});return r&&r.charCodeAt(r.length-1)!==10&&r.charCodeAt(r.length-1)!==13&&(r+=`
|
|
21
|
+
`),r;function s(o){return i.stack.push(o),a;function a(){i.stack.pop()}}}function RZ(t){throw new Error("Cannot handle value `"+t+"`, expected node")}function MZ(t){const e=t;throw new Error("Cannot handle unknown node `"+e.type+"`")}function NZ(t,e){if(t.type==="definition"&&t.type===e.type)return 0}function LZ(t,e){return wZ(t,this,e)}function DZ(t,e){return kZ(t,this,e)}function QZ(t,e){return AZ(this,t,e)}var VZ=Object.defineProperty,BZ=(t,e,n)=>e in t?VZ(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Io=(t,e,n)=>BZ(t,typeof e!="symbol"?e+"":e,n);let FZ=class r6{constructor(e=new Map){this.map=e}clone(){return new r6(new Map(this.map))}increment(e){const n=this.map.get(e)??0;this.map.set(e,n+1)}decrement(e,n){let i=this.map.get(e);i!==void 0&&(i-=1,this.map.set(e,i),i===0&&n())}},Bm=class{constructor(){Io(this,"map",new Map)}getOrCreate(e){let n=this.map.get(e);return n===void 0&&(n=new Set,this.map.set(e,n)),n}get(e){return this.map.get(e)}use(e,n){const i=this.get(e);i!==void 0&&n(i)}delete(e){return this.map.delete(e)}};function Gl(t,e){return e(t),t}function pC(){}const mC="cell";function Pb(t,e){return t===e}const Ip=new Map;let Jf,gC=class{constructor(e={}){Io(this,"subscriptions",new Bm),Io(this,"singletonSubscriptions",new Map),Io(this,"graph",new Bm),Io(this,"state",new Map),Io(this,"distinctNodes",new Map),Io(this,"executionMaps",new Map),Io(this,"definitionRegistry",new Set),Io(this,"combinedCells",[]);for(const n of Object.getOwnPropertySymbols(e))this.state.set(n,e[n])}cellInstance(e,n=!0,i=Symbol()){return this.state.has(i)||this.state.set(i,e),n!==!1&&!this.distinctNodes.has(i)&&this.distinctNodes.set(i,n===!0?Pb:n),i}signalInstance(e=!0,n=Symbol()){return e!==!1&&this.distinctNodes.set(n,e===!0?Pb:e),n}sub(e,n){this.register(e);const i=this.subscriptions.getOrCreate(e);return i.add(n),()=>i.delete(n)}singletonSub(e,n){return this.register(e),n===void 0?this.singletonSubscriptions.delete(e):this.singletonSubscriptions.set(e,n),()=>this.singletonSubscriptions.delete(e)}resetSingletonSubs(){this.singletonSubscriptions.clear()}subMultiple(e,n){const i=this.signalInstance();return this.connect({map:r=>(...s)=>{r(s)},sink:i,sources:e}),this.sub(i,n)}pubIn(e){var n;const i=Reflect.ownKeys(e),r=this.getExecutionMap(i),s=r.refCount.clone(),o=r.participatingNodes.slice(),a=new Map(this.state),l=u=>{this.graph.use(u,c=>{for(const{sources:h,sink:f}of c)h.has(u)&&s.decrement(f,()=>{o.splice(o.indexOf(f),1),l(f)})})};for(;;){const u=o.shift();if(u===void 0)break;const c=u;let h=!1;const f=p=>{const m=this.distinctNodes.get(c);if(m!=null&&m(a.get(c),p)){h=!1;return}h=!0,a.set(c,p),this.state.has(c)&&this.state.set(c,p)};if(Object.prototype.hasOwnProperty.call(e,c)?f(e[c]):r.projections.use(c,p=>{for(const m of p){const g=[...Array.from(m.sources),...Array.from(m.pulls)].map(x=>a.get(x));m.map(f)(...g)}}),h){const p=a.get(c);this.inContext(()=>{this.subscriptions.use(c,m=>{for(const g of m)g(p)})}),(n=this.singletonSubscriptions.get(c))==null||n(p)}else l(c)}}connect({sources:e,pulls:n=[],map:i,sink:r}){const s={map:i,pulls:new Set(n),sink:this.register(r),sources:new Set(e)};for(const o of[...e,...n])this.register(o),this.graph.getOrCreate(o).add(s);this.executionMaps.clear()}pub(e,n){this.pubIn({[e]:n})}pipe(e,...n){return this.combineOperators(...n)(e)}transformer(...e){return n=>Gl(this.signalInstance(),i=>(this.link(this.pipe(i,...e),n),i))}link(e,n){this.connect({map:i=>r=>{i(r)},sink:n,sources:[e]})}combine(...e){return Gl(this.signalInstance(),n=>{this.connect({map:i=>(...r)=>{i(r)},sink:n,sources:e})})}combineCells(...e){const n=this.combinedCells.find(r=>e.length===r.sources.length&&e.every((s,o)=>s===r.sources[o]));if(n)return n.cell;const i=this.cellInstance(e.map(r=>this.getValue(r)),!0);return this.connect({map:r=>(...s)=>{r(s)},sink:i,sources:e}),this.combinedCells.push({sources:e,cell:i}),i}getValue(e){return this.register(e),this.state.get(e)}getValues(e){return e.map(n=>this.getValue(n))}register(e){const n=Ip.get(e);return n===void 0||this.definitionRegistry.has(e)?e:(this.definitionRegistry.add(e),Gl(n.type===mC?this.cellInstance(n.initial,n.distinct,e):this.signalInstance(n.distinct,e),i=>{this.inContext(()=>{n.init(this,i)})}))}inContext(e){const n=Jf;Jf=this;const i=e();return Jf=n,i}changeWith(e,n,i){this.connect({sources:[n],pulls:[e],sink:e,map:r=>(s,o)=>{r(i(o,s))}})}calculateExecutionMap(e){const n=[],i=new Set,r=new Bm,s=new FZ,o=new Bm,a=(l,u=0)=>{s.increment(l),!i.has(l)&&(this.register(l),r.use(l,c=>{u=Math.max(...Array.from(c).map(h=>n.indexOf(h)))+1}),this.graph.use(l,c=>{for(const h of c)h.sources.has(l)?(o.getOrCreate(h.sink).add(h),a(h.sink,u)):r.getOrCreate(h.sink).add(l)}),i.add(l),n.splice(u,0,l))};return e.forEach(a),{participatingNodes:n,pendingPulls:r,projections:o,refCount:s}}getExecutionMap(e){let n=e;if(e.length===1){n=e[0];const r=this.executionMaps.get(n);if(r!==void 0)return r}else for(const[r,s]of this.executionMaps.entries())if(Array.isArray(r)&&r.length===e.length&&r.every(o=>e.includes(o)))return s;const i=this.calculateExecutionMap(e);return this.executionMaps.set(n,i),i}combineOperators(...e){return n=>{for(const i of e)n=i(n,this);return n}}};function Ee(t,e=pC,n=!0){return Gl(Symbol(),i=>{Ip.set(i,{type:mC,distinct:n,initial:t,init:e})})}function jZ(t,e,n=!0){return Gl(Symbol(),i=>{Ip.set(i,{type:mC,distinct:n,initial:t,init:(r,s)=>{r.link(e(r,s),s)}})})}function kn(t=pC,e=!1){return Gl(Symbol(),n=>{Ip.set(n,{type:"signal",distinct:e,init:t})})}function Ds(t=pC){return Gl(Symbol(),e=>{Ip.set(e,{type:"signal",distinct:!1,init:t})})}function gl(){if(!Jf)throw new Error("This function must be called within a realm instance");return Jf}const ZZ=(t,e)=>{gl().link(t,e)},zZ=(...t)=>{gl().pub(...t)},XZ=(...t)=>gl().sub(...t),WZ=(...t)=>{gl().pubIn(...t)},HZ=(...t)=>gl().pipe(...t),UZ=(...t)=>{gl().changeWith(...t)},qZ=(...t)=>gl().combine(...t),YZ=t=>gl().getValue(t),s1=R.createContext(null);function GZ({children:t,initWith:e,updateWith:n={}}){const i=R.useMemo(()=>new gC(e),[]);return R.useEffect(()=>{i.pubIn(n)},[n,i]),Y.jsx(s1.Provider,{value:i,children:t})}function Ol(){const t=R.useContext(s1);if(t===null)throw new Error("useRealm must be used within a RealmContextProvider");return t}function Bt(t){const e=Ol();e.register(t);const n=R.useCallback(i=>e.sub(t,i),[e,t]);return R.useSyncExternalStore(n,()=>e.getValue(t),()=>e.getValue(t))}function Ft(...t){const e=Ol(),n=R.useMemo(()=>e.combineCells.apply(e,t),[e,...t]);return Bt(n)}function Tt(t){const e=Ol();return e.register(t),R.useCallback(n=>{e.pub(t,n)},[e,t])}function s6(t){return[Bt(t),Tt(t)]}function As(t){return(e,n)=>{const i=n.signalInstance();return n.connect({map:r=>s=>{r(t(s))},sink:i,sources:[e]}),i}}function On(...t){return(e,n)=>{const i=n.signalInstance();return n.connect({map:r=>(...s)=>{r(s)},pulls:t,sink:i,sources:[e]}),i}}function OC(t){return(e,n)=>{const i=n.signalInstance();return n.connect({map:r=>()=>{r(t)},sink:i,sources:[e]}),i}}function Th(t){return(e,n)=>{const i=n.signalInstance();return n.connect({map:r=>s=>{t(s)&&r(s)},sink:i,sources:[e]}),i}}function KZ(){return(t,e)=>{const n=e.signalInstance();let i=!1;return e.connect({map:r=>s=>{i||(i=!0,r(s))},sink:n,sources:[t]}),n}}function xC(t,e){return(n,i)=>{const r=i.signalInstance();return i.connect({map:s=>o=>{s(e=t(e,o))},sink:r,sources:[n]}),r}}function JZ(t){return(e,n)=>{const i=n.signalInstance();let r,s=null;return n.sub(e,o=>{r=o,s===null&&(s=setTimeout(()=>{s=null,n.pub(i,r)},t))}),i}}function yC(t){return(e,n)=>{const i=n.signalInstance();let r,s=null;return n.sub(e,o=>{r=o,s!==null&&clearTimeout(s),s=setTimeout(()=>{n.pub(i,r)},t)}),i}}function ez(){return(t,e)=>{const n=e.signalInstance();return e.sub(t,i=>{queueMicrotask(()=>{e.pub(n,i)})}),n}}function tz(t){return(e,n)=>{const i=n.signalInstance(),r=Symbol();let s=r;return n.connect({map:o=>a=>{s!==r&&(o([s,a]),s=r)},sink:i,sources:[t]}),n.sub(e,o=>{s=o}),i}}function nz(t,e,n){return(i,r)=>{const s=r.signalInstance();return r.sub(i,o=>{o!==null&&typeof o=="object"&&"then"in o?(r.pub(s,t()),o.then(a=>{r.pub(s,e(a))}).catch(a=>{r.pub(s,n(a))})):r.pub(s,e(o))}),s}}const v0=new WeakMap;function IE(t,e){let n=v0.get(t);return n||(n=new Set,v0.set(t,n)),n.add(e),()=>{n.delete(e)}}function RE(t){const e=v0.get(t);if(v0.delete(t),!e)return;let n=!1,i;for(const r of[...e].reverse())try{r()}catch(s){n||(n=!0,i=s)}if(n)throw i instanceof Error?i:new Error("Realm cleanup failed with a non-Error value")}function Vn(t){return function(e){return{init:n=>{var i;return(i=t.init)==null?void 0:i.call(t,n,e)},postInit:n=>{var i;return(i=t.postInit)==null?void 0:i.call(t,n,e)},update:n=>{var i;return(i=t.update)==null?void 0:i.call(t,n,e)}}}}function o6({children:t,plugins:e}){const[n,i]=C.useState(null);return C.useEffect(()=>{var r,s;const o=new gC;try{for(const a of e)(r=a.init)==null||r.call(a,o);for(const a of e)(s=a.postInit)==null||s.call(a,o)}catch(a){try{RE(o)}catch(l){throw new AggregateError([a,l],"Realm plugin initialization and cleanup both failed")}throw a}return i(o),()=>{RE(o)}},[]),C.useEffect(()=>{var r;if(n)for(const s of e)(r=s.update)==null||r.call(s,n)}),n?C.createElement(s1.Provider,{value:n},t):null}function de(t,...e){const n=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",t);for(const r of e)i.append("v",r);throw n.search=i.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function a6(t,...e){const n=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",t);for(const r of e)i.append("v",r);n.search=i.toString(),console.warn(`Minified Lexical warning #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Ri=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,iz=Ri&&"documentMode"in document?document.documentMode:null,jr=Ri&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),ho=Ri&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),lu=!(!Ri||!("InputEvent"in window)||iz)&&"getTargetRanges"in new window.InputEvent("input"),Ko=Ri&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,vC=Ri&&/Android/.test(navigator.userAgent),Ph=Ri&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent)&&!vC,bC=Ri&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Sd=Ri&&vC&&bC,Ah=Ri&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&jr&&!bC,rz=0,sz=1,oz=2,Ab=1,$b=2,Ib=4,Rb=8,l6=16,zg=32,Xg=64,o1=128,az=2047,lz=1,uz=2,cz=3,hz=4,fz=5,dz=6,_d=Ph||Ko||Ah?" ":"",Wl=`
|
|
22
|
+
|
|
23
|
+
`,SC=ho?" ":_d,u6="֑-߿יִ-﷽ﹰ-ﻼ",c6="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",pz=new RegExp("^[^"+c6+"]*["+u6+"]"),mz=new RegExp("^[^"+u6+"]*["+c6+"]"),ei={bold:1,capitalize:1024,code:16,highlight:o1,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},gz={directionless:1,unmergeable:2},b0={center:2,end:6,justify:4,left:1,right:3,start:5},Oz={[uz]:"center",[dz]:"end",[hz]:"justify",[lz]:"left",[cz]:"right",[fz]:"start"},xz={normal:0,segmented:2,token:1},yz={[rz]:"normal",[oz]:"segmented",[sz]:"token"},vz="$",ME="$config";function NE(){return hn()._blockCursorElement}function bz(t){return t!==null&&t.nodeType===1&&t.hasAttribute("data-lexical-slot")}let h6=class Wg{constructor(e,n,i){se(this,"element");se(this,"before");se(this,"after");this.element=e,this.before=n||null,this.after=i||null}withBefore(e){return new Wg(this.element,e,this.after)}withAfter(e){return new Wg(this.element,this.before,e)}withElement(e){return this.element===e?this:new Wg(e,this.before,this.after)}insertChild(e){const n=this.getInsertionAnchor();return n!==null&&n.parentElement!==this.element&&de(357),this.element.insertBefore(e,n),this}removeChild(e){return e.parentElement!==this.element&&de(358),this.element.removeChild(e),this}replaceChild(e,n){return n.parentElement!==this.element&&de(359),this.element.replaceChild(e,n),this}getFirstChild(){const e=this.getFirstChildAnchor(),n=e?e.nextSibling:this.element.firstChild;return n===this.getInsertionAnchor()?null:n}getFirstChildAnchor(){return this.after}resolveLeafPosition(e,n,i){if(this.element===e)return n===e&&i===0?"before":"after";const r=LE(e,this.element);if(r===null)return"after";const s=Array.prototype.indexOf.call(e.childNodes,r);if(s<0)return"after";if(n===e)return i<=s?"before":"after";const o=LE(e,n);if(o===null)return"after";const a=Array.prototype.indexOf.call(e.childNodes,o);return a>=0&&a<=s?"before":"after"}getInsertionAnchor(){return this.before}};function LE(t,e){let n=e;for(;n!==null&&n.parentNode!==t;)n=n.parentNode;return n}let f6=class Hg extends h6{withBefore(e){return new Hg(this.element,e,this.after)}withAfter(e){return new Hg(this.element,this.before,e)}withElement(e){return this.element===e?this:new Hg(e,this.before,this.after)}getInsertionAnchor(){return super.getInsertionAnchor()||this.getManagedLineBreak()}getFirstChildAnchor(){let e=super.getFirstChildAnchor(),n=e?e.nextSibling:this.element.firstChild;for(;bz(n);)e=n,n=n.nextSibling;const i=e?e.nextSibling:this.element.firstChild;return i!==null&&i===NE()?i:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){if(this.element.__lexicalLastChildKind=e,e===null)this.removeManagedLineBreak();else{const n=e==="decorator"&&(Ah||Ko||Ph);this.insertManagedLineBreak(n)}}removeManagedLineBreak(){const e=this.getManagedLineBreak();if(e){const n=this.element,i=e.nodeName==="IMG"?e.nextSibling:null;i&&n.removeChild(i),n.removeChild(e),n.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){const n=this.getManagedLineBreak();if(n){if(e===(n.nodeName==="IMG"))return;this.removeManagedLineBreak()}const i=this.element,r=this.before,s=rn().createElement("br");if(s.setAttribute("data-lexical-managed-linebreak","true"),i.insertBefore(s,r),e){const o=rn().createElement("img");o.setAttribute("data-lexical-managed-linebreak","true"),o.style.setProperty("display","inline","important"),o.style.setProperty("border","0px","important"),o.style.setProperty("margin","0px","important"),o.alt="",i.insertBefore(o,s),i.__lexicalLineBreak=o}else i.__lexicalLineBreak=s}getFirstChildOffset(){const e=this.getFirstChild(),n=this.getInsertionAnchor();let i=0;for(let r=this.element.firstChild;r!==null&&r!==e&&r!==n;r=r.nextSibling)i++;return i}resolveChildIndex(e,n,i,r){if(i===this.element){const l=this.getFirstChildOffset(),u=NE(),c=this.element.childNodes,h=Math.min(r,c.length);let f=0;for(let p=l;p<h;p++)c[p]!==u&&f++;return[e,Math.min(f,e.getChildrenSize())]}const s=DE(n,i);s.push(r);const o=DE(n,this.element);let a=e.getIndexWithinParent();for(let l=0;l<o.length;l++){const u=s[l],c=o[l];if(u===void 0||u<c)break;if(u>c){a+=1;break}}return[e.getParentOrThrow(),a]}};function DE(t,e){const n=[];let i=e;for(;i!==t&&i!==null;i=i.parentNode){let r=0;for(let s=i.previousSibling;s!==null;s=s.previousSibling)r++;n.push(r)}return i!==t&&de(225),n.reverse()}let d6;try{d6="0.48.0+prod.esm"}catch{}const p6=d6??'"<unknown>+source"';let _f=class{constructor(){se(this,"_front",new Set);se(this,"_back",new Set);se(this,"_cache")}get size(){return this._front.size+this._back.size}addBack(e){return delete this._cache,this._front.has(e)||this._back.add(e),this}addFront(e){return delete this._cache,this._back.has(e)||this._front.add(e),this}delete(e){return delete this._cache,this._front.delete(e)||this._back.delete(e)}toArray(){const e=Array.from(this._front).reverse();for(const n of this._back)e.push(n);return e}toReadonlyArray(){return this._cache=this._cache||this.toArray(),this._cache}[Symbol.iterator](){return this.toReadonlyArray()[Symbol.iterator]()}};const Rl=null;function m6(t,e=1e3){return t instanceof Mb?t.clone():t.size<e?new Map(t):new Mb().init(new Map(t),void 0,t.size)}let Mb=class g6{constructor(){se(this,"_mutable",!1);se(this,"_old");se(this,"_nursery");se(this,"_size",0)}clone(){return this._mutable=!1,new g6().init(this._old,this._nursery,this._size)}init(e,n,i){return this._old=e,this._nursery=n,this._size=i,this}get size(){return this._size}has(e){return this.get(e)!==void 0}getWithTombstone(e){const n=this._nursery&&this._nursery.get(e);return n!==void 0?n:this._old&&this._old.get(e)}get(e){const n=this.getWithTombstone(e);return n===Rl?void 0:n}shouldCompact(){return this._nursery!==void 0&&2*this._nursery.size>this._size}getNursery(){return this._mutable&&this._nursery||(this.compact(),this._nursery=new Map(this._nursery),this._mutable=!0),this._nursery}compact(e=!1){if(this._nursery&&this._nursery.size>0&&(e||this.shouldCompact())){const n=new Map(this._old);for(const[i,r]of this._nursery)r!==Rl?n.set(i,r):n.delete(i);this._old=n,this._nursery=void 0}return this._mutable=!1,this}set(e,n){const i=this.getWithTombstone(e);if(i===n)return this;const r=this.getNursery();return i!==Rl&&i!==void 0||(this._size++,i===Rl&&r.delete(e)),r.set(e,n),this}delete(e){const n=this.has(e);return n&&(this.getNursery().set(e,Rl),this._size--),n}getOrInsert(e,n){const i=this.get(e);return i!==void 0?i:(this.set(e,n),n)}getOrInsertComputed(e,n){const i=this.get(e);if(i!==void 0)return i;const r=n(e);return this.set(e,r),r}clear(){this._mutable=!1,this._old=void 0,this._nursery=void 0,this._size=0}*keys(){for(const e of this.entries())yield e[0]}*values(){for(const e of this.entries())yield e[1]}*entries(){const e=this._nursery,n=this._old;if(n)for(const i of n){const r=i[0],s=e?e.get(r):void 0;s!==Rl&&(s!==void 0&&(i[1]=s),yield i)}if(e)for(const i of e)i[1]===Rl||n&&n.has(i[0])||(yield i)}forEach(e,n){n!==void 0&&(e=e.bind(n));for(const[i,r]of this.entries())e(r,i,this)}get[Symbol.toStringTag](){return"GenMap"}[Symbol.iterator](){return this.entries()}};function S0(t,e,n,i,r,s){if(W(t)){let o=t.getFirstChild();for(;o!==null;){const a=o.__key;o.__parent===e&&((W(o)||lo(o)&&o.__slots!==null)&&S0(o,a,n,i,r,s),n.has(a)||s.delete(a),r.push(a)),o=o.getNextSibling()}}for(const o of lo(t)&&t.__slots!==null?t.__slots.values():[]){const a=i.get(o);a!==void 0&&nl(a)&&a.__slotHost===e&&((W(a)||lo(a)&&a.__slots!==null)&&S0(a,o,n,i,r,s),n.has(o)||s.delete(o),r.push(o))}}let Nb=!1,_C=0;function Sz(t){_C=t.timeStamp}function ey(t,e,n){const i=t.nodeName==="BR",r=e.__lexicalLineBreak;return r&&(t===r||i&&t.previousSibling===r)||i&&Fh(t,n)!==void 0}function _z(t,e,n){const i=Mi(pr(n)),r=i&&$r(i,n._rootElement);let s=null,o=null;r!==null&&r.anchorNode===t&&(s=r.anchorOffset,o=r.focusOffset);const a=t.nodeValue;a!==null&&ew(e,a,s,o,!1)}function Cz(t,e,n){if(ae(t)){const i=t.anchor.getNode();if(i.is(n)&&t.format!==i.getFormat())return!1}return Hi(e)&&n.isAttached()}function wz(t,e,n){for(let i=t;i&&!aw(i);i=pa(i)){const r=Fh(i,e);if(r!==void 0){const s=st(r,n);if(s)return ht(s)||!Je(i)?void 0:[i,s]}}}function O6(t,e,n){Nb=!0;const i=performance.now()-_C>100;try{ts(t,()=>{const r=me()||(function(h){return h.read("latest",()=>{const f=me();return f!==null?f.clone():null})})(t),s=new Map,o=t._editorState,a=t._blockCursorElement;let l=!1,u="";for(let h=0;h<e.length;h++){const f=e[h],p=f.type,m=f.target,g=wz(m,t,o);if(!g)continue;const[x,y]=g;if(p==="characterData")i&&le(y)&&Hi(m)&&Cz(r,m,y)&&_z(m,y,t);else if(p==="childList"){l=!0;const S=f.addedNodes;for(let w=0;w<S.length;w++){const b=S[w],E=GC(b),P=b.parentNode;if(!(P==null||b===a||E!==null||ey(b,P,t)||t._slotsUsed&&Je(b)&&b.hasAttribute("data-lexical-slot")||aw(b))){if(ho){const $=(Je(b)?b.innerText:null)||b.nodeValue;$&&(u+=$)}P.removeChild(b)}}const _=f.removedNodes,k=_.length;if(k>0){let w=0;for(let b=0;b<k;b++){const E=_[b];(ey(E,m,t)||a===E)&&(m.appendChild(E),w++)}k!==w&&s.set(x,y)}}}if(s.size>0)for(const[h,f]of s)f.reconcileObservedMutation(h,t);const c=n.takeRecords();if(c.length>0){for(let h=0;h<c.length;h++){const f=c[h],p=f.addedNodes,m=f.target;for(let g=0;g<p.length;g++){const x=p[g],y=x.parentNode;y==null||x.nodeName!=="BR"||ey(x,m,t)||y.removeChild(x)}}n.takeRecords()}r!==null&&(l&&yn(r),ho&&A4(t)&&r.insertRawText(u))})}finally{Nb=!1}}function x6(t){const e=t._observer;e!==null&&O6(t,e.takeRecords(),e)}function y6(t){(function(e){_C===0&&pr(e).addEventListener("textInput",Sz,!0)})(t),t._observer=new MutationObserver((e,n)=>{O6(t,e,n)})}const Lb="direct",Db="latest";let kz=class{constructor(e,n){se(this,"key");se(this,"parse");se(this,"unparse");se(this,"isEqual");se(this,"defaultValue");se(this,"resetOnCopyNode");this.key=e,this.parse=n.parse.bind(n),this.unparse=(n.unparse||Pz).bind(n),this.isEqual=(n.isEqual||Object.is).bind(n),this.defaultValue=this.parse(void 0),this.resetOnCopyNode=n.resetOnCopyNode||!1}};function $h(t,e){return new kz(t,e)}function uu(t,e,n=Db){const i=(n===Db?t.getLatest():t).__state;return i?i.getValue(e):e.defaultValue}function Ez(t,e,n){const i=uu(t,n,Lb),r=uu(e,n,Lb);return n.isEqual(i,r)?null:[i,r]}function Kl(t,e,n){let i;if(ri(),typeof n=="function"){const s=t.getLatest(),o=uu(s,e);if(i=n(o),e.isEqual(o,i))return s}else i=n;const r=t.getWritable();return CC(r).updateFromKnown(e,i),r}function v6(t){const e=new Map,n=new Set;for(const{ownNodeConfig:i}of zp(typeof t=="function"?t:t.replace))if(i&&i.stateConfigs)for(const r of i.stateConfigs){let s;"stateConfig"in r?(s=r.stateConfig,r.flat&&n.add(s.key)):s=r,e.set(s.key,s)}return{flatKeys:n,sharedConfigMap:e}}const QE=new Set(["__proto__","constructor","prototype"]);let Tz=class b6{constructor(e,n,i=void 0,r=new Map,s=void 0){se(this,"node");se(this,"knownState");se(this,"unknownState");se(this,"sharedNodeState");se(this,"size");this.node=e,this.sharedNodeState=n,this.unknownState=i,this.knownState=r;const{sharedConfigMap:o}=this.sharedNodeState,a=s!==void 0?s:(function(l,u,c){let h=c.size;if(u)for(const f in u){const p=l.get(f);p&&c.has(p)||h++}return h})(o,i,r);this.size=a}getValue(e){const n=this.knownState.get(e);if(n!==void 0)return n;this.sharedNodeState.sharedConfigMap.set(e.key,e);let i=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){const r=this.unknownState[e.key];r!==void 0&&(i=e.parse(r)),this.updateFromKnown(e,i)}return i}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const e={...this.unknownState},n={};for(const[i,r]of this.knownState)i.isEqual(r,i.defaultValue)?delete e[i.key]:e[i.key]=i.unparse(r);for(const i of this.sharedNodeState.flatKeys)i in e&&(n[i]=e[i],delete e[i]);return VE(e)&&(n.$=e),n}getWritable(e){if(this.node===e)return this;const{sharedNodeState:n,unknownState:i}=this,r=new Map(this.knownState);return new b6(e,n,(function(s,o,a){let l;if(a)for(const[u,c]of Object.entries(a)){if(QE.has(u))continue;const h=s.get(u);h?o.has(h)||o.set(h,h.parse(c)):(l=l||{},l[u]=c)}return l})(n.sharedConfigMap,r,i),r,this.size)}resetOnCopyNode(){for(const e of this.knownState.keys())e.resetOnCopyNode&&this.knownState.set(e,e.defaultValue);return this}updateFromKnown(e,n){const i=e.key;this.sharedNodeState.sharedConfigMap.set(i,e);const{knownState:r,unknownState:s}=this;r.has(e)||s&&i in s||(s&&(delete s[i],this.unknownState=VE(s)),this.size++),r.set(e,n)}updateFromUnknown(e,n){if(QE.has(e))return;const i=this.sharedNodeState.sharedConfigMap.get(e);i?this.updateFromKnown(i,i.parse(n)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=n)}updateFromJSON(e){const{knownState:n}=this;for(const i of n.keys())n.set(i,i.defaultValue);if(this.size=n.size,this.unknownState=void 0,e)for(const[i,r]of Object.entries(e))this.updateFromUnknown(i,r)}};function CC(t){const e=t.getWritable(),n=e.__state?e.__state.getWritable(e):new Tz(e,S6(e));return e.__state=n,n}function S6(t){return t.__state?t.__state.sharedNodeState:qC(hn(),t.getType()).sharedNodeState}function VE(t){if(t)for(const e in t)return t}function Pz(t){return t}function BE(t,e,n){for(const[i,r]of e.knownState){if(t.has(i.key))continue;t.add(i.key);const s=n?n.getValue(i):i.defaultValue;if(s!==r&&!i.isEqual(s,r))return!0}return!1}function FE(t,e,n){const{unknownState:i}=e,r=n?n.unknownState:void 0;if(i){for(const[s,o]of Object.entries(i))if(!t.has(s)&&(t.add(s),o!==(r?r[s]:void 0)))return!0}return!1}function jE(t,e){const n=t.__state;return n&&n.node===t?n.getWritable(e):n}function ZE(t,e){const n=t.__mode,i=t.__format,r=t.__style,s=e.__mode,o=e.__format,a=e.__style,l=t.__state,u=e.__state;return(n===null||n===s)&&(i===null||i===o)&&(r===null||r===a)&&(t.__state===null||l===u||(function(c,h){if(c===h)return!0;const f=new Set;return!(c&&BE(f,c,h)||h&&BE(f,h,c)||c&&FE(f,c,h)||h&&FE(f,h,c))})(l,u))}function zE(t,e){const n=t.mergeWithSibling(e),i=Dt()._normalizedNodes;return i.add(t.__key),i.add(e.__key),n}function XE(t){let e,n,i=t;if(i.__text!==""||!i.isSimpleText()||i.isUnmergeable()){for(;(e=i.getPreviousSibling())!==null&&le(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(e.__text!==""){if(ZE(e,i)){i=zE(e,i);break}break}e.remove()}for(;(n=i.getNextSibling())!==null&&le(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==""){if(ZE(i,n)){i=zE(i,n);break}break}n.remove()}}else i.remove()}function Cs(t){return WE(t.anchor),WE(t.focus),t}function WE(t){for(;t.type==="element";){const e=t.getNode(),n=t.offset;let i,r;if(n===e.getChildrenSize()?(i=e.getChildAtIndex(n-1),r=!0):(i=e.getChildAtIndex(n),r=!1),le(i)){t.set(i.__key,r?i.getTextContentSize():0,"text",!0);break}if(!W(i))break;t.set(i.__key,r?i.getChildrenSize():0,"element",!0)}}const Cd=Symbol.for("@lexical/CachedTextSize");function HE(t,e){return Vb.read(()=>{let n=0,i=t;for(let r=0;r<e&&i!==null;r++){const s=ws.get(i);if(s===void 0&&de(345,i),W(s)){const o=Sn.get(i);if(o!==void 0&&W(o)&&o.__parent!==s.__parent)n+=s.getTextContentSize();else{const a=cu.get(i),l=a&&a.__lexicalTextContent;typeof l!="string"&&de(346,s.getType()),n+=l.length}r<e-1&&!s.isInline()&&(n+=2)}else{const o=s[Cd];o===void 0&&de(347,s.getType(),i),n+=o}i=s.__next}return n},{editor:At})}function _6(t){W(t)||t[Cd]===void 0&&(t[Cd]=le(t)?t.__text.length:t.getTextContentSize())}const Az=4;let wd,At,kd,gt="",Rn=null,Ei=null,di=null;function to(){return{firstTextKey:di,format:Rn,style:Ei}}function Zr(t){t.firstTextKey!==null&&(Rn=t.format,Ei=t.style,di=t.firstTextKey)}function Qb(t){if(di!==null)return;const e=t.__lexicalFirstTextKey;if(e===void 0&&de(348),e===null)return;const n=Sn.get(e);le(n)&&(Rn=n.getFormat(),Ei=n.getStyle(),di=e)}let a1,ed,td,ws,Vb,Sn,cu,Bb,Ed,hu,Do=!1,_0=!1;function ja(t,e){const n=ws.get(t),i=Sn.has(t);if(e!==null){const r=Xb(t);r.parentNode===e&&e.removeChild(r)}if(!i){if(At._keyToDOMMap.delete(t),W(n)){const r=Ld(n,ws);Fb(r,0,r.length-1,null)}if(n!==void 0){for(const r of Cr(n).values()){const s=Zb(r);ja(r,null),s!==null&&s.remove()}tw(Ed,kd,a1,n,"destroyed")}}}function Fb(t,e,n,i){for(let r=e;r<=n;++r){const s=t[r];s!==void 0&&ja(s,i)}}function Ml(t,e){t.setProperty("text-align",e)}const $z="40px";function C6(t,e){const n=wd.theme.indent;if(typeof n=="string"){const i=t.classList.contains(n);e>0&&!i?t.classList.add(n):e<1&&i&&t.classList.remove(n)}t.style.setProperty("padding-inline-start",e===0?"":`calc(${e} * var(--lexical-indent-base-value, ${$z}))`)}function w6(t,e){const n=t.style;e===0?Ml(n,""):e===1?Ml(n,"left"):e===2?Ml(n,"center"):e===3?Ml(n,"right"):e===4?Ml(n,"justify"):e===5?Ml(n,"start"):e===6&&Ml(n,"end")}function jb(t,e){const n=(function(i){const r=i.__dir;if(r!==null)return r;if(xn(i))return null;const s=i.getParent();return s===null||It(s)&&s.__dir===null?"auto":null})(e);n!==null?t.dir=n:t.removeAttribute("dir")}function k6(t){const e=rn().createElement("div");return e.setAttribute("data-lexical-slot",t),e.style.display="none",e}function E6(t,e,n){e||t.contentEditable==="false"?j4(n,At):n.removeAttribute("contenteditable")}function UE(t,e,n){const i=gt,r=to();gt="";let s="";const o=ht(t);for(const[a,l]of n){const u=k6(a);E6(e,o,u),e.appendChild(u),gt="";const c=to();Za(l,Ir(t,u,At)),Zr(c),T6(t,a,e,u),s+=gt}return Zr(r),gt=i,s}function Cr(t){return lo(t)&&t.__slots!==null?t.__slots:z4}function T6(t,e,n,i){const r=hu.$getSlotTargetElement(t,e,n,At);r!==null&&(i.parentElement!==r&&r.appendChild(i),i.style.display="")}function Zb(t){const e=cu.get(t);return e!==void 0?e.parentElement:null}function qE(t,e,n){const i=Cr(t),r=Cr(e);for(const[c,h]of i)if(!r.has(c)){const f=Zb(h);ja(h,null),f!==null&&f.remove()}const s=gt,o=to();let a="",l=null;const u=ht(e);for(const[c,h]of r){const f=i.get(c);let p=f!==void 0?Zb(f):null;gt="";const m=to();if(p===null){p=k6(c);let g=null;for(const x of n.children)if(!x.hasAttribute("data-lexical-slot")){g=x;break}n.insertBefore(p,g),Za(h,Ir(e,p,At))}else f===h?Mo(h,p):(f!==void 0&&ja(f,p),Za(h,Ir(e,p,At)));if(Zr(m),E6(n,u,p),T6(e,c,n,p),a+=gt,p.parentElement===n){const g=l===null?n.firstChild:l.nextSibling;g!==p&&n.insertBefore(p,g),l=p}}return Zr(o),gt=s,a}function Za(t,e){const n=Sn.get(t);if(n===void 0&&de(60),e!==null){const r=ws.get(t);if(r!==void 0){const s=cu.get(t);if(s!==void 0){const o=nl(r)?r.__slotHost:null,a=nl(n)?n.__slotHost:null,l=r.__parent!==n.__parent||o!==a,u=a!==null&&s.parentElement!==e.element;if(l||u)return e.insertChild(s),Mo(t,e.element)}}}const i=hu.$createDOM(n,At);if((function(r,s,o){const a=o._keyToDOMMap;S4(s,o,r),a.set(r,s)})(t,i,At),le(n)?i.setAttribute("data-lexical-text","true"):ht(n)&&(i.setAttribute("data-lexical-decorator","true"),F4(i,{captureSelection:!0})),W(n)){const r=n.__indent,s=n.__size;jb(i,n),r!==0&&C6(i,r);const o=Cr(n),a=o.size>0?UE(n,i,o):"";if(s===0)i.__lexicalTextContent=a,i.__lexicalFirstTextKey=null,gt+=a,o.size>0&&(i.__lexicalSlotTextLength=a.length);else{const u=gt,c=s-1;if(zb(Ld(n,Sn),n,0,c,Ir(n,i,At)),a!==""){const h=i.__lexicalTextContent||"";i.__lexicalTextContent=a+h,gt=u+a+h}o.size>0&&(i.__lexicalSlotTextLength=a.length)}const l=n.__format;l!==0&&w6(i,l),n.isInline()||P6(null,n,i)}else{const r=n.getTextContent();if(ht(n)){const s=n.decorate(At,wd);s!==null&&A6(t,s),i.contentEditable="false";const o=Cr(n);o.size>0&&UE(n,i,o)}gt+=r}return e!==null&&e.insertChild(i),hu.$decorateDOM(n,null,i,At),_6(n),tw(Ed,kd,a1,n,"created"),i}function zb(t,e,n,i,r){const s=gt,o=to();gt="",Rn=null,Ei=null,di=null;let a=n;for(;a<=i;++a){const u=to();Za(t[a],r);const c=Sn.get(t[a]);c!==null&&le(c)?Rn===null&&(Rn=c.getFormat(),Ei=c.getStyle(),di=c.__key):W(c)&&a<i&&!c.isInline()&&(gt+=Wl),Zr(u)}const l=At._keyToDOMMap.get(e.__key);l===void 0&&de(349,e.__key),l.__lexicalTextContent=gt,l.__lexicalFirstTextKey=di,gt=s+gt,Zr(o)}function P6(t,e,n){const i=Ir(e,n,At),r=i.element.__lexicalLastChildKind??null,s=(function(o,a){if(o){const l=o.__last;if(l){const u=a.get(l);if(u)return Gn(u)?"line-break":ht(u)&&u.isInline()?"decorator":null}return Cr(o).size>0?null:"empty"}return null})(e,Sn);r!==s&&i.setManagedLineBreak(s)}function Iz(t,e,n){var i;Rn=null,Ei=null,di=null,(function(r,s,o){const a=gt,l=r.__size,u=s.__size;gt="";const c=o.element,h=At._keyToDOMMap.get(s.__key);h===void 0&&de(351,s.__key);const f=u-l;if(!Do&&Math.abs(f)<=1&&l>=Az&&r.__first===s.__first&&(f!==0||!At._cloneNotNeeded.has(r.__key))){const p=h.__lexicalTextContent,m=Bb.get(r.__key);if(!Do&&typeof p=="string"&&m!==void 0){const g=(function(x,y){const S=y.size;if(S===0||S>=x.__size)return null;let _=x.__last,k=null,w=0;for(;_!==null&&w<S;){if(!y.has(_))return null;k=_;const b=Sn.get(_);if(b===void 0)return null;_=b.__prev,w++}return w!==S||_!==null&&y.has(_)?null:k})(s,m);if(g!==null){const x=m.size;if(f===0){const y=HE(g,x);let S=g,_=0;for(;S!==null&&_<x;){const P=Sn.get(S);if(P===void 0)break;const $=to();Mo(S,c),le(P)&&Rn===null&&(Rn=P.getFormat(),Ei=P.getStyle(),di=P.__key),Zr($),S=P.__next,_++}let k="";for(S=g,_=0;S!==null&&_<x;){const P=Sn.get(S);if(P===void 0)break;let $;if(W(P)){const B=At._keyToDOMMap.get(S),X=B&&B.__lexicalTextContent;typeof X!="string"&&de(352,P.getType()),$=X}else $=P.getTextContent();k+=$,_<x-1&&W(P)&&!P.isInline()&&(k+=Wl),S=P.__next,_++}const w=h.__lexicalSlotTextLength||0,b=w>0?p.slice(w):p,E=b.slice(0,b.length-y)+k;return h.__lexicalTextContent=E,gt=a+E,void YE(s,h,m)}if((function(y,S,_,k,w,b,E,P){if(P!==1&&P!==-1||E!==(P===1?2:1))return!1;const B=E-P;let X=y.__last;for(let je=0;je<B-1;je++){if(X===null)return!1;const we=ws.get(X);if(we===void 0)return!1;X=we.__prev}if(X===null)return!1;const j=Sn.get(b),Z=ws.get(X);if(j===void 0||Z===void 0||j.__prev!==Z.__prev)return!1;const G=[];let z=b;for(let je=0;je<E;je++){if(z===null)return!1;G.push(z);const we=Sn.get(z);z=we?we.__next:null}const J=[];z=X;for(let je=0;je<B;je++){if(z===null)return!1;J.push(z);const we=ws.get(z);z=we?we.__next:null}const ue=new Set(J),Le=new Set(G),ye=[];let xe=0,Re=0;for(;xe<B&&Re<E;)if(G[Re]===J[xe])ye.push({key:G[Re],kind:"reconcile"}),xe++,Re++;else if(Le.has(J[xe])){if(ue.has(G[Re]))return!1;ye.push({key:G[Re],kind:"create",nextIndex:Re}),Re++}else ye.push({key:J[xe],kind:"destroy"}),xe++;for(;xe<B;)ye.push({key:J[xe++],kind:"destroy"});for(;Re<E;)ye.push({key:G[Re],kind:"create",nextIndex:Re}),Re++;const Ae=HE(X,B);for(const je of ye){const we=to();if(je.kind==="reconcile")Mo(je.key,_.element);else if(je.kind==="destroy")ja(je.key,_.element);else{let pe=null;for(let ge=je.nextIndex+1;ge<E;ge++){const Ve=At._keyToDOMMap.get(G[ge]);if(Ve!==void 0){pe=Ve;break}}Za(je.key,_.withBefore(pe??_.before))}if(je.kind!=="destroy"){const pe=Sn.get(je.key);pe&&le(pe)&&Rn===null&&(Rn=pe.getFormat(),Ei=pe.getStyle(),di=pe.__key)}Zr(we)}let Be="";for(let je=0;je<E;je++){const we=Sn.get(G[je]);if(we===void 0)return!1;let pe;if(W(we)){const ge=At._keyToDOMMap.get(G[je]),Ve=ge&&ge.__lexicalTextContent;typeof Ve!="string"&&de(350,we.getType()),pe=Ve}else pe=we.getTextContent();Be+=pe,je<E-1&&W(we)&&!we.isInline()&&(Be+=Wl)}const lt=k.__lexicalSlotTextLength||0,qe=lt>0?w.slice(lt):w;return k.__lexicalTextContent=qe.slice(0,qe.length-Ae)+Be,!0})(r,0,o,h,p,g,x,f)){const y=h.__lexicalTextContent;return typeof y!="string"&&de(353),gt=a+y,void YE(s,h,m)}}}if(f===0){let g=r.__first,x=0;for(;g!==null;){const y=Sn.get(g);if(y===void 0)break;const S=Do||td.has(g)||ed.has(g),_=to();if(S)Mo(g,c);else{let k,w;if(W(y)){w=cu.get(g);const b=w&&w.__lexicalTextContent;typeof b!="string"&&de(354,y.getType()),k=b}else k=y.getTextContent();gt+=k,w!==void 0&&Qb(w)}le(y)?Rn===null&&(Rn=y.getFormat(),Ei=y.getStyle(),di=y.__key):W(y)&&x<u-1&&!y.isInline()&&(gt+=Wl),Zr(_),g=y.__next,x++}return h.__lexicalTextContent=gt,h.__lexicalFirstTextKey=di,void(gt=a+gt)}}if(l===1&&u===1){const p=r.__first,m=s.__first;if(p===m)Mo(p,c);else{const x=Xb(p),y=Za(m,null);try{x.parentNode===c?c.replaceChild(y,x):o.insertChild(y)}catch(S){if(typeof S=="object"&&S!=null){const _=`${S.toString()} Parent: ${c.tagName}, new child: {tag: ${y.tagName} key: ${m}}, old child: {tag: ${x.tagName}, key: ${p}}.`;throw new Error(_)}throw S}ja(p,null)}const g=Sn.get(m);le(g)&&Rn===null&&(Rn=g.getFormat(),Ei=g.getStyle(),di=g.__key)}else{const p=Ld(r,ws),m=Ld(s,Sn);if(p.length!==l&&de(227),m.length!==u&&de(228),l===0)u!==0&&zb(m,s,0,u-1,o);else if(u===0){if(l!==0){const g=o.after==null&&o.before==null&&Cr(s).size===0&&o.element.__lexicalLineBreak==null;Fb(p,0,l-1,g?null:c),g&&(c.textContent="")}}else(function(g,x,y,S,_,k){const w=S-1,b=_-1;let E,P,$=k.getFirstChild(),B=0,X=0;for(;B<=w&&X<=b;){const G=x[B],z=y[X],J=to();if(G===z)$=ty(Mo(z,k.element)),B++,X++;else{if(P===void 0&&(P=GE(y,X)),E===void 0)E=GE(x,B);else if(!E.has(G)){B++,Zr(J);continue}if(!P.has(G)){$=ty(Xb(G)),ja(G,k.element),B++,E.delete(G),Zr(J);continue}if(E.has(z)){const Le=nh(At,z);Le!==$&&k.withBefore($??k.before).insertChild(Le),$=ty(Mo(z,k.element)),B++,X++}else Za(z,k.withBefore($??k.before)),X++}const ue=Sn.get(z);ue!==null&&le(ue)?Rn===null&&(Rn=ue.getFormat(),Ei=ue.getStyle(),di=ue.__key):W(ue)&&X<=b&&!ue.isInline()&&(gt+=Wl),Zr(J)}const j=B>w,Z=X>b;if(j&&!Z){const G=y[b+1],z=G===void 0?null:At.getElementByKey(G);zb(y,g,X,b,k.withBefore(z??k.before))}else Z&&!j&&Fb(x,B,w,k.element)})(s,p,m,l,u,o)}h.__lexicalTextContent=gt,h.__lexicalFirstTextKey=di,gt=a+gt})(t,e,Ir(e,n,At)),It(e)||(i=e,Rn==null||Rn===i.__textFormat||_0||i.setTextFormat(Rn),(function(r){Ei==null||Ei===r.__textStyle||_0||r.setTextStyle(Ei)})(e))}function YE(t,e,n){const i=e.__lexicalFirstTextKey;if(i!=null){const r=t.__key;let s=i;for(;s!==null;){const o=Sn.get(s);if(o===void 0){s=null;break}if(o.__parent===r)break;s=o.__parent}if(s!==null&&!n.has(s)){const o=Sn.get(i);if(le(o))return Rn=o.getFormat(),void(Ei=o.getStyle())}}e.__lexicalFirstTextKey=di}function Mo(t,e){const n=ws.get(t);let i=Sn.get(t);n!==void 0&&i!==void 0||de(61);const r=Do||td.has(t)||ed.has(t),s=nh(At,t);if(n===i&&!r){let o;if(W(n)){const a=s.__lexicalTextContent;typeof a!="string"&&de(355,n.getType()),o=a,Qb(s)}else o=n.getTextContent();return gt+=o,s}if(n!==i&&r&&tw(Ed,kd,a1,i,"updated"),hu.$updateDOM(i,n,s,At)){const o=Za(t,null);return e===null&&de(62),e.replaceChild(o,s),ja(t,null),o}if(W(n)){W(i)||de(334,t);const o=i.__indent;(Do||o!==n.__indent)&&C6(s,o);const a=i.__format;(Do||a!==n.__format)&&w6(s,a);const l=r&&(Cr(i).size>0||Cr(n).size>0)?qE(n,i,s):"";if(r){const u=gt;if(Iz(n,i,s),xn(i)||i.isInline()||P6(0,i,s),l!==""){const c=s.__lexicalTextContent||"";s.__lexicalTextContent=l+c,gt=u+l+c,s.__lexicalSlotTextLength=l.length}else(Cr(i).size>0||Cr(n).size>0)&&(s.__lexicalSlotTextLength=0)}else{const u=s.__lexicalTextContent;typeof u!="string"&&de(356,n.getType()),gt+=u,Qb(s)}if((Do||i.__dir!==n.__dir||i.__parent!==n.__parent)&&(jb(s,i),xn(i)&&!Do))for(const u of i.getChildren())W(u)&&jb(nh(At,u.getKey()),u)}else{const o=i.getTextContent();if(ht(i)){const a=i.decorate(At,wd);a!==null&&A6(t,a),r&&(Cr(i).size>0||Cr(n).size>0)&&qE(n,i,s)}gt+=o}if(!_0&&xn(i)){const o=i.getLatest();if(o.__cachedText!==gt){const a=o.getWritable();a.__cachedText=gt,i=a}}return hu.$decorateDOM(i,n,s,At),_6(i),s}function A6(t,e){let n=At._pendingDecorators;const i=At._decorators;if(n===null){if(i[t]===e)return;n=_4(At)}n[t]=e}function ty(t){let e=t.nextSibling;return e!==null&&e===At._blockCursorElement&&(e=e.nextSibling),e}function GE(t,e){const n=new Set;for(let i=e;i<t.length;i++)n.add(t[i]);return n}function Rz(t,e,n,i,r,s){gt="",Rn=null,Ei=null,di=null,Do=i===2,At=n,wd=n._config,hu=n._config.dom||Rd,kd=n._nodes,a1=At._listeners.mutation,ed=r,td=s,ws=t._nodeMap,Vb=t,Sn=e._nodeMap,_0=e._readOnly,cu=m6(n._keyToDOMMap),Bb=(function(){const a=new Map,l=u=>{for(const c of u){const h=Sn.get(c);if(h===void 0)continue;const f=h.__parent;if(f===null)continue;let p=a.get(f);p===void 0&&(p=new Set,a.set(f,p)),p.add(c)}};return l(ed.keys()),l(td),a})();const o=new Map;return Ed=o,Mo("root",null),At=void 0,kd=void 0,ed=void 0,td=void 0,ws=void 0,Vb=void 0,Sn=void 0,wd=void 0,cu=void 0,Bb=void 0,Ed=void 0,hu=Rd,o}function Xb(t){const e=cu.get(t);return e===void 0&&de(75,t),e}function Ue(t){return{type:t}}const Ih=Ue("SELECTION_CHANGE_COMMAND"),$6=Ue("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),Rp=Ue("CLICK_COMMAND"),wC=Ue("BEFORE_INPUT_COMMAND"),kC=Ue("INPUT_COMMAND"),EC=Ue("COMPOSITION_START_COMMAND"),TC=Ue("COMPOSITION_END_COMMAND"),za=Ue("DELETE_CHARACTER_COMMAND"),Jl=Ue("INSERT_LINE_BREAK_COMMAND"),Yc=Ue("INSERT_PARAGRAPH_COMMAND"),eu=Ue("CONTROLLED_TEXT_INSERTION_COMMAND"),Rh=Ue("PASTE_COMMAND"),nd=Ue("REMOVE_TEXT_COMMAND"),Gc=Ue("DELETE_WORD_COMMAND"),Kc=Ue("DELETE_LINE_COMMAND"),no=Ue("FORMAT_TEXT_COMMAND"),I6=Ue("SET_TEXT_FORMAT_COMMAND"),Mp=Ue("UNDO_COMMAND"),Np=Ue("REDO_COMMAND"),Mh=Ue("KEYDOWN_COMMAND"),PC=Ue("KEY_ARROW_RIGHT_COMMAND"),AC=Ue("MOVE_TO_END"),l1=Ue("KEY_ARROW_LEFT_COMMAND"),$C=Ue("MOVE_TO_START"),u1=Ue("KEY_ARROW_UP_COMMAND"),c1=Ue("KEY_ARROW_DOWN_COMMAND"),Ka=Ue("KEY_ENTER_COMMAND"),h1=Ue("KEY_SPACE_COMMAND"),Nh=Ue("KEY_BACKSPACE_COMMAND"),Lh=Ue("KEY_ESCAPE_COMMAND"),f1=Ue("KEY_DELETE_COMMAND"),Lp=Ue("KEY_TAB_COMMAND"),IC=Ue("INSERT_TAB_COMMAND"),Td=Ue("INDENT_CONTENT_COMMAND"),C0=Ue("OUTDENT_CONTENT_COMMAND"),d1=Ue("DROP_COMMAND"),R6=Ue("FORMAT_ELEMENT_COMMAND"),Dp=Ue("DRAGSTART_COMMAND"),p1=Ue("DRAGOVER_COMMAND"),M6=Ue("DRAGEND_COMMAND"),Qp=Ue("COPY_COMMAND"),m1=Ue("CUT_COMMAND"),RC=Ue("SELECT_ALL_COMMAND"),N6=Ue("CLEAR_EDITOR_COMMAND"),L6=Ue("CLEAR_HISTORY_COMMAND"),Ma=Ue("CAN_REDO_COMMAND"),Na=Ue("CAN_UNDO_COMMAND"),Dh=Ue("FOCUS_COMMAND"),Vp=Ue("BLUR_COMMAND"),D6=Ue("KEY_MODIFIER_COMMAND");function Q6(t){const e=new Map;return{dispose(){for(const n of e.values())n.dispose();e.clear()},register(n,i){let r=e.get(n);r===void 0&&(r={dispose:t(n,i),holders:new Set},e.set(n,r));const s=()=>{const o=e.get(n);o&&o.holders.delete(s)&&o.holders.size===0&&(e.delete(n),o.dispose())};return r.holders.add(s),s}}}function g1(t,e,n,i){return t.addEventListener(e,n,i),t.removeEventListener.bind(t,e,n,i)}const Eo=Object.freeze({}),Wb=[["keydown",function(t,e){const n=e._inputState;n.lastKeyDownTimeStamp=t.timeStamp,n.lastKeyCode=t.key,t.key!=="Backspace"&&Pd(n),!e.isComposing()&&Fe(e,Mh,t)}],["pointerdown",function(t,e){const n=w1(t),i=t.pointerType;Bu(n)&&i!=="touch"&&i!=="pen"&&t.button===0&&ts(e,()=>{Nd(n,e)||(e._inputState.isSelectionChangeFromMouseDown=!0)})}],["compositionstart",function(t,e){Fe(e,EC,t)}],["compositionend",function(t,e){const n=e._inputState;ho?n.compositionPhase="ending-firefox":Ko||!Ph&&!Ah?Fe(e,TC,t):(n.compositionPhase="ending-safari",n.compositionEndData=t.data)}],["input",function(t,e){t.stopPropagation();const n=e._inputState;Pd(n),ts(e,()=>{j6(t,e)||e.dispatchCommand(kC,t)},{event:t}),n.unprocessedBeforeInputData=null}],["click",function(t,e){ts(e,()=>{const n=me(),i=Mi(pr(e)),r=ha();if(i){if(ae(n)){const s=n.anchor,o=s.getNode();s.type==="element"&&s.offset===0&&n.isCollapsed()&&!xn(o)&&pt().getChildrenSize()===1&&o.getTopLevelElementOrThrow().isEmpty()&&r!==null&&n.is(r)&&(i.removeAllRanges(),n.dirty=!0)}else if(t.pointerType==="touch"||t.pointerType==="pen"){const s=$r(i,e._rootElement).anchorNode;(Je(s)||Hi(s))&&yn(y1(r,i,e,t))}}Fe(e,Rp,t)})}],["cut",Eo],["copy",Eo],["dragstart",Eo],["dragover",Eo],["dragend",Eo],["paste",Eo],["focus",Eo],["blur",Eo],["drop",Eo]];lu&&Wb.push(["beforeinput",(t,e)=>(function(n,i){const r=n.inputType;r==="deleteCompositionText"||ho&&A4(i)||r!=="insertCompositionText"&&ts(i,()=>{j6(n,i)||Fe(i,wC,n)},{event:n})})(t,e)]);const Hb=new WeakMap,w0=new WeakMap,Mz=Q6(t=>(t.addEventListener("selectionchange",nT),()=>t.removeEventListener("selectionchange",nT)));function V6(t,e,n,i,r,s){const o=t.anchor,a=t.focus,l=o.getNode(),u=Dt();let c;if(s!==void 0)c=s;else{const g=Mi(pr(u));c=g!==null?$r(g,u._rootElement):null}const h=c!==null?c.anchorNode:null,f=o.key,p=u.getElementByKey(f),m=n.length;return f!==a.key||!le(l)||(!r&&(!lu||u._inputState.lastBeforeInputInsertTextTimeStamp<i+50)||l.isDirty()&&m<2||C4(n))&&o.offset!==a.offset&&!l.isComposing()||rr(l)||l.isDirty()&&m>1||(r||!lu)&&p!==null&&!l.isComposing()&&h!==Zo(l,p,u)||c!==null&&e!==null&&(!e.collapsed||e.startContainer!==c.anchorNode||e.startOffset!==c.anchorOffset)||!l.isComposing()&&(l.getFormat()!==t.format||l.getStyle()!==t.style)||(function(g,x){if(x.isSegmented())return!0;if(!g.isCollapsed())return!1;const y=g.anchor.offset,S=x.getParentOrThrow(),_=Ha(x);return y===0?!x.canInsertTextBefore()||!S.canInsertTextBefore()&&!x.isComposing()||_||(function(k){const w=k.getPreviousSibling();return(le(w)||W(w)&&w.isInline())&&!w.canInsertTextAfter()})(x):y===x.getTextContentSize()&&(!x.canInsertTextAfter()||!S.canInsertTextAfter()&&!x.isComposing()||_)})(t,l)}function KE(t,e){return Hi(t)&&t.nodeValue!==null&&e!==0&&e!==t.nodeValue.length}function JE(t,e,n){const{anchorNode:i,anchorOffset:r,focusNode:s,focusOffset:o}=$r(t,e._rootElement),a=e._inputState;a.isSelectionChangeFromDOMUpdate&&(a.isSelectionChangeFromDOMUpdate=!1,KE(i,r)&&KE(s,o)&&!a.postDeleteSelectionToRestore)||ts(e,()=>{if(!n)return void yn(null);if(!Vh(e,i,s))return;let l=me();if(a.postDeleteSelectionToRestore&&ae(l)&&l.isCollapsed()){const u=l.anchor,c=a.postDeleteSelectionToRestore.anchor;(u.key===c.key&&u.offset===c.offset+1||u.offset===1&&c.getNode().is(u.getNode().getPreviousSibling()))&&(l=a.postDeleteSelectionToRestore.clone(),yn(l))}if(a.postDeleteSelectionToRestore=null,ae(l)){const u=l.anchor,c=u.getNode();if(l.isCollapsed()){t.type==="Range"&&i===s&&(l.dirty=!0);const h=pr(e).event,f=h?h.timeStamp:performance.now(),{format:p,style:m,offset:g,key:x,timeStamp:y}=a.collapsedSelectionFormat,S=pt(),_=e.isComposing()===!1&&S.getTextContent()==="";if(f<y+200&&u.offset===g&&u.key===x)Ug(l,p,m);else if(u.type==="text")le(c)||de(141),B6(l,c);else if(u.type==="element"&&!_){W(c)||de(259);const k=u.getNode();k.isEmpty()?(function(w,b){const E=b.getTextFormat(),P=b.getTextStyle();Ug(w,E,P)})(l,k):Ug(l,l.format,"")}}else{const h=u.key,f=l.focus.key,p=l.getNodes(),m=p.length,g=l.isBackward(),x=g?o:r,y=g?r:o,S=g?f:h,_=g?h:f;let k=2047,w=!1;for(let b=0;b<m;b++){const E=p[b],P=E.getTextContentSize();if(le(E)&&P!==0&&!(b===0&&E.__key===S&&x===P||b===m-1&&E.__key===_&&y===0)&&(w=!0,k&=E.getFormat(),k===0))break}l.format=w?k:0}}Fe(e,Ih,void 0)})}function Ug(t,e,n){t.format===e&&t.style===n||(t.format=e,t.style=n,t.dirty=!0)}function B6(t,e){Ug(t,e.getFormat(),e.getStyle())}function F6(t){if(!t.getTargetRanges)return null;const e=t.getTargetRanges();return e.length===0?null:e[0]}function eT(t){const{lastKeyCode:e}=Dt()._inputState;if(t==null||t.length<=1||e==null)return;const n=e.length===1?e:e==="Enter"?`
|
|
24
|
+
`:e==="Tab"?" ":null;if(!n)return;const i=me();if(!ae(i)||!i.isCollapsed())return;const r=i.anchor.getNode();if(!le(r))return;const{offset:s}=i.anchor;if(r.getTextContentSize()===s){const o=r.getNextSibling();if(n===`
|
|
25
|
+
`){if(Gn(o))o.selectEnd();else if(!o){const a=Lt(r,el),l=a&&a.getNextSibling();W(l)&&l.selectStart()}}else n===" "?Ja(o)&&o.selectEnd():le(o)&&o.getTextContent()[0]===n&&o.select(1,1)}else r.getTextContent()[s]===n&&r.select(s+1,s+1)}function Pd(t){t.isInsertTextAfterHandledSelectionCommand=!1,t.handledSelectionCommandTimeoutId!==null&&(clearTimeout(t.handledSelectionCommandTimeoutId),t.handledSelectionCommandTimeoutId=null)}function tT(t){Pd(t),t.isInsertTextAfterHandledSelectionCommand=!0,t.handledSelectionCommandTimeoutId=setTimeout(()=>Pd(t),0)}function j6(t,e){const n=w1(t);if(Je(n)&&Nd(n,e))return!0;const i=e.getRootElement();if(i===null)return!1;const r=mu(i.ownerDocument);return r!==null&&i.contains(r)&&Nd(r,e)}function Nz(t){const e=t.inputType,n=F6(t),i=Dt(),r=i._inputState,s=me();if(e==="insertText"&&t.data&&r.isInsertTextAfterHandledSelectionCommand){if(Pd(r),t.preventDefault(),ae(s)&&!s.isCollapsed()){const h=s.isBackward()?s.anchor:s.focus;s.anchor.set(h.key,h.offset,h.type),s.focus.set(h.key,h.offset,h.type)}return!0}if(e==="deleteContentBackward"){if(s===null){const h=ha();if(!ae(h))return!0;yn(h.clone())}if(ae(s)){const h=s.anchor.key===s.focus.key;if((function(f,p){return f.lastKeyCode==="MediaLast"&&p<f.lastKeyDownTimeStamp+30})(r,t.timeStamp)&&i.isComposing()&&h){if(Un(null),r.lastKeyDownTimeStamp=0,setTimeout(()=>{ts(i,()=>{Un(null)})},30),ae(s)){const f=s.anchor.getNode();f.markDirty(),le(f)||de(142),B6(s,f)}}else{if(Un(null),Ko&&n!==null&&!n.collapsed&&(s.applyDOMRange(n),!s.isCollapsed()))return t.preventDefault(),s.removeText(),!0;t.preventDefault();const f=s.anchor.getNode(),p=f.getTextContent(),m=f.canInsertTextAfter(),g=s.anchor.offset===0&&s.focus.offset===p.length;let x=Sd&&h&&!g&&m;if(x&&s.isCollapsed()&&(x=!ht(P4(s.anchor,!0))),!x){Fe(i,za,!0);const y=me();Sd&&ae(y)&&y.isCollapsed()&&(r.postDeleteSelectionToRestore=y,setTimeout(()=>r.postDeleteSelectionToRestore=null))}}return!0}}if(!ae(s))return!0;const o=t.data;r.unprocessedBeforeInputData!==null&&JC(!1,i,r.unprocessedBeforeInputData),s.dirty&&r.unprocessedBeforeInputData===null||!s.isCollapsed()||xn(s.anchor.getNode())||n===null||s.applyDOMRange(n),r.unprocessedBeforeInputData=null;const a=s.anchor,l=s.focus,u=a.getNode(),c=l.getNode();if(e==="insertText"||e==="insertTranspose"){if(o===`
|
|
26
|
+
`)t.preventDefault(),Fe(i,Jl,!1);else if(o===Wl)t.preventDefault(),Fe(i,Yc,void 0);else if(o==null&&t.dataTransfer){const h=t.dataTransfer.getData("text/plain");t.preventDefault(),s.insertRawText(h)}else o!=null&&V6(s,n,o,t.timeStamp,!0)?(t.preventDefault(),Fe(i,eu,o),eT(o)):r.unprocessedBeforeInputData=o;return r.lastBeforeInputInsertTextTimeStamp=t.timeStamp,!0}switch(t.preventDefault(),e){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Fe(i,eu,t),eT((t.dataTransfer?t.dataTransfer.getData("text/plain"):null)??t.data);break;case"insertFromComposition":{const h=r.hadOrphanedCompositionEvents;r.hadOrphanedCompositionEvents=!1;const f=i._compositionKey;Un(null),h||Fe(i,eu,t),qg(f);break}case"insertLineBreak":Un(null),Fe(i,Jl,!1);break;case"insertParagraph":Un(null),r.isInsertLineBreak&&!Ko?(r.isInsertLineBreak=!1,Fe(i,Jl,!1)):Fe(i,Yc,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Fe(i,Rh,t);break;case"deleteByComposition":(function(h,f){return h!==f||W(h)||W(f)||!Ha(h)||!Ha(f)})(u,c)&&Fe(i,nd,t);break;case"deleteByDrag":Is(Ad),Fe(i,nd,t);break;case"deleteByCut":Fe(i,nd,t);break;case"deleteContent":Fe(i,za,!1);break;case"deleteWordBackward":Fe(i,Gc,!0);break;case"deleteWordForward":Fe(i,Gc,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Fe(i,Kc,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Fe(i,Kc,!1);break;case"formatStrikeThrough":Fe(i,no,"strikethrough");break;case"formatBold":Fe(i,no,"bold");break;case"formatItalic":Fe(i,no,"italic");break;case"formatUnderline":Fe(i,no,"underline");break;case"historyUndo":Fe(i,Mp,void 0);break;case"historyRedo":Fe(i,Np,void 0)}return!0}function Lz(t){const e=Dt(),n=e._inputState,i=me(),r=t.data,s=F6(t);let o=!1;if(r!=null&&ae(i)){const a=Mi(pr(e)),l=a!==null?$r(a,e._rootElement):null,u=t.inputType==="insertCompositionText"&&n.compositionPhase!=="ending-firefox"&&!e.isComposing();u&&(n.hadOrphanedCompositionEvents=!0);const c=i.anchor.getNode(),h=t.inputType==="insertCompositionText"&&n.compositionPhase!=="ending-firefox"&&e.isComposing()&&le(c)&&rr(c);if(!u&&!h&&V6(i,s,r,t.timeStamp,!1,l)){if(o=!0,n.compositionPhase==="ending-firefox"){const y=k0(e,r);if(n.compositionPhase="idle",y)return Is(Jc),kT(),!0}const f=i.anchor.getNode();if(a===null||l===null)return!0;const p=i.isBackward(),m=p?i.anchor.offset:i.focus.offset,g=p?i.focus.offset:i.anchor.offset;lu&&!i.isCollapsed()&&le(f)&&l.anchorNode!==null&&f.getTextContent().slice(0,m)+r+f.getTextContent().slice(m+g)===k4(l.anchorNode)||Fe(e,eu,r);const x=r.length;ho&&x>1&&t.inputType==="insertCompositionText"&&!e.isComposing()&&(i.anchor.offset-=x,i._cachedNodes=null,i._cachedIsBackward=null),Sd&&e.isComposing()&&(n.lastKeyDownTimeStamp=0,Un(null))}}return o||(JC(!1,e,r!==null?r:void 0),n.compositionPhase==="ending-firefox"&&(k0(e,r||void 0),Is(Jc),n.compositionPhase="idle")),kT(),!0}function Dz(t){const e=Dt(),n=e._inputState,i=me();if(ae(i)&&!e.isComposing()){n.compositionPhase="composing",n.hadOrphanedCompositionEvents=!1;const r=i.anchor,s=i.anchor.getNode();if(Un(r.key),Is(VC),t.timeStamp<n.lastKeyDownTimeStamp+30||r.type==="element"||!i.isCollapsed()||!Sd&&(s.getFormat()!==i.format||le(s)&&s.getStyle()!==i.style)||le(s)&&(rr(s)||r.offset===0&&!s.canInsertTextBefore()||r.offset===s.getTextContentSize()&&!s.canInsertTextAfter())){Fe(e,eu,SC);const o=me();ae(o)&&Un(o.anchor.key)}}return!0}function Qz(t){const e=Dt();return e._inputState.compositionPhase="idle",k0(e,t.data),Is(Jc),!0}function qg(t){if(t===null)return;const e=st(t);if(!le(e)||e.getType()==="text"||rr(e)||!e.isAttached())return;const n=me(),i=ae(n)&&n.anchor.key===t?n.anchor.offset:null,r=Vt(e.getTextContent());if(r.setFormat(e.getFormat()),r.setStyle(e.getStyle()),e.replace(r),i!==null){const s=Math.min(i,r.getTextContentSize());r.select(s,s)}}function k0(t,e){const n=t._compositionKey;if(Un(null),n!==null&&e!=null){if(e===""){const r=st(n),s=t.getElementByKey(n),o=s!==null&&le(r)?Zo(r,s,t):null;if(o!==null&&o.nodeValue!==null&&le(r)){const a=Mi(pr(t)),l=a&&$r(a,t._rootElement);let u=null,c=null;l!==null&&l.anchorNode===o&&(u=l.anchorOffset,c=l.focusOffset),ew(r,o.nodeValue,u,c,!0)}return qg(n),!1}if(e[e.length-1]===`
|
|
27
|
+
`){const r=me();if(ae(r)||Ct(r)){if(ae(r)){const s=r.focus;r.anchor.set(s.key,s.offset,s.type)}return Fe(t,Ka,null),qg(n),!1}}const i=st(n);if(i!==null&&le(i)&&rr(i)){i.markDirty();const r=me(),s=i.getTextContentSize(),o=ae(r)&&r.anchor.key===n?r.anchor.offset:s;return i.select(o,o).insertText(e),!0}}return JC(!0,t,e),qg(n),!1}function Vz(t){const e=Dt(),n=e._inputState;if(t.key==null)return!0;if(n.compositionPhase==="ending-safari"){const i=TT(t);if(i&&ts(e,()=>{k0(e,n.compositionEndData)}),n.compositionPhase="idle",n.compositionEndData="",i)return!0}if((function(i){return jt(i,"ArrowRight",{shiftKey:"any"})})(t))Fe(e,PC,t);else if((function(i){return jt(i,"ArrowRight",{...Po,shiftKey:"any"})})(t))Fe(e,AC,t);else if((function(i){return jt(i,"ArrowLeft",{shiftKey:"any"})})(t))Fe(e,l1,t);else if((function(i){return jt(i,"ArrowLeft",{...Po,shiftKey:"any"})})(t))Fe(e,$C,t);else if((function(i){return jt(i,"ArrowUp",{altKey:"any",shiftKey:"any"})})(t))Fe(e,u1,t);else if((function(i){return jt(i,"ArrowDown",{altKey:"any",shiftKey:"any"})})(t))Fe(e,c1,t);else if((function(i){return jt(i,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})})(t))n.isInsertLineBreak=!0,Fe(e,Ka,t);else if((function(i){return i.key===" "})(t))Fe(e,h1,t);else if((function(i){return jr&&jt(i,"o",{ctrlKey:!0})})(t))t.preventDefault(),n.isInsertLineBreak=!0,Fe(e,Jl,!0);else if((function(i){return jt(i,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})})(t))n.isInsertLineBreak=!1,Fe(e,Ka,t);else if((function(i){return jt(i,"Backspace",{shiftKey:"any"})||jr&&jt(i,"h",{ctrlKey:!0})})(t))TT(t)?Fe(e,Nh,t)&&tT(n):(t.preventDefault(),Fe(e,za,!0));else if((function(i){return i.key==="Escape"})(t))Fe(e,Lh,t);else if((function(i){return jt(i,"Delete",{})||jr&&jt(i,"d",{ctrlKey:!0})})(t))(function(i){return i.key==="Delete"})(t)?Fe(e,f1,t):(t.preventDefault(),Fe(e,za,!1));else if((function(i){return jt(i,"Backspace",ET)})(t))t.preventDefault(),Fe(e,Gc,!0);else if((function(i){return jt(i,"Delete",ET)})(t))t.preventDefault(),Fe(e,Gc,!1);else if((function(i){return jr&&jt(i,"Backspace",{metaKey:!0})})(t))t.preventDefault(),Fe(e,Kc,!0);else if((function(i){return jr&&(jt(i,"Delete",{metaKey:!0})||jt(i,"k",{ctrlKey:!0}))})(t))t.preventDefault(),Fe(e,Kc,!1);else if((function(i){return jt(i,"b",Po)})(t))t.preventDefault(),Fe(e,no,"bold");else if((function(i){return jt(i,"u",Po)})(t))t.preventDefault(),Fe(e,no,"underline");else if((function(i){return jt(i,"i",Po)})(t))t.preventDefault(),Fe(e,no,"italic");else if((function(i){return jt(i,"Tab",{shiftKey:"any"})})(t))Fe(e,Lp,t);else if((function(i){return jt(i,"z",Po)})(t))t.preventDefault(),Fe(e,Mp,void 0);else if((function(i){return jr?jt(i,"z",{metaKey:!0,shiftKey:!0}):jt(i,"y",{ctrlKey:!0})||jt(i,"z",{ctrlKey:!0,shiftKey:!0})})(t))t.preventDefault(),Fe(e,Np,void 0);else{const i=e._editorState._selection;(function(r){return jt(r,"a",Po)})(t)?(t.preventDefault(),Fe(e,RC,t)&&tT(n)):i===null||ae(i)||((function(r){return jt(r,"c",Po)})(t)?(t.preventDefault(),Fe(e,Qp,t)):(function(r){return jt(r,"x",Po)})(t)&&(t.preventDefault(),Fe(e,m1,t)))}return(function(i){return i.ctrlKey||i.shiftKey||i.altKey||i.metaKey})(t)&&e.dispatchCommand(D6,t),!0}function Z6(t){let e=t.__lexicalEventHandles;return e===void 0&&(e=[],t.__lexicalEventHandles=e),e}const Ec=new Map;function nT(t){const e=M4(t.target);if(e===null)return;const n=_1(t.target);let i=null,r=null;const s=n!==null?w0.get(n):void 0;if(n!==null){if(s!==void 0){const h=s.editors;let f=s.hasShadowEditor;if(f===void 0){f=!1;for(const p of h)if(p._rootElement!==null&&fo(p._rootElement.getRootNode())){f=!0;break}s.hasShadowEditor=f}if(f){let p=null,m=null;for(const g of h){const x=g._rootElement;if(x===null)continue;const y=$r(e,x).anchorNode;if(y!==null&&Wa(y)===g){if(fo(x.getRootNode())){i=g,r=y;break}p===null&&(p=g,m=y)}}i===null&&p!==null&&(i=p,r=m)}else{const p=e.anchorNode;p===null||Je(p)&&p.shadowRoot!==null||(i=Wa(p),i!==null&&(r=p))}}if(i===null){const h=mu(n);i=h!==null?Wa(h):null}}if(i===null)return;if(i._inputState.isSelectionChangeFromMouseDown){if(s!==void 0)for(const h of s.editors)h._inputState.isSelectionChangeFromMouseDown=!1;ts(i,()=>{const h=ha(),f=r??$r(e,i._rootElement).anchorNode;(Je(f)||Hi(f))&&yn(y1(h,e,i,t))})}const o=KC(i),a=o[o.length-1],l=a._key,u=Ec.get(l),c=u||a;c!==i&&JE(e,c,!1),JE(e,i,!0),i!==a?Ec.set(l,i):u&&Ec.delete(l)}function Ub(t){t._lexicalHandled=!0}function iT(t){return t._lexicalHandled===!0}function Bz(t){const e=Hb.get(t);if(e===void 0)return;const n=w0.get(e);if(n===void 0)return;Hb.delete(t);const i=Vu(t);Bh(i)?((function(s){if(s._parentEditor!==null){const o=KC(s),a=o[o.length-1]._key;Ec.get(a)===s&&Ec.delete(a)}else Ec.delete(s._key)})(i),n.editors.delete(i),n.hasShadowEditor=void 0,t.__lexicalEditor=null):i&&de(198);const r=Z6(t);for(let s=0;s<r.length;s++)r[s]();t.__lexicalEventHandles=[]}function qb(t,e,n){ri();const i=t.__key,r=t.getParent();if(r===null)return void(yi(t)!==null&&de(367,i,String(yi(t))));const s=(function(a){const l=me();if(!ae(l)||!W(a))return l;const{anchor:u,focus:c}=l,h=u.getNode(),f=c.getNode();return pu(h,a)&&u.set(a.__key,0,"element"),pu(f,a)&&c.set(a.__key,0,"element"),l})(t);let o=!1;if(ae(s)&&e){const a=s.anchor,l=s.focus;a.key===i&&(A0(a,t,r,t.getPreviousSibling(),t.getNextSibling()),o=!0),l.key===i&&(A0(l,t,r,t.getPreviousSibling(),t.getNextSibling()),o=!0)}else Ct(s)&&e&&t.isSelected()&&t.selectPrevious();if(ae(s)&&e&&!o){const a=t.getIndexWithinParent();ks(t),Fl(s,r,a,-1)}else ks(t);n||It(r)||r.canBeEmpty()||!r.isEmpty()||qb(r,e),e&&s&&xn(r)&&r.isEmpty()&&r.selectEnd()}function Fz(t){return t}const z6=Symbol.for("ephemeral");function E0(t){return t[z6]||!1}const rT={configurable:!0,enumerable:!1,value:void 0,writable:!0};var JI;JI=Cd;class ar{constructor(e){se(this,"__type");se(this,"__key");se(this,"__parent");se(this,"__prev");se(this,"__next");se(this,"__state");se(this,JI);this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",rT),Object.defineProperty(this,Cd,rT),b4(this,e)}static getType(){const{ownNodeType:e}=Zp(this);return e===void 0&&de(64,this.name),e}static clone(e){de(65,this.name)}$config(){return{}}config(e,n){const i=n.extends||Z4(this.constructor);return Object.assign(n,{extends:i}),typeof e=="string"&&Object.assign(n,{type:e}),{[e]:n}}afterCloneFrom(e){this.__key===e.__key?(this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev,this.__state=e.__state):e.__state&&(this.__state=e.__state.getWritable(this))}resetOnCopyNodeFrom(e){this.__state&&(this.__state=this.__state.getWritable(this).resetOnCopyNode())}getType(){return this.__type}isInline(){de(137,this.constructor.name)}isAttached(){let e=this.__key;for(;e!==null;){if(e==="root")return!0;const n=st(e);if(n===null)break;e=n.__parent!==null?n.__parent:yi(n)}return!1}isSelected(e){const n=e||me();if(n==null)return!1;const i=n.getNodes().some(r=>r.__key===this.__key);if(le(this))return i;if(ae(n)&&n.anchor.type==="element"&&n.focus.type==="element"){if(n.isCollapsed())return!1;const r=this.getParent();if(ht(this)&&this.isInline()&&r){const s=n.isBackward()?n.focus:n.anchor;if(r.is(s.getNode())&&s.offset===r.getChildrenSize()&&this.is(r.getLastChild()))return!1}}return i}getKey(){return this.__key}getIndexWithinParent(){const e=this.getParent();if(e===null)return-1;let n=e.getFirstChild(),i=0;for(;n!==null;){if(this.is(n))return i;i++,n=n.getNextSibling()}return-1}getParent(){const e=this.getLatest().__parent;return e===null?null:st(e)}getParentOrThrow(){const e=this.getParent();return e===null&&de(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){const n=e.getParent();if(It(n)||yi(e)!==null)return W(e)||e===this&&ht(e)||de(194),e;e=n}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return e===null&&de(67,this.__key),e}getParents(){const e=[];let n=this.getParent();for(;n!==null;)e.push(n),n=n.getParent();return e}getParentKeys(){const e=[];let n=this.getParent();for(;n!==null;)e.push(n.__key),n=n.getParent();return e}getPreviousSibling(){const e=this.getLatest().__prev;return e===null?null:st(e)}getPreviousSiblings(){const e=[],n=this.getParent();if(n===null)return e;let i=n.getFirstChild();for(;i!==null&&!i.is(this);)e.push(i),i=i.getNextSibling();return e}getNextSibling(){const e=this.getLatest().__next;return e===null?null:st(e)}getNextSiblings(){const e=[];let n=this.getNextSibling();for(;n!==null;)e.push(n),n=n.getNextSibling();return e}getCommonAncestor(e){const n=W(this)?this:this.getParent(),i=W(e)?e:e.getParent(),r=n&&i?Q0(n,i):null;return r?r.commonAncestor:null}is(e){return e!=null&&this.__key===e.__key}isBefore(e){const n=Q0(this,e);return n!==null&&(n.type==="descendant"||(n.type==="branch"?dw(n)===-1:(n.type!=="same"&&n.type!=="ancestor"&&de(279),!1)))}isParentOf(e){return pu(e,this)}getNodesBetween(e){const n=this.isBefore(e),i=[],r=new Set;let s=this;for(;s!==null;){const o=s.__key;if(r.has(o)||(r.add(o),i.push(s)),s===e)break;const a=W(s)?n?s.getFirstChild():s.getLastChild():null;if(a!==null){s=a;continue}const l=n?s.getNextSibling():s.getPreviousSibling();if(l!==null){s=l;continue}const u=s.getParentOrThrow();if(r.has(u.__key)||i.push(u),u===e)break;let c=null,h=u;do{if(h===null&&de(68),c=n?h.getNextSibling():h.getPreviousSibling(),h=h.getParent(),h===null)break;c!==null||r.has(h.__key)||i.push(h)}while(c===null);s=c}return n||i.reverse(),i}isDirty(){const e=Dt()._dirtyLeaves;return e!==null&&e.has(this.__key)}getLatest(){if(E0(this))return this;const e=st(this.__key);return e===null&&de(113),e}getWritable(){if(E0(this))return this;ri();const e=vo(),n=Dt(),i=e._nodeMap,r=this.__key,s=this.getLatest(),o=n._cloneNotNeeded,a=me();if(a!==null&&a.setCachedNodes(null),o.has(r))return N0(s),s;const l=k1(s);return o.add(r),N0(l),i.set(r,l),l}getTextContent(){return H4(this)}getTextContentSize(){return this.getTextContent().length}createDOM(e,n){de(70)}updateDOM(e,n,i){de(71)}getDOMSlot(e){return new h6(e)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){const e=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...e}}static importJSON(e){de(18,this.name)}updateFromJSON(e){return(function(n,i){const r=n.getWritable(),s=i.$;let o=s;for(const a of S6(r).flatKeys)a in i&&(o!==void 0&&o!==s||(o={...s}),o[a]=i[a]);return(r.__state||o)&&CC(n).updateFromJSON(o),r})(this,e)}static transform(){return null}remove(e){qb(this,!0,e)}replace(e,n){ri();let i=me();i!==null&&(i=i.clone()),cy(this,e);const r=this.getLatest(),s=this.__key,o=e.__key,a=e.getWritable(),l=this.getParentOrThrow().getWritable(),u=l.__size,c=a.getParent(),h=c!==null?a.getIndexWithinParent():-1;ks(a),c!==null&&ae(i)&&Fl(i,c,h,-1);const f=r.getPreviousSibling(),p=r.getNextSibling(),m=r.__prev,g=r.__next,x=r.__parent;qb(r,!1,!0),f===null?l.__first=o:f.getWritable().__next=o,a.__prev=m,p===null?l.__last=o:p.getWritable().__prev=o,a.__next=g,a.__parent=x,l.__size=u;let y=0;n&&(W(this)&&W(a)||de(139),y=a.getChildrenSize(),a.splice(y,0,this.getChildren()));const S=Pr(this);if(S.length>0){lo(this)&&lo(a)||de(368,this.__key,a.__key);for(const _ of S){const k=Jo(this,_);k!==null&&(U4(this,_),uw(a,_,k))}}if(ae(i)){yn(i);const _=i.anchor,k=i.focus;_.key===s&&(n&&_.type==="element"?_.set(a.__key,y+_.offset,"element"):lT(_,a)),k.key===s&&(n&&k.type==="element"?k.set(a.__key,y+k.offset,"element"):lT(k,a))}return Vo()===s&&Un(o),a}insertAfter(e,n=!0){ri(),cy(this,e);const i=this.getWritable(),r=e.getWritable();this.getParentOrThrow();const s=r.getParent(),o=me();let a=!1,l=!1;if(s!==null){const p=e.getIndexWithinParent();if(ae(o)){const m=s.__key,g=o.anchor,x=o.focus;a=g.type==="element"&&g.key===m&&g.offset===p+1,l=x.type==="element"&&x.key===m&&x.offset===p+1}ks(r),n&&ae(o)&&Fl(o,s,p,-1)}else ks(r);const u=this.getNextSibling(),c=this.getParentOrThrow().getWritable(),h=r.__key,f=i.__next;if(u===null?c.__last=h:u.getWritable().__prev=h,c.__size++,i.__next=h,r.__next=f,r.__prev=i.__key,r.__parent=i.__parent,n&&ae(o)){const p=this.getIndexWithinParent();Fl(o,c,p+1);const m=c.__key;a&&o.anchor.set(m,p+2,"element"),l&&o.focus.set(m,p+2,"element")}return e}insertBefore(e,n=!0){ri(),cy(this,e);const i=this.getWritable(),r=e.getWritable();this.getParentOrThrow();const s=r.__key,o=me(),a=r.getParent(),l=a!==null?r.getIndexWithinParent():-1;ks(r),a!==null&&n&&ae(o)&&Fl(o,a,l,-1);const u=this.getPreviousSibling(),c=this.getParentOrThrow().getWritable(),h=i.__prev,f=this.getIndexWithinParent();return u===null?c.__first=s:u.getWritable().__next=s,c.__size++,i.__prev=s,r.__prev=h,r.__next=i.__key,r.__parent=i.__parent,n&&ae(o)&&Fl(o,this.getParentOrThrow(),f),e}isParentRequired(){return!1}createParentElementNode(){return ut()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,n){ri();const i=Yr(this);if(i!==null)return i.selectPrevious(e,n);const r=this.getPreviousSibling(),s=this.getParentOrThrow();if(r===null)return s.select(0,0);if(W(r))return r.select();if(!le(r)){const o=r.getIndexWithinParent()+1;return s.select(o,o)}return r.select(e,n)}selectNext(e,n){ri();const i=Yr(this);if(i!==null)return i.selectNext(e,n);const r=this.getNextSibling(),s=this.getParentOrThrow();if(r===null)return s.select();if(W(r))return r.select(0,0);if(!le(r)){const o=r.getIndexWithinParent();return s.select(o,o)}return r.select(e,n)}markDirty(){this.getWritable()}reconcileObservedMutation(e,n){this.markDirty()}}se(ar,"importDOM");function MC(t){return t instanceof ar}const Xa="historic",O1="history-push",Tc="history-merge",NC="paste",LC="cut",DC="collaboration",jz="skip-collab",X6="skip-scroll-into-view",QC="skip-dom-selection",Ad="skip-selection-focus",VC="composition-start",Jc="composition-end",Zz="!important";function $d(t){const e={};if(!t)return e;let n="",i="",r=null,s=!1,o=!1,a=!1,l=0;const u=t.length;let c=-1;for(let p=0;p<u;p++){const m=t[p];if(s)m==="*"&&t[p+1]==="/"&&(s=!1,p++);else if(o)c===-1&&(c=p),o=!1;else if(r===null)if(m!=="/"||t[p+1]!=="*")if(m!=='"'&&m!=="'")if(m!=="(")if(m!==")")if(a||m!==":"||l!==0){if(m===";"&&l===0){c!==-1&&(a?i+=t.slice(c,p):n+=t.slice(c,p),c=-1);const g=n.trim(),x=i.trim();g!==""&&x!==""&&(e[g]=x),n="",i="",a=!1;continue}c===-1&&(c=p)}else c!==-1&&(n+=t.slice(c,p),c=-1),a=!0;else c===-1&&(c=p),l=Math.max(0,l-1);else c===-1&&(c=p),l++;else c===-1&&(c=p),r=m;else c!==-1&&(a?i+=t.slice(c,p):n+=t.slice(c,p),c=-1),s=!0,p++;else c===-1&&(c=p),m==="\\"?o=!0:m===r&&(r=null)}c!==-1&&(a?i+=t.slice(c,u):n+=t.slice(c,u));const h=n.trim(),f=i.trim();return h!==""&&f!==""&&(e[h]=f),e}function W6(t,e,n){const i=n.trimEnd(),r=i.length-10;r>=0&&i.slice(r).toLowerCase()===Zz?t.setProperty(e,i.slice(0,r).trim(),"important"):t.setProperty(e,n,"")}function zz(t,e){for(const n in e){const i=e[n];i==null?t.removeProperty(n):W6(t,n,i)}}function tu(t,e,n=""){if(e===n)return;const i=$d(n),r=$d(e);for(const s in r)delete i[s],W6(t,s,r[s]);for(const s in i)t.removeProperty(s)}function ny(t,e){return 16&e?"code":e&o1?"mark":32&e?"sub":64&e?"sup":null}function iy(t,e){return 1&e?"strong":2&e?"em":"span"}function H6(t,e,n,i,r){const s=i.classList;let o=Pc(r,"base");o!==void 0&&s.add(...o),o=Pc(r,"underlineStrikethrough");let a=!1;const l=8&e&&4&e;o!==void 0&&(8&n&&4&n?(a=!0,l||s.add(...o)):l&&s.remove(...o));for(const u in ei){const c=ei[u];if(o=Pc(r,u),o!==void 0)if(n&c){if(a&&(u==="underline"||u==="strikethrough")){e&c&&s.remove(...o);continue}((e&c)===0||l&&u==="underline"||u==="strikethrough")&&s.add(...o)}else e&c&&s.remove(...o)}}function U6(t,e,n){const i=n.isComposing(),r=t+(i?_d:""),s=hn(),o=jp(s).$getDOMSlot(n,e,s),a=o.getFirstChild();if(a===null||a.nodeType!==Node.TEXT_NODE)return void o.insertChild(rn().createTextNode(r));const l=a,u=l.nodeValue;if(u!==r)if(i||ho){const[c,h,f]=(function(p,m){const g=p.length,x=m.length;let y=0,S=0;for(;y<g&&y<x&&p[y]===m[y];)y++;for(;S+y<g&&S+y<x&&p[g-S-1]===m[x-S-1];)S++;return[y,g-y-S,m.slice(y,x-S)]})(u,r);h!==0&&l.deleteData(c,h),l.insertData(c,f)}else l.nodeValue=r}function sT(t,e,n,i,r,s){U6(r,t,e);const o=s.theme.text;o!==void 0&&H6(0,0,i,t,o)}function Fm(t,e){const n=rn().createElement(e);return n.appendChild(t),n}function T0(t){return t!=null&&t.__isInlineFormattable===!0}class Rr extends ar{constructor(n="",i){super(i);se(this,"__text");se(this,"__format");se(this,"__style");se(this,"__mode");se(this,"__detail");this.__text=n,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}get __isInlineFormattable(){return!0}static getType(){return"text"}static clone(n){return new Rr(n.__text,n.__key)}afterCloneFrom(n){super.afterCloneFrom(n),this.__text=n.__text,this.__format=n.__format,this.__style=n.__style,this.__mode=n.__mode,this.__detail=n.__detail}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const n=this.getLatest();return yz[n.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===Vo()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(n){const i=ei[n];return(this.getFormat()&i)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(n,i){return tl(this.getLatest().__format,n,i)}canHaveFormat(){return!0}isInline(){return!0}createDOM(n,i){const r=this.__format,s=ny(0,r),o=iy(0,r),a=s===null?o:s,l=rn().createElement(a);let u=l;this.hasFormat("code")&&l.setAttribute("spellcheck","false"),s!==null&&(u=rn().createElement(o),l.appendChild(u)),sT(u,this,0,r,this.__text,n);const c=this.__style;return c!==""&&tu(l.style,c),l}updateDOM(n,i,r){const s=this.__text,o=n.__format,a=this.__format,l=ny(0,o),u=ny(0,a),c=iy(0,o),h=iy(0,a);if((l===null?c:l)!==(u===null?h:u))return!0;if(l===u&&c!==h){const x=i.firstChild;x==null&&de(48);const y=rn().createElement(h);return sT(y,this,0,a,s,r),i.replaceChild(y,x),!1}let f=i;u!==null&&l!==null&&(f=i.firstChild,f==null&&de(49)),U6(s,f,this);const p=r.theme.text;p!==void 0&&o!==a&&H6(0,o,a,f,p);const m=n.__style,g=this.__style;return m!==g&&tu(i.style,g,m),!1}static importDOM(){return{"#text":()=>({conversion:Uz,priority:0}),b:()=>({conversion:Wz,priority:0}),code:()=>({conversion:To,priority:0}),em:()=>({conversion:To,priority:0}),i:()=>({conversion:To,priority:0}),mark:()=>({conversion:To,priority:0}),s:()=>({conversion:To,priority:0}),span:()=>({conversion:Xz,priority:0}),strong:()=>({conversion:To,priority:0}),sub:()=>({conversion:To,priority:0}),sup:()=>({conversion:To,priority:0}),u:()=>({conversion:To,priority:0})}}static importJSON(n){return Vt().updateFromJSON(n)}updateFromJSON(n){return super.updateFromJSON(n).setTextContent(n.text).setFormat(n.format).setDetail(n.detail).setMode(n.mode).setStyle(n.style)}exportDOM(n){let{element:i}=super.exportDOM(n);return Je(i)||de(132),i.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?i.style.textTransform="lowercase":this.hasFormat("uppercase")?i.style.textTransform="uppercase":this.hasFormat("capitalize")&&(i.style.textTransform="capitalize"),this.hasFormat("bold")&&(i=Fm(i,"b")),this.hasFormat("italic")&&(i=Fm(i,"i")),this.hasFormat("strikethrough")&&(i=Fm(i,"s")),this.hasFormat("underline")&&(i=Fm(i,"u")),{element:i}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(n,i){}setFormat(n){const i=this.getWritable();return i.__format=typeof n=="string"?ei[n]:n,i}setDetail(n){const i=this.getWritable();return i.__detail=typeof n=="string"?gz[n]:n,i}setStyle(n){const i=this.getWritable();return i.__style=n,i}toggleFormat(n){const i=tl(this.getFormat(),n,null);return this.setFormat(i)}toggleDirectionless(){const n=this.getWritable();return n.__detail^=1,n}toggleUnmergeable(){const n=this.getWritable();return n.__detail^=2,n}setMode(n){const i=xz[n];if(this.__mode===i)return this;const r=this.getWritable();return r.__mode=i,r}setTextContent(n){if(this.__text===n)return this;const i=this.getWritable();return i.__text=n,i}select(n,i){ri();let r=n,s=i;const o=me(),a=this.getTextContent(),l=this.__key;if(typeof a=="string"){const u=a.length;r===void 0&&(r=u),s===void 0&&(s=u)}else r=0,s=0;if(!ae(o))return s4(l,r,l,s,"text","text");{const u=Vo();u!==o.anchor.key&&u!==o.focus.key||Un(l),o.setTextNodeRange(this,r,this,s)}return o}selectStart(){return this.select(0,0)}selectEnd(){const n=this.getTextContentSize();return this.select(n,n)}spliceText(n,i,r,s){const o=this.getWritable(),a=o.__text,l=r.length;let u=n;u<0&&(u=l+u,u<0&&(u=0));const c=me();if(s&&ae(c)){const f=n+l;c.setTextNodeRange(o,f,o,f)}const h=a.slice(0,u)+r+a.slice(u+i);return o.__text=h,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...n){ri();const i=this.getLatest(),r=i.getTextContent();if(r==="")return[];const s=i.__key,o=Vo(),a=r.length;n.sort(($,B)=>$-B),n.push(a);const l=[],u=n.length;for(let $=0,B=0;$<a&&B<=u;B++){const X=n[B];X>$&&(l.push(r.slice($,X)),$=X)}const c=l.length;if(c===1)return[i];const h=l[0],f=i.getParent();let p;const m=i.getFormat(),g=i.getStyle(),x=i.__detail;let y=!1,S=null,_=null;const k=me();if(ae(k)){const[$,B]=k.isBackward()?[k.focus,k.anchor]:[k.anchor,k.focus];$.type==="text"&&$.key===s&&(S=$),B.type==="text"&&B.key===s&&(_=B)}i.isSegmented()?(p=Vt(h),p.__format=m,p.__style=g,p.__detail=x,p.__state=jE(i,p),y=!0):p=i.setTextContent(h);const w=[p];for(let $=1;$<c;$++){const B=Vt(l[$]);B.__format=m,B.__style=g,B.__detail=x,B.__state=jE(i,B);const X=B.__key;o===s&&Un(X),w.push(B)}const b=S?S.offset:null,E=_?_.offset:null;let P=0;for(const $ of w){if(!S&&!_)break;const B=P+$.getTextContentSize();if(S!==null&&b!==null&&b<=B&&b>=P&&(S.set($.getKey(),b-P,"text"),b<B&&(S=null)),_!==null&&E!==null&&E<=B&&E>=P){_.set($.getKey(),E-P,"text");break}P=B}if(f!==null){(function(X){const j=X.getPreviousSibling(),Z=X.getNextSibling();j!==null&&N0(j),Z!==null&&N0(Z)})(this);const $=f.getWritable(),B=this.getIndexWithinParent();y?($.splice(B,0,w),this.remove()):$.splice(B,1,w),ae(k)&&Fl(k,f,B,c-1)}return w}mergeWithSibling(n){const i=n===this.getPreviousSibling();i||n===this.getNextSibling()||de(50);const r=this.__key,s=n.__key,o=this.__text,a=o.length;Vo()===s&&Un(r);const l=me();if(ae(l)){const f=l.anchor,p=l.focus;f!==null&&f.key===s&&mT(f,i,r,n,a),p!==null&&p.key===s&&mT(p,i,r,n,a)}const u=n.__text,c=i?u+o:o+u;this.setTextContent(c);const h=this.getWritable();return n.remove(),h}isTextEntity(){return!1}}function Xz(t){return{forChild:BC(t.style),node:null}}function Wz(t){const e=t,n=e.style.fontWeight==="normal";return{forChild:BC(e.style,n?void 0:"bold"),node:null}}const oT=new WeakMap;function Hz(t){if(!Je(t))return!1;if(t.nodeName==="PRE")return!0;const e=t.style.whiteSpace;return typeof e=="string"&&e.startsWith("pre")}function Uz(t){const e=t;t.parentElement===null&&de(129);let n=e.textContent||"";if((function(i){let r,s=i.parentNode;const o=[i];for(;s!==null&&(r=oT.get(s))===void 0&&!Hz(s);)o.push(s),s=s.parentNode;const a=r===void 0?s:r;for(let l=0;l<o.length;l++)oT.set(o[l],a);return a})(e)!==null)return{node:th(n)};if(n=n.replace(/\r/g,"").replace(/[ \t\n]+/g," "),n==="")return{node:null};if(n[0]===" "){let i=e,r=!0;for(;i!==null&&(i=aT(i,!1))!==null;){const s=i.textContent||"";if(s.length>0){/[ \t\n]$/.test(s)&&(n=n.slice(1)),r=!1;break}}r&&(n=n.slice(1))}if(n[n.length-1]===" "){let i=e,r=!0;for(;i!==null&&(i=aT(i,!0))!==null;)if((i.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){r=!1;break}r&&(n=n.slice(0,n.length-1))}return n===""?{node:null}:{node:Vt(n)}}function aT(t,e){let n=t;for(;;){let i;for(;(i=e?n.nextSibling:n.previousSibling)===null;){const s=n.parentElement;if(s===null)return null;n=s}if(n=i,Je(n)){const s=n.style.display;if(s===""&&!Md(n)||s!==""&&!s.startsWith("inline"))return null}let r=n;for(;(r=e?n.firstChild:n.lastChild)!==null;)n=r;if(Hi(n))return n;if(n.nodeName==="BR")return null}}const qz={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function To(t){const e=qz[t.nodeName.toLowerCase()];return e===void 0?{node:null}:{forChild:BC(t.style,e),node:null}}function Vt(t=""){return Ui(new Rr(t))}function le(t){return t instanceof Rr}function BC(t,e){const n=t.fontWeight,i=t.textDecoration.split(" "),r=n==="700"||n==="bold",s=i.includes("line-through"),o=t.fontStyle==="italic",a=i.includes("underline"),l=t.verticalAlign;return u=>((le(u)||T0(u))&&(r&&!u.hasFormat("bold")&&u.toggleFormat("bold"),s&&!u.hasFormat("strikethrough")&&u.toggleFormat("strikethrough"),o&&!u.hasFormat("italic")&&u.toggleFormat("italic"),a&&!u.hasFormat("underline")&&u.toggleFormat("underline"),l!=="sub"||u.hasFormat("subscript")||u.toggleFormat("subscript"),l!=="super"||u.hasFormat("superscript")||u.toggleFormat("superscript"),e&&!u.hasFormat(e)&&u.toggleFormat(e)),u)}class xl extends Rr{static getType(){return"tab"}static clone(e){return new xl(e.__key)}constructor(e){super(" ",e),this.__detail=2}static importDOM(){return null}createDOM(e){const n=super.createDOM(e),i=Pc(e.theme,"tab");return i!==void 0&&n.classList.add(...i),n}static importJSON(e){return Qh().updateFromJSON(e)}setTextContent(e){return super.setTextContent(" ")}spliceText(e,n,i,r){return i===""&&n===0||i===" "&&n===1||de(286),this}setDetail(e){return e!==2&&de(127),this}setMode(e){return e!=="normal"&&de(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Qh(){return Ui(new xl)}function Ja(t){return t instanceof xl}class Yz{constructor(e,n,i){se(this,"key");se(this,"offset");se(this,"type");se(this,"_selection");this._selection=null,this.key=e,this.offset=n,this.type=i}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){return this.key===e.key?this.offset<e.offset:rh(vi(bi(this,"next")),vi(bi(e,"next")))<0}getNode(){const e=st(this.key);return e===null&&de(20),e}set(e,n,i,r){const s=this._selection,o=this.key;r&&this.key===e&&this.offset===n&&this.type===i||(this.key=e,this.offset=n,this.type=i,fu()||(Vo()===o&&Un(e),s!==null&&(s.setCachedNodes(null),ae(s)&&(s._cachedIsBackward=null),s.dirty=!0)))}}function $s(t,e,n){return new Yz(t,e,n)}function ry(t,e){let n=e.__key,i=t.offset,r="element";if(le(e)){r="text";const s=e.getTextContentSize();i>s&&(i=s)}else if(!W(e)){const s=e.getNextSibling();if(le(s))n=s.__key,i=0,r="text";else{const o=e.getParent();o&&(n=o.__key,i=e.getIndexWithinParent()+1)}}t.set(n,i,r)}function lT(t,e){if(W(e)){const n=e.getLastDescendant();W(n)||le(n)?ry(t,n):ry(t,e)}else ry(t,e)}class x1{constructor(e){se(this,"_nodes");se(this,"_cachedNodes");se(this,"dirty");this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!Ct(e))return!1;const n=this._nodes,i=e._nodes;return n.size===i.size&&Array.from(n).every(r=>i.has(r))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new x1(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){const n=this.getNodes().filter(o=>yi(o)===null),i=n.length;if(i===0)return;const r=n[i-1];let s;if(le(r))s=r.select();else{const o=r.getIndexWithinParent()+1;s=r.getParentOrThrow().select(o,o)}s.insertNodes(e);for(let o=0;o<i;o++)n[o].remove()}getNodes(){const e=this._cachedNodes;if(e!==null)return e;const n=this._nodes,i=[];for(const r of n){const s=st(r);s!==null&&i.push(s)}return fu()||(this._cachedNodes=i),i}getTextContent(){const e=this.getNodes();let n="";for(let i=0;i<e.length;i++)n+=e[i].getTextContent();return n}deleteNodes(){const e=this.getNodes().filter(n=>yi(n)===null);if((me()||ha())===this&&e[0]){const n=Rt(e[0],"next");vu(ns(n,n))}for(const n of e)n.remove();q6()}}function q6(){const t=pt();if(t.isEmpty()){const e=ut();t.append(e),e.select()}}function ae(t){return t instanceof Nu}class Nu{constructor(e,n,i,r){se(this,"format");se(this,"style");se(this,"anchor");se(this,"focus");se(this,"_cachedNodes");se(this,"_cachedIsBackward");se(this,"dirty");this.anchor=e,this.focus=n,e._selection=this,n._selection=this,this._cachedNodes=null,this._cachedIsBackward=null,this.format=i,this.style=r,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!ae(e)&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const e=this._cachedNodes;if(e!==null)return e;const n=(function(i){const r=[],[s,o]=i.getTextSlices();s&&r.push(s.caret.origin);const a=new Set,l=new Set;for(const u of i)if(ur(u)){const{origin:c}=u;r.length===0?a.add(c):(l.add(c),r.push(c))}else{const{origin:c}=u;W(c)&&l.has(c)||r.push(c)}if(o&&r.push(o.caret.origin),po(i.focus)&&W(i.focus.origin)&&i.focus.getNodeAtCaret()===null)for(let u=Ii(i.focus.origin,"previous");ur(u)&&a.has(u.origin)&&!u.origin.isEmpty()&&u.origin.is(r[r.length-1]);u=yu(u))a.delete(u.origin),r.pop();for(;r.length>1;){const u=r[r.length-1];if(!W(u)||l.has(u)||u.isEmpty()||a.has(u))break;r.pop()}if(r.length===0&&i.isCollapsed()){const u=vi(i.anchor),c=vi(i.anchor.getFlipped()),h=p=>Ar(p)?p.origin:p.getNodeAtCaret(),f=h(u)||h(c)||(i.anchor.getNodeAtCaret()?u.origin:c.origin);r.push(f)}return r})(A1(V0(this),"next"));return fu()||(this._cachedNodes=n),n}setTextNodeRange(e,n,i,r){return this.anchor.set(e.__key,n,"text"),this.focus.set(i.__key,r,"text"),this}getTextContent(){const e=this.getNodes();if(e.length===0)return"";const n=e[0],i=e[e.length-1],r=this.anchor,s=this.focus,o=r.isBefore(s),[a,l]=P0(this);let u="",c=!0;for(let h=0;h<e.length;h++){const f=e[h];if(W(f)&&!f.isInline()){c||(u+=`
|
|
28
|
+
`);let p="";for(const m of Pr(f)){const g=Jo(f,m);g!==null&&(p+=g.getTextContent())}p!==""?(u+=p,c=!1):c=!f.isEmpty()}else if(c=!1,le(f)){let p=f.getTextContent();f===n?f===i?r.type==="element"&&s.type==="element"&&s.offset!==r.offset||(p=a<l?p.slice(a,l):p.slice(l,a)):p=o?p.slice(a):p.slice(l):f===i&&(p=o?p.slice(0,l):p.slice(0,a)),u+=p}else!ht(f)&&!Gn(f)||f===i&&this.isCollapsed()||(u+=f.getTextContent())}return u}applyDOMRange(e){const n=Dt(),i=n.getEditorState()._selection,r=r4(e.startContainer,e.startOffset,e.endContainer,e.endOffset,n,i);if(r===null)return;const[s,o,a]=r;this.anchor.set(s.key,s.offset,s.type,!0),this.focus.set(o.key,o.offset,o.type,!0),a&&(this.dirty=!0),Cs(this)}clone(){const e=this.anchor,n=this.focus;return new Nu($s(e.key,e.offset,e.type),$s(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(e){this.format=tl(this.format,e,null),this.dirty=!0}setFormat(e){this.format=e,this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){const n=ei[e];return(this.format&n)!==0}insertRawText(e){this.insertNodes(th(e))}insertText(e){const n=this.anchor,i=this.focus,r=this.format,s=this.style;let o=n,a=i;!this.isCollapsed()&&i.isBefore(n)&&(o=i,a=n),o.type==="element"&&(function(x,y,S,_){const k=x.getNode(),w=k.getChildAtIndex(x.offset),b=Vt();if(b.setFormat(S),b.setStyle(_),Qu(w))w.splice(0,0,[b]);else if(w!==null){const E=It(k)?ut().append(b):b;w.insertBefore(E)}else if(It(k)){const E=k.getLastChild();W(E)&&!E.isInline()&&E.isEmpty()?E.append(b):k.append(ut().append(b))}else k.append(b);x.is(y)&&y.set(b.__key,0,"text"),x.set(b.__key,0,"text")})(o,a,r,s),a.type==="element"&&ta(a,vi(bi(a,"next")));const l=o.offset;let u=a.offset;const c=this.getNodes(),h=c.length;let f=c[0];le(f)||de(26);const p=f.getTextContent().length,m=f.getParentOrThrow();let g=c[h-1];if(h===1&&a.type==="element"&&(u=p,a.set(o.key,u,"text")),this.isCollapsed()&&l===p&&(rr(f)||!f.canInsertTextAfter()||!m.canInsertTextAfter()&&f.getNextSibling()===null)){const x=f.getNextSibling();let y;if(le(x)&&x.canInsertTextBefore()&&!rr(x)?y=x:(y=Vt(),y.setFormat(r),y.setStyle(s),m.canInsertTextAfter()?f.insertAfter(y):m.insertAfter(y)),y.select(0,0),f=y,e!=="")return void this.insertText(e)}else if(this.isCollapsed()&&l===0&&(rr(f)||!f.canInsertTextBefore()||!m.canInsertTextBefore()&&f.getPreviousSibling()===null)){const x=f.getPreviousSibling();let y;if(!le(x)||rr(x)?(y=Vt(),y.setFormat(r),m.canInsertTextBefore()?f.insertBefore(y):m.insertBefore(y)):y=x,y.select(),f=y,e!=="")return void this.insertText(e)}else if(f.isSegmented()&&l!==p)if(Vo()!==null)f=f.setMode("normal").setFormat(r).setStyle(s);else{const x=Vt(f.getTextContent());x.setFormat(r),f.replace(x),f=x}else if(!this.isCollapsed()&&e!==""){const x=g.getParent();if(!m.canInsertTextBefore()||!m.canInsertTextAfter()||W(x)&&(!x.canInsertTextBefore()||!x.canInsertTextAfter()))return this.insertText(""),t4(this.anchor,this.focus),void this.insertText(e)}if(h===1){if(Ha(f)){const _=Vt(e);return _.select(),void f.replace(_)}const x=f.getFormat(),y=f.getStyle();if(l!==u||x===r&&y===s){if(Ja(f)){const _=Vt(e);return _.setFormat(r),_.setStyle(s),_.select(),void f.replace(_)}}else{if(f.getTextContent()!==""){const _=Vt(e);if(_.setFormat(r),_.setStyle(s),_.select(),l===0)f.insertBefore(_,!1);else{const[k]=f.splitText(l);k.insertAfter(_,!1)}return void(_.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length,this._cachedNodes=null,this._cachedIsBackward=null))}f.setFormat(r),f.setStyle(s)}const S=u-l;f=f.spliceText(l,S,e,!0),f.getTextContent()===""?f.remove():this.anchor.type==="text"&&(this.format=x,this.style=y,f.isComposing()&&(this.anchor.offset-=e.length,this._cachedNodes=null,this._cachedIsBackward=null))}else{const x=new Set([...f.getParentKeys(),...g.getParentKeys()]),y=W(f)?f:f.getParentOrThrow();let S=W(g)?g:g.getParentOrThrow(),_=g;if(!y.is(S)&&S.isInline())do _=S,S=S.getParentOrThrow();while(S.isInline());if(a.type==="text"&&(u!==0||g.getTextContent()==="")||a.type==="element"&&g.getIndexWithinParent()<u)if(le(g)&&!Ha(g)&&u!==g.getTextContentSize()){if(g.isSegmented()){const P=Vt(g.getTextContent());g.replace(P),g=P}xn(a.getNode())||a.type!=="text"||(le(g)||de(395),g=g.spliceText(0,u,"")),x.add(g.__key)}else{const P=g.getParentOrThrow();P.canBeEmpty()||P.getChildrenSize()!==1?g.remove():P.remove()}else x.add(g.__key);const k=S.getChildren(),w=new Set(c),b=y.is(S),E=y.isInline()&&f.getNextSibling()===null?y:f;for(let P=k.length-1;P>=0;P--){const $=k[P];if($.is(f)||W($)&&$.isParentOf(f))break;$.isAttached()&&(!w.has($)||$.is(_)?b||E.insertAfter($,!1):$.remove())}if(!b){let P=S,$=null;for(;P!==null;){const B=P.getChildren(),X=B.length;(X===0||B[X-1].is($))&&(x.delete(P.__key),$=P),P=P.getParent()}}if(Ha(f))if(l===p)f.select();else{const P=Vt(e);P.select(),f.replace(P)}else f=f.spliceText(l,p-l,e,!0),f.getTextContent()===""?f.remove():this.anchor.type==="text"&&(this.format=f.getFormat(),this.style=f.getStyle(),f.isComposing()&&(this.anchor.offset-=e.length,this._cachedNodes=null,this._cachedIsBackward=null));for(let P=1;P<h;P++){const $=c[P],B=$.__key;x.has(B)||$.remove()}}}removeText(){const e=me()===this;sd(this,K4(V0(this))),e&&me()!==this&&yn(this)}formatText(e,n=null){FC(this,e,n)}insertNodes(e){if(e.length===0)return;this.isCollapsed()||this.removeText();const n=this.anchor.getNode();if(this.anchor.type==="element"&&W(n)&&yi(n)!==null){let g=n.isShadowRoot()?n.getFirstChild()??n.append(ut()).getFirstChild():n.getFirstChild();if(n.isShadowRoot()&&g!==null&&!W(g)){const x=ut();g.insertBefore(x),g=x}if(g!==null){g.selectStart();const x=me();return ae(x)||de(369),x.insertNodes(e)}}if(this.anchor.type==="element"&&It(n)){const g=oy(e),x=g.getLastDescendant();return n.splice(this.anchor.offset,0,g.getChildren()),void(x!==null&&x.selectEnd())}let i=(this.isBackward()?this.focus:this.anchor).getNode(),r=Lt(i,ti);const s=e[e.length-1];if(W(r)&&"__language"in r){if("__language"in e[0])this.insertText(e[0].getTextContent());else{const g=Cf(this);r.splice(g,0,e),s.selectEnd()}return}if(!e.some(g=>(W(g)||ht(g))&&!g.isInline())){W(r)||de(211,i.constructor.name,i.getType());const g=Cf(this);return r.splice(g,0,e),void s.selectEnd()}if(W(r)&&yi(r)!==null){const g=Cf(this),x=Gb(e);r.splice(g,0,x);const y=x[x.length-1];return void(y!==void 0?y.selectEnd():r.select(g,g))}if(r===null){const g=oy(e),x=g.getLastDescendant();let y=bi(this.anchor,"next");for(const S of g.getChildren())y=Hp(S,y);return void(x!==null&&x.selectEnd())}if(W(r)&&!r.isParentRequired()&&!It(r.getParentOrThrow())){const g=Cf(this),x=Gb(e);r.splice(g,0,x);const y=x[x.length-1];return void(y!==void 0?y.selectEnd():r.select(g,g))}const o=oy(e),a=o.getLastDescendant(),l=o.getChildren(),u=!W(r)||!r.isEmpty()?this.insertParagraph():null;u&&!r.isAttached()&&(i=this.anchor.getNode(),r=Lt(i,ti));const c=l[l.length-1];let h=l[0];var f;W(f=h)&&ti(f)&&!f.isEmpty()&&W(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(W(r)||de(211,i.constructor.name,i.getType()),r.append(...h.getChildren()),h=l[1]),h&&(r===null&&de(212,i.constructor.name,i.getType()),(function(g,x){const y=x.getParentOrThrow().getLastChild();let S=x;const _=[x];for(;S!==y;)S.getNextSibling()||de(140),S=S.getNextSibling(),_.push(S);let k=g;for(const w of _)k=k.insertAfter(w)})(r,h));const p=Lt(a,ti);u&&W(p)&&(u.canMergeWhenEmpty()||ti(c))&&(p.append(...u.getChildren()),u.remove()),W(r)&&r.isEmpty()&&r.remove(),a.selectEnd();const m=W(r)?r.getLastChild():null;Gn(m)&&p!==r&&m.remove()}insertParagraph(){const e=this.anchor.getNode();if(this.anchor.type==="element"&&It(e)){const a=ut();return e.splice(this.anchor.offset,0,[a]),a.select(),a}const n=Cf(this),i=Lt(this.anchor.getNode(),ti);if(i!==null&&yi(i)!==null)return null;W(i)||de(213);const r=i.getChildAtIndex(n),s=r?[r,...r.getNextSiblings()]:[],o=i.insertNewAfter(this,!1);return o?(o.append(...s),o.selectStart(),o):null}insertLineBreak(e){const n=Xi();if(this.insertNodes([n]),e){const i=n.getParentOrThrow(),r=n.getIndexWithinParent();i.select(r,r)}}extract(){const e=[...this.getNodes()],n=e.length;let i=e[0],r=e[n-1];const[s,o]=P0(this),a=this.isBackward(),[l,u]=a?[this.focus,this.anchor]:[this.anchor,this.focus],[c,h]=a?[o,s]:[s,o];if(n===0)return[];if(n===1){if(le(i)&&!this.isCollapsed()){const f=i.splitText(c,h),p=c===0?f[0]:f[1];return p?(l.set(p.getKey(),0,"text"),u.set(p.getKey(),p.getTextContentSize(),"text"),[p]):[]}return[i]}if(le(i)&&(c===i.getTextContentSize()?e.shift():c!==0&&([,i]=i.splitText(c),e[0]=i,l.set(i.getKey(),0,"text"))),le(r)){const f=r.getTextContent().length;h===0?e.pop():h!==f&&([r]=r.splitText(h),e[e.length-1]=r,u.set(r.getKey(),r.getTextContentSize(),"text"))}return e}modify(e,n,i){if(I0(this,e,n,i))return;const r=e==="move",s=Dt(),o=Mi(pr(s));if(!o)return;const a=s._blockCursorElement,l=s._rootElement,u=this.focus.getNode();l===null||a===null||!W(u)||u.isInline()||u.canBeEmpty()||L0(a,s,l);const c=nh(s,this.focus.key);let h=c;if(this.focus.type==="text"&&(h=le(u)?Zo(u,c,s):null),this.dirty){const f=nh(s,this.anchor.key);let p=f;if(this.anchor.type==="text"){const m=this.anchor.getNode();p=le(m)?Zo(m,f,s):null}p&&h&&$0(o,p,this.anchor.offset,h,this.focus.offset)}if(i==="character"&&le(u)&&u.isUnmergeable()&&(n?this.focus.offset===0:this.focus.offset===u.getTextContentSize())){const f=Rt(u,n?"previous":"next").getNodeAtCaret();if(le(f)){if(!r){const p=f.getTextContentSize();return n?this.focus.set(f.__key,p-1,"text"):this.focus.set(f.__key,1,"text"),void(this.dirty=!0)}{const p=s.getElementByKey(f.getKey()),m=p?Zo(f,p,s):null;if(m){const g=n?m.length:0;$0(o,m,g,m,g)}}}}if(J6(o,e,n?"backward":"forward",i),o.rangeCount>0){const f=jh(o,s._rootElement),p=f||o.getRangeAt(0),m=this.anchor.getNode(),g=xn(m)?m:iw(m);this.applyDOMRange(p),this.dirty=!0,!r&&(e4(this,n,g),(f?o.direction!=="backward":o.anchorNode===p.startContainer&&o.anchorOffset===p.startOffset)||K6(this))}i==="lineboundary"&&I0(this,e,n,i,"decorators")}forwardDeletion(e,n,i){if(!i&&(e.type==="element"&&W(n)&&e.offset===n.getChildrenSize()||e.type==="text"&&e.offset===n.getTextContentSize())){const r=n.getParent(),s=n.getNextSibling()||(r===null?null:r.getNextSibling());if(W(s)&&s.isShadowRoot())return!0}return!1}deleteCharacter(e){const n=this.isCollapsed();if(this.isCollapsed()){const i=this.anchor;let r=i.getNode();if(this.forwardDeletion(i,r,e))return;const s=Wp(bi(i,e?"previous":"next"));if(s.getTextSlices().every(a=>a===null||a.distance===0)){let a={type:"initial"};for(const l of s.iterNodeCarets("shadowRoot"))if(ur(l)){if(!l.origin.isInline()){if(l.origin.isShadowRoot()){if(a.type==="merge-block")break;if(W(s.anchor.origin)&&s.anchor.origin.isEmpty()){const u=vi(l);sd(this,ns(u,u)),s.anchor.origin.remove()}return}a.type!=="merge-next-block"&&a.type!=="merge-block"||(a={block:a.block,caret:l,type:"merge-block"})}}else{if(a.type==="merge-block")break;if(po(l)){if(W(l.origin)){if(l.origin.isInline()){if(!l.origin.isParentOf(s.anchor.origin))break}else a={block:l.origin,type:"merge-next-block"};continue}if(ht(l.origin)){if(!l.origin.isIsolated())if(Pr(l.origin).length>0){if(W(s.anchor.origin)&&s.anchor.origin.isEmpty()){s.anchor.origin.remove();const u=eh();u.add(l.origin.getKey()),yn(u)}}else if(a.type==="merge-next-block"&&(l.origin.isKeyboardSelectable()||!l.origin.isInline())&&W(s.anchor.origin)&&s.anchor.origin.isEmpty()){s.anchor.origin.remove();const u=eh();u.add(l.origin.getKey()),yn(u)}else l.origin.remove();return}break}}if(a.type==="merge-block"){const{caret:l,block:u}=a;return Pr(u).length>0?void 0:l.origin.isEmpty()&&!u.isEmpty()&&l.origin.getParent()===u.getParent()?void l.origin.remove(!0):(sd(this,ns(!l.origin.isEmpty()&&u.isEmpty()?ga(Rt(u,l.direction)):s.anchor,l)),this.removeText())}for(let l=i.getNode();l!==null;){if(yi(l)!==null)return;if(W(l)&&l.isShadowRoot())break;l=l.getParent()}}const o=this.focus;if(sy(this,e,"character"),this.isCollapsed()){if(e&&i.offset===0&&cT(this,i.getNode()))return}else{const a=o.type==="text"?o.getNode():null;if(r=i.type==="text"?i.getNode():null,a!==null&&a.isSegmented()){const l=o.offset,u=a.getTextContentSize();if(a.is(r)||e&&l!==u||!e&&l!==0)return void hT(a,e,l)}else if(r!==null&&r.isSegmented()){const l=i.offset,u=r.getTextContentSize();if(r.is(a)||e&&l!==0||!e&&l!==u)return void hT(r,e,l)}(function(l,u){const c=l.anchor,h=l.focus,f=c.getNode(),p=h.getNode();if(f===p&&c.type==="text"&&h.type==="text"){const m=c.offset,g=h.offset,x=m<g,y=x?m:g,S=x?g:m,_=S-1;y!==_&&(function(k){return!(C4(k)||Gz(k))})(f.getTextContent().slice(y,S))&&(u?h.set(h.key,_,h.type):c.set(c.key,_,c.type))}})(this,e)}}if(this.removeText(),e&&!n&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const i=this.anchor.getNode();i.isEmpty()&&xn(i.getParent())&&i.getPreviousSibling()===null&&cT(this,i),q6()}}deleteLine(e){const n=Yb(this.anchor);if(n!==null&&ht(Yr(n)))return this.isCollapsed()||this.focus.set(this.anchor.key,this.anchor.offset,this.anchor.type),void this.deleteCharacter(e);this.isCollapsed()&&sy(this,e,"lineboundary"),this.isCollapsed()?this.deleteCharacter(e):Lt(this.anchor.getNode(),ti)!==Lt(this.focus.getNode(),ti)?(this.focus.set(this.anchor.key,this.anchor.offset,this.anchor.type),this.deleteCharacter(e)):this.removeText()}deleteWord(e){if(this.isCollapsed()){const n=this.anchor,i=n.getNode();if(this.forwardDeletion(n,i,e))return;sy(this,e,"word")}this.isCollapsed()?this.deleteCharacter(e):this.removeText()}isBackward(){const e=this._cachedIsBackward;if(e!==null)return e;const n=this.focus.isBefore(this.anchor);return fu()||(this._cachedIsBackward=n),n}getStartEndPoints(){return[this.anchor,this.focus]}}function Ct(t){return t instanceof x1}function Y6(t,e){if(Ct(t)){for(const y of t.getNodes())T0(y)&&y.setFormat(e(y.getFormat()));return}if(t.isCollapsed())return t.setFormat(e(t.format)),void Un(null);const n=[];for(const y of t.getNodes())le(y)?n.push(y):W(y)?y.setTextFormat(e(y.getTextFormat())):T0(y)&&y.setFormat(e(y.getFormat()));const i=n.length;if(i===0)return t.setFormat(e(t.format)),void Un(null);const r=t.anchor,s=t.focus,o=t.isBackward(),a=o?s:r,l=o?r:s;let u=0,c=n[0],h=a.type==="element"?0:a.offset;if(a.type==="text"&&h===c.getTextContentSize()&&(u=1,c=n[1],h=0),c==null)return;const f=i-1;let p=n[f];const m=l.type==="text"?l.offset:p.getTextContentSize();if(c.is(p)){if(h===m)return;const y=e(c.getFormat());if(rr(c)||h===0&&m===c.getTextContentSize())c.setFormat(y);else{const S=c.splitText(h,m),_=h===0?S[0]:S[1];_.setFormat(y),a.type==="text"&&a.set(_.__key,0,"text"),l.type==="text"&&l.set(_.__key,m-h,"text")}return void(t.format=y)}h===0||rr(c)||([,c]=c.splitText(h),h=0);const g=e(c.getFormat());c.setFormat(g);const x=e(p.getFormat());m>0&&(m===p.getTextContentSize()||rr(p)||([p]=p.splitText(m)),p.setFormat(x));for(let y=u+1;y<f;y++){const S=n[y];S.setFormat(e(S.getFormat()))}a.type==="text"&&a.set(c.__key,h,"text"),l.type==="text"&&l.set(p.__key,m,"text"),t.format=g|x}function G6(t,e){const n=[];for(const[i,r]of Object.entries(e))typeof r=="boolean"&&n.push([i,r]);n.length!==0&&Y6(t,i=>{for(const[r,s]of n)i=tl(i,r,s?ei[r]:0);return i})}function FC(t,e,n=null){const i=n===null&&ae(t)?tl(t.format,e,null):n;Y6(t,r=>tl(r,e,i))}function uT(t){const e=t.offset;if(t.type==="text")return e;const n=t.getNode();return e===n.getChildrenSize()?n.getTextContent().length:0}function P0(t){const e=t.getStartEndPoints();if(e===null)return[0,0];const[n,i]=e;return n.type==="element"&&i.type==="element"&&n.key===i.key&&n.offset===i.offset?[0,0]:[uT(n),uT(i)]}function cT(t,e){for(let n=e;n;n=n.getParent()){if(W(n)){if(n.collapseAtStart(t))return!0;if(It(n))break}if(n.getPreviousSibling())break}return!1}function K6(t){const e=t.focus,n=t.anchor,i=n.key,r=n.offset,s=n.type;n.set(e.key,e.offset,e.type,!0),e.set(i,r,s,!0)}function J6(t,e,n,i){t.modify(e,n,i)}function e4(t,e,n){const i=t.getNodes(),r=i.filter(a=>pu(a,n));if(r.length===0||r.length===i.length)return!1;const s=e?r[0]:r[r.length-1],o=W(s)?s:s.getParentOrThrow();return e?o.selectStart():o.selectEnd(),!0}function sy(t,e,n){if(I0(t,"extend",e,n))return;const i=Dt(),r=Mi(pr(i));if(!r||typeof r.modify!="function")return;const s=i._blockCursorElement,o=i._rootElement,a=t.anchor,l=t.focus.getNode();o===null||s===null||!W(l)||l.isInline()||l.canBeEmpty()||L0(s,i,o);const u=$=>{const B=$.getNode(),X=i.getElementByKey($.key);return X!==null&&$.type==="text"&&le(B)?Zo(B,X,i):X},c=a.getNode(),h=u(a);if(h===null)return;const f=a.offset,p=t.isCollapsed(),m=t.focus,g=p?h:u(m);if(g===null)return;const x=m.offset;if($0(r,g,x,g,x),J6(r,"move",e?"backward":"forward",n),r.rangeCount===0)return;const y=jh(r,o)||r.getRangeAt(0),S=y.startContainer,_=y.startOffset;if(p&&n==="character"&&a.type==="text"&&le(c)&&c.isUnmergeable()&&f===(e?0:c.getTextContentSize())){const $=Rt(c,e?"previous":"next").getNodeAtCaret();if(le($)){const B=e?$.getTextContentSize()-1:1;return t.focus.set($.__key,B,"text"),void(t.dirty=!0)}}if(p&&n==="character"&&a.type==="text"){const $=e?0:c.getTextContentSize(),B=S===h?_:f!==$?$:-1;if(B>=0)return void(B!==f&&(t.focus.set(a.key,B,"text"),t.dirty=!0))}const[k,w,b,E]=e?[S,_,h,f]:[h,f,S,_],P=xn(c)?c:iw(c);t.applyDOMRange({collapsed:!1,endContainer:b,endOffset:E,startContainer:k,startOffset:w}),t.dirty=!0,!e4(t,e,P)&&e&&K6(t),n==="lineboundary"&&I0(t,"extend",e,n,"decorators")}const Gz=(()=>{try{const t=new RegExp("\\p{Emoji}","u"),e=t.test.bind(t);if(e("❤️")&&e("#️⃣")&&e("👍"))return e}catch{}return()=>!1})();function hT(t,e,n){const i=t,r=i.getTextContent().split(/(?=\s)/g),s=r.length;let o=0,a=0;for(let u=0;u<s;u++){const c=u===s-1;if(a=o,o+=r[u].length,e&&o===n||o>n||c){r.splice(u,1),c&&(a=void 0);break}}const l=r.join("").trim();l===""?i.remove():(i.setTextContent(l),i.select(a,a))}function fT(t,e,n,i){let r,s=e,o=!1;if(Je(t)){let a=!1;const l=t.childNodes,u=l.length,c=i._blockCursorElement;s===u&&u>0&&(a=!0,s=u-1),Fh(t,i)!==void 0||Nd(t,i)||(o=!0);let h=l[s],f=!1;if(h===c)h=l[s+1],f=!0;else if(c!==null){const p=c.parentNode;t===p&&e>Array.prototype.indexOf.call(p.children,c)&&s--}if(r=vc(h),le(r))s=Ts(r,a?"next":"previous");else{let p=vc(t);if(p===null)return null;if(W(p)){const m=i.getElementByKey(p.getKey());m===null&&de(214),[p,s]=Ir(p,m,i).resolveChildIndex(p,m,t,e),W(p)||de(215),a&&s>=p.getChildrenSize()&&(s=Math.max(0,p.getChildrenSize()-1));let x=p.getChildAtIndex(s);if(W(x)&&(function(y,S,_){const k=y.getParent();return _===null||k===null||!k.canBeEmpty()||k!==_.getNode()})(x,0,n)){const y=a?x.getLastDescendant():x.getFirstDescendant();y===null?p=x:(x=y,p=W(x)?x:x.getParentOrThrow()),s=0}le(x)?(r=x,p=null,s=Ts(x,a?"next":"previous")):x!==p&&a&&!f&&(W(p)||de(216),s=Math.min(p.getChildrenSize(),s+1))}else{const m=Yr(p),g=m!==null?m:p,x=g.getIndexWithinParent(),y=i.getElementByKey(p.getKey());let S="after";if(y!==null&&vc(t)===p){const _=Ir(p,y,i);_.element!==y?S=_.resolveLeafPosition(y,t,e):e===0&&ht(p)&&(S="before")}s=S==="before"?x:x+1,p=g.getParentOrThrow()}if(W(p))return[$s(p.__key,s,"element"),o]}}else r=vc(t);return le(r)?[$s(r.__key,Ts(r,s,"clamp"),"text"),o]:null}function dT(t,e,n){const i=t.offset,r=t.getNode();if(i===0){const s=r.getPreviousSibling(),o=r.getParent();if(e){if((n||!e)&&s===null&&W(o)&&o.isInline()){const a=o.getPreviousSibling();le(a)&&t.set(a.__key,a.getTextContent().length,"text")}}else W(s)&&!n&&s.isInline()?t.set(s.__key,s.getChildrenSize(),"element"):le(s)&&!r.isUnmergeable()&&t.set(s.__key,s.getTextContent().length,"text")}else if(i===r.getTextContent().length){const s=r.getNextSibling(),o=r.getParent();if(e&&W(s)&&s.isInline())t.set(s.__key,0,"element");else if((n||e)&&s===null&&W(o)&&o.isInline()&&!o.canInsertTextAfter()&&o.getTextContentSize()>1){const a=o.getNextSibling();le(a)&&t.set(a.__key,0,"text")}}}function t4(t,e,n){if(t.type==="text"&&e.type==="text"){const i=t.isBefore(e),r=t.is(e);dT(t,i,r),dT(e,!i,r),r&&e.set(t.key,t.offset,t.type)}}function Yb(t){const e=st(t.key);return e===null?null:Xp(e)}function n4(t,e,n){const i=Yb(t),r=Yb(e);if(i===r||i!==null&&r!==null&&i.is(r))return!1;const s=n(i,r);if(i!==null)return W(i)?e.set(i.getKey(),s?i.getChildrenSize():0,"element"):e.set(i.getKey(),s?i.getTextContentSize():0,"text"),!0;const o=Yr(r);if(o===null)return!1;const a=o.getParent();if(a===null)return!1;const l=o.getIndexWithinParent();return e.set(a.getKey(),s?l+1:l,"element"),!0}function i4(t){const e=n4(t.anchor,t.focus,(n,i)=>(function(r,s,o,a){if(o!==null&&a!==null){const c=Yr(o),h=Yr(a);if(c!==null&&c.is(h)){for(const f of E1(c).values()){if(f===o.getKey())return!0;if(f===a.getKey())return!1}return!0}return c===null||h===null||c.isBefore(h)}if(o!==null){const c=Yr(o),h=st(s.key);return c===null||h===null||!(!c.is(h)&&!c.isParentOf(h))||c.isBefore(h)}const l=Yr(a),u=st(r.key);return l!==null&&u!==null&&!l.is(u)&&!l.isParentOf(u)&&u.isBefore(l)})(t.anchor,t.focus,n,i));return e&&(t.dirty=!0),e}function r4(t,e,n,i,r,s){if(t===null||n===null||!Vh(r,t,n))return null;const o=fT(t,e,ae(s)?s.anchor:null,r);if(o===null)return null;const a=fT(n,i,ae(s)?s.focus:null,r);if(a===null)return null;const[l,u]=o,[c,h]=a;if(l.type==="element"&&c.type==="element"){const p=vc(t),m=vc(n);if(ht(p)&&ht(m))return null}const f=r._slotsUsed&&n4(l,c,()=>(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)!==0);return t4(l,c),[l,c,u||h||f]}function el(t){return W(t)&&!t.isInline()}function s4(t,e,n,i,r,s){const o=vo(),a=new Nu($s(t,e,r),$s(n,i,s),0,"");return a.dirty=!0,o._selection=a,a}function Lu(){const t=$s("root",0,"element"),e=$s("root",0,"element");return new Nu(t,e,0,"")}function eh(){return new x1(new Set)}function Kz(t,e){return y1(null,t,e,null)}function y1(t,e,n,i){const r=n._window;if(r===null)return null;const s=i||r.event,o=s?s.type:void 0,a=o==="selectionchange",l=!Nb&&(a||o==="beforeinput"||o==="compositionstart"||o==="compositionend"||o==="click"&&s&&s.detail===3||o==="drop"||o===void 0);let u,c,h,f;if(ae(t)&&!l)return t.clone();{if(e===null)return null;const k=$r(e,n._rootElement);if(u=k.anchorNode,c=k.focusNode,h=k.anchorOffset,f=k.focusOffset,(a||o===void 0)&&ae(t)&&!Vh(n,u,c))return t.clone()}const p=r4(u,h,c,f,n,t);if(p===null)return null;const[m,g,x]=p;let y=0,S="";if(ae(t)){const k=t.anchor;if(m.key===k.key)y=t.format,S=t.style;else{const w=m.getNode();le(w)?(y=w.getFormat(),S=w.getStyle()):W(w)&&(y=w.getTextFormat(),S=w.getTextStyle())}}const _=new Nu(m,g,y,S);return x&&(_.dirty=!0),_}function me(){return vo()._selection}function ha(){return Dt()._editorState._selection}function Fl(t,e,n,i=1){const r=t.anchor,s=t.focus,o=r.getNode(),a=s.getNode();if(!e.is(o)&&!e.is(a))return;const l=e.__key;if(t.isCollapsed()){const u=r.offset;if(n<=u&&i>0||n<u&&i<0){const c=Math.max(0,u+i);r.set(l,c,"element"),s.set(l,c,"element"),pT(t)}}else{const u=t.isBackward(),c=u?s:r,h=c.getNode(),f=u?r:s,p=f.getNode();if(e.is(h)){const m=c.offset;(n<=m&&i>0||n<m&&i<0)&&c.set(l,Math.max(0,m+i),"element")}if(e.is(p)){const m=f.offset;(n<=m&&i>0||n<m&&i<0)&&f.set(l,Math.max(0,m+i),"element")}}pT(t)}function pT(t){const e=t.anchor,n=e.offset,i=t.focus,r=i.offset,s=e.getNode(),o=i.getNode();if(t.isCollapsed()){if(!W(s))return;const a=s.getChildrenSize(),l=n>=a,u=l?s.getChildAtIndex(a-1):s.getChildAtIndex(n);if(le(u)){let c=0;l&&(c=u.getTextContentSize()),e.set(u.__key,c,"text"),i.set(u.__key,c,"text")}return}if(W(s)){const a=s.getChildrenSize(),l=n>=a,u=l?s.getChildAtIndex(a-1):s.getChildAtIndex(n);if(le(u)){let c=0;l&&(c=u.getTextContentSize()),e.set(u.__key,c,"text")}}if(W(o)){const a=o.getChildrenSize(),l=r>=a,u=l?o.getChildAtIndex(a-1):o.getChildAtIndex(r);if(le(u)){let c=0;l&&(c=u.getTextContentSize()),i.set(u.__key,c,"text")}}}function A0(t,e,n,i,r){let s=null,o=0,a=null;i!==null?(s=i.__key,le(i)?(o=i.getTextContentSize(),a="text"):W(i)&&(o=i.getChildrenSize(),a="element")):r!==null&&(s=r.__key,le(r)?a="text":W(r)&&(a="element")),s!==null&&a!==null?t.set(s,o,a):(o=e.getIndexWithinParent(),o===-1&&(o=n.getChildrenSize()),t.set(n.__key,o,"element"))}function mT(t,e,n,i,r){t.type==="text"?t.set(n,t.offset+(e?0:r),"text"):t.offset>i.getIndexWithinParent()&&t.set(t.key,t.offset-1,"element")}function $0(t,e,n,i,r){try{t.setBaseAndExtent(e,n,i,r)}catch{}}function gT(t,e,n){const i=nh(t,e.getKey());if(W(e)){const r=Ir(e,i,t);return[r.element,n+r.getFirstChildOffset()]}return[i,n]}function o4(t,e,n,i,r,s){const o=s.getRootNode(),a=vl(o)||fo(o)?mu(o):null;if(r.has(DC)&&a!==s||a!==null&&Fp(a,a))return;const l=$r(i,s);let u;if(!ae(e))return void(t!==null&&Vh(n,l.anchorNode,l.focusNode)&&i.removeAllRanges());const c=e.anchor,h=e.focus,f=c.getNode(),p=h.getNode(),[m,g]=gT(n,f,c.offset),[x,y]=gT(n,p,h.offset),S=e.format,_=e.style,k=e.isCollapsed();let w=m,b=x,E=!1;if(c.type==="text"?(w=le(f)?Zo(f,m,n):null,E=f.getFormat()!==S||f.getStyle()!==_):ae(t)&&t.anchor.type==="text"&&(E=!0),h.type==="text"&&(b=le(p)?Zo(p,x,n):null),w!==null&&b!==null){if(k&&(t===null||E||ae(t)&&(t.format!==S||t.style!==_))&&(function(P,$,B,X,j,Z){P._inputState.collapsedSelectionFormat={format:$,key:j,offset:X,style:B,timeStamp:Z}})(n,S,_,g,c.key,performance.now()),(i.type!=="Range"||!k)&&l.anchorOffset===g&&l.focusOffset===y&&l.anchorNode===w&&l.focusNode===b){if(a===null||!s.contains(a)){const P=a!==null?Wa(a):null;P!==null&&P!==n||r.has(Ad)||s.focus({preventScroll:!0})}if(c.type!=="element")return}if($0(i,w,g,b,y),ho&&e.isCollapsed()&&s!==null&&!r.has(Ad)){const P=ih(s);if(P===null||!s.contains(P)){const $=mu(s.ownerDocument),B=$!==null?Wa($):null;B!==null&&B!==n||s.focus({preventScroll:!0})}}if(!r.has(X6)&&e.isCollapsed()&&s!==null&&s===ih(s)){const P=ae(e)&&e.anchor.type==="element"?w.childNodes[g]||null:(u===void 0&&(u=N4(i,s)),u);if(P!==null){let $;if(Hi(P)){const B=P.ownerDocument.createRange();B.selectNode(P),$=B.getBoundingClientRect()}else $=P.getBoundingClientRect();(function(B,X,j){const Z=_1(j),G=nw(Z);if(Z===null||G===null)return;const z=j.getBoundingClientRect();if(X.bottom<z.top)return;let{top:J,bottom:ue}=X,Le=0,ye=0,xe=j;for(;xe!==null;){const Re=xe===Z.body;if(Re){const Be=G.visualViewport;if(Be){const we=Be.offsetTop;Le=we,ye=we+Be.height}else Le=0,ye=pr(B).innerHeight;const lt=G.getComputedStyle(Z.documentElement),qe=parseFloat(lt.scrollPaddingTop),je=parseFloat(lt.scrollPaddingBottom);isFinite(qe)&&(Le+=qe),isFinite(je)&&(ye-=je)}else{const Be=xe===j?z:xe.getBoundingClientRect();Le=Be.top,ye=Be.bottom}let Ae=0;if(J<Le?Ae=-(Le-J):ue>ye&&(Ae=ue-ye),Ae!==0)if(Re)G.scrollBy(0,Ae);else{const Be=xe.scrollTop;xe.scrollTop+=Ae;const lt=xe.scrollTop-Be;J-=lt,ue-=lt}if(Re)break;xe=pa(xe)}})(n,$,s)}}(function(P){P._inputState.isSelectionChangeFromDOMUpdate=!0})(n)}}function Du(t){let e=me()||ha();e===null&&(e=pt().selectEnd()),e.insertNodes(t)}function jC(t,e){for(const n of t.split(/(\r?\n|\t)/))n===`
|
|
29
|
+
`||n===`\r
|
|
30
|
+
`?e.linebreak():n===" "?e.tab():n!==""&&e.text(n)}function th(t){const e=[];return jC(t,{linebreak:()=>e.push(Xi()),tab:()=>e.push(Qh()),text:n=>e.push(Vt(n))}),e}function Jz(){const t=me();return t===null?"":t.getTextContent()}function Gb(t){const e=[];for(const n of t)Gn(n)||(!W(n)&&!ht(n)||n.isInline()?e.push(n):W(n)&&e.push(...Gb(n.getChildren())));return e}function Cf(t){let e=t;t.isCollapsed()||e.removeText();const n=me();ae(n)&&(e=n),ae(e)||de(161);const i=e.anchor;let r=i.getNode(),s=i.offset;for(;!ti(r)&&yi(r)===null;){const o=r;if([r,s]=eX(r,s),o.is(r))break}return s}function eX(t,e){const n=t.getParent();if(!n){const r=ut();return pt().append(r),r.select(),[pt(),0]}if(le(t)){const r=t.splitText(e);if(r.length===0)return[n,t.getIndexWithinParent()];const s=e===0?0:1;return[n,r[0].getIndexWithinParent()+s]}if(!W(t)||e===0)return[n,t.getIndexWithinParent()];const i=t.getChildAtIndex(e);if(i){const r=new Nu($s(t.__key,e,"element"),$s(t.__key,e,"element"),0,""),s=t.insertNewAfter(r);s&&s.append(i,...i.getNextSiblings())}return[n,t.getIndexWithinParent()+1]}function OT(t){return Gn(t)||I4(t)||le(t)||t.isParentRequired()}function oy(t){const e=ut();let n=null;for(let i=0;i<t.length;i++){const r=t[i];if(OT(r)){if(n===null){n=r.createParentElementNode(),e.append(n);const s=t[i+1];if(Gn(r)&&(s===void 0||!OT(s)))continue}n.append(r)}else e.append(r),n=null}return e}function I0(t,e,n,i,r="decorators-and-blocks"){if(e==="move"&&i==="character"&&!t.isCollapsed()){const[c,h]=n===t.isBackward()?[t.focus,t.anchor]:[t.anchor,t.focus];return h.set(c.key,c.offset,c.type),!0}const s=bi(t.focus,n?"previous":"next"),o=i==="lineboundary",a=e==="move";let l=s,u=r==="decorators-and-blocks";if(!P1(l)){for(const c of l){u=!1;const{origin:h}=c;if(!ht(h)||h.isIsolated()||(l=c,!o||!h.isInline()))break}if(u)for(const c of Wp(s).iterNodeCarets(e==="extend"?"shadowRoot":"root")){if(ur(c))c.origin.isInline()||(l=c);else{if(W(c.origin))continue;ht(c.origin)&&!c.origin.isInline()&&(l=c)}break}}if(l===s)return!1;if(a&&!o&&ht(l.origin)&&l.origin.isKeyboardSelectable()){const c=eh();return c.add(l.origin.getKey()),yn(c),!0}return l=vi(l),a&&ta(t.anchor,l),ta(t.focus,l),u||!o}let ai=null,Qn=null,lr=!1,ay=!1,Yg=!1;const ly=new Set;let Gg=0;const xT={characterData:!0,childList:!0,subtree:!0};function fu(){return lr||ai!==null&&ai._readOnly}function ri(){lr&&de(13)}function a4(){Gg>99&&de(14)}function vo(){return ai===null&&de(195,u4()),ai}function l4(t){vo()!==null&&Qn===null&&(Qn=t),Qn!==t&&a6(378)}function Dt(){return Qn===null&&de(337,u4()),Qn}function ZC(){Dt()._dirtyType=2}function u4(){let t=0;const e=new Set,n=du.version;if(typeof window<"u")for(const r of sw(document)){const s=Vu(r);if(Bh(s))t++;else if(s){let o=String(s.constructor.version||"<0.17.1");o===n&&(o+=" (separately built, likely a bundler configuration issue)"),e.add(o)}}let i=` Detected on the page: ${t} compatible editor(s) with version ${n}`;return e.size&&(i+=` and incompatible editors with versions ${Array.from(e).join(", ")}`),i}function c4(){return Qn}function yT(t,e,n){const i=e.__type,r=qC(t,i);let s=n.get(i);s===void 0&&(s=Array.from(r.transforms),n.set(i,s));const o=s.length;for(let a=0;a<o&&(s[a](e),e.isAttached());a++);}function vT(t,e){return t!==void 0&&t.__key!==e&&t.isAttached()}function h4(t,e){if(!e)return;const n=t._updateTags;let i=e;Array.isArray(e)||(i=[e]);for(const r of i)n.add(r)}function f4(t){return R0(t,Dt()._nodes)}function R0(t,e){const n=t.type,i=e.get(n);i===void 0&&de(17,n);const r=i.klass;t.type!==r.getType()&&de(18,r.name);const s=r.importJSON(t),o=t.children;if(W(s)&&Array.isArray(o))for(let l=0;l<o.length;l++){const u=R0(o[l],e);s.append(u)}const a=t.$slots;if(a){lo(s)||de(379,r.name);for(const l in a)uw(s,l,R0(a[l],e))}return s}function bT(t,e,n){const i=ai,r=lr,s=Qn;ai=e,lr=!0,Qn=t;try{return n()}finally{ai=i,lr=r,Qn=s}}function La(t,e){const n=Yg;Yg=!0;try{(function(i,r){const s=i._pendingEditorState,o=i._rootElement,a=i._headless||o===null;if(s===null)return void(!i._updating&&i._deferred.length>0&&ST(i,i._deferred));const l=i._editorState,u=l._selection,c=s._selection,h=i._dirtyType!==0,f=ai,p=lr,m=Qn,g=i._updating,x=i._observer;let y=null;if(i._pendingEditorState=null,i._editorState=s,!a&&h&&x!==null){Qn=i,ai=s,lr=!1,i._updating=!0;try{const P=i._dirtyType,$=i._dirtyElements,B=i._dirtyLeaves;x.disconnect(),y=Rz(l,s,i,P,$,B)}catch(P){if(P instanceof Error&&i._onError(P),ay)throw P;return O4(i,null,o,s),y6(i),i._dirtyType=2,ay=!0,La(i,l),void(ay=!1)}finally{x.observe(o,xT),i._updating=g,ai=f,lr=p,Qn=m}}s._readOnly||(s._readOnly=!0);const S=i._dirtyLeaves,_=i._dirtyElements,k=i._normalizedNodes,w=i._updateTags;h&&(i._dirtyType=0,i._cloneNotNeeded.clear(),i._dirtyLeaves=new Set,i._dirtyElements=new Map,i._normalizedNodes=new Set),i._updateTags=new Set,(function(P,$){const B=P._decorators;let X=P._pendingDecorators||B;const j=$._nodeMap;let Z;for(Z in X)j.has(Z)||(X===B&&(X=_4(P)),delete X[Z])})(i,s);const b=a?null:Mi(pr(i));if(i._editable&&b!==null&&(h||c===null||c.dirty||!c.is(u))&&o!==null&&!w.has(QC)){Qn=i,ai=s;try{if(x!==null&&x.disconnect(),h||c===null||c.dirty){const P=i._blockCursorElement;P!==null&&L0(P,i,o),o4(u,c,i,b,w,o)}(function(P,$,B){let X=P._blockCursorElement;if(ae(B)&&B.isCollapsed()&&B.anchor.type==="element"&&$.contains(ih($))){const j=B.anchor,Z=j.getNode(),G=j.offset;let z=!1,J=null;if(G===Z.getChildrenSize())rd(Z.getChildAtIndex(G-1))&&(z=!0);else{const ue=Z.getChildAtIndex(G);if(ue!==null&&rd(ue)){const Le=ue.getPreviousSibling();(Le===null||rd(Le))&&(z=!0,J=P.getElementByKey(ue.__key))}}if(z){const ue=Ir(Z,P.getElementByKey(Z.__key),P).element;return X===null&&(P._blockCursorElement=X=(function(Le){const ye=Le.theme,xe=rn().createElement("div");xe.contentEditable="false",xe.setAttribute("data-lexical-cursor","true");let Re=ye.blockCursor;if(Re!==void 0){if(typeof Re=="string"){const Ae=uo(Re);Re=ye.blockCursor=Ae}Re!==void 0&&xe.classList.add(...Re)}return xe})(P._config)),$.style.caretColor="transparent",void(J===null?ue.appendChild(X):ue.insertBefore(X,J))}}X!==null&&L0(X,P,$)})(i,o,c)}finally{x!==null&&x.observe(o,xT),Qn=m,ai=f}}y!==null&&(function(P,$,B,X,j){const Z=Array.from(P._listeners.mutation),G=Z.length;for(let z=0;z<G;z++){const[J,ue]=Z[z];for(const Le of ue){const ye=$.get(Le);ye!==void 0&&J(ye,{dirtyLeaves:X,prevEditorState:j,updateTags:B})}}})(i,y,w,S,l),ae(c)||c===null||u!==null&&u.is(c)||i.dispatchCommand(Ih,void 0);const E=i._pendingDecorators;E!==null&&(i._decorators=E,i._pendingDecorators=null,id("decorator",i,!0,E)),(function(P,$,B){const X=wT($),j=wT(B);X!==j&&id("textcontent",P,!0,j)})(i,r||l,s),id("update",i,!0,{dirtyElements:_,dirtyLeaves:S,editorState:s,mutatedNodes:y,normalizedNodes:k,prevEditorState:r||l,tags:w}),!g&&ST(i,i._deferred),(function(P){const $=P._updates;if($.length===0)return void(P._cascadeCount=0);if((function(X){ly.has(X)||(ly.add(X),setTimeout(()=>{ly.delete(X),X._cascadeCount=0},0))})(P),P._cascadeCount++>99)return P._updates=[],P._cascadeCount=0,void P._onWarn(new Error(`One or more update listeners are endlessly enqueueing more updates. May have encountered infinite recursion caused by update listeners that trigger additional updates without a stop condition. Editor namespace: ${P._config.namespace}`));const B=$.shift();if(B){const[X,j]=B;v1(P,X,j)}})(i)})(t,e)}finally{Yg=n}}function id(t,e,n,...i){const r=e._updating;e._updating=n;try{const s=e._listeners[t],o=Array.from(s);for(const[a,l]of o){l&&l();const u=a(...i);s.has(a)?s.set(a,u):u&&u()}}finally{e._updating=r}}function d4(t,e,n,i){const r=KC(t);let s;if(!Yg)for(let o=0;o<r.length;o++)r[o]._updating||(r[o]._cascadeCount=0);for(let o=4;o>=0;o--)for(let a=0;a<r.length;a++){const l=r[a];if(a>0&&l._updating){s=l;break}const u=l._commands.get(e);if(u!==void 0){const c=u[o];if(c.size>0){let h=!1;if(ts(l,()=>{for(const f of c)if(f(n,i))return void(h=!0)}),h)return h}}}return s&&s.update(()=>{d4(s,e,n,i)}),!1}function ST(t,e){if(t._deferred=[],e.length!==0){const n=t._updating;t._updating=!0;try{for(let i=0;i<e.length;i++)e[i]()}finally{t._updating=n}}}function _T(t,e){const n=t._updates;let i=e||!1;for(;n.length!==0;){const r=n.shift();if(r){const[s,o]=r,a=t._pendingEditorState;let l;o!==void 0&&(l=o.onUpdate,o.skipTransforms&&(i=!0),o.discrete&&(a===null&&de(191),a._flushSync=!0),l&&t._deferred.push(l),h4(t,o.tag)),a==null?v1(t,s,o):s()}}return i}function v1(t,e,n){const i=t._updateTags;let r,s=!1,o=!1;n!==void 0&&(r=n.onUpdate,h4(t,n.tag),s=n.skipTransforms||!1,o=n.discrete||!1),r&&t._deferred.push(r);const a=t._editorState;let l=t._pendingEditorState,u=!1;(l===null||l._readOnly)&&(l=t._pendingEditorState=p4(l||a),u=!0),l._flushSync=o;const c=ai,h=lr,f=Qn,p=t._updating;ai=l,lr=!1,t._updating=!0,Qn=t;const m=t._headless||t.getRootElement()===null;UC(null);try{u&&(m?a._selection!==null&&(l._selection=a._selection.clone()):l._selection=(function(S,_){const k=S.getEditorState()._selection,w=Mi(pr(S));return ae(k)||k==null?y1(k,w,S,_):k.clone()})(t,n&&n.event||null));const x=t._compositionKey;e(),s=_T(t,s),(function(S,_){const k=_.getEditorState()._selection,w=S._selection;if(ae(w)){const b=w.anchor,E=w.focus;let P;if(b.type==="text"&&(P=b.getNode(),P.selectionTransform(k,w)),E.type==="text"){const $=E.getNode();P!==$&&$.selectionTransform(k,w)}}})(l,t),t._dirtyType!==0&&(s?(function(S,_){const k=_._dirtyLeaves,w=S._nodeMap;for(const b of k){const E=w.get(b);le(E)&&E.isAttached()&&E.isSimpleText()&&!E.isUnmergeable()&&XE(E)}})(l,t):(function(S,_){const k=_._dirtyLeaves,w=_._dirtyElements,b=S._nodeMap,E=Vo(),P=new Map;let $=k,B=$.size,X=w,j=X.size;for(;B>0||j>0;){if(B>0){_._dirtyLeaves=new Set;for(const Z of $){const G=b.get(Z);le(G)&&G.isAttached()&&G.isSimpleText()&&!G.isUnmergeable()&&XE(G),G!==void 0&&vT(G,E)&&yT(_,G,P),k.add(Z)}if($=_._dirtyLeaves,B=$.size,B>0){Gg++;continue}}_._dirtyLeaves=new Set,_._dirtyElements=new Map,X.delete("root")&&X.set("root",!0);for(const Z of X){const G=Z[0],z=Z[1];if(w.set(G,z),!z)continue;const J=b.get(G);J!==void 0&&vT(J,E)&&yT(_,J,P)}$=_._dirtyLeaves,B=$.size,X=_._dirtyElements,j=X.size,Gg++}_._dirtyLeaves=k,_._dirtyElements=w})(l,t),_T(t),(function(S,_,k,w){const b=S._nodeMap,E=_._nodeMap,P=[];for(const[X]of w){const j=E.get(X);j!==void 0&&(j.isAttached()||(W(j)&&S0(j,X,b,E,P,w),b.has(X)||w.delete(X),P.push(X)))}for(const X of k){const j=E.get(X);j===void 0||j.isAttached()||(lo(j)&&j.__slots!==null&&S0(j,X,b,E,P,k),b.has(X)||k.delete(X),P.push(X))}for(const X of P)E.delete(X);const $=Dt(),B=$._compositionKey;B===null||E.has(B)||($._compositionKey=null)})(a,l,t._dirtyLeaves,t._dirtyElements)),x!==t._compositionKey&&(l._flushSync=!0);const y=l._selection;if(ae(y)){t._slotsUsed&&i4(y);const S=l._nodeMap,_=y.anchor.key,k=y.focus.key;S.get(_)!==void 0&&S.get(k)!==void 0||de(19)}else Ct(y)&&y._nodes.size===0&&(l._selection=null)}catch(x){return x instanceof Error&&t._onError(x),t._pendingEditorState=a,t._dirtyType=2,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements.clear(),void La(t)}finally{ai=c,lr=h,Qn=f,t._updating=p,Gg=0}t._dirtyType!==0||t._deferred.length>0||(function(x,y){const S=y.getEditorState()._selection,_=x._selection;if(_!==null){if(_.dirty||!_.is(S))return!0}else if(S!==null)return!0;return!1})(l,t)?l._flushSync?(l._flushSync=!1,La(t)):u&&fX(()=>{La(t)}):(l._flushSync=!1,u&&(i.clear(),t._deferred=[],t._pendingEditorState=null))}function ts(t,e,n){Qn===t&&n===void 0?e():v1(t,e,n)}function tX(t){if(It(t)){let e=null;for(const n of t.getChildren())e=n.isInline()?(e||n.replace(n.createParentElementNode())).append(n):null}}class $i extends ar{constructor(n){super(n);se(this,"__first");se(this,"__last");se(this,"__size");se(this,"__format");se(this,"__style");se(this,"__indent");se(this,"__dir");se(this,"__textFormat");se(this,"__textStyle");se(this,"__slotHost");se(this,"__slots");this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle="",this.__slotHost=null,this.__slots=null}$config(){return this.config(Symbol.for("ElementNode"),{$transform:tX,extends:ar})}afterCloneFrom(n){super.afterCloneFrom(n),this.__key===n.__key&&(this.__first=n.__first,this.__last=n.__last,this.__size=n.__size,this.__slotHost=n.__slotHost,this.__slotHost!==null&&this.__parent!==null&&de(384,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=n.__slots),this.__indent=n.__indent,this.__format=n.__format,this.__style=n.__style,this.__dir=n.__dir,this.__textFormat=n.__textFormat,this.__textStyle=n.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const n=this.getFormat();return Oz[n]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const n=[];let i=this.getFirstChild();for(;i!==null;)n.push(i),i=i.getNextSibling();return n}getChildrenKeys(){const n=[];let i=this.getFirstChild();for(;i!==null;)n.push(i.__key),i=i.getNextSibling();return n}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0&&Pr(this).length===0}isDirty(){const n=Dt()._dirtyElements;return n!==null&&n.has(this.__key)}isLastChild(){const n=this.getLatest(),i=this.getParentOrThrow().getLastChild();return i!==null&&i.is(n)}getAllTextNodes(){const n=[];for(const r of Pr(this)){const s=Jo(this,r);W(s)&&n.push(...s.getAllTextNodes())}let i=this.getFirstChild();for(;i!==null;){if(le(i)&&n.push(i),W(i)){const r=i.getAllTextNodes();n.push(...r)}i=i.getNextSibling()}return n}getFirstDescendant(){let n=this.getFirstChild();for(;W(n);){const i=n.getFirstChild();if(i===null)break;n=i}return n}getLastDescendant(){let n=this.getLastChild();for(;W(n);){const i=n.getLastChild();if(i===null)break;n=i}return n}getDescendantByIndex(n){const i=this.getChildren(),r=i.length;if(n>=r){const o=i[r-1];return W(o)&&o.getLastDescendant()||o||null}const s=i[n];return W(s)&&s.getFirstDescendant()||s||null}getFirstChild(){const n=this.getLatest().__first;return n===null?null:st(n)}getFirstChildOrThrow(){const n=this.getFirstChild();return n===null&&de(45,this.__key),n}getLastChild(){const n=this.getLatest().__last;return n===null?null:st(n)}getLastChildOrThrow(){const n=this.getLastChild();return n===null&&de(96,this.__key),n}getChildAtIndex(n){const i=this.getChildrenSize();let r,s;if(n<i/2){for(r=this.getFirstChild(),s=0;r!==null&&s<=n;){if(s===n)return r;r=r.getNextSibling(),s++}return null}for(r=this.getLastChild(),s=i-1;r!==null&&s>=n;){if(s===n)return r;r=r.getPreviousSibling(),s--}return null}getTextContent(){let n=H4(this);const i=this.getChildren(),r=i.length;for(let s=0;s<r;s++){const o=i[s];n+=o.getTextContent(),W(o)&&s!==r-1&&!o.isInline()&&(n+=Wl)}return n}getTextContentSize(){let n=(function(s){let o=0;for(const a of Pr(s)){const l=Jo(s,a);l!==null&&(o+=l.getTextContentSize())}return o})(this);const i=this.getChildren(),r=i.length;for(let s=0;s<r;s++){const o=i[s];n+=o.getTextContentSize(),W(o)&&s!==r-1&&!o.isInline()&&(n+=2)}return n}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(n){if(n!==""){const i=b0[n];return(this.getFormat()&i)!==0}return!1}hasTextFormat(n){const i=ei[n];return(this.getTextFormat()&i)!==0}getFormatFlags(n,i){return tl(this.getLatest().__textFormat,n,i)}getTextStyle(){return this.getLatest().__textStyle}select(n,i){ri();const r=me();let s=n,o=i;const a=this.getChildrenSize();if(!this.canBeEmpty()){if(n===0&&i===0){const u=this.getFirstChild();if(le(u)||W(u))return u.select(0,0)}else if(!(n!==void 0&&n!==a||i!==void 0&&i!==a)){const u=this.getLastChild();if(le(u)||W(u))return u.select()}}s===void 0&&(s=a),o===void 0&&(o=a);const l=this.__key;return ae(r)?(r.anchor.set(l,s,"element"),r.focus.set(l,o,"element"),r.dirty=!0,r):s4(l,s,l,o,"element","element")}selectStart(){const n=this.getFirstDescendant();return n?n.selectStart():this.select()}selectEnd(){const n=this.getLastDescendant();return n?n.selectEnd():this.select()}clear(){const n=this.getWritable();return this.getChildren().forEach(i=>i.remove()),n}append(...n){return this.splice(this.getChildrenSize(),0,n)}setDirection(n){const i=this.getWritable();return i.__dir=n,i}setFormat(n){return this.getWritable().__format=n!==""&&b0[n]||0,this}setStyle(n){return this.getWritable().__style=n||"",this}setTextFormat(n){const i=this.getWritable();return i.__textFormat=n,i}setTextStyle(n){const i=this.getWritable();return i.__textStyle=n,i}setIndent(n){return this.getWritable().__indent=n,this}splice(n,i,r){E0(this)&&de(324,this.__key,this.__type);const s=this.getChildrenSize(),o=this.getWritable();n+i<=s||de(226,String(n),String(i),String(s));for(const m of r);const a=o.__key,l=[],u=[],c=this.getChildAtIndex(n+i);let h=null,f=s-i+r.length;if(n!==0)if(n===s)h=this.getLastChild();else{const m=this.getChildAtIndex(n);m!==null&&(h=m.getPreviousSibling())}if(i>0){let m=h===null?this.getFirstChild():h.getNextSibling();for(let g=0;g<i;g++){m===null&&de(100);const x=m.getNextSibling(),y=m.__key;ks(m.getWritable()),u.push(y),m=x}}let p=h;for(const m of r){p!==null&&m.is(p)&&(h=p=p.getPreviousSibling());const g=m.getWritable();g.__parent===a&&f--,ks(g);const x=m.__key;if(p===null)o.__first=x,g.__prev=null;else{const y=p.getWritable();y.__next=x,g.__prev=y.__key}m.__key===a&&de(76),g.__parent=a,l.push(x),p=m}if(n+i===s)p!==null&&(p.getWritable().__next=null,o.__last=p.__key);else if(c!==null){const m=c.getWritable();if(p!==null){const g=p.getWritable();m.__prev=p.__key,g.__next=c.__key}else m.__prev=null}if(o.__size=f,u.length){const m=me();if(ae(m)){const g=new Set(u),x=new Set(l),{anchor:y,focus:S}=m;CT(y,g,x)&&A0(y,y.getNode(),this,h,c),CT(S,g,x)&&A0(S,S.getNode(),this,h,c),f!==0||this.canBeEmpty()||It(this)||this.remove()}}return o}getDOMSlot(n){return new f6(n)}exportDOM(n){const{element:i}=super.exportDOM(n);if(Je(i)){const r=this.getIndent();r>0&&(i.style.paddingInlineStart=40*r+"px",i.setAttribute("data-lexical-indent",String(r)));const s=this.getDirection();s&&(i.dir=s)}return{element:i}}exportJSON(){const n={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},i=this.getTextFormat(),r=this.getTextStyle();return i===0&&r===""||It(this)||this.getChildren().some(le)||(i!==0&&(n.textFormat=i),r!==""&&(n.textStyle=r)),n}updateFromJSON(n){return super.updateFromJSON(n).setFormat(n.format).setIndent(n.indent).setDirection(n.direction).setTextFormat(n.textFormat||0).setTextStyle(n.textStyle||"")}insertNewAfter(n,i){return null}canIndent(){return!0}collapseAtStart(n){return!1}excludeFromCopy(n){return!1}canReplaceWith(n){return!0}canInsertAfter(n){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(n){return!1}extractWithChild(n,i,r){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(n,i){const r=Ir(this,n,i);let s=r.getFirstChild();for(let o=this.getFirstChild();o;o=o.getNextSibling()){const a=i.getElementByKey(o.getKey());a!==null&&(s==null?(r.insertChild(a),s=a):s!==a&&r.replaceChild(a,s),s=s.nextSibling)}}}function W(t){return t instanceof $i}function CT(t,e,n){let i=t.getNode();for(;i;){const r=i.__key;if(e.has(r)&&!n.has(r))return!0;i=i.getParent()}return!1}class us extends ar{constructor(n){super(n);se(this,"__slotHost");se(this,"__slots");this.__slotHost=null,this.__slots=null}afterCloneFrom(n){super.afterCloneFrom(n),this.__key===n.__key&&(this.__slotHost=n.__slotHost,this.__slotHost!==null&&this.__parent!==null&&de(383,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=n.__slots)}decorate(n,i){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function ht(t){return t instanceof us}class fa extends $i{constructor(){super("root");se(this,"__cachedText");this.__cachedText=null}static getType(){return"root"}static clone(){return new fa}getTopLevelElementOrThrow(){de(51)}getTextContent(){const n=this.__cachedText;return n===null||!fu()&&Dt()._dirtyType!==0?super.getTextContent():n}remove(){de(52)}replace(n){de(53)}insertBefore(n){de(54)}insertAfter(n){de(55)}updateDOM(n,i){return!1}splice(n,i,r){for(const s of r)W(s)||ht(s)||de(282);return super.splice(n,i,r)}static importJSON(n){return pt().updateFromJSON(n)}collapseAtStart(){return!0}}function xn(t){return t instanceof fa}function p4(t){return new Bp(m6(t._nodeMap),null,t._slotsUsed)}function zC(){return new Bp(new Map([["root",new fa]]),null,!1)}function Kb(t){const e=t.exportJSON(),n=t.constructor;if(e.type!==n.getType()&&de(130,n.name),W(t)){const r=e.children;Array.isArray(r)||de(59,n.name);const s=t.getChildren();for(let o=0;o<s.length;o++){const a=Kb(s[o]);r.push(a)}}const i=Pr(t);if(i.length>0){const r={};for(const s of i){const o=Jo(t,s);o===null&&de(366,n.name,s),r[s]=Kb(o)}e.$slots=r}return e}function m4(t){return t instanceof Bp}class Bp{constructor(e,n=null,i=!1){se(this,"_nodeMap");se(this,"_selection");se(this,"_flushSync");se(this,"_readOnly");se(this,"_parsed");se(this,"_slotsUsed");this._nodeMap=e,this._selection=n||null,this._flushSync=!1,this._readOnly=!1,this._parsed=!1,this._slotsUsed=i}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(e,n){return bT(n&&n.editor||null,this,e)}clone(e){const n=new Bp(this._nodeMap,e===void 0?this._selection:e,this._slotsUsed);return n._readOnly=!0,n}toJSON(){return bT(null,this,()=>({root:Kb(pt())}))}}class b1 extends $i{static getType(){return"artificial"}createDOM(e){return rn().createElement("div")}}class yl extends ar{static getType(){return"linebreak"}static clone(e){return new yl(e.__key)}constructor(e){super(e)}getTextContent(){return`
|
|
31
|
+
`}createDOM(){return rn().createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:e=>XC(e)||WC(e)?null:{conversion:nX,priority:0}}}static importJSON(e){return Xi().updateFromJSON(e)}}function nX(t){return{node:Xi()}}function Xi(){return Ui(new yl)}function Gn(t){return t instanceof yl}function XC(t){const e=t.parentElement;if(e!==null&&gu(e)){const n=e.firstChild;if(n===t||n.nextSibling===t&&M0(n)){const i=e.lastChild;if(i===t||i.previousSibling===t&&M0(i))return!0}}return!1}function WC(t){const e=t.parentElement;if(e!==null&&gu(e)){const n=e.firstChild;if(n===t||n.nextSibling===t&&M0(n))return!1;const i=e.lastChild;if(i===t||i.previousSibling===t&&M0(i))return!0}return!1}function M0(t){return Hi(t)&&/^( |\t|\r?\n)+$/.test(t.textContent||"")}class da extends $i{static getType(){return"paragraph"}static clone(e){return new da(e.__key)}createDOM(e){const n=rn().createElement("p"),i=Pc(e.theme,"paragraph");return i!==void 0&&n.classList.add(...i),n}updateDOM(e,n,i){return!1}static importDOM(){return{p:e=>({conversion:iX,priority:0})}}exportDOM(e){const{element:n}=super.exportDOM(e);if(Je(n)){this.isEmpty()&&n.append(rn().createElement("br"));const i=this.getFormatType();i&&(n.style.textAlign=i)}return{element:n}}static importJSON(e){return ut().updateFromJSON(e)}exportJSON(){const e=super.exportJSON();if(e.textFormat===void 0||e.textStyle===void 0){const n=this.getChildren().find(le);n?(e.textFormat=n.getFormat(),e.textStyle=n.getStyle()):(e.textFormat=this.getTextFormat(),e.textStyle=this.getTextStyle())}return e}insertNewAfter(e,n){const i=ut();i.setTextFormat(e.format),i.setTextStyle(e.style);const r=this.getDirection();return i.setDirection(r),i.setFormat(this.getFormatType()),i.setStyle(this.getStyle()),this.insertAfter(i,n),i}collapseAtStart(){const e=this.getChildren();if(e.length===0||le(e[0])&&e[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function iX(t){const e=ut();if(Qs(e,t),bl(t,e),e.getFormatType()===""){const n=t.getAttribute("align");n&&n&&n in b0&&e.setFormat(n)}return Mr(e,t),{node:e}}function ut(){return Ui(new da)}function Qu(t){return t instanceof da}function rX(t){console.warn(t)}const tt=0,Gt=1,sX=2,Id=3,cr=4,g4=-8,oX=-7,aX=-6,lX=-5,uX=-4;function O4(t,e,n,i,r){const s=t._keyToDOMMap;s.clear(),t._editorState=zC(),t._pendingEditorState=i,t._compositionKey=null,t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements.clear(),t._normalizedNodes=new Set,r&&r.preserveUpdateQueue||(t._updateTags=new Set,t._updates=[],t._cascadeCount=0),t._blockCursorElement=null,t._inputState.handledSelectionCommandTimeoutId!==null&&clearTimeout(t._inputState.handledSelectionCommandTimeoutId),t._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null};const o=t._observer;o!==null&&(o.disconnect(),t._observer=null),e!==null&&(e.textContent="",(function(a,l){const u=`__lexicalKey_${l._key}`;delete a[u]})(e,t)),n!==null&&(n.textContent="",s.set("root",n),S4(n,t,"root"))}function x4(t){const e=new Set,n=new Set;for(const{klass:i,ownNodeConfig:r}of zp(t)){const s=i.transform;if(!n.has(s)){n.add(s);const o=i.transform();o&&e.add(o)}if(r){const o=r.$transform;o&&e.add(o)}}return e}const Rd={$createDOM:(t,e)=>t.createDOM(e._config,e),$decorateDOM:(t,e,n,i)=>{},$exportDOM:(t,e)=>{const n=S1(e,t.getType());return n&&n.exportDOM!==void 0?n.exportDOM(e,t):t.exportDOM(e)},$extractWithChild:(t,e,n,i,r)=>W(t)&&t.extractWithChild(e,n,i),$getDOMSlot:(t,e,n)=>t.getDOMSlot(e),$getSlotTargetElement:(t,e,n,i)=>null,$shouldExclude:(t,e,n)=>W(t)&&t.excludeFromCopy("html"),$shouldInclude:(t,e,n)=>!e||t.isSelected(e),$updateDOM:(t,e,n,i)=>t.updateDOM(e,n,i._config)};function HC(t){const e=t||{},n=c4(),i=e.theme||{},r=t===void 0?n:e.parentEditor||null,s=e.disableEvents||!1,o=zC(),a=e.namespace||(r!==null?r._config.namespace:w4()),l=e.editorState,u=[fa,Rr,yl,xl,da,b1,...e.nodes||[]],{onError:c,onWarn:h,html:f}=e,p=e.editable===void 0||e.editable;let m;if(t===void 0&&n!==null)m=n._nodes;else{m=new Map;for(let x=0;x<u.length;x++){let y=u[x],S=null,_=null;if(y&&typeof y=="object"){const b=y;y=b.replace,S=b.with,_=b.withKlass||null}if(typeof y!="function"||!y.prototype||!(y===ar||y.prototype instanceof ar)){let b="<unknown>";try{b=JSON.parse(p6)}catch{}de(365,String(x-u.length+(e.nodes?e.nodes.length:0)),typeof y=="function"?`${y.name}${typeof y.getType=="function"?` (type ${String(y.getType())})`:""}`:String(y),String(b))}Zp(y);const k=y.getType(),w=x4(y);m.set(k,{exportDOM:f&&f.export?f.export.get(y):void 0,klass:y,replace:S,replaceWithKlass:_,sharedNodeState:v6(u[x]),transforms:w})}}const g=new du(o,r,m,{disableEvents:s,dom:{...Rd,...t&&t.dom},namespace:a,theme:i},c||console.error,h||rX,(function(x,y){const S=new Map,_=new Set,k=w=>{Object.keys(w).forEach(b=>{let E=S.get(b);E===void 0&&(E=[],S.set(b,E)),E.push(w[b])})};return x.forEach(w=>{const b=w.klass.importDOM;if(b==null||_.has(b))return;_.add(b);const E=b.call(w.klass);E!==null&&k(E)}),y&&k(y),S})(m,f?f.import:void 0),p,t);return l!==void 0&&(g._pendingEditorState=l,g._dirtyType=2),(function(x){x.registerCommand(wC,Nz,tt),x.registerCommand(kC,Lz,tt),x.registerCommand(EC,Dz,tt),x.registerCommand(TC,Qz,tt),x.registerCommand(Mh,Vz,tt)})(g),g}function cX(t,e){const n=t.get(e);t.delete(e),n&&n()}function wf(t,e,n){return t.set(e,n),cX.bind(null,t,e)}class du{constructor(e,n,i,r,s,o,a,l,u){se(this,"_headless");se(this,"_parentEditor");se(this,"_rootElement");se(this,"_editorState");se(this,"_pendingEditorState");se(this,"_compositionKey");se(this,"_deferred");se(this,"_keyToDOMMap");se(this,"_updates");se(this,"_updating");se(this,"_cascadeCount");se(this,"_listeners");se(this,"_commands");se(this,"_nodes");se(this,"_decorators");se(this,"_pendingDecorators");se(this,"_config");se(this,"_dirtyType");se(this,"_cloneNotNeeded");se(this,"_dirtyLeaves");se(this,"_dirtyElements");se(this,"_normalizedNodes");se(this,"_updateTags");se(this,"_observer");se(this,"_key");se(this,"_onError");se(this,"_onWarn");se(this,"_htmlConversions");se(this,"_window");se(this,"_editable");se(this,"_blockCursorElement");se(this,"_slotsUsed");se(this,"_inputState");se(this,"_createEditorArgs");this._createEditorArgs=u,this._parentEditor=n,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Mb,this._updates=[],this._updating=!1,this._cascadeCount=0,this._listeners={decorator:new Map,editable:new Map,mutation:new Map,root:new Map,textcontent:new Map,update:new Map},this._commands=new Map,this._config=r,this._nodes=i,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=w4(),this._onError=s,this._onWarn=o,this._htmlConversions=a,this._editable=l,this._headless=n!==null&&n._headless,this._window=null,this._blockCursorElement=null,this._slotsUsed=!1,this._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null}}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){return wf(this._listeners.update,e)}registerEditableListener(e){return wf(this._listeners.editable,e)}registerDecoratorListener(e){return wf(this._listeners.decorator,e)}registerTextContentListener(e){return wf(this._listeners.textcontent,e)}registerRootListener(e){const n=this._listeners.root;return wn(wf(n,e,e(this._rootElement,null)||void 0),()=>(function(i,r,s){const o=i.get(r);o&&o(),i.set(r,r(...s)||void 0)})(n,e,[null,this._rootElement]))}registerCommand(e,n,i){i===void 0&&de(35);const r=this._commands;r.has(e)||r.set(e,[new _f,new _f,new _f,new _f,new _f]);const s=r.get(e);s===void 0&&de(36,String(e));const o=(function(l){return 7&l})(i),a=s[o];return o!==i?a.addFront(n):a.addBack(n),()=>{a.delete(n),s.every(l=>l.size===0)&&r.delete(e)}}registerMutationListener(e,n,i){const r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,s=this._listeners.mutation;let o=s.get(n);o===void 0&&(o=new Set,s.set(n,o)),o.add(r);const a=i&&i.skipInitialization;return a!==void 0&&a||this.initializeMutationListener(n,r),()=>{o.delete(r),o.size===0&&s.delete(n)}}getRegisteredNode(e){const n=this._nodes.get(e.getType());return n===void 0&&de(37,e.name),n}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,n){const i=this._editorState,r=eS(i).get(n.getType());if(!r)return;const s=new Map;for(const o of r.keys())s.set(o,"created");s.size>0&&e(s,{dirtyLeaves:new Set,prevEditorState:i,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,n){const i=this.getRegisteredNode(e);return i.transforms.add(n),i}registerNodeTransform(e,n){const i=this.registerNodeTransformToKlass(e,n),r=[i],s=i.replaceWithKlass;if(s!=null){const o=this.registerNodeTransformToKlass(s,n);r.push(o)}return(function(o,a){const l=eS(o.getEditorState()),u=[];for(const c of a){const h=l.get(c);h&&u.push(h)}u.length!==0&&o.update(()=>{for(const c of u)for(const h of c.keys()){const f=st(h);f&&f.markDirty()}},o._pendingEditorState===null?{tag:Tc}:void 0)})(this,r.map(o=>o.klass.getType())),()=>{r.forEach(o=>o.transforms.delete(n))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,n){return Fe(this,e,n)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){const n=this._rootElement;if(e!==n){const i=Pc(this._config.theme,"root"),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,O4(this,n,e,r,{preserveUpdateQueue:!0}),n!==null&&(this._config.disableEvents||Bz(n),i!=null&&n.classList.remove(...i)),e!==null){const s=nw(e),o=e.style;o.userSelect="text",o.whiteSpace="pre-wrap",o.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=s,this._dirtyType=2,y6(this),this._updateTags.add(Tc),La(this),this._config.disableEvents||(function(a,l){const u=a.ownerDocument;Hb.set(a,u);let c=w0.get(u);c===void 0&&(c={editors:new Set,hasShadowEditor:void 0},w0.set(u,c)),c.editors.add(l),c.hasShadowEditor=void 0,a.__lexicalEditor=l;const h=Z6(a);h.push(Mz.register(u));for(let f=0;f<Wb.length;f++){const[p,m]=Wb[f],g=typeof m=="function"?x=>{iT(x)||(Ub(x),(l.isEditable()||p==="click")&&m(x,l))}:x=>{if(iT(x))return;Ub(x);const y=l.isEditable();switch(p){case"cut":return y&&Fe(l,m1,x);case"copy":return Fe(l,Qp,x);case"paste":return y&&Fe(l,Rh,x);case"dragstart":return y&&Fe(l,Dp,x);case"dragover":return y&&Fe(l,p1,x);case"dragend":return y&&Fe(l,M6,x);case"focus":return y&&Fe(l,Dh,x);case"blur":return y&&Fe(l,Vp,x);case"drop":return y&&Fe(l,d1,x)}};h.push(g1(a,p,g))}})(e,this),i!=null&&e.classList.add(...i)}else this._window=null,this._updateTags.add(Tc),La(this);id("root",this,!1,e,n)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,n){e.isEmpty()&&de(38);let i=e;i._readOnly&&(i=p4(e),i._selection=e._selection?e._selection.clone():null),x6(this);const r=this._pendingEditorState,s=n!==void 0?n.tag:null;r===null||r.isEmpty()||(s!=null&&this._updateTags.add(s),La(this)),this._pendingEditorState=i,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,this._slotsUsed=this._slotsUsed||e._slotsUsed,ts(this,()=>{if(s&&this._updateTags.add(s),e._parsed)for(const[o,a]of i._nodeMap.entries())W(a)?this._dirtyElements.set(o,!0):this._dirtyLeaves.add(o)},{discrete:!this._updating||void 0})}parseEditorState(e,n){return(function(i,r,s){const o=zC(),a=ai,l=lr,u=Qn,c=r._dirtyElements,h=r._dirtyLeaves,f=r._cloneNotNeeded,p=r._dirtyType;r._dirtyElements=new Map,r._dirtyLeaves=new Set,r._cloneNotNeeded=new Set,r._dirtyType=0,ai=o,lr=!1,Qn=r,UC(null);try{const m=r._nodes;R0(i.root,m),s&&s(),o._readOnly=!0,o._parsed=!0}catch(m){m instanceof Error&&r._onError(m)}finally{r._dirtyElements=c,r._dirtyLeaves=h,r._cloneNotNeeded=f,r._dirtyType=p,ai=a,lr=l,Qn=u}return o})(typeof e=="string"?JSON.parse(e):e,this,n)}read(...e){const[n,i]=e.length===1?["force-commit",e[0]]:e;return n==="force-commit"&&La(this),(n==="pending"?this._pendingEditorState||this._editorState:this.getEditorState()).read(i,{editor:this})}update(e,n){(function(i,r,s){i._updating?i._updates.push([r,s]):v1(i,r,s)})(this,e,n)}focus(e,n={}){const i=this._rootElement;i!==null&&(i.setAttribute("autocapitalize","off"),ts(this,()=>{const r=me(),s=pt();r!==null?r.dirty||yn(r.clone()):s.getChildrenSize()!==0&&(n.defaultSelection==="rootStart"?s.selectStart():s.selectEnd()),Is("focus"),$4(()=>{i.removeAttribute("autocapitalize"),e&&e()})}),this._pendingEditorState===null&&i.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;e!==null&&e.blur();const n=Mi(this._window);n!==null&&n.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,id("editable",this,!0,e),this._slotsUsed&&this.update(()=>ZC()))}toJSON(){return{editorState:this._editorState.toJSON()}}}se(du,"version");du.version=p6;let Jb=null;function UC(t){Jb=t}let y4=1;function hX(){y4=1}function qC(t,e){const n=S1(t,e);return n===void 0&&de(30,e),n}function S1(t,e){return t._nodes.get(e)}const fX=typeof queueMicrotask=="function"?queueMicrotask:t=>{Promise.resolve().then(t)};function Fp(t,e){const n=e!==void 0?e:(()=>{const s=t.getRootNode();return vl(s)||fo(s)?mu(s):null})();if(!Je(n)||n.hasAttribute("data-lexical-slot"))return!1;const i=os(n),r=n.nodeName;return MC(i)&&(r==="INPUT"||r==="TEXTAREA"||n.contentEditable==="true"&&Vu(n)==null)}const dX=Fp;function Vh(t,e,n){const i=t.getRootElement();if(!i)return!1;try{if(!e||!i.contains(e)||!i.contains(n))return!1}catch{return!1}return Wa(e)===t&&t.read("latest",()=>!Fp(e))}function Bh(t){return t instanceof du}function Wa(t){let e=t;for(;e!=null;){const n=Vu(e);if(Bh(n))return n;e=pa(e)}return null}function Vu(t){return t?t.__lexicalEditor:null}function pX(t){return pz.test(t)?"rtl":mz.test(t)?"ltr":null}function Ha(t){return Ja(t)||t.isToken()}function rr(t){return Ha(t)||t.isSegmented()}function Hi(t){return Bu(t)&&t.nodeType===3}function vl(t){return Bu(t)&&t.nodeType===9}function v4(t){let e=t;for(;e!=null;){if(Hi(e))return e;e=e.firstChild}return null}function tl(t,e,n){const i=ei[e];if(n!==null&&(t&i)===(n&i))return t;let r=t^i;return e==="subscript"?r&=~ei.superscript:e==="superscript"?r&=~ei.subscript:e==="lowercase"?(r&=~ei.uppercase,r&=~ei.capitalize):e==="uppercase"?(r&=~ei.lowercase,r&=~ei.capitalize):e==="capitalize"&&(r&=~ei.lowercase,r&=~ei.uppercase),r}function YC(t){return le(t)||Gn(t)||ht(t)}function b4(t,e){const n=(function(){const o=Jb;return Jb=null,o})();if((e=e||n&&n.__key)!=null)return void(t.__key=e);ri(),a4();const i=Dt(),r=vo(),s=""+y4++;r._nodeMap.set(s,t),W(t)?i._dirtyElements.set(s,!0):i._dirtyLeaves.add(s),i._cloneNotNeeded.add(s),i._dirtyType===0&&(i._dirtyType=1),t.__key=s}function ks(t){yi(t)!==null&&de(380,t.__key,String(yi(t)));const e=t.getParent();if(e!==null){const n=t.getWritable(),i=e.getWritable(),r=t.getPreviousSibling(),s=t.getNextSibling(),o=s!==null?s.__key:null,a=r!==null?r.__key:null,l=r!==null?r.getWritable():null,u=s!==null?s.getWritable():null;r===null&&(i.__first=o),s===null&&(i.__last=a),l!==null&&(l.__next=o),u!==null&&(u.__prev=a),n.__prev=null,n.__next=null,n.__parent=null,i.__size--}}const mX=ks;function N0(t){a4(),E0(t)&&de(323,t.__key,t.__type);const e=t.getLatest(),n=e.__parent!==null?e.__parent:nl(e)?e.__slotHost:null,i=vo(),r=Dt(),s=i._nodeMap,o=r._dirtyElements;n!==null&&(function(l,u,c){let h=l;for(;h!==null;){if(c.has(h))return;const f=u.get(h);if(f===void 0)break;c.set(h,!1),h=f.__parent!==null?f.__parent:nl(f)?f.__slotHost:null}})(n,s,o);const a=e.__key;r._dirtyType===0&&(r._dirtyType=1),W(t)?o.set(a,!0):r._dirtyLeaves.add(a)}function Un(t){ri();const e=Dt(),n=e._compositionKey;if(t!==n){if(e._compositionKey=t,n!==null){const i=st(n);i!==null&&i.getWritable()}if(t!==null){const i=st(t);i!==null&&i.getWritable()}}}function Vo(){return fu()?null:Dt()._compositionKey}function st(t,e){const n=(e||vo())._nodeMap.get(t);return n===void 0?null:n}function GC(t,e){const n=Fh(t,Dt());return n!==void 0?st(n,e):null}function S4(t,e,n){t[`__lexicalKey_${e._key}`]=n}function Fh(t,e){return t[`__lexicalKey_${e._key}`]}function os(t,e){let n=t;for(;n!=null;){const i=GC(n,e);if(i!==null)return i;n=pa(n)}return null}function _4(t){const e=t._decorators,n=Object.assign({},e);return t._pendingDecorators=n,n}function wT(t){return t.read(()=>pt().getTextContent())}function pt(){return vo()._nodeMap.get("root")}function yn(t){ri();const e=vo();t!==null&&(t.dirty=!0,t.setCachedNodes(null),ae(t)&&Dt()._slotsUsed&&i4(t)),e._selection=t}function kT(){ri(),x6(Dt())}function vc(t){const e=(function(n,i){let r=n;for(;r!=null;){const s=Fh(r,i);if(s!==void 0)return s;r=pa(r)}return null})(t,Dt());return e===null?null:st(e)}function C4(t){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(t)}function KC(t){const e=[];for(let n=t;n!==null;n=n._parentEditor)e.push(n);return e}function w4(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function k4(t){return Hi(t)?t.nodeValue:null}function JC(t,e,n){const i=Mi(pr(e));if(i===null)return;const r=$r(i,e._rootElement),s=r.anchorNode;let{anchorOffset:o,focusOffset:a}=r;if(s!==null){let l=k4(s);const u=os(s);if(l!==null&&le(u)){if((l===_d||l===SC)&&n){const c=n.length;l=n,o=c,a=c}l!==null&&ew(u,l,o,a,t)}}}function ew(t,e,n,i,r){let s=t;if(s.isAttached()&&(r||!s.isDirty())){const o=s.isComposing();if(s.isToken()&&o)return;let a=e;if((o||r)&&(e.endsWith(_d)&&(a=e.slice(0,-_d.length)),r)){const u=SC;let c;for(;(c=a.indexOf(u))!==-1;)a=a.slice(0,c)+a.slice(c+u.length),n!==null&&n>c&&(n=Math.max(c,n-u.length)),i!==null&&i>c&&(i=Math.max(c,i-u.length))}const l=s.getTextContent();if(r||a!==l){const u=me();if(a===""){if(Un(null),Ph||Ko||Ah)s.remove();else{const g=Dt();uy(s,"",u),setTimeout(()=>{g.update(()=>{s.isAttached()&&s.getTextContent()===""&&s.remove()})},20)}return}const c=s.getParent(),h=ha(),f=s.getTextContentSize(),p=Vo(),m=s.getKey();if(s.isToken()&&!o||p!==null&&m===p&&!o||ae(h)&&(c!==null&&!c.canInsertTextBefore()&&h.anchor.offset===0||h.anchor.key===t.__key&&h.anchor.offset===0&&!s.canInsertTextBefore()&&!o||h.focus.key===t.__key&&h.focus.offset===f&&!s.canInsertTextAfter()&&!o))return void s.markDirty();if(!ae(u)||n===null||i===null)return void uy(s,a,u);if(u.setTextNodeRange(s,n,s,i),s.isSegmented()){const g=Vt(s.getTextContent());s.replace(g),s=g}uy(s,a,u)}}}function uy(t,e,n){if(t.setTextContent(e),ae(n)){const i=t.getKey();let r=!1;for(const s of["anchor","focus"]){const o=n[s];o.type==="text"&&o.key===i&&(o.offset=Ts(t,o.offset,"clamp"),r=!0)}r&&(n._cachedNodes=null,n._cachedIsBackward=null)}}function jm(t,e,n){const i=e[n]||!1;return i==="any"||i===t[n]}function E4(t,e){return jm(t,e,"altKey")&&jm(t,e,"ctrlKey")&&jm(t,e,"shiftKey")&&jm(t,e,"metaKey")}function jt(t,e,n){if(!E4(t,n))return!1;if(t.key.toLowerCase()===e.toLowerCase())return!0;if(e.length>1||t.key.length===1&&t.key.charCodeAt(0)<=127)return!1;if(t.code.startsWith("Digit")&&/^\d$/.test(e))return t.code===`Digit${e}`;const i="Key"+e.toUpperCase();return t.code===i}const Po={ctrlKey:!jr,metaKey:jr},ET={altKey:jr,ctrlKey:!jr};function TT(t){return t.key==="Backspace"}function T4(t){const e=pt();if(ae(t)){const n=t.anchor,i=t.focus,r=n.getNode();if(xn(r))return n.set(r.getKey(),0,"element"),i.set(r.getKey(),r.getChildrenSize(),"element"),Cs(t),t;const s=r.getTopLevelElementOrThrow(),o=s.getParent();if(o===null)return W(s)&&(n.set(s.getKey(),0,"element"),i.set(s.getKey(),s.getChildrenSize(),"element"),Cs(t)),t;const a=o;return n.set(a.getKey(),0,"element"),i.set(a.getKey(),a.getChildrenSize(),"element"),Cs(t),t}{const n=e.select(0,e.getChildrenSize());return yn(Cs(n)),n}}function Pc(t,e){t.__lexicalClassNameCache===void 0&&(t.__lexicalClassNameCache={});const n=t.__lexicalClassNameCache,i=n[e];if(i!==void 0)return i;const r=t[e];if(typeof r=="string"){const s=uo(r);return n[e]=s,s}return r}function tw(t,e,n,i,r){if(n.size===0)return;const s=i.__type,o=i.__key,a=e.get(s);a===void 0&&de(33,s);const l=a.klass;let u=t.get(l);u===void 0&&(u=new Map,t.set(l,u));const c=u.get(o),h=c==="destroyed"&&r==="created";(c===void 0||h)&&u.set(o,h?"updated":r)}function gX(t){const e=t.getType(),n=vo();if(n._readOnly){const s=eS(n).get(e);return s?Array.from(s.values()):[]}const i=n._nodeMap,r=[];for(const[,s]of i)s instanceof t&&s.__type===e&&s.isAttached()&&r.push(s);return r}function PT(t,e,n){const i=t.getParent();let r=n,s=t;return i!==null&&(e&&n===0?(r=s.getIndexWithinParent(),s=i):e||n!==s.getChildrenSize()||(r=s.getIndexWithinParent()+1,s=i)),s.getChildAtIndex(e?r-1:r)}function P4(t,e){const n=t.offset;if(t.type==="element")return PT(t.getNode(),e,n);{const i=t.getNode();if(e&&n===0||!e&&n===i.getTextContentSize()){const r=e?i.getPreviousSibling():i.getNextSibling();return r===null?PT(i.getParentOrThrow(),e,i.getIndexWithinParent()+(e?0:1)):r}}return null}function A4(t){const e=pr(t).event,n=e&&e.inputType;return n==="insertFromPaste"||n==="insertFromPasteAsQuotation"}function Fe(t,e,n){return d4(t,e,n,t)}function nh(t,e){const n=t._keyToDOMMap.get(e);return n===void 0&&de(75,e),n}function pa(t){const e=t.assignedSlot||t.parentElement;if(e!==null)return e;const n=t.parentNode;return fo(n)?n.host:null}function _1(t){return vl(t)?t:Je(t)?t.ownerDocument:null}function OX(t){return Dt()._updateTags.has(t)}function Is(t){ri(),Dt()._updateTags.add(t)}function $4(t){ri(),Dt()._deferred.push(t)}function pu(t,e){let n=t.getParent();for(;n!==null;){if(n.is(e))return!0;n=n.getParent()}return!1}function nw(t){const e=_1(t);return e?e.defaultView:null}function pr(t){const e=t._window;return e===null&&de(78),e}function I4(t){return W(t)&&t.isInline()||ht(t)&&t.isInline()}function iw(t){let e=t.getLatest();for(;e!==null;){if(yi(e)!==null&&W(e))return e;const n=e.getParentOrThrow();if(It(n))return n;e=n}return e}function nu(t){return W(t)&&t.isShadowRoot()}function It(t){return xn(t)||nu(t)}function qn(t,e=!1){const n=t.constructor.clone(t);return b4(n,null),n.afterCloneFrom(t),e||n.resetOnCopyNodeFrom(t),n}function Ui(t){const e=Dt(),n=t.getType(),i=S1(e,n);i===void 0&&de(200,t.constructor.name,n);const{replace:r,replaceWithKlass:s}=i;if(r!==null){const o=r(t),a=o.constructor;return s!==null?o instanceof s||de(201,s.name,s.getType(),a.name,a.getType(),t.constructor.name,n):o instanceof t.constructor&&a!==t.constructor||de(202,a.name,a.getType(),t.constructor.name,n),o.__key===t.__key&&de(203,t.constructor.name,n,a.name,a.getType()),o}return t}function cy(t,e){!xn(t.getParent())||W(e)||ht(e)||de(99)}function R4(t){const e=st(t);return e===null&&de(63,t),e}function rd(t){if(!t||t.isInline())return!1;if(ht(t))return!0;if(W(t)){if(t.isShadowRoot()){const e=t.getParent();return!(W(e)&&e.isShadowRoot())}return!t.canBeEmpty()}return!1}function L0(t,e,n){n.style.removeProperty("caret-color"),e._blockCursorElement=null;const i=t.parentElement;i!==null&&i.removeChild(t)}function Mi(t){return Ri?(t||window).getSelection():null}function M4(t){const e=nw(t);return e?e.getSelection():null}function fo(t){return D0(t)&&"host"in t}const xX=[];function rw(t){const e=t.getRootNode();if(e===t||!fo(e))return xX;const n=[e];let i=e.host;for(;;){const r=i.getRootNode();if(r===i||!fo(r))break;n.push(r),i=r.host}return n}function*sw(t){const e=[t];let n;for(;n=e.pop();){yield*n.querySelectorAll('[data-lexical-editor="true"]');const i=(vl(n)?n:n.ownerDocument).createTreeWalker(n,NodeFilter.SHOW_ELEMENT);let r;for(;r=i.nextNode();)r.shadowRoot&&e.push(r.shadowRoot)}}function C1(t){return t!==null?t.ownerDocument:document}function rn(){const t=c4();return C1(t!==null?t._rootElement:null)}function jh(t,e){if(e===null||typeof t.getComposedRanges!="function")return null;const n=rw(e);if(n.length===0)return null;const i=t.getComposedRanges;try{const r=i.call(t,{shadowRoots:n})[0];if(r!==void 0)return r}catch{}try{const r=i.apply(t,n)[0];if(r!==void 0)return r}catch{}return null}function N4(t,e){const n=jh(t,e);if(n!==null){const i=L4(n);if(i!==null)return i}return t.rangeCount>0?t.getRangeAt(0):null}function $r(t,e){const n=jh(t,e);return n===null?t:D4(n,Q4(t))}function yX(t,e){const n=jh(t,e);if(n===null)return{points:t,range:t.rangeCount>0?t.getRangeAt(0):null};const i=L4(n)??(t.rangeCount>0?t.getRangeAt(0):null);return{points:D4(n,Q4(t)),range:i}}function L4(t){const e=t.startContainer.ownerDocument;if(e===null)return null;const n=e.createRange();try{return n.setStart(t.startContainer,t.startOffset),n.setEnd(t.endContainer,t.endOffset),n}catch{return null}}function D4(t,e){const{startContainer:n,startOffset:i,endContainer:r,endOffset:s}=t;return e==="backward"?{anchorNode:r,anchorOffset:s,direction:e,focusNode:n,focusOffset:i}:{anchorNode:n,anchorOffset:i,direction:e,focusNode:r,focusOffset:s}}function Q4(t){return t.direction}function ih(t){const e=t.getRootNode();return vl(e)||fo(e)?e.activeElement:null}function mu(t){let e=t.activeElement;for(;e!==null&&e.shadowRoot!==null;){const n=e.shadowRoot.activeElement;if(n===null)break;e=n}return e}function w1(t){const e=t.target;if(e!==null&&Je(e)&&e.shadowRoot!==null&&typeof t.composedPath=="function"){const n=t.composedPath();if(n.length>0)return n[0]}return e}function vX(t,e){let n=t.getChildAtIndex(e);n==null&&(n=t),It(t)&&de(102);const i=o=>{const a=o.getParentOrThrow(),l=It(a),u=o!==n||l?qn(o):o;if(l)return W(o)&&W(u)||de(133),o.insertAfter(u),[o,u,u];{const[c,h,f]=i(a),p=o.getNextSiblings();return f.append(u,...p),[c,h,u]}},[r,s]=i(n);return[r,s]}function ow(t){return Je(t)&&t.tagName==="A"}function bX(t){return Je(t)&&t.tagName==="TR"}function SX(t){return Je(t)&&(t.tagName==="TD"||t.tagName==="TH")}function Je(t){return Bu(t)&&t.nodeType===1}function Bu(t){return typeof t=="object"&&t!==null&&"nodeType"in t&&typeof t.nodeType=="number"}function D0(t){return Bu(t)&&t.nodeType===11}const _X=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/i;function Md(t){return!(!Je(t)||!t.style.display.startsWith("inline"))||_X.test(t.nodeName)}const CX=/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/i;function gu(t){return(!Je(t)||!t.style.display.startsWith("inline"))&&CX.test(t.nodeName)}function ti(t){if(ht(t)&&!t.isInline())return!0;if(!W(t)||It(t))return!1;const e=t.getFirstChild(),n=e===null||Gn(e)||le(e)||e.isInline();return!t.isInline()&&t.canBeEmpty()!==!1&&n}function hn(){return Dt()}function jp(t=hn()){return t._config.dom||Rd}function Ir(t,e,n=hn()){const i=jp(n).$getDOMSlot(t,e,n);return W(t)&&(V4(i)||de(344,t.getKey(),t.getType())),i}function wX(t,e,n,i){const r=t.read("latest",()=>{const s=st(e);return s!==null?(function(o,a,l=hn()){const u=Jo(o,a);if(u===null)return null;const c=l.getElementByKey(u.getKey());return c!==null?c.parentElement:null})(s,n,t):null});return r!==null&&(r.parentElement!==i&&i.appendChild(r),r.style.display=""),r}function kX(t,e,n){n.style.display="none";const i=t.getElementByKey(e);i!==null&&n.parentElement!==i&&i.insertBefore(n,i.firstChild)}function V4(t){return t instanceof f6}function Zo(t,e,n=hn()){return v4(Ir(t,e,n).element)}const AT=new WeakMap,EX=new Map;function eS(t){if(!t._readOnly&&t.isEmpty())return EX;t._readOnly||de(192);let e=AT.get(t);return e||(e=(function(n){const i=new Map;for(const[r,s]of n._nodeMap){const o=s.__type;let a=i.get(o);a||(a=new Map,i.set(o,a)),a.set(r,s)}return i})(t),AT.set(t,e)),e}function k1(t){const e=t.constructor.clone(t);return e.afterCloneFrom(t),e}function B4(t){return(e=k1(t))[z6]=!0,e;var e}function bl(t,e){const n=t.getAttribute("data-lexical-indent");if(n!==null){const s=parseInt(n,10);if(Number.isFinite(s)&&s>=0)return void e.setIndent(s)}const i=parseInt(t.style.paddingInlineStart,10)||0,r=Math.round(i/40);e.setIndent(r)}function Mr(t,e){const n=e.getAttribute("dir");return n==="ltr"||n==="rtl"?t.setDirection(n):t}function Qs(t,e){const n=e.style.textAlign;return n&&n in b0?t.setFormat(n):t}function F4(t,e){t.__lexicalUnmanaged=!0,e&&e.captureSelection!==void 0&&(t.__lexicalCapturedSelection=e.captureSelection)}function aw(t){return t.__lexicalUnmanaged===!0}function j4(t,e=hn()){const n=e.isEditable();t.contentEditable=n?"true":"false",n?t.__lexicalEditor=e:delete t.__lexicalEditor}function Nd(t,e){let n=t;for(;n!=null;){if(n.__lexicalCapturedSelection===!0)return!0;if(Je(n)&&n.hasAttribute("data-lexical-slot")||Fh(n,e)!==void 0)return!1;n=pa(n)}return!1}function kf(t,e){return(function(n,i){return Object.prototype.hasOwnProperty.call(n,i)})(t,e)&&t[e]!==ar[e]}const $T=new WeakMap;function Zp(t){const e=$T.get(t);if(e)return e;const n=t.prototype!=null&&ME in t.prototype?t.prototype[ME]():void 0,i=(function(l){if(!(l===ar||l.prototype instanceof ar)){let u="<unknown>",c="<unknown>";try{u=l.getType()}catch{}try{du.version&&(c=JSON.parse(du.version))}catch{}de(290,l.name,u,c)}return l===us||l===$i||l===ar})(t),r=!i&&kf(t,"getType")?t.getType():void 0;let s,o=r;if(n)if(r)s=n[r];else{for(const[l,u]of Object.entries(n))o=l,s=u;if(!s)for(const l of Object.getOwnPropertySymbols(n)){const u=n[l];if(u){s=u;break}}}if(!i&&o&&(kf(t,"getType")||(t.getType=()=>o),kf(t,"clone")||(t.clone=l=>(UC(l),new t)),kf(t,"importJSON")||(t.importJSON=s&&s.$importJSON||(l=>new t().updateFromJSON(l))),!kf(t,"importDOM")&&s)){const{importDOM:l}=s;l&&(t.importDOM=()=>l)}const a={klass:t,ownNodeConfig:s,ownNodeType:o};return $T.set(t,a),a}function*zp(t){for(let e=t;e&&(e===ar||MC(e.prototype));){const n=Zp(e);yield n,e=n.ownNodeConfig&&n.ownNodeConfig.extends||Z4(e)}}function TX(t){const e=new Map,n=new Map;for(const i of t){const{ownNodeType:r}=Zp(i);r&&(n.set(r,i),e.set(r,new Set))}for(const[i,r]of n)for(const{ownNodeType:s}of zp(r)){const o=s&&e.get(s);o&&o.add(i)}return e}function lw(t){const e=hn();return ri(),new(e.resolveRegisteredNodeAfterReplacements(e.getRegisteredNode(t))).klass}const Lt=(t,e)=>{let n=t;for(;n!=null&&!xn(n);){if(e(n))return n;n=n.getParent()}return null};function Ld(t,e){const n=[];let i=t.__first;for(;i!==null;){const r=e===null?st(i):e.get(i);r==null&&de(174),n.push(i),i=r.__next}return n}function Z4(t){const e=Object.getPrototypeOf(t);if(typeof e=="function"&&e!==Function.prototype)return e;const n=t.prototype&&Object.getPrototypeOf(t.prototype);return n?n.constructor:null}const z4=new Map;function lo(t){return W(t)||ht(t)}function nl(t){return W(t)||ht(t)}function yi(t){const e=t.getLatest();return nl(e)?e.__slotHost:null}function Yr(t){const e=yi(t);if(e===null)return null;const n=st(e);return W(n)||ht(n)||de(370),n}function X4(t){const e=Yr(t);if(e===null)return null;const n=t.getLatest().__key;for(const[i,r]of E1(e))if(r===n)return i;return null}function Xp(t){let e=t.getLatest();for(;e!==null;){if(yi(e)!==null)return e;e=e.getParent()}return null}function E1(t){const e=t.getLatest();return lo(e)&&e.__slots!==null?e.__slots:z4}function Pr(t){return Array.from(E1(t).keys())}function Jo(t,e){const n=E1(t).get(e);return n===void 0?null:st(n)}const PX=["__proto__","constructor","prototype"],IT=Symbol("slotMapOwner");function tS(t){let e=t.__slots;return e!==null&&e[IT]===t||(e=new Map(e),e[IT]=t,t.__slots=e),e}const RT=new WeakMap,AX=[];function W4(t){for(const{ownNodeConfig:e}of zp(t)){const n=e&&e.slots;if(n)return n}return AX}function H4(t){let e="";for(const n of Pr(t)){const i=Jo(t,n);i!==null&&(e+=i.getTextContent())}return e}function MT(t,e,n){const i=n.get(t),r=n.get(e);return i!==void 0?r!==void 0?i-r:-1:r!==void 0?1:t<e?-1:t>e?1:0}function $X(t){const e=t.__slots;if(e===null||e.size<2)return;const n=(function(o){let a=RT.get(o);if(a===void 0){const l=W4(o),u=new Map;for(const c of l)PX.includes(c)&&de(371,o.name,c),u.has(c)&&de(372,o.name,c),u.set(c,u.size);a=u,RT.set(o,a)}return a})(t.constructor);let i=null,r=!0;for(const o of e.keys()){if(i!==null&&MT(i,o,n)>0){r=!1;break}i=o}if(r)return;const s=Array.from(e).sort(([o],[a])=>MT(o,a,n));e.clear();for(const[o,a]of s)e.set(o,a)}function uw(t,e,n){e!=="__proto__"&&e!=="constructor"&&e!=="prototype"||de(373,e);const i=t.getLatest();if(i.__slots!==null&&i.__slots.get(e)===n.getLatest().__key)return i;(!W(n)&&!ht(n)||n.isInline())&&de(374,n.__key);const r=t.getWritable(),s=tS(r),o=s.get(e);o!==void 0&&q4(o);const a=n.getWritable(),l=Yr(a);if(l!==null){const u=X4(a);u!==null&&tS(l.getWritable()).delete(u),a.__slotHost=null}return ks(a),a.__slotHost=r.__key,s.set(e,a.__key),$X(r),(function(){const u=hn();u._slotsUsed=!0,u._pendingEditorState&&(u._pendingEditorState._slotsUsed=!0)})(),r}function U4(t,e){const n=t.getWritable();if(n.__slots===null)return n;const i=n.__slots.get(e);return i!==void 0&&(q4(i),tS(n).delete(e)),n}function q4(t){const e=st(t);if(e===null)return;const n=e.getWritable();nl(n)||de(377,t),n.__slotHost=null,n.remove()}const IX={next:"previous",previous:"next"};class T1{constructor(e){se(this,"origin");this.origin=e}[Symbol.iterator](){return fw({hasNext:po,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return Rt(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return Rt(this.origin,this.direction)}remove(){const e=this.getNodeAtCaret();return e&&e.remove(),this}replaceOrInsert(e,n){const i=this.getNodeAtCaret();return e.is(this.origin)||e.is(i)||(i===null?this.insert(e):i.replace(e,n)),this}splice(e,n,i="next"){const r=i===this.direction?n:Array.from(n).reverse();let s=this;const o=this.getParentAtCaret(),a=new Map;for(let l=s.getAdjacentCaret();l!==null&&a.size<e;l=l.getAdjacentCaret()){const u=l.origin.getWritable();a.set(u.getKey(),u)}for(const l of r){if(a.size>0){const u=s.getNodeAtCaret();if(u){if(a.delete(u.getKey()),a.delete(l.getKey()),!(u.is(l)||s.origin.is(l))){const c=l.getParent();c&&c.is(o)&&l.remove(),u.replace(l)}}else u===null&&de(263,Array.from(a).join(" "))}else s.insert(l);s=Rt(l,this.direction)}for(const l of a.values())l.remove();return this}}class Dd extends T1{constructor(){super(...arguments);se(this,"type","child")}getLatest(){const n=this.origin.getLatest();return n===this.origin?this:Ii(n,this.direction)}getParentCaret(n="root"){return Rt(cw(this.getParentAtCaret(),n),this.direction)}getFlipped(){const n=ma(this.direction);return Rt(this.getNodeAtCaret(),n)||Ii(this.origin,n)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(n){return n instanceof Dd&&this.direction===n.direction&&this.origin.is(n.origin)}isSamePointCaret(n){return this.isSameNodeCaret(n)}}const RX={root:xn,shadowRoot:It};function ma(t){return IX[t]}function cw(t,e="root"){return t===null||RX[e](t)?null:yi(t)===null?t:null}class Ou extends T1{constructor(){super(...arguments);se(this,"type","sibling")}getLatest(){const n=this.origin.getLatest();return n===this.origin?this:Rt(n,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return W(this.origin)?Ii(this.origin,this.direction):null}getParentCaret(n="root"){return Rt(cw(this.getParentAtCaret(),n),this.direction)}getFlipped(){const n=ma(this.direction);return Rt(this.getNodeAtCaret(),n)||Ii(this.origin.getParentOrThrow(),n)}isSamePointCaret(n){return n instanceof Ou&&this.direction===n.direction&&this.origin.is(n.origin)}isSameNodeCaret(n){return(n instanceof Ou||n instanceof xu)&&this.direction===n.direction&&this.origin.is(n.origin)}}class xu extends T1{constructor(n,i){super(n);se(this,"type","text");se(this,"offset");this.offset=i}getLatest(){const n=this.origin.getLatest();return n===this.origin?this:ea(n,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(n="root"){return Rt(cw(this.getParentAtCaret(),n),this.direction)}getFlipped(){return ea(this.origin,ma(this.direction),this.offset)}isSamePointCaret(n){return n instanceof xu&&this.direction===n.direction&&this.origin.is(n.origin)&&this.offset===n.offset}isSameNodeCaret(n){return(n instanceof Ou||n instanceof xu)&&this.direction===n.direction&&this.origin.is(n.origin)}getSiblingCaret(){return Rt(this.origin,this.direction)}}function Ar(t){return t instanceof xu}function MX(t){return t instanceof T1}function po(t){return t instanceof Ou}function ur(t){return t instanceof Dd}const NX={next:class extends xu{constructor(){super(...arguments);se(this,"direction","next")}getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends xu{constructor(){super(...arguments);se(this,"direction","previous")}getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},LX={next:class extends Ou{constructor(){super(...arguments);se(this,"direction","next")}getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends Ou{constructor(){super(...arguments);se(this,"direction","previous")}getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},DX={next:class extends Dd{constructor(){super(...arguments);se(this,"direction","next")}getNodeAtCaret(){return this.origin.getFirstChild()}insert(e){return this.origin.splice(0,0,[e]),this}},previous:class extends Dd{constructor(){super(...arguments);se(this,"direction","previous")}getNodeAtCaret(){return this.origin.getLastChild()}insert(e){return this.origin.splice(this.origin.getChildrenSize(),0,[e]),this}}};function Rt(t,e){return t?new LX[e](t):null}function ea(t,e,n){return t?new NX[e](t,Ts(t,n)):null}function Ts(t,e,n="error"){const i=t.getTextContentSize();let r=e==="next"?i:e==="previous"?0:e;return(r<0||r>i)&&(n!=="clamp"&&a6(284,String(e),String(i),t.getKey()),r=r<0?0:i),r}function nS(t,e){return new G4(t,e)}function Ii(t,e){return W(t)?new DX[e](t):null}function Y4(t){return t&&t.getChildCaret()||t}function yu(t){return t&&Y4(t.getAdjacentCaret())}class hw{constructor(e,n,i){se(this,"type","node-caret-range");se(this,"direction");se(this,"anchor");se(this,"focus");this.anchor=e,this.focus=n,this.direction=i}getLatest(){const e=this.anchor.getLatest(),n=this.focus.getLatest();return e===this.anchor&&n===this.focus?this:new hw(e,n,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const e=r=>{const s=this[r].getLatest();return Ar(s)?(function(o,a){const{direction:l,origin:u}=o,c=Ts(u,a==="focus"?ma(l):l);return nS(o,c-o.offset)})(s,r):null},n=e("anchor"),i=e("focus");if(n&&i){const{caret:r}=n,{caret:s}=i;if(r.isSameNodeCaret(s))return[nS(r,s.offset-r.offset),null]}return[n,i]}iterNodeCarets(e="root"){const n=Ar(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),i=this.focus.getLatest(),r=Ar(i),s=o=>o.isSameNodeCaret(i)?null:yu(o)||o.getParentCaret(e);return fw({hasNext:o=>o!==null&&!(r&&i.isSameNodeCaret(o)),initial:n.isSameNodeCaret(i)?null:s(n),map:o=>o,step:s})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class G4{constructor(e,n){se(this,"type","slice");se(this,"caret");se(this,"distance");this.caret=e,this.distance=n}getSliceIndices(){const{distance:e,caret:{offset:n}}=this,i=n+e;return i<n?[i,n]:[n,i]}getTextContent(){const[e,n]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(e,n)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){const{caret:{origin:e,direction:n}}=this,[i,r]=this.getSliceIndices(),s=e.getTextContent();return ea(e.setTextContent(s.slice(0,i)+s.slice(r)),n,i)}}function QX(t){return t instanceof G4}function Wp(t){return ns(t,Rt(pt(),t.direction))}function Zh(t){return ns(t,t)}function ns(t,e){return t.direction!==e.direction&&de(265),new hw(t,e,t.direction)}function fw(t){const{initial:e,hasNext:n,step:i,map:r}=t;let s=e;return{[Symbol.iterator](){return this},next(){if(!n(s))return{done:!0,value:void 0};const o={done:!1,value:r(s)};return s=i(s),o}}}function rh(t,e){const n=Q0(t.origin,e.origin);switch(n===null&&de(275,t.origin.getKey(),e.origin.getKey()),n.type){case"same":{const i=t.type==="text",r=e.type==="text";return i&&r?(function(s,o){return Math.sign(s-o)})(t.offset,e.offset):t.type===e.type?0:i?-1:r?1:t.type==="child"?-1:1}case"ancestor":return t.type==="child"?-1:1;case"descendant":return e.type==="child"?1:-1;case"branch":return dw(n)}}function dw(t){const{a:e,b:n}=t,i=e.__key,r=n.__key;let s=e,o=n;for(;s&&o;s=s.getNextSibling(),o=o.getNextSibling()){if(s.__key===r)return-1;if(o.__key===i)return 1}return s===null?1:-1}function Zm(t,e){return e.is(t)}function NT(t){return W(t)?[t.getLatest(),null]:[t.getParent(),t.getLatest()]}function Q0(t,e){if(t.is(e))return{commonAncestor:t,type:"same"};const n=new Map;for(let[i,r]=NT(t);i;r=i,i=i.getParent())n.set(i,r);for(let[i,r]=NT(e);i;r=i,i=i.getParent()){const s=n.get(i);if(s!==void 0)return s===null?(Zm(t,i)||de(276),{commonAncestor:i,type:"ancestor"}):r===null?(Zm(e,i)||de(277),{commonAncestor:i,type:"descendant"}):((W(s)||Zm(t,s))&&(W(r)||Zm(e,r))&&i.is(s.getParent())&&i.is(r.getParent())||de(278),{a:s,b:r,commonAncestor:i,type:"branch"})}return null}function bi(t,e){const{type:n,key:i,offset:r}=t,s=R4(t.key);return n==="text"?(le(s)||de(266,s.getType(),i),ea(s,e,r)):(W(s)||de(267,s.getType(),i),B0(s,t.offset,e))}function ta(t,e){const{origin:n,direction:i}=e,r=i==="next";Ar(e)?t.set(n.getKey(),e.offset,"text"):po(e)?le(n)?t.set(n.getKey(),Ts(n,i),"text"):t.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+(r?1:0),"element"):(ur(e)&&W(n)||de(268),t.set(n.getKey(),r?0:n.getChildrenSize(),"element"))}function vu(t){const e=me(),n=ae(e)?e:Lu();return sd(n,t),yn(n),n}function sd(t,e){ta(t.anchor,e.anchor),ta(t.focus,e.focus)}function V0(t){const{anchor:e,focus:n}=t,i=bi(e,"next"),r=bi(n,"next"),s=rh(i,r)<=0?"next":"previous";return ns(mo(i,s),mo(r,s))}function ga(t){const{direction:e,origin:n}=t,i=Rt(n,ma(e)).getNodeAtCaret();return i?Rt(i,e):Ii(n.getParentOrThrow(),e)}function LT(t,e="root"){const n=[t];for(let i=ur(t)?t.getParentCaret(e):t.getSiblingCaret();i!==null;i=i.getParentCaret(e))n.push(ga(i));return n}function hy(t){return!!t&&t.origin.isAttached()}function K4(t,e="removeEmptySlices"){if(t.isCollapsed())return t;const n="root",i="next";let r=e;const s=A1(t,i),o=LT(s.anchor,n),a=LT(s.focus.getFlipped(),n),l=new Set,u=[];for(const m of s.iterNodeCarets(n))if(ur(m))l.add(m.origin.getKey());else if(po(m)){const{origin:g}=m;W(g)&&!l.has(g.getKey())||u.push(g)}for(const m of u)m.remove();for(const m of s.getTextSlices()){if(!m)continue;const{origin:g}=m.caret,x=g.getTextContentSize(),y=ga(Rt(g,i)),S=g.getMode();if(Math.abs(m.distance)===x&&r==="removeEmptySlices"||S==="token"&&m.distance!==0)y.remove();else if(m.distance!==0){r="removeEmptySlices";let _=m.removeTextSlice();const k=m.caret.origin;if(S==="segmented"){const w=_.origin,b=Vt(w.getTextContent()).setStyle(w.getStyle()).setFormat(w.getFormat());y.replaceOrInsert(b),_=ea(b,i,_.offset)}k.is(o[0].origin)&&(o[0]=_),k.is(a[0].origin)&&(a[0]=_.getFlipped())}}let c,h;for(const m of o)if(hy(m)){c=vi(m);break}for(const m of a)if(hy(m)){h=vi(m);break}const f=(function(m,g,x){if(!m||!g)return null;const y=m.getParentAtCaret(),S=g.getParentAtCaret();if(!y||!S)return null;const _=y.getParents().reverse();_.push(y);const k=S.getParents().reverse();k.push(S);const w=Math.min(_.length,k.length);let b;for(b=0;b<w&&_[b]===k[b];b++);const E=(B,X)=>{let j;for(let Z=b;Z<B.length;Z++){const G=B[Z];if(It(G))return;!j&&X(G)&&(j=G)}return j},P=E(_,ti),$=P&&E(k,B=>x.has(B.getKey())&&ti(B));return $&&Pr($).length>0?null:P&&$?[P,$]:null})(c,h,l);if(f){const[m,g]=f;Ii(m,"previous").splice(0,g.getChildren());let x=g.getParent();for(g.remove(!0);x&&x.isEmpty();){const y=x;x=x.getParent(),y.remove(!0)}}else if(h){const m=(function(y){if(ur(y)){const S=y.origin;if(ti(S))return S}else{const S=y.getParentAtCaret();if(S&&ti(S))return S}return null})(h),g=m&&m.getParent(),x=m&&m.getParents().findLast(nu);if(m&&g&&!xn(g)&&m.isEmpty()&&l.has(m.getKey())&&Pr(m).length===0&&(!x||l.has(x.getKey()))){m.remove(!0);let y=g;for(;y&&!xn(y)&&y.isEmpty();){const S=y.getParent();if(S&&xn(S)&&S.getChildrenSize()<=1)break;const _=y;y=S,_.remove(!0)}}}const p=[c,h,...o,...a].find(hy);if(p)return Zh(mo(vi(p),t.direction));de(269,JSON.stringify(o.map(m=>m.origin.__key)))}function vi(t){const e=(function(r){let s=r;for(;ur(s);){const o=yu(s);if(!ur(o))break;s=o}return s})(t.getLatest()),{direction:n}=e;if(le(e.origin))return Ar(e)?e:ea(e.origin,n,n);const i=e.getAdjacentCaret();return po(i)&&le(i.origin)?ea(i.origin,n,ma(n)):e}function P1(t){return Ar(t)&&t.offset!==Ts(t.origin,t.direction)}function mo(t,e){return t.direction===e?t:t.getFlipped()}function A1(t,e){return t.direction===e?t:ns(mo(t.focus,e),mo(t.anchor,e))}function B0(t,e,n){let i=Ii(t,"next");for(let r=0;r<e;r++){const s=i.getAdjacentCaret();if(s===null)break;i=s}return mo(i,n)}function VX(t,e="root"){let n=0,i=t,r=yu(i);for(;r===null;){if(n--,r=i.getParentCaret(e),!r)return null;i=r,r=yu(i)}return r&&[r,n]}function BX(t){const{origin:e,offset:n,direction:i}=t;if(n===Ts(e,i))return t.getSiblingCaret();if(n===Ts(e,ma(i)))return ga(t.getSiblingCaret());const[r]=e.splitText(n);return le(r)||de(281),mo(Rt(r,"next"),i)}function FX(t,e){return!0}function pw(t,{$copyElementNode:e=qn,$splitTextPointCaretNext:n=BX,rootMode:i="shadowRoot",$shouldSplit:r=FX,removeEmptyDestination:s=!1}={}){if(Ar(t))return n(t);const o=t.getParentCaret(i);if(o){const{origin:a}=o;if(ur(t)){const u=ga(o);if(s&&a.isEmpty())return a.remove(),u;if(!a.canBeEmpty()||!r(a,"first"))return u}const l=(function(u){const c=[];for(let h=u.getAdjacentCaret();h;h=h.getAdjacentCaret())c.push(h.origin);return c})(t);(l.length>0||!s&&a.canBeEmpty()&&r(a,"last"))&&o.insert(e(a).splice(0,0,l))}return o}function Hp(t,e,n){let i=mo(e,"next");Ar(i)&&(i.offset===0?i=Rt(i.origin,"previous").getFlipped():i.offset===i.origin.getTextContentSize()&&(i=Rt(i.origin,"next"))),i.origin.is(t)&&(po(i)||de(342,t.getKey(),t.getType()),i=ga(i)),(t.is(i.getNodeAtCaret())||t.is(i.getFlipped().getNodeAtCaret()))&&t.remove(!0);for(let r=i;r;r=pw(r,n))i=r;return Ar(i)&&de(283),i.insert(t.isInline()?ut().append(t):t),mo(Rt(t.getLatest(),"next"),e.direction)}function jX(t){return t}function Hl(...t){return t}function J4(t,e){return[t,e]}function ZX(t){return t}function Up(t,e){if(!e||t===e)return t;for(const n in e)if(t[n]!==e[n])return{...t,...e};return t}function uo(...t){const e=[];for(const n of t)if(n&&typeof n=="string")for(const[i]of n.matchAll(/\S+/g))e.push(i);return e}function as(t,...e){const n=uo(...e);n.length>0&&t.classList.add(...n)}function qp(t,...e){const n=uo(...e);n.length>0&&t.classList.remove(...n)}function wn(...t){return()=>{for(let e=t.length-1;e>=0;e--)t[e]();t.length=0}}function iS(t,e,n){return wn(...Object.entries(e).map(([i,r])=>g1(t,i,r,n)))}const zX=Object.freeze(Object.defineProperty({__proto__:null,$addUpdateTag:Is,$applyNodeReplacement:Ui,$assumeActiveEditor:l4,$caretFromPoint:bi,$caretRangeFromSelection:V0,$cloneWithProperties:k1,$cloneWithPropertiesEphemeral:B4,$comparePointCaretNext:rh,$copyNode:qn,$create:lw,$createChildrenArray:Ld,$createLineBreakNode:Xi,$createNodeSelection:eh,$createParagraphNode:ut,$createPoint:$s,$createRangeSelection:Lu,$createRangeSelectionFromDom:Kz,$createTabNode:Qh,$createTextNode:Vt,$extendCaretToRange:Wp,$findMatchingParent:Lt,$formatText:FC,$fullReconcile:ZC,$generateNodesFromRawText:th,$getAdjacentChildCaret:yu,$getAdjacentNode:P4,$getAdjacentSiblingOrParentSiblingCaret:VX,$getCaretInDirection:mo,$getCaretRange:ns,$getCaretRangeInDirection:A1,$getCharacterOffsets:P0,$getChildCaret:Ii,$getChildCaretAtIndex:B0,$getChildCaretOrSelf:Y4,$getCollapsedCaretRange:Zh,$getCommonAncestor:Q0,$getCommonAncestorResultBranchOrder:dw,$getDOMSlot:Ir,$getDOMTextNode:Zo,$getDocument:rn,$getEditor:hn,$getEditorDOMRenderConfig:jp,$getNearestNodeFromDOMNode:os,$getNearestRootOrShadowRoot:iw,$getNodeByKey:st,$getNodeByKeyOrThrow:R4,$getNodeFromDOMNode:GC,$getPreviousSelection:ha,$getRoot:pt,$getSelection:me,$getSiblingCaret:Rt,$getSlot:Jo,$getSlotFrame:Xp,$getSlotHost:Yr,$getSlotNameWithinHost:X4,$getSlotNames:Pr,$getState:uu,$getStateChange:Ez,$getTextContent:Jz,$getTextNodeOffset:Ts,$getTextPointCaret:ea,$getTextPointCaretSlice:nS,$getWritableNodeState:CC,$hasAncestor:pu,$hasUpdateTag:OX,$insertNodeToNearestRootAtCaret:Hp,$insertNodes:Du,$isBlockElementNode:el,$isChildCaret:ur,$isDecoratorNode:ht,$isEditorState:m4,$isElementDOMSlot:V4,$isElementNode:W,$isExtendableTextPointCaret:P1,$isInlineElementOrDecoratorNode:I4,$isInlineFormattable:T0,$isLeafNode:YC,$isLexicalNode:MC,$isLineBreakNode:Gn,$isNodeCaret:MX,$isNodeSelection:Ct,$isParagraphNode:Qu,$isRangeSelection:ae,$isRootNode:xn,$isRootOrShadowRoot:It,$isSelectionCapturedInDecoratorInput:Fp,$isShadowRootNode:nu,$isSiblingCaret:po,$isSlotChild:nl,$isSlotHost:lo,$isTabNode:Ja,$isTextNode:le,$isTextPointCaret:Ar,$isTextPointCaretSlice:QX,$isTokenOrSegmented:rr,$isTokenOrTab:Ha,$markSlotEditable:j4,$needsBlockCursorBeside:rd,$nodesOfType:gX,$normalizeCaret:vi,$normalizeSelection__EXPERIMENTAL:Cs,$onUpdate:$4,$parseSerializedNode:f4,$removeFromParent:ks,$removeSlot:U4,$removeTextFromCaretRange:K4,$rewindSiblingCaret:ga,$selectAll:T4,$setCompositionKey:Un,$setDirectionFromDOM:Mr,$setFormatFromDOM:Qs,$setPointFromCaret:ta,$setSelection:yn,$setSelectionFromCaretRange:vu,$setSlot:uw,$setState:Kl,$setTextFormat:G6,$splitAtPointCaretNext:pw,$splitNode:vX,$updateDOMSelection:o4,$updateRangeSelectionFromCaretRange:sd,ArtificialNode__DO_NOT_USE:b1,BEFORE_INPUT_COMMAND:wC,BLUR_COMMAND:Vp,CAN_REDO_COMMAND:Ma,CAN_UNDO_COMMAND:Na,CAN_USE_BEFORE_INPUT:lu,CAN_USE_DOM:Ri,CLEAR_EDITOR_COMMAND:N6,CLEAR_HISTORY_COMMAND:L6,CLICK_COMMAND:Rp,COLLABORATION_TAG:DC,COMMAND_PRIORITY_BEFORE_CRITICAL:uX,COMMAND_PRIORITY_BEFORE_EDITOR:g4,COMMAND_PRIORITY_BEFORE_HIGH:lX,COMMAND_PRIORITY_BEFORE_LOW:oX,COMMAND_PRIORITY_BEFORE_NORMAL:aX,COMMAND_PRIORITY_CRITICAL:cr,COMMAND_PRIORITY_EDITOR:tt,COMMAND_PRIORITY_HIGH:Id,COMMAND_PRIORITY_LOW:Gt,COMMAND_PRIORITY_NORMAL:sX,COMPOSITION_END_COMMAND:TC,COMPOSITION_END_TAG:Jc,COMPOSITION_START_COMMAND:EC,COMPOSITION_START_TAG:VC,CONTROLLED_TEXT_INSERTION_COMMAND:eu,COPY_COMMAND:Qp,CUT_COMMAND:m1,CUT_TAG:LC,DEFAULT_EDITOR_DOM_CONFIG:Rd,DELETE_CHARACTER_COMMAND:za,DELETE_LINE_COMMAND:Kc,DELETE_WORD_COMMAND:Gc,DRAGEND_COMMAND:M6,DRAGOVER_COMMAND:p1,DRAGSTART_COMMAND:Dp,DROP_COMMAND:d1,DecoratorNode:us,ElementNode:$i,FOCUS_COMMAND:Dh,FORMAT_ELEMENT_COMMAND:R6,FORMAT_TEXT_COMMAND:no,HISTORIC_TAG:Xa,HISTORY_MERGE_TAG:Tc,HISTORY_PUSH_TAG:O1,INDENT_CONTENT_COMMAND:Td,INPUT_COMMAND:kC,INSERT_LINE_BREAK_COMMAND:Jl,INSERT_PARAGRAPH_COMMAND:Yc,INSERT_TAB_COMMAND:IC,INTERNAL_$isBlock:ti,IS_ALL_FORMATTING:az,IS_ANDROID:vC,IS_ANDROID_CHROME:Sd,IS_APPLE:jr,IS_APPLE_WEBKIT:Ah,IS_BOLD:Ab,IS_CHROME:bC,IS_CODE:l6,IS_FIREFOX:ho,IS_HIGHLIGHT:o1,IS_IOS:Ko,IS_ITALIC:$b,IS_SAFARI:Ph,IS_STRIKETHROUGH:Ib,IS_SUBSCRIPT:zg,IS_SUPERSCRIPT:Xg,IS_UNDERLINE:Rb,KEY_ARROW_DOWN_COMMAND:c1,KEY_ARROW_LEFT_COMMAND:l1,KEY_ARROW_RIGHT_COMMAND:PC,KEY_ARROW_UP_COMMAND:u1,KEY_BACKSPACE_COMMAND:Nh,KEY_DELETE_COMMAND:f1,KEY_DOWN_COMMAND:Mh,KEY_ENTER_COMMAND:Ka,KEY_ESCAPE_COMMAND:Lh,KEY_MODIFIER_COMMAND:D6,KEY_SPACE_COMMAND:h1,KEY_TAB_COMMAND:Lp,LineBreakNode:yl,MOVE_TO_END:AC,MOVE_TO_START:$C,NODE_STATE_DIRECT:Lb,NODE_STATE_KEY:vz,NODE_STATE_LATEST:Db,OUTDENT_CONTENT_COMMAND:C0,PASTE_COMMAND:Rh,PASTE_TAG:NC,ParagraphNode:da,REDO_COMMAND:Np,REMOVE_TEXT_COMMAND:nd,RootNode:fa,SELECTION_CHANGE_COMMAND:Ih,SELECTION_INSERT_CLIPBOARD_NODES_COMMAND:$6,SELECT_ALL_COMMAND:RC,SET_TEXT_FORMAT_COMMAND:I6,SKIP_COLLAB_TAG:jz,SKIP_DOM_SELECTION_TAG:QC,SKIP_SCROLL_INTO_VIEW_TAG:X6,SKIP_SELECTION_FOCUS_TAG:Ad,TEXT_TYPE_TO_FORMAT:ei,TabNode:xl,TextNode:Rr,UNDO_COMMAND:Mp,addClassNamesToElement:as,buildImportMap:Fz,configExtension:Hl,createCommand:Ue,createEditor:HC,createRefCountedRegistry:Q6,createSharedNodeState:v6,createState:$h,declarePeerDependency:J4,defineExtension:jX,findAllLexicalElementsDeep:sw,flipDirection:ma,getActiveElement:ih,getActiveElementDeep:mu,getComposedEventTarget:w1,getComposedStaticRange:jh,getDOMOwnerDocument:_1,getDOMSelection:Mi,getDOMSelectionFromTarget:M4,getDOMSelectionPoints:$r,getDOMSelectionRange:N4,getDOMSelectionRangeAndPoints:yX,getDOMShadowRoots:rw,getDOMTextNode:v4,getDeclaredSlots:W4,getEditorPropertyFromDOMNode:Vu,getNearestEditorFromDOMNode:Wa,getParentElement:pa,getRegisteredNode:S1,getRegisteredNodeOrThrow:qC,getRegisteredSubtypeMap:TX,getRootOwnerDocument:C1,getStaticNodeConfig:Zp,getStyleObjectFromCSS:$d,getTextDirection:pX,getTransformSetFromKlass:x4,isBlockDomNode:gu,isCurrentlyReadOnlyMode:fu,isDOMCapturingSelection:Nd,isDOMDocumentNode:vl,isDOMNode:Bu,isDOMShadowRoot:fo,isDOMTextNode:Hi,isDOMUnmanaged:aw,isDocumentFragment:D0,isExactShortcutMatch:jt,isHTMLAnchorElement:ow,isHTMLElement:Je,isHTMLTableCellElement:SX,isHTMLTableRowElement:bX,isInlineDomNode:Md,isLastChildInBlockNode:WC,isLexicalEditor:Bh,isModifierMatch:E4,isOnlyChildInBlockNode:XC,isSelectionCapturedInDecoratorInput:dX,isSelectionWithinEditor:Vh,iterStaticNodeConfigChain:zp,makeStepwiseIterator:fw,mergeRegister:wn,mountSlotContainer:wX,normalizeClassNames:uo,registerEventListener:g1,registerEventListeners:iS,removeClassNamesFromElement:qp,removeFromParent:mX,resetRandomKey:hX,safeCast:ZX,setDOMStyleFromCSS:tu,setDOMStyleObject:zz,setDOMUnmanaged:F4,setNodeIndentFromDOM:bl,shallowMergeConfig:Up,stopLexicalPropagation:Ub,toggleTextFormatType:tl,tokenizeRawText:jC,unmountSlotContainer:kX},Symbol.toStringTag,{value:"Module"}));function XX(t,...e){const n=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",t);for(const r of e)i.append("v",r);throw n.search=i.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function DT(t){let e=t;for(;e!=null;){if(e.nodeType===Node.TEXT_NODE)return e;e=e.firstChild}return null}function QT(t){const e=t.parentNode;if(e==null)throw new Error("Should never happen");return[e,Array.from(e.childNodes).indexOf(t)]}function VT(t,e,n,i,r){const s=e.getKey(),o=i.getKey(),a=C1(t.getRootElement()).createRange();let l=t.getElementByKey(s),u=t.getElementByKey(o),c=n,h=r;if(le(e)&&(l=DT(l)),le(i)&&(u=DT(u)),e===void 0||i===void 0||l===null||u===null)return null;l.nodeName==="BR"&&([l,c]=QT(l)),u.nodeName==="BR"&&([u,h]=QT(u));const f=l.firstChild;l===u&&f!=null&&f.nodeName==="BR"&&c===0&&h===0&&(h=1);try{a.setStart(l,c),a.setEnd(u,h)}catch{return null}return!a.collapsed||c===h&&s===o||(a.setStart(u,h),a.setEnd(l,c)),a}function eR(t){const e=hn().getElementByKey(t.getKey());if(e===null)return null;const n=e.ownerDocument.defaultView;return n===null?null:n.getComputedStyle(e)}function tR(t){return eR(xn(t)?t:t.getParentOrThrow())}function zm(t){const e=tR(t);return e!==null&&e.direction==="rtl"}function nR(t,e,n="self"){const i=t.getStartEndPoints();if(e.isSelected(t)&&!rr(e)&&i!==null){const[r,s]=i,o=t.isBackward(),a=r.getNode(),l=s.getNode(),u=e.is(a),c=e.is(l);if(u||c){const[h,f]=P0(t),p=a.is(l),m=e.is(o?l:a),g=e.is(o?a:l);let x,y=0;p?(y=h>f?f:h,x=h>f?h:f):m?(y=o?f:h,x=void 0):g&&(y=0,x=o?h:f);const S=e.__text.slice(y,x);S!==e.__text&&(n==="clone"&&(e=B4(e)),e.__text=S)}}return e}function BT(t){if(t.type==="text")return t.offset===t.getNode().getTextContentSize();const e=t.getNode();return W(e)||XX(177),t.offset===e.getChildrenSize()}function WX(t,e,n){let i=e.getNode(),r=n;if(W(i)){const s=i.getDescendantByIndex(e.offset);s!==null&&(i=s)}for(;r>0&&i!==null;){if(W(i)){const u=i.getLastDescendant();u!==null&&(i=u)}let s=i.getPreviousSibling(),o=0;if(s===null){let u=i.getParentOrThrow(),c=u.getPreviousSibling();for(;c===null;){if(u=u.getParent(),u===null){s=null;break}c=u.getPreviousSibling()}u!==null&&(o=u.isInline()?0:2,s=c)}let a=i.getTextContent();a===""&&W(i)&&!i.isInline()&&(a=`
|
|
32
|
+
|
|
33
|
+
`);const l=a.length;if(!le(i)||r>=l){const u=i.getParent();i.remove(),u==null||u.getChildrenSize()!==0||xn(u)||u.remove(),r-=l+o,i=s}else{const u=i.getKey(),c=t.read("latest",()=>{const p=st(u);return le(p)&&p.isSimpleText()?p.getTextContent():null}),h=l-r,f=a.slice(0,h);if(c!==null&&c!==a){const p=ha();let m=i;if(i.isSimpleText())i.setTextContent(c);else{const g=Vt(c);i.replace(g),m=g}if(ae(p)&&p.isCollapsed()){const g=p.anchor.offset;m.select(g,g)}}else if(i.isSimpleText()){const p=e.key===u;let m=e.offset;m<r&&(m=l);const g=p?m-r:0,x=p?m:h;if(p&&g===0){const[y]=i.splitText(g,x);y.remove()}else{const[,y]=i.splitText(g,x);y.remove()}}else{const p=Vt(f);i.replace(p)}r=0}}}function HX(t,e){const n=t.getFormatType(),i=t.getIndent();n!==e.getFormatType()&&e.setFormat(n),i!==e.getIndent()&&e.setIndent(i)}function UX(t,e,n){let i=bi(t,n);if(P1(i))return!1;for(;i;i=i.getParentCaret()){const r=i.getParentAtCaret();if(!r||i.getNodeAtCaret())return!1;if(e.is(r))return!0}return!1}function qX(t,e,n=HX){if(!t)return;const i=t.getStartEndPoints();let r=!1,s=null;const o=new Map;if(i){const[a,l]=i,u=Lt(a.getNode(),ti);s=Lt(l.getNode(),ti);const c=t.isBackward()?"previous":"next";r=W(s)&&!s.is(u)&&(function(h,f,p){const m=h.getNode();return(!W(m)||!m.isEmpty())&&UX(h,f,p)})(l,s,ma(c)),W(u)&&o.set(u.getKey(),u),W(s)&&!r&&o.set(s.getKey(),s)}for(const a of t.getNodes())if(W(a)&&ti(a)){if(r&&a.is(s))continue;o.set(a.getKey(),a)}else if(!i){const l=Lt(a,ti);W(l)&&o.set(l.getKey(),l)}for(const a of o.values()){const l=e();n(a,l),a.replace(l,!0)}}function iR(t){const e=rR(t);return e!==null&&e.writingMode==="vertical-rl"}function rR(t){const e=t.anchor.getNode();return W(e)?eR(e):tR(e)}function FT(t,e){let n=iR(t)?!e:e;sR(t)&&(n=!n);const i=bi(t.focus,n?"previous":"next");if(P1(i))return!1;if(Ar(i)&&!Ja(i.origin)&&i.origin.isUnmergeable()){const r=i.getNodeAtCaret();if(le(r)&&!Ja(r))return!0}for(const r of Wp(i)){if(ur(r))return!r.origin.isInline();if(!W(r.origin)){if(ht(r.origin))return!0;break}}return!1}function YX(t,e,n,i){t.modify(e?"extend":"move",n,i)}function sR(t){const e=rR(t);return e!==null&&e.direction==="rtl"}function jT(t,e,n){const i=sR(t);let r;r=iR(t)||i?!n:n,YX(t,e,r,"character")}function GX(t,...e){const n=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",t);for(const r of e)i.append("v",r);throw n.search=i.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function oR(t,e){let n=t;for(;n!=null;){if(n instanceof e)return n;n=n.getParent()}return null}function aR(t){const e=Lt(t,n=>W(n)&&!n.isInline());return W(e)||GX(4,t.__key),e}function KX(t,e){const n=new Map,i=t._pendingEditorState;for(const[s,o]of e._nodeMap)n.set(s,k1(o));i&&(i._nodeMap=n),ZC();const r=e._selection;yn(r===null?null:r.clone())}function lR(t){const e=me()||ha();let n;if(ae(e))n=bi(e.focus,"next");else{if(e!=null){const o=e.getNodes(),a=o[o.length-1];a&&(n=Rt(a,"next"))}n=n||Ii(pt(),"previous").getFlipped().insert(ut())}const i=Hp(t,n),r=yu(i),s=ur(r)?vi(r):i;return vu(Zh(s)),t.getLatest()}function mw(t,e){const n=e();return t.replace(n),n.append(t),n}function Bo(t,e){return t!==null&&Object.getPrototypeOf(t).constructor.name===e.name}function Xm(t){let e=null;if(Bo(t,DragEvent)?e=t.dataTransfer:Bo(t,ClipboardEvent)&&(e=t.clipboardData),e===null)return[!1,[],!1];const n=e.types,i=n.includes("Files"),r=n.includes("text/html")||n.includes("text/plain");return[i,Array.from(e.files),r]}function rS(t){const e=me();if(!ae(e))return!1;const n=new Set,i=e.getNodes();for(let r=0;r<i.length;r++){const s=i[r],o=s.getKey();if(n.has(o))continue;const a=Lt(s,u=>W(u)&&!u.isInline());if(a===null)continue;const l=a.getKey();a.canIndent()&&!n.has(l)&&(n.add(l),t(a))}return n.size>0}let fy=!(ho||!Ri)&&void 0;function JX(t,e=!1){let n=1;if((function(){if(fy===void 0){const i=document.createElement("div");i.style.position="absolute",i.style.opacity="0",i.style.width="100px",i.style.left="-1000px",document.body.appendChild(i);const r=i.getBoundingClientRect();i.style.setProperty("zoom","2"),fy=i.getBoundingClientRect().width===r.width,document.body.removeChild(i)}return fy})()||e){const i=t&&t.ownerDocument.defaultView||window;for(;t;)n*=Number(i.getComputedStyle(t).getPropertyValue("zoom")),t=pa(t)}return n}const eW=Symbol.for("preact-signals");function $1(){if(zo>1)return void zo--;let t,e=!1;for(!(function(){let n=F0;for(F0=void 0;n!==void 0;)n.S.v===n.v&&(n.S.i=n.i),n=n.o})();od!==void 0;){let n=od;for(od=void 0,j0++;n!==void 0;){const i=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&cR(n))try{n.c()}catch(r){e||(t=r,e=!0)}n=i}}if(j0=0,zo--,e)throw t}function uR(t){if(zo>0)return t();sS=++tW,zo++;try{return t()}finally{$1()}}let zt,od;function ZT(t){const e=zt;zt=void 0;try{return t()}finally{zt=e}}let F0,zo=0,j0=0,tW=0,sS=0,Kg=0;function zT(t){if(zt===void 0)return;let e=t.n;return e===void 0||e.t!==zt?(e={i:0,S:t,p:zt.s,n:void 0,t:zt,e:void 0,x:void 0,r:e},zt.s!==void 0&&(zt.s.n=e),zt.s=e,t.n=e,32&zt.f&&t.S(e),e):e.i===-1?(e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=zt.s,e.n=void 0,zt.s.n=e,zt.s=e),e):void 0}function Qi(t,e){this.v=t,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=e==null?void 0:e.watched,this.Z=e==null?void 0:e.unwatched,this.name=e==null?void 0:e.name}function Qd(t,e){return new Qi(t,e)}function cR(t){for(let e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function XT(t){for(let e=t.s;e!==void 0;e=e.n){const n=e.S.n;if(n!==void 0&&(e.r=n),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function hR(t){let e,n=t.s;for(;n!==void 0;){const i=n.p;n.i===-1?(n.S.U(n),i!==void 0&&(i.n=n.n),n.n!==void 0&&(n.n.p=i)):e=n,n.S.n=n.r,n.r!==void 0&&(n.r=void 0),n=i}t.s=e}function oc(t,e){Qi.call(this,void 0),this.x=t,this.s=void 0,this.g=Kg-1,this.f=4,this.W=e==null?void 0:e.watched,this.Z=e==null?void 0:e.unwatched,this.name=e==null?void 0:e.name}function fR(t){const e=t.m;if(t.m=void 0,typeof e=="function"){zo++;const n=zt;zt=void 0;try{e()}catch(i){throw t.f&=-2,t.f|=8,gw(t),i}finally{zt=n,$1()}}}function gw(t){for(let e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,fR(t)}function nW(t){if(zt!==this)throw new Error("Out-of-order effect");hR(this),zt=t,this.f&=-2,8&this.f&&gw(this),$1()}function pc(t,e){this.x=t,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=e==null?void 0:e.name}function zh(t,e){const n=new pc(t,e);try{n.c()}catch(r){throw n.d(),r}const i=n.d.bind(n);return i[Symbol.dispose]=i,i}function I1(t,e={}){const n={};for(const i in t){const r=e[i],s=Qd(r===void 0?t[i]:r);n[i]=s}return n}Qi.prototype.brand=eW,Qi.prototype.h=function(){return!0},Qi.prototype.S=function(t){const e=this.t;e!==t&&t.e===void 0&&(t.x=e,this.t=t,e!==void 0?e.e=t:ZT(()=>{var n;(n=this.W)==null||n.call(this)}))},Qi.prototype.U=function(t){if(this.t!==void 0){const e=t.e,n=t.x;e!==void 0&&(e.x=n,t.e=void 0),n!==void 0&&(n.e=e,t.x=void 0),t===this.t&&(this.t=n,n===void 0&&ZT(()=>{var i;(i=this.Z)==null||i.call(this)}))}},Qi.prototype.subscribe=function(t){return zh(()=>{const e=this.value,n=zt;zt=void 0;try{t(e)}finally{zt=n}},{name:"sub"})},Qi.prototype.valueOf=function(){return this.value},Qi.prototype.toString=function(){return this.value+""},Qi.prototype.toJSON=function(){return this.value},Qi.prototype.peek=function(){const t=zt;zt=void 0;try{return this.value}finally{zt=t}},Object.defineProperty(Qi.prototype,"value",{get(){const t=zT(this);return t!==void 0&&(t.i=this.i),this.v},set(t){if(t!==this.v){if(j0>100)throw new Error("Cycle detected");(function(e){zo!==0&&j0===0&&e.l!==sS&&(e.l=sS,F0={S:e,v:e.v,i:e.i,o:F0})})(this),this.v=t,this.i++,Kg++,zo++;try{for(let e=this.t;e!==void 0;e=e.x)e.t.N()}finally{$1()}}}}),oc.prototype=new Qi,oc.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Kg))return!0;if(this.g=Kg,this.f|=1,this.i>0&&!cR(this))return this.f&=-2,!0;const t=zt;try{XT(this),zt=this;const e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return zt=t,hR(this),this.f&=-2,!0},oc.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(let e=this.s;e!==void 0;e=e.n)e.S.S(e)}Qi.prototype.S.call(this,t)},oc.prototype.U=function(t){if(this.t!==void 0&&(Qi.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(let e=this.s;e!==void 0;e=e.n)e.S.U(e)}},oc.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let t=this.t;t!==void 0;t=t.x)t.t.N()}},Object.defineProperty(oc.prototype,"value",{get(){if(1&this.f)throw new Error("Cycle detected");const t=zT(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}}),pc.prototype.c=function(){const t=this.S();try{if(8&this.f||this.x===void 0)return;const e=this.x();typeof e=="function"&&(this.m=e)}finally{t()}},pc.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,fR(this),XT(this),zo++;const t=zt;return zt=this,nW.bind(this,t)},pc.prototype.N=function(){2&this.f||(this.f|=2,this.u=od,od=this)},pc.prototype.d=function(){this.f|=8,1&this.f||gw(this)},pc.prototype.dispose=function(){this.d()};function iW(t){return(typeof t.nodes=="function"?t.nodes():t.nodes)||[]}function rW(t,e){let n;return Qd(t(),{unwatched(){n&&(n(),n=void 0)},watched(){this.value=t(),n=e(this)}})}function Jt(t,...e){const n=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",t);for(const r of e)i.append("v",r);throw n.search=i.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let dR;try{dR="0.48.0+prod.esm"}catch{}const sW=dR??'"<unknown>+source"',oW=new Set(["__proto__","constructor","prototype"]);function pR(t,e){if(t&&e&&!Array.isArray(e)&&typeof t=="object"&&typeof e=="object"){const n=t,i=e;for(const r in i)!oW.has(r)&&Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=pR(n[r],i[r]));return t}return e}const Ow=0,oS=1,mR=2,dy=3,Wm=4,ac=5,py=6,Ef=7;function my(t){return t.id===Ow}function gR(t){return t.id===mR}function aW(t){return(function(e){return e.id===oS})(t)||Jt(305,String(t.id),String(oS)),Object.assign(t,{id:mR})}const lW=new Set;let uW=class{constructor(e,n){se(this,"builder");se(this,"configs");se(this,"_dependency");se(this,"_peerNameSet");se(this,"extension");se(this,"state");se(this,"_signal");this.builder=e,this.extension=n,this.configs=new Set,this.state={id:Ow}}mergeConfigs(){let e=this.extension.config||{};const n=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):Up;for(const i of this.configs)e=n(e,i);return e}init(e){const n=this.state;gR(n)||Jt(306,String(n.id));const i={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},r={...i,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},s=(function(a,l,u){return Object.assign(a,{config:l,id:dy,registerState:u})})(n,this.mergeConfigs(),i);let o;this.state=s,this.extension.init&&(o=this.extension.init(e,s.config,i)),this.state=(function(a,l,u){return Object.assign(a,{id:Wm,initResult:l,registerState:u})})(s,o,r)}build(e){const n=this.state;let i;n.id!==Wm&&Jt(307,String(n.id),String(ac)),this.extension.build&&(i=this.extension.build(e,n.config,n.registerState));const r={...n.registerState,getOutput:()=>i,getSignal:this.getSignal.bind(this)};this.state=(function(s,o,a){return Object.assign(s,{id:ac,output:o,registerState:a})})(n,i,r)}register(e,n){this._signal=n;const i=this.state;i.id!==ac&&Jt(308,String(i.id),String(ac));const r=this.extension.register&&this.extension.register(e,i.config,i.registerState);return this.state=(function(s){return Object.assign(s,{id:py})})(i),()=>{const s=this.state;s.id!==Ef&&Jt(309,String(i.id),String(Ef)),this.state=(function(o){return Object.assign(o,{id:ac})})(s),r&&r()}}afterRegistration(e){const n=this.state;let i;return n.id!==py&&Jt(310,String(n.id),String(py)),this.extension.afterRegistration&&(i=this.extension.afterRegistration(e,n.config,n.registerState)),this.state=(function(r){return Object.assign(r,{id:Ef})})(n),i}getSignal(){return this._signal===void 0&&Jt(311),this._signal}getInitResult(){this.extension.init===void 0&&Jt(312,this.extension.name);const e=this.state;return(function(n){return n.id>=Wm})(e)||Jt(313,String(e.id),String(Wm)),e.initResult}getInitPeer(e){const n=this.builder.extensionNameMap.get(e);return n?n.getExtensionInitDependency():void 0}getExtensionInitDependency(){const e=this.state;return(function(n){return n.id>=dy})(e)||Jt(314,String(e.id),String(dy)),{config:e.config}}getPeer(e){const n=this.builder.extensionNameMap.get(e);return n?n.getExtensionDependency():void 0}getInitDependency(e){const n=this.builder.getExtensionRep(e);return n===void 0&&Jt(315,this.extension.name,e.name),n.getExtensionInitDependency()}getDependency(e){const n=this.builder.getExtensionRep(e);return n===void 0&&Jt(315,this.extension.name,e.name),n.getExtensionDependency()}getState(){const e=this.state;return(function(n){return n.id>=Ef})(e)||Jt(316,String(e.id),String(Ef)),e}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||lW}getPeerNameSet(){let e=this._peerNameSet;return e||(e=new Set((this.extension.peerDependencies||[]).map(([n])=>n)),this._peerNameSet=e),e}getExtensionDependency(){if(!this._dependency){const e=this.state;(function(n){return n.id>=ac})(e)||Jt(317,this.extension.name),this._dependency={config:e.config,init:e.initResult,output:e.output}}return this._dependency}};const WT={tag:Tc};function cW(){const t=pt();t.isEmpty()&&t.append(ut())}const OR={config:{setOptions:WT,updateOptions:WT},init:({$initialEditorState:t=cW})=>({$initialEditorState:t,initialized:!1}),afterRegistration(t,{updateOptions:e,setOptions:n},i){const r=i.getInitResult();if(!r.initialized){r.initialized=!0;const{$initialEditorState:s}=r;if(m4(s))t.setEditorState(s,n);else if(typeof s=="function")t.update(()=>{s(t)},e);else if(s&&(typeof s=="string"||typeof s=="object")){const o=t.parseEditorState(s);t.setEditorState(o,n)}}return()=>{}},name:"@lexical/extension/InitialState",nodes:[fa,Rr,yl,xl,da]},HT=Symbol.for("@lexical/extension/LexicalBuilder");function hW(...t){return Xo.fromExtensions(t).buildEditor()}function UT(){}function fW(t){throw t}function Hm(t){return Array.isArray(t)?t:[t]}const gy=sW;class Xo{constructor(e){se(this,"roots");se(this,"extensionNameMap");se(this,"outgoingConfigEdges");se(this,"incomingEdges");se(this,"conflicts");se(this,"_sortedExtensionReps");se(this,"PACKAGE_VERSION");this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=gy,this.roots=e;for(const n of e)this.addExtension(n)}static fromExtensions(e){const n=[Hm(OR)];for(const i of e)n.push(Hm(i));return new Xo(n)}static maybeFromEditor(e){const n=e[HT];return n&&(n.PACKAGE_VERSION!==gy&&Jt(292,n.PACKAGE_VERSION,gy),n instanceof Xo||Jt(293)),n}static fromEditor(e){const n=Xo.maybeFromEditor(e);return n===void 0&&Jt(294),n}constructEditor(){const{$initialEditorState:e,onError:n,onWarn:i,...r}=this.buildCreateEditorArgs(),s=Object.assign(HC({...r,...n?{onError:o=>{n(o,s)}}:{},...i?{onWarn:o=>{i(o,s)}}:{}}),{[HT]:this});for(const o of this.sortedExtensionReps())o.build(s);return s}buildEditor(){let e=UT;function n(){try{e()}finally{e=UT}}const i=Object.assign(this.constructEditor(),{dispose:n,[Symbol.dispose]:n});return e=wn(this.registerEditor(i),()=>i.setRootElement(null)),i}hasExtensionByName(e){return this.extensionNameMap.has(e)}getExtensionRep(e){const n=this.extensionNameMap.get(e.name);if(n)return n.extension!==e&&Jt(295,e.name),n}addEdge(e,n,i){const r=this.outgoingConfigEdges.get(e);r?r.set(n,i):this.outgoingConfigEdges.set(e,new Map([[n,i]]));const s=this.incomingEdges.get(n);s?s.add(e):this.incomingEdges.set(n,new Set([e]))}addExtension(e){this._sortedExtensionReps!==void 0&&Jt(296);const n=Hm(e),[i]=n;typeof i.name!="string"&&Jt(297,typeof i.name);let r=this.extensionNameMap.get(i.name);if(r!==void 0&&r.extension!==i&&Jt(298,i.name),!r){r=new uW(this,i),this.extensionNameMap.set(i.name,r);const s=this.conflicts.get(i.name);typeof s=="string"&&Jt(299,i.name,s);for(const o of i.conflictsWith||[])this.extensionNameMap.has(o)&&Jt(299,i.name,o),this.conflicts.set(o,i.name);for(const o of i.dependencies||[]){const a=Hm(o);this.addEdge(i.name,a[0].name,a.slice(1)),this.addExtension(a)}for(const[o,a]of i.peerDependencies||[])this.addEdge(i.name,o,a?[a]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;const e=[],n=(i,r)=>{let s=i.state;if(gR(s))return;const o=i.extension.name;var a;my(s)||Jt(300,o,r||"[unknown]"),my(a=s)||Jt(304,String(a.id),String(Ow)),s=Object.assign(a,{id:oS}),i.state=s;const l=this.outgoingConfigEdges.get(o);if(l)for(const u of l.keys()){const c=this.extensionNameMap.get(u);c&&n(c,o)}s=aW(s),i.state=s,e.push(i)};for(const i of this.extensionNameMap.values())my(i.state)&&n(i);for(const i of e)for(const[r,s]of this.outgoingConfigEdges.get(i.extension.name)||[])if(s.length>0){const o=this.extensionNameMap.get(r);if(o)for(const a of s)o.configs.add(a)}for(const[i,...r]of this.roots)if(r.length>0){const s=this.extensionNameMap.get(i.name);s===void 0&&Jt(301,i.name);for(const o of r)s.configs.add(o)}return this._sortedExtensionReps=e,this._sortedExtensionReps}registerEditor(e){const n=this.sortedExtensionReps(),i=new AbortController,r=[()=>i.abort()],s=i.signal;for(const o of n){const a=o.register(e,s);a&&r.push(a)}for(const o of n){const a=o.afterRegistration(e);a&&r.push(a)}return wn(...r)}buildCreateEditorArgs(){const e={},n=new Set,i=new Map,r=new Map,s={},o={},a=this.sortedExtensionReps();for(const c of a){const{extension:h}=c;if(h.onError!==void 0&&(e.onError=h.onError),h.onWarn!==void 0&&(e.onWarn=h.onWarn),h.disableEvents!==void 0&&(e.disableEvents=h.disableEvents),h.parentEditor!==void 0&&(e.parentEditor=h.parentEditor),h.editable!==void 0&&(e.editable=h.editable),h.namespace!==void 0&&(e.namespace=h.namespace),h.$initialEditorState!==void 0&&(e.$initialEditorState=h.$initialEditorState),h.nodes)for(const f of iW(h)){if(typeof f!="function"){const p=i.get(f.replace);p&&Jt(302,h.name,f.replace.name,p.extension.name),i.set(f.replace,c)}n.add(f)}if(h.html){if(h.html.export)for(const[f,p]of h.html.export.entries())r.set(f,p);h.html.import&&Object.assign(s,h.html.import)}h.theme&&pR(o,h.theme)}Object.keys(o).length>0&&(e.theme=o),n.size&&(e.nodes=[...n]);const l=Object.keys(s).length>0,u=r.size>0;(l||u)&&(e.html={},l&&(e.html.import=s),u&&(e.html.export=r));for(const c of a)c.init(e);return e.onError||(e.onError=fW),e}}function dW(t,e){const n=Xo.fromEditor(t).getExtensionRep(e);return n===void 0&&Jt(303,e.name),n.getExtensionDependency()}function Fu(t,e){const n=Xo.maybeFromEditor(t);if(!n)return;const i=n.extensionNameMap.get(e);return i?i.getExtensionDependency():void 0}function pW(t){return Fu(hn(),t)}const xR=Ue("INSERT_HORIZONTAL_RULE_COMMAND");class ju extends us{static getType(){return"horizontalrule"}static clone(e){return new ju(e.__key)}static importJSON(e){return R1().updateFromJSON(e)}static importDOM(){return{hr:()=>({conversion:mW,priority:0})}}exportDOM(){return{element:rn().createElement("hr")}}createDOM(e){const n=rn().createElement("hr");return as(n,e.theme.hr),n}getTextContent(){return`
|
|
34
|
+
`}isInline(){return!1}updateDOM(){return!1}}function mW(){return{node:R1()}}function R1(){return lw(ju)}function yR(t){return t instanceof ju}const gW={build:(t,e)=>I1({inheritEditableFromParent:e.inheritEditableFromParent}),config:{$getParentEditor:function(){const t=hn();return Xo.fromEditor(t),t},inheritEditableFromParent:!1},init:(t,e,n)=>{const i=e.$getParentEditor();t.parentEditor=i,t.theme=t.theme||i._config.theme},name:"@lexical/extension/NestedEditor",register:(t,e,n)=>zh(()=>{const i=t._parentEditor;if(i&&n.getOutput().inheritEditableFromParent.value)return t.setEditable(i.isEditable()),i.registerEditableListener(t.setEditable.bind(t))})};function OW(t){return t.canIndent()}function xW(t,e,n=OW){return wn(t.registerCommand(Lp,i=>{const r=me();if(!ae(r))return!1;i.preventDefault();const s=(function(o){if(o.getNodes().filter(f=>el(f)&&f.canIndent()).length>0)return!0;const a=o.anchor,l=o.focus,u=l.isBefore(a)?l:a,c=u.getNode(),h=aR(c);if(h.canIndent()){const f=h.getKey();let p=Lu();if(p.anchor.set(f,0,"element"),p.focus.set(f,0,"element"),p=Cs(p),p.anchor.is(u))return!0}return!1})(r)?i.shiftKey?C0:Td:IC;return t.dispatchCommand(s,void 0)},tt),t.registerCommand(Td,()=>{const i=typeof e=="number"?e:e?e.peek():null,r=me();if(!ae(r))return!1;const s=typeof n=="function"?n:n.peek();return rS(o=>{if(s(o)){const a=o.getIndent()+1;(!i||a<i)&&o.setIndent(a)}})},cr))}function yW(t,e,n,i,r){if(t===null||n.size===0&&i.size===0&&!r)return 0;const s=e._selection,o=t._selection;if(r)return 1;if(!(ae(s)&&ae(o)&&o.isCollapsed()&&s.isCollapsed()))return 0;const a=(function(y,S,_){const k=y._nodeMap,w=[];for(const b of S){const E=k.get(b);E!==void 0&&w.push(E)}for(const[b,E]of _){if(!E)continue;const P=k.get(b);P===void 0||xn(P)||w.push(P)}return w})(e,n,i);if(a.length===0)return 0;if(a.length>1){const y=e._nodeMap,S=y.get(s.anchor.key),_=y.get(o.anchor.key);return S&&_&&!t._nodeMap.has(S.__key)&&le(S)&&S.__text.length===1&&s.anchor.offset===1?2:0}const l=a[0],u=t._nodeMap.get(l.__key);if(!le(u)||!le(l)||u.__mode!==l.__mode)return 0;const c=u.__text,h=l.__text;if(c===h)return 0;const f=s.anchor,p=o.anchor;if(f.key!==p.key||f.type!=="text")return 0;const m=f.offset,g=p.offset,x=h.length-c.length;return x===1&&g===m-1?2:x===-1&&g===m+1?3:x===-1&&g===m?4:0}function vW(t,e,n){let i=n(),r=0,s=i,o=0,a=null;return(l,u,c,h,f,p)=>{const m=n();if(p.has(VC)&&(s=i,o=r,a=l),p.has(Xa))return r=0,i=m,2;p.has(Jc)&&a&&(i=s,r=o,l=a);const g=p.has(NC)||p.has(LC)?0:yW(l,u,h,f,t.isComposing()),x=(()=>{const y=c===null||c.editor===t,S=p.has(O1);if(!S&&y&&p.has(Tc))return 0;if(g===1)return 2;if(l===null)return 1;const _=u._selection;if(!(h.size>0||f.size>0))return _!==null?0:2;const k=typeof e=="number"?e:e.peek();return S===!1&&g!==0&&g===r&&m<i+k&&y||h.size===1&&(function(w,b,E){const P=b._nodeMap.get(w),$=E._nodeMap.get(w),B=b._selection,X=E._selection;return!(ae(B)&&ae(X)&&B.anchor.type==="element"&&B.focus.type==="element"&&X.anchor.type==="text"&&X.focus.type==="text"||!le(P)||!le($)||P.__parent!==$.__parent)&&JSON.stringify(b.read(()=>P.exportJSON()))===JSON.stringify(E.read(()=>$.exportJSON()))})(Array.from(h)[0],l,u)?0:1})();return i=m,r=g,x}}function qT(t,e){t.undoStack=[],t.redoStack=[],t.current=null,e&&e(t)}function bW(t,e,n,i=Date.now,r,s=null){const o=vW(t,n,i),a=()=>{r&&r(e)};return a(),wn(t.registerCommand(Mp,()=>((function(l,u,c){const h=u.redoStack,f=u.undoStack;if(f.length!==0){const p=u.current,m=f.pop();p!==null&&(h.push(p),l.dispatchCommand(Ma,!0)),f.length===0&&l.dispatchCommand(Na,!1),u.current=m||null,c&&c(u),m&&m.editor.setEditorState(m.editorState,{tag:Xa})}})(t,e,r),!0),tt),t.registerCommand(Np,()=>((function(l,u,c){const h=u.redoStack,f=u.undoStack;if(h.length!==0){const p=u.current;p!==null&&(f.push(p),l.dispatchCommand(Na,!0));const m=h.pop();h.length===0&&l.dispatchCommand(Ma,!1),u.current=m||null,c&&c(u),m&&m.editor.setEditorState(m.editorState,{tag:Xa})}})(t,e,r),!0),tt),t.registerCommand(N6,()=>(qT(e,r),!1),tt),t.registerCommand(L6,()=>(qT(e,r),t.dispatchCommand(Ma,!1),t.dispatchCommand(Na,!1),!0),tt),t.registerUpdateListener(({editorState:l,prevEditorState:u,dirtyLeaves:c,dirtyElements:h,tags:f})=>{const p=e.current,m=e.redoStack,g=e.undoStack,x=p===null?null:p.editorState;if(p!==null&&l===x)return;const y=o(u,l,p,c,h,f);if(y===1){if(m.length!==0&&(e.redoStack=[],t.dispatchCommand(Ma,!1)),p!==null){g.push({...p});const S=typeof s=="number"||s===null?s:s.peek();S!==null&&g.length>S&&g.splice(0,g.length-S),t.dispatchCommand(Na,!0)}}else if(y===2)return;e.current={editor:t,editorState:l},a()}))}function xw(){return{current:null,redoStack:[],undoStack:[]}}const Ac={build:(t,{delay:e,createInitialHistoryState:n,disabled:i,maxDepth:r,now:s},o)=>({...I1({delay:e,disabled:i,historyState:n(t),maxDepth:r,now:s}),...o.getInitResult()}),config:{createInitialHistoryState:xw,delay:300,disabled:typeof window>"u",maxDepth:null,now:Date.now},init:()=>({canRedo:Qd(!1),canUndo:Qd(!1)}),name:"@lexical/history/History",register:(t,e,n)=>{const{canUndo:i,canRedo:r}=n.getInitResult(),s=n.getOutput(),o=a=>uR(()=>{i.value=a!=null&&a.undoStack.length>0,r.value=a!=null&&a.redoStack.length>0});return zh(()=>{if(!s.disabled.value)return bW(t,s.historyState.value,s.delay,()=>s.now.peek()(),o,s.maxDepth);o(null)})}},SW={build:(t,{disabled:e,parentEditor:n})=>I1({disabled:e,parentEditor:n||t._parentEditor}),config:{disabled:!1,parentEditor:null},dependencies:[Hl(Ac,{disabled:!0})],name:"@lexical/history/SharedHistory",register:(t,e,n)=>zh(()=>{const{disabled:i,parentEditor:r}=n.getOutput();if(!i.value){const{output:s}=n.getDependency(Ac),o=(function(l){return l?Fu(l,Ac.name):null})(r.value);if(!o)return;const a=o.output;uR(()=>{s.delay.value=a.delay.value,s.historyState.value=a.historyState.value,s.now.value=a.now.value,s.disabled.value=a.disabled.value})}})};function Xh(t,...e){const n=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",t);for(const r of e)i.append("v",r);throw n.search=i.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let $c;function vR(t,e){const{key:n}=e;return t&&n in t?t[n]:e.defaultValue}function bR(t){return $c&&$c.editor===t?$c:void 0}function _W(t,e){if("cfg"in e){const{cfg:n,updater:i}=e;return[n,i(vR(t,n))]}return e}function CW(t,e){let n=e;for(const i of t){const[r,s]=_W(n,i),o=r.key;if(n===e&&vR(n,r)===s)continue;const a=n===e||n===void 0?wW(e):n;a[o]=s,n=a}return n}function wW(t){return Object.create(t||null)}function SR(t,e){return[t,e]}function kW(t,e,n,i=hn()){const r=$c,s=bR(i);try{return $c={...s,editor:i,[t]:e},n()}finally{$c=r}}function EW(t,e=()=>{}){return(n,i=hn())=>r=>{const s=bR(i),o=s&&s[t],a=CW(n,o||e(i));return a&&a!==o?kW(t,a,r,i):r()}}function _R(t,e,n,i){return Object.assign($h(Symbol(e),{isEqual:i,parse:n}),{[t]:!0})}function TW(t){if(!vl(t))return;const e=t;if(e.querySelector("style")===null)return;const n=new Map;function i(r){let s=n.get(r);if(s===void 0){s=new Set;for(let o=0;o<r.style.length;o++)s.add(r.style[o]);n.set(r,s)}return s}try{for(const r of Array.from(e.styleSheets)){let s;try{s=r.cssRules}catch{continue}for(const o of Array.from(s)){if(!Bo(o,CSSStyleRule))continue;let a;try{a=e.querySelectorAll(o.selectorText)}catch{continue}for(const l of Array.from(a)){if(!Je(l))continue;const u=i(l);for(let c=0;c<o.style.length;c++){const h=o.style[c];u.has(h)||l.style.setProperty(h,o.style.getPropertyValue(h),o.style.getPropertyPriority(h))}}}}}catch{}}const CR="@lexical/html/DOM",wR=Symbol.for("@lexical/html/DOMExportContext"),PW=Symbol.for("@lexical/html/DOMImportContext");function AW(t,e,n){return _R(wR,t,e,n)}const $W=AW("isExport",Boolean);function IW(t){const e=Fu(t,CR);return e?e.output.defaults:void 0}function RW(t){const e=Fu(t,CR);return e?e.output.runtime:void 0}function MW(t=hn()){const e=RW(t);return e?e.getSessionConfig():jp(t)}const NW=EW(wR,IW),M1=Symbol.for("@lexical/html/SelectorImpl");function Vd(t,e){const n={kind:"element",predicate:(i=e,i.length===0?Je:i.length===1?i[0]:(s,o)=>{for(const a of i)if(!a(s,o))return!1;return!0}),tags:t};var i;const r=s=>Vd(t,[...e,s]);return{[M1]:n,attr:(s,o,a)=>r(aS(s,o,a)),classAll:(...s)=>r(ER(s)),classAny:(...s)=>r((function(o){const a=kR(o);return a.length===0?()=>!1:l=>{if(!Je(l))return!1;const u=l.classList;for(const c of a)if(u.contains(c))return!0;return!1}})(s)),styleAny:(s,o,a)=>r((function(l,u,c){if(typeof u=="string")return h=>Je(h)&&h.style.getPropertyValue(l)===u;if(u instanceof RegExp){const h=c&&c.capture,f=u;return(p,m)=>{if(!Je(p))return!1;const g=p.style.getPropertyValue(l);if(!g)return!1;const x=g.match(f);return x!==null&&(h!==void 0&&(m[h]=x),!0)}}Xh(362,JSON.stringify(l))})(s,o,a))}}function kR(t){const e=[];for(const n of t)n&&e.push(n);return e}function ER(t){const e=kR(t);return e.length===0?()=>!0:n=>{if(!Je(n))return!1;const i=n.classList;for(const r of e)if(!i.contains(r))return!1;return!0}}function aS(t,e,n){if(e===!0)return i=>Je(i)&&i.hasAttribute(t);if(typeof e=="string")return i=>Je(i)&&i.getAttribute(t)===e;if(e instanceof RegExp){const i=n&&n.capture,r=e;return(s,o)=>{if(!Je(s))return!1;const a=s.getAttribute(t);if(a==null)return!1;const l=a.match(r);return l!==null&&(i!==void 0&&(o[i]=l),!0)}}Xh(361,JSON.stringify(t))}const LW={kind:"text",predicate:Hi,tags:new Set},DW={[M1]:LW},QW={kind:"comment",predicate:t=>t.nodeType===8,tags:new Set},VW={[M1]:QW},bc={any:()=>Vd(new Set,[]),comment:()=>VW,tag(...t){t.length>0||Xh(363);const e=new Set;for(const n of t)e.add(n.toUpperCase());return Vd(e,[])},text:()=>DW};function TR(t,e){return Je(t)&&t.nodeName===e.toUpperCase()}const PR=/[A-Za-z0-9_-]/;let BW=class{constructor(e,n){this.source=e,this.pos=n}peek(e=0){return this.source[this.pos+e]||""}consume(){return this.source[this.pos++]||""}eof(){return this.pos>=this.source.length}skipWhitespace(){for(;!this.eof()&&/\s/.test(this.peek());)this.pos++}readIdent(){const e=this.pos;for(;!this.eof()&&PR.test(this.peek());)this.pos++;return this.source.slice(e,this.pos)}readQuoted(){const e=this.consume();this.assert(e==='"'||e==="'","expected quote");const n=this.pos;for(;!this.eof()&&this.peek()!==e;)this.peek()==="\\"?this.pos+=2:this.pos++;this.assert(!this.eof(),"unterminated string");const i=this.source.slice(n,this.pos);return this.pos++,i.replace(/\\(.)/g,"$1")}assert(e,n){e||Xh(364,String(this.pos+1),n,this.source)}};function FW(t){const e=new Set,n=[],i=[];if(t.skipWhitespace(),t.peek()==="*")t.consume();else if(PR.test(t.peek())){const r=t.readIdent();r&&e.add(r.toUpperCase())}for(;!t.eof();){const r=t.peek();if(r==="."){t.consume();const s=t.readIdent();t.assert(s!=="",'expected class name after "."'),i.push(s)}else if(r==="#"){t.consume();const s=t.readIdent();t.assert(s!=="",'expected id after "#"'),n.push(aS("id",s))}else{if(r!=="[")break;{t.consume(),t.skipWhitespace();const s=t.readIdent();t.assert(s!=="",'expected attribute name after "["'),t.skipWhitespace();let o=!0;if(t.peek()==="="){t.consume(),t.skipWhitespace();const a=t.peek();a==='"'||a==="'"?o=t.readQuoted():(o=t.readIdent(),t.assert(o!=="","expected attribute value")),t.skipWhitespace()}t.assert(t.peek()==="]",'expected "]"'),t.consume(),n.push(aS(s,o))}}}return i.length>0&&n.push(ER(i)),{predicates:n,tags:e}}function jW(t){const e=new BW(t,0),n=[];for(;;){const r=FW(e);if(n.push(r),e.skipWhitespace(),e.eof())break;e.assert(e.peek()===",",'expected "," (selector lists are the only supported combinator)'),e.consume(),e.skipWhitespace()}if(n.length===1)return Vd(n[0].tags,n[0].predicates);const i=new Set;for(const r of n)for(const s of r.tags)i.add(s);return Vd(i,[(r,s)=>{for(const o of n){const a=r.nodeName;if(o.tags.size>0&&!o.tags.has(a))continue;let l=!0;for(const u of o.predicates)if(!u(r,s)){l=!1;break}if(l)return!0}return!1}])}function yw(t,e,n){return _R(PW,t,e,n)}const lS=yw("textFormat",()=>0),ZW=yw("textStyle",()=>({}));function zW(t){if(!Je(t))return!1;if(t.nodeName==="PRE")return!0;const e=t.style.whiteSpace;return typeof e=="string"&&e.startsWith("pre")}function XW(t){if(Hi(t))return!0;if(!Je(t))return!1;const e=t.style.display;return e?e.startsWith("inline"):!gu(t)&&Md(t)}const WW=yw("whitespaceConfig",()=>({isInline:XW,preservesWhitespace:zW}));function vw(t){return el(t)||ht(t)&&!t.isInline()}function AR(t,e){const n=[];let i=[];const r=()=>{i.length!==0&&(n.push(e().splice(0,0,i)),i=[])};for(const s of t)if(vw(s)){if(r(),W(s)){const o=AR(s.getChildren(),e);s.splice(0,s.getChildrenSize(),o)}n.push(s)}else i.push(s);return r(),n}function $R(t,e){if(!Je(e))return t;const n=e.style.textAlign;if(!bw(n))return t;for(const i of t)el(i)&&i.getFormatType()===""&&i.setFormat(n);return t}function HW(t,e,n){t.length===1&&Gn(t[0])&&(t=[]);const i=ut();if(Je(n)){const r=n.style.textAlign;bw(r)&&i.setFormat(r)}return[i.splice(0,0,t)]}const IR={$accepts:vw,$packageRun:HW,name:"BlockSchema"},Zu=bc,UW=new Set(["center","end","justify","left","right","start"]);function bw(t){return UW.has(t)}const qW={B:{fontWeight:"bold"},EM:{fontStyle:"italic"},I:{fontStyle:"italic"},S:{textDecoration:"line-through"},STRONG:{fontWeight:"bold"},SUB:{verticalAlign:"sub"},SUP:{verticalAlign:"super"},U:{textDecoration:"underline"}},YW={CODE:l6,MARK:o1},GW=new Set(["font-weight","font-style","text-decoration","vertical-align"]),KW={$import:(t,e)=>{const n=t.get(lS),i=qW[e.nodeName],r=(function(f){return{fontStyle:f.style.fontStyle,fontWeight:f.style.fontWeight,textDecoration:f.style.textDecoration,verticalAlign:f.style.verticalAlign}})(e),s=i?(o=i,{fontStyle:(a=r).fontStyle||o.fontStyle,fontWeight:a.fontWeight||o.fontWeight,textDecoration:a.textDecoration||o.textDecoration,verticalAlign:a.verticalAlign||o.verticalAlign}):r;var o,a;let l=(u=n,c=(function(f){let p=0,m=0;const{fontWeight:g,fontStyle:x,textDecoration:y,verticalAlign:S}=f;if(g==="700"||g==="bold"?p|=Ab:g!=="normal"&&g!=="400"||(m|=Ab),x==="italic"?p|=$b:x==="normal"&&(m|=$b),y){const _=y.split(" ");_.includes("underline")&&(p|=Rb),_.includes("line-through")&&(p|=Ib),_.includes("none")&&(m|=Rb|Ib)}return S==="sub"?(p|=zg,m|=Xg):S==="super"?(p|=Xg,m|=zg):S==="baseline"&&(m|=zg|Xg),{clear:m,set:p}})(s),u&~c.clear|c.set);var u,c;const h=YW[e.nodeName];return h&&(l|=h),l===n?t.$importChildren(e):t.$importChildren(e,{context:[SR(lS,l)]})},match:Zu.tag("b","strong","em","i","code","mark","s","sub","sup","u","span"),name:"@lexical/html/inline-format"};function YT(t,e,n){let i=t;for(;;){let r=null;for(;(r=e?i.nextSibling:i.previousSibling)===null;){const o=i.parentNode;if(o===null)return null;i=o}if(i=r,!n.isInline(i))return null;let s=i;for(;(s=e?i.firstChild:i.lastChild)!==null;)i=s;if(Hi(i))return i;if(i.nodeName==="BR")return null}}function GT(t,e){return e!==0&&le(t)?t.setFormat(e):t}function KT(t,e){if(le(t)){const n=(function(i){let r="";for(const s in i)GW.has(s)||(r+=`${s}: ${i[s]}; `);return r.trimEnd()})(e);n!==""&&t.setStyle(n)}return t}const JW={$import:(t,e)=>{const n=t.get(lS),i=t.get(ZW),r=t.get(WW);if((function(a,l){let u=a.parentNode;for(;u!==null;){if(l.preservesWhitespace(u))return!0;u=u.parentNode}return!1})(e,r)){const a=th(e.textContent||"");for(const l of a)GT(l,n),KT(l,i);return a}const s=(function(a,l){let u=(a.textContent||"").replace(/\r/g,"").replace(/[ \t\n]+/g," ");if(u.length===0)return"";if(u[0]===" "){let c=a,h=!0;for(;c!==null&&(c=YT(c,!1,l))!==null;){const f=c.textContent||"";if(f.length>0){/[ \t\n]$/.test(f)&&(u=u.slice(1)),h=!1;break}}h&&(u=u.slice(1))}if(u.length>0&&u[u.length-1]===" "){let c=a,h=!0;for(;c!==null&&(c=YT(c,!0,l))!==null;)if((c.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){h=!1;break}h&&(u=u.slice(0,-1))}return u})(e,r);if(s==="")return[];const o=Vt(s);return GT(o,n),KT(o,i),[o]},match:Zu.text(),name:"@lexical/html/#text"},eH={$import:()=>[],match:Zu.tag("script","style"),name:"@lexical/html/script-style-ignore"},tH={$import:(t,e)=>XC(e)||WC(e)?[]:[Xi()],match:Zu.tag("br"),name:"@lexical/html/br"},nH={$import:(t,e)=>{const n=ut();if(Qs(n,e),bl(e,n),n.getFormatType()===""){const i=e.getAttribute("align");i&&bw(i)&&n.setFormat(i)}return Mr(n,e),[n.splice(0,0,t.$importChildren(e))]},match:Zu.tag("p"),name:"@lexical/html/p"},iH={$import:(t,e,n)=>hn().hasNode(ju)?[R1()]:n(),match:Zu.tag("hr"),name:"@lexical/html/hr"};Zu.any();function rH(t,e){const n=[];let i=0,r=0;for(;i<t.length&&r<e.length;)t[i]<=e[r]?n.push(t[i++]):n.push(e[r++]);for(;i<t.length;)n.push(t[i++]);for(;r<e.length;)n.push(e[r++]);return n}function sH(t){const e=[],n=new Map,i=[],r=[],s=[],o=new Set;t.forEach((l,u)=>{const c=(function(f){const p=f[M1];return p===void 0&&Xh(360),p})(l.match),h=l.name||(function(f,p){return f.kind==="text"?`#text@${p}`:f.kind==="comment"?`#comment@${p}`:f.tags.size===0?`*@${p}`:`${Array.from(f.tags).join(",").toLowerCase()}@${p}`})(c,u);if(l.name&&o.add(l.name),e.push({$import:l.$import,name:h,predicate:c.predicate}),c.kind==="text")r.push(u);else if(c.kind==="comment")s.push(u);else if(c.tags.size===0)i.push(u);else for(const f of c.tags){let p=n.get(f);p||(p=[],n.set(f,p)),p.push(u)}});const a=new Map;if(i.length===0)for(const[l,u]of n)a.set(l,u);else for(const[l,u]of n)a.set(l,rH(u,i));return{byTag:a,commentIndices:s,rules:e,textIndices:r,wildcardIndices:i}}function oH(t){const e=[];for(const n of t)if(aH(n))for(const i of n.rules)e.push(i);else e.push(n);return e}function aH(t){return typeof t=="object"&&t!==null&&"__type"in t&&t.__type==="CompiledOverlayRules"}function RR(t){const e=oH(t);return{__type:"CompiledOverlayRules",dispatch:sH(e),rules:e}}bc.any();const hi={any:bc.any,comment:bc.comment,css:jW,tag:bc.tag,text:bc.text},MR=new Set(["STYLE","SCRIPT"]);function lH(t,e){TW(e);const n=vl(e)?e.body.childNodes:e.childNodes,i=[],r=[];for(const s of n)if(!MR.has(s.nodeName)){const o=LR(s,t,r,!1);if(o!==null)for(const a of o)i.push(a)}return(function(s){for(const o of s)o.getParent()&&o.getNextSibling()instanceof b1&&o.insertAfter(Xi());for(const o of s){const a=o.getParent();a&&a.splice(o.getIndexWithinParent(),1,o.getChildren())}})(r),i}function uH(t,e=null,n=hn()){return NW([SR($W,!0)],n)(()=>{const i=pt(),r=MW(n),s=ae(e)?Xp(e.anchor.getNode()):null,o=t.append.bind(t);for(const a of(W(s)?s:i).getChildren())NR(n,a,o,e,r);return t})}function cH(t,e=null){return(typeof document>"u"||typeof window>"u"&&global.window===void 0)&&Xh(338),l4(t),uH(rn().createElement("div"),e,t).innerHTML}function NR(t,e,n,i=null,r=jp(t)){let s=r.$shouldInclude(e,i,t);const o=r.$shouldExclude(e,i,t);let a=e;i!==null&&le(e)&&(a=nR(i,e,"clone"));const l=r.$exportDOM(a,t),{element:u,after:c,append:h,$getChildNodes:f}=l;if(!u)return!1;const p=rn().createDocumentFragment(),m=f?f():W(a)?a.getChildren():[],g=s&&Ct(i)&&W(e)?null:i,x=p.append.bind(p);for(const y of m){const S=NR(t,y,x,g,r);!s&&S&&r.$extractWithChild(e,y,i,"html",t)&&(s=!0)}if(s&&!o){if((Je(u)||D0(u))&&(h?h(p):u.append(p)),n(u),c){const y=c.call(a,u);y&&(D0(u)?u.replaceChildren(y):u.replaceWith(y))}}else n(p);return s}function LR(t,e,n,i,r=new Map,s){const o=[];if(MR.has(t.nodeName))return o;let a=null;const l=(function(m,g){const{nodeName:x}=m,y=g._htmlConversions.get(x.toLowerCase());let S=null;if(y!==void 0)for(const _ of y){const k=_(m);k!==null&&(S===null||(S.priority||0)<=(k.priority||0))&&(S=k)}return S!==null?S.conversion:null})(t,e),u=l?l(t):null;let c=null;if(u!==null){c=u.after;const m=u.node;if(a=Array.isArray(m)?m[m.length-1]:m,a!==null){for(const[,g]of r)if(a=g(a,s),!a)break;a&&o.push(...Array.isArray(m)?m:[a])}u.forChild!=null&&r.set(t.nodeName,u.forChild)}const h=t.childNodes;let f=[];const p=(a==null||!It(a))&&(a!=null&&el(a)||i);for(let m=0;m<h.length;m++)f.push(...LR(h[m],e,n,p,new Map(r),a));if(c!=null&&(f=c(f)),gu(t)&&(f=hH(t,f,p?()=>{const m=new b1;return n.push(m),m}:ut)),a==null)if(f.length>0)for(const m of f)o.push(m);else gu(t)&&(function(m){return m.nextSibling==null||m.previousSibling==null?!1:Md(m.nextSibling)&&Md(m.previousSibling)})(t)&&o.push(Xi());else W(a)&&a.append(...f);return o}function hH(t,e,n){const i=t.style.textAlign,r=[];let s=[];for(let o=0;o<e.length;o++){const a=e[o];if(el(a))i&&!a.getFormat()&&a.setFormat(i),r.push(a);else if(s.push(a),o===e.length-1||o<e.length-1&&el(e[o+1])){const l=n();l.setFormat(i),l.append(...s),r.push(l),s=[]}}return r}function Z0(t,e,n=null){const i=C1(n),r=n?rw(n):[],s=n!==null&&r.length>0;if(s&&typeof i.caretPositionFromPoint=="function"){const o=i.caretPositionFromPoint(t,e,{shadowRoots:r});if(o!==null&&(function(a,l){for(let u=a;u!==null;){if(u===l)return!0;u=pa(u)}return!1})(o.offsetNode,n))return{node:o.offsetNode,offset:o.offset}}if(s){const o=n.getRootNode();if(fo(o)){const a=o.elementFromPoint(t,e);if(a!==null&&n.contains(a)){const l=(function(u,c,h,f){const p=f.createRange(),m=E=>c<E.top?E.top-c:c>E.bottom?c-E.bottom:0,g=E=>u<E.left?E.left-u:u>E.right?u-E.right:0,x=f.createTreeWalker(h,NodeFilter.SHOW_TEXT);let y=null,S=1/0,_=1/0;for(let E=x.nextNode();E;E=x.nextNode()){p.selectNodeContents(E);for(const P of p.getClientRects()){const $=m(P),B=g(P);($<S||$===S&&B<_)&&(S=$,_=B,y=E)}}if(y===null)return null;let k=0,w=1/0,b=1/0;for(let E=0;E<=y.length;E++){p.setStart(y,E),p.collapse(!0);const P=p.getBoundingClientRect(),$=m(P),B=Math.abs(u-P.left);($<w||$===w&&B<b)&&(w=$,b=B,k=E)}return{node:y,offset:k}})(t,e,a,i);if(l!==null)return l}}}if(typeof i.caretRangeFromPoint=="function"){const o=i.caretRangeFromPoint(t,e);return o===null?null:{node:o.startContainer,offset:o.startOffset}}if(typeof i.caretPositionFromPoint=="function"){const o=i.caretPositionFromPoint(t,e);return o===null?null:{node:o.offsetNode,offset:o.offset}}return null}function Sc(t,...e){const n=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",t);for(const r of e)i.append("v",r);throw n.search=i.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const uS={"application/x-lexical-editor":0,"text/html":10,"text/plain":20,"text/uri-list":30};function fH(t){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:e=>e}).createHTML(t):t}const JT=(t,e)=>{if(!ae(e))return e.insertRawText(t),!0;const n=i=>{const r=me();ae(r)&&i(r)};return jC(t,{linebreak:()=>n(i=>i.insertParagraph()),tab:()=>n(i=>i.insertNodes([Qh()])),text:i=>n(r=>r.insertText(i))}),!0},cS={"application/x-lexical-editor":[(t,e,n)=>{try{const i=hn(),r=JSON.parse(t);if(r&&r.namespace===i._config.namespace&&Array.isArray(r.nodes))return eP(i,jR(r.nodes),e),!0}catch(i){console.error(i)}return n()}],"text/html":[(t,e,n)=>{try{const i=hn(),r=new DOMParser().parseFromString(fH(t),"text/html");return eP(i,lH(i,r),e),!0}catch(i){return console.error(i),n()}}],"text/plain":[JT],"text/uri-list":[JT]};function dH(t,e,n,i){if(!t)return!1;const r=s=>!!t[s]&&t[s](e,n,r.bind(null,s-1),i);return r(t.length-1)}function DR(t,e,n){const i=e.getData("text/plain");for(const r of(function(s){return Object.keys(s.$importMimeType).filter(o=>s.$importMimeType[o]!==void 0).sort((o,a)=>{const l=s.priority[o],u=s.priority[a];return l===void 0&&u===void 0?o<a?-1:o>a?1:0:l===void 0?1:u===void 0?-1:l-u})})(t)){const s=e.getData(r);if(s&&(r!=="text/html"||s!==i)&&dH(t.$importMimeType[r],s,n,e))return!0}return!1}const pH={$importMimeType:cS,$insertDataTransfer:(t,e)=>DR({$importMimeType:cS,priority:uS},t,e),priority:uS},mH={build:(t,e)=>({$importMimeType:e.$importMimeType,$insertDataTransfer:(n,i)=>DR(e,n,i),priority:e.priority}),config:{$importMimeType:cS,priority:uS},mergeConfig(t,e){const n=Up(t,e);if(e.$importMimeType){const i={...t.$importMimeType};for(const[r,s]of Object.entries(e.$importMimeType))if(s){const o=i[r];i[r]=o?[...o,...s]:s}n.$importMimeType=i}return e.priority&&(n.priority={...t.priority,...e.priority}),n},name:"@lexical/clipboard/Import"};function QR(t,e=me()){return e==null&&Sc(166),ae(e)&&e.isCollapsed()||e.getNodes().length===0?"":cH(t,e)}function VR(t,e=me()){return e==null&&Sc(166),ae(e)&&e.isCollapsed()||e.getNodes().length===0?null:JSON.stringify(FR(t,e))}function hS(t,e,n){(function(){const i=pW(mH.name);return i?i.output:pH})().$insertDataTransfer(t,e)}const BR="application/x-lexical-drag";function gH(t,e){const n={editorKey:e.getKey()};t.setData(BR,JSON.stringify(n))}function OH(t,e,n){const i=t.dataTransfer;if(i===null)return!1;const r=(function(u){const c=u.getData(BR);if(!c)return null;let h;try{h=JSON.parse(c)}catch{return null}return(f=h)!==null&&typeof f=="object"&&"editorKey"in f&&typeof f.editorKey=="string"?h:null;var f})(i);if(r===null)return!1;const s=(function(u,c){const h=Z0(u.clientX,u.clientY,c.getRootElement());if(h===null)return null;const f=os(h.node);if(f===null)return null;if(le(f))return ea(f,"next",h.offset);if(W(f))return B0(f,h.offset,"next");const p=f.getParent();return p===null?null:B0(p,f.getIndexWithinParent()+1,"next")})(t,e);if(s===null)return!1;const o=pw(s);if(o===null)return!1;const a=r.editorKey===e.getKey(),l=me();if(a){if(!ae(l)||l.isCollapsed())return!1;if((function(u,c){const{anchor:h,focus:f}=A1(V0(c),"next");return rh(h,u)<0&&rh(u,f)<0})(s,l))return t.preventDefault(),!0;l.removeText()}if(!o.origin.isAttached())return t.preventDefault(),!0;if(n(i,vu(Zh(o)),e),!a){const u=e.getRootElement(),c=u?u.ownerDocument:null,h=c?(function(f,p){for(const m of sw(p)){const g=Vu(m);if(Bh(g)&&g.getKey()===f&&Je(m))return m}return null})(r.editorKey,c):null;h!==null&&h.dispatchEvent(new InputEvent("beforeinput",{bubbles:!0,cancelable:!0,inputType:"deleteByDrag"}))}return t.preventDefault(),!0}function xH(t,e){return OH(t,e,hS)}function eP(t,e,n){t.dispatchCommand($6,{nodes:e,selection:n})||(n.insertNodes(e),(function(i){if(ae(i)&&i.isCollapsed()){const r=i.anchor;let s=null;const o=bi(r,"previous");if(o)if(Ar(o))s=o.origin;else{const a=ns(o,Ii(pt(),"next").getFlipped());for(const l of a){if(le(l.origin)){s=l.origin;break}if(W(l.origin)&&!l.origin.isInline())break}}if(s&&le(s)){const a=s.getFormat(),l=s.getStyle();i.format===a&&i.style===l||(i.format=a,i.style=l,i.dirty=!0)}}})(n))}function fS(t,e,n,i=[]){let r=e===null||n.isSelected(e);const s=W(n)&&n.excludeFromCopy("html");let o=n;e!==null&&le(o)&&(o=nR(e,o,"clone"));const a=W(o)?o.getChildren():[],l=(function(c){const h=c.exportJSON(),f=c.constructor;if(h.type!==f.getType()&&Sc(58,f.name),W(c)){const p=h.children;Array.isArray(p)||Sc(59,f.name)}return h})(o);le(o)&&o.getTextContentSize()===0&&(r=!1);const u=r&&Ct(e)&&W(n)?null:e;for(let c=0;c<a.length;c++){const h=a[c],f=fS(t,u,h,l.children);!r&&W(n)&&f&&n.extractWithChild(h,e,"clone")&&(r=!0)}if(r&&!s){const c=Pr(o);if(c.length>0){const h={};for(const f of c){const p=Jo(o,f);p===null&&Sc(366,o.constructor.name,f);const m=[];fS(t,null,p,m),m.length===1&&m[0].type===p.getType()||Sc(385,f,o.constructor.name,String(m.length),String(m.length>0?m[0].type:"none")),h[f]=m[0]}l.$slots=h}}if(r&&!s)i.push(l);else if(Array.isArray(l.children))for(let c=0;c<l.children.length;c++){const h=l.children[c];i.push(h)}return r}function FR(t,e){const n=[],i=pt(),r=ae(e)?e.anchor.getNode():Ct(e)?e.getNodes()[0]??null:null,s=r!==null?Xp(r):null,o=(W(s)?s:i).getChildren();for(let a=0;a<o.length;a++)fS(t,e,o[a],n);return{namespace:t._config.namespace,nodes:n}}function jR(t){const e=[];for(const n of t)e.push(f4(n));return e}let lc=null;async function tP(t,e,n){if(lc!==null)return!1;if(e!==null)return new Promise((u,c)=>{t.update(()=>{u(nP(t,e,n))})});const i=t.getRootElement(),r=t._window||window,s=r.document,o=Mi(r);if(i===null||o===null)return!1;const a=s.createElement("span");a.style.position="fixed",a.style.top="-1000px",a.append(s.createTextNode("#")),i.append(a);const l=s.createRange();return l.setStart(a,0),l.setEnd(a,1),o.removeAllRanges(),o.addRange(l),new Promise((u,c)=>{const h=t.registerCommand(Qp,f=>(Bo(f,ClipboardEvent)&&(h(),lc!==null&&(r.clearTimeout(lc),lc=null),u(nP(t,f,n))),!0),cr);lc=r.setTimeout(()=>{h(),lc=null,u(!1)},50),s.execCommand("copy"),a.remove()})}function nP(t,e,n){if(n===void 0){const r=Mi(t._window),s=me();if(!s||s.isCollapsed()||!r)return!1;const o=$r(r,t.getRootElement()),a=o.anchorNode,l=o.focusNode;if(a!==null&&l!==null&&!Vh(t,a,l))return!1;n=ZR(s)}e.preventDefault();const i=e.clipboardData;return i!==null&&(zR(i,n),!0)}const yH=[["text/html",QR],["application/x-lexical-editor",VR]];function ZR(t=me()){return(function(e,n){const i={"text/plain":""};for(const[r,s]of Object.entries(e))if(s){const o=bH(s,n);o!==null&&(i[r]=o)}return i})(vH(),t)}function zR(t,e){for(const[n]of yH)e[n]===void 0&&t.setData(n,"");for(const n in e){const i=e[n];i!==void 0&&t.setData(n,i)}}function vH(t=hn()){const e=Fu(t,SH.name);return e?e.output:XR}const XR={"application/x-lexical-editor":[(t,e)=>t?VR(hn(),t):e()],"text/html":[(t,e)=>t?QR(hn(),t):e()],"text/plain":[(t,e)=>t?t.getTextContent():e()]};function bH(t,e){const n=i=>t[i]?t[i](e,n.bind(null,i-1)):null;return n(t.length-1)}const SH={build:(t,e,n)=>e.$exportMimeType,config:{$exportMimeType:XR},mergeConfig(t,e){const n=Up(t,e);if(e.$exportMimeType){const i={...t.$exportMimeType};for(const[r,s]of Object.entries(e.$exportMimeType))if(s){const o=i[r];i[r]=o?[...o,...s]:s}n.$exportMimeType=i}return n},name:"@lexical/clipboard/GetClipboardData"},_H={bold:"bold",italic:"italic",strikeThrough:"strikethrough",subscript:"subscript",superscript:"superscript",underline:"underline"},z0=Symbol.for("@lexical/dragon/WindowState");function CH(t,e,n){const i=(function(r){let s=r[z0];return s===void 0&&(s={dispose:()=>{},editors:new Map,installs:new Set},r[z0]=s),s})(t);if(i.installs.size===0){const r=EH.bind(t);t.addEventListener("message",r,!0),i.dispose=()=>{t.removeEventListener("message",r,!0)}}if(i.installs.add(e),n){const r=i.editors.get(n)||new Set;r.add(e),i.editors.set(n,r)}return wH.bind(null,t,i,e,n)}function wH(t,e,n,i){if(i){const r=e.editors.get(i);r&&r.delete(n)&&r.size===0&&e.editors.delete(i)}e.installs.delete(n)&&e.installs.size===0&&(e.dispose(),delete t[z0])}function iP(t){return t&&t.ownerDocument.defaultView}function kH(t){const e=rW(()=>iP(t.getRootElement()),n=>t.registerRootListener(i=>{n.value=iP(i)}));return zh(()=>{const n=e.value;if(n)return CH(n,Symbol("@lexical/dragon/editorInstall"),t)})}function EH(t){if(t.origin!==this.location.origin)return;const e=(function(i){const r=i[z0];if(r===void 0)return null;const s=Vu(mu(i.document));return Bh(s)&&r.editors.has(s)?s:null})(this);if(e===null)return;const n=t.data;if(typeof n=="string"){let i;try{i=JSON.parse(n)}catch{return}if(i&&i.protocol==="nuanria_messaging"&&i.type==="request"){const r=i.payload;if(r&&r.functionId==="makeChanges"){const s=r.args;if(Array.isArray(s)){const[o,a,l,u,c,h]=s;if(![o,a,u,c].every(Number.isFinite)||typeof l!="string"&&l!==-1)return;e.update(()=>{const f=me();if(ae(f)){const p=f.anchor;let m=p.getNode(),g=0,x=0;if(le(m)&&o>=0&&a>=0&&(g=o,x=o+a,f.setTextNodeRange(m,g,m,x)),typeof l!="string"||g===x&&l===""||(f.insertRawText(l),m=p.getNode()),le(m)){const y=m.getTextContentSize();g=Math.min(Math.max(u,0),y),x=u<0||c<0?g:Math.min(u+c,y),f.setTextNodeRange(m,g,m,x)}if(typeof h=="string"&&c>0&&!f.isCollapsed()){const y=_H[h];y!==void 0&&f.formatText(y)}t.stopImmediatePropagation()}})}}}}}const TH={$import:(t,e)=>{const n=Ps(e.nodeName.toLowerCase());return bl(e,n),Qs(n,e),Mr(n,e),[n.splice(0,0,t.$importChildren(e))]},match:hi.tag("h1","h2","h3","h4","h5","h6"),name:"@lexical/rich-text/heading"},PH={$import:(t,e)=>{const n=zu();return Qs(n,e),bl(e,n),Mr(n,e),[n.splice(0,0,t.$importChildren(e))]},match:hi.tag("blockquote"),name:"@lexical/rich-text/blockquote"};hi.tag("blockquote");hi.tag("p"),hi.tag("span");const rP=Ue("DRAG_DROP_PASTE_FILE"),Oy=$h("shadowRoot",{parse:Boolean});let N1=class WR extends $i{static getType(){return"quote"}static clone(e){return new WR(e.__key)}$config(){return this.config("quote",{extends:$i,stateConfigs:[{flat:!0,stateConfig:Oy}]})}isShadowRoot(){return uu(this,Oy)}setIsShadowRoot(e){return Kl(this,Oy,e)}createDOM(e){const n=rn().createElement("blockquote");return as(n,e.theme.quote),n}updateDOM(e,n){return!1}static importDOM(){return{blockquote:e=>({conversion:AH,priority:0})}}exportDOM(e){const{element:n}=super.exportDOM(e);if(Je(n)){this.isEmpty()&&n.append(rn().createElement("br"));const i=this.getFormatType();i&&(n.style.textAlign=i);const r=this.getDirection();r&&(n.dir=r)}return{element:n}}static importJSON(e){return zu().updateFromJSON(e)}exportJSON(){return super.exportJSON()}insertNewAfter(e,n){const i=ut(),r=this.getDirection();return i.setDirection(r),this.insertAfter(i,n),i}collapseAtStart(){if(this.isShadowRoot()){for(const n of this.getChildren())this.insertBefore(n);return this.remove(),!0}const e=ut();return this.getChildren().forEach(n=>e.append(n)),this.replace(e),!0}canMergeWhenEmpty(){return!0}};function zu(t){const e=Ui(new N1);return t&&t.shadowRoot?e.setIsShadowRoot(!0):e}function dS(t){return t instanceof N1}let Yp=class HR extends $i{constructor(n="h1",i){super(i);se(this,"__tag");this.__tag=n}static getType(){return"heading"}static clone(n){return new HR(n.__tag,n.__key)}afterCloneFrom(n){super.afterCloneFrom(n),this.__tag=n.__tag}getTag(){return this.getLatest().__tag}setTag(n){const i=this.getWritable();return i.__tag=n,i}createDOM(n){const i=this.__tag,r=rn().createElement(i),s=n.theme.heading;if(s!==void 0){const o=s[i];as(r,o)}return r}updateDOM(n,i,r){return n.__tag!==this.__tag}static importDOM(){return{h1:n=>({conversion:uc,priority:0}),h2:n=>({conversion:uc,priority:0}),h3:n=>({conversion:uc,priority:0}),h4:n=>({conversion:uc,priority:0}),h5:n=>({conversion:uc,priority:0}),h6:n=>({conversion:uc,priority:0}),p:n=>{const i=n.firstChild;return i!==null&&sP(i)?{conversion:()=>({node:null}),priority:3}:null},span:n=>sP(n)?{conversion:i=>({node:Ps("h1")}),priority:3}:null}}exportDOM(n){const{element:i}=super.exportDOM(n);if(Je(i)){this.isEmpty()&&i.append(rn().createElement("br"));const r=this.getFormatType();r&&(i.style.textAlign=r);const s=this.getDirection();s&&(i.dir=s)}return{element:i}}static importJSON(n){return Ps(n.tag).updateFromJSON(n)}updateFromJSON(n){return super.updateFromJSON(n).setTag(n.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(n,i=!0){const r=n?n.anchor.offset:0,s=this.getLastDescendant(),o=!s||n&&n.anchor.key===s.getKey()&&r===s.getTextContentSize()||!n?ut():Ps(this.getTag()),a=this.getDirection();if(o.setDirection(a),this.insertAfter(o,i),r===0&&!this.isEmpty()&&n){const l=ut();l.select(),this.replace(l,!0)}return o}collapseAtStart(){if(this.isEmpty()){const n=ut();this.getChildren().forEach(i=>n.append(i)),this.replace(n)}return!0}extractWithChild(){return!0}};function sP(t){return t.nodeName.toLowerCase()==="span"&&t.style.fontSize==="26pt"}function uc(t){const e=t.nodeName.toLowerCase();let n=null;return e!=="h1"&&e!=="h2"&&e!=="h3"&&e!=="h4"&&e!=="h5"&&e!=="h6"||(n=Ps(e),bl(t,n),Qs(n,t),Mr(n,t)),{node:n}}function AH(t){const e=zu();return Qs(e,t),bl(t,e),Mr(e,t),{node:e}}function Ps(t="h1"){return Ui(new Yp(t))}function L1(t){return t instanceof Yp}function oP(t){const e=os(t);return ht(e)}function cc(t,e,n,i){let r=!1,s=null;if(t.isCollapsed()&&t.anchor.type==="text"){const a=t.anchor.getNode();if(le(a)){s=a;const l=t.anchor.offset,u=l===a.getTextContentSize()&&a.getNextSibling()===null,c=l===0&&a.getPreviousSibling()===null;r=n==="end"&&u||n==="start"&&c||n==="both"&&(u||c)}}let o=!1;for(const[a,l]of Object.entries(i)){if(l==null||!l[e])continue;const u=a;if(l.onlyAtBoundary){if(!(r&&s&&le(s)&&s.hasFormat(u)))continue;o=!0}t.hasFormat(u)&&t.toggleFormat(u)}o&&t.setStyle("")}const $H={capitalize:{enter:!0,space:!0,tab:!0},lowercase:{enter:!0,space:!0,tab:!0},uppercase:{enter:!0,space:!0,tab:!0}};function Um(t,e){return(function(n,i){if(!n.isCollapsed())return!1;const r=bi(n.focus,i),s=Lt(r.origin,nu);if(!s)return!1;const o=n.focus.getNode();if(!s.is(o)&&!pu(o,s))return!1;const a=ns(r,Rt(s,i));if(a.getTextSlices().some(h=>h&&h.getTextContentSize()>0))return!1;const l=ns(a.anchor.getSiblingCaret(),a.focus);let u=l.anchor.origin;for(const h of l){if(!po(h)||!h.origin.is(u.getParent()))return!1;u=h.origin}let c=s;for(const h of Wp(Rt(s,i))){if(!h.origin.is(c.getParent())){if(rd(h.origin)){const f=Rt(c,i);return vu(ns(f,f)),!0}break}if(!nu(h.origin))break;c=h.origin}return!1})(t,e)||(function(n,i){if(!n.isCollapsed()||n.anchor.type!=="element")return!1;const r=bi(n.anchor,i).getNodeAtCaret();return!(!nu(r)||r.isInline()||(vu(Zh(vi(Ii(r,i)))),0))})(t,e)}function aP(t){return ht(t)&&!t.isInline()&&!t.isIsolated()&&t.isKeyboardSelectable()}function qm(t){const e=eh();e.add(t),yn(e)}function lP(t,e){if(!t.isCollapsed())return!1;const n=t.focus,i=n.getNode(),r=e?"previous":"next",s=bi(n,r);if(n.type==="element"&&W(i)&&(xn(i)||nu(i))){const y=s.getNodeAtCaret();return!(y===null||!aP(y))&&(qm(y.__key),!0)}const o=Lt(W(i)?i:i.getParentOrThrow(),y=>W(y)&&!y.isInline()&&It(y.getParent()));if(o===null)return!1;const a=Rt(o,r).getNodeAtCaret();if(a===null||!aP(a))return!1;if(o.getTextContentSize()===0)return qm(a.__key),!0;const l=hn().getRootElement();if(l===null)return!1;const u=Mi(l.ownerDocument.defaultView);if(u===null||u.rangeCount===0)return!1;const c=u.anchorNode,h=u.anchorOffset,f=u.focusNode,p=u.focusOffset;u.modify("move",e?"backward":"forward","line");const m=u.anchorNode,g=u.anchorOffset;if(m===null)return uP(u,c,h,f,p),!1;const x=os(m);return uP(u,c,h,f,p),x===null?!1:(m===c&&g===h||!x.is(o)&&!pu(x,o))&&(qm(a.__key),!0)}function uP(t,e,n,i,r){e!==null&&i!==null&&t.setBaseAndExtent(e,n,i,r)}function cP(t,e){if(!t.isCollapsed())return!1;const n=t.focus.getNode(),i=Lt(W(n)?n:n.getParentOrThrow(),x=>W(x)&&!x.isInline());if(i===null)return!1;const r=hn(),s=r.getRootElement();if(s===null)return!1;const o=s.ownerDocument.defaultView;if(o===null)return!1;let a=!1;for(const x of i.getChildren())if(W(x)&&x.isInline()){const y=r.getElementByKey(x.getKey());if(y!==null){const S=o.getComputedStyle(y).display;if(S==="inline-grid"||S==="inline-flex"){a=!0;break}}}if(!a)return!1;const l=Rt(i,e?"previous":"next").getNodeAtCaret();if(l===null||!W(l)){if(e){const x=i.getFirstDescendant();le(x)?x.select(0,0):i.select(0,0)}else{const x=i.getLastDescendant();if(le(x)){const y=x.getTextContentSize();x.select(y,y)}else{const y=i.getChildrenSize();i.select(y,y)}}return!0}const u=r.getElementByKey(l.getKey());if(u===null)return!1;const c=Mi(o);if(c===null||c.rangeCount===0)return!1;const h=c.getRangeAt(0).cloneRange();h.collapse(!0);const f=h.getBoundingClientRect(),p=u.getBoundingClientRect(),m=p.top+p.height/2;if(f.height>0){const x=Z0(f.left,m,s);if(x!==null&&u.contains(x.node)){const y=s.ownerDocument.createRange();return y.setStart(x.node,x.offset),y.collapse(!0),t.applyDOMRange(y),t.dirty=!0,!0}}const g=e?l.getLastDescendant():l.getFirstDescendant();if(le(g)){const x=e?g.getTextContentSize():0;g.select(x,x)}else{const x=l.getChildrenSize();l.select(e?x:0,e?x:0)}return!0}function Ym(t,e){const n=Rt(t,e),i=n.getAdjacentCaret();i!==null&&W(i.origin)&&!i.origin.isInline()&&i.origin.isShadowRoot()?vu(Zh(n)):e==="next"?t.selectNext(0,0):t.selectPrevious()}function hP(t,e,n){n.preventDefault(),n.stopPropagation();const i=t.getNodes();if(i.length===0)return!0;const r=i.map(l=>Rt(l,"next")).sort(rh),s=(e?r[0]:r[r.length-1]).origin,o=Lt(s,l=>l!==s&&W(l)&&!l.isInline())??pt(),a=e?0:o.getChildrenSize();return o.select(a,a),!0}function IH(t,e=Qd($H)){return wn(t.registerCommand(Rp,()=>{const n=me();return Ct(n)?(n.clear(),!0):(ae(n)&&cc(n,"click","both",e.peek()),!1)},tt),t.registerCommand(za,n=>{const i=me();return ae(i)?(i.deleteCharacter(n),!0):!!Ct(i)&&(i.deleteNodes(),!0)},tt),t.registerCommand(Gc,n=>{const i=me();return!!ae(i)&&(i.deleteWord(n),!0)},tt),t.registerCommand(Kc,n=>{const i=me();return!!ae(i)&&(i.deleteLine(n),!0)},tt),t.registerCommand(eu,n=>{const i=me();if(typeof n=="string")i!==null&&i.insertText(n);else{if(i===null)return!1;const r=n.dataTransfer;if(r!=null)hS(r,i);else if(ae(i)){const s=n.data;return s&&i.insertText(s),!0}}return!0},tt),t.registerCommand(nd,()=>{const n=me();return!!ae(n)&&(n.removeText(),!0)},tt),t.registerCommand(no,n=>{const i=me();return!(!ae(i)&&!Ct(i))&&(FC(i,n),!0)},tt),t.registerCommand(I6,n=>{const i=me();return!(!ae(i)&&!Ct(i))&&(G6(i,n),!0)},tt),t.registerCommand(R6,n=>{const i=me();if(!ae(i)&&!Ct(i))return!1;const r=i.getNodes();for(const s of r){const o=Lt(s,a=>W(a)&&!a.isInline());o!==null&&o.setFormat(n)}return!0},tt),t.registerCommand(Jl,n=>{const i=me();return!!ae(i)&&(i.insertLineBreak(n),!0)},tt),t.registerCommand(Yc,()=>{const n=me();return!!ae(n)&&(n.insertParagraph(),!0)},tt),t.registerCommand(IC,()=>{const n=Qh(),i=me();return ae(i)&&(n.setFormat(i.format),n.setStyle(i.style)),Du([n]),!0},tt),t.registerCommand(Td,()=>rS(n=>{const i=n.getIndent();n.setIndent(i+1)}),tt),t.registerCommand(C0,()=>rS(n=>{const i=n.getIndent();i>0&&n.setIndent(Math.max(0,i-1))}),tt),t.registerCommand(u1,n=>{const i=me();if(Ct(i)){const r=i.getNodes();if(r.length>0)return n.preventDefault(),Ym(r[0],"previous"),!0}else if(ae(i)&&(!n.shiftKey&&Um(i,"previous")||!n.shiftKey&&lP(i,!0)||!n.shiftKey&&cP(i,!0)))return n.preventDefault(),!0;return!1},tt),t.registerCommand(c1,n=>{const i=me();if(Ct(i)){const r=i.getNodes();if(r.length>0)return n.preventDefault(),Ym(r[0],"next"),!0}else if(ae(i)&&((function(r){const s=r.focus;return s.key==="root"&&s.offset===pt().getChildrenSize()})(i)||!n.shiftKey&&Um(i,"next")||!n.shiftKey&&lP(i,!1)||!n.shiftKey&&cP(i,!1)))return n.preventDefault(),!0;return!1},tt),t.registerCommand(l1,n=>{const i=me();if(Ct(i)){const r=i.getNodes();if(r.length>0)return n.preventDefault(),Ym(r[0],zm(r[0])?"next":"previous"),!0}if(!ae(i))return!1;if(!n.shiftKey&&Um(i,zm(i.anchor.getNode())?"next":"previous"))return n.preventDefault(),!0;if(n.shiftKey||cc(i,"arrow","start",e.peek()),FT(i,!0)){const r=n.shiftKey;return n.preventDefault(),jT(i,r,!0),!0}return!1},tt),t.registerCommand(PC,n=>{const i=me();if(Ct(i)){const r=i.getNodes();if(r.length>0)return n.preventDefault(),Ym(r[0],zm(r[0])?"previous":"next"),!0}if(!ae(i))return!1;if(!n.shiftKey&&Um(i,zm(i.anchor.getNode())?"previous":"next"))return n.preventDefault(),!0;if(n.shiftKey||cc(i,"arrow","end",e.peek()),FT(i,!1)){const r=n.shiftKey;return n.preventDefault(),jT(i,r,!1),!0}return!1},tt),t.registerCommand(Nh,n=>{const i=me();if(!Ct(i)&&oP(n.target))return!1;if(ae(i)){if((function(r){if(!r.isCollapsed())return!1;const{anchor:s}=r;if(s.offset!==0)return!1;const o=s.getNode();if(xn(o))return!1;const a=aR(o);return a.getIndent()>0&&(a.is(o)||o.is(a.getFirstDescendant()))})(i))return n.preventDefault(),t.dispatchCommand(C0,void 0);if(Ko&&lu)return!1}else if(!Ct(i))return!1;return n.preventDefault(),t.dispatchCommand(za,!0)},tt),t.registerCommand(f1,n=>{const i=me();return!(!Ct(i)&&oP(n.target))&&!(!ae(i)&&!Ct(i))&&(n.preventDefault(),t.dispatchCommand(za,!1))},tt),t.registerCommand(Ka,n=>{let i=me();if(Ct(i)){const r=i.getNodes();r.length===1&&ht(r[0])&&!r[0].isInline()&&(i=r[0].selectNext())}if(!ae(i))return!1;if(cc(i,"enter","both",e.peek()),n!==null){if((Ko||Ph||Ah)&&lu)return!1;if(n.preventDefault(),n.shiftKey)return t.dispatchCommand(Jl,!1)}return t.dispatchCommand(Yc,void 0)},tt),t.registerCommand(Lh,()=>{const n=me();return!!ae(n)&&(t.blur(),!0)},tt),t.registerCommand(d1,n=>{const[,i]=Xm(n);if(i.length>0){const r=n.clientX,s=n.clientY,o=Z0(r,s,t.getRootElement());if(o!==null){const{offset:a,node:l}=o,u=os(l);if(u!==null){const c=Lu();if(le(u))c.anchor.set(u.getKey(),a,"text"),c.focus.set(u.getKey(),a,"text");else{const f=u.getParentOrThrow().getKey(),p=u.getIndexWithinParent()+1;c.anchor.set(f,p,"element"),c.focus.set(f,p,"element")}const h=Cs(c);yn(h)}t.dispatchCommand(rP,i)}return n.preventDefault(),!0}return xH(n,t)},tt),t.registerCommand(Dp,n=>{const[i]=Xm(n),r=me();return!(i&&!ae(r))&&(ae(r)&&!r.isCollapsed()&&n.dataTransfer!==null&&(zR(n.dataTransfer,ZR(r)),gH(n.dataTransfer,t)),!0)},tt),t.registerCommand(p1,n=>{const[i]=Xm(n),r=me();if(i&&!ae(r))return!1;const s=n.clientX,o=n.clientY,a=Z0(s,o,t.getRootElement());if(a!==null){const l=os(a.node);ht(l)&&n.preventDefault()}return!0},tt),t.registerCommand(RC,()=>{const n=me();return T4(ae(n)&&Xp(n.anchor.getNode())!==null?n:null),!0},tt),t.registerCommand(Qp,n=>(tP(t,Bo(n,ClipboardEvent)?n:null),!0),tt),t.registerCommand(m1,n=>((async function(i,r){await tP(r,Bo(i,ClipboardEvent)?i:null),r.update(()=>{const s=me();ae(s)?s.removeText():Ct(s)&&s.getNodes().forEach(o=>o.remove())},{tag:LC})})(n,t),!0),tt),t.registerCommand(Rh,n=>{const[,i,r]=Xm(n);return i.length>0&&!r?(t.dispatchCommand(rP,i),!0):Bu(n.target)&&Fp(n.target)?!1:me()!==null&&((function(s,o){s.preventDefault(),o.update(()=>{const a=me(),l=Bo(s,InputEvent)||Bo(s,KeyboardEvent)?null:s.clipboardData;l!=null&&a!==null&&hS(l,a)},{tag:NC})})(n,t),!0)},tt),t.registerCommand(h1,()=>{const n=me();return ae(n)&&cc(n,"space","both",e.peek()),!1},tt),t.registerCommand(Lp,()=>{const n=me();return ae(n)&&cc(n,"tab","both",e.peek()),!1},tt),t.registerCommand(AC,n=>{const i=me();if(Ct(i))return hP(i,!1,n);if(!ae(i))return!1;const{anchor:r}=i;if(r.type!=="element"||r.offset!==0)return!1;const s=r.getNode();if(!W(s))return!1;const o=s.getFirstChild();if(!ht(o)||!o.isInline())return!1;const a=s.getKey(),l=s.selectEnd();return n.shiftKey&&l.anchor.set(a,0,"element"),n.preventDefault(),n.stopPropagation(),!0},tt),t.registerCommand($C,n=>{const i=me();if(Ct(i))return hP(i,!0,n);if(!ae(i))return!1;const{anchor:r,focus:s}=i,o=Lt(s.getNode(),u=>W(u)&&!u.isInline());if(o===null)return!1;const a=o.getFirstChild();if(!ht(a)||!a.isInline()||Lt(r.getNode(),u=>W(u)&&!u.isInline())!==o)return!1;const l=o.getKey();return(s.type!=="element"||s.key!==l||s.offset!==0)&&(i.focus.set(l,0,"element"),n.shiftKey||i.anchor.set(l,0,"element"),n.preventDefault(),n.stopPropagation(),!0)},tt))}UR.peek=QH;var RH=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],MH={canContainEols:["highlight"],enter:{highlight:NH},exit:{highlight:LH}};function NH(t){this.enter({type:"highlight",children:[]},t)}function LH(t){this.exit(t)}var DH={unsafe:[{character:"=",inConstruct:"phrasing",notInConstruct:RH}],handlers:{highlight:UR}};function UR(t,e,n,i){const s=n.createTracker(i),o=n.enter("highlight");let a=s.move("==");return a+=s.move(n.containerPhrasing(t,{before:a,after:"=",...s.current()})),a+=s.move("=="),o(),a}function QH(){return"="}const qR=" ";function YR(){return{canContainEols:["mdxJsxTextElement"],enter:{mdxJsxFlowTag:i,mdxJsxFlowTagClosingMarker:r,mdxJsxFlowTagAttribute:h,mdxJsxFlowTagExpressionAttribute:f,mdxJsxFlowTagAttributeValueLiteral:t,mdxJsxFlowTagAttributeValueExpression:t,mdxJsxFlowTagSelfClosingMarker:o,mdxJsxTextTag:i,mdxJsxTextTagClosingMarker:r,mdxJsxTextTagAttribute:h,mdxJsxTextTagExpressionAttribute:f,mdxJsxTextTagAttributeValueLiteral:t,mdxJsxTextTagAttributeValueExpression:t,mdxJsxTextTagSelfClosingMarker:o},exit:{mdxJsxFlowTagClosingMarker:a,mdxJsxFlowTagNamePrimary:l,mdxJsxFlowTagNameMember:u,mdxJsxFlowTagNameLocal:c,mdxJsxFlowTagExpressionAttribute:p,mdxJsxFlowTagExpressionAttributeValue:n,mdxJsxFlowTagAttributeNamePrimary:m,mdxJsxFlowTagAttributeNameLocal:g,mdxJsxFlowTagAttributeValueLiteral:x,mdxJsxFlowTagAttributeValueLiteralValue:n,mdxJsxFlowTagAttributeValueExpression:y,mdxJsxFlowTagAttributeValueExpressionValue:n,mdxJsxFlowTagSelfClosingMarker:S,mdxJsxFlowTag:_,mdxJsxTextTagClosingMarker:a,mdxJsxTextTagNamePrimary:l,mdxJsxTextTagNameMember:u,mdxJsxTextTagNameLocal:c,mdxJsxTextTagExpressionAttribute:p,mdxJsxTextTagExpressionAttributeValue:n,mdxJsxTextTagAttributeNamePrimary:m,mdxJsxTextTagAttributeNameLocal:g,mdxJsxTextTagAttributeValueLiteral:x,mdxJsxTextTagAttributeValueLiteralValue:n,mdxJsxTextTagAttributeValueExpression:y,mdxJsxTextTagAttributeValueExpressionValue:n,mdxJsxTextTagSelfClosingMarker:S,mdxJsxTextTag:_}};function t(){this.buffer()}function e(E){return{line:E.line,column:E.column,offset:E.offset}}function n(E){this.config.enter.data.call(this,E),this.config.exit.data.call(this,E)}function i(E){const P={name:void 0,attributes:[],close:!1,selfClosing:!1,start:E.start,end:E.end};this.data.mdxJsxTagStack||(this.data.mdxJsxTagStack=[]),this.data.mdxJsxTag=P,this.buffer()}function r(E){if(this.data.mdxJsxTagStack.length===0)throw new mi("Unexpected closing slash `/` in tag, expected an open tag first",{start:E.start,end:E.end},"mdast-util-mdx-jsx:unexpected-closing-slash")}function s(E){if(this.data.mdxJsxTag.close)throw new mi("Unexpected attribute in closing tag, expected the end of the tag",{start:E.start,end:E.end},"mdast-util-mdx-jsx:unexpected-attribute")}function o(E){if(this.data.mdxJsxTag.close)throw new mi("Unexpected self-closing slash `/` in closing tag, expected the end of the tag",{start:E.start,end:E.end},"mdast-util-mdx-jsx:unexpected-self-closing-slash")}function a(){const E=this.data.mdxJsxTag;E.close=!0}function l(E){const P=this.data.mdxJsxTag;P.name=this.sliceSerialize(E)}function u(E){const P=this.data.mdxJsxTag;P.name+="."+this.sliceSerialize(E)}function c(E){const P=this.data.mdxJsxTag;P.name+=":"+this.sliceSerialize(E)}function h(E){const P=this.data.mdxJsxTag;s.call(this,E),P.attributes.push({type:"mdxJsxAttribute",name:"",value:null,position:{start:e(E.start),end:void 0}})}function f(E){const P=this.data.mdxJsxTag;s.call(this,E),P.attributes.push({type:"mdxJsxExpressionAttribute",value:"",position:{start:e(E.start),end:void 0}}),this.buffer()}function p(E){const P=this.data.mdxJsxTag,$=P.attributes[P.attributes.length-1];yr($.type==="mdxJsxExpressionAttribute");const B=E.estree;$.value=this.resume(),yr($.position!==void 0),$.position.end=e(E.end),B&&($.data={estree:B})}function m(E){const P=this.data.mdxJsxTag,$=P.attributes[P.attributes.length-1];yr($.type==="mdxJsxAttribute"),$.name=this.sliceSerialize(E),yr($.position!==void 0),$.position.end=e(E.end)}function g(E){const P=this.data.mdxJsxTag,$=P.attributes[P.attributes.length-1];yr($.type==="mdxJsxAttribute"),$.name+=":"+this.sliceSerialize(E),yr($.position!==void 0),$.position.end=e(E.end)}function x(E){const P=this.data.mdxJsxTag,$=P.attributes[P.attributes.length-1];$.value=r1(this.resume(),{nonTerminated:!1}),yr($.position!==void 0),$.position.end=e(E.end)}function y(E){const P=this.data.mdxJsxTag,$=P.attributes[P.attributes.length-1];yr($.type==="mdxJsxAttribute");const B={type:"mdxJsxAttributeValueExpression",value:this.resume()},X=E.estree;X&&(B.data={estree:X}),$.value=B,yr($.position!==void 0),$.position.end=e(E.end)}function S(){const E=this.data.mdxJsxTag;E.selfClosing=!0}function _(E){const P=this.data.mdxJsxTag,$=this.data.mdxJsxTagStack,B=$[$.length-1];if(P.close&&B.name!==P.name)throw new mi("Unexpected closing tag `"+b(P)+"`, expected corresponding closing tag for `"+b(B)+"` ("+Qm(B)+")",{start:E.start,end:E.end},"mdast-util-mdx-jsx:end-tag-mismatch");this.resume(),P.close?$.pop():this.enter({type:E.type==="mdxJsxTextTag"?"mdxJsxTextElement":"mdxJsxFlowElement",name:P.name||null,attributes:P.attributes,children:[]},E,k),P.selfClosing||P.close?this.exit(E,w):$.push(P)}function k(E,P){const $=this.data.mdxJsxTagStack,B=$[$.length-1],X=E?" before the end of `"+E.type+"`":"",j=E?{start:E.start,end:E.end}:void 0;throw new mi("Expected a closing tag for `"+b(B)+"` ("+Qm({start:P.start,end:P.end})+")"+X,j,"mdast-util-mdx-jsx:end-tag-mismatch")}function w(E,P){const $=this.data.mdxJsxTag;throw new mi("Expected the closing tag `"+b($)+"` either after the end of `"+P.type+"` ("+Qm(P.end)+") or another opening tag after the start of `"+P.type+"` ("+Qm(P.start)+")",{start:E.start,end:E.end},"mdast-util-mdx-jsx:end-tag-mismatch")}function b(E){return"<"+(E.close?"/":"")+(E.name||"")+">"}}function GR(t){const e={},n=e.quote||'"',i=e.quoteSmart||!1,r=e.tightSelfClosing||!1,s=e.printWidth||Number.POSITIVE_INFINITY,o=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize attribute values with `"+n+"` for `options.quote`, expected `\"`, or `'`");return a.peek=BH,{handlers:{mdxJsxFlowElement:a,mdxJsxTextElement:a},unsafe:[{character:"<",inConstruct:["phrasing"]},{atBreak:!0,character:"<"}],fences:!0,resourceLink:!0};function a(l,u,c,h){const f=l.type==="mdxJsxFlowElement",p=l.name?!l.children||l.children.length===0:!1,m=KR(c),g=JR(m),x=c.createTracker(h),y=c.createTracker(h),S=[],_=(f?g:"")+"<"+(l.name||""),k=c.enter(l.type);if(x.move(_),y.move(_),l.attributes&&l.attributes.length>0){if(!l.name)throw new Error("Cannot serialize fragment w/ attributes");let $=-1;for(;++$<l.attributes.length;){const B=l.attributes[$];let X;if(B.type==="mdxJsxExpressionAttribute")X="{"+(B.value||"")+"}";else{if(!B.name)throw new Error("Cannot serialize attribute w/o name");const j=B.value,Z=B.name;let G="";if(j!=null)if(typeof j=="object")G="{"+(j.value||"")+"}";else{const z=i&&y0(j,n)>y0(j,o)?o:n;G=z+e6(j,{subset:[z]})+z}X=Z+(G?"=":"")+G}S.push(X)}}let w=!1;const b=S.join(" ");f&&(/\r?\n|\r/.test(b)||x.current().now.column+b.length+(p?r?2:3:1)>s)&&(w=!0);let E=x,P=_;if(w){E=y;let $=-1;for(;++$<S.length;)S[$]=g+qR+S[$];P+=E.move(`
|
|
35
|
+
`+S.join(`
|
|
36
|
+
`)+`
|
|
37
|
+
`+g)}else b&&(P+=E.move(" "+b));return p&&(P+=E.move((r||w?"":" ")+"/")),P+=E.move(">"),l.children&&l.children.length>0&&(l.type==="mdxJsxTextElement"?P+=E.move(c.containerPhrasing(l,{...E.current(),before:">",after:"<"})):(E.shift(2),P+=E.move(`
|
|
38
|
+
`),P+=E.move(VH(l,c,E.current())),P+=E.move(`
|
|
39
|
+
`))),p||(P+=E.move((f?g:"")+"</"+(l.name||"")+">")),k(),P}}function VH(t,e,n){const i=e.indexStack,r=t.children,s=e.createTracker(n),o=JR(KR(e)),a=[];let l=-1;for(i.push(-1);++l<r.length;){const u=r[l];i[i.length-1]=l;const c={before:`
|
|
40
|
+
`,after:`
|
|
41
|
+
`,...s.current()},h=e.handle(u,t,e,c),f=u.type==="mdxJsxFlowElement"?h:e.indentLines(h,function(p,m,g){return(g?"":o)+p});a.push(s.move(f)),u.type!=="list"&&(e.bulletLastUsed=void 0),l<r.length-1&&a.push(s.move(`
|
|
42
|
+
|
|
43
|
+
`))}return i.pop(),a.join("")}function KR(t){let e=0,n=t.stack.length;for(;--n>-1;){const i=t.stack[n];if(i==="blockquote"||i==="listItem")break;i==="mdxJsxFlowElement"&&e++}return e}function JR(t){return qR.repeat(t)}function BH(){return"<"}var fP=Object.prototype.hasOwnProperty;function dP(t,e,n){for(n of t.keys())if(ad(n,e))return n}function ad(t,e){var n,i,r;if(t===e)return!0;if(t&&e&&(n=t.constructor)===e.constructor){if(n===Date)return t.getTime()===e.getTime();if(n===RegExp)return t.toString()===e.toString();if(n===Array){if((i=t.length)===e.length)for(;i--&&ad(t[i],e[i]););return i===-1}if(n===Set){if(t.size!==e.size)return!1;for(i of t)if(r=i,r&&typeof r=="object"&&(r=dP(e,r),!r)||!e.has(r))return!1;return!0}if(n===Map){if(t.size!==e.size)return!1;for(i of t)if(r=i[0],r&&typeof r=="object"&&(r=dP(e,r),!r)||!ad(i[1],e.get(r)))return!1;return!0}if(n===ArrayBuffer)t=new Uint8Array(t),e=new Uint8Array(e);else if(n===DataView){if((i=t.byteLength)===e.byteLength)for(;i--&&t.getInt8(i)===e.getInt8(i););return i===-1}if(ArrayBuffer.isView(t)){if((i=t.byteLength)===e.byteLength)for(;i--&&t[i]===e[i];);return i===-1}if(!n||typeof t=="object"){i=0;for(n in t)if(fP.call(t,n)&&++i&&!fP.call(e,n)||!(n in e)||!ad(t[n],e[n]))return!1;return Object.keys(e).length===i}}return t!==t&&e!==e}var FH={};let pS,e8,t8,n8,i8=!0;typeof process<"u"&&({FORCE_COLOR:pS,NODE_DISABLE_COLORS:e8,NO_COLOR:t8,TERM:n8}=FH||{},i8=process.stdout&&process.stdout.isTTY);const Et={enabled:!e8&&t8==null&&n8!=="dumb"&&(pS!=null&&pS!=="0"||i8),reset:mn(0,0),bold:mn(1,22),dim:mn(2,22),italic:mn(3,23),underline:mn(4,24),inverse:mn(7,27),hidden:mn(8,28),strikethrough:mn(9,29),black:mn(30,39),red:mn(31,39),green:mn(32,39),yellow:mn(33,39),blue:mn(34,39),magenta:mn(35,39),cyan:mn(36,39),white:mn(37,39),gray:mn(90,39),grey:mn(90,39),bgBlack:mn(40,49),bgRed:mn(41,49),bgGreen:mn(42,49),bgYellow:mn(43,49),bgBlue:mn(44,49),bgMagenta:mn(45,49),bgCyan:mn(46,49),bgWhite:mn(47,49)};function pP(t,e){let n=0,i,r="",s="";for(;n<t.length;n++)i=t[n],r+=i.open,s+=i.close,~e.indexOf(i.close)&&(e=e.replace(i.rgx,i.close+i.open));return r+e+s}function jH(t,e){let n={has:t,keys:e};return n.reset=Et.reset.bind(n),n.bold=Et.bold.bind(n),n.dim=Et.dim.bind(n),n.italic=Et.italic.bind(n),n.underline=Et.underline.bind(n),n.inverse=Et.inverse.bind(n),n.hidden=Et.hidden.bind(n),n.strikethrough=Et.strikethrough.bind(n),n.black=Et.black.bind(n),n.red=Et.red.bind(n),n.green=Et.green.bind(n),n.yellow=Et.yellow.bind(n),n.blue=Et.blue.bind(n),n.magenta=Et.magenta.bind(n),n.cyan=Et.cyan.bind(n),n.white=Et.white.bind(n),n.gray=Et.gray.bind(n),n.grey=Et.grey.bind(n),n.bgBlack=Et.bgBlack.bind(n),n.bgRed=Et.bgRed.bind(n),n.bgGreen=Et.bgGreen.bind(n),n.bgYellow=Et.bgYellow.bind(n),n.bgBlue=Et.bgBlue.bind(n),n.bgMagenta=Et.bgMagenta.bind(n),n.bgCyan=Et.bgCyan.bind(n),n.bgWhite=Et.bgWhite.bind(n),n}function mn(t,e){let n={open:`\x1B[${t}m`,close:`\x1B[${e}m`,rgx:new RegExp(`\\x1b\\[${e}m`,"g")};return function(i){return this!==void 0&&this.has!==void 0?(~this.has.indexOf(t)||(this.has.push(t),this.keys.push(n)),i===void 0?this:Et.enabled?pP(this.keys,i+""):i+""):i===void 0?jH([t],[n]):Et.enabled?pP([n],i+""):i+""}}function Sl(){}Sl.prototype={diff:function(e,n){var i,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=r.callback;typeof r=="function"&&(s=r,r={}),this.options=r;var o=this;function a(k){return s?(setTimeout(function(){s(void 0,k)},0),!0):k}e=this.castInput(e),n=this.castInput(n),e=this.removeEmpty(this.tokenize(e)),n=this.removeEmpty(this.tokenize(n));var l=n.length,u=e.length,c=1,h=l+u;r.maxEditLength&&(h=Math.min(h,r.maxEditLength));var f=(i=r.timeout)!==null&&i!==void 0?i:1/0,p=Date.now()+f,m=[{oldPos:-1,lastComponent:void 0}],g=this.extractCommon(m[0],n,e,0);if(m[0].oldPos+1>=u&&g+1>=l)return a([{value:this.join(n),count:n.length}]);var x=-1/0,y=1/0;function S(){for(var k=Math.max(x,-c);k<=Math.min(y,c);k+=2){var w=void 0,b=m[k-1],E=m[k+1];b&&(m[k-1]=void 0);var P=!1;if(E){var $=E.oldPos-k;P=E&&0<=$&&$<l}var B=b&&b.oldPos+1<u;if(!P&&!B){m[k]=void 0;continue}if(!B||P&&b.oldPos+1<E.oldPos?w=o.addToPath(E,!0,void 0,0):w=o.addToPath(b,void 0,!0,1),g=o.extractCommon(w,n,e,k),w.oldPos+1>=u&&g+1>=l)return a(ZH(o,w.lastComponent,n,e,o.useLongestToken));m[k]=w,w.oldPos+1>=u&&(y=Math.min(y,k-1)),g+1>=l&&(x=Math.max(x,k+1))}c++}if(s)(function k(){setTimeout(function(){if(c>h||Date.now()>p)return s();S()||k()},0)})();else for(;c<=h&&Date.now()<=p;){var _=S();if(_)return _}},addToPath:function(e,n,i,r){var s=e.lastComponent;return s&&s.added===n&&s.removed===i?{oldPos:e.oldPos+r,lastComponent:{count:s.count+1,added:n,removed:i,previousComponent:s.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:n,removed:i,previousComponent:s}}},extractCommon:function(e,n,i,r){for(var s=n.length,o=i.length,a=e.oldPos,l=a-r,u=0;l+1<s&&a+1<o&&this.equals(n[l+1],i[a+1]);)l++,a++,u++;return u&&(e.lastComponent={count:u,previousComponent:e.lastComponent}),e.oldPos=a,l},equals:function(e,n){return this.options.comparator?this.options.comparator(e,n):e===n||this.options.ignoreCase&&e.toLowerCase()===n.toLowerCase()},removeEmpty:function(e){for(var n=[],i=0;i<e.length;i++)e[i]&&n.push(e[i]);return n},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};function ZH(t,e,n,i,r){for(var s=[],o;e;)s.push(e),o=e.previousComponent,delete e.previousComponent,e=o;s.reverse();for(var a=0,l=s.length,u=0,c=0;a<l;a++){var h=s[a];if(h.removed){if(h.value=t.join(i.slice(c,c+h.count)),c+=h.count,a&&s[a-1].added){var p=s[a-1];s[a-1]=s[a],s[a]=p}}else{if(!h.added&&r){var f=n.slice(u,u+h.count);f=f.map(function(g,x){var y=i[c+x];return y.length>g.length?y:g}),h.value=t.join(f)}else h.value=t.join(n.slice(u,u+h.count));u+=h.count,h.added||(c+=h.count)}}var m=s[l-1];return l>1&&typeof m.value=="string"&&(m.added||m.removed)&&t.equals("",m.value)&&(s[l-2].value+=m.value,s.pop()),s}var mP=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,gP=/\S/,r8=new Sl;r8.equals=function(t,e){return this.options.ignoreCase&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e||this.options.ignoreWhitespace&&!gP.test(t)&&!gP.test(e)};r8.tokenize=function(t){for(var e=t.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<e.length-1;n++)!e[n+1]&&e[n+2]&&mP.test(e[n])&&mP.test(e[n+2])&&(e[n]+=e[n+2],e.splice(n+1,2),n--);return e};var s8=new Sl;s8.tokenize=function(t){this.options.stripTrailingCr&&(t=t.replace(/\r\n/g,`
|
|
44
|
+
`));var e=[],n=t.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var i=0;i<n.length;i++){var r=n[i];i%2&&!this.options.newlineIsToken?e[e.length-1]+=r:(this.options.ignoreWhitespace&&(r=r.trim()),e.push(r))}return e};var zH=new Sl;zH.tokenize=function(t){return t.split(/(\S.+?[.!?])(?=\s+|$)/)};var XH=new Sl;XH.tokenize=function(t){return t.split(/([{}:;,]|\s+)/)};function Jg(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Jg=function(e){return typeof e}:Jg=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jg(t)}var WH=Object.prototype.toString,Bd=new Sl;Bd.useLongestToken=!0;Bd.tokenize=s8.tokenize;Bd.castInput=function(t){var e=this.options,n=e.undefinedReplacement,i=e.stringifyReplacer,r=i===void 0?function(s,o){return typeof o>"u"?n:o}:i;return typeof t=="string"?t:JSON.stringify(mS(t,null,null,r),r," ")};Bd.equals=function(t,e){return Sl.prototype.equals.call(Bd,t.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"))};function mS(t,e,n,i,r){e=e||[],n=n||[],i&&(t=i(r,t));var s;for(s=0;s<e.length;s+=1)if(e[s]===t)return n[s];var o;if(WH.call(t)==="[object Array]"){for(e.push(t),o=new Array(t.length),n.push(o),s=0;s<t.length;s+=1)o[s]=mS(t[s],e,n,i,r);return e.pop(),n.pop(),o}if(t&&t.toJSON&&(t=t.toJSON()),Jg(t)==="object"&&t!==null){e.push(t),o={},n.push(o);var a=[],l;for(l in t)t.hasOwnProperty(l)&&a.push(l);for(a.sort(),s=0;s<a.length;s+=1)l=a[s],o[l]=mS(t[l],e,n,i,l);e.pop(),n.pop()}else o=t;return o}var gS=new Sl;gS.tokenize=function(t){return t.slice()};gS.join=gS.removeEmpty=function(t){return t};Et.red,Et.grey,Et.green;Et.dim().italic;Et.dim("→");Et.dim("·");Et.dim("↵");function X0(t){t=t.replace(/\r?\n/g,`
|
|
45
|
+
`);let e=t.match(/^[ \t]*(?=\S)/gm),n=0,i=1/0,r=(e||[]).length;for(;n<r;n++)i=Math.min(i,e[n].length);return r&&i?t.replace(new RegExp(`^[ \\t]{${i}}`,"gm"),""):t}class HH extends Error{constructor(e={}){super(e.message),this.name="Assertion",this.code="ERR_ASSERTION",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.details=e.details||!1,this.generated=!!e.generated,this.operator=e.operator,this.expects=e.expects,this.actual=e.actual}}function is(t,e,n,i,r,s,o){if(t)return;let a=o||s;if(o instanceof Error)throw o;let l=r;throw new HH({actual:e,expects:n,operator:i,message:a,details:l,generated:!o})}function UH(t,e){is(!!t,!1,!0,"ok",!1,"Expected value to be truthy",e)}function na(t,e){is(!t,!0,!1,"not",!1,"Expected value to be falsey",e)}na.ok=na;na.equal=function(t,e,n){is(!ad(t,e),t,e,"not.equal",!1,"Expected values not to be deeply equal",n)};na.type=function(t,e,n){let i=typeof t;is(i!==e,i,e,"not.type",!1,`Expected "${i}" not to be "${e}"`,n)};na.instance=function(t,e,n){let i="`"+(e.name||e.constructor.name)+"`";is(!(t instanceof e),t,e,"not.instance",!1,`Expected value not to be an instance of ${i}`,n)};na.snapshot=function(t,e,n){t=X0(t),e=X0(e),is(t!==e,t,e,"not.snapshot",!1,"Expected value not to match snapshot",n)};na.fixture=function(t,e,n){t=X0(t),e=X0(e),is(t!==e,t,e,"not.fixture",!1,"Expected value not to match fixture",n)};na.match=function(t,e,n){typeof e=="string"?is(!t.includes(e),t,e,"not.match",!1,`Expected value not to include "${e}" substring`,n):is(!e.test(t),t,e,"not.match",!1,`Expected value not to match \`${String(e)}\` pattern`,n)};na.throws=function(t,e,n){!n&&typeof e=="string"&&(n=e,e=null);try{t()}catch(i){typeof e=="function"?is(!e(i),!0,!1,"not.throws",!1,"Expected function not to throw matching exception",n):e instanceof RegExp?is(!e.test(i.message),!0,!1,"not.throws",!1,`Expected function not to throw exception matching \`${String(e)}\` pattern`,n):e||is(!1,!0,!1,"not.throws",!1,"Expected function not to throw",n)}};const Tf={equalsTo:61},OP={attentionSideAfter:2},xP={data:"data",characterEscape:"characterEscape"};var Pf="highlightSequenceTemporary",yP="highlightSequence",qH="highlight",YH="highlightText";function GH(){const t={name:"highlight",tokenize:n,resolveAll:e};return{text:{[Tf.equalsTo]:t},insideSpan:{null:[t]},attentionMarkers:{null:[Tf.equalsTo]}};function e(i,r){let s=-1;for(;++s<i.length;)if(i[s][0]==="enter"&&i[s][1].type===Pf&&i[s][1]._close){let o=s;for(;o--;)if(i[o][0]==="exit"&&i[o][1].type===Pf&&i[o][1]._open&&i[s][1].end.offset-i[s][1].start.offset===i[o][1].end.offset-i[o][1].start.offset){i[s][1].type=yP,i[o][1].type=yP;const a={type:qH,start:Object.assign({},i[o][1].start),end:Object.assign({},i[s][1].end)},l={type:YH,start:Object.assign({},i[o][1].end),end:Object.assign({},i[s][1].start)},u=[["enter",a,r],["enter",i[o][1],r],["exit",i[o][1],r],["enter",l,r]],c=r.parser.constructs.insideSpan.null;c&&Jx(u,u.length,0,Uj(c,i.slice(o+1,s),r)),Jx(u,u.length,0,[["exit",l,r],["enter",i[s][1],r],["exit",i[s][1],r],["exit",a,r]]),Jx(i,o-1,s-o+3,u),s=o+u.length-2;break}}for(s=-1;++s<i.length;)i[s][1].type===Pf&&(i[s][1].type=xP.data);return i}function n(i,r,s){const o=this.previous,a=this.events;let l=0;return u;function u(h){return UH(h===Tf.equalsTo,"expected `=`"),o===Tf.equalsTo&&a[a.length-1][1].type!==xP.characterEscape?s(h):(i.enter(Pf),c(h))}function c(h){const f=TE(o);if(h===Tf.equalsTo)return l>1?s(h):(i.consume(h),l++,c);if(l<2)return s(h);const p=i.exit(Pf),m=TE(h);return p._open=!m||m===OP.attentionSideAfter&&!!f,p._close=!f||f===OP.attentionSideAfter&&!!m,r(h)}}}const KH={}.hasOwnProperty,JH=Symbol("continue"),xy=Symbol("exit"),eU=Symbol("skip");function tU(t,e){let n,i;typeof e=="function"?n=e:e&&typeof e=="object"&&(e.enter&&(n=e.enter),e.leave&&(i=e.leave)),r(t,void 0,void 0,[])();function r(s,o,a,l){return yy(s)&&(u.displayName="node ("+s.type+")"),u;function u(){const c=n?vP(n(s,o,a,l)):[];if(c[0]===xy)return c;if(c[0]!==eU){let h;for(h in s)if(KH.call(s,h)&&s[h]&&typeof s[h]=="object"&&h!=="data"&&h!=="position"){const f=l.concat(s),p=s[h];if(Array.isArray(p)){const m=p;let g=0;for(;g>-1&&g<m.length;){const x=m[g];if(yy(x)){const y=r(x,h,g,f)();if(y[0]===xy)return y;g=typeof y[1]=="number"?y[1]:g+1}else g++}}else if(yy(p)){const m=r(p,h,void 0,f)();if(m[0]===xy)return m}}}return i?vP(i(s,o,a,l)):c}}}function vP(t){return Array.isArray(t)?t:typeof t=="number"?[JH,t]:[t]}function yy(t){return!!(t&&typeof t=="object"&&"type"in t&&typeof t.type=="string"&&t.type.length>0)}function o8(t,e){const n=e.prefix||"",i=e.suffix||"",r=Object.assign({},e.acornOptions),s=[],o=[],a=r.onComment,l=r.onToken;let u=!1,c,h;const f=Object.assign({},r,{onComment:s,preserveParens:!0});l&&(f.onToken=o);const p=nU(t,e.tokenTypes),m=p.value,g=n+m+i,x=e.expression&&bP(m);if(x&&!e.allowEmpty)throw new mi("Unexpected empty expression",{place:S(0),ruleId:"unexpected-empty-expression",source:"micromark-extension-mdx-expression"});try{c=e.expression&&!x?e.acorn.parseExpressionAt(g,0,f):e.acorn.parse(g,f)}catch(_){const k=_,w=S(k.pos);k.message=String(k.message).replace(/ \(\d+:\d+\)$/,""),k.pos=w.offset,k.loc={line:w.line,column:w.column-1},h=k,u=k.raisedAt>=n.length+m.length||k.message==="Unterminated comment"}if(c&&e.expression&&!x)if(bP(g.slice(c.end,g.length-i.length)))c={type:"Program",start:0,end:n.length+m.length,body:[{type:"ExpressionStatement",expression:c,start:0,end:n.length+m.length}],sourceType:"module",comments:[]};else{const _=S(c.end),k=new Error("Unexpected content after expression");k.pos=_.offset,k.loc={line:_.line,column:_.column-1},h=k,c=void 0}if(c){if(c.comments=s,tU(c,function(_,k,w,b){let E=b[b.length-1],P=k;_.type==="ParenthesizedExpression"&&E&&P&&(typeof w=="number"&&(E=E[P],P=w),E[P]=_.expression),y(_)}),Array.isArray(a))a.push(...s);else if(typeof a=="function")for(const _ of s)a(_.type==="Block",_.value,_.start,_.end,_.loc.start,_.loc.end);for(const _ of o)_.end<=n.length||_.start-n.length>=m.length||(y(_),Array.isArray(l)?l.push(_):l(_))}return{estree:c,error:h,swallow:u};function y(_){const k=S(_.start),w=S(_.end);_.start=k.offset,_.end=w.offset,_.loc={start:{line:k.line,column:k.column-1,offset:k.offset},end:{line:w.line,column:w.column-1,offset:w.offset}},_.range=[_.start,_.end]}function S(_){let k=_-n.length;k<0?k=0:k>m.length&&(k=m.length);let w=iU(p.stops,k);return w||(w={line:e.start.line,column:e.start.column,offset:e.start.offset}),w}}function bP(t){return/^\s*$/.test(t.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g,""))}function nU(t,e){const n={value:"",stops:[]};let i=-1;for(;++i<t.length;){const r=t[i];if(r[0]==="enter"){const s=r[1].type;if(s==="lineEnding"||e.includes(s)){const o=r[2].sliceStream(r[1]);for(;o.length>0&&o[0]===-1;)o.shift();const a=rU(o);n.stops.push([n.value.length,r[1].start]),n.value+=a,n.stops.push([n.value.length,r[1].end])}}}return n}function iU(t,e){let n=0;for(;n<t.length&&t[n][0]<=e;)n+=1;if(n===0)return;const[i,r]=t[n-1],s=e-i;return{line:r.line,column:r.column+s,offset:r.offset+s}}function rU(t){let e=-1;const n=[];let i;for(;++e<t.length;){const r=t[e];let s;if(typeof r=="string")s=r;else switch(r){case-5:{s="\r";break}case-4:{s=`
|
|
46
|
+
`;break}case-3:{s=`\r
|
|
47
|
+
`;break}case-2:{s=" ";break}case-1:{if(i)continue;s=" ";break}default:s=String.fromCharCode(r)}i=r===-2,n.push(s)}return n.join("")}function e0(t){const e=t||{},n=e.loc||{},i=e.range||[void 0,void 0],r=SP(n.start,i[0]||e.start),s=SP(n.end,i[1]||e.end);if(r&&s)return{start:r,end:s}}function SP(t,e){if(t&&typeof t=="object"){const n="line"in t?vy(t.line):void 0,i="column"in t?vy(t.column):void 0;if(n&&i!==void 0)return{line:n,column:i+1,offset:vy(e)}}}function vy(t){return typeof t=="number"&&t>-1?t:void 0}const sU=2,_c="https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression",oU="#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-",aU="#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed",_P="#unexpected-type-in-code-expected-an-object-spread-spread",lU="#unexpected-extra-content-in-spread-only-a-single-spread-is-supported",uU="#could-not-parse-expression-with-acorn";function W0(t,e,n,i,r,s,o,a,l,u,c){const h=this,f=this.events.length+3;let p=0,m,g;return x;function x(k){return t.enter(n),t.enter(i),t.consume(k),t.exit(i),m=h.now(),y}function y(k){if(k===null){if(g)throw g;const w=new mi("Unexpected end of file in expression, expected a corresponding closing brace for `{`",{place:h.now(),ruleId:"unexpected-eof",source:"micromark-extension-mdx-expression"});throw w.url=_c+oU,w}if(ln(k))return t.enter("lineEnding"),t.consume(k),t.exit("lineEnding"),_;if(k===125&&p===0){const w=s?cU.call(h,s,o,r,f,m,u||!1,l||!1):{type:"ok",estree:void 0};if(w.type==="ok"){t.enter(i),t.consume(k),t.exit(i);const b=t.exit(n);return a&&w.estree&&Object.assign(b,{estree:w.estree}),e}return g=w.message,t.enter(r),t.consume(k),S}return t.enter(r),S(k)}function S(k){return k===125&&p===0||k===null||ln(k)?(t.exit(r),y(k)):(k===123&&!s?p+=1:k===125&&(p-=1),t.consume(k),S)}function _(k){const w=h.now();if(w.line!==m.line&&!c&&h.parser.lazy[w.line]){const b=new mi("Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",{place:h.now(),ruleId:"unexpected-lazy",source:"micromark-extension-mdx-expression"});throw b.url=_c+aU,b}return Ur(k)?qr(t,y,"linePrefix",sU+1)(k):y(k)}}function cU(t,e,n,i,r,s,o){const a=o8(this.events.slice(i),{acorn:t,tokenTypes:[n],acornOptions:e,start:r,expression:!0,allowEmpty:s,prefix:o?"({":"",suffix:o?"})":""}),l=a.estree;if(o&&l){const u=l.body[0];if(u.type!=="ExpressionStatement"||u.expression.type!=="ObjectExpression"){const c=e0(u),h=new mi("Unexpected `"+u.type+"` in code: expected an object spread (`{...spread}`)",{place:c.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw h.url=_c+_P,h}if(u.expression.properties[1]){const c=e0(u.expression.properties[1]),h=new mi("Unexpected extra content in spread: only a single spread is supported",{place:c.start,ruleId:"spread-extra",source:"micromark-extension-mdx-expression"});throw h.url=_c+lU,h}if(u.expression.properties[0]&&u.expression.properties[0].type!=="SpreadElement"){const c=e0(u.expression.properties[0]),h=new mi("Unexpected `"+u.expression.properties[0].type+"` in code: only spread elements are supported",{place:c.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw h.url=_c+_P,h}}if(a.error){const u=new mi("Could not parse expression with acorn",{cause:a.error,place:{line:a.error.loc.line,column:a.error.loc.column+1,offset:a.error.pos},ruleId:"acorn",source:"micromark-extension-mdx-expression"});return u.url=_c+uU,{type:"nok",message:u}}return{type:"ok",estree:l}}const CP="https://github.com/micromark/micromark-extension-mdx-jsx";function a8(t,e,n,i,r,s,o,a,l,u,c,h,f,p,m,g,x,y,S,_,k,w,b,E,P,$,B,X,j,Z,G,z){const J=this;let ue,Le;return ye;function ye(O){return t.enter(a),t.enter(l),t.consume(O),t.exit(l),xe}function xe(O){return Ji(O)?n(O):(ue=Re,ft(O))}function Re(O){if(O===47)return t.enter(u),t.consume(O),t.exit(u),ue=Ae,ft;if(O===62)return vn(O);if(O!==null&&O>=0&&gs(O))return t.enter(h),t.enter(f),t.consume(O),Be;Mt(O,"before name","a character that can start a name, such as a letter, `$`, or `_`"+(O===33?" (note: to create a comment in MDX, use `{/* text */}`)":""))}function Ae(O){if(O===62)return vn(O);if(O!==null&&O>=0&&gs(O))return t.enter(h),t.enter(f),t.consume(O),Be;Mt(O,"before name","a character that can start a name, such as a letter, `$`, or `_`"+(O===42||O===47?" (note: JS comments in JSX tags are not supported in MDX)":""))}function Be(O){if(O!==null&&O>=0&&Sf(O,{jsx:!0}))return t.consume(O),Be;if(O===46||O===47||O===58||O===62||O===123||Ji(O)||Sa(O))return t.exit(f),ue=lt,ft(O);Mt(O,"in name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(O===64?" (note: to create a link in MDX, use `[text](url)`)":""))}function lt(O){if(O===46)return t.enter(p),t.consume(O),t.exit(p),ue=qe,ft;if(O===58)return t.enter(g),t.consume(O),t.exit(g),ue=pe,ft;if(O===47||O===62||O===123||O!==null&&O>=0&&gs(O))return t.exit(h),Ze(O);Mt(O,"after name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function qe(O){if(O!==null&&O>=0&&gs(O))return t.enter(m),t.consume(O),je;Mt(O,"before member name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function je(O){if(O!==null&&O>=0&&Sf(O,{jsx:!0}))return t.consume(O),je;if(O===46||O===47||O===62||O===123||Ji(O)||Sa(O))return t.exit(m),ue=we,ft(O);Mt(O,"in member name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(O===64?" (note: to create a link in MDX, use `[text](url)`)":""))}function we(O){if(O===46)return t.enter(p),t.consume(O),t.exit(p),ue=qe,ft;if(O===47||O===62||O===123||O!==null&&O>=0&&gs(O))return t.exit(h),Ze(O);Mt(O,"after member name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function pe(O){if(O!==null&&O>=0&&gs(O))return t.enter(x),t.consume(O),ge;Mt(O,"before local name","a character that can start a name, such as a letter, `$`, or `_`"+(O===43||O!==null&&O>46&&O<58?" (note: to create a link in MDX, use `[text](url)`)":""))}function ge(O){if(O!==null&&O>=0&&Sf(O,{jsx:!0}))return t.consume(O),ge;if(O===47||O===62||O===123||Ji(O)||Sa(O))return t.exit(x),ue=Ve,ft(O);Mt(O,"in local name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag")}function Ve(O){if(O===47||O===62||O===123||O!==null&&O>=0&&gs(O))return t.exit(h),Ze(O);Mt(O,"after local name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function Ze(O){if(O===47)return t.enter(c),t.consume(O),t.exit(c),ue=An,ft;if(O===62)return vn(O);if(O===123)return W0.call(J,t,Ge,y,S,_,i,r,s,!0,!1,o)(O);if(O!==null&&O>=0&&gs(O))return t.enter(k),t.enter(w),t.enter(b),t.consume(O),et;Mt(O,"before attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function Ge(O){return ue=Ze,ft(O)}function et(O){if(O!==null&&O>=0&&Sf(O,{jsx:!0}))return t.consume(O),et;if(O===47||O===58||O===61||O===62||O===123||Ji(O)||Sa(O))return t.exit(b),ue=Qt,ft(O);Mt(O,"in attribute name","an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function Qt(O){if(O===58)return t.enter(E),t.consume(O),t.exit(E),ue=wt,ft;if(O===61)return t.exit(w),t.enter($),t.consume(O),t.exit($),ue=dn,ft;if(O===47||O===62||O===123||Ji(O)||Sa(O)||O!==null&&O>=0&&gs(O))return t.exit(w),t.exit(k),ue=Ze,ft(O);Mt(O,"after attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function wt(O){if(O!==null&&O>=0&&gs(O))return t.enter(P),t.consume(O),Ut;Mt(O,"before local attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Ut(O){if(O!==null&&O>=0&&Sf(O,{jsx:!0}))return t.consume(O),Ut;if(O===47||O===61||O===62||O===123||Ji(O)||Sa(O))return t.exit(P),t.exit(w),ue=xt,ft(O);Mt(O,"in local attribute name","an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function xt(O){if(O===61)return t.enter($),t.consume(O),t.exit($),ue=dn,ft;if(O===47||O===62||O===123||O!==null&&O>=0&&gs(O))return t.exit(k),Ze(O);Mt(O,"after local attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function dn(O){if(O===34||O===39)return t.enter(B),t.enter(X),t.consume(O),t.exit(X),Le=O,Tn;if(O===123)return W0.call(J,t,En,Z,G,z,i,r,s,!1,!1,o)(O);Mt(O,"before attribute value","a character that can start an attribute value, such as `\"`, `'`, or `{`"+(O===60?" (note: to use an element or fragment as a prop value in MDX, use `{<element />}`)":""))}function En(O){return t.exit(k),ue=Ze,ft(O)}function Tn(O){return O===null&&Mt(O,"in attribute value","a corresponding closing quote `"+String.fromCodePoint(Le)+"`"),O===Le?(t.enter(X),t.consume(O),t.exit(X),t.exit(B),t.exit(k),Le=void 0,ue=Ze,ft):ln(O)?(ue=Tn,ft(O)):(t.enter(j),pn(O))}function pn(O){return O===null||O===Le||ln(O)?(t.exit(j),Tn(O)):(t.consume(O),pn)}function An(O){if(O===62)return vn(O);Mt(O,"after self-closing slash","`>` to end the tag"+(O===42||O===47?" (note: JS comments in JSX tags are not supported in MDX)":""))}function vn(O){return t.enter(l),t.consume(O),t.exit(l),t.exit(a),e}function ft(O){return ln(O)?(t.enter("lineEnding"),t.consume(O),t.exit("lineEnding"),Di):Ur(O)||Sa(O)?(t.enter("esWhitespace"),$n(O)):ue(O)}function $n(O){return ln(O)?(t.exit("esWhitespace"),ft(O)):Ur(O)||Sa(O)?(t.consume(O),$n):(t.exit("esWhitespace"),ue(O))}function Di(O){if(!o&&J.parser.lazy[J.now().line]){const U=new mi("Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",J.now(),"micromark-extension-mdx-jsx:unexpected-lazy");throw U.url=CP+"#unexpected-lazy-line-in-container-expected-line-to-be",U}return ft(O)}function Mt(O,U,ie){const M=new mi("Unexpected "+(O===null?"end of file":"character `"+(O===96?"` ` `":String.fromCodePoint(O))+"` ("+hU(O)+")")+" "+U+", expected "+ie,J.now(),"micromark-extension-mdx-jsx:unexpected-"+(O===null?"eof":"character"));throw M.url=CP+(O===null?"#unexpected-end-of-file-at-expected-expect":"#unexpected-character-at-expected-expect"),M}}function hU(t){return"U+"+t.toString(16).toUpperCase().padStart(4,"0")}function fU(t,e){return{name:"mdxJsxTextTag",tokenize:n};function n(i,r,s){return a8.call(this,i,r,s,t,e.acornOptions,e.addResult,!0,"mdxJsxTextTag","mdxJsxTextTagMarker","mdxJsxTextTagClosingMarker","mdxJsxTextTagSelfClosingMarker","mdxJsxTextTagName","mdxJsxTextTagNamePrimary","mdxJsxTextTagNameMemberMarker","mdxJsxTextTagNameMember","mdxJsxTextTagNamePrefixMarker","mdxJsxTextTagNameLocal","mdxJsxTextTagExpressionAttribute","mdxJsxTextTagExpressionAttributeMarker","mdxJsxTextTagExpressionAttributeValue","mdxJsxTextTagAttribute","mdxJsxTextTagAttributeName","mdxJsxTextTagAttributeNamePrimary","mdxJsxTextTagAttributeNamePrefixMarker","mdxJsxTextTagAttributeNameLocal","mdxJsxTextTagAttributeInitializerMarker","mdxJsxTextTagAttributeValueLiteral","mdxJsxTextTagAttributeValueLiteralMarker","mdxJsxTextTagAttributeValueLiteralValue","mdxJsxTextTagAttributeValueExpression","mdxJsxTextTagAttributeValueExpressionMarker","mdxJsxTextTagAttributeValueExpressionValue")}}function dU(t,e){return{concrete:!0,name:"mdxJsxFlowTag",tokenize:n};function n(i,r,s){const o=this;return a;function a(h){return l(h)}function l(h){return a8.call(o,i,u,s,t,e.acornOptions,e.addResult,!1,"mdxJsxFlowTag","mdxJsxFlowTagMarker","mdxJsxFlowTagClosingMarker","mdxJsxFlowTagSelfClosingMarker","mdxJsxFlowTagName","mdxJsxFlowTagNamePrimary","mdxJsxFlowTagNameMemberMarker","mdxJsxFlowTagNameMember","mdxJsxFlowTagNamePrefixMarker","mdxJsxFlowTagNameLocal","mdxJsxFlowTagExpressionAttribute","mdxJsxFlowTagExpressionAttributeMarker","mdxJsxFlowTagExpressionAttributeValue","mdxJsxFlowTagAttribute","mdxJsxFlowTagAttributeName","mdxJsxFlowTagAttributeNamePrimary","mdxJsxFlowTagAttributeNamePrefixMarker","mdxJsxFlowTagAttributeNameLocal","mdxJsxFlowTagAttributeInitializerMarker","mdxJsxFlowTagAttributeValueLiteral","mdxJsxFlowTagAttributeValueLiteralMarker","mdxJsxFlowTagAttributeValueLiteralValue","mdxJsxFlowTagAttributeValueExpression","mdxJsxFlowTagAttributeValueExpressionMarker","mdxJsxFlowTagAttributeValueExpressionValue")(h)}function u(h){return Ur(h)?qr(i,c,"whitespace")(h):c(h)}function c(h){const f=o.parser.constructs.flow[123],p=Array.isArray(f)?f:f?[f]:[];let m;for(const g of p)if(g.name==="mdxFlowExpression"){m=g;break}return h===60?a(h):h===123&&m?i.attempt(m,c,s)(h):h===null||ln(h)?r(h):s(h)}}}function l8(t){const e=t||{},n=e.acorn;let i;if(n){if(!n.parse||!n.parseExpressionAt)throw new Error("Expected a proper `acorn` instance passed in as `options.acorn`");i=Object.assign({ecmaVersion:2024,sourceType:"module"},e.acornOptions,{locations:!0})}else if(e.acornOptions||e.addResult)throw new Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{60:dU(n||void 0,{acornOptions:i,addResult:e.addResult||void 0})},text:{60:fU(n||void 0,{acornOptions:i,addResult:e.addResult||void 0})}}}function u8(){return{disable:{null:["autolink","codeIndented","htmlFlow","htmlText"]}}}const pU=["mdxJsxTextElement","mdxJsxFlowElement"];function Sw(t){return pU.includes(t.type)&&_w.includes(t.name)}const _w=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","input","ins","kbd","label","legend","li","link","main","map","mark","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function mU(t,e){const n=wP(t),i=wP(e),r={...n,...i};return gU(r)}function wP(t){const e={};return t.split(";").filter(i=>i.trim()!=="").forEach(i=>{const[r,s]=i.split(":").map(o=>o.trim());e[r]=s}),e}function gU(t){return Object.entries(t).map(([e,n])=>`${e}: ${n}`).join("; ")}function OU(t){return t.children instanceof Array}function D1({root:t,visitors:e,jsxComponentDescriptors:n,jsxIsAvailable:i,addImportStatements:r=!0}){let s=null;const o=new Set,a=new Map;e=[...e].sort((y,S)=>(S.priority??0)-(y.priority??0)),h(t,null);function l(y,S){o.add(y),S&&a.set(y,{...S})}function u(y,S){if(s===null)return s=S,s;if(!OU(y))throw new Error("Attempting to append children to a non-parent");const _=y.children,k=_.at(-1);if(k){const w=e.find(b=>{var E;return(E=b.shouldJoin)==null?void 0:E.call(b,k,S)});if(w){const b=w.join(k,S);return _.splice(_.length-1,1,b),b}}return _.push(S),S}function c(y,S){y.getChildren().forEach(_=>{h(_,S)})}function h(y,S,_=null){var k;const w=e.find((b,E)=>{var P;return _!=null&&_.has(E)?!1:(P=b.testLexicalNode)==null?void 0:P.call(b,y)});if(!w)throw new Error(`no lexical visitor found for ${y.getType()}`,{cause:y});(k=w.visitLexicalNode)==null||k.call(w,{lexicalNode:y,mdastParent:S,actions:{addAndStepInto(b,E={},P=!0){const $={type:b,...E,...P?{children:[]}:{}};u(S,$),W(y)&&P&&c(y,$)},appendToParent:u,visitChildren:c,visit:h,registerReferredComponent:l,nextVisitor(){h(y,S,(_??new Set).add(e.indexOf(w)))}}})}if(s===null)throw new Error("traversal ended with no root element");const f=new Map,p=new Map;for(const y of o){const S=n.find(_=>_.name===y)??a.get(y)??n.find(_=>_.name==="*");if(!S)throw new Error(`Component ${y} is used but not imported`);if(S.source)if(S.defaultExport)p.set(y,S.source);else{const{source:_}=S,k=f.get(_);k?k.push(y):f.set(_,[y])}}if(!r){for(const[y,S]of f.entries()){const _=S.filter(k=>a.has(k));_.length>0?f.set(y,_):f.delete(y)}for(const y of p.keys())a.has(y)||p.delete(y)}const m=Array.from(f).map(([y,S])=>({type:"mdxjsEsm",value:`import { ${S.join(", ")} } from '${y}'`}));m.push(...Array.from(p).map(([y,S])=>({type:"mdxjsEsm",value:`import ${y} from '${S}'`})));const g=s,x=g.children.find(y=>y.type==="yaml");return x?g.children.splice(g.children.indexOf(x)+1,0,...m):g.children.unshift(...m),t0(g,[]),c8(g),i||h8(g),g}function c8(t){if("children"in t&&t.children.length>0){if(Sw(t)&&t.children.length===1){const e=t.children[0];e.type==="mdxJsxTextElement"&&e.name==="span"&&(e.attributes.forEach(n=>{if(n.type==="mdxJsxAttribute"){const i=t.attributes.find(r=>r.type==="mdxJsxAttribute"&&r.name===n.name);if(i)if(n.name==="className"){const r=new Set([...i.value.split(" "),...n.value.split(" ")]);i.value=Array.from(r).join(" ")}else n.name==="style"&&(i.value=mU(i.value,n.value));else t.attributes.push(n)}}),t.children=e.children)}t.children.forEach(e=>{c8(e)})}}function h8(t){if(Object.hasOwn(t,"children")){const e=t,n=[];e.children.forEach(i=>{i.type==="mdxJsxTextElement"&&i.name==="u"?n.push({type:"html",value:"<u>"},...i.children,{type:"html",value:"</u>"}):(n.push(i),h8(i))}),e.children=n}}const kP=/\s+$/,EP=/^\s+/;function t0(t,e){if(t.type==="strong"||t.type==="emphasis"){const n=t.children.at(-1);if((n==null?void 0:n.type)==="text"){const r=kP.exec(n.value);if(r){n.value=n.value.replace(kP,"");const s=e.at(-1);s&&(s.children.splice(s.children.indexOf(t)+1,0,{type:"text",value:r[0]}),t0(s,e.slice(0,-1)))}}const i=t.children.at(0);if((i==null?void 0:i.type)==="text"){const r=EP.exec(i.value);if(r){i.value=i.value.replace(EP,"");const s=e.at(-1);s&&(s.children.splice(s.children.indexOf(t),0,{type:"text",value:r[0]}),t0(s,e.slice(0,-1)))}}}if("children"in t&&t.children.length>0){const n=t;n.children.forEach(i=>{t0(i,[...e,n])})}}function Q1({root:t,toMarkdownOptions:e,toMarkdownExtensions:n,visitors:i,jsxComponentDescriptors:r,jsxIsAvailable:s}){return i6(D1({root:t,visitors:i,jsxComponentDescriptors:r,jsxIsAvailable:s}),{extensions:n,...e})+`
|
|
48
|
+
`}function Af(t){return t.children instanceof Array}class H0 extends Error{constructor(e,n){super(e),this.name="MarkdownParseError",this.cause=n}}class U0 extends Error{constructor(e){super(e),this.name="UnrecognizedMarkdownConstructError"}}function xU(t){const e=new Map;return t.type!=="root"?{importDeclarations:{}}:(t.children.filter(i=>i.type==="mdxjsEsm").filter(i=>i.value.startsWith("import ")).forEach(i=>{var r,s;(((s=(r=i.data)==null?void 0:r.estree)==null?void 0:s.body)??[]).forEach(o=>{o.type==="ImportDeclaration"&&o.specifiers.forEach(a=>{e.set(a.local.name,{source:`${o.source.value}`,defaultExport:a.type==="ImportDefaultSpecifier"})})})}),{importDeclarations:Object.fromEntries(e.entries())})}function f8({root:t,markdown:e,visitors:n,syntaxExtensions:i,mdastExtensions:r,...s}){var o;let a;try{a=qj(e,{extensions:i,mdastExtensions:r})}catch(l){throw l instanceof Error?new H0(`Error parsing markdown: ${l.message}`,l):new H0(`Error parsing markdown: ${l}`,l)}a.children.length===0&&a.children.push({type:"paragraph",children:[]}),((o=a.children.at(-1))==null?void 0:o.type)!=="paragraph"&&a.children.push({type:"paragraph",children:[]}),V1({root:t,mdastRoot:a,visitors:n,...s})}function V1({root:t,mdastRoot:e,visitors:n,...i}){const r=new WeakMap,s=new WeakMap,o=xU(e);n=n.sort((u,c)=>(c.priority??0)-(u.priority??0));function a(u,c){if(!Af(u))throw new Error("Attempting to visit children of a non-parent");u.children.forEach(h=>{l(h,c,u)})}function l(u,c,h,f=null){const p=n.find((m,g)=>f!=null&&f.has(g)?!1:typeof m.testNode=="string"?m.testNode===u.type:m.testNode(u,i));if(!p)try{throw new U0(`Unsupported markdown syntax: ${i6(u)}`)}catch{throw new U0(`Parsing of the following markdown structure failed: ${JSON.stringify({type:u.type,name:"name"in u?u.name:"N/A"})}`)}p.visitNode({mdastNode:u,lexicalParent:c,mdastParent:h,descriptors:i,metaData:o,actions:{visitChildren:a,nextVisitor(){l(u,c,h,(f??new Set).add(n.indexOf(p)))},addAndStepInto(m){c.append(m),Af(u)&&a(u,m)},addFormatting(m,g){g||Af(u)&&(g=u),g&&r.set(g,m|(r.get(h)??0))},removeFormatting(m,g){g||Af(u)&&(g=u),g&&r.set(g,m^(r.get(h)??0))},getParentFormatting(){return r.get(h)??0},addStyle(m,g){g||Af(u)&&(g=u),g&&s.set(g,m)},getParentStyle(){return s.get(h)??""}}})}l(e,t,null)}function yU(t,e){return n=>t(e(n))}function vU(t,e){return e(t)}function bU(t,e){return n=>t(e,n)}function SU(t,e){return()=>t(e)}function _U(t){return e=>e[t]}function d8(t,e){return e(t),t}function p8(t){t()}function CU(t){return()=>t}function wU(...t){return()=>{t.map(p8)}}function Ua(){}var kU=Object.defineProperty,EU=(t,e,n)=>e in t?kU(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,by=(t,e,n)=>EU(t,typeof e!="symbol"?e+"":e,n);const OS="generic-html";class Wh extends $i{constructor(e,n,i,r){super(r),by(this,"__tag"),by(this,"__nodeType"),by(this,"__attributes"),this.__tag=e,this.__nodeType=n,this.__attributes=i}static getType(){return OS}static clone(e){return new Wh(e.__tag,e.__nodeType,e.__attributes,e.__key)}getTag(){return this.__tag}getNodeType(){return this.__nodeType}getAttributes(){return this.__attributes}updateAttributes(e){const n=this.getWritable();n.__attributes=e}getStyle(){var e;return(e=this.__attributes.find(n=>n.name==="style"))==null?void 0:e.value}createDOM(){const e=this.__tag,n=document.createElement(e);return this.__attributes.forEach(i=>{n.setAttribute(i.name,i.value)}),n}updateDOM(){return!1}static importDOM(){return{}}exportDOM(e){const{element:n}=super.exportDOM(e);return{element:n}}static importJSON(e){const n=Cw(e.tag,e.mdxType,e.attributes);return n.setFormat(e.format),n.setIndent(e.indent),n.setDirection(e.direction),n}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),attributes:this.__attributes,mdxType:this.__nodeType,type:OS,version:1}}extractWithChild(){return!0}isInline(){return this.__nodeType==="mdxJsxTextElement"}}function Cw(t,e,n){return Ui(new Wh(t,e,n))}function m8(t){return t instanceof Wh}const TU={testLexicalNode:m8,visitLexicalNode({actions:t,lexicalNode:e}){t.addAndStepInto("mdxJsxTextElement",{name:e.getTag(),type:e.getNodeType(),attributes:e.getAttributes()})},priority:-100},PU={testLexicalNode:Gn,visitLexicalNode:({mdastParent:t,actions:e})=>{e.appendToParent(t,{type:"text",value:`
|
|
49
|
+
`})}},AU={testLexicalNode:Qu,visitLexicalNode:({actions:t})=>{t.addAndStepInto("paragraph")}},$U={testLexicalNode:xn,visitLexicalNode:({actions:t})=>{t.addAndStepInto("root")}},IU=0,Ic=1,Rc=2,Mc=4,Nc=8,Gp=16,Lc=32,Dc=64,Qc=128;function TP(t){return t.type==="text"}const RU=["u","span","sub","sup"],MU={shouldJoin:(t,e)=>{if(["text","emphasis","strong","highlight"].includes(t.type))return t.type===e.type;if(t.type==="mdxJsxTextElement"&&e.type==="mdxJsxTextElement"&&RU.includes(e.name)){const n=e;return t.name===n.name&&JSON.stringify(t.attributes)===JSON.stringify(n.attributes)}return!1},join(t,e){return TP(t)&&TP(e)?{type:"text",value:t.value+e.value}:{...t,children:[...t.children,...e.children]}},testLexicalNode:le,visitLexicalNode:({lexicalNode:t,mdastParent:e,actions:n})=>{const i=t.getPreviousSibling(),r=le(i)?i.getFormat():0,s=t.getTextContent(),o=t.getFormat(),a=t.getStyle();let l=e;if(a&&(l=n.appendToParent(l,{type:"mdxJsxTextElement",name:"span",children:[],attributes:[{type:"mdxJsxAttribute",name:"style",value:a}]})),r&o&Nc&&(l=n.appendToParent(l,{type:"mdxJsxTextElement",name:"u",children:[],attributes:[]})),r&o&Dc&&(l=n.appendToParent(l,{type:"mdxJsxTextElement",name:"sup",children:[],attributes:[]})),r&o&Lc&&(l=n.appendToParent(l,{type:"mdxJsxTextElement",name:"sub",children:[],attributes:[]})),r&o&Rc&&(l=n.appendToParent(l,{type:"emphasis",children:[]})),r&o&Ic&&(l=n.appendToParent(l,{type:"strong",children:[]})),r&o&Mc&&(l=n.appendToParent(l,{type:"delete",children:[]})),r&o&Qc&&(l=n.appendToParent(l,{type:"highlight",children:[]})),o&Nc&&!(r&Nc)&&(l=n.appendToParent(l,{type:"mdxJsxTextElement",name:"u",children:[],attributes:[]})),o&Dc&&!(r&Dc)&&(l=n.appendToParent(l,{type:"mdxJsxTextElement",name:"sup",children:[],attributes:[]})),o&Lc&&!(r&Lc)&&(l=n.appendToParent(l,{type:"mdxJsxTextElement",name:"sub",children:[],attributes:[]})),o&Rc&&!(r&Rc)&&(l=n.appendToParent(l,{type:"emphasis",children:[]})),o&Ic&&!(r&Ic)&&(l=n.appendToParent(l,{type:"strong",children:[]})),o&Mc&&!(r&Mc)&&(l=n.appendToParent(l,{type:"delete",children:[]})),o&Qc&&!(r&Qc)&&(l=n.appendToParent(l,{type:"highlight",children:[]})),o&Gp){n.appendToParent(l,{type:"inlineCode",value:s});return}n.appendToParent(l,{type:"text",value:s})}},NU={testNode:"break",visitNode:function({lexicalParent:t}){t.append(Xi())}};function Gm(t,e){return[{testNode:n=>n.type==="mdxJsxTextElement"&&n.name===t,visitNode({actions:n,mdastNode:i,lexicalParent:r}){n.addFormatting(e),n.visitChildren(i,r)}},{testNode:n=>n.type==="html"&&n.value===`<${t}>`,visitNode({actions:n,mdastParent:i}){n.addFormatting(e,i)}},{testNode:n=>n.type==="html"&&n.value===`</${t}>`,visitNode({actions:n,mdastParent:i}){n.removeFormatting(e,i)}}]}const LU={testNode:"delete",visitNode({mdastNode:t,actions:e,lexicalParent:n}){e.addFormatting(Mc),e.visitChildren(t,n)}},DU={testNode:"highlight",visitNode({mdastNode:t,actions:e,lexicalParent:n}){e.addFormatting(Qc),e.visitChildren(t,n)}},QU={testNode:"inlineCode",visitNode({mdastNode:t,actions:e}){e.addAndStepInto(Vt(t.value).setFormat(e.getParentFormatting()|Gp))}},VU={testNode:"emphasis",visitNode({mdastNode:t,actions:e,lexicalParent:n}){e.addFormatting(Rc),e.visitChildren(t,n)}},BU={testNode:"strong",visitNode({mdastNode:t,actions:e,lexicalParent:n}){e.addFormatting(Ic),e.visitChildren(t,n)}},FU=[VU,BU,...Gm("u",Nc),...Gm("code",Gp),QU,LU,DU,...Gm("sup",Dc),...Gm("sub",Lc)],jU={testNode:Sw,visitNode:function({mdastNode:t,actions:e,lexicalParent:n}){t.name==="span"&&t.attributes.length===1&&t.attributes[0].type==="mdxJsxAttribute"&&t.attributes[0].name==="style"?(e.addStyle(t.attributes[0].value,t),e.visitChildren(t,n)):e.addAndStepInto(Cw(t.name,t.type,t.attributes))},priority:-100},ZU=["listitem","admonition"],zU={testNode:"paragraph",visitNode:function({mdastNode:t,mdastParent:e,lexicalParent:n,actions:i}){const r=n.getType();if(ZU.includes(r)){const s=(e==null?void 0:e.children.indexOf(t))??-1,o=s>0?e==null?void 0:e.children.at(s-1):void 0;r==="listitem"&&(o==null?void 0:o.type)==="paragraph"&&n.append(Xi(),Xi()),i.visitChildren(t,n)}else i.addAndStepInto(ut())}},XU={testNode:"root",visitNode({actions:t,mdastNode:e,lexicalParent:n}){t.visitChildren(e,n)}},WU={testNode:"text",visitNode({mdastNode:t,actions:e}){const n=Vt(t.value);n.setFormat(e.getParentFormatting());const i=e.getParentStyle();i!==""&&n.setStyle(i),e.addAndStepInto(n)}},Os={dash:45,eof:null,exclamationMark:33,greaterThan:62},Nl={data:"data",lineEnding:"lineEnding",linePrefix:"linePrefix"};function HU(t){return{canContainEols:["comment"],enter:{comment(e){this.buffer()}},exit:{comment(e){this.resume()}}}}const PP=(t,e,n)=>{return i;function i(m){return t.enter("comment"),t.consume(m),r}function r(m){return m===Os.exclamationMark?(t.consume(m),s):n(m)}function s(m){return m===Os.dash?(t.consume(m),o):n(m)}function o(m){return m===Os.dash?(t.consume(m),a):n(m)}function a(m){return m===Os.greaterThan?n(m):ln(m)?c(m):(t.enter(Nl.data),m===Os.dash?(t.consume(m),l):u(m))}function l(m){return m===Os.greaterThan?n(m):u(m)}function u(m){return m===Os.eof?n(m):m===Os.dash?(t.consume(m),f):ln(m)?(t.exit(Nl.data),c(m)):(t.consume(m),u)}function c(m){return t.enter(Nl.lineEnding),t.consume(m),t.exit(Nl.lineEnding),qr(t,h,Nl.linePrefix)}function h(m){return ln(m)?c(m):(t.enter(Nl.data),u(m))}function f(m){return m===Os.dash?(t.consume(m),p):u(m)}function p(m){return m===Os.greaterThan?(t.exit(Nl.data),t.enter("commentEnd"),t.consume(m),t.exit("commentEnd"),t.exit("comment"),e(m)):m===Os.dash?(t.consume(m),p):u(m)}},UU={flow:{60:{tokenize:PP,concrete:!0}},text:{60:{tokenize:PP}}},qU="_bold_6j9u9_10",YU="_italic_6j9u9_14",GU="_underline_6j9u9_18",KU="_strikethrough_6j9u9_34",JU="_underlineStrikethrough_6j9u9_38",eq="_subscript_6j9u9_42",tq="_superscript_6j9u9_47",nq="_code_6j9u9_52",iq="_quote_6j9u9_59",rq="_nestedListItem_6j9u9_66",sq="_listitem_6j9u9_76",oq="_listItemChecked_6j9u9_80",aq="_listItemUnchecked_6j9u9_81",lq="_admonitionDanger_6j9u9_158",uq="_admonitionInfo_6j9u9_159",cq="_admonitionNote_6j9u9_160",hq="_admonitionTip_6j9u9_161",fq="_admonitionCaution_6j9u9_162",dq="_mdxExpression_6j9u9_195",Hn={bold:qU,italic:YU,underline:GU,strikethrough:KU,underlineStrikethrough:JU,subscript:eq,superscript:tq,code:nq,quote:iq,nestedListItem:rq,listitem:sq,listItemChecked:oq,listItemUnchecked:aq,admonitionDanger:lq,admonitionInfo:uq,admonitionNote:cq,admonitionTip:hq,admonitionCaution:fq,mdxExpression:dq},ww={quote:Hn.quote,text:{bold:Hn.bold,italic:Hn.italic,underline:Hn.underline,code:Hn.code,strikethrough:Hn.strikethrough,subscript:Hn.subscript,superscript:Hn.superscript,underlineStrikethrough:Hn.underlineStrikethrough},list:{listitem:Hn.listitem,listitemChecked:Hn.listItemChecked,listitemUnchecked:Hn.listItemUnchecked,nested:{listitem:Hn.nestedListItem}},admonition:{danger:Hn.admonitionDanger,info:Hn.admonitionInfo,note:Hn.admonitionNote,tip:Hn.admonitionTip,caution:Hn.admonitionCaution}},g8=R.createContext(null);function qi(){const t=R.useContext(g8);return t==null&&(function(e,...n){const i=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const s of n)r.append("v",s);throw i.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${i.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(8),t}function pq(){return pt().getTextContent()}function mq(t,e=!0){if(t)return!1;let n=pq();return e&&(n=n.trim()),n===""}function gq(t){if(!mq(t,!1))return!1;const e=pt().getChildren(),n=e.length;if(n>1)return!1;for(let i=0;i<n;i++){const r=e[i];if(ht(r))return!1;if(W(r)){if(!Qu(r)||r.__indent!==0)return!1;const s=r.getChildren(),o=s.length;for(let a=0;a<o;a++){const l=s[i];if(!le(l))return!1}}}return!0}function O8(t){return()=>gq(t)}const x8=Ri?R.useLayoutEffect:R.useEffect;function Oq({editor:t,ariaActiveDescendant:e,ariaAutoComplete:n,ariaControls:i,ariaDescribedBy:r,ariaErrorMessage:s,ariaExpanded:o,ariaInvalid:a,ariaLabel:l,ariaLabelledBy:u,ariaMultiline:c,ariaOwns:h,ariaRequired:f,autoCapitalize:p,className:m,id:g,role:x="textbox",spellCheck:y=!0,style:S,tabIndex:_,"data-testid":k,...w},b){const[E,P]=R.useState(t.isEditable()),$=R.useCallback(X=>{X&&X.ownerDocument&&X.ownerDocument.defaultView?t.setRootElement(X):t.setRootElement(null)},[t]),B=R.useMemo(()=>(function(...X){return j=>{for(const Z of X)typeof Z=="function"?Z(j):Z!=null&&(Z.current=j)}})(b,$),[$,b]);return x8(()=>(P(t.isEditable()),t.registerEditableListener(X=>{P(X)})),[t]),Y.jsx("div",{"aria-activedescendant":E?e:void 0,"aria-autocomplete":E?n:"none","aria-controls":E?i:void 0,"aria-describedby":r,...s!=null?{"aria-errormessage":s}:{},"aria-expanded":E&&x==="combobox"?!!o:void 0,...a!=null?{"aria-invalid":a}:{},"aria-label":l,"aria-labelledby":u,"aria-multiline":c,"aria-owns":E?h:void 0,"aria-readonly":!E||void 0,"aria-required":f,autoCapitalize:p,className:m,contentEditable:E,"data-testid":k,id:g,ref:B,role:x,spellCheck:y,style:S,tabIndex:_??(E?void 0:-1),...w})}const xq=R.forwardRef(Oq);function AP(t){return t.read("latest",O8(t.isComposing()))}const B1=R.forwardRef(yq);function yq(t,e){const{placeholder:n,...i}=t,[r]=qi();return Y.jsxs(Y.Fragment,{children:[Y.jsx(xq,{editor:r,...i,ref:e}),n!=null&&Y.jsx(vq,{editor:r,content:n})]})}function vq({content:t,editor:e}){const n=(function(o){const[a,l]=R.useState(()=>AP(o));return x8(()=>{function u(){const c=AP(o);l(c)}return u(),wn(o.registerUpdateListener(()=>{u()}),o.registerEditableListener(()=>{u()}))},[o]),a})(e),[i,r]=R.useState(e.isEditable());if(R.useLayoutEffect(()=>(r(e.isEditable()),e.registerEditableListener(o=>{r(o)})),[e]),!n)return null;let s=null;return typeof t=="function"?s=t(i):t!==null&&(s=t),s===null?null:Y.jsx("div",{"aria-hidden":!0,children:s})}let bq=class extends R.Component{constructor(){super(...arguments);se(this,"state",{hasError:!1})}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(n,i){this.props.onError(n instanceof Error?n:new Error(String(n),{cause:n}),i)}render(){return this.state.hasError?this.props.fallback:this.props.children}};function F1({children:t,fallback:e,onError:n}){return Y.jsx(bq,{fallback:e===void 0?Y.jsx("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}):e,onError:n,children:t})}const q0={name:"@lexical/react/ReactProvider"};function Sq(t,e){const[n]=e,i=t.decorators.map(r=>typeof r=="function"?Y.jsx(r,{context:e}):r);return function(r){const{EditorChildrenComponent:s=t.EditorChildrenComponent,ErrorBoundary:o=t.ErrorBoundary,contentEditable:a=t.contentEditable,children:l}=r,u=(function(h,f){const[p,m]=R.useMemo(()=>[x=>h.registerDecoratorListener(x),()=>h.getDecorators()],[h]),g=R.useSyncExternalStore(p,m,m);return R.useMemo(()=>{const x=[];for(const y in g){const S=h.getElementByKey(y);if(S!==null){const _=Y.jsx(f,{onError:k=>{h._onError(k)},children:Y.jsx(R.Suspense,{fallback:null,children:g[y]})});x.push(au.createPortal(_,S,y))}}return x},[f,g,h])})(n,o),c=R.useMemo(()=>i.map((h,f)=>Y.jsx(o,{onError:p=>{n._onError(p)},children:Y.jsx(R.Suspense,{fallback:null,children:h})},f)),[o]);return Y.jsx(g8.Provider,{value:e,children:Y.jsxs(s,{context:e,contentEditable:a,children:[l,c,u]})})}}function _q({contentEditable:t,children:e}){return Y.jsxs(Y.Fragment,{children:[t,e]})}const Cq={EditorChildrenComponent:_q,ErrorBoundary:F1,contentEditable:Y.jsx(B1,{}),decorators:[]},y8={build(t,e,n){n.getPeer(q0.name)||(function(r,...s){const o=new URL("https://lexical.dev/docs/error"),a=new URLSearchParams;a.append("code",r);for(const l of s)a.append("v",l);throw o.search=a.toString(),Error(`Minified Lexical error #${r}; visit ${o.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(321,[...n.getDirectDependentNames()].join(" "));const i=[t,{getTheme:()=>t._config.theme}];return{Component:Sq(e,i),context:i}},config:Cq,mergeConfig(t,e){const n=Up(t,e);return e.decorators&&(n.decorators=e.decorators.length>0?[...t.decorators,...e.decorators]:t.decorators),n},name:"@lexical/react/React",peerDependencies:[J4(q0.name)]},v8=new WeakSet,b8=new WeakMap,wq=new Set([fa,Rr,yl,xl,da]),Ll=new WeakMap;function kq(t){return Hl(Ac,{createInitialHistoryState:()=>t,disabled:!1})}function kw({name:t,namespace:e,nodes:n,theme:i,editable:r=!0,parentEditor:s,historyMode:o,historyState:a,initialEditorState:l,onError:u=c=>{throw c}}){const c=[q0,Hl(y8,{contentEditable:null}),Hl(OR,{setOptions:{tag:Xa},updateOptions:{tag:Xa}})];if(s&&c.push(Hl(gW,{$getParentEditor:()=>s,inheritEditableFromParent:!0})),o==="nested-shared")c.push(SW);else if(o==="root-shared"||o==="nested-external"){if(!a)throw new Error(`${o} requires a historyState`);c.push(kq(a))}else o==="table-local"&&c.push(Hl(Ac,{disabled:!1}));const h={name:t,namespace:e,nodes:n==null?void 0:n.filter(k=>!wq.has(k)),theme:i,editable:r,$initialEditorState:l,onError:u,dependencies:c},f=hW(h),p=Fu(f,Ac.name),m=p==null?void 0:p.output.historyState.value;m&&b8.set(f,m),m&&(Ll.has(m)||Ll.set(m,m.current));const g=m?f.registerUpdateListener(({dirtyElements:k,dirtyLeaves:w,tags:b})=>{const E=m.current;if(b.has(Xa)){Ll.set(m,E);return}if(k.size>0||w.size>0){Ll.set(m,E);return}const P=Ll.get(m);(E==null?void 0:E.editor)===f&&P&&P.editor!==f&&(m.undoStack.push({...P}),m.redoStack=[],f.dispatchCommand(Na,!0),f.dispatchCommand(Ma,!1)),Ll.set(m,E)}):()=>{},x=new Set,y=m?f.registerCommand(Dh,()=>{const k=setTimeout(()=>{x.delete(k),f.dispatchCommand(Na,m.undoStack.length>0),f.dispatchCommand(Ma,m.redoStack.length>0)});return x.add(k),!1},Gt):()=>{},S=f.dispose.bind(f);let _=!1;return f.dispose=()=>{_||(_=!0,x.forEach(clearTimeout),x.clear(),y(),g(),S())},o==="root-shared"&&v8.add(f),f}function Eq(t){return v8.has(t)}function Tq(t,e){return b8.get(t)===e}const il=Ue("NESTED_EDITOR_UPDATED_COMMAND"),mr=Ee(null),tn=Ee(null),Y0=Ee(""),G0=Ee(!0),zn=Ee(!1,t=>{t.sub(t.pipe(zn,On(mr)),([e,n])=>{n==null||n.setEditable(!e)})}),K0=Ee(""),xS=Ee(!1),sh=Ee(!1),Kp=Ee(0),oh=Ee(null),J0=kn(t=>{t.link(t.pipe(oh,Th(e=>e!==null)),J0)}),Jp=kn(t=>{t.sub(t.pipe(Jp,On(tn)),([e,n])=>{n==null||n.dispatchCommand(no,e)})}),bu=Ee(null,t=>{t.sub(t.pipe(bu,On(tn)),([e,n])=>{if(!e||!n)return;const i=e.anchor.getNode();let r=i.getKey()==="root"?i:Lt(i,a=>{const l=a.getParent();return l!==null&&It(l)});r??(r=i.getTopLevelElementOrThrow());const s=r.getKey();if(n.getElementByKey(s)!==null){const a=L1(r)?r.getTag():r.getType();t.pub(Fw,a)}})}),Ew=Ee(""),Rs=Ee(""),Fd=Ee(!1),j1=kn(t=>{t.link(Rs,j1),t.sub(Ew,e=>{t.pubIn({[Fd]:!0,[Rs]:e})})}),yS=kn(t=>{t.link(t.pipe(j1,On(eO),Th(([,e])=>!e),As(([e])=>e)),yS)},!0),em=Ee([]),tm=Ee([]),Tw=Ee([]),Pw=Ee([]),Hh=Ee([]),Z1=Ee([]),jd=Ee({}),Uh=Ee(!1),ia=Ee([]),Su=Ee([]),Xu=Ee([]),rl=Ee(""),Vs=Ee(null),S8=Ee(null),z1=Ee(null),Nr=_i(tm),hr=_i(em),sl=_i(Tw),ol=_i(Pw),Lr=_i(Hh),Wu=_i(Z1),eO=Ee(!1),X1=kn(t=>{t.sub(t.pipe(X1,On(Rs,mr,sh),Th(([e,n])=>e.trim()!==n.trim())),([e,,n,i])=>{t.pub(eO,!0),n==null||n.update(()=>{pt().clear(),Rw(t,pt(),e),i?n.focus():yn(null)},{onUpdate:()=>{t.pub(eO,!1)}})})}),Aw=kn(t=>{t.sub(t.pipe(Aw,On(tn,sh)),([e,n,i])=>{n==null||n.update(()=>{const r=me();if(r!==null){const s={children:[],append(o){this.children.push(o)},getType(){return r.getNodes()[0].getType()}};Rw(t,s,e),Du(s.children)}i?n.focus():yn(null)})})});function _8(){return xC((t,[e,n])=>(t.forEach(i=>{if(!i)throw new Error("You have a subscription that does not return a teardown");i()}),n?e.map(i=>i(n)):[]),[])}const C8=Ee(null),$w=Ee([],t=>{t.pipe(t.combine($w,tn),_8())}),Iw=Ee([],t=>{t.pipe(t.combine(Iw,mr),_8())}),Hu=Ee(null,Ua,(t,e)=>!!(t&&e&&t.editorRef===e.editorRef)),ah=kn(),fn=Ee(t=>{throw new Error(`No icon component for ${t}`)});function _i(t,e){return kn((n,i)=>{n.changeWith(t,i,(r,s)=>{Array.isArray(s)||(s=[s]);let o=r;for(const a of s)r.includes(a)||(o=[...o,a]);return o}),e==null||e(n,i)})}function w8(t){const e=me();ae(e)&&t.pubIn({[bu]:e,[Kp]:e.format})}const qh=_i(Iw,(t,e)=>{t.pub(e,[n=>n.registerCommand(Ih,(i,r)=>(t.pubIn({[tn]:r,[sh]:!0}),r._parentEditor===null&&r.getEditorState().read(()=>{t.pub(Hu,{rootNode:pt(),editorType:"lexical",editorRef:r})}),w8(t),!1),cr),n=>n.registerUpdateListener(({dirtyElements:i,dirtyLeaves:r,editorState:s})=>{if(t.getValue(oh)!==null||i.size===0&&r.size===0)return;let a;s.read(()=>{pt().getLastChild()instanceof us&&n.update(()=>{pt().append(ut())},{discrete:!0}),a=Q1({root:pt(),visitors:t.getValue(Hh),jsxComponentDescriptors:t.getValue(ia),toMarkdownExtensions:t.getValue(Z1),toMarkdownOptions:t.getValue(jd),jsxIsAvailable:t.getValue(Uh)})}),t.pub(Rs,a.trim()),t.pub(Fd,!1)}),n=>n.registerCommand(Dh,()=>(t.pub(sh,!0),!1),cr)])}),_u=_i($w,(t,e)=>{t.pub(e,[n=>n.registerUpdateListener(({editorState:i})=>{i.read(()=>{w8(t)})}),n=>n.registerCommand(Vp,i=>{var r;const s=t.getValue(mr);return s&&!((r=s.getRootElement())!=null&&r.contains(i.relatedTarget))&&t.pubIn({[sh]:!1,[ah]:i}),!1},cr)])});function Rw(t,e,n){try{f8({root:e,visitors:t.getValue(em),mdastExtensions:t.getValue(Pw),markdown:n,syntaxExtensions:t.getValue(Tw),jsxComponentDescriptors:t.getValue(ia),directiveDescriptors:t.getValue(Su),codeBlockEditorDescriptors:t.getValue(Xu),defaultCodeBlockLanguage:t.getValue(rl)}),t.pub(oh,null)}catch(i){if(i instanceof H0||i instanceof U0)t.pubIn({[Rs]:n,[oh]:{error:i.message,source:n}});else throw i}}const Mw=Ee([]),_l=_i(Mw),Nw=Ee([]),k8=_i(Nw),Lw=Ee([]),E8=_i(Lw),Dw=Ee([]),T8=_i(Dw),Qw=Ee([]),W1=_i(Qw),Vw=Ee([]),Bw=_i(Vw),H1=Ee(!1,t=>{t.link(t.pipe(tn,As(e=>{var n,i;return["td","th"].includes(((i=(n=e==null?void 0:e.getRootElement())==null?void 0:n.parentNode)==null?void 0:i.nodeName.toLowerCase())??"")})),H1)}),Zd=Ee(xw()),Fw=Ee(""),Pq=kn(),zd=kn(t=>{t.sub(t.pipe(zd,On(tn)),([e,n])=>{n==null||n.update(()=>{const i=me();ae(i)&&(qX(i,e),setTimeout(()=>{n.focus()}))})})}),Yh=kn(t=>{t.sub(t.pipe(Yh,On(tn)),([e,n])=>{n==null||n.focus(()=>{n.getEditorState().read(()=>{const i=me();ae(i)&&(n.update(()=>{const r=e();r.isInline()?(Du([r]),It(r.getParentOrThrow())&&mw(r,ut).selectEnd()):lR(r),setTimeout(()=>{"select"in r&&typeof r.select=="function"&&r.select()})}),setTimeout(()=>{n.dispatchCommand(il,void 0)}))})},{defaultSelection:"rootEnd"})})}),go=Ee("rich-text",t=>{function e(){return xC((n,i)=>({current:n.next,next:i}),{current:"rich-text",next:"rich-text"})}t.sub(t.pipe(go,e(),On(al)),([{current:n},i])=>{(n==="source"||n==="diff")&&t.pub(X1,i)}),t.sub(t.pipe(go,e(),Th(n=>n.current==="rich-text"),On(tn)),([,n])=>{n==null||n.dispatchCommand(il,void 0)})}),al=Ee("",t=>{t.link(Rs,al),t.link(al,j1)},!0),U1=Ee([]),Uu=_i(U1),jw=Ee(()=>{throw new Error("No translation function provided")}),tO=Ee(ww),P8=Vn({init(t,e){const n=(e==null?void 0:e.initialMarkdown)??"";t.register(qh),t.register(_u),t.register(j1),t.register(al),t.pubIn({[Ew]:e!=null&&e.trim?n.trim():n,[fn]:e==null?void 0:e.iconComponentFor,[hr]:[XU,zU,WU,NU,...FU],[Nr]:[da,Rr,Wh],[Lr]:[$U,AU,MU,PU,TU],[Y0]:e==null?void 0:e.contentEditableClassName,[G0]:e==null?void 0:e.spellCheck,[jd]:e==null?void 0:e.toMarkdownOptions,[xS]:e==null?void 0:e.autoFocus,[K0]:e==null?void 0:e.placeholder,[zn]:e==null?void 0:e.readOnly,[jw]:e==null?void 0:e.translation,[Zd]:xw(),[ol]:[Kj(),MH],[sl]:[Gj(),GH()],[Wu]:[GR(),Yj(),DH],[tO]:(e==null?void 0:e.lexicalTheme)??ww}),t.singletonSub(J0,e==null?void 0:e.onError),t.singletonSub(yS,i=>{e==null||e.onChange(i,t.getValue(Fd))}),t.singletonSub(ah,e==null?void 0:e.onBlur),e!=null&&e.suppressHtmlProcessing||t.pubIn({[ol]:[YR(),HU()],[sl]:[l8(),u8(),UU],[hr]:jU})},postInit(t,e){const n=kw({name:"@mdxeditor/root",editable:(e==null?void 0:e.readOnly)!==!0,namespace:(e==null?void 0:e.lexicalEditorNamespace)??"MDXEditor",nodes:[...t.getValue(tm),...(e==null?void 0:e.additionalLexicalNodes)??[]],theme:t.getValue(tO),historyMode:e!=null&&e.suppressSharedHistory?"none":"root-shared",historyState:t.getValue(Zd),initialEditorState:(e==null?void 0:e.editorState)===null?null:()=>{const r=(e==null?void 0:e.initialMarkdown.trim())??"";Rw(t,pt(),r)}});IE(t,()=>{n.dispose()});const i=e==null?void 0:e.autoFocus;if((e==null?void 0:e.editorState)!==null&&i){const r=setTimeout(()=>{n.focus(Ua,{defaultSelection:i===!0?"rootStart":i.defaultSelection??"rootStart"})});IE(t,()=>{clearTimeout(r)})}t.pub(mr,n),t.pub(tn,n)},update(t,e){t.pubIn({[Y0]:e==null?void 0:e.contentEditableClassName,[G0]:e==null?void 0:e.spellCheck,[jd]:e==null?void 0:e.toMarkdownOptions,[xS]:e==null?void 0:e.autoFocus,[K0]:e==null?void 0:e.placeholder,[zn]:e==null?void 0:e.readOnly}),t.singletonSub(yS,n=>{e==null||e.onChange(n,t.getValue(Fd))}),t.singletonSub(ah,e==null?void 0:e.onBlur),t.singletonSub(J0,e==null?void 0:e.onError)}});function Ht(){return Bt(jw)}function Zw({initialEditor:t,children:e}){const{Component:n}=dW(t,y8).output;return Y.jsx(n,{children:e})}const Aq=Ri?R.useLayoutEffect:R.useEffect;function $q(t){return{initialValueFn:()=>t.isEditable(),subscribe:e=>t.registerEditableListener(e)}}function Iq(){return(function(t){const[e]=qi(),n=R.useMemo(()=>t(e),[e,t]),[i,r]=R.useState(()=>n.initialValueFn()),s=R.useRef(i);return Aq(()=>{const{initialValueFn:o,subscribe:a}=n,l=o();return s.current!==l&&(s.current=l,r(l)),a(u=>{s.current=u,r(u)})},[n,t]),i})($q)}function Rq(t,...e){const n=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",t);for(const r of e)i.append("v",r);throw n.search=i.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const zw=Ri?R.useLayoutEffect:R.useEffect;function Mq({editor:t,ErrorBoundary:e}){return(function(n,i){const[r,s]=R.useState(()=>n.getDecorators());return zw(()=>n.registerDecoratorListener(o=>{au.flushSync(()=>{s(o)})}),[n]),R.useEffect(()=>{s(n.getDecorators())},[n]),R.useMemo(()=>{const o=[],a=Object.keys(r);for(let l=0;l<a.length;l++){const u=a[l],c=Y.jsx(i,{onError:f=>n._onError(f),children:Y.jsx(R.Suspense,{fallback:null,children:r[u]})}),h=n.getElementByKey(u);h!==null&&o.push(au.createPortal(c,h,u))}return o},[i,r,n])})(t,e)}function Nq({editor:t,ErrorBoundary:e}){return(function(n){const i=Xo.maybeFromEditor(n);if(i&&i.hasExtensionByName(q0.name)){for(const r of["@lexical/plain-text","@lexical/rich-text"])i.hasExtensionByName(r)&&Rq(320,r);return!0}return!1})(t)?null:Y.jsx(Mq,{editor:t,ErrorBoundary:e})}function $P(t){return t.read("latest",O8(t.isComposing()))}function Xw({contentEditable:t,placeholder:e=null,ErrorBoundary:n}){const[i]=qi();return(function(r){zw(()=>wn(IH(r),kH(r)),[r])})(i),Y.jsxs(Y.Fragment,{children:[t,Y.jsx(Lq,{content:e}),Y.jsx(Nq,{editor:i,ErrorBoundary:n})]})}function Lq({content:t}){const[e]=qi(),n=(function(r){const[s,o]=R.useState(()=>$P(r));return zw(()=>{function a(){const l=$P(r);o(l)}return a(),wn(r.registerUpdateListener(()=>{a()}),r.registerEditableListener(()=>{a()}))},[r]),s})(e),i=Iq();return n?typeof t=="function"?t(i):t:null}var Sy={exports:{}};/*!
|
|
50
|
+
Copyright (c) 2018 Jed Watson.
|
|
51
|
+
Licensed under the MIT License (MIT), see
|
|
52
|
+
http://jedwatson.github.io/classnames
|
|
53
|
+
*/var IP;function Dq(){return IP||(IP=1,(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var s="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(s=r(s,i(a)))}return s}function i(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var a in s)e.call(s,a)&&s[a]&&(o=r(o,a));return o}function r(s,o){return o?s?s+" "+o:s+o:s}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(Sy)),Sy.exports}var Qq=Dq();const yt=i1(Qq),A8={undo:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M7.202 18.5V17H14.3788C15.4224 17 16.3205 16.6554 17.073 15.9663C17.8257 15.2773 18.202 14.4263 18.202 13.4135C18.202 12.4007 17.8257 11.5512 17.073 10.8652C16.3205 10.1794 15.4224 9.8365 14.3788 9.8365H7.35775L10.1402 12.6193L9.0865 13.673L4.5 9.0865L9.0865 4.5L10.1402 5.55375L7.35775 8.3365H14.3788C15.8416 8.3365 17.0945 8.82467 18.1375 9.801C19.1805 10.7773 19.702 11.9815 19.702 13.4135C19.702 14.8455 19.1805 16.0513 18.1375 17.0308C17.0945 18.0103 15.8416 18.5 14.3788 18.5H7.202Z",fill:"currentColor"})),redo:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M9.6211 18.5C8.15827 18.5 6.90535 18.0103 5.86235 17.0308C4.81935 16.0513 4.29785 14.8455 4.29785 13.4135C4.29785 11.9815 4.81935 10.7773 5.86235 9.801C6.90535 8.82467 8.15827 8.3365 9.6211 8.3365H16.6421L13.8596 5.55375L14.9134 4.5L19.4999 9.0865L14.9134 13.673L13.8596 12.6193L16.6421 9.8365H9.6211C8.57744 9.8365 7.67935 10.1794 6.92685 10.8652C6.17418 11.5512 5.79785 12.4007 5.79785 13.4135C5.79785 14.4263 6.17418 15.2773 6.92685 15.9663C7.67935 16.6554 8.57744 17 9.6211 17H16.7979V18.5H9.6211Z",fill:"currentColor"})),format_bold:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M7.33838 18.625V5.375H12.1999C13.219 5.375 14.1405 5.69233 14.9644 6.327C15.788 6.9615 16.1999 7.816 16.1999 8.8905C16.1999 9.63783 16.0194 10.2471 15.6584 10.7182C15.2975 11.1894 14.9088 11.5314 14.4921 11.7442C15.005 11.9211 15.4947 12.2708 15.9614 12.7933C16.428 13.3158 16.6614 14.0193 16.6614 14.9038C16.6614 16.1819 16.1902 17.1217 15.2479 17.723C14.3055 18.3243 13.3562 18.625 12.3999 18.625H7.33838ZM9.48838 16.6328H12.3191C13.1063 16.6328 13.6627 16.4142 13.9884 15.977C14.314 15.5398 14.4769 15.1206 14.4769 14.7192C14.4769 14.3179 14.314 13.8987 13.9884 13.4615C13.6627 13.0243 13.0909 12.8058 12.2729 12.8058H9.48838V16.6328ZM9.48838 10.875H12.0826C12.6903 10.875 13.172 10.7013 13.5279 10.3538C13.8835 10.0064 14.0614 9.59042 14.0614 9.10575C14.0614 8.59042 13.8733 8.16925 13.4971 7.84225C13.1208 7.51542 12.6595 7.352 12.1134 7.352H9.48838V10.875Z",fill:"currentColor"})),format_italic:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M5.39404 18.625V16.8173H9.21129L12.4518 7.18275H8.63454V5.375H17.7883V7.18275H14.2785L11.0383 16.8173H14.5478V18.625H5.39404Z",fill:"currentColor"})),format_underlined:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M5.34619 22.125V20.625H18.6537V22.125H5.34619ZM11.9999 18.5287C10.4448 18.5287 9.23102 18.0566 8.35869 17.1125C7.48619 16.1683 7.04994 14.9032 7.04994 13.3172V5.41345H8.90369V13.4095C8.90369 14.4198 9.17228 15.2295 9.70944 15.8385C10.2466 16.4475 11.0101 16.752 11.9999 16.752C12.9898 16.752 13.7533 16.4475 14.2904 15.8385C14.8276 15.2295 15.0962 14.4198 15.0962 13.4095V5.41345H16.9499V13.3172C16.9499 14.9032 16.5137 16.1683 15.6412 17.1125C14.7689 18.0566 13.5551 18.5287 11.9999 18.5287Z",fill:"currentColor"})),format_highlight:C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"},C.createElement("path",{d:"m9 11-6 6v3h9l3-3"}),C.createElement("path",{d:"m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4"})),code:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M7.99994 17.6537L2.34619 11.9999L7.99994 6.34619L9.06919 7.41544L4.46919 12.0154L9.05369 16.5999L7.99994 17.6537ZM15.9999 17.6537L14.9307 16.5844L19.5307 11.9844L14.9462 7.39994L15.9999 6.34619L21.6537 11.9999L15.9999 17.6537Z",fill:"currentColor"})),strikeThrough:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M12.15 19.6923C10.9732 19.6923 9.9315 19.359 9.025 18.6923C8.11867 18.0256 7.45525 17.1128 7.03475 15.9538L8.6385 15.2635C8.91667 16.0444 9.3545 16.6867 9.952 17.1905C10.5493 17.6944 11.2923 17.9463 12.1808 17.9463C12.9578 17.9463 13.6744 17.7508 14.3307 17.3598C14.9872 16.9686 15.3155 16.3487 15.3155 15.5C15.3155 15.123 15.2555 14.7968 15.1355 14.5213C15.0157 14.2456 14.8462 13.9885 14.627 13.75H16.677C16.7987 13.9705 16.8932 14.2256 16.9605 14.5153C17.0278 14.8051 17.0615 15.1334 17.0615 15.5C17.0615 16.8372 16.5747 17.8702 15.601 18.599C14.6272 19.3279 13.4768 19.6923 12.15 19.6923ZM2.25 11.75V10.25H21.75V11.75H2.25ZM12.05 4.19629C13.0475 4.19629 13.9123 4.42704 14.6443 4.88854C15.3763 5.35004 15.9673 6.05896 16.4173 7.01529L14.823 7.73079C14.6218 7.26029 14.2978 6.84462 13.851 6.48379C13.4042 6.12279 12.8141 5.94229 12.0808 5.94229C11.2244 5.94229 10.5392 6.16221 10.025 6.60204C9.51083 7.04171 9.264 7.59104 9.2845 8.25004H7.5385C7.50133 7.16421 7.89783 6.21712 8.728 5.40879C9.558 4.60046 10.6653 4.19629 12.05 4.19629Z",fill:"currentColor"})),superscript:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M16.6924 8V6.2115C16.6924 5.95383 16.7786 5.73875 16.9511 5.56625C17.1235 5.39392 17.3385 5.30775 17.5961 5.30775H19.5001V4.38475H16.6924V3.5H19.4809C19.7385 3.5 19.9536 3.58625 20.1261 3.75875C20.2985 3.93108 20.3846 4.14617 20.3846 4.404V5.2885C20.3846 5.54617 20.2985 5.76125 20.1261 5.93375C19.9536 6.10608 19.7385 6.19225 19.4809 6.19225H17.5771V7.1155H20.3846V8H16.6924ZM4.44238 18.5L8.84638 11.6287L4.77713 5.30775H6.74438L9.95963 10.404H10.0214L13.2501 5.30775H15.2329L11.1194 11.6287L15.5579 18.5H13.5751L10.0214 12.9308H9.95963L6.42513 18.5H4.44238Z",fill:"currentColor"})),subscript:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M16.6924 20.5V18.7115C16.6924 18.4538 16.7786 18.2387 16.9511 18.0662C17.1235 17.8939 17.3385 17.8077 17.5961 17.8077H19.5001V16.8845H16.6924V16H19.4809C19.7385 16 19.9536 16.0863 20.1261 16.2587C20.2985 16.4311 20.3846 16.6461 20.3846 16.9038V17.7885C20.3846 18.0462 20.2985 18.2612 20.1261 18.4337C19.9536 18.6061 19.7385 18.6923 19.4809 18.6923H17.5771V19.6152H20.3846V20.5H16.6924ZM4.44238 18.6923L8.84638 11.8212L4.77713 5.5H6.74438L9.95963 10.5962H10.0214L13.2501 5.5H15.2329L11.1194 11.8212L15.5579 18.6923H13.5751L10.0214 13.123H9.95963L6.42513 18.6923H4.44238Z",fill:"currentColor"})),format_list_bulleted:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M9.30775 18.75V17.25H20.5V18.75H9.30775ZM9.30775 12.75V11.25H20.5V12.75H9.30775ZM9.30775 6.75005V5.25005H20.5V6.75005H9.30775ZM5.1635 19.6635C4.706 19.6635 4.31442 19.5006 3.98875 19.1748C3.66292 18.8491 3.5 18.4575 3.5 18C3.5 17.5425 3.66292 17.151 3.98875 16.8253C4.31442 16.4995 4.706 16.3365 5.1635 16.3365C5.621 16.3365 6.01258 16.4995 6.33825 16.8253C6.66408 17.151 6.827 17.5425 6.827 18C6.827 18.4575 6.66408 18.8491 6.33825 19.1748C6.01258 19.5006 5.621 19.6635 5.1635 19.6635ZM5.1635 13.6635C4.706 13.6635 4.31442 13.5006 3.98875 13.1748C3.66292 12.8491 3.5 12.4575 3.5 12C3.5 11.5425 3.66292 11.151 3.98875 10.8253C4.31442 10.4995 4.706 10.3365 5.1635 10.3365C5.621 10.3365 6.01258 10.4995 6.33825 10.8253C6.66408 11.151 6.827 11.5425 6.827 12C6.827 12.4575 6.66408 12.8491 6.33825 13.1748C6.01258 13.5006 5.621 13.6635 5.1635 13.6635ZM5.1635 7.66355C4.706 7.66355 4.31442 7.50063 3.98875 7.1748C3.66292 6.84913 3.5 6.45755 3.5 6.00005C3.5 5.54255 3.66292 5.15096 3.98875 4.8253C4.31442 4.49946 4.706 4.33655 5.1635 4.33655C5.621 4.33655 6.01258 4.49946 6.33825 4.8253C6.66408 5.15096 6.827 5.54255 6.827 6.00005C6.827 6.45755 6.66408 6.84913 6.33825 7.1748C6.01258 7.50063 5.621 7.66355 5.1635 7.66355Z",fill:"currentColor"})),format_list_numbered:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M3.5 21.5V20.3078H6V19.25H4.5V18.0577H6V17H3.5V15.8077H6.34625C6.58592 15.8077 6.78683 15.8888 6.949 16.051C7.11117 16.2132 7.19225 16.4141 7.19225 16.6538V17.8462C7.19225 18.0859 7.11117 18.2868 6.949 18.449C6.78683 18.6112 6.58592 18.6923 6.34625 18.6923C6.58592 18.6923 6.78683 18.7733 6.949 18.9355C7.11117 19.0977 7.19225 19.2987 7.19225 19.5385V20.6538C7.19225 20.8936 7.11117 21.0946 6.949 21.2568C6.78683 21.4189 6.58592 21.5 6.34625 21.5H3.5ZM3.5 14.8463V12.25C3.5 12.0103 3.58108 11.8093 3.74325 11.647C3.90542 11.4848 4.10642 11.4038 4.34625 11.4038H6V10.3462H3.5V9.15375H6.34625C6.58592 9.15375 6.78683 9.23483 6.949 9.397C7.11117 9.55933 7.19225 9.76033 7.19225 10V11.75C7.19225 11.9897 7.11117 12.1907 6.949 12.353C6.78683 12.5152 6.58592 12.5963 6.34625 12.5963H4.69225V13.6538H7.19225V14.8463H3.5ZM5 8.19225V3.69225H3.5V2.5H6.19225V8.19225H5ZM9.30775 18.75V17.25H20.5V18.75H9.30775ZM9.30775 12.75V11.25H20.5V12.75H9.30775ZM9.30775 6.75V5.25H20.5V6.75H9.30775Z",fill:"currentColor"})),format_list_checked:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M5.69425 18.452L2.5 15.2578L3.54425 14.2135L5.66925 16.3385L9.91925 12.0885L10.9635 13.1578L5.69425 18.452ZM5.69425 10.8365L2.5 7.64227L3.54425 6.59802L5.66925 8.72302L9.91925 4.47302L10.9635 5.54227L5.69425 10.8365ZM13.0095 16.5578V15.0578H21.5095V16.5578H13.0095ZM13.0095 8.94227V7.44227H21.5095V8.94227H13.0095Z",fill:"currentColor"})),link:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M10.8077 16.5385H7.0385C5.78283 16.5385 4.7125 16.096 3.8275 15.211C2.9425 14.3262 2.5 13.256 2.5 12.0005C2.5 10.745 2.9425 9.67471 3.8275 8.78955C4.7125 7.90421 5.78283 7.46155 7.0385 7.46155H10.8077V8.96155H7.0385C6.19867 8.96155 5.48233 9.25805 4.8895 9.85105C4.2965 10.444 4 11.1604 4 12C4 12.8397 4.2965 13.556 4.8895 14.149C5.48233 14.742 6.19867 15.0385 7.0385 15.0385H10.8077V16.5385ZM8.25 12.75V11.25H15.75V12.75H8.25ZM13.1923 16.5385V15.0385H16.9615C17.8013 15.0385 18.5177 14.742 19.1105 14.149C19.7035 13.556 20 12.8397 20 12C20 11.1604 19.7035 10.444 19.1105 9.85105C18.5177 9.25805 17.8013 8.96155 16.9615 8.96155H13.1923V7.46155H16.9615C18.2172 7.46155 19.2875 7.90405 20.1725 8.78905C21.0575 9.67388 21.5 10.744 21.5 11.9995C21.5 13.255 21.0575 14.3254 20.1725 15.2105C19.2875 16.0959 18.2172 16.5385 16.9615 16.5385H13.1923Z",fill:"currentColor"})),add_photo:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M5.11537 20.5C4.6182 20.5 4.19262 20.323 3.83862 19.969C3.48462 19.615 3.30762 19.1894 3.30762 18.6922V5.30773C3.30762 4.81056 3.48462 4.38498 3.83862 4.03098C4.19262 3.67698 4.6182 3.49998 5.11537 3.49998H13.8076V4.99998H5.11537C5.02553 4.99998 4.95178 5.02881 4.89412 5.08648C4.83645 5.14415 4.80762 5.2179 4.80762 5.30773V18.6922C4.80762 18.7821 4.83645 18.8558 4.89412 18.9135C4.95178 18.9711 5.02553 19 5.11537 19H18.4999C18.5895 19 18.6633 18.9711 18.7211 18.9135C18.7788 18.8558 18.8076 18.7821 18.8076 18.6922V9.99998H20.3076V18.6922C20.3076 19.1894 20.1306 19.615 19.7766 19.969C19.4226 20.323 18.997 20.5 18.4999 20.5H5.11537ZM17.1921 8.61523V6.61523H15.1921V5.11548H17.1921V3.11548H18.6921V5.11548H20.6921V6.61523H18.6921V8.61523H17.1921ZM6.55762 16.75H17.1344L13.8459 12.3655L11.0384 16.0192L9.03837 13.4615L6.55762 16.75Z",fill:"currentColor"})),table:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M3.5 18.6923V5.30775C3.5 4.81058 3.677 4.385 4.031 4.031C4.385 3.677 4.81058 3.5 5.30775 3.5H18.6923C19.1894 3.5 19.615 3.677 19.969 4.031C20.323 4.385 20.5 4.81058 20.5 5.30775V18.6923C20.5 19.1894 20.323 19.615 19.969 19.969C19.615 20.323 19.1894 20.5 18.6923 20.5H5.30775C4.81058 20.5 4.385 20.323 4.031 19.969C3.677 19.615 3.5 19.1894 3.5 18.6923ZM5 9.077H19V5.30775C19 5.21792 18.9712 5.14417 18.9135 5.0865C18.8558 5.02883 18.7821 5 18.6923 5H5.30775C5.21792 5 5.14417 5.02883 5.0865 5.0865C5.02883 5.14417 5 5.21792 5 5.30775V9.077ZM10.1615 14.0385H13.8385V10.577H10.1615V14.0385ZM10.1615 19H13.8385V15.5385H10.1615V19ZM5 14.0385H8.6615V10.577H5V14.0385ZM15.3385 14.0385H19V10.577H15.3385V14.0385ZM5.30775 19H8.6615V15.5385H5V18.6923C5 18.7821 5.02883 18.8558 5.0865 18.9135C5.14417 18.9712 5.21792 19 5.30775 19ZM15.3385 19H18.6923C18.7821 19 18.8558 18.9712 18.9135 18.9135C18.9712 18.8558 19 18.7821 19 18.6923V15.5385H15.3385V19Z",fill:"currentColor"})),horizontal_rule:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M4.5 12.75V11.25H19.5V12.75H4.5Z",fill:"currentColor"})),frontmatter:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M4.5 8.75V7.25H8.5V8.75H4.5Z",fill:"currentColor"}),C.createElement("path",{d:"M4.5 14.75V13.25H8.5V14.75H4.5Z",fill:"currentColor"}),C.createElement("path",{d:"M9.5 8.75V7.25H13.5V8.75H9.5Z",fill:"currentColor"}),C.createElement("path",{d:"M9.5 14.75V13.25H13.5V14.75H9.5Z",fill:"currentColor"}),C.createElement("path",{d:"M14.5 8.75V7.25H18.5V8.75H14.5Z",fill:"currentColor"}),C.createElement("path",{d:"M14.5 14.75V13.25H18.5V14.75H14.5Z",fill:"currentColor"})),frame_source:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M8.6 15.2443L5.35575 12L8.6 8.75575L9.64425 9.825L7.46925 12L9.64425 14.175L8.6 15.2443ZM15.4 15.2443L14.3558 14.175L16.5307 12L14.3558 9.825L15.4 8.75575L18.6443 12L15.4 15.2443ZM5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V15H5V18.6923C5 18.7692 5.03208 18.8398 5.09625 18.9038C5.16025 18.9679 5.23075 19 5.30775 19H9V20.5H5.30775ZM15 20.5V19H18.6923C18.7692 19 18.8398 18.9679 18.9038 18.9038C18.9679 18.8398 19 18.7692 19 18.6923V15H20.5V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H15ZM3.5 9V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H9V5H5.30775C5.23075 5 5.16025 5.03208 5.09625 5.09625C5.03208 5.16025 5 5.23075 5 5.30775V9H3.5ZM19 9V5.30775C19 5.23075 18.9679 5.16025 18.9038 5.09625C18.8398 5.03208 18.7692 5 18.6923 5H15V3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V9H19Z",fill:"currentColor"})),arrow_drop_down:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M11.9999 14.6537L7.59619 10.25H16.4037L11.9999 14.6537Z",fill:"currentColor"})),admonition:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M12.0001 21.4C11.7654 21.4 11.5385 21.3548 11.3193 21.2645C11.1002 21.174 10.9002 21.0435 10.7193 20.873L3.1271 13.2807C2.9566 13.0999 2.8261 12.8999 2.7356 12.6807C2.64526 12.4616 2.6001 12.2346 2.6001 12C2.6001 11.7653 2.64526 11.5358 2.7356 11.3115C2.8261 11.0871 2.9566 10.8897 3.1271 10.7192L10.7193 3.12698C10.9002 2.94614 11.1002 2.81314 11.3193 2.72798C11.5385 2.64264 11.7654 2.59998 12.0001 2.59998C12.2348 2.59998 12.4643 2.64264 12.6886 2.72798C12.9129 2.81314 13.1103 2.94614 13.2808 3.12698L20.8731 10.7192C21.0539 10.8897 21.1869 11.0871 21.2721 11.3115C21.3574 11.5358 21.4001 11.7653 21.4001 12C21.4001 12.2346 21.3574 12.4616 21.2721 12.6807C21.1869 12.8999 21.0539 13.0999 20.8731 13.2807L13.2808 20.873C13.1103 21.0435 12.9129 21.174 12.6886 21.2645C12.4643 21.3548 12.2348 21.4 12.0001 21.4ZM12.2213 19.8037L19.8039 12.2212C19.8552 12.1699 19.8808 12.0961 19.8808 12C19.8808 11.9038 19.8552 11.8301 19.8039 11.7787L12.2213 4.19623C12.17 4.14489 12.0963 4.11923 12.0001 4.11923C11.9039 4.11923 11.8302 4.14489 11.7788 4.19623L4.19635 11.7787C4.14501 11.8301 4.11935 11.9038 4.11935 12C4.11935 12.0961 4.14501 12.1699 4.19635 12.2212L11.7788 19.8037C11.8302 19.8551 11.9039 19.8807 12.0001 19.8807C12.0963 19.8807 12.17 19.8551 12.2213 19.8037ZM11.2501 13.0865H12.7501V7.47123H11.2501V13.0865ZM12.0001 15.702C12.2258 15.702 12.4168 15.6237 12.5731 15.4672C12.7296 15.3109 12.8078 15.1199 12.8078 14.8942C12.8078 14.6686 12.7296 14.4776 12.5731 14.3212C12.4168 14.1647 12.2258 14.0865 12.0001 14.0865C11.7744 14.0865 11.5834 14.1647 11.4271 14.3212C11.2706 14.4776 11.1923 14.6686 11.1923 14.8942C11.1923 15.1199 11.2706 15.3109 11.4271 15.4672C11.5834 15.6237 11.7744 15.702 12.0001 15.702Z",fill:"currentColor"})),rich_text:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM5.30775 19H18.6923C18.7692 19 18.8398 18.9679 18.9038 18.9038C18.9679 18.8398 19 18.7692 19 18.6923V5.30775C19 5.23075 18.9679 5.16025 18.9038 5.09625C18.8398 5.03208 18.7692 5 18.6923 5H5.30775C5.23075 5 5.16025 5.03208 5.09625 5.09625C5.03208 5.16025 5 5.23075 5 5.30775V18.6923C5 18.7692 5.03208 18.8398 5.09625 18.9038C5.16025 18.9679 5.23075 19 5.30775 19ZM6.75 17H17.3268L14 12.3655L11.2308 16.0192L9 13.4615L6.75 17Z",fill:"currentColor"}),C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 12V6.5H9.1925C9.5925 6.5 9.9425 6.65 10.2425 6.95C10.5425 7.25 10.6925 7.6 10.6925 8V8.6925C10.6925 9.03733 10.605 9.32675 10.43 9.56075C10.255 9.79458 10.0168 9.97817 9.7155 10.1115L10.6155 12H9.404L8.504 10.1925H7.1925V12H6ZM9.1925 9H7.1925V7.6925H9.1925C9.26933 7.6925 9.33983 7.7245 9.404 7.7885C9.468 7.85267 9.5 7.92317 9.5 8V8.6925C9.5 8.76933 9.468 8.83983 9.404 8.904C9.33983 8.968 9.26933 9 9.1925 9Z",fill:"currentColor"}),C.createElement("path",{d:"M12.5 7H17.5V8.25H12.5V7Z",fill:"currentColor"}),C.createElement("path",{d:"M12.5 9.25H17.5V10.5H12.5V9.25Z",fill:"currentColor"})),difference:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM18.6923 19H5.30775C5.23075 19 5.16025 18.9679 5.09625 18.9038C5.03208 18.8398 5 18.7692 5 18.6923V5.30775C5 5.23075 5.03208 5.16025 5.09625 5.09625C5.16025 5.03208 5.23075 5 5.30775 5H18.6923C18.7692 5 18.8398 5.03208 18.9038 5.09625C18.9679 5.16025 19 5.23075 19 5.30775V18.6923C19 18.7692 18.9679 18.8398 18.9038 18.9038C18.8398 18.9679 18.7692 19 18.6923 19Z",fill:"currentColor"}),C.createElement("rect",{x:"9",y:"10",width:"5.5",height:"1.5",fill:"currentColor"}),C.createElement("rect",{x:"9",y:"15",width:"5.5",height:"1.5",fill:"currentColor"}),C.createElement("rect",{x:"11",y:"8",width:"1.5",height:"5.5",fill:"currentColor"})),markdown:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM18.6923 19H5.30775C5.23075 19 5.16025 18.9679 5.09625 18.9038C5.03208 18.8398 5 18.7692 5 18.6923V5.30775C5 5.23075 5.03208 5.16025 5.09625 5.09625C5.16025 5.03208 5.23075 5 5.30775 5H18.6923C18.7692 5 18.8398 5.03208 18.9038 5.09625C18.9679 5.16025 19 5.23075 19 5.30775V18.6923C19 18.7692 18.9679 18.8398 18.9038 18.9038C18.8398 18.9679 18.7692 19 18.6923 19Z",fill:"currentColor"}),C.createElement("path",{d:"M13 15H11.5V11L9.5 14L7.5 11V15H6V8H7.5L9.5 11L11.5 8H13V15Z",fill:"currentColor"}),C.createElement("path",{d:"M15.9921 15.5833L13.2886 12.8797L14.0546 12.1137L15.4504 13.5016V7.99597L16.5336 7.99993V13.5016L17.9296 12.1137L18.6954 12.8797L15.9921 15.5833Z",fill:"currentColor"})),open_in_new:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H11.6152V5H5.30775C5.23075 5 5.16025 5.03208 5.09625 5.09625C5.03208 5.16025 5 5.23075 5 5.30775V18.6923C5 18.7692 5.03208 18.8398 5.09625 18.9038C5.16025 18.9679 5.23075 19 5.30775 19H18.6923C18.7692 19 18.8398 18.9679 18.9038 18.9038C18.9679 18.8398 19 18.7692 19 18.6923V12.3848H20.5V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM9.71925 15.3345L8.6655 14.2808L17.9462 5H14V3.5H20.5V10H19V6.05375L9.71925 15.3345Z",fill:"currentColor"})),link_off:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M18.8843 16.1038L17.7498 14.9385C18.4228 14.7552 18.9661 14.3946 19.3796 13.8568C19.7931 13.319 19.9998 12.7 19.9998 12C19.9998 11.1604 19.705 10.444 19.1153 9.85105C18.5255 9.25805 17.8139 8.96155 16.9806 8.96155H13.1728V7.46155H16.9806C18.2293 7.46155 19.2947 7.90422 20.1768 8.78955C21.0588 9.67472 21.4998 10.7449 21.4998 12C21.4998 12.8859 21.262 13.6951 20.7863 14.4278C20.3107 15.1606 19.6767 15.7193 18.8843 16.1038ZM15.5806 12.75L14.0806 11.25H15.7306V12.75H15.5806ZM20.1461 22.2538L1.74609 3.8538L2.79984 2.80005L21.1998 21.2L20.1461 22.2538ZM10.8268 16.5386H7.03834C5.78318 16.5386 4.71301 16.0959 3.82784 15.2105C2.94251 14.3254 2.49984 13.2552 2.49984 12C2.49984 10.8885 2.85784 9.91322 3.57384 9.07405C4.28984 8.23505 5.18826 7.72838 6.26909 7.55405H6.49984L7.90759 8.96155H7.03834C6.19851 8.96155 5.48218 9.25805 4.88934 9.85105C4.29634 10.444 3.99984 11.1604 3.99984 12C3.99984 12.8397 4.29634 13.556 4.88934 14.149C5.48218 14.742 6.19851 15.0385 7.03834 15.0385H10.8268V16.5386ZM8.26909 12.75V11.25H10.2113L11.6863 12.75H8.26909Z",fill:"currentColor"})),edit:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M5 19H6.2615L16.498 8.7635L15.2365 7.502L5 17.7385V19ZM3.5 20.5V17.1155L16.6905 3.93075C16.8417 3.79342 17.0086 3.68733 17.1913 3.6125C17.3741 3.5375 17.5658 3.5 17.7663 3.5C17.9668 3.5 18.1609 3.53558 18.3488 3.60675C18.5367 3.67792 18.7032 3.79108 18.848 3.94625L20.0693 5.18275C20.2244 5.32758 20.335 5.49425 20.401 5.68275C20.467 5.87125 20.5 6.05975 20.5 6.24825C20.5 6.44942 20.4657 6.64133 20.397 6.824C20.3283 7.00683 20.2191 7.17383 20.0693 7.325L6.8845 20.5H3.5ZM15.8562 8.14375L15.2365 7.502L16.498 8.7635L15.8562 8.14375Z",fill:"currentColor"})),content_copy:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M9.05775 17.5C8.55258 17.5 8.125 17.325 7.775 16.975C7.425 16.625 7.25 16.1974 7.25 15.6923V4.30775C7.25 3.80258 7.425 3.375 7.775 3.025C8.125 2.675 8.55258 2.5 9.05775 2.5H17.4423C17.9474 2.5 18.375 2.675 18.725 3.025C19.075 3.375 19.25 3.80258 19.25 4.30775V15.6923C19.25 16.1974 19.075 16.625 18.725 16.975C18.375 17.325 17.9474 17.5 17.4423 17.5H9.05775ZM9.05775 16H17.4423C17.5192 16 17.5898 15.9679 17.6538 15.9038C17.7179 15.8398 17.75 15.7692 17.75 15.6923V4.30775C17.75 4.23075 17.7179 4.16025 17.6538 4.09625C17.5898 4.03208 17.5192 4 17.4423 4H9.05775C8.98075 4 8.91025 4.03208 8.84625 4.09625C8.78208 4.16025 8.75 4.23075 8.75 4.30775V15.6923C8.75 15.7692 8.78208 15.8398 8.84625 15.9038C8.91025 15.9679 8.98075 16 9.05775 16ZM5.55775 21C5.05258 21 4.625 20.825 4.275 20.475C3.925 20.125 3.75 19.6974 3.75 19.1923V6.30775H5.25V19.1923C5.25 19.2693 5.28208 19.3398 5.34625 19.4038C5.41025 19.4679 5.48075 19.5 5.55775 19.5H15.4423V21H5.55775Z",fill:"currentColor"})),more_horiz:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M6.23096 13.5C5.81846 13.5 5.46537 13.3531 5.17171 13.0592C4.87787 12.7656 4.73096 12.4125 4.73096 12C4.73096 11.5875 4.87787 11.2344 5.17171 10.9408C5.46537 10.6469 5.81846 10.5 6.23096 10.5C6.64346 10.5 6.99662 10.6469 7.29046 10.9408C7.58412 11.2344 7.73096 11.5875 7.73096 12C7.73096 12.4125 7.58412 12.7656 7.29046 13.0592C6.99662 13.3531 6.64346 13.5 6.23096 13.5ZM12.0002 13.5C11.5877 13.5 11.2346 13.3531 10.941 13.0592C10.6471 12.7656 10.5002 12.4125 10.5002 12C10.5002 11.5875 10.6471 11.2344 10.941 10.9408C11.2346 10.6469 11.5877 10.5 12.0002 10.5C12.4127 10.5 12.7658 10.6469 13.0595 10.9408C13.3533 11.2344 13.5002 11.5875 13.5002 12C13.5002 12.4125 13.3533 12.7656 13.0595 13.0592C12.7658 13.3531 12.4127 13.5 12.0002 13.5ZM17.7695 13.5C17.357 13.5 17.0038 13.3531 16.71 13.0592C16.4163 12.7656 16.2695 12.4125 16.2695 12C16.2695 11.5875 16.4163 11.2344 16.71 10.9408C17.0038 10.6469 17.357 10.5 17.7695 10.5C18.182 10.5 18.535 10.6469 18.8287 10.9408C19.1225 11.2344 19.2695 11.5875 19.2695 12C19.2695 12.4125 19.1225 12.7656 18.8287 13.0592C18.535 13.3531 18.182 13.5 17.7695 13.5Z",fill:"currentColor"})),more_vert:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M12 19.2692C11.5875 19.2692 11.2344 19.1223 10.9408 18.8285C10.6469 18.5348 10.5 18.1817 10.5 17.7692C10.5 17.3567 10.6469 17.0035 10.9408 16.7097C11.2344 16.416 11.5875 16.2692 12 16.2692C12.4125 16.2692 12.7656 16.416 13.0592 16.7097C13.3531 17.0035 13.5 17.3567 13.5 17.7692C13.5 18.1817 13.3531 18.5348 13.0592 18.8285C12.7656 19.1223 12.4125 19.2692 12 19.2692ZM12 13.5C11.5875 13.5 11.2344 13.353 10.9408 13.0592C10.6469 12.7655 10.5 12.4125 10.5 12C10.5 11.5875 10.6469 11.2344 10.9408 10.9407C11.2344 10.6469 11.5875 10.5 12 10.5C12.4125 10.5 12.7656 10.6469 13.0592 10.9407C13.3531 11.2344 13.5 11.5875 13.5 12C13.5 12.4125 13.3531 12.7655 13.0592 13.0592C12.7656 13.353 12.4125 13.5 12 13.5ZM12 7.73071C11.5875 7.73071 11.2344 7.58388 10.9408 7.29021C10.6469 6.99638 10.5 6.64321 10.5 6.23071C10.5 5.81821 10.6469 5.46513 10.9408 5.17146C11.2344 4.87763 11.5875 4.73071 12 4.73071C12.4125 4.73071 12.7656 4.87763 13.0592 5.17146C13.3531 5.46513 13.5 5.81821 13.5 6.23071C13.5 6.64321 13.3531 6.99638 13.0592 7.29021C12.7656 7.58388 12.4125 7.73071 12 7.73071Z",fill:"currentColor"})),close:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M6.39994 18.6538L5.34619 17.6L10.9462 12L5.34619 6.4L6.39994 5.34625L11.9999 10.9463L17.5999 5.34625L18.6537 6.4L13.0537 12L18.6537 17.6L17.5999 18.6538L11.9999 13.0538L6.39994 18.6538Z",fill:"currentColor"})),settings:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M9.69225 21.5L9.3115 18.4538C9.04367 18.3641 8.769 18.2385 8.4875 18.077C8.20617 17.9153 7.95459 17.7422 7.73275 17.5577L4.9115 18.75L2.604 14.75L5.04425 12.9058C5.02125 12.7571 5.00492 12.6077 4.99525 12.4578C4.98559 12.3078 4.98075 12.1583 4.98075 12.0095C4.98075 11.8673 4.98559 11.7228 4.99525 11.576C5.00492 11.4292 5.02125 11.2686 5.04425 11.0943L2.604 9.25L4.9115 5.26925L7.723 6.452C7.96417 6.261 8.22159 6.08633 8.49525 5.928C8.76892 5.76967 9.03784 5.64242 9.302 5.54625L9.69225 2.5H14.3078L14.6885 5.55575C14.9885 5.66475 15.2599 5.792 15.5028 5.9375C15.7458 6.083 15.991 6.2545 16.2385 6.452L19.0885 5.26925L21.396 9.25L18.9173 11.123C18.9531 11.2845 18.9727 11.4355 18.976 11.576C18.9792 11.7163 18.9808 11.8577 18.9808 12C18.9808 12.1358 18.9775 12.274 18.971 12.4145C18.9647 12.5548 18.9417 12.7154 18.902 12.8963L21.3615 14.75L19.0538 18.75L16.2385 17.548C15.991 17.7455 15.7384 17.9202 15.4808 18.072C15.2231 18.224 14.959 18.3481 14.6885 18.4443L14.3078 21.5H9.69225ZM11 20H12.9655L13.325 17.3212C13.8353 17.1879 14.3017 16.9985 14.724 16.753C15.1465 16.5073 15.5539 16.1916 15.9463 15.8057L18.4308 16.85L19.4155 15.15L17.2463 13.5155C17.3296 13.2565 17.3863 13.0026 17.4163 12.7537C17.4464 12.5051 17.4615 12.2538 17.4615 12C17.4615 11.7397 17.4464 11.4884 17.4163 11.2463C17.3863 11.0039 17.3296 10.7564 17.2463 10.5038L19.4345 8.85L18.45 7.15L15.9365 8.2095C15.6018 7.85183 15.2009 7.53583 14.7338 7.2615C14.2664 6.98717 13.7937 6.79292 13.3155 6.67875L13 4H11.0155L10.6845 6.66925C10.1743 6.78975 9.70325 6.97433 9.27125 7.223C8.83909 7.47183 8.42684 7.79233 8.0345 8.1845L5.55 7.15L4.5655 8.85L6.725 10.4595C6.64167 10.6968 6.58334 10.9437 6.55 11.2C6.51667 11.4563 6.5 11.7262 6.5 12.0095C6.5 12.2698 6.51667 12.525 6.55 12.775C6.58334 13.025 6.6385 13.2718 6.7155 13.5155L4.5655 15.15L5.55 16.85L8.025 15.8C8.4045 16.1897 8.81025 16.5089 9.24225 16.7578C9.67442 17.0064 10.152 17.1974 10.675 17.3307L11 20ZM12.0115 15C12.8435 15 13.5515 14.708 14.1355 14.124C14.7195 13.54 15.0115 12.832 15.0115 12C15.0115 11.168 14.7195 10.46 14.1355 9.876C13.5515 9.292 12.8435 9 12.0115 9C11.1692 9 10.4586 9.292 9.87975 9.876C9.30092 10.46 9.0115 11.168 9.0115 12C9.0115 12.832 9.30092 13.54 9.87975 14.124C10.4586 14.708 11.1692 15 12.0115 15Z",fill:"currentColor"})),delete_big:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M7.30775 20.5C6.80908 20.5 6.38308 20.3234 6.02975 19.9702C5.67658 19.6169 5.5 19.1909 5.5 18.6922V5.99998H4.5V4.49998H9V3.61548H15V4.49998H19.5V5.99998H18.5V18.6922C18.5 19.1974 18.325 19.625 17.975 19.975C17.625 20.325 17.1974 20.5 16.6923 20.5H7.30775ZM17 5.99998H7V18.6922C7 18.7821 7.02883 18.8558 7.0865 18.9135C7.14417 18.9711 7.21792 19 7.30775 19H16.6923C16.7692 19 16.8398 18.9679 16.9038 18.9037C16.9679 18.8397 17 18.7692 17 18.6922V5.99998ZM9.404 17H10.9037V7.99998H9.404V17ZM13.0962 17H14.596V7.99998H13.0962V17Z",fill:"currentColor"})),delete_small:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M7.30775 20.5C6.80908 20.5 6.38308 20.3234 6.02975 19.9702C5.67658 19.6169 5.5 19.1909 5.5 18.6922V5.99998H4.5V4.49998H9V3.61548H15V4.49998H19.5V5.99998H18.5V18.6922C18.5 19.1974 18.325 19.625 17.975 19.975C17.625 20.325 17.1974 20.5 16.6923 20.5H7.30775ZM17 5.99998H7V18.6922C7 18.7821 7.02883 18.8558 7.0865 18.9135C7.14417 18.9711 7.21792 19 7.30775 19H16.6923C16.7692 19 16.8398 18.9679 16.9038 18.9037C16.9679 18.8397 17 18.7692 17 18.6922V5.99998ZM9.404 17H10.9037V7.99998H9.404V17ZM13.0962 17H14.596V7.99998H13.0962V17Z",fill:"currentColor"})),format_align_center:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M3.5 20.5V19H20.5V20.5H3.5ZM7.5 16.625V15.125H16.5V16.625H7.5ZM3.5 12.75V11.25H20.5V12.75H3.5ZM7.5 8.875V7.375H16.5V8.875H7.5ZM3.5 5V3.5H20.5V5H3.5Z",fill:"currentColor"})),format_align_left:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M3.5 20.5V19H20.5V20.5H3.5ZM3.5 16.625V15.125H14.5V16.625H3.5ZM3.5 12.75V11.25H20.5V12.75H3.5ZM3.5 8.875V7.375H14.5V8.875H3.5ZM3.5 5V3.5H20.5V5H3.5Z",fill:"currentColor"})),format_align_right:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M3.5 5V3.5H20.5V5H3.5ZM9.5 8.875V7.375H20.5V8.875H9.5ZM3.5 12.75V11.25H20.5V12.75H3.5ZM9.5 16.625V15.125H20.5V16.625H9.5ZM3.5 20.5V19H20.5V20.5H3.5Z",fill:"currentColor"})),add_row:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.025 10.2077C4.375 9.85775 4.80258 9.68275 5.30775 9.68275H6.5V11.1827H5.30775C5.21792 11.1827 5.14417 11.2116 5.0865 11.2693C5.02883 11.3269 5 11.4007 5 11.4905V16.1923C5 16.2821 5.02883 16.3558 5.0865 16.4135C5.14417 16.4712 5.21792 16.5 5.30775 16.5H18.6923C18.7821 16.5 18.8558 16.4712 18.9135 16.4135C18.9712 16.3558 19 16.2821 19 16.1923V11.4905C19 11.4007 18.9712 11.3269 18.9135 11.2693C18.8558 11.2116 18.7821 11.1827 18.6923 11.1827H17.6923V9.68275H18.6923C19.1974 9.68275 19.625 9.85775 19.975 10.2077C20.325 10.5577 20.5 10.9853 20.5 11.4905V16.1923C20.5 16.6974 20.325 17.125 19.975 17.475C19.625 17.825 19.1974 18 18.6923 18H5.30775C4.80258 18 4.375 17.825 4.025 17.475C3.675 17.125 3.5 16.6974 3.5 16.1923V11.4905C3.5 10.9853 3.675 10.5577 4.025 10.2077Z",fill:"currentColor"}),C.createElement("path",{d:"M11.3848 9.68275V7.5H12.8848V9.68275H15V11.1827H12.8848V13.2307H11.3848V11.1827H9.26925V9.68275H11.3848Z",fill:"currentColor"})),add_column:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.70775 4.025C9.35775 4.375 9.18275 4.80258 9.18275 5.30775V6.5H10.6827V5.30775C10.6827 5.21792 10.7116 5.14417 10.7693 5.0865C10.8269 5.02883 10.9007 5 10.9905 5H15.6923C15.7821 5 15.8558 5.02883 15.9135 5.0865C15.9712 5.14417 16 5.21792 16 5.30775V18.6923C16 18.7821 15.9712 18.8558 15.9135 18.9135C15.8558 18.9712 15.7821 19 15.6923 19H10.9905C10.9007 19 10.8269 18.9712 10.7693 18.9135C10.7116 18.8558 10.6827 18.7821 10.6827 18.6923V17.6923H9.18275V18.6923C9.18275 19.1974 9.35775 19.625 9.70775 19.975C10.0577 20.325 10.4853 20.5 10.9905 20.5H15.6923C16.1974 20.5 16.625 20.325 16.975 19.975C17.325 19.625 17.5 19.1974 17.5 18.6923V5.30775C17.5 4.80258 17.325 4.375 16.975 4.025C16.625 3.675 16.1974 3.5 15.6923 3.5H10.9905C10.4853 3.5 10.0577 3.675 9.70775 4.025Z",fill:"currentColor"}),C.createElement("path",{d:"M9.18275 11.3848H7V12.8848H9.18275V15H10.6827V12.8848H12.7307V11.3848H10.6827V9.26925H9.18275V11.3848Z",fill:"currentColor"})),insert_col_left:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M13.0001 20.1152H8.67713H8.75388H8.69238H13.0001ZM7.19238 19.8075C7.19238 20.3127 7.36738 20.7402 7.71738 21.0902C8.06738 21.4402 8.49497 21.6152 9.00013 21.6152H12.6924C13.1975 21.6152 13.6251 21.4402 13.9751 21.0902C14.3251 20.7402 14.5001 20.3127 14.5001 19.8075V10.423H13.0001V19.8075C13.0001 19.8973 12.9713 19.9711 12.9136 20.0287C12.856 20.0864 12.7822 20.1152 12.6924 20.1152H9.00013C8.9103 20.1152 8.83655 20.0864 8.77888 20.0287C8.72122 19.9711 8.69238 19.8973 8.69238 19.8075V4.69223C8.26422 4.74357 7.90722 4.93299 7.62138 5.26048C7.33538 5.58798 7.19238 5.97548 7.19238 6.42298V19.8075ZM13.0001 2.49998V4.61523H10.8846V6.11523H13.0001V8.23073H14.5001V6.11523H16.6154V4.61523H14.5001V2.49998H13.0001Z",fill:"currentColor"})),insert_row_above:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M20.1152 9.99987V14.3229V14.2461V14.3076V9.99987ZM19.8075 15.8076C20.3127 15.8076 20.7402 15.6326 21.0902 15.2826C21.4402 14.9326 21.6152 14.505 21.6152 13.9999V10.3076C21.6152 9.80245 21.4402 9.37487 21.0902 9.02487C20.7402 8.67487 20.3127 8.49987 19.8075 8.49987H10.423V9.99987H19.8075C19.8973 9.99987 19.9711 10.0287 20.0287 10.0864C20.0864 10.144 20.1152 10.2178 20.1152 10.3076V13.9999C20.1152 14.0897 20.0864 14.1635 20.0287 14.2211C19.9711 14.2788 19.8973 14.3076 19.8075 14.3076H4.69223C4.74357 14.7358 4.93299 15.0928 5.26048 15.3786C5.58798 15.6646 5.97548 15.8076 6.42298 15.8076H19.8075ZM2.49998 9.99987H4.61523V12.1154H6.11523V9.99987H8.23073V8.49987H6.11523V6.38462H4.61523V8.49987H2.49998V9.99987Z",fill:"currentColor"})),insert_row_below:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M20.1152 14.1924V9.86939V9.94614V9.88464V14.1924ZM19.8075 8.38464C20.3127 8.38464 20.7402 8.55964 21.0902 8.90964C21.4402 9.25964 21.6152 9.68723 21.6152 10.1924V13.8846C21.6152 14.3898 21.4402 14.8174 21.0902 15.1674C20.7402 15.5174 20.3127 15.6924 19.8075 15.6924H10.423V14.1924H19.8075C19.8973 14.1924 19.9711 14.1636 20.0287 14.1059C20.0864 14.0482 20.1152 13.9745 20.1152 13.8846V10.1924C20.1152 10.1026 20.0864 10.0288 20.0287 9.97114C19.9711 9.91348 19.8973 9.88464 19.8075 9.88464H4.69223C4.74357 9.45648 4.93299 9.09948 5.26048 8.81364C5.58798 8.52764 5.97548 8.38464 6.42298 8.38464H19.8075ZM2.49998 14.1924H4.61523V12.0769H6.11523V14.1924H8.23073V15.6924H6.11523V17.8076H4.61523V15.6924H2.49998V14.1924Z",fill:"currentColor"})),insert_col_right:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M10.8075 20.1152H15.1305H15.0537H15.1152H10.8075ZM16.6152 19.8075C16.6152 20.3127 16.4402 20.7402 16.0902 21.0902C15.7402 21.4402 15.3127 21.6152 14.8075 21.6152H11.1152C10.6101 21.6152 10.1825 21.4402 9.83248 21.0902C9.48248 20.7402 9.30748 20.3127 9.30748 19.8075V10.423H10.8075V19.8075C10.8075 19.8973 10.8363 19.9711 10.894 20.0287C10.9517 20.0864 11.0254 20.1152 11.1152 20.1152H14.8075C14.8973 20.1152 14.9711 20.0864 15.0287 20.0287C15.0864 19.9711 15.1152 19.8973 15.1152 19.8075V4.69223C15.5434 4.74357 15.9004 4.93299 16.1862 5.26048C16.4722 5.58798 16.6152 5.97548 16.6152 6.42298V19.8075ZM10.8075 2.49998V4.61523H12.923V6.11523H10.8075V8.23073H9.30748V6.11523H7.19223V4.61523H9.30748V2.49998H10.8075Z",fill:"currentColor"})),check:C.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M9.54983 17.6537L4.21533 12.3192L5.28433 11.25L9.54983 15.5155L18.7153 6.34998L19.7843 7.41923L9.54983 17.6537Z",fill:"currentColor"}))},Vq="_editorRoot_f3hmk_53",Bq="_editorWrapper_f3hmk_155",Fq="_toolbarRoot_f3hmk_162",jq="_readOnlyToolbarRoot_f3hmk_189",Zq="_toolbarToggleItem_f3hmk_208",zq="_toolbarGroupOfGroups_f3hmk_219",Xq="_toolbarToggleSingleGroup_f3hmk_224",Wq="_toolbarButton_f3hmk_239",Hq="_activeToolbarButton_f3hmk_275",Uq="_toolbarButtonDropdownContainer_f3hmk_286",qq="_selectContainer_f3hmk_288",Yq="_selectItem_f3hmk_301",Gq="_toolbarButtonSelectTrigger_f3hmk_307",Kq="_selectTrigger_f3hmk_308",Jq="_selectDropdownArrow_f3hmk_373",eY="_contentEditable_f3hmk_379",tY="_codeMirrorWrapper_f3hmk_391",nY="_codeMirrorToolbar_f3hmk_408",iY="_propertyPanelTitle_f3hmk_430",rY="_propertyEditorTable_f3hmk_438",sY="_iconButton_f3hmk_456",oY="_readOnlyColumnCell_f3hmk_461",aY="_buttonsFooter_f3hmk_474",lY="_propertyEditorInput_f3hmk_480",uY="_primaryButton_f3hmk_506",cY="_secondaryButton_f3hmk_507",hY="_smallButton_f3hmk_522",fY="_dialogForm_f3hmk_534",dY="_linkDialogEditForm_f3hmk_540",pY="_linkDialogInputContainer_f3hmk_548",mY="_linkDialogInputWrapper_f3hmk_554",gY="_linkDialogInput_f3hmk_548",OY="_linkDialogAnchor_f3hmk_586",xY="_linkDialogPopoverContent_f3hmk_600",yY="_tableColumnEditorPopoverContent_f3hmk_601",vY="_dialogContent_f3hmk_602",bY="_largeDialogContent_f3hmk_614",SY="_dialogTitle_f3hmk_624",_Y="_dialogCloseButton_f3hmk_630",CY="_popoverContent_f3hmk_637",wY="_popoverArrow_f3hmk_649",kY="_linkDialogPreviewAnchor_f3hmk_653",EY="_tooltipTrigger_f3hmk_676",TY="_tooltipContent_f3hmk_680",PY="_actionButton_f3hmk_694",AY="_primaryActionButton_f3hmk_701",$Y="_tableEditor_f3hmk_713",IY="_toolCell_f3hmk_724",RY="_tableColumnEditorTrigger_f3hmk_743",MY="_addRowButton_f3hmk_745",NY="_addColumnButton_f3hmk_746",LY="_tableColumnEditorToolbar_f3hmk_788",DY="_toggleGroupRoot_f3hmk_801",QY="_tableToolsColumn_f3hmk_819",VY="_leftAlignedCell_f3hmk_828",BY="_rightAlignedCell_f3hmk_832",FY="_centeredCell_f3hmk_836",jY="_dialogOverlay_f3hmk_869",ZY="_focusedImage_f3hmk_915",zY="_imageWrapper_f3hmk_919",XY="_editImageToolbar_f3hmk_932",WY="_editImageButton_f3hmk_936",HY="_inlineEditor_f3hmk_942",UY="_blockEditor_f3hmk_951",qY="_nestedEditor_f3hmk_960",YY="_genericComponentName_f3hmk_979",GY="_diffSourceToggleWrapper_f3hmk_985",KY="_ggDiffSourceToggle_f3hmk_993",JY="_diffSourceToggle_f3hmk_985",eG="_selectWithLabel_f3hmk_1011",tG="_toolbarTitleMode_f3hmk_1026",nG="_imageControlWrapperResizing_f3hmk_1031",iG="_imageResizer_f3hmk_1035",rG="_imageResizerN_f3hmk_1044",sG="_imageResizerNe_f3hmk_1050",oG="_imageResizerE_f3hmk_1056",aG="_imageResizerSe_f3hmk_1062",lG="_imageResizerS_f3hmk_1062",uG="_imageResizerSw_f3hmk_1074",cG="_imageResizerW_f3hmk_1080",hG="_imageResizerNw_f3hmk_1086",fG="_imagePlaceholder_f3hmk_1092",dG="_imageDimensionsContainer_f3hmk_1100",pG="_placeholder_f3hmk_1105",mG="_rootContentEditableWrapper_f3hmk_1118",gG="_downshiftInputWrapper_f3hmk_1128",OG="_downshiftInput_f3hmk_1128",xG="_downshiftAutocompleteContainer_f3hmk_1159",yG="_textInput_f3hmk_1205",vG="_multiFieldForm_f3hmk_1213",bG="_formField_f3hmk_1219",SG="_markdownParseError_f3hmk_1230",_G="_popupContainer_f3hmk_1239",CG="_inputSizer_f3hmk_1244",te={editorRoot:Vq,editorWrapper:Bq,toolbarRoot:Fq,readOnlyToolbarRoot:jq,toolbarToggleItem:Zq,toolbarGroupOfGroups:zq,toolbarToggleSingleGroup:Xq,toolbarButton:Wq,activeToolbarButton:Hq,toolbarButtonDropdownContainer:Uq,selectContainer:qq,selectItem:Yq,toolbarButtonSelectTrigger:Gq,selectTrigger:Kq,selectDropdownArrow:Jq,contentEditable:eY,codeMirrorWrapper:tY,codeMirrorToolbar:nY,propertyPanelTitle:iY,propertyEditorTable:rY,iconButton:sY,readOnlyColumnCell:oY,buttonsFooter:aY,propertyEditorInput:lY,primaryButton:uY,secondaryButton:cY,smallButton:hY,dialogForm:fY,linkDialogEditForm:dY,linkDialogInputContainer:pY,linkDialogInputWrapper:mY,linkDialogInput:gY,linkDialogAnchor:OY,linkDialogPopoverContent:xY,tableColumnEditorPopoverContent:yY,dialogContent:vY,largeDialogContent:bY,dialogTitle:SY,dialogCloseButton:_Y,popoverContent:CY,popoverArrow:wY,linkDialogPreviewAnchor:kY,tooltipTrigger:EY,tooltipContent:TY,actionButton:PY,primaryActionButton:AY,tableEditor:$Y,toolCell:IY,tableColumnEditorTrigger:RY,addRowButton:MY,addColumnButton:NY,tableColumnEditorToolbar:LY,toggleGroupRoot:DY,tableToolsColumn:QY,leftAlignedCell:VY,rightAlignedCell:BY,centeredCell:FY,dialogOverlay:jY,focusedImage:ZY,imageWrapper:zY,editImageToolbar:XY,editImageButton:WY,inlineEditor:HY,blockEditor:UY,nestedEditor:qY,genericComponentName:YY,diffSourceToggleWrapper:GY,ggDiffSourceToggle:KY,diffSourceToggle:JY,selectWithLabel:eG,toolbarTitleMode:tG,imageControlWrapperResizing:nG,imageResizer:iG,imageResizerN:rG,imageResizerNe:sG,imageResizerE:oG,imageResizerSe:aG,imageResizerS:lG,imageResizerSw:uG,imageResizerW:cG,imageResizerNw:hG,imagePlaceholder:fG,imageDimensionsContainer:dG,placeholder:pG,rootContentEditableWrapper:mG,downshiftInputWrapper:gG,downshiftInput:OG,downshiftAutocompleteContainer:xG,textInput:yG,multiFieldForm:vG,formField:bG,markdownParseError:SG,popupContainer:_G,inputSizer:CG};function wG(t,e){let n=null;return t.getEditorState().read(()=>{n=e()}),n}function $8(t){try{const e=t.anchor,n=t.focus,i=t.anchor.getNode(),r=t.focus.getNode();return i===r?i:t.isBackward()?BT(n)?i:r:BT(e)?i:r}catch{return null}}const kG=["transform","perspective","filter","backdrop-filter","contain","container-type"],EG=["layout","paint","strict","content"];function TG(t){let e=t==null?void 0:t.parentElement;for(;e;){const n=window.getComputedStyle(e),r=n.willChange.split(",").map(o=>o.trim()).some(o=>kG.includes(o));if(n.transform!=="none"||n.perspective!=="none"||n.filter!=="none"||n.backdropFilter!=="none"||EG.includes(n.contain)||n.containerType!=="normal"||n.contentVisibility==="auto"||r)return e;e=e.parentElement}return null}function Ww(t){const e=me(),n=window.getSelection(),i=document.activeElement,r=t.getRootElement();if(e!==null&&n!==null&&r!==null&&r.contains(n.anchorNode)&&t.isEditable()){const s=n.getRangeAt(0);let o;if(n.isCollapsed){let l=n.anchorNode;(l==null?void 0:l.nodeType)==3&&(l=l.parentNode),o=l.getBoundingClientRect(),o.width=0}else if(n.anchorNode===r){let l=r;for(;l.firstElementChild!=null;)l=l.firstElementChild;o=l.getBoundingClientRect()}else o=s.getBoundingClientRect();const a=TG(r);if(a){const l=a.getBoundingClientRect();return{top:Math.round(o.top-l.top),left:Math.round(o.left-l.left),width:Math.round(o.width),height:Math.round(o.height)}}return{top:Math.round(o.top),left:Math.round(o.left),width:Math.round(o.width),height:Math.round(o.height)}}else if((i==null?void 0:i.className)!=="link-input")return null;return null}function PG(t,e){return d8({markdown:""},n=>{t.getEditorState().read(()=>{n.markdown=Q1({root:pt(),...e})})}).markdown}function I8(t,e){let n=null,i=[],r="";t.getEditorState().read(()=>{const a=me();!a||ae(a)&&a.isCollapsed()||a.getNodes().length===0||(i=FR(t,a).nodes,i.length>0&&(n=HC()))},{editor:t});const s=n;if(!s||i.length===0)return"";const o={error:void 0,failed:!1};if(s.update(()=>{try{const a=pt(),l=jR(i);let u=ut();const c=()=>{u.isEmpty()||(a.append(u),u=ut())};for(const h of l)h.isInline()?u.append(h):(c(),a.append(h));c(),r=Q1({root:a,...e})}catch(a){o.failed=!0,o.error=a}},{discrete:!0,skipTransforms:!0}),o.failed)throw o.error;return r.replace(/\n+$/u,"")}const AG=({children:t})=>{const e=Bt(mr);return C.createElement(Zw,{initialEditor:e},t)},$G=()=>{const t=Ht(),e=Tt(z1),n=Tt(C8),i=h=>{n(h),e(h?{current:h}:null)},[r,s,o,a,l,u,c]=Ft(Y0,G0,Mw,Nw,Dw,K0,Lw);return C.createElement(C.Fragment,null,a.map((h,f)=>C.createElement(h,{key:f})),C.createElement(R8,{wrappers:l},C.createElement("div",{className:yt(te.rootContentEditableWrapper,"mdxeditor-root-contenteditable")},C.createElement(Xw,{contentEditable:C.createElement("div",{ref:i},C.createElement(B1,{className:yt(te.contentEditable,r),ariaLabel:t("contentArea.editableMarkdown","editable markdown"),spellCheck:s})),placeholder:C.createElement("div",{className:yt(te.contentEditable,te.placeholder,r)},C.createElement("p",null,u)),ErrorBoundary:F1}))),o.map((h,f)=>C.createElement(h,{key:f})),c.map((h,f)=>C.createElement(h,{key:f})))},IG={listItemIndent:"one"},RG=t=>A8[t];function MG(t,e,n={}){let i=e;for(const[r,s]of Object.entries(n))i=i.replaceAll(`{{${r}}}`,String(s));return i}const R8=({wrappers:t,children:e})=>{if(t.length===0)return C.createElement(C.Fragment,null,e);const n=t[0];return C.createElement(n,null,C.createElement(R8,{wrappers:t.slice(1)},e))},NG=({children:t,className:e,overlayContainer:n})=>{const i=C.useRef(null),r=C.useRef(null),s=Tt(Vs),o=Tt(S8);return C.useEffect(()=>{const a=document.createElement("div");return a.classList.add("mdxeditor-popup-container",te.editorRoot,te.popupContainer,...(e??"").trim().split(" ").filter(Boolean)),(n??document.body).appendChild(a),i.current=a,s(i),o(r),()=>{a.remove()}},[e,i,n,s,o]),C.createElement("div",{className:yt("mdxeditor",te.editorRoot,te.editorWrapper,e),ref:r},t)};function LG(t){return{getMarkdown:()=>{const e=t.getValue(go);return e==="source"||e==="diff"?t.getValue(al):t.getValue(Rs)},setMarkdown:e=>{t.pub(X1,e)},insertMarkdown:e=>{t.pub(Aw,e)},focus:(e,n)=>{var i;(i=t.getValue(mr))==null||i.focus(e,n)},getContentEditableHTML:()=>{var e;return((e=t.getValue(z1))==null?void 0:e.current.innerHTML)??""},getSelectionMarkdown:()=>{const e=t.getValue(go);if(e==="source"||e==="diff")return"";const n=t.getValue(tn);if(!n)return"";const i=t.getValue(Hh),r=t.getValue(Z1),s=t.getValue(jd),o=t.getValue(ia),a=t.getValue(Uh);return I8(n,{visitors:i,toMarkdownExtensions:r,toMarkdownOptions:s,jsxComponentDescriptors:o,jsxIsAvailable:a})}}}const DG=({onReady:t,onDispose:e})=>{const n=Ol(),i=C.useMemo(()=>LG(n),[n]);return C.useLayoutEffect(()=>(t(i),()=>{e(i)}),[i,e,t]),null},QG=C.forwardRef((t,e)=>{const n=C.useRef(null),i=C.useRef(null),r=C.useRef([]),s=C.useRef(t.trim===!1?t.markdown:t.markdown.trim()),o=C.useCallback(c=>{const h=n.current;h&&i.current===null?c(h):r.current.push(c)},[]),a=C.useMemo(()=>({getMarkdown:()=>{var c;return((c=n.current)==null?void 0:c.getMarkdown())??s.current},setMarkdown:c=>{s.current=c,o(h=>{h.setMarkdown(c)})},insertMarkdown:c=>{o(h=>{h.insertMarkdown(c)})},focus:(c,h)=>{o(f=>{f.focus(c,h)})},getContentEditableHTML:()=>{var c;return((c=n.current)==null?void 0:c.getContentEditableHTML())??""},getSelectionMarkdown:()=>{var c;return((c=n.current)==null?void 0:c.getSelectionMarkdown())??""}}),[o]),l=C.useCallback(c=>{if(n.current=c,i.current===c)return;if(r.current.length===0){s.current=c.getMarkdown();return}i.current=c;const h=()=>{if(n.current!==c){i.current===c&&(i.current=null);return}const f=r.current.shift();if(!f){i.current=null,s.current=c.getMarkdown();return}f(c),queueMicrotask(h)};h()},[]),u=C.useCallback(c=>{n.current===c&&(s.current=c.getMarkdown(),n.current=null)},[]);return C.useImperativeHandle(e,()=>a,[a]),C.createElement(o6,{plugins:[P8({contentEditableClassName:t.contentEditableClassName??"",spellCheck:t.spellCheck??!0,initialMarkdown:t.markdown,onChange:t.onChange??Ua,onBlur:t.onBlur??Ua,toMarkdownOptions:t.toMarkdownOptions??IG,autoFocus:t.autoFocus??!1,placeholder:t.placeholder??"",readOnly:!!t.readOnly,iconComponentFor:t.iconComponentFor??RG,suppressHtmlProcessing:t.suppressHtmlProcessing??!1,onError:t.onError??Ua,translation:t.translation??MG,trim:t.trim??!0,lexicalTheme:t.lexicalTheme,..."editorState"in t?{editorState:t.editorState}:{},suppressSharedHistory:t.suppressSharedHistory??!1,additionalLexicalNodes:t.additionalLexicalNodes??[],lexicalEditorNamespace:t.lexicalEditorNamespace??"MDXEditor"}),...t.plugins??[]]},C.createElement(NG,{className:t.className,overlayContainer:t.overlayContainer},C.createElement(AG,null,C.createElement($G,null))),C.createElement(DG,{onReady:l,onDispose:u}))}),Hw=typeof window<"u"&&typeof window.document.createElement<"u",Xd=Hw&&(()=>{var t;const e=(t=navigator.userAgentData)==null?void 0:t.platform;return e?/mac/i.test(e):/Mac|iPod|iPhone|iPad/.test(navigator.userAgent)})();function M8(t,e){return Xd?t:e}const VG={testLexicalNode:L1,visitLexicalNode:({lexicalNode:t,actions:e})=>{const n=parseInt(t.getTag()[1],10);e.addAndStepInto("heading",{depth:n})}},BG={testNode:"heading",visitNode:function({mdastNode:t,actions:e}){e.addAndStepInto(Ps(`h${t.depth}`))}},FG=["Digit0","Digit1","Digit2","Digit3","Digit4","Digit5","Digit6"],nO=[1,2,3,4,5,6],jG={Digit1:1,Digit2:2,Digit3:3,Digit4:4,Digit5:5,Digit6:6},lh=Ee(nO,t=>{t.pub(qh,e=>e.registerCommand(Mh,n=>{const{code:i,ctrlKey:r,metaKey:s,altKey:o}=n;return FG.includes(i)&&M8(s,r)&&o?(n.preventDefault(),e.update(()=>{if(i==="Digit0")t.pub(zd,()=>ut());else{const a=t.getValue(lh),l=jG[i];a.includes(l)&&t.pub(zd,()=>Ps(`h${l}`))}}),!0):!1},Gt))}),ZG=Vn({init(t,e){t.pubIn({[Uu]:"headings",[hr]:BG,[Nr]:Yp,[Lr]:VG}),t.pub(lh,(e==null?void 0:e.allowedHeadingLevels)??nO)},update(t,e){t.pub(lh,(e==null?void 0:e.allowedHeadingLevels)??nO)}});function RP(t,e){return t.read("latest",()=>{const n=st(e);return n!==null&&n.isSelected()})}function N8(t){const[e]=qi(),[n,i]=R.useState(()=>RP(e,t));return R.useEffect(()=>{let r=!0;const s=e.registerUpdateListener(()=>{r&&i(RP(e,t))});return()=>{r=!1,s()}},[e,t]),[n,R.useCallback(r=>{e.update(()=>{let s=me();Ct(s)||(s=eh(),yn(s)),Ct(s)&&(r?s.add(t):s.delete(t))})},[e,t]),R.useCallback(()=>{e.update(()=>{const r=me();Ct(r)&&r.clear()})},[e])]}function zG({nodeKey:t}){const[e]=qi(),[n,i,r]=N8(t);return R.useEffect(()=>wn(e.registerCommand(Rp,s=>{const o=e.getElementByKey(t);return w1(s)===o&&(s.shiftKey||r(),i(!n),!0)},Gt)),[r,e,n,t,i]),R.useEffect(()=>{const s=e.getElementByKey(t),o=e._config.theme.hrSelected??"selected";s!==null&&(n?as(s,o):qp(s,o))},[e,n,t]),null}class Gh extends ju{static getType(){return"horizontalrule"}static clone(e){return new Gh(e.__key)}static importJSON(e){return nm().updateFromJSON(e)}static importDOM(){return{hr:()=>({conversion:XG,priority:0})}}decorate(){return Y.jsx(zG,{nodeKey:this.__key})}}function XG(){return{node:nm()}}function nm(){return Ui(new Gh)}function WG(){const[t]=qi();return R.useEffect(()=>t.registerCommand(xR,e=>{const n=me();if(!ae(n))return!1;if(n.focus.getNode()!==null){const i=nm();lR(i)}return!0},tt),[t]),null}const HG={testLexicalNode:t=>t instanceof Gh,visitLexicalNode({actions:t}){t.addAndStepInto("thematicBreak")}},UG={testNode:"thematicBreak",visitNode({actions:t}){t.addAndStepInto(nm())}},Uw=Ds(t=>{t.sub(t.pipe(Uw,On(tn)),([,e])=>{e==null||e.dispatchCommand(xR,void 0)})}),qG=Vn({init(t){t.pubIn({[Uu]:"thematicBreak",[hr]:UG,[Nr]:Gh,[Lr]:HG,[_l]:WG})}});function $a(t,...e){const n=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",t);for(const r of e)i.append("v",r);throw n.search=i.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Wd(t){let e=1,n=t.getParent();for(;n!=null;){if(it(n)){const i=n.getParent();if(Ke(i)){e++,n=i.getParent();continue}$a(40)}return e}return e}function vS(t){const e=t.getParent();Ke(e)||$a(40);let n=e,i=e;for(;i!==null;)i=i.getParent(),Ke(i)&&(n=i);return n}function L8(t){let e=[];const n=t.getChildren().filter(it);for(let i=0;i<n.length;i++){const r=n[i],s=r.getFirstChild();Ke(s)?e=e.concat(L8(s)):e.push(r)}return e}function zr(t){return it(t)&&Ke(t.getFirstChild())}function D8(t,e){return it(t)&&(e.length===0||e.length===1&&t.is(e[0])&&t.getChildrenSize()===0)}function bS(t){const e=me();if(e!==null){let n=e.getNodes();if(ae(e)){const[r]=e.getStartEndPoints(),s=r.getNode(),o=s.getParent();if(It(s)){const a=s.getFirstChild();if(a)n=a.selectStart().getNodes();else{const l=ut();s.append(l),n=l.select().getNodes()}}else if(D8(s,n)){const a=rs(t);if(It(o)){s.replace(a);const l=ls();W(s)&&(l.setFormat(s.getFormatType()),l.setIndent(s.getIndent())),a.append(l)}else if(it(s)){const l=s.getParentOrThrow();Cu(a,l.getChildren()),l.replace(a)}return}}const i=new Set;for(let r=0;r<n.length;r++){const s=n[r];if(W(s)&&s.isEmpty()&&!it(s)&&!i.has(s.getKey())){MP(s,t);continue}let o=YC(s)?s.getParent():it(s)&&s.isEmpty()?s:null;for(;o!=null;){const a=o.getKey();if(Ke(o)){if(!i.has(a)){const l=rs(t);Cu(l,o.getChildren()),o.replace(l),i.add(a)}break}{const l=o.getParent();if(It(l)&&!i.has(a)){i.add(a),MP(o,t);break}o=l}}}}}function Cu(t,e){t.splice(t.getChildrenSize(),0,e)}function MP(t,e){if(Ke(t))return t;const n=t.getPreviousSibling(),i=t.getNextSibling(),r=ls();let s;if(Cu(r,t.getChildren()),Ke(n)&&e===n.getListType())n.append(r),Ke(i)&&e===i.getListType()&&(Cu(n,i.getChildren()),i.remove()),s=n;else if(Ke(i)&&e===i.getListType())i.getFirstChildOrThrow().insertBefore(r),s=i;else{const a=rs(e);a.append(r),t.replace(a),s=a}r.setFormat(t.getFormatType()),r.setIndent(t.getIndent());const o=me();return ae(o)&&(s.getKey()===o.anchor.key&&o.anchor.set(r.getKey(),o.anchor.offset,"element"),s.getKey()===o.focus.key&&o.focus.set(r.getKey(),o.focus.offset,"element")),t.remove(),s}function qw(t,e){const n=t.getLastChild(),i=e.getFirstChild();n&&i&&zr(n)&&zr(i)&&(qw(n.getFirstChild(),i.getFirstChild()),i.remove());const r=e.getChildren();r.length>0&&t.append(...r),e.remove()}function YG(){const t=me();if(ae(t)){const e=new Set,n=t.getNodes(),i=t.anchor.getNode();if(D8(i,n))e.add(vS(i));else for(let r=0;r<n.length;r++){const s=n[r];if(YC(s)){const o=oR(s,Oa);o!=null&&e.add(vS(o))}}for(const r of e){let s=r;const o=L8(r);for(const a of o){const l=ut().setTextStyle(t.style).setTextFormat(t.format);Cu(l,a.getChildren()),s.insertAfter(l),s=l,a.__key===t.anchor.key&&ta(t.anchor,vi(Ii(l,"next"))),a.__key===t.focus.key&&ta(t.focus,vi(Ii(l,"next"))),a.remove()}r.remove()}}}function Q8(t){const e=t.getListType()!=="check";let n=t.getStart();for(const i of t.getChildren())it(i)&&(i.getValue()!==n&&i.setValue(n),e&&i.getLatest().__checked!=null&&i.setChecked(void 0),Ke(i.getFirstChild())||n++)}function GG(t){const e=new Set;if(zr(t)||e.has(t.getKey()))return;const n=t.getParent(),i=t.getNextSibling(),r=t.getPreviousSibling();if(zr(i)&&zr(r)){const s=r.getFirstChild();if(Ke(s)){s.append(t);const o=i.getFirstChild();Ke(o)&&(Cu(s,o.getChildren()),i.remove(),e.add(i.getKey()))}}else if(zr(i)){const s=i.getFirstChild();if(Ke(s)){const o=s.getFirstChild();o!==null&&o.insertBefore(t)}}else if(zr(r)){const s=r.getFirstChild();Ke(s)&&s.append(t)}else if(Ke(n)){const s=qn(t),o=qn(n);s.append(o),o.append(t),r?r.insertAfter(s):i?i.insertBefore(s):n.append(s)}}function NP(t){if(zr(t))return;const e=t.getParent(),n=e?e.getParent():void 0;if(Ke(n?n.getParent():void 0)&&it(n)&&Ke(e)){const i=e?e.getFirstChild():void 0,r=e?e.getLastChild():void 0;if(t.is(i))n.insertBefore(t),e.isEmpty()&&n.remove();else if(t.is(r))n.insertAfter(t),e.isEmpty()&&n.remove();else{const s=qn(t),o=qn(e);s.append(o),t.getPreviousSiblings().forEach(u=>o.append(u));const a=qn(t),l=qn(e);a.append(l),Cu(l,t.getNextSiblings()),n.insertBefore(s),n.insertAfter(a),n.replace(t)}}}function KG(t=!1){const e=me();if(!ae(e)||!e.isCollapsed())return!1;const n=e.anchor.getNode();let i=null;if(it(n)&&n.getChildrenSize()===0)i=n;else if(le(n)){const u=n.getParent();it(u)&&u.getChildren().every(c=>le(c)&&c.getTextContent().trim()==="")&&(i=u)}if(i===null)return!1;const r=vS(i),s=i.getParent();Ke(s)||$a(40);const o=s.getParent();let a;if(It(o))a=ut(),r.insertAfter(a);else{if(!it(o))return!1;a=qn(o),o.insertAfter(a)}a.setTextStyle(e.style).setTextFormat(e.format).select();const l=i.getNextSiblings();if(l.length>0){const u=t?(function(h,f){return h.getStart()+f.getIndexWithinParent()})(s,i):1,c=qn(s).setStart(u);if(it(a)){const h=qn(a);h.append(c),a.insertAfter(h)}else a.insertAfter(c);c.append(...l)}return(function(u){let c=u;for(;c.getNextSibling()==null&&c.getPreviousSibling()==null;){const h=c.getParent();if(h==null||!it(h)&&!Ke(h))break;c=h}c.remove()})(i),!0}let Oa=class extends $i{constructor(n=1,i=void 0,r){super(r);se(this,"__value");se(this,"__checked");this.__value=n===void 0?1:n,this.__checked=i}$config(){return this.config("listitem",{$transform:n=>{const i=n.getParent();if(Ke(i))i.getListType()!=="check"&&n.getChecked()!=null&&n.setChecked(void 0);else if(i){const r=n.createParentElementNode();Ke(r)||$a(340);const s=[n];for(const o of["previous","next"]){s.reverse();for(const{origin:a}of Rt(n,o)){if(!it(a))break;s.push(a)}}n.insertBefore(r),r.splice(0,0,s),It(i)||(Hp(r,ga(Rt(r,"next")),{$shouldSplit:()=>!1,removeEmptyDestination:!0}),i.isEmpty()&&i.isAttached()&&i.remove())}},extends:$i,importDOM:{li:()=>({conversion:JG,priority:0})}})}afterCloneFrom(n){super.afterCloneFrom(n),this.__value=n.__value,this.__checked=n.__checked}createDOM(n){const i=rn().createElement("li");return this.updateListItemDOM(null,i,n),i}updateListItemDOM(n,i,r){(function(a,l){const u=l.getParent();!Ke(u)||u.getListType()!=="check"||Ke(l.getFirstChild())?(a.removeAttribute("role"),a.removeAttribute("tabIndex"),a.removeAttribute("aria-checked")):(a.setAttribute("role","checkbox"),a.setAttribute("tabIndex","-1"),a.setAttribute("aria-checked",l.getChecked()?"true":"false"))})(i,this),i.value=this.__value,(function(a,l,u){const c=l.list;if(!c)return;const h=c.listitem,f=c.nested&&c.nested.listitem,p=u.getParent(),m=Ke(p)&&p.getListType()==="check",g=u.getChecked(),x=u.getChildren().some(_=>Ke(_)),y=[];c.listitemChecked!==void 0&&y.push(c.listitemChecked),c.listitemUnchecked!==void 0&&y.push(c.listitemUnchecked),f!==void 0&&y.push(...uo(f)),y.length>0&&qp(a,...y);const S=[];if(h!==void 0&&S.push(...uo(h)),m){const _=g?c.listitemChecked:c.listitemUnchecked;_!==void 0&&S.push(_)}f!==void 0&&x&&S.push(...uo(f)),S.length>0&&as(a,...S)})(i,r.theme,this);const s=n?n.__style:"",o=this.__style;s!==o&&tu(i.style,o,s),(function(a,l,u){const c=l.__textStyle,h=u?u.__textStyle:"";if(u!==null&&h===c)return;const f=$d(c);for(const p in f)a.style.setProperty(`--listitem-marker-${p}`,f[p]);if(h!=="")for(const p in $d(h))p in f||a.style.removeProperty(`--listitem-marker-${p}`)})(i,this,n)}updateDOM(n,i,r){const s=i;return this.updateListItemDOM(n,s,r),!1}updateFromJSON(n){return super.updateFromJSON(n).setValue(n.value).setChecked(n.checked)}exportDOM(n){const i=this.createDOM(n._config),r=this.getFormatType();r&&(i.style.textAlign=r);const s=this.getDirection();return s&&(i.dir=s),zr(this)?{after(o){if(Je(o)){const a=o.previousElementSibling;if(Je(a)&&a.nodeName==="LI"){for(;o.firstChild;)a.append(o.firstChild);o.remove()}}return o},element:i}:{element:i}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...n){for(let i=0;i<n.length;i++){const r=n[i];if(W(r)&&this.canMergeWith(r)){const s=r.getChildren();this.append(...s),r.remove()}else super.append(r)}return this}replace(n,i){if(it(n))return super.replace(n);this.setIndent(0);const r=this.getParentOrThrow();if(!Ke(r))return n;if(r.__first===this.getKey())r.insertBefore(n);else if(r.__last===this.getKey())r.insertAfter(n);else{const a=qn(r);let l=this.getNextSibling();for(;l;){const u=l;l=l.getNextSibling(),a.append(u)}r.insertAfter(n),n.insertAfter(a)}const s=this.__key;let o=0;if(i&&(W(n)||$a(139),o=n.getChildrenSize(),n.splice(o,0,this.getChildren())),i&&W(n)){const a=me();if(ae(a))for(const l of a.getStartEndPoints())l.key===s&&l.type==="element"&&l.set(n.getKey(),o+l.offset,"element")}return this.remove(),r.getChildrenSize()===0&&r.remove(),n}insertAfter(n,i=!0){const r=this.getParentOrThrow();if(Ke(r)||$a(39),it(n))return super.insertAfter(n,i);const s=this.getNextSiblings();if(r.insertAfter(n,i),s.length!==0){const o=qn(r);s.forEach(a=>o.append(a)),n.insertAfter(o,i)}return n}remove(n){const i=this.getPreviousSibling(),r=this.getNextSibling();super.remove(n),i&&r&&zr(i)&&zr(r)&&(qw(i.getFirstChild(),r.getFirstChild()),r.remove())}resetOnCopyNodeFrom(n){super.resetOnCopyNodeFrom(n),n.getChecked()&&this.setChecked(!1)}insertNewAfter(n,i=!0){const r=qn(this);return this.insertAfter(r,i),r}collapseAtStart(n){if(zr(this))return!1;const i=this.getParentOrThrow();if(it(i.getParentOrThrow()))return NP(this),!0;const r=ut().append(...this.getChildren()),s=this.getNextSiblings();if(s.length>0){const o=qn(i);o.append(...s),i.insertAfter(o)}return i.insertAfter(r),this.remove(),i.getChildrenSize()===0&&i.remove(),r.selectStart(),!0}getValue(){return this.getLatest().__value}setValue(n){const i=this.getWritable();return i.__value=n,i}getChecked(){const n=this.getLatest();let i;const r=this.getParent();return Ke(r)&&(i=r.getListType()),i==="check"?!!n.__checked:void 0}setChecked(n){const i=this.getWritable();return i.__checked=n,i}toggleChecked(){const n=this.getWritable();return n.setChecked(!n.__checked)}getIndent(){const n=this.getParent();if(n===null||!this.isAttached())return this.getLatest().__indent;let i=n.getParentOrThrow(),r=0;for(;it(i);)i=i.getParentOrThrow().getParentOrThrow(),r++;return r}setIndent(n){typeof n!="number"&&$a(117),(n=Math.floor(n))>=0||$a(199);let i=this.getIndent();for(;i!==n;)i<n?(GG(this),i++):(NP(this),i--);return this}canInsertAfter(n){return it(n)}canReplaceWith(n){return it(n)}canMergeWith(n){return it(n)||Qu(n)}extractWithChild(n,i){if(!ae(i))return!1;const r=i.anchor.getNode(),s=i.focus.getNode();return this.isParentOf(r)&&this.isParentOf(s)&&this.getTextContent().length===i.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return rs("bullet")}canMergeWhenEmpty(){return!0}};function JG(t){if(t.classList.contains("task-list-item")){for(const i of t.children)if(i.tagName==="INPUT")return LP(i)}if(t.classList.contains("joplin-checkbox")){for(const i of t.children)if(i.classList.contains("checkbox-wrapper")&&i.children.length>0&&i.children[0].tagName==="INPUT")return LP(i.children[0])}const e=t.getAttribute("aria-checked"),n=ls(e==="true"||e!=="false"&&void 0);return Qs(n,t),{after:V8.bind(null,n),node:Mr(n,t)}}function LP(t){if(t.getAttribute("type")!=="checkbox")return{node:null};const e=ls(t.hasAttribute("checked"));return{after:V8.bind(null,e),node:e}}function V8(t,e){const n=e[0];return e.length===1&&Qu(n)&&!t.getFormatType()&&n.getFormatType()?(t.setFormat(n.getFormatType()),n.getChildren()):e}function ls(t){return Ui(new Oa(void 0,t))}function it(t){return t instanceof Oa}let xa=class extends $i{constructor(n="number",i=1,r){super(r);se(this,"__tag");se(this,"__start");se(this,"__listType");const s=eK[n]||n;this.__listType=s,this.__tag=s==="number"?"ol":"ul",this.__start=i}$config(){return this.config("list",{$transform:n=>{(function(i){const r=i.getNextSibling();Ke(r)&&i.getListType()===r.getListType()&&qw(i,r)})(n),Q8(n)},extends:$i,importDOM:{ol:()=>({conversion:QP,priority:0}),ul:()=>({conversion:QP,priority:0})}})}afterCloneFrom(n){super.afterCloneFrom(n),this.__listType=n.__listType,this.__tag=n.__tag,this.__start=n.__start}getTag(){return this.getLatest().__tag}setListType(n){const i=this.getWritable();return i.__listType=n,i.__tag=n==="number"?"ol":"ul",i}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(n){const i=this.getWritable();return i.__start=n,i}createDOM(n,i){const r=this.__tag,s=rn().createElement(r);return this.__start!==1&&s.setAttribute("start",String(this.__start)),s.__lexicalListType=this.__listType,DP(s,n.theme,this),s}updateDOM(n,i,r){return n.__tag!==this.__tag||n.__listType!==this.__listType||(DP(i,r.theme,this),n.__start!==this.__start&&i.setAttribute("start",String(this.__start)),!1)}updateFromJSON(n){return super.updateFromJSON(n).setListType(n.listType).setStart(n.start)}exportDOM(n){const i=this.createDOM(n._config,n);return Je(i)&&(this.__start!==1&&i.setAttribute("start",String(this.__start)),this.__listType==="check"&&i.setAttribute("__lexicalListType","check")),{element:i}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(n,i,r){let s=r;for(let o=0;o<r.length;o++){const a=r[o];it(a)||(s===r&&(s=[...r]),s[o]=this.createListItemNode().append(!W(a)||Ke(a)||a.isInline()?a:Vt(a.getTextContent())))}return super.splice(n,i,s)}extractWithChild(n){return it(n)}createListItemNode(){return ls()}};function DP(t,e,n){const i=[],r=[],s=e.list;if(s!==void 0){const o=s[`${n.__tag}Depth`]||[],a=Wd(n)-1,l=a%o.length,u=o[l],c=s[n.__tag];let h;const f=s.nested,p=s.checklist;if(f!==void 0&&f.list&&(h=f.list),c!==void 0&&i.push(c),p!==void 0&&n.__listType==="check"&&i.push(p),u!==void 0){i.push(...uo(u));for(let m=0;m<o.length;m++)m!==l&&r.push(n.__tag+m)}if(h!==void 0){const m=uo(h);a>1?i.push(...m):r.push(...m)}}r.length>0&&qp(t,...r),i.length>0&&as(t,...i)}function QP(t){let e;if((function(n){return Je(n)&&n.nodeName.toLowerCase()==="ol"})(t)){const n=t.start;e=rs("number",n)}else e=(function(n){if(n.getAttribute("__lexicallisttype")==="check"||n.classList.contains("contains-task-list")||n.getAttribute("data-is-checklist")==="1")return!0;for(const i of n.childNodes)if(Je(i)&&i.hasAttribute("aria-checked"))return!0;return!1})(t)?rs("check"):rs("bullet");return Mr(e,t),{after:n=>(function(i,r){const s=r.createListItemNode.bind(r),o=[];for(let a=0;a<i.length;a++){const l=i[a];if(it(l)){o.push(l);const u=l.getChildren();u.length>1&&u.forEach(c=>{Ke(c)&&o.push(s().append(c))})}else o.push(s().append(l))}return o})(n,e),node:e}}const eK={ol:"number",ul:"bullet"};function rs(t="number",e=1){return Ui(new xa(t,e))}function Ke(t){return t instanceof xa}const B8=Ue("INSERT_CHECK_LIST_COMMAND");function tK(t,e){const n=e&&e.disableTakeFocusOnClick||!1,i=typeof n=="boolean"?()=>n:n.peek.bind(n),r=u=>{const c=u.target;if(!Je(c))return!1;const h=c.__lexicalCheckListLastHandled;return h!==void 0&&u.timeStamp-h<500},s=u=>{const c=u.target;Je(c)&&(c.__lexicalCheckListLastHandled=u.timeStamp)},o=u=>{r(u)||(s(u),VP(u,i()))},a=u=>{u.pointerType==="touch"&&(r(u)||(s(u),VP(u,i())))},l=u=>{(function(c,h){F8(c,()=>{c.preventDefault(),h&&c.stopPropagation()})})(u,i())};return wn(t.registerCommand(B8,()=>(bS("check"),!0),Gt),t.registerCommand(c1,u=>BP(u,t,!1),Gt),t.registerCommand(u1,u=>BP(u,t,!0),Gt),t.registerCommand(Lh,()=>{if(SS(t)!=null){const u=t.getRootElement();return u!=null&&u.focus(),!0}return!1},Gt),t.registerCommand(h1,u=>{const c=SS(t);return!(c==null||!t.isEditable())&&(t.update(()=>{const h=os(c);it(h)&&(u.preventDefault(),h.toggleChecked())}),!0)},Gt),t.registerCommand(l1,u=>t.read("latest",()=>{const c=me();if(ae(c)&&c.isCollapsed()){const{anchor:h}=c,f=h.type==="element";if(f||h.offset===0){const p=h.getNode(),m=Lt(p,g=>W(g)&&!g.isInline());if(it(m)){const g=m.getParent();if(Ke(g)&&g.getListType()==="check"&&(f||m.getFirstDescendant()===p)){const x=t.getElementByKey(m.__key);if(x!=null&&ih(x)!==x)return x.focus(),u.preventDefault(),!0}}}}return!1}),Gt),t.registerRootListener(u=>{if(u!==null)return wn(iS(u,{click:o,pointerup:a}),iS(u,{mousedown:l,pointerdown:l},{capture:!0}),g1(u,"touchstart",l,{capture:!0,passive:!1}))}))}function F8(t,e){const n=t.target;if(!Je(n))return;const i=n.firstChild;if(Je(i)&&(i.tagName==="UL"||i.tagName==="OL"))return;const r=n.parentNode;if(!r||r.__lexicalListType!=="check")return;let s=null,o=null;if("clientX"in t)s=t.clientX;else if("touches"in t){const p=t.touches;p.length>0&&(s=p[0].clientX,o="touch")}if(s==null)return;const a=n.getBoundingClientRect(),l=s/JX(n),u=n.ownerDocument.defaultView,c=u?u.getComputedStyle(n,"::before"):{width:"0px"},h=parseFloat(c.width),f=o==="touch"||"pointerType"in t&&t.pointerType==="touch"?32:0;(n.dir==="rtl"?l<a.right+f&&l>a.right-h-f:l>a.left-f&&l<a.left+h+f)&&e()}function VP(t,e){F8(t,()=>{if(Je(t.target)){const n=t.target,i=Wa(n);i!=null&&i.isEditable()&&i.update(()=>{const r=os(n);it(r)&&(e?(Is(Ad),Is(QC)):n.focus(),r.toggleChecked())})}})}function SS(t){const e=t.getRootElement(),n=e?ih(e):null;return Je(n)&&n.tagName==="LI"&&n.parentNode!=null&&n.parentNode.__lexicalListType==="check"?n:null}function BP(t,e,n){const i=SS(e);return i!=null&&e.update(()=>{const r=os(i);if(!it(r))return;const s=(function(o,a){let l=a?o.getPreviousSibling():o.getNextSibling(),u=o;for(;l==null&&it(u);)u=u.getParentOrThrow().getParent(),u!=null&&(l=a?u.getPreviousSibling():u.getNextSibling());for(;it(l);){const c=a?l.getLastChild():l.getFirstChild();if(!Ke(c))return l;l=a?c.getLastChild():c.getFirstChild()}return null})(r,n);if(s!=null){s.selectStart();const o=e.getElementByKey(s.__key);o!=null&&(t.preventDefault(),setTimeout(()=>{o.focus()},0))}}),!1}function nK(t){const e=[];for(const n of t)if(it(n)){e.push(n);const i=n.getChildren();if(i.length>1)for(const r of i)Ke(r)&&e.push(ls().append(r))}else e.push(ls().append(n));return e}const iK={$import:(t,e)=>{let n;var i;return TR(e,"ol")?n=rs("number",e.start):n=(i=e).matches('[__lexicallisttype="check"], .contains-task-list, [data-is-checklist="1"]')||i.querySelector(":scope > [aria-checked]")!==null?rs("check"):rs("bullet"),Mr(n,e),[n.splice(0,0,$R(nK(t.$importChildren(e)),e))]},match:hi.tag("ol","ul"),name:"@lexical/list/list"};function j8(t,e){if(e.length!==1)return e;const n=e[0];return Qu(n)&&!t.getFormatType()&&n.getFormatType()?(t.setFormat(n.getFormatType()),n.getChildren()):e}function Z8(t){const e=o=>vw(o)&&!Ke(o);if(!t.some(e))return t;const n=[];let i=[];const r=()=>{i.length>0&&(n.push(i),i=[])};for(const o of t)e(o)?(r(),n.push(W(o)?o.getChildren():[o])):i.push(o);r();const s=[];for(const o of n)s.length>0&&s.push(Xi()),s.push(...o);return s}const rK={$import:(t,e)=>{const n=e.getAttribute("aria-checked"),i=ls(n==="true"||n!=="false"&&void 0);return Qs(i,e),Mr(i,e),[i.splice(0,0,Z8(j8(i,t.$importChildren(e))))]},match:hi.tag("li"),name:"@lexical/list/li"};function FP(t,e,n){const i=TR(n,"input")?n:n.querySelector('input[type="checkbox"]');if(!i||i.getAttribute("type")!=="checkbox")return[];const r=ls(i.hasAttribute("checked"));return Qs(r,e),Mr(r,e),[r.splice(0,0,Z8(j8(r,t.$importChildren(e))))]}hi.tag("li").classAll("task-list-item"),hi.tag("li").classAll("joplin-checkbox");const sK=Ue("UPDATE_LIST_START_COMMAND"),z8=Ue("INSERT_UNORDERED_LIST_COMMAND"),X8=Ue("INSERT_ORDERED_LIST_COMMAND"),W8=Ue("REMOVE_LIST_COMMAND");function jP(t,e){return wn(t.registerCommand(X8,()=>(bS("number"),!0),Gt),t.registerCommand(sK,n=>{const{listNodeKey:i,newStart:r}=n,s=st(i);return!!Ke(s)&&(s.getListType()==="number"&&(s.setStart(r),Q8(s)),!0)},Gt),t.registerCommand(z8,()=>(bS("bullet"),!0),Gt),t.registerCommand(W8,()=>(YG(),!0),Gt),t.registerCommand(Yc,()=>KG(!!(e&&e.restoreNumbering)),Gt),t.registerCommand(Nh,n=>{if((function(){const o=me();if(!ae(o)||!o.isCollapsed()||o.anchor.offset!==0)return!1;const a=o.anchor.getNode(),l=Lt(a,it);if(!it(l))return!1;const u=l.getFirstDescendant();if(u===null||!l.is(a)&&!u.is(a))return!1;const c=l.getParent();if(!Ke(c)||!l.is(c.getFirstChild()))return!1;const h=c.getPreviousSibling();if(!ht(h)||h.isIsolated()||!h.isKeyboardSelectable()&&h.isInline())return!1;const f=ut().append(...l.getChildren());return c.insertBefore(f),l.remove(),c.isEmpty()&&c.remove(),f.selectStart(),!0})())return n.preventDefault(),!0;const i=me();if(!ae(i)||!i.isCollapsed())return!1;const{anchor:r}=i;if(r.offset!==0)return!1;let s=r.getNode();for(;!it(s);){if(s.getPreviousSibling()!==null)return!1;const o=s.getParent();if(o===null)return!1;s=o}return!(!it(s)||!s.collapseAtStart(i))&&(n.preventDefault(),!0)},g4),t.registerNodeTransform(Oa,n=>{const i=n.getFirstChild();if(i){if(le(i)){const r=i.getStyle(),s=i.getFormat();n.getTextStyle()!==r&&n.setTextStyle(r),n.getTextFormat()!==s&&n.setTextFormat(s)}}else{const r=me();ae(r)&&(r.style!==n.getTextStyle()||r.format!==n.getTextFormat())&&r.isCollapsed()&&n.is(r.anchor.getNode())&&n.setTextStyle(r.style).setTextFormat(r.format)}}),t.registerNodeTransform(Rr,n=>{const i=n.getParent();if(it(i)&&n.is(i.getFirstChild())){const r=n.getStyle(),s=n.getFormat();r===i.getTextStyle()&&s===i.getTextFormat()||i.setTextStyle(r).setTextFormat(s)}}))}function oK(t){const e=n=>{const i=n.getParent();if(Ke(n.getFirstChild())||!Ke(i))return;const r=Lt(n,s=>it(s)&&Ke(s.getParent())&&it(s.getPreviousSibling()));if(r===null&&n.getIndent()>0)n.setIndent(0);else if(it(r)){const s=r.getPreviousSibling();if(it(s)){const o=(function(l){let u=l,c=u.getFirstChild();for(;Ke(c);){const h=c.getLastChild();if(!it(h))break;u=h,c=u.getFirstChild()}return u})(s),a=o.getParent();if(Ke(a)){const l=Wd(a);l+1<Wd(i)&&n.setIndent(l)}}}};return t.registerNodeTransform(xa,n=>{const i=[n];for(;i.length>0;){const r=i.shift();if(Ke(r)){for(const s of r.getChildren())if(it(s)){e(s);const o=s.getFirstChild();Ke(o)&&i.push(o)}}}})}const aK={testNode:"list",visitNode:function({mdastNode:t,lexicalParent:e,actions:n}){const i=t.children.some(s=>typeof s.checked=="boolean")?"check":t.ordered?"number":"bullet",r=rs(i);if(it(e)){const s=ls();s.append(r),e.insertAfter(s)}else e.append(r);n.visitChildren(t,r)}},lK={testNode:"listItem",visitNode({mdastNode:t,actions:e,lexicalParent:n}){const i=n.getListType()==="check"?t.checked??!1:void 0;e.addAndStepInto(ls(i))}},uK={testLexicalNode:Ke,visitLexicalNode:({lexicalNode:t,actions:e})=>{e.addAndStepInto("list",{ordered:t.getListType()==="number",spread:!1})}},cK={testLexicalNode:it,visitLexicalNode:({lexicalNode:t,mdastParent:e,actions:n})=>{const i=t.getChildren(),r=i[0];if(i.length===1&&Ke(r)){const s=e.children.at(-1);s?n.visitChildren(t,s):n.visitChildren(r,e)}else{const s=t.getParent(),o=n.appendToParent(e,{type:"listItem",checked:s.getListType()==="check"?!!t.getChecked():void 0,spread:!1,children:[]});let a=null;for(const l of t.getChildren())le(l)||Gn(l)||l.isInline()&&(W(l)||ht(l))?(a??(a=n.appendToParent(o,{type:"paragraph",children:[]})),n.visit(l,a)):(a=null,n.visit(l,o))}}};function ZP({maxIndent:t,$canIndent:e}){const[n]=qi();return R.useEffect(()=>xW(n,t,e),[n,t,e]),null}function zP({disableTakeFocusOnClick:t=!1}){const[e]=qi();return R.useEffect(()=>tK(e,{disableTakeFocusOnClick:t}),[e,t]),null}function XP({hasStrictIndent:t=!1,shouldPreserveNumbering:e=!1}){const[n]=qi();return R.useEffect(()=>{if(!n.hasNodes([xa,Oa]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[n]),R.useEffect(()=>wn(jP(n,{restoreNumbering:e}),t?oK(n):()=>{}),[n,t,e]),(function(i){R.useEffect(()=>jP(i),[i])})(n),null}const hK=new Map([["number",X8],["bullet",z8],["check",B8],["",W8]]),iO=Ee("",t=>{t.sub(t.pipe(bu,On(tn)),([e,n])=>{if(!e||!n)return;const i=e.anchor.getNode();let r=i.getKey()==="root"?i:Lt(i,a=>{const l=a.getParent();return l!==null&&It(l)});r??(r=i.getTopLevelElementOrThrow());const s=r.getKey();if(n.getElementByKey(s)!==null)if(Ke(r)){const a=oR(i,xa),l=a?a.getListType():r.getListType();t.pub(iO,l)}else t.pub(iO,"")})}),Yw=kn(t=>{t.sub(t.pipe(Yw,On(tn)),([e,n])=>{n==null||n.dispatchCommand(hK.get(e),void 0)})}),fK=Vn({init(t){var e;(e=t.getValue(mr))==null||e.registerCommand(Td,()=>!pK(7),cr),t.pubIn({[Uu]:"lists",[ol]:tZ(),[sl]:eZ(),[hr]:[aK,lK],[Nr]:[Oa,xa],[Lr]:[uK,cK],[Wu]:Jj(),[_l]:[ZP,XP,zP],[W1]:[ZP,XP,zP]})}});function dK(t){const e=t.getNodes();return e.length===0?new Set([t.anchor.getNode().getParentOrThrow(),t.focus.getNode().getParentOrThrow()]):new Set(e.map(n=>W(n)?n:n.getParentOrThrow()))}function pK(t){const e=me();if(!ae(e))return!1;const n=dK(e);let i=0;for(const r of n)if(Ke(r))i=Math.max(Wd(r)+1,i);else if(it(r)){const s=r.getParent();if((s==null?void 0:s.getChildren().length)===1){const o=s.getParent();if(it(o)&&o.getChildren().length===1)return!1}if(!Ke(s))throw new Error("ListMaxIndentLevelPlugin: A ListItemNode must have a ListNode for a parent.");i=Math.max(Wd(s)+1,i)}return i<=t}var mK=Object.defineProperty,Kh=(t,e)=>mK(t,"name",{value:e,configurable:!0}),H8=!!(typeof window<"u"&&window.document&&window.document.createElement);function Ot(t,e,{checkForDefaultPrevented:n=!0}={}){return Kh(function(r){if(t==null||t(r),n===!1||!r||!r.defaultPrevented)return e==null?void 0:e(r)},"handleEvent")}Kh(Ot,"composeEventHandlers");function gK(t){var e;if(!H8)throw new Error("Cannot access window outside of the DOM");return((e=t==null?void 0:t.ownerDocument)==null?void 0:e.defaultView)??window}Kh(gK,"getOwnerWindow");function _S(t){if(!H8)throw new Error("Cannot access document outside of the DOM");return(t==null?void 0:t.ownerDocument)??document}Kh(_S,"getOwnerDocument");function U8(t,e=!1){const{activeElement:n}=_S(t);if(!(n!=null&&n.nodeName))return null;if(q8(n)&&n.contentDocument)return U8(n.contentDocument.body,e);if(e){const i=n.getAttribute("aria-activedescendant");if(i){const r=_S(n).getElementById(i);if(r)return r}}return n}Kh(U8,"getActiveElement");function q8(t){return t.tagName==="IFRAME"}Kh(q8,"isFrame");var OK=Object.defineProperty,Gw=(t,e)=>OK(t,"name",{value:e,configurable:!0});function CS(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}Gw(CS,"setRef");function Y8(...t){return e=>{let n=!1;const i=t.map(r=>{const s=CS(r,e);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<i.length;r++){const s=i[r];typeof s=="function"?s():CS(t[r],null)}}}}Gw(Y8,"composeRefs");function cn(...t){return R.useCallback(Y8(...t),t)}Gw(cn,"useComposedRefs");var xK=Object.defineProperty,Xr=(t,e)=>xK(t,"name",{value:e,configurable:!0});function yK(t,e){const n=R.createContext(e);n.displayName=t+"Context";const i=Xr(s=>{const{children:o,...a}=s,l=R.useMemo(()=>a,Object.values(a));return Y.jsx(n.Provider,{value:l,children:o})},"Provider");i.displayName=t+"Provider";function r(s,o={}){const{optional:a=!1}=o,l=R.useContext(n);if(l)return l;if(e!==void 0)return e;if(!a)throw new Error(`\`${s}\` must be used within \`${t}\``)}return Xr(r,"useContext"),[i,r]}Xr(yK,"createContext");function Bs(t,e=[]){let n=[];function i(s,o){const a=R.createContext(o);a.displayName=s+"Context";const l=n.length;n=[...n,o];const u=Xr(h=>{var y;const{scope:f,children:p,...m}=h,g=((y=f==null?void 0:f[t])==null?void 0:y[l])||a,x=R.useMemo(()=>m,Object.values(m));return Y.jsx(g.Provider,{value:x,children:p})},"Provider");u.displayName=s+"Provider";function c(h,f,p={}){var y;const{optional:m=!1}=p,g=((y=f==null?void 0:f[t])==null?void 0:y[l])||a,x=R.useContext(g);if(x)return x;if(o!==void 0)return o;if(!m)throw new Error(`\`${h}\` must be used within \`${s}\``)}return Xr(c,"useContext"),[u,c]}Xr(i,"createContext");const r=Xr(()=>{const s=n.map(o=>R.createContext(o));return Xr(function(a){const l=(a==null?void 0:a[t])||s;return R.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])},"useScope")},"createScope");return r.scopeName=t,[i,G8(r,...e)]}Xr(Bs,"createContextScope");function G8(...t){const e=t[0];if(t.length===1)return e;const n=Xr(()=>{const i=t.map(r=>({useScope:r(),scopeName:r.scopeName}));return Xr(function(s){const o=i.reduce((a,{useScope:l,scopeName:u})=>{const h=l(s)[`__scope${u}`];return{...a,...h}},{});return R.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])},"useComposedScopes")},"createScope");return n.scopeName=e.scopeName,n}Xr(G8,"composeContextScopes");var vK=Object.defineProperty,Fs=(t,e)=>vK(t,"name",{value:e,configurable:!0});function ra(t){const e=R.forwardRef((n,i)=>{let{children:r,...s}=n,o=null,a=!1;const l=[];wS(r)&&typeof Km=="function"&&(r=Km(r._payload)),R.Children.forEach(r,f=>{var p;if(nM(f)){a=!0;const m=f;let g="child"in m.props?m.props.child:m.props.children;wS(g)&&typeof Km=="function"&&(g=Km(g._payload)),o=bK(m,g),l.push((p=o==null?void 0:o.props)==null?void 0:p.children)}else l.push(f)}),o?o=R.cloneElement(o,void 0,l):!a&&R.Children.count(r)===1&&R.isValidElement(r)&&(o=r);const u=o?tM(o):void 0,c=cn(i,u);if(!o){if(r||r===0)throw new Error(a?CK(t):_K(t));return r}const h=eM(s,o.props??{});return o.type!==R.Fragment&&(h.ref=i?c:u),R.cloneElement(o,h)});return e.displayName=`${t}.Slot`,e}Fs(ra,"createSlot");var K8=Symbol.for("radix.slottable");function J8(t){const e=Fs(n=>"child"in n?n.children(n.child):n.children,"Slottable");return e.displayName=`${t}.Slottable`,e.__radixId=K8,e}Fs(J8,"createSlottable");var bK=Fs((t,e)=>{if("child"in t.props){const n=t.props.child;return R.isValidElement(n)?R.cloneElement(n,void 0,t.props.children(n.props.children)):null}return R.isValidElement(e)?e:null},"getSlottableElementFromSlottable");function eM(t,e){const n={...e};for(const i in e){const r=t[i],s=e[i];/^on[A-Z]/.test(i)?r&&s?n[i]=(...a)=>{const l=s(...a);return r(...a),l}:r&&(n[i]=r):i==="style"?n[i]={...r,...s}:i==="className"&&(n[i]=[r,s].filter(Boolean).join(" "))}return{...t,...n}}Fs(eM,"mergeProps");function tM(t){var i,r;let e=(i=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(r=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}Fs(tM,"getElementRef");function nM(t){return R.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===K8}Fs(nM,"isSlottable");var SK=Symbol.for("react.lazy");function wS(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===SK&&"_payload"in t&&iM(t._payload)}Fs(wS,"isLazyComponent");function iM(t){return typeof t=="object"&&t!==null&&"then"in t}Fs(iM,"isPromiseLike");var _K=Fs(t=>`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),CK=Fs(t=>`${t} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Km=Eh[" use ".trim().toString()],wK=Object.defineProperty,kK=(t,e)=>wK(t,"name",{value:e,configurable:!0}),EK=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Wt=EK.reduce((t,e)=>{const n=ra(`Primitive.${e}`),i=R.forwardRef((r,s)=>{const{asChild:o,...a}=r,l=o?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),Y.jsx(l,{...a,ref:s})});return i.displayName=`Primitive.${e}`,{...t,[e]:i}},{});function rM(t,e){t&&au.flushSync(()=>t.dispatchEvent(e))}kK(rM,"dispatchDiscreteCustomEvent");var TK=Object.defineProperty,PK=(t,e)=>TK(t,"name",{value:e,configurable:!0});function Ms(t){const e=R.useRef(t);return R.useEffect(()=>{e.current=t}),R.useMemo(()=>((...n)=>{var i;return(i=e.current)==null?void 0:i.call(e,...n)}),[])}PK(Ms,"useCallbackRef");var AK=Object.defineProperty,ii=(t,e)=>AK(t,"name",{value:e,configurable:!0}),kS="dismissableLayer.update",$K="dismissableLayer.pointerDownOutside",IK="dismissableLayer.focusOutside",WP,sM=R.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),q1=R.forwardRef(ii(function(e,n){const{disableOutsidePointerEvents:i=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:l,onDismiss:u,...c}=e,h=R.useContext(sM),[f,p]=R.useState(null),m=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=R.useState({}),x=cn(n,p),y=Array.from(h.layers),[S]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),_=S?y.indexOf(S):-1,k=f?y.indexOf(f):-1,w=h.layersWithOutsidePointerEventsDisabled.size>0,b=k>=_,E=R.useRef(!1),P=aM(j=>{o==null||o(j),l==null||l(j),j.defaultPrevented||u==null||u()},{ownerDocument:m,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:E,dismissableSurfaces:h.dismissableSurfaces,shouldHandlePointerDownOutside:R.useCallback(j=>{if(!(j instanceof Node))return!1;const Z=[...h.branches].some(G=>G.contains(j));return b&&!Z},[h.branches,b])}),$=lM(j=>{if(r&&E.current)return;const Z=j.target;[...h.branches].some(z=>z.contains(Z))||(a==null||a(j),l==null||l(j),j.defaultPrevented||u==null||u())},m),B=f?k===y.length-1:!1,X=Ms(j=>{j.key==="Escape"&&(s==null||s(j),!j.defaultPrevented&&u&&(j.preventDefault(),u()))});return R.useEffect(()=>{if(B)return m.addEventListener("keydown",X,{capture:!0}),()=>m.removeEventListener("keydown",X,{capture:!0})},[m,B,X]),R.useEffect(()=>{if(f)return i&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(WP=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(f)),h.layers.add(f),ES(),()=>{i&&(h.layersWithOutsidePointerEventsDisabled.delete(f),h.layersWithOutsidePointerEventsDisabled.size===0&&(m.body.style.pointerEvents=WP))}},[f,m,i,h]),R.useEffect(()=>()=>{f&&(h.layers.delete(f),h.layersWithOutsidePointerEventsDisabled.delete(f),ES())},[f,h]),R.useEffect(()=>{const j=ii(()=>g({}),"handleUpdate");return document.addEventListener(kS,j),()=>document.removeEventListener(kS,j)},[]),Y.jsx(Wt.div,{...c,ref:x,style:{pointerEvents:w?b?"auto":"none":void 0,...e.style},onFocusCapture:Ot(e.onFocusCapture,$.onFocusCapture),onBlurCapture:Ot(e.onBlurCapture,$.onBlurCapture),onPointerDownCapture:Ot(e.onPointerDownCapture,P.onPointerDownCapture)})},"DismissableLayer"));function oM(){const t=R.useContext(sM),[e,n]=R.useState(null);return R.useEffect(()=>{if(e)return t.dismissableSurfaces.add(e),()=>{t.dismissableSurfaces.delete(e)}},[e,t.dismissableSurfaces]),n}ii(oM,"useDismissableLayerSurface");var RK=ii(()=>!0,"IS_TRUE");function aM(t,e){const{ownerDocument:n=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:i=!1,isDeferredPointerDownOutsideRef:r,dismissableSurfaces:s,shouldHandlePointerDownOutside:o=RK}=e,a=Ms(t),l=R.useRef(!1),u=R.useRef(!1),c=R.useRef(new Map),h=R.useRef(()=>{});return R.useEffect(()=>{function f(){u.current=!1,r.current=!1,c.current.clear()}ii(f,"resetOutsideInteraction");function p(){return Array.from(c.current.values()).some(Boolean)}ii(p,"isOutsideInteractionIntercepted");function m(_){if(!u.current)return;const k=_.target;k instanceof Node&&[...s].some(b=>b.contains(k))||c.current.set(_.type,!0),_.type==="click"&&window.setTimeout(()=>{u.current&&h.current()},0)}ii(m,"handleInteractionCapture");function g(_){u.current&&c.current.set(_.type,!1)}ii(g,"handleInteractionBubble");const x=ii(_=>{if(_.target&&!l.current){let k=function(){n.removeEventListener("click",h.current);const b=p();f(),b||Kw($K,a,w,{discrete:!0})};if(ii(k,"handleAndDispatchPointerDownOutsideEvent"),!o(_.target)){n.removeEventListener("click",h.current),f(),l.current=!1;return}const w={originalEvent:_};u.current=!0,r.current=i&&_.button===0,c.current.clear(),!i||_.button!==0?k():(n.removeEventListener("click",h.current),h.current=k,n.addEventListener("click",h.current,{once:!0}))}else n.removeEventListener("click",h.current),f();l.current=!1},"handlePointerDown"),y=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const _ of y)n.addEventListener(_,m,!0),n.addEventListener(_,g);const S=window.setTimeout(()=>{n.addEventListener("pointerdown",x)},0);return()=>{window.clearTimeout(S),n.removeEventListener("pointerdown",x),n.removeEventListener("click",h.current);for(const _ of y)n.removeEventListener(_,m,!0),n.removeEventListener(_,g)}},[n,a,i,r,s,o]),{onPointerDownCapture:ii(()=>l.current=!0,"onPointerDownCapture")}}ii(aM,"usePointerDownOutside");function lM(t,e=globalThis==null?void 0:globalThis.document){const n=Ms(t),i=R.useRef(!1);return R.useEffect(()=>{const r=ii(s=>{s.target&&!i.current&&Kw(IK,n,{originalEvent:s},{discrete:!1})},"handleFocus");return e.addEventListener("focusin",r),()=>e.removeEventListener("focusin",r)},[e,n]),{onFocusCapture:ii(()=>i.current=!0,"onFocusCapture"),onBlurCapture:ii(()=>i.current=!1,"onBlurCapture")}}ii(lM,"useFocusOutside");function ES(){const t=new CustomEvent(kS);document.dispatchEvent(t)}ii(ES,"dispatchUpdate");function Kw(t,e,n,{discrete:i}){const r=n.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&r.addEventListener(t,e,{once:!0}),i?rM(r,s):r.dispatchEvent(s)}ii(Kw,"handleAndDispatchCustomEvent");var MK=Object.defineProperty,Jw=(t,e)=>MK(t,"name",{value:e,configurable:!0}),Jm=0,Ws=null;function NK(t){return im(),t.children}Jw(NK,"FocusGuards");function im(){R.useEffect(()=>{Ws||(Ws={start:TS(),end:TS()});const{start:t,end:e}=Ws;return document.body.firstElementChild!==t&&document.body.insertAdjacentElement("afterbegin",t),document.body.lastElementChild!==e&&document.body.insertAdjacentElement("beforeend",e),Jm++,()=>{Jm===1&&(Ws==null||Ws.start.remove(),Ws==null||Ws.end.remove(),Ws=null),Jm=Math.max(0,Jm-1)}},[])}Jw(im,"useFocusGuards");function TS(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}Jw(TS,"createFocusGuard");var LK=Object.defineProperty,ji=(t,e)=>LK(t,"name",{value:e,configurable:!0}),_y="focusScope.autoFocusOnMount",Cy="focusScope.autoFocusOnUnmount",HP={bubbles:!1,cancelable:!0},e2=R.forwardRef(ji(function(e,n){const{loop:i=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...a}=e,[l,u]=R.useState(null),c=Ms(s),h=Ms(o),f=R.useRef(null),p=cn(n,u),m=R.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;R.useEffect(()=>{if(r){let x=function(k){if(m.paused||!l)return;const w=k.target;l.contains(w)?f.current=w:Ro(f.current,{select:!0})},y=function(k){if(m.paused||!l)return;const w=k.relatedTarget;w!==null&&(l.contains(w)||Ro(f.current,{select:!0}))},S=function(k){if(document.activeElement===document.body)for(const b of k)b.removedNodes.length>0&&Ro(l)};ji(x,"handleFocusIn"),ji(y,"handleFocusOut"),ji(S,"handleMutations"),document.addEventListener("focusin",x),document.addEventListener("focusout",y);const _=new MutationObserver(S);return l&&_.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",y),_.disconnect()}}},[r,l,m.paused]),R.useEffect(()=>{if(l){UP.add(m);const x=document.activeElement;if(!l.contains(x)){const S=new CustomEvent(_y,HP);l.addEventListener(_y,c),l.dispatchEvent(S),S.defaultPrevented||(uM(pM(t2(l)),{select:!0}),document.activeElement===x&&Ro(l))}return()=>{l.removeEventListener(_y,c),setTimeout(()=>{const S=new CustomEvent(Cy,HP);l.addEventListener(Cy,h),l.dispatchEvent(S),S.defaultPrevented||Ro(x??document.body,{select:!0}),l.removeEventListener(Cy,h),UP.remove(m)},0)}}},[l,c,h,m]);const g=R.useCallback(x=>{if(!i&&!r||m.paused)return;const y=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,S=document.activeElement;if(y&&S){const _=x.currentTarget,[k,w]=cM(_);k&&w?!x.shiftKey&&S===w?(x.preventDefault(),i&&Ro(k,{select:!0})):x.shiftKey&&S===k&&(x.preventDefault(),i&&Ro(w,{select:!0})):S===_&&x.preventDefault()}},[i,r,m.paused]);return Y.jsx(Wt.div,{tabIndex:-1,...a,ref:p,onKeyDown:g})},"FocusScope"));function uM(t,{select:e=!1}={}){const n=document.activeElement;for(const i of t)if(Ro(i,{select:e}),document.activeElement!==n)return}ji(uM,"focusFirst");function cM(t){const e=t2(t),n=PS(e,t),i=PS(e.reverse(),t);return[n,i]}ji(cM,"getTabbableEdges");function t2(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:ji(i=>{const r=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||r?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)e.push(n.currentNode);return e}ji(t2,"getTabbableCandidates");function PS(t,e){const n=typeof e.checkVisibility=="function"&&e.checkVisibility({checkVisibilityCSS:!0});for(const i of t)if(!(n?!i.checkVisibility({checkVisibilityCSS:!0}):hM(i,{upTo:e})))return i}ji(PS,"findVisible");function hM(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}ji(hM,"isHidden");function fM(t){return t instanceof HTMLInputElement&&"select"in t}ji(fM,"isSelectableInput");function Ro(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&fM(t)&&e&&t.select()}}ji(Ro,"focus");var UP=dM();function dM(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=AS(t,e),t.unshift(e)},remove(e){var n;t=AS(t,e),(n=t[0])==null||n.resume()}}}ji(dM,"createFocusScopesStack");function AS(t,e){const n=[...t],i=n.indexOf(e);return i!==-1&&n.splice(i,1),n}ji(AS,"arrayRemove");function pM(t){return t.filter(e=>e.tagName!=="A")}ji(pM,"removeLinks");var ci=globalThis!=null&&globalThis.document?R.useLayoutEffect:()=>{},DK=Object.defineProperty,QK=(t,e)=>DK(t,"name",{value:e,configurable:!0}),VK=Eh[" useId ".trim().toString()]||(()=>{}),BK=0;function Wo(t){const[e,n]=R.useState(VK());return ci(()=>{t||n(i=>i??String(BK++))},[t]),t||(e?`radix-${e}`:"")}QK(Wo,"useId");var FK=Object.defineProperty,jK=(t,e)=>FK(t,"name",{value:e,configurable:!0}),ZK=R.forwardRef(jK(function(e,n){const{children:i,width:r=10,height:s=5,...o}=e;return Y.jsx(Wt.svg,{...o,ref:n,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?i:Y.jsx("polygon",{points:"0,0 30,0 15,10"})})},"Arrow")),zK=ZK,XK=Object.defineProperty,WK=(t,e)=>XK(t,"name",{value:e,configurable:!0});function mM(t){const[e,n]=R.useState(void 0);return ci(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const i=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let o,a;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,a=u.blockSize}else o=t.offsetWidth,a=t.offsetHeight;n({width:o,height:a})});return i.observe(t,{box:"border-box"}),()=>i.unobserve(t)}else n(void 0)},[t]),e}WK(mM,"useSize");var HK=Object.defineProperty,Ho=(t,e)=>HK(t,"name",{value:e,configurable:!0}),gM="Popper",[OM,Jh]=Bs(gM),[UK,xM]=OM(gM),qK=Ho(t=>{const{__scopePopper:e,children:n}=t,[i,r]=R.useState(null),[s,o]=R.useState(void 0);return Y.jsx(UK,{scope:e,anchor:i,onAnchorChange:r,placementState:s,setPlacementState:o,children:n})},"Popper"),YK="PopperAnchor",GK=R.forwardRef(Ho(function(e,n){const{__scopePopper:i,virtualRef:r,...s}=e,o=xM(YK,i),a=R.useRef(null),l=o.onAnchorChange,u=R.useCallback(g=>{a.current=g,g&&l(g)},[l]),c=cn(n,u),h=R.useRef(null);R.useEffect(()=>{if(!r)return;const g=h.current;h.current=r.current,g!==h.current&&l(h.current)});const f=o.placementState&&Y1(o.placementState),p=f==null?void 0:f[0],m=f==null?void 0:f[1];return r?null:Y.jsx(Wt.div,{"data-radix-popper-side":p,"data-radix-popper-align":m,...s,ref:c})},"PopperAnchor")),yM="PopperContent",[KK,JK]=OM(yM),eJ=R.forwardRef(Ho(function(e,n){var ge,Ve,Ze,Ge,et,Qt,wt;const{__scopePopper:i,side:r="bottom",sideOffset:s=0,align:o="center",alignOffset:a=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:c=[],collisionPadding:h=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:g,...x}=e,y=xM(yM,i),[S,_]=R.useState(null),k=cn(n,_),[w,b]=R.useState(null),E=mM(w),P=(E==null?void 0:E.width)??0,$=(E==null?void 0:E.height)??0,B=r+(o!=="center"?"-"+o:""),X=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},j=Array.isArray(c)?c:[c],Z=j.length>0,G={padding:X,boundary:j.filter(vM),altBoundary:Z},{refs:z,floatingStyles:J,placement:ue,isPositioned:Le,middlewareData:ye}=uZ({strategy:"fixed",placement:B,whileElementsMounted:Ho((...Ut)=>OZ(...Ut,{animationFrame:m==="always"}),"whileElementsMounted"),elements:{reference:y.anchor},middleware:[cZ({mainAxis:s+$,alignmentAxis:a}),u&&hZ({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?gZ():void 0,...G}),u&&fZ({...G}),dZ({...G,apply:Ho(({elements:Ut,rects:xt,availableWidth:dn,availableHeight:En})=>{const{width:Tn,height:pn}=xt.reference,An=Ut.floating.style;An.setProperty("--radix-popper-available-width",`${dn}px`),An.setProperty("--radix-popper-available-height",`${En}px`),An.setProperty("--radix-popper-anchor-width",`${Tn}px`),An.setProperty("--radix-popper-anchor-height",`${pn}px`)},"apply")}),w&&pZ({element:w,padding:l}),rJ({arrowWidth:P,arrowHeight:$}),p&&mZ({strategy:"referenceHidden",...G,boundary:Z?G.boundary:void 0})]}),xe=y.setPlacementState;ci(()=>(xe(ue),()=>{xe(void 0)}),[ue,xe]);const[Re,Ae]=Y1(ue),Be=Ms(g);ci(()=>{Le&&(Be==null||Be())},[Le,Be]);const lt=(ge=ye.arrow)==null?void 0:ge.x,qe=(Ve=ye.arrow)==null?void 0:Ve.y,je=((Ze=ye.arrow)==null?void 0:Ze.centerOffset)!==0,[we,pe]=R.useState();return ci(()=>{S&&pe(window.getComputedStyle(S).zIndex)},[S]),Y.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...J,transform:Le?J.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:we,"--radix-popper-transform-origin":[(Ge=ye.transformOrigin)==null?void 0:Ge.x,(et=ye.transformOrigin)==null?void 0:et.y].join(" "),...((Qt=ye.hide)==null?void 0:Qt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:Y.jsx(KK,{scope:i,placedSide:Re,placedAlign:Ae,onArrowChange:b,arrowX:lt,arrowY:qe,shouldHideArrow:je,children:Y.jsx(Wt.div,{"data-side":Re,"data-align":Ae,...x,ref:k,style:{...x.style,animation:Le?(wt=x.style)==null?void 0:wt.animation:"none"}})})})},"PopperContent")),tJ="PopperArrow",nJ={top:"bottom",right:"left",bottom:"top",left:"right"},iJ=R.forwardRef(Ho(function(e,n){const{__scopePopper:i,...r}=e,s=JK(tJ,i),o=nJ[s.placedSide];return Y.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:Y.jsx(zK,{...r,ref:n,style:{...r.style,display:"block"}})})},"PopperArrow"));function vM(t){return t!==null}Ho(vM,"isNotNull");var rJ=Ho(t=>({name:"transformOrigin",options:t,fn(e){var x,y,S;const{placement:n,rects:i,middlewareData:r}=e,o=((x=r.arrow)==null?void 0:x.centerOffset)!==0,a=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[u,c]=Y1(n),h={start:"0%",center:"50%",end:"100%"}[c],f=(((y=r.arrow)==null?void 0:y.x)??0)+a/2,p=(((S=r.arrow)==null?void 0:S.y)??0)+l/2;let m="",g="";return u==="bottom"?(m=o?h:`${f}px`,g=`${-l}px`):u==="top"?(m=o?h:`${f}px`,g=`${i.floating.height+l}px`):u==="right"?(m=`${-l}px`,g=o?h:`${p}px`):u==="left"&&(m=`${i.floating.width+l}px`,g=o?h:`${p}px`),{data:{x:m,y:g}}}}),"transformOrigin");function Y1(t){const[e,n="center"]=t.split("-");return[e,n]}Ho(Y1,"getSideAndAlignFromPlacement");var n2=qK,G1=GK,i2=eJ,bM=iJ,sJ=Object.defineProperty,oJ=(t,e)=>sJ(t,"name",{value:e,configurable:!0}),K1=R.forwardRef(oJ(function(e,n){var l;const{container:i,...r}=e,[s,o]=R.useState(!1);ci(()=>o(!0),[]);const a=i||s&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return a?au.createPortal(Y.jsx(Wt.div,{...r,ref:n}),a):null},"Portal")),aJ=Object.defineProperty,sa=(t,e)=>aJ(t,"name",{value:e,configurable:!0});function SM(t,e){return R.useReducer((n,i)=>e[n][i]??n,t)}sa(SM,"useStateMachine");var Cl=sa(t=>{const{present:e,children:n}=t,i=_M(e),r=typeof n=="function"?n({present:i.isPresent}):R.Children.only(n),s=CM(i.ref,wM(r));return typeof n=="function"||i.isPresent?R.cloneElement(r,{ref:s}):null},"Presence");function _M(t){const[e,n]=R.useState(),i=R.useRef(null),r=R.useRef(t),s=R.useRef("none"),o=R.useRef(void 0),a=t?"mounted":"unmounted",[l,u]=SM(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return R.useEffect(()=>{l==="mounted"?(s.current=o.current??mc(i.current),o.current=void 0):s.current="none"},[l]),ci(()=>{const c=i.current,h=r.current;if(h!==t){const p=s.current,m=mc(c);t?(o.current=m,u("MOUNT")):m==="none"||(c==null?void 0:c.display)==="none"?u("UNMOUNT"):u(h&&p!==m?"ANIMATION_OUT":"UNMOUNT"),r.current=t}},[t,u]),ci(()=>{if(e){let c;const h=e.ownerDocument.defaultView??window,f=sa(m=>{const x=mc(i.current).includes(CSS.escape(m.animationName));if(m.target===e&&x&&(u("ANIMATION_END"),!r.current)){const y=e.style.animationFillMode;e.style.animationFillMode="forwards",c=h.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=y)})}},"handleAnimationEnd"),p=sa(m=>{m.target===e&&(s.current=mc(i.current))},"handleAnimationStart");return e.addEventListener("animationstart",p),e.addEventListener("animationcancel",f),e.addEventListener("animationend",f),()=>{h.clearTimeout(c),e.removeEventListener("animationstart",p),e.removeEventListener("animationcancel",f),e.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[e,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:R.useCallback(c=>{if(c){const h=getComputedStyle(c);i.current=h,o.current=mc(h)}else i.current=null;n(c)},[])}}sa(_M,"usePresence");function $S(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}sa($S,"setRef");function CM(...t){const e=R.useRef(t);return e.current=t,R.useCallback(n=>{const i=e.current;let r=!1;const s=i.map(o=>{const a=$S(o,n);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<s.length;o++){const a=s[o];typeof a=="function"?a():$S(i[o],null)}}},[])}sa(CM,"useStableComposedRefs");function mc(t){return(t==null?void 0:t.animationName)||"none"}sa(mc,"getAnimationName");function wM(t){var i,r;let e=(i=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(r=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}sa(wM,"getElementRef");var lJ=Object.defineProperty,uJ=(t,e)=>lJ(t,"name",{value:e,configurable:!0}),qP=Eh[" useEffectEvent ".trim().toString()],YP=Eh[" useInsertionEffect ".trim().toString()];function kM(t){if(typeof qP=="function")return qP(t);const e=R.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof YP=="function"?YP(()=>{e.current=t}):ci(()=>{e.current=t}),R.useMemo(()=>((...n)=>{var i;return(i=e.current)==null?void 0:i.call(e,...n)}),[])}uJ(kM,"useEffectEvent");var cJ=Object.defineProperty,rm=(t,e)=>cJ(t,"name",{value:e,configurable:!0}),hJ=Eh[" useInsertionEffect ".trim().toString()]||ci;function Oo({prop:t,defaultProp:e,onChange:n=rm(()=>{},"onChange"),caller:i}){const[r,s,o]=EM({defaultProp:e,onChange:n}),a=t!==void 0,l=a?t:r,u=R.useCallback(c=>{var h;if(a){const f=TM(c)?c(t):c;f!==t&&((h=o.current)==null||h.call(o,f))}else s(c)},[a,t,s,o]);return[l,u]}rm(Oo,"useControllableState");function EM({defaultProp:t,onChange:e}){const[n,i]=R.useState(t),r=R.useRef(n),s=R.useRef(e);return hJ(()=>{s.current=e},[e]),R.useEffect(()=>{var o;r.current!==n&&((o=s.current)==null||o.call(s,n),r.current=n)},[n,r]),[n,i,s]}rm(EM,"useUncontrolledState");function TM(t){return typeof t=="function"}rm(TM,"isFunction");var GP=Symbol("RADIX:SYNC_STATE");function fJ(t,e,n,i){const{prop:r,defaultProp:s,onChange:o,caller:a}=e,l=r!==void 0,u=kM(o),c=[{...n,state:s}];i&&c.push(i);const[h,f]=R.useReducer((x,y)=>{if(y.type===GP)return{...x,state:y.state};const S=t(x,y);return l&&!Object.is(S.state,x.state)&&u(S.state),S},...c),p=h.state,m=R.useRef(p);R.useEffect(()=>{m.current!==p&&(m.current=p,l||u(p))},[p,m,l]);const g=R.useMemo(()=>r!==void 0?{...h,state:r}:h,[h,r]);return R.useEffect(()=>{l&&!Object.is(r,h.state)&&f({type:GP,state:r})},[r,h.state,l]),[g,f]}rm(fJ,"useControllableStateReducer");var dJ=Object.defineProperty,bo=(t,e)=>dJ(t,"name",{value:e,configurable:!0}),r2="Popover",[PM,d1e]=Bs(r2,[Jh]),sm=Jh(),[pJ,qu]=PM(r2),mJ=bo(t=>{const{__scopePopover:e,children:n,open:i,defaultOpen:r,onOpenChange:s,modal:o=!1}=t,a=sm(e),l=R.useRef(null),[u,c]=R.useState(!1),[h,f]=Oo({prop:i,defaultProp:r??!1,onChange:s,caller:r2});return Y.jsx(n2,{...a,children:Y.jsx(pJ,{scope:e,contentId:Wo(),triggerRef:l,open:h,onOpenChange:f,onOpenToggle:R.useCallback(()=>f(p=>!p),[f]),hasCustomAnchor:u,onCustomAnchorAdd:R.useCallback(()=>c(!0),[]),onCustomAnchorRemove:R.useCallback(()=>c(!1),[]),modal:o,children:n})})},"Popover"),gJ="PopoverAnchor",OJ=R.forwardRef(bo(function(e,n){const{__scopePopover:i,...r}=e,s=qu(gJ,i),o=sm(i),{onCustomAnchorAdd:a,onCustomAnchorRemove:l}=s;return R.useEffect(()=>(a(),()=>l()),[a,l]),Y.jsx(G1,{...o,...r,ref:n})},"PopoverAnchor")),xJ="PopoverTrigger",s2=R.forwardRef(bo(function(e,n){const{__scopePopover:i,...r}=e,s=qu(xJ,i),o=sm(i),a=cn(n,s.triggerRef),l=Y.jsx(Wt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":a2(s.open),...r,ref:a,onClick:Ot(e.onClick,s.onOpenToggle)});return s.hasCustomAnchor?l:Y.jsx(G1,{asChild:!0,...o,children:l})},"PopoverTrigger")),AM="PopoverPortal",[yJ,vJ]=PM(AM,{forceMount:void 0}),bJ=bo(t=>{const{__scopePopover:e,forceMount:n,children:i,container:r}=t,s=qu(AM,e);return Y.jsx(yJ,{scope:e,forceMount:n,children:Y.jsx(Cl,{present:n||s.open,children:Y.jsx(K1,{asChild:!0,container:r,children:i})})})},"PopoverPortal"),Hd="PopoverContent",o2=R.forwardRef(bo(function(e,n){const i=vJ(Hd,e.__scopePopover),{forceMount:r=i.forceMount,...s}=e,o=qu(Hd,e.__scopePopover);return Y.jsx(Cl,{present:r||o.open,children:o.modal?Y.jsx(_J,{...s,ref:n}):Y.jsx(CJ,{...s,ref:n})})},"PopoverContent")),SJ=ra("PopoverContent.RemoveScroll"),_J=R.forwardRef(bo(function(e,n){const i=qu(Hd,e.__scopePopover),r=R.useRef(null),s=cn(n,r),o=R.useRef(!1);return R.useEffect(()=>{const a=r.current;if(a)return fC(a)},[]),Y.jsx(dC,{as:SJ,allowPinchZoom:!0,children:Y.jsx($M,{...e,ref:s,trapFocus:i.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ot(e.onCloseAutoFocus,a=>{var l;a.preventDefault(),o.current||(l=i.triggerRef.current)==null||l.focus()}),onPointerDownOutside:Ot(e.onPointerDownOutside,a=>{const l=a.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,c=l.button===2||u;o.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:Ot(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),CJ=R.forwardRef(bo(function(e,n){const i=qu(Hd,e.__scopePopover),r=R.useRef(!1),s=R.useRef(!1);return Y.jsx($M,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var a,l;(a=e.onCloseAutoFocus)==null||a.call(e,o),o.defaultPrevented||(r.current||(l=i.triggerRef.current)==null||l.focus(),o.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:o=>{var u,c;(u=e.onInteractOutside)==null||u.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=o.target;((c=i.triggerRef.current)==null?void 0:c.contains(a))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})},"PopoverContentNonModal")),$M=R.forwardRef(bo(function(e,n){const{__scopePopover:i,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:c,onInteractOutside:h,...f}=e,p=qu(Hd,i),m=sm(i);return im(),Y.jsx(e2,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:o,children:Y.jsx(q1,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:c,onDismiss:()=>p.onOpenChange(!1),deferPointerDownOutside:!0,children:Y.jsx(i2,{"data-state":a2(p.open),role:"dialog",id:p.contentId,...m,...f,ref:n,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})},"PopoverContentImpl")),wJ=R.forwardRef(bo(function(e,n){const{__scopePopover:i,...r}=e,s=sm(i);return Y.jsx(bM,{...s,...r,ref:n})},"PopoverArrow"));function a2(t){return t?"open":"closed"}bo(a2,"getState");var J1=mJ,kJ=OJ,EJ=s2,ex=bJ,IM=o2,tx=wJ,TJ=Object.defineProperty,si=(t,e)=>TJ(t,"name",{value:e,configurable:!0});function l2(t){const e=t+"CollectionProvider",[n,i]=Bs(e),[r,s]=n(e,{collectionRef:{current:null},itemMap:new Map}),o=si(g=>{const{scope:x,children:y}=g,S=R.useRef(null),_=R.useRef(new Map).current;return Y.jsx(r,{scope:x,itemMap:_,collectionRef:S,children:y})},"CollectionProvider");o.displayName=e;const a=t+"CollectionSlot",l=ra(a),u=R.forwardRef((g,x)=>{const{scope:y,children:S}=g,_=s(a,y),k=cn(x,_.collectionRef);return Y.jsx(l,{ref:k,children:S})});u.displayName=a;const c=t+"CollectionItemSlot",h="data-radix-collection-item",f=ra(c),p=R.forwardRef((g,x)=>{const{scope:y,children:S,..._}=g,k=R.useRef(null),w=cn(x,k),b=s(c,y);return R.useEffect(()=>(b.itemMap.set(k,{ref:k,..._}),()=>void b.itemMap.delete(k))),Y.jsx(f,{[h]:"",ref:w,children:S})});p.displayName=c;function m(g){const x=s(t+"CollectionConsumer",g);return R.useCallback(()=>{const S=x.collectionRef.current;if(!S)return[];const _=Array.from(S.querySelectorAll(`[${h}]`));return Array.from(x.itemMap.values()).sort((b,E)=>_.indexOf(b.ref.current)-_.indexOf(E.ref.current))},[x.collectionRef,x.itemMap])}return si(m,"useCollection"),[{Provider:o,Slot:u,ItemSlot:p},m,i]}si(l2,"createCollection");var KP=new WeakMap,Bn,Sr,wy=(Sr=class extends Map{constructor(n){super(n);kE(this,Bn);Kx(this,Bn,[...super.keys()]),KP.set(this,!0)}set(n,i){return KP.get(this)&&(this.has(n)?wi(this,Bn)[wi(this,Bn).indexOf(n)]=n:wi(this,Bn).push(n)),super.set(n,i),this}insert(n,i,r){const s=this.has(i),o=wi(this,Bn).length,a=u2(n);let l=a>=0?a:o+a;const u=l<0||l>=o?-1:l;if(u===this.size||s&&u===this.size-1||u===-1)return this.set(i,r),this;const c=this.size+(s?0:1);a<0&&l++;const h=[...wi(this,Bn)];let f,p=!1;for(let m=l;m<c;m++)if(l===m){let g=h[m];h[m]===i&&(g=h[m+1]),s&&this.delete(i),f=this.get(g),this.set(i,r)}else{!p&&h[m-1]===i&&(p=!0);const g=h[p?m:m-1],x=f;f=this.get(g),this.delete(g),this.set(g,x)}return this}with(n,i,r){const s=new Sr(this);return s.insert(n,i,r),s}before(n){const i=wi(this,Bn).indexOf(n)-1;if(!(i<0))return this.entryAt(i)}setBefore(n,i,r){const s=wi(this,Bn).indexOf(n);return s===-1?this:this.insert(s,i,r)}after(n){let i=wi(this,Bn).indexOf(n);if(i=i===-1||i===this.size-1?-1:i+1,i!==-1)return this.entryAt(i)}setAfter(n,i,r){const s=wi(this,Bn).indexOf(n);return s===-1?this:this.insert(s+1,i,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return Kx(this,Bn,[]),super.clear()}delete(n){const i=super.delete(n);return i&&wi(this,Bn).splice(wi(this,Bn).indexOf(n),1),i}deleteAt(n){const i=this.keyAt(n);return i!==void 0?this.delete(i):!1}at(n){const i=n0(wi(this,Bn),n);if(i!==void 0)return this.get(i)}entryAt(n){const i=n0(wi(this,Bn),n);if(i!==void 0)return[i,this.get(i)]}indexOf(n){return wi(this,Bn).indexOf(n)}keyAt(n){return n0(wi(this,Bn),n)}from(n,i){const r=this.indexOf(n);if(r===-1)return;let s=r+i;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.at(s)}keyFrom(n,i){const r=this.indexOf(n);if(r===-1)return;let s=r+i;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.keyAt(s)}find(n,i){let r=0;for(const s of this){if(Reflect.apply(n,i,[s,r,this]))return s;r++}}findIndex(n,i){let r=0;for(const s of this){if(Reflect.apply(n,i,[s,r,this]))return r;r++}return-1}filter(n,i){const r=[];let s=0;for(const o of this)Reflect.apply(n,i,[o,s,this])&&r.push(o),s++;return new Sr(r)}map(n,i){const r=[];let s=0;for(const o of this)r.push([o[0],Reflect.apply(n,i,[o,s,this])]),s++;return new Sr(r)}reduce(...n){const[i,r]=n;let s=0,o=r??this.at(0);for(const a of this)s===0&&n.length===1?o=a:o=Reflect.apply(i,this,[o,a,s,this]),s++;return o}reduceRight(...n){const[i,r]=n;let s=r??this.at(-1);for(let o=this.size-1;o>=0;o--){const a=this.at(o);o===this.size-1&&n.length===1?s=a:s=Reflect.apply(i,this,[s,a,o,this])}return s}toSorted(n){const i=[...this.entries()].sort(n);return new Sr(i)}toReversed(){const n=new Sr;for(let i=this.size-1;i>=0;i--){const r=this.keyAt(i),s=this.get(r);n.set(r,s)}return n}toSpliced(...n){const i=[...this.entries()];return i.splice(...n),new Sr(i)}slice(n,i){const r=new Sr;let s=this.size-1;if(n===void 0)return r;n<0&&(n=n+this.size),i!==void 0&&i>0&&(s=i-1);for(let o=n;o<=s;o++){const a=this.keyAt(o),l=this.get(a);r.set(a,l)}return r}every(n,i){let r=0;for(const s of this){if(!Reflect.apply(n,i,[s,r,this]))return!1;r++}return!0}some(n,i){let r=0;for(const s of this){if(Reflect.apply(n,i,[s,r,this]))return!0;r++}return!1}},Bn=new WeakMap,si(Sr,"OrderedDict"),Sr);function n0(t,e){if("at"in Array.prototype)return Array.prototype.at.call(t,e);const n=RM(t,e);return n===-1?void 0:t[n]}si(n0,"at");function RM(t,e){const n=t.length,i=u2(e),r=i>=0?i:n+i;return r<0||r>=n?-1:r}si(RM,"toSafeIndex");function u2(t){return t!==t||t===0?0:Math.trunc(t)}si(u2,"toSafeInteger");function PJ(t){const e=t+"CollectionProvider",[n,i]=Bs(e),[r,s]=n(e,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new wy,setItemMap:si(()=>{},"setItemMap")}),o=si(({state:_,...k})=>_?Y.jsx(l,{...k,state:_}):Y.jsx(a,{...k}),"CollectionProvider");o.displayName=e;const a=si(_=>{const k=x();return Y.jsx(l,{..._,state:k})},"CollectionInit");a.displayName=e+"Init";const l=si(_=>{const{scope:k,children:w,state:b}=_,E=R.useRef(null),[P,$]=R.useState(null),B=cn(E,$),[X,j]=b;return R.useEffect(()=>{if(!P)return;const Z=LM(()=>{});return Z.observe(P,{childList:!0,subtree:!0}),()=>{Z.disconnect()}},[P]),Y.jsx(r,{scope:k,itemMap:X,setItemMap:j,collectionRef:B,collectionRefObject:E,collectionElement:P,children:w})},"CollectionProviderImpl");l.displayName=e+"Impl";const u=t+"CollectionSlot",c=ra(u),h=R.forwardRef((_,k)=>{const{scope:w,children:b}=_,E=s(u,w),P=cn(k,E.collectionRef);return Y.jsx(c,{ref:P,children:b})});h.displayName=u;const f=t+"CollectionItemSlot",p="data-radix-collection-item",m=ra(f),g=R.forwardRef((_,k)=>{const{scope:w,children:b,...E}=_,P=R.useRef(null),[$,B]=R.useState(null),X=cn(k,P,B),j=s(f,w),{setItemMap:Z}=j,G=R.useRef(E);MM(G.current,E)||(G.current=E);const z=G.current;return R.useEffect(()=>{const J=z;return Z(ue=>$?ue.has($)?ue.set($,{...J,element:$}).toSorted(IS):(ue.set($,{...J,element:$}),ue.toSorted(IS)):ue),()=>{Z(ue=>!$||!ue.has($)?ue:(ue.delete($),new wy(ue)))}},[$,z,Z]),Y.jsx(m,{[p]:"",ref:X,children:b})});g.displayName=f;function x(){return R.useState(new wy)}si(x,"useInitCollection");function y(_){const{itemMap:k}=s(t+"CollectionConsumer",_);return k}return si(y,"useCollection"),[{Provider:o,Slot:h,ItemSlot:g},{createCollectionScope:i,useCollection:y,useInitCollection:x}]}si(PJ,"createCollection");function MM(t,e){if(t===e)return!0;if(typeof t!="object"||typeof e!="object"||t==null||e==null)return!1;const n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(e,r)||t[r]!==e[r])return!1;return!0}si(MM,"shallowEqual");function NM(t,e){return!!(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)}si(NM,"isElementPreceding");function IS(t,e){return!t[1].element||!e[1].element?0:NM(t[1].element,e[1].element)?-1:1}si(IS,"sortByDocumentPosition");function LM(t){return new MutationObserver(n=>{for(const i of n)if(i.type==="childList"){t();return}})}si(LM,"getChildListObserver");var AJ=Object.defineProperty,$J=(t,e)=>AJ(t,"name",{value:e,configurable:!0}),IJ=R.createContext(void 0);function om(t){const e=R.useContext(IJ);return t||e||"ltr"}$J(om,"useDirection");var RJ=Object.defineProperty,c2=(t,e)=>RJ(t,"name",{value:e,configurable:!0}),ky=!1;function DM(){const[t,e]=R.useState(ky);return R.useEffect(()=>{ky||(ky=!0,e(!0))},[]),t}c2(DM,"useIsHydrated");var QM=Eh[" useSyncExternalStore ".trim().toString()];function VM(){return()=>{}}c2(VM,"subscribe");function BM(){return QM(VM,()=>!0,()=>!1)}c2(BM,"useIsHydratedModern");var MJ=typeof QM=="function"?BM:DM,NJ=Object.defineProperty,Yu=(t,e)=>NJ(t,"name",{value:e,configurable:!0}),Ey="rovingFocusGroup.onEntryFocus",LJ={bubbles:!1,cancelable:!0},nx="RovingFocusGroup",[RS,FM,DJ]=l2(nx),[QJ,ix]=Bs(nx,[DJ]),[VJ,BJ]=QJ(nx),FJ=R.forwardRef(Yu(function(e,n){return Y.jsx(RS.Provider,{scope:e.__scopeRovingFocusGroup,children:Y.jsx(RS.Slot,{scope:e.__scopeRovingFocusGroup,children:Y.jsx(jJ,{...e,ref:n})})})},"RovingFocusGroup")),jJ=R.forwardRef(Yu(function(e,n){const{__scopeRovingFocusGroup:i,orientation:r,loop:s=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:c,preventScrollOnEntryFocus:h=!1,...f}=e,p=R.useRef(null),m=cn(n,p),g=om(o),[x,y]=Oo({prop:a,defaultProp:l??null,onChange:u,caller:nx}),[S,_]=R.useState(!1),k=Ms(c),w=FM(i),b=R.useRef(!1),[E,P]=R.useState(0);return R.useEffect(()=>{const $=p.current;if($)return $.addEventListener(Ey,k),()=>$.removeEventListener(Ey,k)},[k]),Y.jsx(VJ,{scope:i,orientation:r,dir:g,loop:s,currentTabStopId:x,onItemFocus:R.useCallback($=>y($),[y]),onItemShiftTab:R.useCallback(()=>_(!0),[]),onFocusableItemAdd:R.useCallback(()=>P($=>$+1),[]),onFocusableItemRemove:R.useCallback(()=>P($=>$-1),[]),children:Y.jsx(Wt.div,{tabIndex:S||E===0?-1:0,"data-orientation":r,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:Ot(e.onMouseDown,()=>{b.current=!0}),onFocus:Ot(e.onFocus,$=>{const B=!b.current;if($.target===$.currentTarget&&B&&!S){const X=new CustomEvent(Ey,LJ);if($.currentTarget.dispatchEvent(X),!X.defaultPrevented){const j=w().filter(ue=>ue.focusable),Z=j.find(ue=>ue.active),G=j.find(ue=>ue.id===x),J=[Z,G,...j].filter(Boolean).map(ue=>ue.ref.current);h2(J,h)}}b.current=!1}),onBlur:Ot(e.onBlur,()=>_(!1))})})},"RovingFocusGroupImpl")),ZJ="RovingFocusGroupItem",zJ=R.forwardRef(Yu(function(e,n){const{__scopeRovingFocusGroup:i,focusable:r=!0,active:s=!1,tabStopId:o,children:a,...l}=e,u=Wo(),c=o||u,h=BJ(ZJ,i),f=h.currentTabStopId===c,p=FM(i),{onFocusableItemAdd:m,onFocusableItemRemove:g,currentTabStopId:x}=h,y=MJ();return ci(()=>{if(!(!y||!r))return m(),()=>g()},[y,r,m,g]),R.useEffect(()=>{if(!(y||!r))return m(),()=>g()},[y,r,m,g]),Y.jsx(RS.ItemSlot,{scope:i,id:c,focusable:r,active:s,children:Y.jsx(Wt.span,{tabIndex:f?0:-1,"data-orientation":h.orientation,...l,ref:n,onMouseDown:Ot(e.onMouseDown,S=>{r?h.onItemFocus(c):S.preventDefault()}),onFocus:Ot(e.onFocus,()=>h.onItemFocus(c)),onKeyDown:Ot(e.onKeyDown,S=>{if(S.key==="Tab"&&S.shiftKey){h.onItemShiftTab();return}if(S.target!==S.currentTarget)return;const _=ZM(S,h.orientation,h.dir);if(_!==void 0){if(S.metaKey||S.ctrlKey||S.altKey||S.shiftKey)return;S.preventDefault();let w=p().filter(b=>b.focusable).map(b=>b.ref.current);if(_==="last")w.reverse();else if(_==="prev"||_==="next"){_==="prev"&&w.reverse();const b=w.indexOf(S.currentTarget);w=h.loop?zM(w,b+1):w.slice(b+1)}setTimeout(()=>h2(w))}}),children:typeof a=="function"?a({isCurrentTabStop:f,hasTabStop:x!=null}):a})})},"RovingFocusGroupItem")),XJ={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function jM(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}Yu(jM,"getDirectionAwareKey");function ZM(t,e,n){const i=jM(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return XJ[i]}Yu(ZM,"getFocusIntent");function h2(t,e=!1){const n=document.activeElement;for(const i of t)if(i===n||(i.focus({preventScroll:e}),document.activeElement!==n))return}Yu(h2,"focusFirst");function zM(t,e){return t.map((n,i)=>t[(e+i)%t.length])}Yu(zM,"wrapArray");var XM=FJ,WM=zJ,WJ=Object.defineProperty,HM=(t,e)=>WJ(t,"name",{value:e,configurable:!0}),JP="horizontal",HJ=["horizontal","vertical"],UJ=R.forwardRef(HM(function(e,n){const{decorative:i,orientation:r=JP,...s}=e,o=UM(r)?r:JP,l=i?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return Y.jsx(Wt.div,{"data-orientation":o,...l,...s,ref:n})},"Separator"));function UM(t){return HJ.includes(t)}HM(UM,"isValidOrientation");var qJ=UJ,YJ=Object.defineProperty,GJ=(t,e)=>YJ(t,"name",{value:e,configurable:!0}),KJ="Toggle",JJ=R.forwardRef(GJ(function(e,n){const{pressed:i,defaultPressed:r,onPressedChange:s,...o}=e,[a,l]=Oo({prop:i,onChange:s,defaultProp:r??!1,caller:KJ});return Y.jsx(Wt.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":e.disabled?"":void 0,...o,ref:n,onClick:Ot(e.onClick,()=>{e.disabled||l(!a)})})},"Toggle")),eee=Object.defineProperty,ll=(t,e)=>eee(t,"name",{value:e,configurable:!0}),ef="ToggleGroup",[qM,YM]=Bs(ef,[ix]),GM=ix(),tee=R.forwardRef(ll(function(e,n){const{type:i,...r}=e;if(i==="single"){const s=r;return Y.jsx(nee,{role:"radiogroup",...s,ref:n})}if(i==="multiple"){const s=r;return Y.jsx(iee,{role:"toolbar",...s,ref:n})}throw new Error(`Missing prop \`type\` expected on \`${ef}\``)},"ToggleGroup")),[KM,JM]=qM(ef),nee=R.forwardRef(ll(function(e,n){const{value:i,defaultValue:r,onValueChange:s=ll(()=>{},"onValueChange"),...o}=e,[a,l]=Oo({prop:i,defaultProp:r??"",onChange:s,caller:ef});return Y.jsx(KM,{scope:e.__scopeToggleGroup,type:"single",value:R.useMemo(()=>a?[a]:[],[a]),onItemActivate:l,onItemDeactivate:R.useCallback(()=>l(""),[l]),children:Y.jsx(e7,{...o,ref:n})})},"ToggleGroupImplSingle")),iee=R.forwardRef(ll(function(e,n){const{value:i,defaultValue:r,onValueChange:s=ll(()=>{},"onValueChange"),...o}=e,[a,l]=Oo({prop:i,defaultProp:r??[],onChange:s,caller:ef}),u=R.useCallback(h=>l((f=[])=>[...f,h]),[l]),c=R.useCallback(h=>l((f=[])=>f.filter(p=>p!==h)),[l]);return Y.jsx(KM,{scope:e.__scopeToggleGroup,type:"multiple",value:a,onItemActivate:u,onItemDeactivate:c,children:Y.jsx(e7,{...o,ref:n})})},"ToggleGroupImplMultiple")),[ree,see]=qM(ef),e7=R.forwardRef(ll(function(e,n){const{__scopeToggleGroup:i,disabled:r=!1,rovingFocus:s=!0,orientation:o,dir:a,loop:l=!0,...u}=e,c=GM(i),h=om(a),f={dir:h,...u};return Y.jsx(ree,{scope:i,rovingFocus:s,disabled:r,children:s?Y.jsx(XM,{asChild:!0,...c,orientation:o,dir:h,loop:l,children:Y.jsx(Wt.div,{...f,ref:n})}):Y.jsx(Wt.div,{...f,ref:n})})},"ToggleGroupImpl")),MS="ToggleGroupItem",oee=R.forwardRef(ll(function(e,n){const i=JM(MS,e.__scopeToggleGroup),r=see(MS,e.__scopeToggleGroup),s=GM(e.__scopeToggleGroup),o=i.value.includes(e.value),a=r.disabled||e.disabled,l={...e,pressed:o,disabled:a},u=R.useRef(null);return r.rovingFocus?Y.jsx(WM,{asChild:!0,...s,focusable:!a,active:o,ref:u,children:Y.jsx(eA,{...l,ref:n})}):Y.jsx(eA,{...l,ref:n})},"ToggleGroupItem")),eA=R.forwardRef(ll(function(e,n){const{__scopeToggleGroup:i,value:r,...s}=e,o=JM(MS,i),a={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=o.type==="single"?a:void 0;return Y.jsx(JJ,{...l,...s,ref:n,onPressedChange:u=>{u?o.onItemActivate(r):o.onItemDeactivate(r)}})},"ToggleGroupItemImpl")),aee=Object.defineProperty,am=(t,e)=>aee(t,"name",{value:e,configurable:!0}),t7="Toolbar",[lee,p1e]=Bs(t7,[ix,YM]),n7=ix(),i7=YM(),[uee,r7]=lee(t7),cee=R.forwardRef(am(function(e,n){const{__scopeToolbar:i,orientation:r="horizontal",dir:s,loop:o=!0,...a}=e,l=n7(i),u=om(s);return Y.jsx(uee,{scope:i,orientation:r,dir:u,children:Y.jsx(XM,{asChild:!0,...l,orientation:r,dir:u,loop:o,children:Y.jsx(Wt.div,{role:"toolbar","aria-orientation":r,dir:u,...a,ref:n})})})},"Toolbar")),hee="ToolbarSeparator",fee=R.forwardRef(am(function(e,n){const{__scopeToolbar:i,...r}=e,s=r7(hee,i);return Y.jsx(qJ,{orientation:s.orientation==="horizontal"?"vertical":"horizontal",...r,ref:n})},"ToolbarSeparator")),s7=R.forwardRef(am(function(e,n){const{__scopeToolbar:i,...r}=e,s=n7(i);return Y.jsx(WM,{asChild:!0,...s,focusable:!e.disabled,children:Y.jsx(Wt.button,{type:"button",...r,ref:n})})},"ToolbarButton")),dee="ToolbarToggleGroup",pee=R.forwardRef(am(function(e,n){const{__scopeToolbar:i,...r}=e,s=r7(dee,i),o=i7(i);return Y.jsx(tee,{"data-orientation":s.orientation,dir:s.dir,...o,...r,ref:n,rovingFocus:!1})},"ToolbarToggleGroup")),mee=R.forwardRef(am(function(e,n){const{__scopeToolbar:i,...r}=e,s=i7(i),o={__scopeToolbar:e.__scopeToolbar};return Y.jsx(s7,{asChild:!0,...o,children:Y.jsx(oee,{...s,...r,ref:n})})},"ToolbarToggleItem")),f2=cee,o7=fee,Uo=s7,rx=pee,i0=mee;function sx(t,e){return t===null||t===e?!1:t.dataset.editorDialog!==void 0||t.dataset.toolbarItem!==void 0||t.dataset.editorDropdown?!0:sx(t.parentElement,e)}function a7(){const t=[...Array(256).keys()].map(n=>n.toString(16).padStart(2,"0")),e=crypto.getRandomValues(new Uint8Array(16));return e[6]=e[6]&15|64,e[8]=e[8]&63|128,[...e.entries()].map(([n,i])=>[4,6,8,10].includes(n)?`-${t[i]}`:t[i]).join("")}const l7=t=>t===0?"th":"td",u7={center:te.centeredCell,left:te.leftAlignedCell,right:te.rightAlignedCell},gee=({mdastNode:t,parentEditor:e,lexicalTable:n})=>{const[i,r]=C.useState(null),[s,o]=Ft(fn,zn),a=C.useMemo(()=>g=>(g.__cacheKey??(g.__cacheKey=a7()),g.__cacheKey),[]),l=C.useCallback(g=>{const x=n.getColCount();if(g===null){r(null);return}let[y,S]=g;if(y>x-1&&(y=0,S++),y<0&&(y=x-1,S-=1),S>n.getRowCount()-1){r(null),e.update(()=>{if(n.getLatest().getNextSibling())n.getLatest().selectNext();else{const k=ut();n.insertAfter(k),k.select()}});return}if(S<0){r(null),e.update(()=>{n.getLatest().selectPrevious()});return}r([y,S])},[n,e]);C.useEffect(()=>{n.focusEmitter.subscribe(l)},[n,l]);const u=C.useCallback(g=>{g.preventDefault(),e.update(()=>{n.addRowToBottom(),r([0,n.getRowCount()])})},[e,n]),c=C.useCallback(g=>{g.preventDefault(),e.update(()=>{n.addColumnToRight(),r([n.getColCount(),0])})},[e,n]),[h,f]=C.useState([-1,-1]),p=C.useCallback(g=>{let x=g.target;for(;x&&!["TH","TD"].includes(x.tagName);){if(x===g.currentTarget)return;x=x.parentElement}if(x===null)return;const y=x.parentElement,_=y.parentElement.tagName==="TFOOT"?-1:Array.from(y.children).indexOf(x),k=x.tagName==="TH"?-1:Array.from(y.parentElement.children).indexOf(y);f([_,k])},[]),m=Ht();return C.createElement("table",{className:te.tableEditor,onMouseOver:p,onMouseLeave:()=>{f([-1,-1])}},C.createElement("colgroup",null,o?null:C.createElement("col",null),Array.from({length:t.children[0].children.length},(g,x)=>{const S=(t.align??[])[x]??"left",_=u7[S];return C.createElement("col",{key:x,className:_})}),o?null:C.createElement("col",null)),o||C.createElement("thead",null,C.createElement("tr",null,C.createElement("th",{className:te.tableToolsColumn}),Array.from({length:t.children[0].children.length},(g,x)=>C.createElement("th",{key:x,"data-tool-cell":!0},C.createElement(yee,{setActiveCellWithBoundaries:l,parentEditor:e,colIndex:x,highlightedCoordinates:h,lexicalTable:n,align:(t.align??[])[x]}))),C.createElement("th",{className:te.tableToolsColumn,"data-tool-cell":!0},C.createElement("button",{className:te.iconButton,type:"button",title:m("table.deleteTable","Delete table"),onClick:g=>{g.preventDefault(),e.update(()=>{n.selectNext(),n.remove()})}},s("delete_small"))))),C.createElement("tbody",null,t.children.map((g,x)=>{const y=l7(x);return C.createElement("tr",{key:x},o||C.createElement(y,{className:te.toolCell,"data-tool-cell":!0},C.createElement(vee,{setActiveCellWithBoundaries:l,parentEditor:e,rowIndex:x,highlightedCoordinates:h,lexicalTable:n})),g.children.map((S,_)=>{var k;return C.createElement(Oee,{align:(k=t.align)==null?void 0:k[_],key:a(S),contents:S.children,setActiveCell:l,rowIndex:x,colIndex:_,lexicalTable:n,parentEditor:e,activeCell:o?[-1,-1]:i})}),o||x===0&&C.createElement("th",{rowSpan:n.getRowCount(),"data-tool-cell":!0},C.createElement("button",{type:"button",className:te.addColumnButton,onClick:c},s("add_column"))))})),o||C.createElement("tfoot",null,C.createElement("tr",null,C.createElement("th",null),C.createElement("th",{colSpan:n.getColCount(),"data-tool-cell":!0},C.createElement("button",{type:"button",className:te.addRowButton,onClick:u},s("add_row"))),C.createElement("th",null))))},Oee=({align:t,...e})=>{const{activeCell:n,setActiveCell:i}=e,r=(n==null?void 0:n[0])===e.colIndex&&n[1]===e.rowIndex,s=u7[t??"left"],o=l7(e.rowIndex);return C.createElement(o,{className:s,"data-active":r,onClick:()=>{i([e.colIndex,e.rowIndex])}},C.createElement(xee,{...e,focus:r}))},xee=({focus:t,setActiveCell:e,parentEditor:n,lexicalTable:i,contents:r,colIndex:s,rowIndex:o})=>{const[a,l,u,c,h,f,p,m,g,x]=Ft(em,Hh,tm,ia,Su,Xu,rl,Uh,mr,Vw),[y,S]=C.useState(null);C.useEffect(()=>{const k=kw({name:"@mdxeditor/table-cell",nodes:u,namespace:"TableCellEditor",parentEditor:n,historyMode:"table-local",initialEditorState:()=>{V1({root:pt(),mdastRoot:{type:"root",children:[{type:"paragraph",children:r}]},visitors:a,jsxComponentDescriptors:c,directiveDescriptors:h,codeBlockEditorDescriptors:f,defaultCodeBlockLanguage:p})}});return S(k),()=>{k.dispose()}},[]);const _=C.useCallback(k=>{y&&(y.getEditorState().read(()=>{const w=D1({root:pt(),jsxComponentDescriptors:c,visitors:l,jsxIsAvailable:m});n.update(()=>{i.updateCellContents(s,o,w.children[0].children)},{discrete:!0}),n.dispatchCommand(il,void 0)}),e(k))},[s,y,l,c,m,i,n,o,e]);return C.useEffect(()=>{if(y)return wn(y.registerCommand(Lp,k=>{k.preventDefault();const w=k.shiftKey?[s-1,o]:[s+1,o];return _(w),!0},cr),y.registerCommand(Dh,()=>(e([s,o]),!1),Gt),y.registerCommand(Ka,k=>{k==null||k.preventDefault();const w=k!=null&&k.shiftKey?[s,o-1]:[s,o+1];return _(w),!0},cr),y.registerCommand(Vp,k=>{const w=k.relatedTarget;return sx(w,g.getRootElement())?!1:(_(null),!0)},tt),y.registerCommand(il,()=>(_(null),!0),tt))},[s,y,g,o,_,e]),C.useEffect(()=>{t&&y&&y.focus()},[t,y]),y?C.createElement(Zw,{initialEditor:y},C.createElement(Xw,{contentEditable:C.createElement(B1,null),placeholder:C.createElement("div",null),ErrorBoundary:F1}),x.map((k,w)=>C.createElement(k,{key:w}))):null},yee=({parentEditor:t,highlightedCoordinates:e,align:n,lexicalTable:i,colIndex:r,setActiveCellWithBoundaries:s})=>{const[o,a]=Ft(Vs,fn),l=C.useCallback(f=>{t.update(()=>{i.insertColumnAt(f)}),s([f,0])},[t,i,s]),u=C.useCallback(f=>{t.update(()=>{i.deleteColumnAt(f)})},[t,i]),c=C.useCallback((f,p)=>{t.update(()=>{i.setColumnAlign(f,p)})},[t,i]),h=Ht();return C.createElement(J1,null,C.createElement(s2,{className:te.tableColumnEditorTrigger,"data-active":e[0]===r+1,title:h("table.columnMenu","Column menu")},a("more_horiz")),C.createElement(ex,{container:o==null?void 0:o.current},C.createElement(o2,{className:yt(te.tableColumnEditorPopoverContent),onOpenAutoFocus:f=>{f.preventDefault()},sideOffset:5,side:"top"},C.createElement(f2,{className:te.tableColumnEditorToolbar},C.createElement(rx,{className:te.toggleGroupRoot,onValueChange:f=>{c(r,f)},value:n??"left",type:"single","aria-label":h("table.textAlignment","Text alignment")},C.createElement(i0,{value:"left",title:h("table.alignLeft","Align left")},a("format_align_left")),C.createElement(i0,{value:"center",title:h("table.alignCenter","Align center")},a("format_align_center")),C.createElement(i0,{value:"right",title:h("table.alignRight","Align right")},a("format_align_right"))),C.createElement(o7,null),C.createElement(Uo,{onClick:l.bind(null,r),title:h("table.insertColumnLeft","Insert a column to the left of this one")},a("insert_col_left")),C.createElement(Uo,{onClick:l.bind(null,r+1),title:h("table.insertColumnRight","Insert a column to the right of this one")},a("insert_col_right")),C.createElement(Uo,{onClick:u.bind(null,r),title:h("table.deleteColumn","Delete this column")},a("delete_small"))),C.createElement(tx,{className:te.popoverArrow}))))},vee=({parentEditor:t,highlightedCoordinates:e,lexicalTable:n,rowIndex:i,setActiveCellWithBoundaries:r})=>{const[s,o]=Ft(Vs,fn),a=C.useCallback(c=>{t.update(()=>{n.insertRowAt(c)}),r([0,c])},[t,n,r]),l=C.useCallback(c=>{t.update(()=>{n.deleteRowAt(c)})},[t,n]),u=Ht();return C.createElement(J1,null,C.createElement(s2,{className:te.tableColumnEditorTrigger,"data-active":e[1]===i,title:u("table.rowMenu","Row menu")},o("more_horiz")),C.createElement(ex,{container:s==null?void 0:s.current},C.createElement(o2,{className:yt(te.tableColumnEditorPopoverContent),onOpenAutoFocus:c=>{c.preventDefault()},sideOffset:5,side:"bottom"},C.createElement(f2,{className:te.tableColumnEditorToolbar},C.createElement(Uo,{onClick:a.bind(null,i),title:u("table.insertRowAbove","Insert a row above this one")},o("insert_row_above")),C.createElement(Uo,{onClick:a.bind(null,i+1),title:u("table.insertRowBelow","Insert a row below this one")},o("insert_row_below")),C.createElement(Uo,{onClick:l.bind(null,i),title:u("table.deleteRow","Delete this row")},o("delete_small"))),C.createElement(tx,{className:te.popoverArrow}))))};var bee=Object.defineProperty,See=(t,e,n)=>e in t?bee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,tA=(t,e,n)=>See(t,typeof e!="symbol"?e+"":e,n);const nA={type:"tableCell",children:[]};function _ee(){let t=Ua;return{publish:e=>{t(e)},subscribe:e=>{t=e}}}class Gu extends us{constructor(e,n){super(n),tA(this,"__mdastNode"),tA(this,"focusEmitter",_ee()),this.__mdastNode=e??{type:"table",children:[]}}static getType(){return"table"}static clone(e){return new Gu(structuredClone(e.__mdastNode),e.__key)}static importJSON(e){return ox(e.mdastNode)}static importDOM(){return{table:()=>({conversion:h7,priority:3})}}exportJSON(){return{mdastNode:structuredClone(this.__mdastNode),type:"table",version:1}}getMdastNode(){return this.__mdastNode}getRowCount(){return this.__mdastNode.children.length}getColCount(){var e;return((e=this.__mdastNode.children[0])==null?void 0:e.children.length)||0}createDOM(){return document.createElement("div")}updateDOM(){return!1}updateCellContents(e,n,i){const s=this.getWritable().__mdastNode,o=s.children[n],a=o.children,l=a[e],u=Array.from(a),c={...l,children:i},h={...o,children:u};u[e]=c,s.children[n]=h}insertColumnAt(e){const i=this.getWritable().__mdastNode;for(let r=0;r<i.children.length;r++){const s=i.children[r],o=s.children,a=Array.from(o),l={...s,children:a};a.splice(e,0,structuredClone(nA)),i.children[r]=l}i.align&&i.align.length>0&&i.align.splice(e,0,"left")}deleteColumnAt(e){const i=this.getWritable().__mdastNode;for(let r=0;r<i.children.length;r++){const s=i.children[r],o=s.children,a=Array.from(o),l={...s,children:a};a.splice(e,1),i.children[r]=l}}insertRowAt(e){const i=this.getWritable().__mdastNode,r={type:"tableRow",children:Array.from({length:this.getColCount()},()=>structuredClone(nA))};i.children.splice(e,0,r)}deleteRowAt(e){this.getRowCount()===1?(this.selectNext(),this.remove()):this.getWritable().__mdastNode.children.splice(e,1)}addRowToBottom(){this.insertRowAt(this.getRowCount())}addColumnToRight(){this.insertColumnAt(this.getColCount())}setColumnAlign(e,n){const r=this.getWritable().__mdastNode;r.align??(r.align=[]),r.align[e]=n}decorate(e){return C.createElement(gee,{lexicalTable:this,mdastNode:this.__mdastNode,parentEditor:e})}select(e){this.focusEmitter.publish(e??[0,0])}isInline(){return!1}}function c7(t){return t instanceof Gu}function ox(t){return new Gu(t)}function h7(t){const e=t.querySelectorAll("tr"),n=Array.from(e).map(i=>({type:"tableRow",children:Array.from(i.querySelectorAll("td, th")).map(r=>({type:"tableCell",children:[{type:"text",value:r.textContent}]}))}));return{node:new Gu({type:"table",children:n})}}const Cee={testLexicalNode:c7,visitLexicalNode({actions:t,mdastParent:e,lexicalNode:n}){t.appendToParent(e,n.getMdastNode())}},wee={testNode:"table",visitNode({mdastNode:t,lexicalParent:e}){e.append(ox(t))}};function kee(t=1,e=1){const n={type:"table",children:[]};for(let i=0;i<t;i++){const r={type:"tableRow",children:[]};for(let s=0;s<e;s++){const o={type:"tableCell",children:[]};r.children.push(o)}n.children.push(r)}return n}const d2=kn(t=>{t.link(t.pipe(d2,As(({rows:e,columns:n})=>()=>ox(kee(e,n)))),Yh)}),Eee=Vn({init(t,e){t.pubIn({[ol]:rZ(),[sl]:iZ(),[hr]:wee,[Nr]:Gu,[Lr]:Cee,[Wu]:nZ({tableCellPadding:(e==null?void 0:e.tableCellPadding)??!0,tablePipeAlign:(e==null?void 0:e.tablePipeAlign)??!0})})}}),iA=new Set(["http:","https:","mailto:","sms:","tel:"]);class So extends $i{constructor(n="",i={},r){super(r);se(this,"__url");se(this,"__target");se(this,"__rel");se(this,"__title");const{target:s=null,rel:o=null,title:a=null}=i;this.__url=n,this.__target=s,this.__rel=o,this.__title=a}static getType(){return"link"}static clone(n){return new So(n.__url,{rel:n.__rel,target:n.__target,title:n.__title},n.__key)}afterCloneFrom(n){super.afterCloneFrom(n),this.__url=n.__url,this.__rel=n.__rel,this.__target=n.__target,this.__title=n.__title}createDOM(n){const i=rn().createElement("a");return this.updateLinkDOM(null,i,n),as(i,n.theme.link),i}updateLinkDOM(n,i,r){if(ow(i)){n&&n.__url===this.__url||(i.href=this.sanitizeUrl(this.__url));for(const s of["target","rel","title"]){const o=`__${s}`,a=this[o];n&&n[o]===a||(a?i[s]=a:i.removeAttribute(s))}}}updateDOM(n,i,r){return this.updateLinkDOM(n,i,r),!1}static importDOM(){return{a:n=>({conversion:Pee,priority:1})}}static importJSON(n){return oa().updateFromJSON(n)}updateFromJSON(n){return super.updateFromJSON(n).setURL(n.url).setRel(n.rel||null).setTarget(n.target||null).setTitle(n.title||null)}sanitizeUrl(n){const i=n;n=aA(n);try{const r=new URL(aA(n));if(!iA.has(r.protocol))return"about:blank"}catch{const s=i.replace(/[\u0000-\u001F\u007F\s]/g,"").match(/^([a-z][a-z0-9+.-]*):/i);if(s!=null&&!iA.has(`${s[1].toLowerCase()}:`))return"about:blank"}return n}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(n){const i=this.getWritable();return i.__url=n,i}getTarget(){return this.getLatest().__target}setTarget(n){const i=this.getWritable();return i.__target=n,i}getRel(){return this.getLatest().__rel}setRel(n){const i=this.getWritable();return i.__rel=n,i}getTitle(){return this.getLatest().__title}setTitle(n){const i=this.getWritable();return i.__title=n,i}insertNewAfter(n,i=!0){const r=qn(this);return this.insertAfter(r,i),r}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(n,i,r){if(!ae(i))return!1;const s=i.anchor.getNode(),o=i.focus.getNode();return(this.is(s)||this.isParentOf(s))&&(this.is(o)||this.isParentOf(o))&&i.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}shouldMergeAdjacentLink(n){return this.getType()===n.getType()&&this.__url===n.__url&&this.__target===n.__target&&this.__rel===n.__rel&&this.__title===n.__title}}function rA(t){const e=bi(t,"next");return[e,e.getFlipped()]}function sA(t,e){for(const n of e)if(n.origin.isAttached()){const i=vi(n);return void ta(t,i)}}function Tee(t){const e=me();let n=null,i=null;function r(){ae(e)&&(sA(e.anchor,n),sA(e.focus,i),Cs(e))}ae(e)&&(n=rA(e.anchor),i=rA(e.focus));let s=!1;for(const a of Ii(t,"next")){const l=a.origin;if(W(l)&&!l.isInline()){const u=l.getChildren();if(u.length>0){const c=qn(t);c.append(...u),l.append(c),s=!0}Hp(l,ga(a),{$shouldSplit:()=>!1})}}function o(a,l,u){const[c,h]=a,f=m=>po(m)&&m.origin.is(l);if(!f(c)&&!f(h))return a;const p=vi(Ii(u,"next"));return[p,p.getFlipped()]}if(t.isAttached()){const a=t.getPreviousSibling();if(ni(a)&&a.shouldMergeAdjacentLink(t))return n&&(n=o(n,a,t)),i&&(i=o(i,a,t)),a.append(...t.getChildren()),t.remove(),void r();const l=t.getNextSibling();ni(l)&&t.shouldMergeAdjacentLink(l)&&(n&&(n=o(n,t,l)),i&&(i=o(i,t,l)),t.append(...l.getChildren()),l.remove(),s=!0)}if(s){if(!t.canBeEmpty()&&t.isEmpty()){const a=t.getParent();t.remove(),a&&a.isEmpty()&&a.remove()}r()}}function Pee(t){let e=null;if(ow(t)){const n=t.textContent;(n!==null&&n!==""||t.children.length>0)&&(e=oa(t.getAttribute("href")||"",{rel:t.getAttribute("rel"),target:t.getAttribute("target"),title:t.getAttribute("title")}))}return{node:e}}function oa(t="",e){return Ui(new So(t,e))}function ni(t){return t instanceof So}class tf extends So{constructor(n="",i={},r){super(n,i,r);se(this,"__isUnlinked");this.__isUnlinked=i.isUnlinked!==void 0&&i.isUnlinked!==null&&i.isUnlinked}afterCloneFrom(n){super.afterCloneFrom(n),this.__isUnlinked=n.__isUnlinked}static getType(){return"autolink"}static clone(n){return new tf(n.__url,{isUnlinked:n.__isUnlinked,rel:n.__rel,target:n.__target,title:n.__title},n.__key)}shouldMergeAdjacentLink(n){return!1}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(n){const i=this.getWritable();return i.__isUnlinked=n,i}createDOM(n){return this.__isUnlinked?rn().createElement("span"):super.createDOM(n)}updateDOM(n,i,r){return super.updateDOM(n,i,r)||n.__isUnlinked!==this.__isUnlinked}static importJSON(n){return NS().updateFromJSON(n)}updateFromJSON(n){return super.updateFromJSON(n).setIsUnlinked(n.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(n,i=!0){const r=NS(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(r,i),r}}function NS(t="",e){return Ui(new tf(t,e))}function Bi(t){return t instanceof tf}const uh=Ue("TOGGLE_LINK_COMMAND");function oA(t,e){if(t.type==="element"){const n=t.getNode();return W(n)||(function(i,...r){const s=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",i);for(const a of r)o.append("v",a);throw s.search=o.toString(),Error(`Minified Lexical error #${i}; visit ${s.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(252),n.getChildren()[t.offset+e]||null}return null}function Ty(t,e={}){let n;if(t&&typeof t=="object"){const{url:c,...h}=t;n=c,e={...h,...e}}else n=t;const{target:i,title:r}=e,s=e.rel===void 0?"noreferrer":e.rel,o=me();if(o===null||!ae(o)&&!Ct(o))return;if(Ct(o)){const c=o.getNodes();return c.length===0?void 0:void c.forEach(h=>{if(n===null){const f=Lt(h,p=>!Bi(p)&&ni(p));f&&(f.insertBefore(h),f.getChildren().length===0&&f.remove())}else{const f=Lt(h,p=>!Bi(p)&&ni(p));if(f)f.setURL(n),i!==void 0&&f.setTarget(i),s!==void 0&&f.setRel(s);else{const p=oa(n,{rel:s,target:i});h.insertBefore(p),p.append(h)}}})}if(o.isCollapsed()&&n===null)for(const c of o.getNodes()){const h=Lt(c,f=>!Bi(f)&&ni(f));return void(h!==null&&(h.getParentOrThrow().splice(h.getIndexWithinParent(),0,h.getChildren()),h.remove()))}const a=o.extract();if(n===null){const c=new Set;return void a.forEach(h=>{const f=Lt(h,p=>!Bi(p)&&ni(p));if(f!==null){const p=f.getKey();if(c.has(p))return;(function(m,g){const x=new Set(g.filter(P=>m.isParentOf(P)).map(P=>P.getKey())),y=m.getChildren(),S=P=>x.has(P.getKey())||W(P)&&g.some($=>m.isParentOf($)&&P.isParentOf($)),_=y.filter(S);if(_.length===y.length)return y.forEach(P=>m.insertBefore(P)),void m.remove();const k=y.findIndex(S),w=y.findLastIndex(S),b=k===0,E=w===y.length-1;if(b)_.forEach(P=>m.insertBefore(P));else if(E)for(let P=_.length-1;P>=0;P--)m.insertAfter(_[P]);else{for(let $=_.length-1;$>=0;$--)m.insertAfter(_[$]);const P=y.slice(w+1);if(P.length>0){const $=qn(m);_[_.length-1].insertAfter($),P.forEach(B=>$.append(B))}}})(f,a),c.add(p)}})}const l=new Set,u=c=>{l.has(c.getKey())||(l.add(c.getKey()),c.setURL(n),i!==void 0&&c.setTarget(i),s!==void 0&&c.setRel(s),r!==void 0&&c.setTitle(r))};if(a.length===1){const c=a[0],h=Lt(c,ni);if(h!==null)return u(h)}(function(c){const h=me();if(!ae(h))return c();const f=Cs(h),p=f.isBackward(),m=oA(f.anchor,p?-1:0),g=oA(f.focus,p?0:-1);if(c(),m||g){const x=me();if(ae(x)){const y=x.clone();if(m){const S=m.getParent();S&&y.anchor.set(S.getKey(),m.getIndexWithinParent()+(p?1:0),"element")}if(g){const S=g.getParent();S&&y.focus.set(S.getKey(),g.getIndexWithinParent()+(p?0:1),"element")}yn(Cs(y))}}})(()=>{let c=null;for(const h of a){if(!h.isAttached())continue;const f=Lt(h,ni);if(f){u(f);continue}if(W(h)){if(!h.isInline())continue;if(ni(h)){if(!(Bi(h)||c!==null&&c.getParentOrThrow().isParentOf(h))){u(h),c=h;continue}for(const m of h.getChildren())h.insertBefore(m);h.remove();continue}}const p=h.getPreviousSibling();ni(p)&&p.is(c)?p.append(h):(c=oa(n,{rel:s,target:i,title:r}),h.insertAfter(c),c.append(h))}})}const Aee=/^\+?[0-9\s()-]{5,}$/;function aA(t){return t.match(/^[a-z][a-z0-9+.-]*:/i)||t.match(/^[/#.]/)?t:t.includes("@")?`mailto:${t}`:Aee.test(t)?`tel:${t}`:`https://${t}`}hi.tag("a");function $ee(t,e){return wn(t.registerNodeTransform(So,Tee),t.registerCommand(uh,n=>{const i=e.validateUrl.peek(),r=e.attributes.peek();if(n===null)return Ty(null),!0;if(typeof n=="string")return!(i!==void 0&&!i(n))&&(Ty(n,r),!0);{const{url:s,target:o,rel:a,title:l}=n;return Ty(s,{...r,rel:a,target:o,title:l}),!0}},tt),zh(()=>{const n=e.validateUrl.value;if(!n)return;const i=e.attributes.value;return t.registerCommand(Rh,r=>{const s=me();if(!ae(s)||s.isCollapsed()||!Bo(r,ClipboardEvent)||r.clipboardData===null)return!1;const o=r.clipboardData.getData("text");return n(o)?!s.getNodes().some(a=>W(a)||le(a)&&!a.isSimpleText())&&(t.dispatchCommand(uh,{...i,url:o}),r.preventDefault(),!0):!1},Gt)}))}function lA(t,e=n=>n){return n=>{const i=t.exec(n);return i===null?null:{index:i.index,length:i[0].length,text:i[0],url:e(i[0])}}}function LS(t,e){for(let n=0;n<e.length;n++){const i=e[n](t);if(i)return i}return null}const f7=/[.,;\s]/;function rO(t,e){return e.test(t)}function d7(t,e){return rO(t[t.length-1],e)}function DS(t,e){return rO(t[0],e)}function p7(t,e){let n=t.getPreviousSibling();return W(n)&&(n=n.getLastDescendant()),n===null||Gn(n)||le(n)&&d7(n.getTextContent(),e)}function m7(t,e){let n=t.getNextSibling();return W(n)&&(n=n.getFirstDescendant()),n===null||Gn(n)||le(n)&&DS(n.getTextContent(),e)}function Iee(t,e,n,i,r){return(t>0?rO(i[t-1],n):p7(r[0],n))?e<i.length?rO(i[e],n):m7(r[r.length-1],n):!1}function Ree(t,e,n){const i=[],r=[],s=[];let o=0,a=0;const l=[...t];for(;l.length>0;){const u=l[0],c=u.getTextContent().length,h=a;a+c<=e?(i.push(u),o+=c):h>=n?s.push(u):r.push(u),a+=c,l.shift()}return[o,i,r,s]}function Mee(t,e,n,i){const r=NS(i.url,i.attributes);if(t.length===1){let s,o=t[0];e===0?[s,o]=o.splitText(n):[,s,o]=o.splitText(e,n);const a=Vt(i.text);return a.setFormat(s.getFormat()),a.setDetail(s.getDetail()),a.setStyle(s.getStyle()),r.append(a),s.replace(r),o}if(t.length>1){const s=t[0];let o,a=s.getTextContent().length;e===0?o=s:[,o]=s.splitText(e);const l=[];let u;for(let p=1;p<t.length;p++){const m=t[p],g=m.getTextContent().length,x=a;if(x<n)if(a+g<=n)l.push(m);else{const[y,S]=m.splitText(n-x);l.push(y),u=S}a+=g}const c=me(),h=c?c.getNodes().find(le):void 0,f=Vt(o.getTextContent());return f.setFormat(o.getFormat()),f.setDetail(o.getDetail()),f.setStyle(o.getStyle()),r.append(f,...l),h&&h===o&&(ae(c)?f.select(c.anchor.offset,c.focus.offset):Ct(c)&&f.select(0,f.getTextContent().length)),o.replace(r),u}}function uA(t,e,n,i){const r=t.getChildren(),s=r.length;for(let u=0;u<s;u++){const c=r[u];if(!le(c)||!c.isSimpleText())return ld(t),void n(null,t.getURL())}const o=t.getTextContent(),a=LS(o,e);if(a===null||a.text!==o||!p7(t,i)||!m7(t,i))return ld(t),void n(null,t.getURL());const l=t.getURL();if(l!==a.url&&(t.setURL(a.url),n(a.url,l)),a.attributes){const u=t.getRel();u!==a.attributes.rel&&(t.setRel(a.attributes.rel||null),n(a.attributes.rel||null,u));const c=t.getTarget();c!==a.attributes.target&&(t.setTarget(a.attributes.target||null),n(a.attributes.target||null,c))}}function ld(t){const e=t.getChildren();for(let n=e.length-1;n>=0;n--)t.insertAfter(e[n]);return t.remove(),e.map(n=>n.getLatest())}const Nee={changeHandlers:[],excludeParents:[],matchers:[],separatorRegex:f7};function Lee(t,e=Nee){const{matchers:n,changeHandlers:i,excludeParents:r,separatorRegex:s=f7}=e,o=(a,l)=>{for(const u of i)u(a,l)};return wn(t.registerNodeTransform(Rr,a=>{const l=a.getParentOrThrow(),u=a.getPreviousSibling();if(Bi(l))uA(l,n,o,s);else if(!ni(l)&&!r.some(c=>c(l))){if(a.isSimpleText()&&(DS(a.getTextContent(),s)||!Bi(u))){const c=(function(h){const f=[h];let p=h.getNextSibling();for(;p!==null&&le(p)&&p.isSimpleText()&&(f.push(p),!/[\s]/.test(p.getTextContent()));)p=p.getNextSibling();return f})(a);(function(h,f,p,m){for(const k of h){const w=k.getParent();if(Bi(w)&&!w.getIsUnlinked())return}let g=[...h];const x=g.map(k=>k.getTextContent()).join("");let y,S=x,_=0;for(;(y=LS(S,f))&&y!==null;){const k=y.index,w=k+y.length;if(Iee(_+k,_+w,m,x,g)){const[b,,E,P]=Ree(g,_+k,_+w);let $=!1;for(const X of E){const j=X.getParent();if(Bi(j)&&!j.getIsUnlinked()){$=!0;break}}if($){_+=w,S=S.substring(w);continue}const B=Mee(E,_+k-b,_+w-b,y);g=B?[B,...P]:P,p(y.url,null),_=0}else _+=w;S=S.substring(w)}})(c,n,o,s)}(function(c,h,f,p){const m=c.getParent(),g=c.getPreviousSibling(),x=c.getNextSibling(),y=c.getTextContent();if(!Bi(m)||m.getIsUnlinked()){if(Bi(g)&&!g.getIsUnlinked()&&g.is(c.getPreviousSibling())&&c.getParent()===g.getParent()){if(!DS(y,p))return ld(g),void f(null,g.getURL());if(S=y,g.isEmailURI()?/^\.[a-zA-Z]{2,}/.test(S):/^\.[a-zA-Z0-9]{1,}/.test(S)){const _=g.getTextContent()+y,k=LS(_,h);k!==null&&k.text===_&&(g.append(c),uA(g,h,f,p),f(null,g.getURL()))}}var S;!Bi(x)||x.getIsUnlinked()||d7(y,p)||x.is(c.getNextSibling())&&c.getParent()===x.getParent()&&(ld(x),f(null,x.getURL()))}})(a,n,o,s)}}),t.registerCommand(uh,a=>{const l=me();return a!==null||!ae(l)||l.extract().forEach(u=>{const c=u.getParent();Bi(c)&&(c.setIsUnlinked(!c.getIsUnlinked()),c.markDirty())}),!1},Gt))}const Dee={testNode:"link",visitNode({mdastNode:t,actions:e}){e.addAndStepInto(oa(t.url,{title:t.title}))}},Qee={testLexicalNode:ni,visitLexicalNode:({lexicalNode:t,actions:e})=>{e.addAndStepInto("link",{url:t.getURL(),title:t.getTitle()})}};function Vee({validateUrl:t,attributes:e}){const[n]=qi();return R.useEffect(()=>{if(!n.hasNodes([So]))throw new Error("LinkPlugin: LinkNode not registered on editor")}),R.useEffect(()=>$ee(n,I1({attributes:e,validateUrl:t})),[n,t,e]),null}function Bee(t,e,n,i){R.useEffect(()=>{t.hasNodes([tf])||(function(r,...s){const o=new URL("https://lexical.dev/docs/error"),a=new URLSearchParams;a.append("code",r);for(const l of s)a.append("v",l);throw o.search=a.toString(),Error(`Minified Lexical error #${r}; visit ${o.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(77)}),R.useEffect(()=>Lee(t,{changeHandlers:n?[n]:[],excludeParents:i??[],matchers:e}),[t,e,n,i])}function Fee({matchers:t,onChange:e,excludeParents:n}){const[i]=qi();return Bee(i,t,e,n),null}const jee=/((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/,Zee=/(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/,zee=[lA(jee,t=>t.startsWith("http")?t:`https://${t}`),lA(Zee,t=>`mailto:${t}`)],Xee=()=>C.createElement(Fee,{matchers:zee}),g7=Ee(!1),Wee=Vn({init(t,e){const n=!!(e!=null&&e.disableAutoLink),i=e!=null&&e.validateUrl?{validateUrl:e.validateUrl}:{},r=()=>C.createElement(C.Fragment,null,C.createElement(Vee,{...i}),n?null:C.createElement(Xee,null));t.pubIn({[Uu]:"link",[hr]:Dee,[Nr]:[So,tf],[Lr]:Qee,[g7]:n,[W1]:r,[Bw]:r,[_l]:r})}});function Hee(t,e){if(t==null)return{};var n={},i=Object.keys(t),r,s;for(s=0;s<i.length;s++)r=i[s],!(e.indexOf(r)>=0)&&(n[r]=t[r]);return n}var Uee=["color"],qee=R.forwardRef(function(t,e){var n=t.color,i=n===void 0?"currentColor":n,r=Hee(t,Uee);return R.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:e}),R.createElement("path",{d:"M2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5C1 1.67157 1.67157 1 2.5 1ZM2.5 2C2.22386 2 2 2.22386 2 2.5V8.3636L3.6818 6.6818C3.76809 6.59551 3.88572 6.54797 4.00774 6.55007C4.12975 6.55216 4.24568 6.60372 4.32895 6.69293L7.87355 10.4901L10.6818 7.6818C10.8575 7.50607 11.1425 7.50607 11.3182 7.6818L13 9.3636V2.5C13 2.22386 12.7761 2 12.5 2H2.5ZM2 12.5V9.6364L3.98887 7.64753L7.5311 11.4421L8.94113 13H2.5C2.22386 13 2 12.7761 2 12.5ZM12.5 13H10.155L8.48336 11.153L11 8.6364L13 10.6364V12.5C13 12.7761 12.7761 13 12.5 13ZM6.64922 5.5C6.64922 5.03013 7.03013 4.64922 7.5 4.64922C7.96987 4.64922 8.35078 5.03013 8.35078 5.5C8.35078 5.96987 7.96987 6.35078 7.5 6.35078C7.03013 6.35078 6.64922 5.96987 6.64922 5.5ZM7.5 3.74922C6.53307 3.74922 5.74922 4.53307 5.74922 5.5C5.74922 6.46693 6.53307 7.25078 7.5 7.25078C8.46693 7.25078 9.25078 6.46693 9.25078 5.5C9.25078 4.53307 8.46693 3.74922 7.5 3.74922Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))});const cA=()=>C.createElement("div",{className:te.imagePlaceholder},C.createElement(qee,null));function QS(t){const{nodeKey:e,imageSource:n,initialImagePath:i,title:r,alt:s,width:o,height:a}=t,[l,u,c]=Ft(Z2,fn,zn),[h]=qi(),f=Tt(F2),p=Ht();return C.createElement("div",{className:te.editImageToolbar},C.createElement("button",{className:te.iconButton,type:"button",title:p("imageEditor.deleteImage","Delete image"),disabled:c,onClick:m=>{m.preventDefault(),h.update(()=>{var g;(g=st(e))==null||g.remove()})}},u("delete_small")),!l&&C.createElement("button",{type:"button",className:yt(te.iconButton,te.editImageButton),title:p("imageEditor.editImage","Edit image"),disabled:c,onClick:()=>{f({nodeKey:e,initialValues:{src:i??n,title:r,altText:s,width:wu(o),height:wu(a)}})}},u("settings")))}var Yee=Object.defineProperty,cs=(t,e)=>Yee(t,"name",{value:e,configurable:!0}),p2="Dialog",[O7,m1e]=Bs(p2),[Gee,_o]=O7(p2),m2=cs(t=>{const{__scopeDialog:e,children:n,open:i,defaultOpen:r,onOpenChange:s,modal:o=!0}=t,a=R.useRef(null),l=R.useRef(null),[u,c]=Oo({prop:i,defaultProp:r??!1,onChange:s,caller:p2}),[h,f]=R.useState(0),[p,m]=R.useState(0);return Y.jsx(Gee,{scope:e,triggerRef:a,contentRef:l,contentId:Wo(),titleId:Wo(),descriptionId:Wo(),titlePresent:h>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,open:u,onOpenChange:c,onOpenToggle:R.useCallback(()=>c(g=>!g),[c]),modal:o,children:n})},"Dialog"),Kee="DialogTrigger",Jee=R.forwardRef(cs(function(e,n){const{__scopeDialog:i,...r}=e,s=_o(Kee,i),o=cn(n,s.triggerRef);return Y.jsx(Wt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":ax(s.open),...r,ref:o,onClick:Ot(e.onClick,s.onOpenToggle)})},"DialogTrigger")),x7="DialogPortal",[ete,y7]=O7(x7,{forceMount:void 0}),g2=cs(t=>{const{__scopeDialog:e,forceMount:n,children:i,container:r}=t,s=_o(x7,e);return Y.jsx(ete,{scope:e,forceMount:n,children:R.Children.map(i,o=>Y.jsx(Cl,{present:n||s.open,children:Y.jsx(K1,{asChild:!0,container:r,children:o})}))})},"DialogPortal"),VS="DialogOverlay",O2=R.forwardRef(cs(function(e,n){const i=y7(VS,e.__scopeDialog),{forceMount:r=i.forceMount,...s}=e,o=_o(VS,e.__scopeDialog);return o.modal?Y.jsx(Cl,{present:r||o.open,children:Y.jsx(nte,{...s,ref:n})}):null},"DialogOverlay")),tte=ra("DialogOverlay.RemoveScroll"),nte=R.forwardRef(cs(function(e,n){const{__scopeDialog:i,...r}=e,s=_o(VS,i),o=oM(),a=cn(n,o);return Y.jsx(dC,{as:tte,allowPinchZoom:!0,shards:[s.contentRef],children:Y.jsx(Wt.div,{"data-state":ax(s.open),...r,ref:a,style:{pointerEvents:"auto",...r.style}})})},"DialogOverlayImpl")),Ud="DialogContent",x2=R.forwardRef(cs(function(e,n){const i=y7(Ud,e.__scopeDialog),{forceMount:r=i.forceMount,...s}=e,o=_o(Ud,e.__scopeDialog);return Y.jsx(Cl,{present:r||o.open,children:o.modal?Y.jsx(ite,{...s,ref:n}):Y.jsx(rte,{...s,ref:n})})},"DialogContent")),ite=R.forwardRef(cs(function(e,n){const i=_o(Ud,e.__scopeDialog),r=R.useRef(null),s=cn(n,i.contentRef,r);return R.useEffect(()=>{const o=r.current;if(o)return fC(o)},[]),Y.jsx(v7,{...e,ref:s,trapFocus:i.open,disableOutsidePointerEvents:i.open,onCloseAutoFocus:Ot(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=i.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Ot(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0;(a.button===2||l)&&o.preventDefault()}),onFocusOutside:Ot(e.onFocusOutside,o=>o.preventDefault())})},"DialogContentModal")),rte=R.forwardRef(cs(function(e,n){const i=_o(Ud,e.__scopeDialog),r=R.useRef(!1),s=R.useRef(!1);return Y.jsx(v7,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var a,l;(a=e.onCloseAutoFocus)==null||a.call(e,o),o.defaultPrevented||(r.current||(l=i.triggerRef.current)==null||l.focus(),o.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:o=>{var u,c;(u=e.onInteractOutside)==null||u.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=o.target;((c=i.triggerRef.current)==null?void 0:c.contains(a))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})},"DialogContentNonModal")),v7=R.forwardRef(cs(function(e,n){const{__scopeDialog:i,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:o,...a}=e,l=_o(Ud,i);return im(),Y.jsx(Y.Fragment,{children:Y.jsx(e2,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:o,children:Y.jsx(q1,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionPresent?l.descriptionId:void 0,"aria-labelledby":l.titlePresent?l.titleId:void 0,"data-state":ax(l.open),...a,ref:n,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1)})})})},"DialogContentImpl")),ste="DialogTitle",b7=R.forwardRef(cs(function(e,n){const{__scopeDialog:i,...r}=e,s=_o(ste,i),{setTitleCount:o}=s;return ci(()=>(o(a=>a+1),()=>o(a=>a-1)),[o]),Y.jsx(Wt.h2,{id:s.titleId,...r,ref:n})},"DialogTitle")),ote="DialogClose",y2=R.forwardRef(cs(function(e,n){const{__scopeDialog:i,...r}=e,s=_o(ote,i);return Y.jsx(Wt.button,{type:"button",...r,ref:n,onClick:Ot(e.onClick,()=>s.onOpenChange(!1))})},"DialogClose"));function ax(t){return t?"open":"closed"}cs(ax,"getState");var lm=t=>t.type==="checkbox",lx=t=>t.type==="file",Da=t=>t instanceof Date,pi=t=>t==null;const v2=t=>typeof t=="object";var Pn=t=>!pi(t)&&!Array.isArray(t)&&v2(t)&&!Da(t),BS=t=>Pn(t)&&t.target?lm(t.target)?t.target.checked:lx(t.target)?t.target.files:t.target.value:t,S7=(t,e)=>e.split(".").some((n,i,r)=>!isNaN(Number(n))&&t.has(r.slice(0,i).join("."))),_7=t=>{const e=t.constructor&&t.constructor.prototype;return Pn(e)&&e.hasOwnProperty("isPrototypeOf")},ux=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Yt(t){if(t instanceof Date)return new Date(t);const e=typeof FileList<"u"&&t instanceof FileList;if(ux&&(t instanceof Blob||e))return t;const n=Array.isArray(t);if(!n&&!(Pn(t)&&_7(t)))return t;const i=n?[]:Object.create(Object.getPrototypeOf(t));for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=Yt(t[r]));return i}const Ta={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},Wr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},vs={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},C7="root",b2=["__proto__","constructor","prototype"],ate=/^\w*$/;var um=t=>ate.test(t),Zt=t=>t===void 0;const lte=/[.[\]'"]/;var cx=t=>t.split(lte).filter(Boolean),ke=(t,e,n)=>{if(!e||!Pn(t))return n;const i=um(e)?[e]:cx(e);if(i.some(s=>b2.includes(s)))return n;const r=i.reduce((s,o)=>pi(s)?void 0:s[o],t);return Zt(r)||r===t?Zt(t[e])?n:t[e]:r},er=t=>typeof t=="boolean",Pi=t=>typeof t=="function",qt=(t,e,n)=>{let i=-1;const r=um(e)?[e]:cx(e),s=r.length,o=s-1;for(;++i<s;){const a=r[i];let l=n;if(i!==o){const u=t[a];l=Pn(u)||Array.isArray(u)?u:isNaN(+r[i+1])?{}:[]}if(b2.includes(a))return;t[a]=l,t=t[a]}};const w7=C.createContext(null);w7.displayName="HookFormControlContext";const hx=()=>C.useContext(w7);var k7=(t,e,n,i=!0)=>{const r={};for(const s in t)Object.defineProperty(r,s,{get:()=>{const o=s;return e._proxyFormState[o]!==Wr.all&&(e._proxyFormState[o]=!i||Wr.all),n&&(n[o]=!0),t[o]}});return r};const fx=ux?C.useLayoutEffect:C.useEffect;function ute(t){const e=hx(),{control:n=e,disabled:i,name:r,exact:s}=t||{},[o,a]=C.useState(()=>({...n._formState,defaultValues:n._defaultValues})),l=C.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return fx(()=>n._subscribe({name:r,formState:l.current,exact:s,callback:u=>{!i&&a({...n._formState,...u,defaultValues:n._defaultValues})}}),[r,i,s]),C.useEffect(()=>{l.current.isValid&&n._setValid(!0)},[n]),C.useMemo(()=>k7(o,n,l.current,!1),[o,n])}var gi=t=>typeof t=="string",FS=(t,e,n,i,r)=>gi(t)?(i&&e.watch.add(t),ke(n,t,r)):Array.isArray(t)?t.map(s=>(i&&e.watch.add(s),ke(n,s))):(i&&(e.watchAll=!0),n),jS=t=>pi(t)||!v2(t);const hA=(t,e)=>e.length===0&&!Array.isArray(t)&&!_7(t);function _r(t,e,n=new WeakMap){if(t===e)return!0;if(jS(t)||jS(e))return Object.is(t,e);if(Da(t)&&Da(e))return Object.is(t.getTime(),e.getTime());const i=Object.keys(t),r=Object.keys(e);if(i.length!==r.length)return!1;if(hA(t,i)||hA(e,r))return Object.is(t,e);if(!i.length&&Array.isArray(t)!==Array.isArray(e))return!1;const s=n.get(t);if(s&&s.has(e))return!0;if(s)s.add(e);else{const o=new WeakSet;o.add(e),n.set(t,o)}for(const o of i){const a=t[o];if(!(o in e))return!1;if(o!=="ref"){const l=e[o];if(Da(a)&&Da(l)||(Pn(a)||Array.isArray(a))&&(Pn(l)||Array.isArray(l))?!_r(a,l,n):!Object.is(a,l))return!1}}return!0}function cte(t){const e=hx(),{control:n=e,name:i,defaultValue:r,disabled:s,exact:o,compute:a}=t||{},l=C.useRef(r),u=C.useRef(a),c=C.useRef(void 0),h=C.useRef(n),f=C.useRef(i);u.current=a;const[p,m]=C.useState(()=>{const k=n._getWatch(i,l.current);return u.current?u.current(k):k}),g=C.useCallback(k=>{const w=FS(i,n._names,k||n._formValues,!1,l.current);return u.current?u.current(w):w},[n._formValues,n._names,i]),x=C.useCallback(k=>{if(!s){const w=FS(i,n._names,k||n._formValues,!1,l.current);if(u.current){const b=u.current(w);_r(b,c.current)||(m(b),c.current=b)}else m(w)}},[n._formValues,n._names,s,i]);fx(()=>((h.current!==n||!_r(f.current,i))&&(h.current=n,f.current=i,x()),n._subscribe({name:i,formState:{values:!0},exact:o,callback:k=>{x(k.values)}})),[n,o,i,x]),C.useEffect(()=>n._removeUnmounted());const y=h.current!==n,S=f.current,_=C.useMemo(()=>{if(s)return null;const k=!y&&!_r(S,i);return y||k?g():null},[s,y,i,S,g]);return _!==null?_:p}function hte(t){const e=hx(),{name:n,disabled:i,control:r=e,shouldUnregister:s,defaultValue:o,exact:a=!0}=t,l=S7(r._names.array,n),u=C.useMemo(()=>ke(r._formValues,n,ke(r._defaultValues,n,o)),[r,n,o]),c=cte({control:r,name:n,defaultValue:u,exact:a}),h=ute({control:r,name:n,exact:a}),f=C.useRef(t),p=C.useRef(null),m=C.useRef(r.register(n,{...t.rules,value:c,...er(t.disabled)?{disabled:t.disabled}:{}}));f.current=t;const g=C.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!ke(h.errors,n)},isDirty:{enumerable:!0,get:()=>!!ke(h.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!ke(h.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!ke(h.validatingFields,n)},error:{enumerable:!0,get:()=>ke(h.errors,n)}}),[h,n]),x=C.useCallback(k=>{const w=BS(k);return ke(r._fields,n)||(m.current=r.register(n,{...f.current.rules,value:w})),m.current.onChange({target:{value:BS(k),name:n},type:Ta.CHANGE})},[n,r]),y=C.useCallback(()=>m.current.onBlur({target:{value:ke(r._formValues,n),name:n},type:Ta.BLUR}),[n,r._formValues]),S=C.useCallback(k=>{k&&(p.current={focus:()=>Pi(k.focus)&&k.focus(),select:()=>Pi(k.select)&&k.select(),setCustomValidity:b=>Pi(k.setCustomValidity)&&k.setCustomValidity(b),reportValidity:()=>Pi(k.reportValidity)&&k.reportValidity()});const w=ke(r._fields,n);w&&w._f&&k&&(w._f.ref=p.current)},[r._fields,n]),_=C.useMemo(()=>({name:n,value:c,...er(i)||h.disabled?{disabled:h.disabled||i}:{},onChange:x,onBlur:y,ref:S}),[n,i,h.disabled,x,y,S,c]);return C.useEffect(()=>{const k=r._options.shouldUnregister||s;m.current=r.register(n,{...f.current.rules,...er(f.current.disabled)?{disabled:f.current.disabled}:{}});const w=(b,E)=>{const P=ke(r._fields,b);P&&P._f&&(P._f.mount=E)};if(w(n,!0),k){const b=Yt(ke(s?r._defaultValues:r._options.values||r._defaultValues,n,ke(r._options.defaultValues,n,f.current.defaultValue)));qt(r._defaultValues,n,b),Zt(ke(r._formValues,n))&&qt(r._formValues,n,b)}if(!l&&r.register(n),p.current){const b=ke(r._fields,n);b&&b._f&&(b._f.ref=p.current)}return()=>{(l?k&&!r._state.action:k)?r.unregister(n):w(n,!1)}},[n,r,l,s]),C.useEffect(()=>{r._setDisabledField({disabled:i,name:n})},[i,n,r]),C.useMemo(()=>({field:_,formState:h,fieldState:g}),[_,h,g])}const fte=t=>t.render(hte(t));var _a=()=>{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();const t=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const n=(Math.random()*16+t)%16|0;return(e=="x"?n:n&3|8).toString(16)})},Py=(t,e,n={})=>n.shouldFocus||Zt(n.shouldFocus)?n.focusName||`${t}.${Zt(n.focusIndex)?e:n.focusIndex}.`:"",Qa=t=>({isOnSubmit:!t||t===Wr.onSubmit,isOnBlur:t===Wr.onBlur,isOnChange:t===Wr.onChange,isOnAll:t===Wr.all,isOnTouch:t===Wr.onTouched}),r0=(t,e,n)=>{if(n)return!1;if(e.watchAll||e.watch.has(t))return!0;for(const i of e.watch)if(t.startsWith(i)&&t.charAt(i.length)===".")return!0;return!1};const Vc=(t,e,n,i)=>{for(const r of n||Object.keys(t)){const s=ke(t,r);if(s){const{_f:o,...a}=s;if(o){if(o.refs&&o.refs[0]&&e(o.refs[0],r)&&!i)return!0;if(o.ref&&e(o.ref,o.name)&&!i)return!0;if(Vc(a,e))break}else if(Pn(a)&&Vc(a,e))break}}};var sO=(t,e,n)=>{const i=ke(t,n),r=Array.isArray(i)?i:[];return qt(r,C7,e[n]),qt(t,n,r),t},Jn=t=>Pn(t)&&!Object.keys(t).length,oO=t=>{if(!ux)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},S2=t=>t.type==="radio",aO=t=>t instanceof RegExp,dte=(t,e,n,i,r)=>e?{...n[t],types:{...n[t]&&n[t].types?n[t].types:{},[i]:r||!0}}:{};const fA={value:!1,isValid:!1},dA={value:!0,isValid:!0};var E7=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!Zt(t[0].attributes.value)?Zt(t[0].value)||t[0].value===""?dA:{value:t[0].value,isValid:!0}:dA:fA}return fA};const pA={isValid:!1,value:null};var T7=t=>Array.isArray(t)?t.reduce((e,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:e,pA):pA;function mA(t,e,n="validate"){if(gi(t)||Array.isArray(t)&&t.every(gi)||er(t)&&!t)return{type:n,message:gi(t)?t:"",ref:e}}var hc=t=>Pn(t)&&!aO(t)?t:{value:t,message:""},ZS=async(t,e,n,i,r,s)=>{const{ref:o,refs:a,required:l,maxLength:u,minLength:c,min:h,max:f,pattern:p,validate:m,name:g,valueAsNumber:x,mount:y}=t._f,S=ke(n,g);if(!y||e.has(g))return{};const _=a?a[0]:o,k=j=>{if(r&&_.reportValidity){const Z=er(j)?"":j||"";a?a.forEach(G=>G.setCustomValidity(Z)):_.setCustomValidity(Z),_.reportValidity()}},w={},b=S2(o),E=lm(o),P=b||E,$=(x||lx(o))&&Zt(o.value)&&Zt(S)||oO(o)&&o.value===""||S===""||Array.isArray(S)&&!S.length,B=dte.bind(null,g,i,w),X=(j,Z,G,z=vs.maxLength,J=vs.minLength)=>{const ue=j?Z:G;w[g]={type:j?z:J,message:ue,ref:o,...B(j?z:J,ue)}};if(s?!Array.isArray(S)||!S.length:l&&(!P&&($||pi(S))||er(S)&&!S||E&&!E7(a).isValid||b&&!T7(a).isValid)){const{value:j,message:Z}=gi(l)?{value:!!l,message:l}:hc(l);if(j&&(w[g]={type:vs.required,message:Z,ref:_,...B(vs.required,Z)},!i))return k(Z),w}if(!$&&(!pi(h)||!pi(f))){let j,Z;const G=hc(f),z=hc(h);if(!pi(S)&&!isNaN(S)){const J=o.valueAsNumber||S&&+S;pi(G.value)||(j=J>G.value),pi(z.value)||(Z=J<z.value)}else{const J=o.valueAsDate||new Date(S),ue=xe=>new Date(new Date().toDateString()+" "+xe),Le=o.type=="time",ye=o.type=="week";gi(G.value)&&S&&(j=Le?ue(S)>ue(G.value):ye?S>G.value:J>new Date(G.value)),gi(z.value)&&S&&(Z=Le?ue(S)<ue(z.value):ye?S<z.value:J<new Date(z.value))}if((j||Z)&&(X(!!j,G.message,z.message,vs.max,vs.min),!i))return k(w[g].message),w}if((u||c)&&!$&&(gi(S)||s&&Array.isArray(S))){const j=hc(u),Z=hc(c),G=!pi(j.value)&&S.length>+j.value,z=!pi(Z.value)&&S.length<+Z.value;if((G||z)&&(X(G,j.message,Z.message),!i))return k(w[g].message),w}if(p&&!$&&gi(S)){const{value:j,message:Z}=hc(p);if(aO(j)&&!S.match(j)&&(w[g]={type:vs.pattern,message:Z,ref:o,...B(vs.pattern,Z)},!i))return k(Z),w}if(m){if(Pi(m)){const j=await m(S,n),Z=mA(j,_);if(Z&&(w[g]={...Z,...B(vs.validate,Z.message)},!i))return k(Z.message),w}else if(Pn(m)){let j={};for(const Z in m){if(!Jn(j)&&!i)break;const G=mA(await m[Z](S,n),_,Z);G&&(j={...G,...B(Z,G.message)},k(G.message),i&&(w[g]=j))}if(!Jn(j)&&(w[g]={ref:_,...j},!i))return w}}return k(!0),w},kr=t=>Array.isArray(t)?t:[t],Ay=(t,e)=>[...t,...kr(e)],$y=t=>Array.isArray(t)?t.map(()=>{}):void 0;function Iy(t,e,n){return[...t.slice(0,e),...kr(n),...t.slice(e)]}var Ry=(t,e,n)=>Array.isArray(t)?(Zt(t[n])&&(t[n]=void 0),t.splice(n,0,t.splice(e,1)[0]),t):[],My=(t,e)=>[...kr(e),...kr(t)],_2=t=>Array.isArray(t)?t.filter(Boolean):[];function pte(t,e){let n=0;const i=[...t];for(const r of e)i.splice(r-n,1),n++;return _2(i).length?i:[]}var Ny=(t,e)=>Zt(e)?[]:pte(t,kr(e).sort((n,i)=>n-i)),Ly=(t,e,n)=>{[t[e],t[n]]=[t[n],t[e]]};function mte(t,e){const n=e.slice(0,-1).length;let i=0;for(;i<n;){if(pi(t)){t=void 0;break}t=t[e[i]],i++}return t}function gte(t){for(const e in t)if(t.hasOwnProperty(e)&&!Zt(t[e]))return!1;return!0}function In(t,e){if(gi(e)&&Object.prototype.hasOwnProperty.call(t,e))return delete t[e],t;const n=Array.isArray(e)?e:um(e)?[e]:cx(e);if(n.some(o=>b2.includes(String(o))))return t;const i=n.length===1?t:mte(t,n),r=n.length-1,s=n[r];return i&&delete i[s],r!==0&&(Pn(i)&&Jn(i)||Array.isArray(i)&>e(i))&&In(t,n.slice(0,-1)),t}var gA=(t,e,n)=>(t[e]=n,t);function Ote(t){const e=hx(),{control:n=e,name:i,keyName:r="id",disabled:s,shouldUnregister:o,rules:a}=t,[l,u]=C.useState(n._getFieldArray(i)),c=C.useRef(n._getFieldArray(i).map(_a)),h=C.useRef(!1);s||n._names.array.add(i),C.useMemo(()=>!s&&a&&l.length>=0&&n.register(i,a),[n,i,l.length,a,s]),fx(()=>{if(!s)return n._subjects.array.subscribe({next:({values:w,name:b})=>{if(b===i||!b){const E=ke(w,i);Array.isArray(E)?(u(E),c.current=E.map(_a)):b||(u([]),c.current=[])}}}).unsubscribe},[n,i,s]);const f=C.useCallback(w=>{h.current=!0,n._setFieldArray(i,w)},[n,i]),p=(w,b)=>{if(s)return;const E=kr(Yt(w)),P=Ay(n._getFieldArray(i),E);n._names.focus=Py(i,P.length-1,b),c.current=Ay(c.current,E.map(_a)),f(P),u(P),n._setFieldArray(i,P,Ay,{argA:$y(w)})},m=(w,b)=>{if(s)return;const E=kr(Yt(w)),P=My(n._getFieldArray(i),E);n._names.focus=Py(i,0,b),c.current=My(c.current,E.map(_a)),f(P),u(P),n._setFieldArray(i,P,My,{argA:$y(w)})},g=w=>{if(s)return;const b=Ny(n._getFieldArray(i),w);c.current=Ny(c.current,w),f(b),u(b),!Array.isArray(ke(n._fields,i))&&qt(n._fields,i,void 0),n._setFieldArray(i,b,Ny,{argA:w})},x=(w,b,E)=>{if(s)return;const P=kr(Yt(b)),$=Iy(n._getFieldArray(i),w,P);n._names.focus=Py(i,w,E),c.current=Iy(c.current,w,P.map(_a)),f($),u($),n._setFieldArray(i,$,Iy,{argA:w,argB:$y(b)})},y=(w,b)=>{if(s)return;const E=n._getFieldArray(i);Ly(E,w,b),Ly(c.current,w,b),f(E),u(E),n._setFieldArray(i,E,Ly,{argA:w,argB:b},!1)},S=(w,b)=>{if(s)return;const E=n._getFieldArray(i);Ry(E,w,b),Ry(c.current,w,b),f(E),u(E),n._setFieldArray(i,E,Ry,{argA:w,argB:b},!1)},_=(w,b)=>{if(s)return;const E=Yt(b),P=gA(n._getFieldArray(i),w,E);c.current=[...P].map(($,B)=>!$||B===w?_a():c.current[B]),f(P),u([...P]),n._setFieldArray(i,P,gA,{argA:w,argB:E},!0,!1)},k=w=>{if(s)return;const b=kr(Yt(w));c.current=b.map(_a),f([...b]),u([...b]),n._setFieldArray(i,[...b],E=>E,{},!0,!1)};return C.useEffect(()=>{if(s)return;n._state.action=!1,r0(i,n._names)&&n._subjects.state.next({...n._formState});const w=Qa(n._options.mode);if(h.current&&(!w.isOnSubmit||n._formState.isSubmitted)&&!Qa(n._options.reValidateMode).isOnSubmit&&!w.isOnBlur)if(n._options.resolver)n._runSchema([i]).then(b=>{var E,P;n._updateIsValidating([i]);const $=ke(b.errors,i),B=ke(n._formState.errors,i),X=B&&(B.type||((E=B.root)===null||E===void 0?void 0:E.type)),j=B&&(B.message||((P=B.root)===null||P===void 0?void 0:P.message));(B?!$&&X||$&&(X!==$.type||j!==$.message):$&&$.type)&&($?Pn($)&&!Object.keys($).some(Z=>!Number.isNaN(+Z))?sO(n._formState.errors,{[i]:$},i):qt(n._formState.errors,i,$):In(n._formState.errors,i),n._subjects.state.next({errors:n._formState.errors}))});else{const b=ke(n._fields,i);b&&b._f&&!(Qa(n._options.reValidateMode).isOnSubmit&&Qa(n._options.mode).isOnSubmit)&&ZS(b,n._names.disabled,n._formValues,n._options.criteriaMode===Wr.all,n._options.shouldUseNativeValidation,!0).then(E=>!Jn(E)&&n._subjects.state.next({errors:sO(n._formState.errors,E,i)}))}h.current&&n._subjects.state.next({name:i,values:Yt(n._formValues)}),n._names.focus&&Vc(n._fields,(b,E)=>{if(n._names.focus&&E.startsWith(n._names.focus)&&b.focus)return b.focus(),1}),n._names.focus="",n._setValid(),h.current=!1},[l,i,n,s]),C.useEffect(()=>(s||!ke(n._formValues,i)&&n._setFieldArray(i),()=>{if(s)return;const w=!(n._options.shouldUnregister||o),b=(E,P)=>{const $=ke(n._fields,E);$&&$._f&&($._f.mount=P)};h.current&&w&&n._subjects.state.next({name:i,values:Yt(n._formValues)}),w?b(i,!1):n.unregister(i)}),[i,n,r,o,s]),{swap:C.useCallback(y,[f,i,n,s]),move:C.useCallback(S,[f,i,n,s]),prepend:C.useCallback(m,[f,i,n,s]),append:C.useCallback(p,[f,i,n,s]),remove:C.useCallback(g,[f,i,n,s]),insert:C.useCallback(x,[f,i,n,s]),update:C.useCallback(_,[f,i,n,s]),replace:C.useCallback(k,[f,i,n,s]),fields:C.useMemo(()=>l.map((w,b)=>({...w,...er(s)?{disabled:s}:{},[r]:c.current[b]||_a()})),[l,r,s])}}const P7=t=>{const e={};for(const n of Object.keys(t))if(v2(t[n])&&t[n]!==null&&!Da(t[n])){const i=P7(t[n]);for(const r of Object.keys(i))e[`${n}.${r}`]=i[r]}else e[n]=t[n];return e},xte=C.createContext(null);xte.displayName="HookFormContext";var OA=()=>{let t=[];return{get observers(){return t},next:r=>{for(const s of t)s.next&&s.next(r)},subscribe:r=>(t.push(r),{unsubscribe:()=>{t=t.filter(s=>s!==r)}}),unsubscribe:()=>{t=[]}}};function A7(t,e){const n={};for(const i in t)if(t.hasOwnProperty(i)){const r=t[i],s=e[i];if(r&&Pn(r)&&s){const o=A7(r,s);Pn(o)&&(n[i]=o)}else t[i]&&(n[i]=s)}return n}var $7=t=>t.type==="select-multiple",yte=t=>S2(t)||lm(t),Dy=t=>oO(t)&&t.isConnected,vte=t=>{for(const e in t)if(Pi(t[e]))return!0;return!1};function I7(t){return Array.isArray(t)||Pn(t)&&!vte(t)}function R7(t){return!!(t&&"_f"in t)}function M7(t){return Array.isArray(t)?!t.some(e=>!Zt(e)):!Object.keys(t).length}function zS(t,e){Array.isArray(t)?t[e]=void 0:delete t[e]}function XS(t,e={},n){for(const i in t){const r=t[i],s=n&&n[i];I7(r)&&(!Array.isArray(r)||!R7(s))?(e[i]=Array.isArray(r)?[]:{},XS(r,e[i],s),M7(e[i])&&zS(e,i)):Zt(r)||(e[i]=!0)}return e}function Vl(t,e,n,i){n||(n=XS(e,{},i));for(const r in t){const s=t[r],o=i&&i[r];I7(s)&&(!Array.isArray(s)||!R7(o))?(Zt(e)||jS(n[r])?n[r]=XS(s,Array.isArray(s)?[]:{},o):Vl(s,pi(e)?{}:e[r],n[r],o),M7(n[r])&&zS(n,r)):_r(s,e[r])?zS(n,r):n[r]=!0}return n}var N7=(t,{valueAsNumber:e,valueAsDate:n,setValueAs:i})=>Zt(t)?t:e?t===""?NaN:t&&+t:n&&gi(t)?new Date(t):i?i(t):t;function xA(t){const e=t.ref;return lx(e)?e.files:S2(e)?T7(t.refs).value:$7(e)?[...e.selectedOptions].map(({value:n})=>n):lm(e)?E7(t.refs).value:N7(Zt(e.value)?t.ref.value:e.value,t)}var bte=(t,e,n,i)=>{const r={};for(const s of t){const o=ke(e,s);o&&qt(r,s,o._f)}return{criteriaMode:n,names:[...t],fields:r,shouldUseNativeValidation:i}},$f=t=>Zt(t)?t:aO(t)?t.source:Pn(t)?aO(t.value)?t.value.source:t.value:t;const yA="AsyncFunction";var Ste=t=>{if(!t||!t.validate)return!1;if(Pi(t.validate))return t.validate.constructor.name===yA;if(Pn(t.validate)){for(const e in t.validate)if(t.validate[e].constructor.name===yA)return!0}return!1},_te=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate);function vA(t,e,n){const i=ke(t,n);if(i||um(n))return{error:i,name:n};const r=n.split(".");for(;r.length;){const s=r.join("."),o=ke(e,s),a=ke(t,s);if(o&&!Array.isArray(o)&&n!==s)return{name:n};if(a&&a.type)return{name:s,error:a};if(a&&a.root&&a.root.type)return{name:`${s}.root`,error:a.root};r.pop()}return{name:n}}var Cte=(t,e,n,i)=>{n(t);const{name:r,...s}=t,o=Object.keys(s);return!o.length||i&&o.length>=Object.keys(e).length||o.find(a=>e[a]===(!i||Wr.all))},wte=(t,e,n)=>!t||!e||t===e||kr(t).some(i=>i&&(n?i===e||i.startsWith(e+"."):i.startsWith(e)||e.startsWith(i))),kte=(t,e,n,i,r)=>r.isOnAll?!1:!n&&r.isOnTouch?!(e||t):(n?i.isOnBlur:r.isOnBlur)?!t:(n?i.isOnChange:r.isOnChange)?t:!0,Ete=(t,e)=>!_2(ke(t,e)).length&&In(t,e);const Tte={mode:Wr.onSubmit,reValidateMode:Wr.onChange,shouldFocusError:!0},Qy="form",Pte=(t,e)=>{for(const n in t)n in e||delete t[n];Object.assign(t,e)},L7={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function Ate(t={}){let e={...Tte,...t},n={...Yt(L7),isLoading:Pi(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1},i={},r=Pn(e.defaultValues)||Pn(e.values)?Yt(e.defaultValues||e.values)||{}:{},s=e.shouldUnregister?{}:Yt(r),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set};const l={},u={};let c=0,h=Qa(e.mode),f=Qa(e.reValidateMode);const p={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},m={...p};let g={...m};const x={array:OA(),state:OA()};let y=0;const S=e.criteriaMode===Wr.all,_=(M,D)=>L=>{clearTimeout(u[M]),u[M]=setTimeout(D,L)},k=async M=>{if(!o.keepIsValid&&!e.disabled&&(m.isValid||g.isValid||M)){const D=++y;let L;e.resolver?(L=Jn((await G()).errors),D===y&&w()):L=await ue({fields:i,onlyCheckValid:!0,eventType:Ta.VALID}),D===y&&L!==n.isValid&&x.state.next({isValid:L})}},w=(M,D)=>{!e.disabled&&(m.isValidating||m.validatingFields||g.isValidating||g.validatingFields)&&((M||Array.from(a.mount)).forEach(L=>{L&&(D?qt(n.validatingFields,L,D):In(n.validatingFields,L))}),x.state.next({validatingFields:n.validatingFields,isValidating:!Jn(n.validatingFields)}))},b=()=>{n.dirtyFields=Vl(r,s,void 0,i)},E=(M,D=[],L,A,F=!0,K=!0)=>{if(A&&L&&!e.disabled){if(o.action=!0,K&&Array.isArray(ke(i,M))){const H=L(ke(i,M),A.argA,A.argB);F&&qt(i,M,H)}if(K&&Array.isArray(ke(n.errors,M))){const H=L(ke(n.errors,M),A.argA,A.argB);F&&qt(n.errors,M,H),Ete(n.errors,M)}if((m.touchedFields||g.touchedFields)&&K&&Array.isArray(ke(n.touchedFields,M))){const H=L(ke(n.touchedFields,M),A.argA,A.argB);F&&qt(n.touchedFields,M,H)}(m.dirtyFields||g.dirtyFields)&&b(),x.state.next({name:M,isDirty:ye(M,D),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else qt(s,M,D)},P=(M,D)=>{qt(n.errors,M,D),n.errors={...n.errors},x.state.next({errors:n.errors})},$=M=>{n.errors=M,x.state.next({errors:n.errors,isValid:!1})},B=M=>{const D=um(M)?[M]:cx(M);let L=s,A=r;for(let F=0;F<D.length-1;F++){const K=D[F];if(L=pi(L)?L:L[K],A=pi(A)?A:A[K],L===null&&A!==null)return!0}return!1},X=(M,D,L,A)=>{const F=ke(i,M);if(F){if(B(M))return;const K=Zt(ke(s,M)),H=ke(s,M,Zt(L)?ke(r,M):L);Zt(H)||A&&A.defaultChecked||D?qt(s,M,D?H:xA(F._f)):Ae(M,H),o.mount&&!o.action&&(k(),K&&n.isDirty&&(m.isDirty||g.isDirty)&&(ye()||(n.isDirty=!1,x.state.next({...n}))),t.shouldUnregister&&K&&!Zt(ke(s,M))&&r0(M,a)&&(o.watch=!0))}},j=(M,D,L,A,F)=>{let K=!1,H=!1;const q={name:M};if(!e.disabled||A===!0){if(!L||A){const re=_r(ke(r,M),D);(m.isDirty||g.isDirty)&&(H=n.isDirty,n.isDirty=q.isDirty=!re||ye(),K=H!==q.isDirty),H=!!ke(n.dirtyFields,M),re!==n.isDirty?Pte(n.dirtyFields,Vl(r,s,void 0,i)):re?In(n.dirtyFields,M):qt(n.dirtyFields,M,!0),q.dirtyFields=n.dirtyFields,K=K||(m.dirtyFields||g.dirtyFields)&&H!==!re}if(L){const re=ke(n.touchedFields,M);re||(qt(n.touchedFields,M,L),q.touchedFields=n.touchedFields,K=K||(m.touchedFields||g.touchedFields)&&re!==L)}K&&F&&x.state.next(q)}return K?q:{}},Z=(M,D,L,A)=>{const F=ke(n.errors,M),K=(m.isValid||g.isValid)&&er(D)&&n.isValid!==D;if(e.delayError&&L?(l[M]=_(M,()=>P(M,L)),l[M](e.delayError)):(clearTimeout(u[M]),delete l[M],L?qt(n.errors,M,L):In(n.errors,M),n.errors={...n.errors}),(L?!_r(F,L):F)||!Jn(A)||K){const H={...A,...K&&er(D)?{isValid:D}:{},errors:n.errors,name:M};n={...n,...H},x.state.next(H)}},G=async M=>(w(M,!0),await e.resolver(s,e.context,bte(M||a.mount,i,e.criteriaMode,e.shouldUseNativeValidation))),z=async M=>{const{errors:D}=await G(M);if(w(M),M){for(const L of M){const A=ke(D,L);A?a.array.has(L)&&Pn(A)&&!Object.keys(A).some(F=>!Number.isNaN(Number(F)))?sO(n.errors,{[L]:A},L):qt(n.errors,L,A):In(n.errors,L)}n.errors={...n.errors}}else n.errors=D;return D},J=async({name:M,eventType:D})=>{if(t.validate){const L=await t.validate({formValues:s,formState:n,name:M,eventType:D});if(Pn(L))for(const A in L){const F=L[A];F&&et(`${Qy}.${A}`,{message:gi(F.message)?F.message:"",type:F.type||vs.validate})}else gi(L)||!L?et(Qy,{message:L||"",type:vs.validate}):Ge(Qy);return L}return!0},ue=async({fields:M,onlyCheckValid:D,name:L,eventType:A,context:F={valid:!0,runRootValidation:!1}})=>{if(t.validate&&(F.runRootValidation=!0,!await J({name:L,eventType:A})&&(F.valid=!1,D)))return F.valid;for(const K in M){const H=M[K];if(H){const{_f:q,...re}=H;if(q){const he=a.array.has(q.name),_e=H._f&&Ste(H._f),be=m.validatingFields||m.isValidating||g.validatingFields||g.isValidating;_e&&be&&w([q.name],!0);const Ie=await ZS(H,a.disabled,s,S,e.shouldUseNativeValidation&&!D,he);if(_e&&be&&w([q.name]),Ie[q.name]&&(F.valid=!1,D)||(!D&&(ke(Ie,q.name)?he?sO(n.errors,Ie,q.name):qt(n.errors,q.name,Ie[q.name]):In(n.errors,q.name)),t.shouldUseNativeValidation&&Ie[q.name]))break}!Jn(re)&&await ue({context:F,onlyCheckValid:D,fields:re,name:K,eventType:A})}}return F.valid},Le=()=>{for(const M of a.unMount){const D=ke(i,M);D&&(D._f.refs?D._f.refs.every(L=>!Dy(L)):!Dy(D._f.ref))&&xt(M)}a.unMount=new Set},ye=(M,D)=>(M&&D&&qt(s,M,D),!_r(o.mount?s:r,r)),xe=(M,D,L)=>FS(M,a,{...o.mount?s:Zt(D)?r:gi(M)?{[M]:D}:D},L,D),Re=M=>_2(ke(o.mount?s:r,M,e.shouldUnregister?ke(r,M,[]):[])),Ae=(M,D,L={},A=!1,F=!1)=>{const K=ke(i,M);let H=D;if(K){const q=K._f;q&&(!q.disabled&&qt(s,M,N7(D,q)),H=oO(q.ref)&&pi(D)?"":D,$7(q.ref)?[...q.ref.options].forEach(re=>re.selected=H.includes(re.value)):q.refs?lm(q.ref)?q.refs.forEach(re=>{(!re.defaultChecked||!re.disabled)&&(Array.isArray(H)?re.checked=!!H.find(he=>he===re.value):re.checked=H===re.value||!!H)}):q.refs.forEach(re=>re.checked=re.value===H):lx(q.ref)?q.ref.value="":(q.ref.value=H,!q.ref.type&&!F&&x.state.next({name:M,values:A?s:Yt(s)})))}(L.shouldDirty||L.shouldTouch)&&j(M,H,L.shouldTouch,L.shouldDirty,!F),L.shouldValidate&&ge(M,{delayError:L.delayError})},Be=(M,D,L,A=!1,F=!1)=>{for(const K in D){if(!D.hasOwnProperty(K))return;const H=D[K],q=M+"."+K,re=ke(i,q);(a.array.has(M)||Pn(H)||re&&!re._f)&&!Da(H)?Be(q,H,L,A,F):Ae(q,H,L,A,F)}},lt=(M,D,L,A,F=!1)=>{const K=ke(i,M),H=a.array.has(M),q=A?D:Yt(D),re=ke(s,M),he=_r(re,q);if(he||qt(s,M,q),H)x.array.next({name:M,values:A?s:Yt(s)}),(m.isDirty||m.dirtyFields||g.isDirty||g.dirtyFields)&&L.shouldDirty&&(b(),F||x.state.next({name:M,dirtyFields:n.dirtyFields,isDirty:ye(M,q)}));else{const _e=Array.isArray(q)&&!q.length||Jn(q);!K||K._f||pi(q)||_e?Ae(M,q,L,A,F):Be(M,q,L,A,F)}if(!he&&!F){const _e=r0(M,a),be=A?s:Yt(s);x.state.next({..._e&&n,name:o.mount||_e?M:void 0,values:be})}},qe=(M,D,L={})=>lt(M,D,L,!1),je=(M,D={})=>{const L=Pi(M)?M(s):M;if(!_r(s,L)){s={...s,...L};const A=P7(L);for(const F of a.mount)F in A&<(F,A[F],D,!0,!0);x.state.next({...n,name:void 0,type:void 0,...c?{values:s}:{}}),D.shouldValidate&&k()}},we=async M=>{o.mount=!0;const D=M.target;let L=D.name,A=!0;const F=ke(i,L),K=H=>{A=Number.isNaN(H)||Da(H)&&isNaN(H.getTime())||_r(H,ke(s,L,H))};if(F){let H,q;const re=D.type?xA(F._f):BS(M),he=M.type===Ta.BLUR||M.type===Ta.FOCUS_OUT,_e=!_te(F._f)&&!t.validate&&!e.resolver&&!ke(n.errors,L)&&!F._f.deps,be=_e||kte(he,ke(n.touchedFields,L),n.isSubmitted,f,h),Ie=r0(L,a,he);if(qt(s,L,re),he){if(!D||!D.readOnly){F._f.onBlur&&F._f.onBlur(M);const Me=l[L];Me&&Me(0)}}else F._f.onChange&&F._f.onChange(M);const Pe=j(L,re,he),ct=!Jn(Pe)||Ie;if(!he&&x.state.next({name:L,type:M.type,...c?{values:Yt(s)}:{}}),be)return(!_e||!n.isValid)&&(m.isValid||g.isValid)&&(e.mode==="onBlur"?he&&k():he||k()),ct&&x.state.next({name:L,...Ie?{}:Pe});if(!e.resolver&&t.validate&&await J({name:L,eventType:M.type}),!he&&Ie&&x.state.next({...n}),e.resolver){const{errors:Me}=await G([L]);if(w([L]),K(re),!A){!Jn(Pe)&&x.state.next(Pe);return}const Al=vA(n.errors,i,L),Qr=vA(Me,i,Al.name||L);H=Qr.error,L=Qr.name,q=Jn(Me)}else w([L],!0),H=(await ZS(F,a.disabled,s,S,e.shouldUseNativeValidation))[L],w([L]),K(re),A&&(H?q=!1:(m.isValid||g.isValid)&&(q=await ue({fields:i,onlyCheckValid:!0,name:L,eventType:M.type})));A&&(F._f.deps&&(!Array.isArray(F._f.deps)||F._f.deps.length>0)&&ge(F._f.deps),Z(L,q,H,Pe))}},pe=(M,D)=>{if(ke(n.errors,D)&&M.focus)return M.focus(),1},ge=async(M,D={})=>{let L,A;const F=kr(M);if(e.resolver){const K=await z(Zt(M)?M:F);L=Jn(K),A=M?!F.some(H=>ke(K,H)):L}else M?(A=(await Promise.all(F.map(async K=>{const H=ke(i,K);return await ue({fields:H&&H._f?{[K]:H}:H,eventType:Ta.TRIGGER})}))).every(Boolean),!(!A&&!n.isValid)&&k()):A=L=await ue({fields:i,name:M,eventType:Ta.TRIGGER});if(D.delayError&&e.delayError&&gi(M)){const K=ke(n.errors,M);K?(In(n.errors,M),l[M]=_(M,()=>P(M,K)),l[M](e.delayError)):(clearTimeout(u[M]),delete l[M])}return x.state.next({...!gi(M)||(m.isValid||g.isValid)&&L!==n.isValid?{}:{name:M},...e.resolver||!M?{isValid:L}:{},errors:n.errors}),D.shouldFocus&&!A&&Vc(i,pe,M?F:a.mount),A},Ve=(M,D)=>{let L={...o.mount?s:r};return D&&(L=A7(D.dirtyFields?n.dirtyFields:n.touchedFields,L)),Zt(M)?L:gi(M)?ke(L,M):M.map(A=>ke(L,A))},Ze=(M,D)=>({invalid:!!ke((D||n).errors,M),isDirty:!!ke((D||n).dirtyFields,M),error:ke((D||n).errors,M),isValidating:!!ke(n.validatingFields,M),isTouched:!!ke((D||n).touchedFields,M)}),Ge=M=>{const D=M?kr(M):void 0;D==null||D.forEach(L=>In(n.errors,L)),D?D.forEach(L=>{x.state.next({name:L,errors:n.errors})}):(n.errors={},x.state.next({errors:n.errors}))},et=(M,D,L)=>{const A=(ke(i,M,{_f:{}})._f||{}).ref,F=ke(n.errors,M)||{},{ref:K,message:H,type:q,...re}=F;qt(n.errors,M,{...re,...D,ref:A}),x.state.next({name:M,errors:n.errors,isValid:!1}),L&&L.shouldFocus&&A&&A.focus&&A.focus()},Qt=(M,D)=>{if(Pi(M)){c++;const{unsubscribe:L}=x.state.subscribe({next:F=>"values"in F&&M(F.values||xe(void 0,D),F)});let A=!1;return{unsubscribe:()=>{A||(A=!0,c--,L())}}}return xe(M,D,!0)},wt=M=>{var D;const L=!!(!((D=M.formState)===null||D===void 0)&&D.values);L&&c++;const{unsubscribe:A}=x.state.subscribe({next:K=>{if(wte(M.name,K.name,M.exact)&&Cte(K,M.formState||m,Mt,M.reRenderRoot)){const H={...s};M.callback({values:H,...n,...K,defaultValues:r})}}});if(!L)return A;let F=!1;return()=>{F||(F=!0,c--,A())}},Ut=M=>(o.mount=!0,g={...g,...M.formState},wt({...M,formState:{...p,...M.formState}})),xt=(M,D={})=>{for(const L of M?kr(M):a.mount)a.mount.delete(L),a.array.delete(L),D.keepValue||(In(i,L),In(s,L)),!D.keepError&&In(n.errors,L),!D.keepDirty&&In(n.dirtyFields,L),!D.keepTouched&&In(n.touchedFields,L),!D.keepIsValidating&&In(n.validatingFields,L),!e.shouldUnregister&&!D.keepDefaultValue&&In(r,L);x.state.next({values:Yt(s)}),x.state.next({...n,...D.keepDirty?{isDirty:ye()}:{}}),!D.keepIsValid&&k()},dn=({disabled:M,name:D})=>{if(er(M)&&o.mount||M||a.disabled.has(D)){const F=a.disabled.has(D)!==!!M;M?a.disabled.add(D):a.disabled.delete(D),F&&o.mount&&!o.action&&k()}},En=(M,D={})=>{let L=ke(i,M);const A=er(D.disabled)||er(e.disabled),F=!a.registerName.has(M)&&L&&L._f&&!L._f.mount;return qt(i,M,{...L||{},_f:{...L&&L._f?L._f:{ref:{name:M}},name:M,mount:!0,...D}}),a.mount.add(M),L&&!F?dn({disabled:er(D.disabled)?D.disabled:e.disabled,name:M}):X(M,!0,D.value),{...A?{disabled:D.disabled||e.disabled}:{},...e.progressive?{required:!!D.required,min:$f(D.min),max:$f(D.max),minLength:$f(D.minLength),maxLength:$f(D.maxLength),pattern:$f(D.pattern)}:{},name:M,onChange:we,onBlur:we,ref:K=>{if(K){a.registerName.add(M),En(M,D),a.registerName.delete(M),L=ke(i,M);const H=Zt(K.value)&&K.querySelectorAll&&K.querySelectorAll("input,select,textarea")[0]||K,q=yte(H),re=L._f.refs||[];if(q?re.find(_e=>_e===H):H===L._f.ref)return;const he={...L._f};q?(he.refs=[...re.filter(Dy),H,...Array.isArray(ke(r,M))?[{}]:[]],he.ref={type:H.type,name:M}):(he.ref=H,delete he.refs),qt(i,M,{_f:he}),X(M,!1,void 0,H)}else L=ke(i,M,{}),L._f&&(L._f.mount=!1),(e.shouldUnregister||D.shouldUnregister)&&!(S7(a.array,M)&&o.action)&&a.unMount.add(M)}}},Tn=()=>e.shouldFocusError&&!e.shouldUseNativeValidation&&Vc(i,pe,a.mount),pn=M=>{er(M)&&(x.state.next({disabled:M}),Vc(i,(D,L)=>{const A=ke(i,L);A&&(D.disabled=A._f.disabled||M,Array.isArray(A._f.refs)&&A._f.refs.forEach(F=>{F.disabled=A._f.disabled||M}))},0,!1))},An=(M,D)=>async L=>{let A;L&&(L.preventDefault&&L.preventDefault(),L.persist&&L.persist());let F=Yt(s);if(x.state.next({isSubmitting:!0}),e.resolver){const{errors:K,values:H}=await G();w(),n.errors=K,F=Yt(H)}else await ue({fields:i,eventType:Ta.SUBMIT});if(a.disabled.size)for(const K of a.disabled)In(F,K);if(In(n.errors,C7),Jn(n.errors)){x.state.next({errors:{}});try{await M(F,L)}catch(K){A=K}}else D&&await D({...n.errors},L),Tn(),setTimeout(Tn);if(x.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Jn(n.errors)&&!A,submitCount:n.submitCount+1,errors:n.errors}),A)throw A},vn=(M,D={})=>{ke(i,M)&&(Zt(D.defaultValue)?qe(M,Yt(ke(r,M))):(qe(M,D.defaultValue),qt(r,M,Yt(D.defaultValue))),D.keepTouched||In(n.touchedFields,M),D.keepDirty||(In(n.dirtyFields,M),n.isDirty=D.defaultValue?ye(M,Yt(ke(r,M))):ye()),D.keepError||(In(n.errors,M),m.isValid&&k()),x.state.next({...n}))},ft=(M,D={})=>{const L=M?Yt(M):r,A=Yt(L),F=Jn(M),K=A,H=i;if(D.keepDefaultValues||(r=L),!D.keepValues){if(D.keepDirtyValues){const q=new Set([...a.mount,...Object.keys(Vl(r,s,void 0,H))]);for(const re of Array.from(q)){const he=ke(n.dirtyFields,re),_e=ke(s,re),be=ke(K,re);he&&!Zt(_e)?qt(K,re,_e):!he&&!Zt(be)&&qe(re,be)}}else{if(ux&&Zt(M))for(const q of a.mount){const re=ke(i,q);if(re&&re._f){const he=Array.isArray(re._f.refs)?re._f.refs[0]:re._f.ref;if(oO(he)){const _e=he.closest("form");if(_e){_e.reset();break}}}}if(D.keepFieldsRef)for(const q of a.mount)qe(q,ke(K,q));else i={}}if(e.shouldUnregister){if(s=D.keepDefaultValues?Yt(r):{},D.keepFieldsRef)for(const q of a.mount)qt(s,q,ke(K,q))}else s=Yt(K);x.array.next({values:{...K}}),x.state.next({name:void 0,type:void 0,values:{...K}})}a={mount:D.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!m.isValid||!!D.keepIsValid||!!D.keepDirtyValues||!e.shouldUnregister&&!Jn(K),o.watch=!!e.shouldUnregister,o.keepIsValid=!!D.keepIsValid,o.action=!1,D.keepErrors||(n.errors={}),x.state.next({submitCount:D.keepSubmitCount?n.submitCount:0,isDirty:F?!1:D.keepDirty?n.isDirty:D.keepValues?ye():!!(D.keepDefaultValues&&!_r(M,r)),isSubmitted:D.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:F?{}:D.keepDirtyValues?D.keepDefaultValues&&s?Vl(r,s,void 0,H):n.dirtyFields:D.keepDefaultValues&&M?Vl(r,M,void 0,H):D.keepDirty?n.dirtyFields:{},touchedFields:D.keepTouched?n.touchedFields:{},errors:D.keepErrors?n.errors:{},isSubmitSuccessful:D.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:r})},$n=(M,D)=>ft(Pi(M)?M(s):M,{...e.resetOptions,...D}),Di=(M,D={})=>{const L=ke(i,M),A=L&&L._f;if(A){const F=A.refs?A.refs[0]:A.ref;F.focus&&setTimeout(()=>{F.focus(),D.shouldSelect&&Pi(F.select)&&F.select()})}},Mt=M=>{const{name:D,type:L,values:A,...F}=M;n={...n,...F}},ie={control:{register:En,unregister:xt,getFieldState:Ze,handleSubmit:An,setError:et,_subscribe:wt,_runSchema:G,_updateIsValidating:w,_focusError:Tn,_getWatch:xe,_getDirty:ye,_setValid:k,_setFieldArray:E,_setDisabledField:dn,_setErrors:$,_getFieldArray:Re,_reset:ft,_resetDefaultValues:()=>Pi(e.defaultValues)&&e.defaultValues().then(M=>{$n(M,e.resetOptions),x.state.next({isLoading:!1})}),_removeUnmounted:Le,_disableForm:pn,_subjects:x,_proxyFormState:m,get _fields(){return i},get _formValues(){return s},get _state(){return o},set _state(M){o=M},get _defaultValues(){return r},get _names(){return a},set _names(M){a=M},get _formState(){return n},get _options(){return e},set _options(M){e={...e,...M},h=Qa(e.mode),f=Qa(e.reValidateMode)}},subscribe:Ut,trigger:ge,register:En,handleSubmit:An,watch:Qt,setValue:qe,setValues:je,getValues:Ve,reset:$n,resetField:vn,resetDefaultValues:(M,D={})=>{if(r=Yt(M),!D.keepDirty){const L=Vl(r,s,void 0,i);n.dirtyFields=L,n.isDirty=!Jn(L)}D.keepIsValid||k(),x.state.next({...n,defaultValues:r})},clearErrors:Ge,unregister:xt,setError:et,setFocus:Di,getFieldState:Ze};return{...ie,formControl:ie}}function dx(t={}){const e=C.useRef(void 0),n=C.useRef(void 0),i=C.useRef(t.formControl),[r,s]=C.useState(()=>({...Yt(L7),isLoading:Pi(t.defaultValues),errors:t.errors||{},disabled:t.disabled||!1,defaultValues:Pi(t.defaultValues)?void 0:t.defaultValues}));if(!e.current||t.formControl&&i.current!==t.formControl)if(i.current=t.formControl,t.formControl)e.current={...t.formControl,formState:r},t.defaultValues&&!Pi(t.defaultValues)&&t.formControl.reset(t.defaultValues,t.resetOptions);else{const{formControl:a,...l}=Ate(t);e.current={...l,formState:r}}const o=e.current.control;return o._options=t,fx(()=>{const a=o._subscribe({formState:o._proxyFormState,callback:()=>s({...o._formState,defaultValues:o._defaultValues}),reRenderRoot:!0});return s(l=>({...l,isReady:!0})),o._formState.isReady=!0,a},[o]),C.useEffect(()=>o._disableForm(t.disabled),[o,t.disabled]),C.useEffect(()=>{t.mode&&(o._options.mode=t.mode),t.reValidateMode&&(o._options.reValidateMode=t.reValidateMode)},[o,t.mode,t.reValidateMode]),C.useEffect(()=>{t.errors&&(o._setErrors(t.errors),o._focusError())},[o,t.errors]),C.useEffect(()=>{t.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,t.shouldUnregister]),C.useEffect(()=>{if(o._proxyFormState.isDirty){const a=o._getDirty();a!==r.isDirty&&o._subjects.state.next({isDirty:a})}},[o,r.isDirty]),C.useEffect(()=>{var a;t.values&&!_r(t.values,n.current)?(o._reset(t.values,{keepFieldsRef:!0,...o._options.resetOptions}),!((a=o._options.resetOptions)===null||a===void 0)&&a.keepIsValid||o._setValid(),n.current=t.values,s(l=>({...l}))):o._resetDefaultValues()},[o,t.values]),C.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),e.current.formState=C.useMemo(()=>k7(r,o),[o,r]),e.current}var Vy={exports:{}},By,bA;function $te(){if(bA)return By;bA=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return By=t,By}var Fy,SA;function Ite(){if(SA)return Fy;SA=1;var t=$te();function e(){}function n(){}return n.resetWarningCache=e,Fy=function(){function i(o,a,l,u,c,h){if(h!==t){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}i.isRequired=i;function r(){return i}var s={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:r,element:i,elementType:i,instanceOf:r,node:i,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:n,resetWarningCache:e};return s.PropTypes=s,s},Fy}var _A;function Rte(){return _A||(_A=1,Vy.exports=Ite()()),Vy.exports}var Mte=Rte();const Te=i1(Mte);var jy={exports:{}},Kt={};/** @license React v17.0.2
|
|
54
|
+
* react-is.production.min.js
|
|
55
|
+
*
|
|
56
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
57
|
+
*
|
|
58
|
+
* This source code is licensed under the MIT license found in the
|
|
59
|
+
* LICENSE file in the root directory of this source tree.
|
|
60
|
+
*/var CA;function Nte(){if(CA)return Kt;CA=1;var t=60103,e=60106,n=60107,i=60108,r=60114,s=60109,o=60110,a=60112,l=60113,u=60120,c=60115,h=60116,f=60121,p=60122,m=60117,g=60129,x=60131;if(typeof Symbol=="function"&&Symbol.for){var y=Symbol.for;t=y("react.element"),e=y("react.portal"),n=y("react.fragment"),i=y("react.strict_mode"),r=y("react.profiler"),s=y("react.provider"),o=y("react.context"),a=y("react.forward_ref"),l=y("react.suspense"),u=y("react.suspense_list"),c=y("react.memo"),h=y("react.lazy"),f=y("react.block"),p=y("react.server.block"),m=y("react.fundamental"),g=y("react.debug_trace_mode"),x=y("react.legacy_hidden")}function S(Z){if(typeof Z=="object"&&Z!==null){var G=Z.$$typeof;switch(G){case t:switch(Z=Z.type,Z){case n:case r:case i:case l:case u:return Z;default:switch(Z=Z&&Z.$$typeof,Z){case o:case a:case h:case c:case s:return Z;default:return G}}case e:return G}}}var _=s,k=t,w=a,b=n,E=h,P=c,$=e,B=r,X=i,j=l;return Kt.ContextConsumer=o,Kt.ContextProvider=_,Kt.Element=k,Kt.ForwardRef=w,Kt.Fragment=b,Kt.Lazy=E,Kt.Memo=P,Kt.Portal=$,Kt.Profiler=B,Kt.StrictMode=X,Kt.Suspense=j,Kt.isAsyncMode=function(){return!1},Kt.isConcurrentMode=function(){return!1},Kt.isContextConsumer=function(Z){return S(Z)===o},Kt.isContextProvider=function(Z){return S(Z)===s},Kt.isElement=function(Z){return typeof Z=="object"&&Z!==null&&Z.$$typeof===t},Kt.isForwardRef=function(Z){return S(Z)===a},Kt.isFragment=function(Z){return S(Z)===n},Kt.isLazy=function(Z){return S(Z)===h},Kt.isMemo=function(Z){return S(Z)===c},Kt.isPortal=function(Z){return S(Z)===e},Kt.isProfiler=function(Z){return S(Z)===r},Kt.isStrictMode=function(Z){return S(Z)===i},Kt.isSuspense=function(Z){return S(Z)===l},Kt.isValidElementType=function(Z){return typeof Z=="string"||typeof Z=="function"||Z===n||Z===r||Z===g||Z===i||Z===l||Z===u||Z===x||typeof Z=="object"&&Z!==null&&(Z.$$typeof===h||Z.$$typeof===c||Z.$$typeof===s||Z.$$typeof===o||Z.$$typeof===a||Z.$$typeof===m||Z.$$typeof===f||Z[0]===p)},Kt.typeOf=S,Kt}var wA;function Lte(){return wA||(wA=1,jy.exports=Nte()),jy.exports}Lte();let kA=t=>typeof t=="object"&&t!=null&&t.nodeType===1,EA=(t,e)=>(!e||t!=="hidden")&&t!=="visible"&&t!=="clip",Zy=(t,e)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){let n=getComputedStyle(t,null);return EA(n.overflowY,e)||EA(n.overflowX,e)||(i=>{let r=(s=>{if(!s.ownerDocument||!s.ownerDocument.defaultView)return null;try{return s.ownerDocument.defaultView.frameElement}catch{return null}})(i);return!!r&&(r.clientHeight<i.scrollHeight||r.clientWidth<i.scrollWidth)})(t)}return!1},eg=(t,e,n,i,r,s,o,a)=>s<t&&o>e||s>t&&o<e?0:s<=t&&a<=n||o>=e&&a>=n?s-t-i:o>e&&a<n||s<t&&a>n?o-e+r:0,Dte=t=>{let e=t.parentElement;return e??(t.getRootNode().host||null)};var Qte=(t,e)=>{var n,i,r,s,o,a;if(typeof document>"u")return[];let{inline:l,boundary:u,skipOverflowHiddenElements:c}=e,h=typeof u=="function"?u:j=>j!==u;if(!kA(t))throw new TypeError("Invalid target");let f=document.scrollingElement||document.documentElement,p=[],m=t;for(;kA(m)&&h(m);){if(m=Dte(m),m===f){p.push(m);break}m!=null&&m===document.body&&Zy(m)&&!Zy(document.documentElement)||m!=null&&Zy(m,c)&&p.push(m)}let g=(i=(n=window.visualViewport)==null?void 0:n.width)!=null?i:innerWidth,x=(s=(r=window.visualViewport)==null?void 0:r.height)!=null?s:innerHeight,y=(o=window.scrollX)!=null?o:pageXOffset,S=(a=window.scrollY)!=null?a:pageYOffset,{height:_,width:k,top:w,right:b,bottom:E,left:P}=t.getBoundingClientRect(),$=w,B=l==="center"?P+k/2:l==="end"?b:P,X=[];for(let j=0;j<p.length;j++){let Z=p[j],{height:G,width:z,top:J,right:ue,bottom:Le,left:ye}=Z.getBoundingClientRect();if(w>=0&&P>=0&&E<=x&&b<=g&&w>=J&&E<=Le&&P>=ye&&b<=ue)return X;let xe=getComputedStyle(Z),Re=parseInt(xe.borderLeftWidth,10),Ae=parseInt(xe.borderTopWidth,10),Be=parseInt(xe.borderRightWidth,10),lt=parseInt(xe.borderBottomWidth,10),qe=0,je=0,we="offsetWidth"in Z?Z.offsetWidth-Z.clientWidth-Re-Be:0,pe="offsetHeight"in Z?Z.offsetHeight-Z.clientHeight-Ae-lt:0,ge="offsetWidth"in Z?Z.offsetWidth===0?0:z/Z.offsetWidth:0,Ve="offsetHeight"in Z?Z.offsetHeight===0?0:G/Z.offsetHeight:0;if(f===Z)qe=eg(S,S+x,x,Ae,lt,S+$,S+$+_,_),je=l==="start"?B:l==="center"?B-g/2:l==="end"?B-g:eg(y,y+g,g,Re,Be,y+B,y+B+k,k),qe=Math.max(0,qe+S),je=Math.max(0,je+y);else{qe=eg(J,Le,G,Ae,lt+pe,$,$+_,_),je=l==="start"?B-ye-Re:l==="center"?B-(ye+z/2)+we/2:l==="end"?B-ue+Be+we:eg(ye,ue,z,Re,Be+we,B,B+k,k);let{scrollLeft:Ze,scrollTop:Ge}=Z;qe=Math.max(0,Math.min(Ge+qe/Ve,Z.scrollHeight-G/Ve+pe)),je=Math.max(0,Math.min(Ze+je/ge,Z.scrollWidth-z/ge+we)),$+=Ge-qe,B+=Ze-je}X.push({el:Z,top:qe,left:je})}return X},Vte=0;function D7(){}function Bte(t,e){if(t){var n=Qte(t,{boundary:e});n.forEach(function(i){var r=i.el,s=i.top,o=i.left;r.scrollTop=s,r.scrollLeft=o})}}function TA(t,e,n){var i=t===e||e instanceof n.Node&&t.contains&&t.contains(e);return i}function Q7(t,e){var n;function i(){n&&clearTimeout(n)}function r(){for(var s=arguments.length,o=new Array(s),a=0;a<s;a++)o[a]=arguments[a];i(),n=setTimeout(function(){n=null,t.apply(void 0,o)},e)}return r.cancel=i,r}function Ao(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(i){for(var r=arguments.length,s=new Array(r>1?r-1:0),o=1;o<r;o++)s[o-1]=arguments[o];return e.some(function(a){return a&&a.apply(void 0,[i].concat(s)),i.preventDownshiftDefault||i.hasOwnProperty("nativeEvent")&&i.nativeEvent.preventDownshiftDefault})}}function tg(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(i){e.forEach(function(r){typeof r=="function"?r(i):r&&(r.current=i)})}}function Fte(){return String(Vte++)}function jte(t){var e=t.isOpen,n=t.resultCount,i=t.previousResultCount;return e?n?n!==i?n+" result"+(n===1?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""}function WS(t,e){return Object.keys(t).reduce(function(n,i){return n[i]=V7(e,i)?e[i]:t[i],n},{})}function V7(t,e){return t[e]!==void 0}function Zte(t){var e=t.key,n=t.keyCode;return n>=37&&n<=40&&e.indexOf("Arrow")!==0?"Arrow"+e:e}function ng(t,e,n,i,r){if(r===void 0&&(r=!0),n===0)return-1;var s=n-1;(typeof e!="number"||e<0||e>=n)&&(e=t>0?-1:s+1);var o=e+t;o<0?o=r?s:0:o>s&&(o=r?0:s);var a=qd(t,o,n,i,r);return a===-1?e>=n?-1:e:a}function qd(t,e,n,i,r){var s=i(e);if(!s||!s.hasAttribute("disabled"))return e;if(t>0){for(var o=e+1;o<n;o++)if(!i(o).hasAttribute("disabled"))return o}else for(var a=e-1;a>=0;a--)if(!i(a).hasAttribute("disabled"))return a;return r?t>0?qd(1,0,n,i,!1):qd(-1,n-1,n,i,!1):-1}function PA(t,e,n,i){return i===void 0&&(i=!0),e.some(function(r){return r&&(TA(r,t,n)||i&&TA(r,n.document.activeElement,n))})}var zte=Q7(function(t){B7(t).textContent=""},500);function Xte(t,e){var n=B7(e);t&&(n.textContent=t,zte(e))}function B7(t){t===void 0&&(t=document);var e=t.getElementById("a11y-status-message");return e||(e=t.createElement("div"),e.setAttribute("id","a11y-status-message"),e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-relevant","additions text"),Object.assign(e.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),t.body.appendChild(e),e)}var Wte=["isInitialMount","highlightedIndex","items","environment"],F7={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function Hte(t,e,n){var i=t.props,r=t.type,s={};Object.keys(e).forEach(function(o){Ute(o,t,e,n),n[o]!==e[o]&&(s[o]=n[o])}),i.onStateChange&&Object.keys(s).length&&i.onStateChange(Mn({type:r},s))}function Ute(t,e,n,i){var r=e.props,s=e.type,o="on"+C2(t)+"Change";r[o]&&i[t]!==void 0&&i[t]!==n[t]&&r[o](Mn({type:s},i))}function qte(t,e){return e.changes}function Yte(t){var e=t.selectedItem,n=t.itemToString;return e?n(e)+" has been selected.":""}var Gte=Q7(function(t,e){Xte(t(),e)},200),Kte=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?R.useLayoutEffect:R.useEffect;function Jte(t){var e=t.id,n=e===void 0?"downshift-"+Fte():e,i=t.labelId,r=t.menuId,s=t.getItemId,o=t.toggleButtonId,a=t.inputId,l=R.useRef({labelId:i||n+"-label",menuId:r||n+"-menu",getItemId:s||function(u){return n+"-item-"+u},toggleButtonId:o||n+"-toggle-button",inputId:a||n+"-input"});return l.current}function ene(t,e,n,i){var r,s;if(t===void 0){if(e===void 0)throw new Error(i);r=n[e],s=e}else s=e===void 0?n.indexOf(t):e,r=t;return[r,s]}function tne(t){return t?String(t):""}function C2(t){return""+t.slice(0,1).toUpperCase()+t.slice(1)}function j7(t){var e=R.useRef(t);return e.current=t,e}function nne(t,e,n){var i=R.useRef(),r=R.useRef(),s=R.useCallback(function(f,p){r.current=p,f=WS(f,p.props);var m=t(f,p),g=p.props.stateReducer(f,Mn({},p,{changes:m}));return g},[t]),o=R.useReducer(s,e),a=o[0],l=o[1],u=j7(n),c=R.useCallback(function(f){return l(Mn({props:u.current},f))},[u]),h=r.current;return R.useEffect(function(){h&&i.current&&i.current!==a&&Hte(h,WS(i.current,h.props),a),i.current=a},[a,n,h]),[a,c]}var ud={itemToString:tne,stateReducer:qte,getA11ySelectionMessage:Yte,scrollIntoView:Bte,environment:typeof window>"u"?{}:window};function io(t,e,n){n===void 0&&(n=F7);var i=t["default"+C2(e)];return i!==void 0?i:n[e]}function ig(t,e,n){n===void 0&&(n=F7);var i=t[e];if(i!==void 0)return i;var r=t["initial"+C2(e)];return r!==void 0?r:io(t,e,n)}function ine(t){var e=ig(t,"selectedItem"),n=ig(t,"isOpen"),i=ig(t,"highlightedIndex"),r=ig(t,"inputValue");return{highlightedIndex:i<0&&e&&n?t.items.indexOf(e):i,isOpen:n,selectedItem:e,inputValue:r}}function cd(t,e,n){var i=t.items,r=t.initialHighlightedIndex,s=t.defaultHighlightedIndex,o=e.selectedItem,a=e.highlightedIndex;return i.length===0?-1:r!==void 0&&a===r?r:s!==void 0?s:o?i.indexOf(o):n===0?-1:n<0?i.length-1:0}function rne(t,e,n,i){var r=R.useRef({isMouseDown:!1,isTouchMove:!1});return R.useEffect(function(){if((n==null?void 0:n.addEventListener)!=null){var s=function(){r.current.isMouseDown=!0},o=function(h){r.current.isMouseDown=!1,t&&!PA(h.target,e.map(function(f){return f.current}),n)&&i()},a=function(){r.current.isTouchMove=!1},l=function(){r.current.isTouchMove=!0},u=function(h){t&&!r.current.isTouchMove&&!PA(h.target,e.map(function(f){return f.current}),n,!1)&&i()};return n.addEventListener("mousedown",s),n.addEventListener("mouseup",o),n.addEventListener("touchstart",a),n.addEventListener("touchmove",l),n.addEventListener("touchend",u),function(){n.removeEventListener("mousedown",s),n.removeEventListener("mouseup",o),n.removeEventListener("touchstart",a),n.removeEventListener("touchmove",l),n.removeEventListener("touchend",u)}}},[t,n]),r}var sne=function(){return D7};function AA(t,e,n){var i=n.isInitialMount,r=n.highlightedIndex,s=n.items,o=n.environment,a=jf(n,Wte);R.useEffect(function(){i||Gte(function(){return t(Mn({highlightedIndex:r,highlightedItem:s[r],resultCount:s.length},a))},o.document)},e)}function one(t){var e=t.highlightedIndex,n=t.isOpen,i=t.itemRefs,r=t.getItemNodeFromIndex,s=t.menuElement,o=t.scrollIntoView,a=R.useRef(!0);return Kte(function(){e<0||!n||!Object.keys(i.current).length||(a.current===!1?a.current=!0:o(r(e),s))},[e]),a}var ane=D7;function $A(t,e,n){var i;n===void 0&&(n=!0);var r=((i=t.items)==null?void 0:i.length)&&e>=0;return Mn({isOpen:!1,highlightedIndex:-1},r&&Mn({selectedItem:t.items[e],isOpen:io(t,"isOpen"),highlightedIndex:io(t,"highlightedIndex")},n&&{inputValue:t.itemToString(t.items[e])}))}function lne(t,e,n){var i=e.type,r=e.props,s;switch(i){case n.ItemMouseMove:s={highlightedIndex:e.disabled?-1:e.index};break;case n.MenuMouseLeave:s={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:s={isOpen:!t.isOpen,highlightedIndex:t.isOpen?-1:cd(r,t,0)};break;case n.FunctionOpenMenu:s={isOpen:!0,highlightedIndex:cd(r,t,0)};break;case n.FunctionCloseMenu:s={isOpen:!1};break;case n.FunctionSetHighlightedIndex:s={highlightedIndex:e.highlightedIndex};break;case n.FunctionSetInputValue:s={inputValue:e.inputValue};break;case n.FunctionReset:s={highlightedIndex:io(r,"highlightedIndex"),isOpen:io(r,"isOpen"),selectedItem:io(r,"selectedItem"),inputValue:io(r,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return Mn({},t,s)}Te.array.isRequired,Te.func,Te.func,Te.func,Te.number,Te.number,Te.number,Te.bool,Te.bool,Te.bool,Te.any,Te.any,Te.any,Te.string,Te.string,Te.string,Te.func,Te.string,Te.func,Te.func,Te.func,Te.func,Te.func,Te.shape({addEventListener:Te.func,removeEventListener:Te.func,document:Te.shape({getElementById:Te.func,activeElement:Te.any,body:Te.any})});function une(t){var e=t.isOpen,n=t.resultCount,i=t.previousResultCount;return e?n?n!==i?"".concat(n," result").concat(n===1?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}PE(PE({},ud),{getA11yStatusMessage:une});var w2=0,k2=1,E2=2,T2=3,P2=4,A2=5,$2=6,I2=7,R2=8,lO=9,M2=10,Z7=11,z7=12,N2=13,X7=14,W7=15,H7=16,U7=17,q7=18,L2=19,Y7=20,G7=21,D2=22,K7=Object.freeze({__proto__:null,InputKeyDownArrowDown:w2,InputKeyDownArrowUp:k2,InputKeyDownEscape:E2,InputKeyDownHome:T2,InputKeyDownEnd:P2,InputKeyDownPageUp:A2,InputKeyDownPageDown:$2,InputKeyDownEnter:I2,InputChange:R2,InputBlur:lO,InputFocus:M2,MenuMouseLeave:Z7,ItemMouseMove:z7,ItemClick:N2,ToggleButtonClick:X7,FunctionToggleMenu:W7,FunctionOpenMenu:H7,FunctionCloseMenu:U7,FunctionSetHighlightedIndex:q7,FunctionSelectItem:L2,FunctionSetInputValue:Y7,FunctionReset:G7,ControlledPropUpdatedSelectedItem:D2});function cne(t){var e=ine(t),n=e.selectedItem,i=e.inputValue;return i===""&&n&&t.defaultInputValue===void 0&&t.initialInputValue===void 0&&t.inputValue===void 0&&(i=t.itemToString(n)),Mn({},e,{inputValue:i})}Te.array.isRequired,Te.func,Te.func,Te.func,Te.func,Te.number,Te.number,Te.number,Te.bool,Te.bool,Te.bool,Te.any,Te.any,Te.any,Te.string,Te.string,Te.string,Te.string,Te.string,Te.string,Te.func,Te.string,Te.string,Te.func,Te.func,Te.func,Te.func,Te.func,Te.func,Te.shape({addEventListener:Te.func,removeEventListener:Te.func,document:Te.shape({getElementById:Te.func,activeElement:Te.any,body:Te.any})});function hne(t,e,n){var i=R.useRef(),r=nne(t,e,n),s=r[0],o=r[1];return R.useEffect(function(){V7(n,"selectedItem")&&(n.selectedItemChanged(i.current,n.selectedItem)&&o({type:D2,inputValue:n.itemToString(n.selectedItem)}),i.current=s.selectedItem===i.current?n.selectedItem:s.selectedItem)},[s.selectedItem,n.selectedItem]),[WS(s,n),o]}var fne=Mn({},ud,{selectedItemChanged:function(e,n){return e!==n},getA11yStatusMessage:jte});function dne(t,e){var n,i=e.type,r=e.props,s=e.altKey,o;switch(i){case N2:o={isOpen:io(r,"isOpen"),highlightedIndex:io(r,"highlightedIndex"),selectedItem:r.items[e.index],inputValue:r.itemToString(r.items[e.index])};break;case w2:t.isOpen?o={highlightedIndex:ng(1,t.highlightedIndex,r.items.length,e.getItemNodeFromIndex,!0)}:o={highlightedIndex:s&&t.selectedItem==null?-1:cd(r,t,1,e.getItemNodeFromIndex),isOpen:r.items.length>=0};break;case k2:t.isOpen?s?o=$A(r,t.highlightedIndex):o={highlightedIndex:ng(-1,t.highlightedIndex,r.items.length,e.getItemNodeFromIndex,!0)}:o={highlightedIndex:cd(r,t,-1,e.getItemNodeFromIndex),isOpen:r.items.length>=0};break;case I2:o=$A(r,t.highlightedIndex);break;case E2:o=Mn({isOpen:!1,highlightedIndex:-1},!t.isOpen&&{selectedItem:null,inputValue:""});break;case A2:o={highlightedIndex:ng(-10,t.highlightedIndex,r.items.length,e.getItemNodeFromIndex,!1)};break;case $2:o={highlightedIndex:ng(10,t.highlightedIndex,r.items.length,e.getItemNodeFromIndex,!1)};break;case T2:o={highlightedIndex:qd(1,0,r.items.length,e.getItemNodeFromIndex,!1)};break;case P2:o={highlightedIndex:qd(-1,r.items.length-1,r.items.length,e.getItemNodeFromIndex,!1)};break;case lO:o=Mn({isOpen:!1,highlightedIndex:-1},t.highlightedIndex>=0&&((n=r.items)==null?void 0:n.length)&&e.selectItem&&{selectedItem:r.items[t.highlightedIndex],inputValue:r.itemToString(r.items[t.highlightedIndex])});break;case R2:o={isOpen:!0,highlightedIndex:io(r,"highlightedIndex"),inputValue:e.inputValue};break;case M2:o={isOpen:!0,highlightedIndex:cd(r,t,0)};break;case L2:o={selectedItem:e.selectedItem,inputValue:r.itemToString(e.selectedItem)};break;case D2:o={inputValue:e.inputValue};break;default:return lne(t,e,K7)}return Mn({},t,o)}var pne=["onMouseLeave","refKey","ref"],mne=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],gne=["onClick","onPress","refKey","ref"],One=["onKeyDown","onChange","onInput","onFocus","onBlur","onChangeText","refKey","ref"];Q2.stateChangeTypes=K7;function Q2(t){t===void 0&&(t={});var e=Mn({},fne,t),n=e.initialIsOpen,i=e.defaultIsOpen,r=e.items,s=e.scrollIntoView,o=e.environment,a=e.getA11yStatusMessage,l=e.getA11ySelectionMessage,u=e.itemToString,c=cne(e),h=hne(dne,c,e),f=h[0],p=h[1],m=f.isOpen,g=f.highlightedIndex,x=f.selectedItem,y=f.inputValue,S=R.useRef(null),_=R.useRef({}),k=R.useRef(null),w=R.useRef(null),b=R.useRef(!0),E=Jte(e),P=R.useRef(),$=j7({state:f,props:e}),B=R.useCallback(function(we){return _.current[E.getItemId(we)]},[E]);AA(a,[m,g,y,r],Mn({isInitialMount:b.current,previousResultCount:P.current,items:r,environment:o,itemToString:u},f)),AA(l,[x],Mn({isInitialMount:b.current,previousResultCount:P.current,items:r,environment:o,itemToString:u},f));var X=one({menuElement:S.current,highlightedIndex:g,isOpen:m,itemRefs:_,scrollIntoView:s,getItemNodeFromIndex:B});ane({isInitialMount:b.current}),R.useEffect(function(){var we=n||i||m;we&&k.current&&k.current.focus()},[]),R.useEffect(function(){b.current||(P.current=r.length)});var j=rne(m,[k,S,w],o,function(){p({type:lO,selectItem:!1})}),Z=sne();R.useEffect(function(){return b.current=!1,function(){b.current=!0}},[]),R.useEffect(function(){var we;if(!m)_.current={};else if(((we=o.document)==null?void 0:we.activeElement)!==k.current){var pe;k==null||(pe=k.current)==null||pe.focus()}},[m,o]);var G=R.useMemo(function(){return{ArrowDown:function(pe){pe.preventDefault(),p({type:w2,altKey:pe.altKey,getItemNodeFromIndex:B})},ArrowUp:function(pe){pe.preventDefault(),p({type:k2,altKey:pe.altKey,getItemNodeFromIndex:B})},Home:function(pe){$.current.state.isOpen&&(pe.preventDefault(),p({type:T2,getItemNodeFromIndex:B}))},End:function(pe){$.current.state.isOpen&&(pe.preventDefault(),p({type:P2,getItemNodeFromIndex:B}))},Escape:function(pe){var ge=$.current.state;(ge.isOpen||ge.inputValue||ge.selectedItem||ge.highlightedIndex>-1)&&(pe.preventDefault(),p({type:E2}))},Enter:function(pe){var ge=$.current.state;!ge.isOpen||pe.which===229||(pe.preventDefault(),p({type:I2,getItemNodeFromIndex:B}))},PageUp:function(pe){$.current.state.isOpen&&(pe.preventDefault(),p({type:A2,getItemNodeFromIndex:B}))},PageDown:function(pe){$.current.state.isOpen&&(pe.preventDefault(),p({type:$2,getItemNodeFromIndex:B}))}}},[p,$,B]),z=R.useCallback(function(we){return Mn({id:E.labelId,htmlFor:E.inputId},we)},[E]),J=R.useCallback(function(we,pe){var ge,Ve=we===void 0?{}:we,Ze=Ve.onMouseLeave,Ge=Ve.refKey,et=Ge===void 0?"ref":Ge,Qt=Ve.ref,wt=jf(Ve,pne),Ut=pe===void 0?{}:pe;return Ut.suppressRefError,Mn((ge={},ge[et]=tg(Qt,function(xt){S.current=xt}),ge.id=E.menuId,ge.role="listbox",ge["aria-labelledby"]=wt&&wt["aria-label"]?void 0:""+E.labelId,ge.onMouseLeave=Ao(Ze,function(){p({type:Z7})}),ge),wt)},[p,Z,E]),ue=R.useCallback(function(we){var pe,ge,Ve=we===void 0?{}:we,Ze=Ve.item,Ge=Ve.index,et=Ve.refKey,Qt=et===void 0?"ref":et,wt=Ve.ref,Ut=Ve.onMouseMove,xt=Ve.onMouseDown,dn=Ve.onClick;Ve.onPress;var En=Ve.disabled,Tn=jf(Ve,mne),pn=$.current,An=pn.props,vn=pn.state,ft=ene(Ze,Ge,An.items,"Pass either item or index to getItemProps!"),$n=ft[1],Di="onClick",Mt=dn,O=function(){$n!==vn.highlightedIndex&&(X.current=!1,p({type:z7,index:$n,disabled:En}))},U=function(){p({type:N2,index:$n})},ie=function(D){return D.preventDefault()};return Mn((pe={},pe[Qt]=tg(wt,function(M){M&&(_.current[E.getItemId($n)]=M)}),pe.disabled=En,pe.role="option",pe["aria-selected"]=""+($n===vn.highlightedIndex),pe.id=E.getItemId($n),pe),!En&&(ge={},ge[Di]=Ao(Mt,U),ge),{onMouseMove:Ao(Ut,O),onMouseDown:Ao(xt,ie)},Tn)},[p,$,X,E]),Le=R.useCallback(function(we){var pe,ge=we===void 0?{}:we,Ve=ge.onClick;ge.onPress;var Ze=ge.refKey,Ge=Ze===void 0?"ref":Ze,et=ge.ref,Qt=jf(ge,gne),wt=$.current.state,Ut=function(){p({type:X7})};return Mn((pe={},pe[Ge]=tg(et,function(xt){w.current=xt}),pe["aria-controls"]=E.menuId,pe["aria-expanded"]=wt.isOpen,pe.id=E.toggleButtonId,pe.tabIndex=-1,pe),!Qt.disabled&&Mn({},{onClick:Ao(Ve,Ut)}),Qt)},[p,$,E]),ye=R.useCallback(function(we,pe){var ge,Ve=we===void 0?{}:we,Ze=Ve.onKeyDown,Ge=Ve.onChange,et=Ve.onInput,Qt=Ve.onFocus,wt=Ve.onBlur;Ve.onChangeText;var Ut=Ve.refKey,xt=Ut===void 0?"ref":Ut,dn=Ve.ref,En=jf(Ve,One),Tn=pe===void 0?{}:pe;Tn.suppressRefError;var pn=$.current.state,An=function(ie){var M=Zte(ie);M&&G[M]&&G[M](ie)},vn=function(ie){p({type:R2,inputValue:ie.target.value})},ft=function(ie){if(pn.isOpen&&!j.current.isMouseDown){var M=ie.relatedTarget===null&&o.document.activeElement!==o.document.body;p({type:lO,selectItem:!M})}},$n=function(){pn.isOpen||p({type:M2})},Di="onChange",Mt={};if(!En.disabled){var O;Mt=(O={},O[Di]=Ao(Ge,et,vn),O.onKeyDown=Ao(Ze,An),O.onBlur=Ao(wt,ft),O.onFocus=Ao(Qt,$n),O)}return Mn((ge={},ge[xt]=tg(dn,function(U){k.current=U}),ge["aria-activedescendant"]=pn.isOpen&&pn.highlightedIndex>-1?E.getItemId(pn.highlightedIndex):"",ge["aria-autocomplete"]="list",ge["aria-controls"]=E.menuId,ge["aria-expanded"]=pn.isOpen,ge["aria-labelledby"]=En&&En["aria-label"]?void 0:""+E.labelId,ge.autoComplete="off",ge.id=E.inputId,ge.role="combobox",ge.value=pn.inputValue,ge),Mt,En)},[Z,$,E,G,p,j,o]),xe=R.useCallback(function(){p({type:W7})},[p]),Re=R.useCallback(function(){p({type:U7})},[p]),Ae=R.useCallback(function(){p({type:H7})},[p]),Be=R.useCallback(function(we){p({type:q7,highlightedIndex:we})},[p]),lt=R.useCallback(function(we){p({type:L2,selectedItem:we})},[p]),qe=R.useCallback(function(we){p({type:Y7,inputValue:we})},[p]),je=R.useCallback(function(){p({type:G7})},[p]);return{getItemProps:ue,getLabelProps:z,getMenuProps:J,getInputProps:ye,getToggleButtonProps:Le,toggleMenu:xe,openMenu:Ae,closeMenu:Re,setHighlightedIndex:Be,setInputValue:qe,selectItem:lt,reset:je,highlightedIndex:g,isOpen:m,selectedItem:x,inputValue:y}}Te.array,Te.array,Te.array,Te.func,Te.func,Te.func,Te.number,Te.number,Te.number,Te.func,Te.func,Te.string,Te.string,Te.shape({addEventListener:Te.func,removeEventListener:Te.func,document:Te.shape({getElementById:Te.func,activeElement:Te.any,body:Te.any})});ud.itemToString,ud.stateReducer,ud.environment;const IA=20,J7=t=>t.suggestions.length>0?C.createElement(xne,{...t}):C.createElement("input",{className:te.textInput,size:40,autoFocus:!0,...t.register(t.inputName)}),xne=({autofocus:t,suggestions:e,control:n,inputName:i,placeholder:r,initialInputValue:s,setValue:o})=>{const[a,l]=C.useState(e.slice(0,IA)),u=Bt(fn),c=e.length>0,{isOpen:h,getToggleButtonProps:f,getMenuProps:p,getInputProps:m,highlightedIndex:g,getItemProps:x,selectedItem:y}=Q2({initialInputValue:s,onInputValueChange({inputValue:_=""}){o(i,_),_=_.toLowerCase()||"";const k=[];for(const w of e)if(w.toLowerCase().includes(_)&&(k.push(w),k.length>=IA))break;l(k)},items:a,itemToString(_){return _??""}}),S=h&&a.length>0;return C.createElement("div",{className:te.downshiftAutocompleteContainer},C.createElement("div",{"data-visible-dropdown":S,className:te.downshiftInputWrapper},C.createElement(fte,{name:i,control:n,render:({field:_})=>{const k=m();return C.createElement("input",{...k,name:_.name,placeholder:r,className:te.downshiftInput,size:30,"data-editor-dialog":!0,autoFocus:t})}}),c&&C.createElement("button",{"aria-label":"toggle menu",type:"button",...f()},u("arrow_drop_down"))),C.createElement("div",{className:te.downshiftAutocompleteContainer},C.createElement("ul",{...p(),"data-visible":S},a.map((_,k)=>C.createElement("li",{"data-selected":y===_,"data-highlighted":g===k,key:`${_}${k}`,...x({item:_,index:k})},_)))))},yne=()=>{const[t,e,n,i,r]=Ft(uO,qa,Vs,Fo,ch),s=Tt(z2),o=Tt(j2),a=Ht(),{register:l,handleSubmit:u,control:c,setValue:h,reset:f}=dx({values:e.type==="editing"?e.initialValues:{}}),p=()=>{f({src:"",title:"",altText:"",width:void 0,height:void 0})};return e.type==="inactive"?null:C.createElement(m2,{open:!0,onOpenChange:m=>{m||(o(),p())}},C.createElement(g2,{container:n==null?void 0:n.current},C.createElement(O2,{className:te.dialogOverlay}),C.createElement(x2,{className:te.dialogContent,onOpenAutoFocus:m=>{m.preventDefault()}},C.createElement(b7,null,a("uploadImage.dialogTitle","Upload an image")),C.createElement("form",{onSubmit:async m=>{m.preventDefault(),m.stopPropagation(),await u(s)(m),p()},className:te.multiFieldForm},i===null?C.createElement("input",{type:"hidden",accept:"image/*",...l("file")}):C.createElement("div",{className:te.formField},C.createElement("label",{htmlFor:"file"},a("uploadImage.uploadInstructions","Upload an image from your device:")),C.createElement("input",{type:"file",accept:"image/*",...l("file")})),C.createElement("div",{className:te.formField},C.createElement("label",{htmlFor:"src"},i!==null?a("uploadImage.addViaUrlInstructions","Or add an image from an URL:"):a("uploadImage.addViaUrlInstructionsNoUpload","Add an image from an URL:")),C.createElement(J7,{register:l,initialInputValue:e.type==="editing"?e.initialValues.src??"":"",inputName:"src",suggestions:t,setValue:h,control:c,placeholder:a("uploadImage.autoCompletePlaceholder","Select or paste an image src")})),C.createElement("div",{className:te.formField},C.createElement("label",{htmlFor:"alt"},a("uploadImage.alt","Alt:")),C.createElement("input",{type:"text",...l("altText"),className:te.textInput})),C.createElement("div",{className:te.formField},C.createElement("label",{htmlFor:"title"},a("uploadImage.title","Title:")),C.createElement("input",{type:"text",...l("title"),className:te.textInput})),r&&C.createElement("div",{className:te.imageDimensionsContainer},C.createElement("div",{className:te.formField},C.createElement("label",{htmlFor:"width"},a("uploadImage.width","Width:")),C.createElement("input",{type:"number",min:0,...l("width"),className:te.textInput})),C.createElement("div",{className:te.formField},C.createElement("label",{htmlFor:"height"},a("uploadImage.height","Height:")),C.createElement("input",{type:"number",min:0,...l("height"),className:te.textInput}))),C.createElement("div",{style:{display:"flex",justifyContent:"flex-end",gap:"var(--spacing-2)"}},C.createElement("button",{type:"submit",title:a("dialogControls.save","Save"),"aria-label":a("dialogControls.save","Save"),className:yt(te.primaryButton)},a("dialogControls.save","Save")),C.createElement(y2,{asChild:!0},C.createElement("button",{type:"reset",title:a("dialogControls.cancel","Cancel"),"aria-label":a("dialogControls.cancel","Cancel"),className:yt(te.secondaryButton)},a("dialogControls.cancel","Cancel"))))))))};function zy(t,e,n){return Math.min(Math.max(t,e),n)}const on={east:1,north:8,south:2,west:4};function vne({onResizeStart:t,onResizeEnd:e,imageRef:n,maxWidth:i,editor:r}){const s=R.useRef(null),o=R.useRef({priority:"",value:"default"}),a=R.useRef({currentHeight:0,currentWidth:0,direction:0,isResizing:!1,ratio:0,startHeight:0,startWidth:0,startX:0,startY:0}),l=r.getRootElement(),u=i??(l!==null?l.getBoundingClientRect().width-20:100),c=l!==null?l.getBoundingClientRect().height-20:100,h=100,f=100,p=S=>{const _=S===on.east||S===on.west,k=S===on.north||S===on.south,w=S&on.north&&S&on.west||S&on.south&&S&on.east,b=_?"ew":k?"ns":w?"nwse":"nesw";l!==null&&l.style.setProperty("cursor",`${b}-resize`,"important"),document.body!==null&&(document.body.style.setProperty("cursor",`${b}-resize`,"important"),o.current.value=document.body.style.getPropertyValue("-webkit-user-select"),o.current.priority=document.body.style.getPropertyPriority("-webkit-user-select"),document.body.style.setProperty("-webkit-user-select","none","important"))},m=()=>{l!==null&&l.style.setProperty("cursor","text"),document.body!==null&&(document.body.style.setProperty("cursor","default"),document.body.style.setProperty("-webkit-user-select",o.current.value,o.current.priority))},g=(S,_)=>{if(!r.isEditable())return;const k=n.current,w=s.current;if(k!==null&&w!==null){S.preventDefault();const{width:b,height:E}=k.getBoundingClientRect(),P=a.current;P.startWidth=b,P.startHeight=E,P.ratio=b/E,P.currentWidth=b,P.currentHeight=E,P.startX=S.clientX,P.startY=S.clientY,P.isResizing=!0,P.direction=_,p(_),t(),w.classList.add(te.imageControlWrapperResizing),k.style.height=`${E}px`,k.style.width=`${b}px`,document.addEventListener("pointermove",x),document.addEventListener("pointerup",y)}},x=S=>{const _=n.current,k=a.current,w=k.direction&(on.east|on.west),b=k.direction&(on.south|on.north);if(_!==null&&k.isResizing)if(w&&b){let E=Math.floor(k.startX-S.clientX);E=k.direction&on.east?-E:E;const P=zy(k.startWidth+E,h,u),$=P/k.ratio;_.style.width=`${P}px`,_.style.height=`${$}px`,k.currentHeight=$,k.currentWidth=P}else if(b){let E=Math.floor(k.startY-S.clientY);E=k.direction&on.south?-E:E;const P=zy(k.startHeight+E,f,c);_.style.height=`${P}px`,k.currentHeight=P}else{let E=Math.floor(k.startX-S.clientX);E=k.direction&on.east?-E:E;const P=zy(k.startWidth+E,h,u);_.style.width=`${P}px`,k.currentWidth=P}},y=()=>{const S=n.current,_=a.current,k=s.current;if(S!==null&&k!==null&&_.isResizing){const w=_.currentWidth,b=_.currentHeight;_.startWidth=0,_.startHeight=0,_.ratio=0,_.startX=0,_.startY=0,_.currentWidth=0,_.currentHeight=0,_.isResizing=!1,k.classList.remove(te.imageControlWrapperResizing),m(),e(w,b),document.removeEventListener("pointermove",x),document.removeEventListener("pointerup",y)}};return R.createElement("div",{ref:s},R.createElement("div",{className:yt(te.imageResizer,te.imageResizerN),onPointerDown:S=>{g(S,on.north)}}),R.createElement("div",{className:yt(te.imageResizer,te.imageResizerNe),onPointerDown:S=>{g(S,on.north|on.east)}}),R.createElement("div",{className:yt(te.imageResizer,te.imageResizerE),onPointerDown:S=>{g(S,on.east)}}),R.createElement("div",{className:yt(te.imageResizer,te.imageResizerSe),onPointerDown:S=>{g(S,on.south|on.east)}}),R.createElement("div",{className:yt(te.imageResizer,te.imageResizerS),onPointerDown:S=>{g(S,on.south)}}),R.createElement("div",{className:yt(te.imageResizer,te.imageResizerSw),onPointerDown:S=>{g(S,on.south|on.west)}}),R.createElement("div",{className:yt(te.imageResizer,te.imageResizerW),onPointerDown:S=>{g(S,on.west)}}),R.createElement("div",{className:yt(te.imageResizer,te.imageResizerNw),onPointerDown:S=>{g(S,on.north|on.west)}}))}const bne="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(`
|
|
61
|
+
<svg id="imgLoadError" xmlns="http://www.w3.org/2000/svg" width="100" height="100">
|
|
62
|
+
<rect x="0" y="0" width="100" height="100" fill="none" stroke="red" stroke-width="4" stroke-dasharray="4" />
|
|
63
|
+
<text x="50" y="55" text-anchor="middle" font-size="20" fill="red">⚠️</text>
|
|
64
|
+
</svg>
|
|
65
|
+
`),Sne={__cache:{},read(t){if(this.__cache[t]||(this.__cache[t]=new Promise(e=>{const n=new Image;n.onerror=()=>{this.__cache[t]=bne,e()},n.onload=()=>{this.__cache[t]=t,e()},n.src=t})),this.__cache[t]instanceof Promise)throw this.__cache[t];return this.__cache[t]}};function _ne({title:t,alt:e,className:n,imageRef:i,src:r,width:s,height:o}){return C.createElement("img",{className:n??void 0,alt:e,src:Sne.read(r),title:t,ref:i,draggable:"false",width:s,height:o})}function Cne({src:t,title:e,alt:n,nodeKey:i,width:r,height:s,rest:o}){const[a,l,u,c,h,f]=Ft(fO,cO,ch,hO,zn,dO),p=C.useRef(null),m=C.useRef(null),[g,x,y]=N8(i),[S]=qi(),[_,k]=C.useState(null),w=C.useRef(null),[b,E]=C.useState(!1),[P,$]=C.useState(null),[B,X]=C.useState(null),j=C.useCallback(xe=>{if(g&&Ct(me())){xe.preventDefault();const Ae=st(i);Yd(Ae)&&Ae.remove()}return!1},[g,i]),Z=C.useCallback(xe=>{const Re=me(),Ae=m.current;return g&&Ct(Re)&&Re.getNodes().length===1&&Ae!==null&&Ae!==document.activeElement?(xe.preventDefault(),Ae.focus(),!0):!1},[g]),G=C.useCallback(xe=>m.current===xe.target?(yn(null),S.update(()=>{x(!0);const Re=S.getRootElement();Re!==null&&Re.focus()}),!0):!1,[S,x]);C.useEffect(()=>{c?(async()=>{B||X(t);const Re=await c(t);$(Re)})().catch(Re=>{console.error(Re)}):$(t)},[t,c,B]),C.useEffect(()=>{if(u&&p.current){const{current:xe}=p;RA(xe,"width",r),RA(xe,"height",s)}},[u,r,s]),C.useEffect(()=>{let xe=!0;const Re=wn(S.registerUpdateListener(({editorState:Ae})=>{xe&&k(Ae.read(()=>me()))}),S.registerCommand(Ih,(Ae,Be)=>(w.current=Be,!1),Gt),S.registerCommand(Rp,Ae=>{const Be=Ae;return b?!0:Be.target===p.current?(Be.shiftKey?x(!g):(y(),x(!0)),!0):!1},Gt),S.registerCommand(Dp,Ae=>Ae.target===p.current?(Ae.preventDefault(),!0):!1,Gt),S.registerCommand(f1,j,Gt),S.registerCommand(Nh,j,Gt),S.registerCommand(Ka,Z,Gt),S.registerCommand(Lh,G,Gt));return()=>{xe=!1,Re()}},[y,S,b,g,i,j,Z,G,x]);const z=(xe,Re)=>{setTimeout(()=>{E(!1)},200),S.update(()=>{const Ae=st(i);Yd(Ae)&&Ae.setWidthAndHeight(xe,Re)})},J=()=>{E(!0)},ue=Ct(_),Le=g,ye=C.useMemo(()=>{if(o.length===0)return null;const xe=o.find(Re=>Re.type==="mdxJsxAttribute"&&(Re.name==="class"||Re.name==="className"));return xe?xe.value:null},[o]);return P!==null?C.createElement(C.Suspense,{fallback:a?C.createElement(a,null):null},C.createElement("div",{className:te.imageWrapper,"data-editor-block-type":"image"},C.createElement("div",{draggable:ue},C.createElement(_ne,{width:r,height:s,className:yt({[te.focusedImage]:Le},ye),src:P,title:e??"",alt:n??"",imageRef:p})),ue&&Le&&!l&&C.createElement(vne,{editor:S,imageRef:p,onResizeStart:J,onResizeEnd:z}),h||C.createElement(f,{nodeKey:i,imageSource:P,initialImagePath:B,title:e??"",alt:n??"",width:r,height:s}))):null}const RA=(t,e,n)=>{typeof n=="number"?t.style[e]=`${n}px`:t.style.removeProperty(e)};var wne=Object.defineProperty,kne=(t,e,n)=>e in t?wne(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,fc=(t,e,n)=>kne(t,typeof e!="symbol"?e+"":e,n);function Ene(t){if(t instanceof HTMLImageElement){const{alt:e,src:n,title:i,width:r,height:s}=t;return{node:wl({altText:e,src:n,title:i,width:r||void 0,height:s||void 0})}}return null}class nf extends us{constructor(e,n,i,r,s,o,a){super(a),fc(this,"__src"),fc(this,"__altText"),fc(this,"__title"),fc(this,"__width"),fc(this,"__height"),fc(this,"__rest"),this.__src=e,this.__title=i,this.__altText=n,this.__width=r??"inherit",this.__height=s??"inherit",this.__rest=o??[]}static getType(){return"image"}static clone(e){return new nf(e.__src,e.__altText,e.__title,e.__width,e.__height,e.__rest,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__src=e.__src,this.__altText=e.__altText,this.__title=e.__title,this.__width=e.__width,this.__height=e.__height,this.__rest=e.__rest}static importJSON(e){const{altText:n,title:i,src:r,width:s,rest:o,height:a}=e;return wl({altText:n,title:i,src:r,height:a,width:s,rest:o})}exportDOM(){const e=document.createElement("img");return e.setAttribute("src",this.__src),e.setAttribute("alt",this.__altText),this.__title&&e.setAttribute("title",this.__title),this.__width!=="inherit"&&this.__width&&e.setAttribute("width",this.__width.toString()),this.__height!=="inherit"&&this.__height&&e.setAttribute("height",this.__height.toString()),{element:e}}static importDOM(){return{img:()=>({conversion:Ene,priority:0})}}exportJSON(){return{altText:this.getAltText(),title:this.getTitle(),height:this.__height==="inherit"?void 0:this.__height,width:this.__width==="inherit"?void 0:this.__width,src:this.getSrc(),rest:this.__rest,type:"image",version:1}}setWidthAndHeight(e,n){const i=this.getWritable();i.__width=e,i.__height=n}createDOM(e,n){const i=document.createElement("span"),s=e.theme.image;return s!==void 0&&(i.className=s),i}updateDOM(){return!1}getSrc(){return this.__src}getAltText(){return this.__altText}getTitle(){return this.__title}getHeight(){return this.__height}getWidth(){return this.__width}getRest(){return this.__rest}setTitle(e){this.getWritable().__title=e}setSrc(e){this.getWritable().__src=e}setAltText(e){this.getWritable().__altText=e??""}shouldBeSerializedAsElement(){return this.__width!=="inherit"||this.__height!=="inherit"||this.__rest.length>0}decorate(e){return C.createElement(Cne,{src:this.getSrc(),title:this.getTitle(),nodeKey:this.getKey(),width:this.__width,height:this.__height,alt:this.__altText,rest:this.__rest})}}function wl(t){const{altText:e,title:n,src:i,key:r,width:s,height:o,rest:a}=t;return new nf(i,e,n,s,o,a,r)}function Yd(t){return t instanceof nf}const Tne={testLexicalNode:Yd,visitLexicalNode({mdastParent:t,lexicalNode:e,actions:n}){if(e.shouldBeSerializedAsElement()){const i=new Image;e.getHeight()!=="inherit"&&(i.height=e.getHeight()),e.getWidth()!=="inherit"&&(i.width=e.getWidth()),e.getAltText()&&(i.alt=e.getAltText()),e.getTitle()&&(i.title=e.getTitle());for(const r of e.getRest())r.type==="mdxJsxAttribute"&&typeof r.value=="string"&&i.setAttribute(r.name,r.value);n.appendToParent(t,{type:"html",value:i.outerHTML.replace(/>$/,` src="${e.getSrc()}" />`)})}else n.appendToParent(t,{type:"image",url:e.getSrc(),alt:e.getAltText(),title:e.getTitle()})}},Pne={testNode:"image",visitNode({mdastNode:t,actions:e}){e.addAndStepInto(wl({src:t.url,altText:t.alt??"",title:t.title??""}))}},Ane={testNode:t=>t.type==="html"&&t.value.trim().startsWith("<img"),visitNode({mdastNode:t,lexicalParent:e}){const n=document.createElement("div");n.innerHTML=t.value;const i=n.querySelector("img");if(!i)throw new Error("Invalid HTML image");const r=i.src,s=i.alt,o=i.title,a=i.width,l=i.height,u=wl({src:r||"",altText:s,title:o,width:a||void 0,height:l||void 0});if(e.getType()==="root"){const c=ut();c.append(u),e.append(c)}else e.append(u)}};function If(t,e){const n=t.attributes.find(i=>i.type==="mdxJsxAttribute"&&i.name===e);if(n)return n.value}const $ne={testNode:t=>(t.type==="mdxJsxTextElement"||t.type==="mdxJsxFlowElement")&&t.name==="img",visitNode({mdastNode:t,lexicalParent:e}){const n=If(t,"src");if(!n)return;const i=If(t,"alt")??"",r=If(t,"title"),s=If(t,"height"),o=If(t,"width"),a=t.attributes.filter(u=>u.type==="mdxJsxAttribute"&&!["src","alt","title","height","width"].includes(u.name)),l=wl({src:n,altText:i,title:r,width:o?parseInt(o,10):void 0,height:s?parseInt(s,10):void 0,rest:a});if(e.getType()==="root"){const u=ut();u.append(l),e.append(u)}else e.append(l)}},V2=kn(t=>{t.sub(t.pipe(V2,On(tn)),([e,n])=>{n==null||n.update(()=>{const i=wl({altText:e.altText??"",src:e.src,title:e.title??"",width:wu(e.width),height:wu(e.height)});Du([i]),It(i.getParentOrThrow())&&mw(i,ut).selectEnd()})})}),eN=kn(t=>{t.sub(t.pipe(eN,On(Fo)),([e,n])=>{const i=r=>{t.pub(V2,{...e,src:r})};"file"in e?n==null||n(e.file).then(i).catch(r=>{throw r}):i(e.src)})}),uO=Ee([]),cO=Ee(!1),Fo=Ee(null),hO=Ee(null),fO=Ee(null),qa=Ee({type:"inactive"},t=>{t.sub(t.pipe(z2,On(tn,Fo,qa,ch)),([e,n,i,r,s])=>{const o=r.type==="editing"?a=>{n==null||n.update(()=>{const{nodeKey:l}=r,u=st(l);if(u.setTitle(e.title),u.setAltText(e.altText),u.setSrc(a),s){const c=wu(e.width),h=wu(e.height);u.setWidthAndHeight(c??"inherit",h??"inherit")}}),t.pub(qa,{type:"inactive"})}:a=>{t.pub(V2,{...e,src:a}),t.pub(qa,{type:"inactive"})};e.file&&e.file.length>0?i==null||i(e.file.item(0)).then(o).catch(a=>{throw a}):e.src&&o(e.src)}),t.pub(_u,e=>{const n=t.getValue(Fo);return wn(e.registerCommand(Gd,i=>{const r=wl(i);return Du([r]),It(r.getParentOrThrow())&&mw(r,ut).selectEnd(),!0},tt),e.registerCommand(Dp,i=>Nne(i),Id),e.registerCommand(p1,i=>Lne(i,!!n),Gt),e.registerCommand(d1,i=>Dne(i,e,t.getValue(Fo)),Id),e.registerCommand(Rh,i=>{var r,s;if(!n){let u=Array.from(((r=i.clipboardData)==null?void 0:r.items)??[]);return u=u.filter(c=>c.type.includes("text")),!u.length||u.length===0}const o=Array.from(((s=i.clipboardData)==null?void 0:s.items)??[]);if(o.some(u=>!u.type.includes("image"))||!o.length||o.length===0)return!1;const l=t.getValue(Fo);return Promise.all(o.map(u=>l(u.getAsFile()))).then(u=>{u.forEach(c=>{e.dispatchCommand(Gd,{src:c,altText:""})})}).catch(u=>{throw u}),!0},cr))})}),B2=Ds(t=>{t.link(t.pipe(B2,OC({type:"new"})),qa)}),F2=kn(t=>{t.link(t.pipe(F2,As(e=>({type:"editing",...e}))),qa)}),j2=Ds(t=>{t.link(t.pipe(j2,OC({type:"inactive"})),qa)}),Z2=Ee(!1),ch=Ee(!1),z2=kn(),dO=Ee(QS),wu=t=>{if(typeof t>"u")return;const e=parseInt(String(t),10);return Number.isNaN(e)?void 0:e},Ine=Vn({init(t,e){t.pubIn({[hr]:[Pne,Ane,$ne],[Nr]:nf,[Lr]:Tne,[_l]:(e==null?void 0:e.ImageDialog)??yne,[Fo]:(e==null?void 0:e.imageUploadHandler)??null,[uO]:(e==null?void 0:e.imageAutocompleteSuggestions)??[],[cO]:!!(e!=null&&e.disableImageResize),[Z2]:!!(e!=null&&e.disableImageSettingsButton),[ch]:!!(e!=null&&e.allowSetImageDimensions),[hO]:(e==null?void 0:e.imagePreviewHandler)??null,[dO]:(e==null?void 0:e.EditImageToolbar)??QS,[fO]:(e==null?void 0:e.imagePlaceholder)??cA})},update(t,e){t.pubIn({[Fo]:(e==null?void 0:e.imageUploadHandler)??null,[uO]:(e==null?void 0:e.imageAutocompleteSuggestions)??[],[cO]:!!(e!=null&&e.disableImageResize),[hO]:(e==null?void 0:e.imagePreviewHandler)??null,[ch]:!!(e!=null&&e.allowSetImageDimensions),[dO]:(e==null?void 0:e.EditImageToolbar)??QS,[fO]:(e==null?void 0:e.imagePlaceholder)??cA})}}),Rne=t=>Hw?(t??window).getSelection():null,Gd=Ue("INSERT_IMAGE_COMMAND"),Mne="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";function Nne(t){const e=X2();if(!e)return!1;const n=t.dataTransfer;if(!n)return!1;n.setData("text/plain","_");const i=document.createElement("img");return i.src=Mne,n.setDragImage(i,0,0),n.setData("application/x-lexical-drag",JSON.stringify({data:{altText:e.__altText,title:e.__title,key:e.getKey(),src:e.__src},type:"image"})),!0}function Lne(t,e){var n;if(e){let r=Array.from(((n=t.dataTransfer)==null?void 0:n.items)??[]);if(r=r.filter(s=>s.type.includes("image")),r.length>0)return t.preventDefault(),!0}return X2()?(tN(t)||t.preventDefault(),!0):!1}function Dne(t,e,n){var i;let r=Array.from(((i=t.dataTransfer)==null?void 0:i.items)??[]);if(r=r.filter(a=>a.type.includes("image")),r.length>0&&n!==null)return t.preventDefault(),Promise.all(r.map(a=>a.kind==="string"?new Promise(l=>{a.getAsString(l)}):n(a.getAsFile()))).then(a=>{a.forEach(l=>{e.dispatchCommand(Gd,{src:l,altText:""})})}).catch(a=>{throw a}),!0;const s=X2();if(!s)return!1;const o=Qne(t);if(!o)return!1;if(t.preventDefault(),tN(t)){const a=Vne(t);s.remove();const l=Lu();a!=null&&l.applyDOMRange(a),yn(l),e.dispatchCommand(Gd,o)}return!0}function X2(){const t=me();if(!Ct(t))return null;const n=t.getNodes()[0];return Yd(n)?n:null}function Qne(t){var e;const n=(e=t.dataTransfer)==null?void 0:e.getData("application/x-lexical-drag");if(!n)return null;const{type:i,data:r}=JSON.parse(n);return i!=="image"?null:r}function tN(t){const e=t.target;return!!(e&&e instanceof HTMLElement&&e.parentElement)}function Vne(t){let e;const n=t.target,i=n==null?null:n.nodeType===9?n.defaultView:n.ownerDocument.defaultView,r=Rne(i);if(document.caretRangeFromPoint)e=document.caretRangeFromPoint(t.clientX,t.clientY);else if(t.rangeParent&&r!==null)r.collapse(t.rangeParent,t.rangeOffset??0),e=r.getRangeAt(0);else throw Error("Cannot get the selection when dragging");return e}var Xy={exports:{}},MA;function Bne(){return MA||(MA=1,(function(t){(function(){var e;e=t.exports=r,e.format=r,e.vsprintf=i,typeof console<"u"&&typeof console.log=="function"&&(e.printf=n);function n(){console.log(r.apply(null,arguments))}function i(s,o){return r.apply(null,[s].concat(o))}function r(s){for(var o=1,a=[].slice.call(arguments),l=0,u=s.length,c="",h,f=!1,p,m,g=!1,x,y=function(){return a[o++]},S=function(){for(var _="";/\d/.test(s[l]);)_+=s[l++],h=s[l];return _.length>0?parseInt(_):null};l<u;++l)if(h=s[l],f)switch(f=!1,h=="."?(g=!1,h=s[++l]):h=="0"&&s[l+1]=="."?(g=!0,l+=2,h=s[l]):g=!0,x=S(),h){case"b":c+=parseInt(y(),10).toString(2);break;case"c":p=y(),typeof p=="string"||p instanceof String?c+=p:c+=String.fromCharCode(parseInt(p,10));break;case"d":c+=parseInt(y(),10);break;case"f":m=String(parseFloat(y()).toFixed(x||6)),c+=g?m:m.replace(/^0/,"");break;case"j":c+=JSON.stringify(y());break;case"o":c+="0"+parseInt(y(),10).toString(8);break;case"s":c+=y();break;case"x":c+="0x"+parseInt(y(),10).toString(16);break;case"X":c+="0x"+parseInt(y(),10).toString(16).toUpperCase();break;default:c+=h;break}else h==="%"?f=!0:c+=h;return c}})()})(Xy)),Xy.exports}var Fne=Bne();const jne=i1(Fne),rg=Object.assign(Dl(Error),{eval:Dl(EvalError),range:Dl(RangeError),reference:Dl(ReferenceError),syntax:Dl(SyntaxError),type:Dl(TypeError),uri:Dl(URIError)});function Dl(t){return e.displayName=t.displayName||t.name,e;function e(n,...i){const r=n&&jne(n,...i);return new t(r)}}const sg={}.hasOwnProperty,NA={yaml:"-",toml:"+"};function W2(t){const e=[];let n=-1;const i=Array.isArray(t)?t:t?[t]:["yaml"];for(;++n<i.length;)e[n]=Zne(i[n]);return e}function Zne(t){let e=t;if(typeof e=="string"){if(!sg.call(NA,e))throw rg("Missing matter definition for `%s`",e);e={type:e,marker:NA[e]}}else if(typeof e!="object")throw rg("Expected matter to be an object, not `%j`",e);if(!sg.call(e,"type"))throw rg("Missing `type` in matter `%j`",e);if(!sg.call(e,"fence")&&!sg.call(e,"marker"))throw rg("Missing `marker` or `fence` in matter `%j`",e);return e}function zne(t){const e=W2(t),n={};let i=-1;for(;++i<e.length;){const r=e[i],s=HS(r,"open").charCodeAt(0),o=Xne(r),a=n[s];Array.isArray(a)?a.push(o):n[s]=[o]}return{flow:n}}function Xne(t){const e=t.anywhere,n=t.type,i=n+"Fence",r=i+"Sequence",s=n+"Value",o={tokenize:c,partial:!0};let a,l=0;return{tokenize:u,concrete:!0};function u(h,f,p){const m=this;return g;function g(E){const P=m.now();return P.column===1&&(P.line===1||e)&&(a=HS(t,"open"),l=0,E===a.charCodeAt(l))?(h.enter(n),h.enter(i),h.enter(r),x(E)):p(E)}function x(E){return l===a.length?(h.exit(r),Ur(E)?(h.enter("whitespace"),y(E)):S(E)):E===a.charCodeAt(l++)?(h.consume(E),x):p(E)}function y(E){return Ur(E)?(h.consume(E),y):(h.exit("whitespace"),S(E))}function S(E){return ln(E)?(h.exit(i),h.enter("lineEnding"),h.consume(E),h.exit("lineEnding"),a=HS(t,"close"),l=0,h.attempt(o,b,_)):p(E)}function _(E){return E===null||ln(E)?w(E):(h.enter(s),k(E))}function k(E){return E===null||ln(E)?(h.exit(s),w(E)):(h.consume(E),k)}function w(E){return E===null?p(E):(h.enter("lineEnding"),h.consume(E),h.exit("lineEnding"),h.attempt(o,b,_))}function b(E){return h.exit(n),f(E)}}function c(h,f,p){let m=0;return g;function g(_){return _===a.charCodeAt(m)?(h.enter(i),h.enter(r),x(_)):p(_)}function x(_){return m===a.length?(h.exit(r),Ur(_)?(h.enter("whitespace"),y(_)):S(_)):_===a.charCodeAt(m++)?(h.consume(_),x):p(_)}function y(_){return Ur(_)?(h.consume(_),y):(h.exit("whitespace"),S(_))}function S(_){return _===null||ln(_)?(h.exit(i),f(_)):p(_)}}}function HS(t,e){return t.marker?LA(t.marker,e).repeat(3):LA(t.fence,e)}function LA(t,e){return typeof t=="string"?t:t[e]}function Wne(t){const e=W2(t),n={},i={};let r=-1;for(;++r<e.length;){const s=e[r];n[s.type]=Hne(s),i[s.type]=Une,i[s.type+"Value"]=qne}return{enter:n,exit:i}}function Hne(t){return e;function e(n){this.enter({type:t.type,value:""},n),this.buffer()}}function Une(t){const e=this.resume(),n=this.stack[this.stack.length-1];this.exit(t),n.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,"")}function qne(t){this.config.enter.data.call(this,t),this.config.exit.data.call(this,t)}function Yne(t){const e=[],n={},i=W2(t);let r=-1;for(;++r<i.length;){const s=i[r];n[s.type]=Gne(s);const o=US(s,"open");e.push({atBreak:!0,character:o.charAt(0),after:sZ(o.charAt(1))})}return{unsafe:e,handlers:n}}function Gne(t){const e=US(t,"open"),n=US(t,"close");return i;function i(r){return e+(r.value?`
|
|
66
|
+
`+r.value:"")+`
|
|
67
|
+
`+n}}function US(t,e){return t.marker?DA(t.marker,e).repeat(3):DA(t.fence,e)}function DA(t,e){return typeof t=="string"?t:t[e]}function Kne(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ki={},og={},Ca={},QA;function cm(){if(QA)return Ca;QA=1;function t(o){return typeof o>"u"||o===null}function e(o){return typeof o=="object"&&o!==null}function n(o){return Array.isArray(o)?o:t(o)?[]:[o]}function i(o,a){if(a){const l=Object.keys(a);for(let u=0,c=l.length;u<c;u+=1){const h=l[u];o[h]=a[h]}}return o}function r(o,a){let l="";for(let u=0;u<a;u+=1)l+=o;return l}function s(o){return o===0&&Number.NEGATIVE_INFINITY===1/o}return Ca.isNothing=t,Ca.isObject=e,Ca.toArray=n,Ca.repeat=r,Ca.isNegativeZero=s,Ca.extend=i,Ca}var Wy,VA;function hm(){if(VA)return Wy;VA=1;function t(n,i){let r="";const s=n.reason||"(unknown reason)";return n.mark?(n.mark.name&&(r+='in "'+n.mark.name+'" '),r+="("+(n.mark.line+1)+":"+(n.mark.column+1)+")",!i&&n.mark.snippet&&(r+=`
|
|
68
|
+
|
|
69
|
+
`+n.mark.snippet),s+" "+r):s}function e(n,i){Error.call(this),this.name="YAMLException",this.reason=n,this.mark=i,this.message=t(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e.prototype.toString=function(i){return this.name+": "+t(this,i)},Wy=e,Wy}var Hy,BA;function Jne(){if(BA)return Hy;BA=1;const t=cm();function e(r,s,o,a,l){let u="",c="";const h=Math.floor(l/2)-1;return a-s>h&&(u=" ... ",s=a-h+u.length),o-a>h&&(c=" ...",o=a+h-c.length),{str:u+r.slice(s,o).replace(/\t/g,"→")+c,pos:a-s+u.length}}function n(r,s){return t.repeat(" ",s-r.length)+r}function i(r,s){if(s=Object.create(s||null),!r.buffer)return null;s.maxLength||(s.maxLength=79),typeof s.indent!="number"&&(s.indent=1),typeof s.linesBefore!="number"&&(s.linesBefore=3),typeof s.linesAfter!="number"&&(s.linesAfter=2);const o=/\r?\n|\r|\0/g,a=[0],l=[];let u,c=-1;for(;u=o.exec(r.buffer);)l.push(u.index),a.push(u.index+u[0].length),r.position<=u.index&&c<0&&(c=a.length-2);c<0&&(c=a.length-1);let h="";const f=Math.min(r.line+s.linesAfter,l.length).toString().length,p=s.maxLength-(s.indent+f+3);for(let g=1;g<=s.linesBefore&&!(c-g<0);g++){const x=e(r.buffer,a[c-g],l[c-g],r.position-(a[c]-a[c-g]),p);h=t.repeat(" ",s.indent)+n((r.line-g+1).toString(),f)+" | "+x.str+`
|
|
70
|
+
`+h}const m=e(r.buffer,a[c],l[c],r.position,p);h+=t.repeat(" ",s.indent)+n((r.line+1).toString(),f)+" | "+m.str+`
|
|
71
|
+
`,h+=t.repeat("-",s.indent+f+3+m.pos)+`^
|
|
72
|
+
`;for(let g=1;g<=s.linesAfter&&!(c+g>=l.length);g++){const x=e(r.buffer,a[c+g],l[c+g],r.position-(a[c]-a[c+g]),p);h+=t.repeat(" ",s.indent)+n((r.line+g+1).toString(),f)+" | "+x.str+`
|
|
73
|
+
`}return h.replace(/\n$/,"")}return Hy=i,Hy}var Uy,FA;function Yi(){if(FA)return Uy;FA=1;const t=hm(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],n=["scalar","sequence","mapping"];function i(s){const o={};return s!==null&&Object.keys(s).forEach(function(a){s[a].forEach(function(l){o[String(l)]=a})}),o}function r(s,o){if(o=o||{},Object.keys(o).forEach(function(a){if(e.indexOf(a)===-1)throw new t('Unknown option "'+a+'" is met in definition of "'+s+'" YAML type.')}),this.options=o,this.tag=s,this.kind=o.kind||null,this.resolve=o.resolve||function(){return!0},this.construct=o.construct||function(a){return a},this.instanceOf=o.instanceOf||null,this.predicate=o.predicate||null,this.represent=o.represent||null,this.representName=o.representName||null,this.defaultStyle=o.defaultStyle||null,this.multi=o.multi||!1,this.styleAliases=i(o.styleAliases||null),n.indexOf(this.kind)===-1)throw new t('Unknown kind "'+this.kind+'" is specified for "'+s+'" YAML type.')}return Uy=r,Uy}var qy,jA;function nN(){if(jA)return qy;jA=1;const t=hm(),e=Yi();function n(s,o){const a=[];return s[o].forEach(function(l){let u=a.length;a.forEach(function(c,h){c.tag===l.tag&&c.kind===l.kind&&c.multi===l.multi&&(u=h)}),a[u]=l}),a}function i(){const s={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function o(a){a.multi?(s.multi[a.kind].push(a),s.multi.fallback.push(a)):s[a.kind][a.tag]=s.fallback[a.tag]=a}for(let a=0,l=arguments.length;a<l;a+=1)arguments[a].forEach(o);return s}function r(s){return this.extend(s)}return r.prototype.extend=function(o){let a=[],l=[];if(o instanceof e)l.push(o);else if(Array.isArray(o))l=l.concat(o);else if(o&&(Array.isArray(o.implicit)||Array.isArray(o.explicit)))o.implicit&&(a=a.concat(o.implicit)),o.explicit&&(l=l.concat(o.explicit));else throw new t("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");a.forEach(function(c){if(!(c instanceof e))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(c.loadKind&&c.loadKind!=="scalar")throw new t("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(c.multi)throw new t("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),l.forEach(function(c){if(!(c instanceof e))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.")});const u=Object.create(r.prototype);return u.implicit=(this.implicit||[]).concat(a),u.explicit=(this.explicit||[]).concat(l),u.compiledImplicit=n(u,"implicit"),u.compiledExplicit=n(u,"explicit"),u.compiledTypeMap=i(u.compiledImplicit,u.compiledExplicit),u},qy=r,qy}var Yy,ZA;function iN(){if(ZA)return Yy;ZA=1;const t=Yi();return Yy=new t("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Yy}var Gy,zA;function rN(){if(zA)return Gy;zA=1;const t=Yi();return Gy=new t("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Gy}var Ky,XA;function sN(){if(XA)return Ky;XA=1;const t=Yi();return Ky=new t("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Ky}var Jy,WA;function oN(){if(WA)return Jy;WA=1;const t=nN();return Jy=new t({explicit:[iN(),rN(),sN()]}),Jy}var ev,HA;function aN(){if(HA)return ev;HA=1;const t=Yi();function e(r){if(r===null)return!0;const s=r.length;return s===1&&r==="~"||s===4&&(r==="null"||r==="Null"||r==="NULL")}function n(){return null}function i(r){return r===null}return ev=new t("tag:yaml.org,2002:null",{kind:"scalar",resolve:e,construct:n,predicate:i,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),ev}var tv,UA;function lN(){if(UA)return tv;UA=1;const t=Yi();function e(r){if(r===null)return!1;const s=r.length;return s===4&&(r==="true"||r==="True"||r==="TRUE")||s===5&&(r==="false"||r==="False"||r==="FALSE")}function n(r){return r==="true"||r==="True"||r==="TRUE"}function i(r){return Object.prototype.toString.call(r)==="[object Boolean]"}return tv=new t("tag:yaml.org,2002:bool",{kind:"scalar",resolve:e,construct:n,predicate:i,represent:{lowercase:function(r){return r?"true":"false"},uppercase:function(r){return r?"TRUE":"FALSE"},camelcase:function(r){return r?"True":"False"}},defaultStyle:"lowercase"}),tv}var nv,qA;function uN(){if(qA)return nv;qA=1;const t=cm(),e=Yi();function n(u){return u>=48&&u<=57||u>=65&&u<=70||u>=97&&u<=102}function i(u){return u>=48&&u<=55}function r(u){return u>=48&&u<=57}function s(u){if(u===null)return!1;const c=u.length;let h=0,f=!1;if(!c)return!1;let p=u[h];if((p==="-"||p==="+")&&(p=u[++h]),p==="0"){if(h+1===c)return!0;if(p=u[++h],p==="b"){for(h++;h<c;h++){if(p=u[h],p!=="0"&&p!=="1")return!1;f=!0}return f&&isFinite(o(u))}if(p==="x"){for(h++;h<c;h++){if(!n(u.charCodeAt(h)))return!1;f=!0}return f&&isFinite(o(u))}if(p==="o"){for(h++;h<c;h++){if(!i(u.charCodeAt(h)))return!1;f=!0}return f&&isFinite(o(u))}}for(;h<c;h++){if(!r(u.charCodeAt(h)))return!1;f=!0}return f?isFinite(o(u)):!1}function o(u){let c=u,h=1,f=c[0];if((f==="-"||f==="+")&&(f==="-"&&(h=-1),c=c.slice(1),f=c[0]),c==="0")return 0;if(f==="0"){if(c[1]==="b")return h*parseInt(c.slice(2),2);if(c[1]==="x")return h*parseInt(c.slice(2),16);if(c[1]==="o")return h*parseInt(c.slice(2),8)}return h*parseInt(c,10)}function a(u){return o(u)}function l(u){return Object.prototype.toString.call(u)==="[object Number]"&&u%1===0&&!t.isNegativeZero(u)}return nv=new e("tag:yaml.org,2002:int",{kind:"scalar",resolve:s,construct:a,predicate:l,represent:{binary:function(u){return u>=0?"0b"+u.toString(2):"-0b"+u.toString(2).slice(1)},octal:function(u){return u>=0?"0o"+u.toString(8):"-0o"+u.toString(8).slice(1)},decimal:function(u){return u.toString(10)},hexadecimal:function(u){return u>=0?"0x"+u.toString(16).toUpperCase():"-0x"+u.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),nv}var iv,YA;function cN(){if(YA)return iv;YA=1;const t=cm(),e=Yi(),n=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),i=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function r(u){return u===null||!n.test(u)?!1:isFinite(parseFloat(u,10))?!0:i.test(u)}function s(u){let c=u.toLowerCase();const h=c[0]==="-"?-1:1;return"+-".indexOf(c[0])>=0&&(c=c.slice(1)),c===".inf"?h===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:c===".nan"?NaN:h*parseFloat(c,10)}const o=/^[-+]?[0-9]+e/;function a(u,c){if(isNaN(u))switch(c){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===u)switch(c){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===u)switch(c){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(t.isNegativeZero(u))return"-0.0";const h=u.toString(10);return o.test(h)?h.replace("e",".e"):h}function l(u){return Object.prototype.toString.call(u)==="[object Number]"&&(u%1!==0||t.isNegativeZero(u))}return iv=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:r,construct:s,predicate:l,represent:a,defaultStyle:"lowercase"}),iv}var rv,GA;function hN(){return GA||(GA=1,rv=oN().extend({implicit:[aN(),lN(),uN(),cN()]})),rv}var sv,KA;function fN(){return KA||(KA=1,sv=hN()),sv}var ov,JA;function dN(){if(JA)return ov;JA=1;const t=Yi(),e=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),n=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function i(o){return o===null?!1:e.exec(o)!==null||n.exec(o)!==null}function r(o){let a=0,l=null,u=e.exec(o);if(u===null&&(u=n.exec(o)),u===null)throw new Error("Date resolve error");const c=+u[1],h=+u[2]-1,f=+u[3];if(!u[4])return new Date(Date.UTC(c,h,f));const p=+u[4],m=+u[5],g=+u[6];if(u[7]){for(a=u[7].slice(0,3);a.length<3;)a+="0";a=+a}if(u[9]){const y=+u[10],S=+(u[11]||0);l=(y*60+S)*6e4,u[9]==="-"&&(l=-l)}const x=new Date(Date.UTC(c,h,f,p,m,g,a));return l&&x.setTime(x.getTime()-l),x}function s(o){return o.toISOString()}return ov=new t("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:r,instanceOf:Date,represent:s}),ov}var av,e3;function pN(){if(e3)return av;e3=1;const t=Yi();function e(n){return n==="<<"||n===null}return av=new t("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e}),av}var lv,t3;function mN(){if(t3)return lv;t3=1;const t=Yi(),e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
74
|
+
\r`;function n(o){if(o===null)return!1;let a=0;const l=o.length,u=e;for(let c=0;c<l;c++){const h=u.indexOf(o.charAt(c));if(!(h>64)){if(h<0)return!1;a+=6}}return a%8===0}function i(o){const a=o.replace(/[\r\n=]/g,""),l=a.length,u=e;let c=0;const h=[];for(let p=0;p<l;p++)p%4===0&&p&&(h.push(c>>16&255),h.push(c>>8&255),h.push(c&255)),c=c<<6|u.indexOf(a.charAt(p));const f=l%4*6;return f===0?(h.push(c>>16&255),h.push(c>>8&255),h.push(c&255)):f===18?(h.push(c>>10&255),h.push(c>>2&255)):f===12&&h.push(c>>4&255),new Uint8Array(h)}function r(o){let a="",l=0;const u=o.length,c=e;for(let f=0;f<u;f++)f%3===0&&f&&(a+=c[l>>18&63],a+=c[l>>12&63],a+=c[l>>6&63],a+=c[l&63]),l=(l<<8)+o[f];const h=u%3;return h===0?(a+=c[l>>18&63],a+=c[l>>12&63],a+=c[l>>6&63],a+=c[l&63]):h===2?(a+=c[l>>10&63],a+=c[l>>4&63],a+=c[l<<2&63],a+=c[64]):h===1&&(a+=c[l>>2&63],a+=c[l<<4&63],a+=c[64],a+=c[64]),a}function s(o){return Object.prototype.toString.call(o)==="[object Uint8Array]"}return lv=new t("tag:yaml.org,2002:binary",{kind:"scalar",resolve:n,construct:i,predicate:s,represent:r}),lv}var uv,n3;function gN(){if(n3)return uv;n3=1;const t=Yi(),e=Object.prototype.hasOwnProperty,n=Object.prototype.toString;function i(s){if(s===null)return!0;const o=[],a=s;for(let l=0,u=a.length;l<u;l+=1){const c=a[l];let h=!1;if(n.call(c)!=="[object Object]")return!1;let f;for(f in c)if(e.call(c,f))if(!h)h=!0;else return!1;if(!h)return!1;if(o.indexOf(f)===-1)o.push(f);else return!1}return!0}function r(s){return s!==null?s:[]}return uv=new t("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:r}),uv}var cv,i3;function ON(){if(i3)return cv;i3=1;const t=Yi(),e=Object.prototype.toString;function n(r){if(r===null)return!0;const s=r,o=new Array(s.length);for(let a=0,l=s.length;a<l;a+=1){const u=s[a];if(e.call(u)!=="[object Object]")return!1;const c=Object.keys(u);if(c.length!==1)return!1;o[a]=[c[0],u[c[0]]]}return!0}function i(r){if(r===null)return[];const s=r,o=new Array(s.length);for(let a=0,l=s.length;a<l;a+=1){const u=s[a],c=Object.keys(u);o[a]=[c[0],u[c[0]]]}return o}return cv=new t("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:n,construct:i}),cv}var hv,r3;function xN(){if(r3)return hv;r3=1;const t=Yi(),e=Object.prototype.hasOwnProperty;function n(r){if(r===null)return!0;const s=r;for(const o in s)if(e.call(s,o)&&s[o]!==null)return!1;return!0}function i(r){return r!==null?r:{}}return hv=new t("tag:yaml.org,2002:set",{kind:"mapping",resolve:n,construct:i}),hv}var fv,s3;function H2(){return s3||(s3=1,fv=fN().extend({implicit:[dN(),pN()],explicit:[mN(),gN(),ON(),xN()]})),fv}var o3;function eie(){if(o3)return og;o3=1;const t=cm(),e=hm(),n=Jne(),i=H2(),r=Object.prototype.hasOwnProperty,s=1,o=2,a=3,l=4,u=1,c=2,h=3,f=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,p=/[\x85\u2028\u2029]/,m=/[,\[\]{}]/,g=/^(?:!|!!|![0-9A-Za-z-]+!)$/,x=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function y(O){return Object.prototype.toString.call(O)}function S(O){return O===10||O===13}function _(O){return O===9||O===32}function k(O){return O===9||O===32||O===10||O===13}function w(O){return O===44||O===91||O===93||O===123||O===125}function b(O){if(O>=48&&O<=57)return O-48;const U=O|32;return U>=97&&U<=102?U-97+10:-1}function E(O){return O===120?2:O===117?4:O===85?8:0}function P(O){return O>=48&&O<=57?O-48:-1}function $(O){switch(O){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
|
|
75
|
+
`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"
";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}function B(O){return O<=65535?String.fromCharCode(O):String.fromCharCode((O-65536>>10)+55296,(O-65536&1023)+56320)}function X(O,U,ie){U==="__proto__"?Object.defineProperty(O,U,{configurable:!0,enumerable:!0,writable:!0,value:ie}):O[U]=ie}const j=new Array(256),Z=new Array(256);for(let O=0;O<256;O++)j[O]=$(O)?1:0,Z[O]=$(O);function G(O,U){this.input=O,this.filename=U.filename||null,this.schema=U.schema||i,this.onWarning=U.onWarning||null,this.legacy=U.legacy||!1,this.json=U.json||!1,this.listener=U.listener||null,this.maxDepth=typeof U.maxDepth=="number"?U.maxDepth:100,this.maxTotalMergeKeys=typeof U.maxTotalMergeKeys=="number"?U.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=O.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function z(O,U){const ie={name:O.filename,buffer:O.input.slice(0,-1),position:O.position,line:O.line,column:O.position-O.lineStart};return ie.snippet=n(ie),new e(U,ie)}function J(O,U){throw z(O,U)}function ue(O,U){O.onWarning&&O.onWarning.call(null,z(O,U))}function Le(O,U,ie){const M=O.anchorMapTransactions;if(M.length!==0){const D=M[M.length-1];r.call(D,U)||(D[U]={existed:r.call(O.anchorMap,U),value:O.anchorMap[U]})}O.anchorMap[U]=ie}function ye(O){O.anchorMapTransactions.push(Object.create(null))}function xe(O){const U=O.anchorMapTransactions.pop(),ie=O.anchorMapTransactions;if(ie.length===0)return;const M=ie[ie.length-1],D=Object.keys(U);for(let L=0,A=D.length;L<A;L+=1){const F=D[L];r.call(M,F)||(M[F]=U[F])}}function Re(O){const U=O.anchorMapTransactions.pop(),ie=Object.keys(U);for(let M=ie.length-1;M>=0;M-=1){const D=U[ie[M]];D.existed?O.anchorMap[ie[M]]=D.value:delete O.anchorMap[ie[M]]}}function Ae(O){return{position:O.position,line:O.line,lineStart:O.lineStart,lineIndent:O.lineIndent,firstTabInLine:O.firstTabInLine,tag:O.tag,anchor:O.anchor,kind:O.kind,result:O.result}}function Be(O,U){O.position=U.position,O.line=U.line,O.lineStart=U.lineStart,O.lineIndent=U.lineIndent,O.firstTabInLine=U.firstTabInLine,O.tag=U.tag,O.anchor=U.anchor,O.kind=U.kind,O.result=U.result}const lt={YAML:function(U,ie,M){U.version!==null&&J(U,"duplication of %YAML directive"),M.length!==1&&J(U,"YAML directive accepts exactly one argument");const D=/^([0-9]+)\.([0-9]+)$/.exec(M[0]);D===null&&J(U,"ill-formed argument of the YAML directive");const L=parseInt(D[1],10),A=parseInt(D[2],10);L!==1&&J(U,"unacceptable YAML version of the document"),U.version=M[0],U.checkLineBreaks=A<2,A!==1&&A!==2&&ue(U,"unsupported YAML version of the document")},TAG:function(U,ie,M){let D;M.length!==2&&J(U,"TAG directive accepts exactly two arguments");const L=M[0];D=M[1],g.test(L)||J(U,"ill-formed tag handle (first argument) of the TAG directive"),r.call(U.tagMap,L)&&J(U,'there is a previously declared suffix for "'+L+'" tag handle'),x.test(D)||J(U,"ill-formed tag prefix (second argument) of the TAG directive");try{D=decodeURIComponent(D)}catch{J(U,"tag prefix is malformed: "+D)}U.tagMap[L]=D}};function qe(O,U,ie,M){if(U<ie){const D=O.input.slice(U,ie);if(M)for(let L=0,A=D.length;L<A;L+=1){const F=D.charCodeAt(L);F===9||F>=32&&F<=1114111||J(O,"expected valid JSON character")}else f.test(D)&&J(O,"the stream contains non-printable characters");O.result+=D}}function je(O,U,ie,M){t.isObject(ie)||J(O,"cannot merge mappings; the provided source object is unacceptable");const D=Object.keys(ie);for(let L=0,A=D.length;L<A;L+=1){const F=D[L];O.maxTotalMergeKeys!==-1&&++O.totalMergeKeys>O.maxTotalMergeKeys&&J(O,"merge keys exceeded maxTotalMergeKeys ("+O.maxTotalMergeKeys+")"),r.call(U,F)||(X(U,F,ie[F]),M[F]=!0)}}function we(O,U,ie,M,D,L,A,F,K){if(Array.isArray(D)){D=Array.prototype.slice.call(D);for(let H=0,q=D.length;H<q;H+=1)Array.isArray(D[H])&&J(O,"nested arrays are not supported inside keys"),typeof D=="object"&&y(D[H])==="[object Object]"&&(D[H]="[object Object]")}if(typeof D=="object"&&y(D)==="[object Object]"&&(D="[object Object]"),D=String(D),U===null&&(U={}),M==="tag:yaml.org,2002:merge")if(Array.isArray(L))for(let H=0,q=L.length;H<q;H+=1)je(O,U,L[H],ie);else je(O,U,L,ie);else!O.json&&!r.call(ie,D)&&r.call(U,D)&&(O.line=A||O.line,O.lineStart=F||O.lineStart,O.position=K||O.position,J(O,"duplicated mapping key")),X(U,D,L),delete ie[D];return U}function pe(O){const U=O.input.charCodeAt(O.position);U===10?O.position++:U===13?(O.position++,O.input.charCodeAt(O.position)===10&&O.position++):J(O,"a line break is expected"),O.line+=1,O.lineStart=O.position,O.firstTabInLine=-1}function ge(O,U,ie){let M=0,D=O.input.charCodeAt(O.position);for(;D!==0;){for(;_(D);)D===9&&O.firstTabInLine===-1&&(O.firstTabInLine=O.position),D=O.input.charCodeAt(++O.position);if(U&&D===35)do D=O.input.charCodeAt(++O.position);while(D!==10&&D!==13&&D!==0);if(S(D))for(pe(O),D=O.input.charCodeAt(O.position),M++,O.lineIndent=0;D===32;)O.lineIndent++,D=O.input.charCodeAt(++O.position);else break}return ie!==-1&&M!==0&&O.lineIndent<ie&&ue(O,"deficient indentation"),M}function Ve(O){let U=O.position,ie=O.input.charCodeAt(U);return!!((ie===45||ie===46)&&ie===O.input.charCodeAt(U+1)&&ie===O.input.charCodeAt(U+2)&&(U+=3,ie=O.input.charCodeAt(U),ie===0||k(ie)))}function Ze(O,U){U===1?O.result+=" ":U>1&&(O.result+=t.repeat(`
|
|
76
|
+
`,U-1))}function Ge(O,U,ie){let M,D,L,A,F,K;const H=O.kind,q=O.result;let re=O.input.charCodeAt(O.position);if(k(re)||w(re)||re===35||re===38||re===42||re===33||re===124||re===62||re===39||re===34||re===37||re===64||re===96)return!1;if(re===63||re===45){const he=O.input.charCodeAt(O.position+1);if(k(he)||ie&&w(he))return!1}for(O.kind="scalar",O.result="",M=D=O.position,L=!1;re!==0;){if(re===58){const he=O.input.charCodeAt(O.position+1);if(k(he)||ie&&w(he))break}else if(re===35){const he=O.input.charCodeAt(O.position-1);if(k(he))break}else{if(O.position===O.lineStart&&Ve(O)||ie&&w(re))break;if(S(re))if(A=O.line,F=O.lineStart,K=O.lineIndent,ge(O,!1,-1),O.lineIndent>=U){L=!0,re=O.input.charCodeAt(O.position);continue}else{O.position=D,O.line=A,O.lineStart=F,O.lineIndent=K;break}}L&&(qe(O,M,D,!1),Ze(O,O.line-A),M=D=O.position,L=!1),_(re)||(D=O.position+1),re=O.input.charCodeAt(++O.position)}return qe(O,M,D,!1),O.result?!0:(O.kind=H,O.result=q,!1)}function et(O,U){let ie,M,D=O.input.charCodeAt(O.position);if(D!==39)return!1;for(O.kind="scalar",O.result="",O.position++,ie=M=O.position;(D=O.input.charCodeAt(O.position))!==0;)if(D===39)if(qe(O,ie,O.position,!0),D=O.input.charCodeAt(++O.position),D===39)ie=O.position,O.position++,M=O.position;else return!0;else S(D)?(qe(O,ie,M,!0),Ze(O,ge(O,!1,U)),ie=M=O.position):O.position===O.lineStart&&Ve(O)?J(O,"unexpected end of the document within a single quoted scalar"):(O.position++,_(D)||(M=O.position));J(O,"unexpected end of the stream within a single quoted scalar")}function Qt(O,U){let ie,M,D,L=O.input.charCodeAt(O.position);if(L!==34)return!1;for(O.kind="scalar",O.result="",O.position++,ie=M=O.position;(L=O.input.charCodeAt(O.position))!==0;){if(L===34)return qe(O,ie,O.position,!0),O.position++,!0;if(L===92){if(qe(O,ie,O.position,!0),L=O.input.charCodeAt(++O.position),S(L))ge(O,!1,U);else if(L<256&&j[L])O.result+=Z[L],O.position++;else if((D=E(L))>0){let A=D,F=0;for(;A>0;A--)L=O.input.charCodeAt(++O.position),(D=b(L))>=0?F=(F<<4)+D:J(O,"expected hexadecimal character");O.result+=B(F),O.position++}else J(O,"unknown escape sequence");ie=M=O.position}else S(L)?(qe(O,ie,M,!0),Ze(O,ge(O,!1,U)),ie=M=O.position):O.position===O.lineStart&&Ve(O)?J(O,"unexpected end of the document within a double quoted scalar"):(O.position++,_(L)||(M=O.position))}J(O,"unexpected end of the stream within a double quoted scalar")}function wt(O,U){let ie=!0,M,D,L;const A=O.tag;let F;const K=O.anchor;let H,q,re,he;const _e=Object.create(null);let be,Ie,Pe,ct=O.input.charCodeAt(O.position);if(ct===91)H=93,he=!1,F=[];else if(ct===123)H=125,he=!0,F={};else return!1;for(O.anchor!==null&&Le(O,O.anchor,F),ct=O.input.charCodeAt(++O.position);ct!==0;){if(ge(O,!0,U),ct=O.input.charCodeAt(O.position),ct===H)return O.position++,O.tag=A,O.anchor=K,O.kind=he?"mapping":"sequence",O.result=F,!0;if(ie?ct===44&&J(O,"expected the node content, but found ','"):J(O,"missed comma between flow collection entries"),Ie=be=Pe=null,q=re=!1,ct===63){const Me=O.input.charCodeAt(O.position+1);k(Me)&&(q=re=!0,O.position++,ge(O,!0,U))}M=O.line,D=O.lineStart,L=O.position,vn(O,U,s,!1,!0),Ie=O.tag,be=O.result,ge(O,!0,U),ct=O.input.charCodeAt(O.position),(re||O.line===M)&&ct===58&&(q=!0,ct=O.input.charCodeAt(++O.position),ge(O,!0,U),vn(O,U,s,!1,!0),Pe=O.result),he?we(O,F,_e,Ie,be,Pe,M,D,L):q?F.push(we(O,null,_e,Ie,be,Pe,M,D,L)):F.push(be),ge(O,!0,U),ct=O.input.charCodeAt(O.position),ct===44?(ie=!0,ct=O.input.charCodeAt(++O.position)):ie=!1}J(O,"unexpected end of the stream within a flow collection")}function Ut(O,U){let ie,M=u,D=!1,L=!1,A=U,F=0,K=!1,H,q=O.input.charCodeAt(O.position);if(q===124)ie=!1;else if(q===62)ie=!0;else return!1;for(O.kind="scalar",O.result="";q!==0;)if(q=O.input.charCodeAt(++O.position),q===43||q===45)u===M?M=q===43?h:c:J(O,"repeat of a chomping mode identifier");else if((H=P(q))>=0)H===0?J(O,"bad explicit indentation width of a block scalar; it cannot be less than one"):L?J(O,"repeat of an indentation width identifier"):(A=U+H-1,L=!0);else break;if(_(q)){do q=O.input.charCodeAt(++O.position);while(_(q));if(q===35)do q=O.input.charCodeAt(++O.position);while(!S(q)&&q!==0)}for(;q!==0;){for(pe(O),O.lineIndent=0,q=O.input.charCodeAt(O.position);(!L||O.lineIndent<A)&&q===32;)O.lineIndent++,q=O.input.charCodeAt(++O.position);if(!L&&O.lineIndent>A&&(A=O.lineIndent),S(q)){F++;continue}if(!L&&A===0&&J(O,"missing indentation for block scalar"),O.lineIndent<A){M===h?O.result+=t.repeat(`
|
|
77
|
+
`,D?1+F:F):M===u&&D&&(O.result+=`
|
|
78
|
+
`);break}ie?_(q)?(K=!0,O.result+=t.repeat(`
|
|
79
|
+
`,D?1+F:F)):K?(K=!1,O.result+=t.repeat(`
|
|
80
|
+
`,F+1)):F===0?D&&(O.result+=" "):O.result+=t.repeat(`
|
|
81
|
+
`,F):O.result+=t.repeat(`
|
|
82
|
+
`,D?1+F:F),D=!0,L=!0,F=0;const re=O.position;for(;!S(q)&&q!==0;)q=O.input.charCodeAt(++O.position);qe(O,re,O.position,!1)}return!0}function xt(O,U){const ie=O.tag,M=O.anchor,D=[];let L=!1;if(O.firstTabInLine!==-1)return!1;O.anchor!==null&&Le(O,O.anchor,D);let A=O.input.charCodeAt(O.position);for(;A!==0&&(O.firstTabInLine!==-1&&(O.position=O.firstTabInLine,J(O,"tab characters must not be used in indentation")),A===45);){const F=O.input.charCodeAt(O.position+1);if(!k(F))break;if(L=!0,O.position++,ge(O,!0,-1)&&O.lineIndent<=U){D.push(null),A=O.input.charCodeAt(O.position);continue}const K=O.line;if(vn(O,U,a,!1,!0),D.push(O.result),ge(O,!0,-1),A=O.input.charCodeAt(O.position),(O.line===K||O.lineIndent>U)&&A!==0)J(O,"bad indentation of a sequence entry");else if(O.lineIndent<U)break}return L?(O.tag=ie,O.anchor=M,O.kind="sequence",O.result=D,!0):!1}function dn(O,U,ie){let M,D,L,A;const F=O.tag,K=O.anchor,H={},q=Object.create(null);let re=null,he=null,_e=null,be=!1,Ie=!1;if(O.firstTabInLine!==-1)return!1;O.anchor!==null&&Le(O,O.anchor,H);let Pe=O.input.charCodeAt(O.position);for(;Pe!==0;){!be&&O.firstTabInLine!==-1&&(O.position=O.firstTabInLine,J(O,"tab characters must not be used in indentation"));const ct=O.input.charCodeAt(O.position+1),Me=O.line;if((Pe===63||Pe===58)&&k(ct))Pe===63?(be&&(we(O,H,q,re,he,null,D,L,A),re=he=_e=null),Ie=!0,be=!0,M=!0):be?(be=!1,M=!0):J(O,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),O.position+=1,Pe=ct;else{if(D=O.line,L=O.lineStart,A=O.position,!vn(O,ie,o,!1,!0))break;if(O.line===Me){for(Pe=O.input.charCodeAt(O.position);_(Pe);)Pe=O.input.charCodeAt(++O.position);if(Pe===58)Pe=O.input.charCodeAt(++O.position),k(Pe)||J(O,"a whitespace character is expected after the key-value separator within a block mapping"),be&&(we(O,H,q,re,he,null,D,L,A),re=he=_e=null),Ie=!0,be=!1,M=!1,re=O.tag,he=O.result;else if(Ie)J(O,"can not read an implicit mapping pair; a colon is missed");else return O.tag=F,O.anchor=K,!0}else if(Ie)J(O,"can not read a block mapping entry; a multiline key may not be an implicit key");else return O.tag=F,O.anchor=K,!0}if((O.line===Me||O.lineIndent>U)&&(be&&(D=O.line,L=O.lineStart,A=O.position),vn(O,U,l,!0,M)&&(be?he=O.result:_e=O.result),be||(we(O,H,q,re,he,_e,D,L,A),re=he=_e=null),ge(O,!0,-1),Pe=O.input.charCodeAt(O.position)),(O.line===Me||O.lineIndent>U)&&Pe!==0)J(O,"bad indentation of a mapping entry");else if(O.lineIndent<U)break}return be&&we(O,H,q,re,he,null,D,L,A),Ie&&(O.tag=F,O.anchor=K,O.kind="mapping",O.result=H),Ie}function En(O){let U=!1,ie=!1,M,D,L=O.input.charCodeAt(O.position);if(L!==33)return!1;O.tag!==null&&J(O,"duplication of a tag property"),L=O.input.charCodeAt(++O.position),L===60?(U=!0,L=O.input.charCodeAt(++O.position)):L===33?(ie=!0,M="!!",L=O.input.charCodeAt(++O.position)):M="!";let A=O.position;if(U){do L=O.input.charCodeAt(++O.position);while(L!==0&&L!==62);O.position<O.length?(D=O.input.slice(A,O.position),L=O.input.charCodeAt(++O.position)):J(O,"unexpected end of the stream within a verbatim tag")}else{for(;L!==0&&!k(L);)L===33&&(ie?J(O,"tag suffix cannot contain exclamation marks"):(M=O.input.slice(A-1,O.position+1),g.test(M)||J(O,"named tag handle cannot contain such characters"),ie=!0,A=O.position+1)),L=O.input.charCodeAt(++O.position);D=O.input.slice(A,O.position),m.test(D)&&J(O,"tag suffix cannot contain flow indicator characters")}D&&!x.test(D)&&J(O,"tag name cannot contain such characters: "+D);try{D=decodeURIComponent(D)}catch{J(O,"tag name is malformed: "+D)}return U?O.tag=D:r.call(O.tagMap,M)?O.tag=O.tagMap[M]+D:M==="!"?O.tag="!"+D:M==="!!"?O.tag="tag:yaml.org,2002:"+D:J(O,'undeclared tag handle "'+M+'"'),!0}function Tn(O){let U=O.input.charCodeAt(O.position);if(U!==38)return!1;O.anchor!==null&&J(O,"duplication of an anchor property"),U=O.input.charCodeAt(++O.position);const ie=O.position;for(;U!==0&&!k(U)&&!w(U);)U=O.input.charCodeAt(++O.position);return O.position===ie&&J(O,"name of an anchor node must contain at least one character"),O.anchor=O.input.slice(ie,O.position),!0}function pn(O){let U=O.input.charCodeAt(O.position);if(U!==42)return!1;U=O.input.charCodeAt(++O.position);const ie=O.position;for(;U!==0&&!k(U)&&!w(U);)U=O.input.charCodeAt(++O.position);O.position===ie&&J(O,"name of an alias node must contain at least one character");const M=O.input.slice(ie,O.position);return r.call(O.anchorMap,M)||J(O,'unidentified alias "'+M+'"'),O.result=O.anchorMap[M],ge(O,!0,-1),!0}function An(O,U,ie,M){const D=Ae(O);return ye(O),Be(O,U),O.tag=null,O.anchor=null,O.kind=null,O.result=null,dn(O,ie,M)&&O.kind==="mapping"?(xe(O),!0):(Re(O),Be(O,D),!1)}function vn(O,U,ie,M,D){let L,A,F=1,K=!1,H=!1,q=null,re,he,_e;O.depth>=O.maxDepth&&J(O,"nesting exceeded maxDepth ("+O.maxDepth+")"),O.depth+=1,O.listener!==null&&O.listener("open",O),O.tag=null,O.anchor=null,O.kind=null,O.result=null;const be=L=A=l===ie||a===ie;if(M&&ge(O,!0,-1)&&(K=!0,O.lineIndent>U?F=1:O.lineIndent===U?F=0:O.lineIndent<U&&(F=-1)),F===1)for(;;){const Ie=O.input.charCodeAt(O.position),Pe=Ae(O);if(K&&(Ie===33&&O.tag!==null||Ie===38&&O.anchor!==null)||!En(O)&&!Tn(O))break;q===null&&(q=Pe),ge(O,!0,-1)?(K=!0,A=be,O.lineIndent>U?F=1:O.lineIndent===U?F=0:O.lineIndent<U&&(F=-1)):A=!1}if(A&&(A=K||D),F===1||l===ie)if(s===ie||o===ie?he=U:he=U+1,_e=O.position-O.lineStart,F===1)if(A&&(xt(O,_e)||dn(O,_e,he))||wt(O,he))H=!0;else{const Ie=O.input.charCodeAt(O.position);q!==null&&be&&!A&&Ie!==124&&Ie!==62&&An(O,q,q.position-q.lineStart,he)||L&&Ut(O,he)||et(O,he)||Qt(O,he)?H=!0:pn(O)?(H=!0,(O.tag!==null||O.anchor!==null)&&J(O,"alias node should not have any properties")):Ge(O,he,s===ie)&&(H=!0,O.tag===null&&(O.tag="?")),O.anchor!==null&&Le(O,O.anchor,O.result)}else F===0&&(H=A&&xt(O,_e));if(O.tag===null)O.anchor!==null&&Le(O,O.anchor,O.result);else if(O.tag==="?"){O.result!==null&&O.kind!=="scalar"&&J(O,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+O.kind+'"');for(let Ie=0,Pe=O.implicitTypes.length;Ie<Pe;Ie+=1)if(re=O.implicitTypes[Ie],re.resolve(O.result)){O.result=re.construct(O.result),O.tag=re.tag,O.anchor!==null&&Le(O,O.anchor,O.result);break}}else if(O.tag!=="!"){if(r.call(O.typeMap[O.kind||"fallback"],O.tag))re=O.typeMap[O.kind||"fallback"][O.tag];else{re=null;const Ie=O.typeMap.multi[O.kind||"fallback"];for(let Pe=0,ct=Ie.length;Pe<ct;Pe+=1)if(O.tag.slice(0,Ie[Pe].tag.length)===Ie[Pe].tag){re=Ie[Pe];break}}re||J(O,"unknown tag !<"+O.tag+">"),O.result!==null&&re.kind!==O.kind&&J(O,"unacceptable node kind for !<"+O.tag+'> tag; it should be "'+re.kind+'", not "'+O.kind+'"'),re.resolve(O.result,O.tag)?(O.result=re.construct(O.result,O.tag),O.anchor!==null&&Le(O,O.anchor,O.result)):J(O,"cannot resolve a node with !<"+O.tag+"> explicit tag")}return O.listener!==null&&O.listener("close",O),O.depth-=1,O.tag!==null||O.anchor!==null||H}function ft(O){const U=O.position;let ie=!1,M;for(O.version=null,O.checkLineBreaks=O.legacy,O.tagMap=Object.create(null),O.anchorMap=Object.create(null);(M=O.input.charCodeAt(O.position))!==0&&(ge(O,!0,-1),M=O.input.charCodeAt(O.position),!(O.lineIndent>0||M!==37));){ie=!0,M=O.input.charCodeAt(++O.position);let D=O.position;for(;M!==0&&!k(M);)M=O.input.charCodeAt(++O.position);const L=O.input.slice(D,O.position),A=[];for(L.length<1&&J(O,"directive name must not be less than one character in length");M!==0;){for(;_(M);)M=O.input.charCodeAt(++O.position);if(M===35){do M=O.input.charCodeAt(++O.position);while(M!==0&&!S(M));break}if(S(M))break;for(D=O.position;M!==0&&!k(M);)M=O.input.charCodeAt(++O.position);A.push(O.input.slice(D,O.position))}M!==0&&pe(O),r.call(lt,L)?lt[L](O,L,A):ue(O,'unknown document directive "'+L+'"')}if(ge(O,!0,-1),O.lineIndent===0&&O.input.charCodeAt(O.position)===45&&O.input.charCodeAt(O.position+1)===45&&O.input.charCodeAt(O.position+2)===45?(O.position+=3,ge(O,!0,-1)):ie&&J(O,"directives end mark is expected"),vn(O,O.lineIndent-1,l,!1,!0),ge(O,!0,-1),O.checkLineBreaks&&p.test(O.input.slice(U,O.position))&&ue(O,"non-ASCII line breaks are interpreted as content"),O.documents.push(O.result),O.position===O.lineStart&&Ve(O)){O.input.charCodeAt(O.position)===46&&(O.position+=3,ge(O,!0,-1));return}O.position<O.length-1&&J(O,"end of the stream or a document separator is expected")}function $n(O,U){O=String(O),U=U||{},O.length!==0&&(O.charCodeAt(O.length-1)!==10&&O.charCodeAt(O.length-1)!==13&&(O+=`
|
|
83
|
+
`),O.charCodeAt(0)===65279&&(O=O.slice(1)));const ie=new G(O,U),M=O.indexOf("\0");for(M!==-1&&(ie.position=M,J(ie,"null byte is not allowed in input")),ie.input+="\0";ie.input.charCodeAt(ie.position)===32;)ie.lineIndent+=1,ie.position+=1;for(;ie.position<ie.length-1;)ft(ie);return ie.documents}function Di(O,U,ie){U!==null&&typeof U=="object"&&typeof ie>"u"&&(ie=U,U=null);const M=$n(O,ie);if(typeof U!="function")return M;for(let D=0,L=M.length;D<L;D+=1)U(M[D])}function Mt(O,U){const ie=$n(O,U);if(ie.length!==0){if(ie.length===1)return ie[0];throw new e("expected a single document in the stream, but found more")}}return og.loadAll=Di,og.load=Mt,og}var dv={},a3;function tie(){if(a3)return dv;a3=1;const t=cm(),e=hm(),n=H2(),i=Object.prototype.toString,r=Object.prototype.hasOwnProperty,s=65279,o=9,a=10,l=13,u=32,c=33,h=34,f=35,p=37,m=38,g=39,x=42,y=44,S=45,_=58,k=61,w=62,b=63,E=64,P=91,$=93,B=96,X=123,j=124,Z=125,G={};G[0]="\\0",G[7]="\\a",G[8]="\\b",G[9]="\\t",G[10]="\\n",G[11]="\\v",G[12]="\\f",G[13]="\\r",G[27]="\\e",G[34]='\\"',G[92]="\\\\",G[133]="\\N",G[160]="\\_",G[8232]="\\L",G[8233]="\\P";const z=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],J=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function ue(A,F){if(F===null)return{};const K={},H=Object.keys(F);for(let q=0,re=H.length;q<re;q+=1){let he=H[q],_e=String(F[he]);he.slice(0,2)==="!!"&&(he="tag:yaml.org,2002:"+he.slice(2));const be=A.compiledTypeMap.fallback[he];be&&r.call(be.styleAliases,_e)&&(_e=be.styleAliases[_e]),K[he]=_e}return K}function Le(A){let F,K;const H=A.toString(16).toUpperCase();if(A<=255)F="x",K=2;else if(A<=65535)F="u",K=4;else if(A<=4294967295)F="U",K=8;else throw new e("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+F+t.repeat("0",K-H.length)+H}const ye=1,xe=2;function Re(A){this.schema=A.schema||n,this.indent=Math.max(1,A.indent||2),this.noArrayIndent=A.noArrayIndent||!1,this.skipInvalid=A.skipInvalid||!1,this.flowLevel=t.isNothing(A.flowLevel)?-1:A.flowLevel,this.styleMap=ue(this.schema,A.styles||null),this.sortKeys=A.sortKeys||!1,this.lineWidth=A.lineWidth||80,this.noRefs=A.noRefs||!1,this.noCompatMode=A.noCompatMode||!1,this.condenseFlow=A.condenseFlow||!1,this.quotingType=A.quotingType==='"'?xe:ye,this.forceQuotes=A.forceQuotes||!1,this.replacer=typeof A.replacer=="function"?A.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Ae(A,F){const K=t.repeat(" ",F);let H=0,q="";const re=A.length;for(;H<re;){let he;const _e=A.indexOf(`
|
|
84
|
+
`,H);_e===-1?(he=A.slice(H),H=re):(he=A.slice(H,_e+1),H=_e+1),he.length&&he!==`
|
|
85
|
+
`&&(q+=K),q+=he}return q}function Be(A,F){return`
|
|
86
|
+
`+t.repeat(" ",A.indent*F)}function lt(A,F){for(let K=0,H=A.implicitTypes.length;K<H;K+=1)if(A.implicitTypes[K].resolve(F))return!0;return!1}function qe(A){return A===u||A===o}function je(A){return A>=32&&A<=126||A>=161&&A<=55295&&A!==8232&&A!==8233||A>=57344&&A<=65533&&A!==s||A>=65536&&A<=1114111}function we(A){return je(A)&&A!==s&&A!==l&&A!==a}function pe(A,F,K){const H=we(A),q=H&&!qe(A);return(K?H:H&&A!==y&&A!==P&&A!==$&&A!==X&&A!==Z)&&A!==f&&!(F===_&&!q)||we(F)&&!qe(F)&&A===f||F===_&&q}function ge(A){return je(A)&&A!==s&&!qe(A)&&A!==S&&A!==b&&A!==_&&A!==y&&A!==P&&A!==$&&A!==X&&A!==Z&&A!==f&&A!==m&&A!==x&&A!==c&&A!==j&&A!==k&&A!==w&&A!==g&&A!==h&&A!==p&&A!==E&&A!==B}function Ve(A){return!qe(A)&&A!==_}function Ze(A,F){const K=A.charCodeAt(F);let H;return K>=55296&&K<=56319&&F+1<A.length&&(H=A.charCodeAt(F+1),H>=56320&&H<=57343)?(K-55296)*1024+H-56320+65536:K}function Ge(A){return/^\n* /.test(A)}const et=1,Qt=2,wt=3,Ut=4,xt=5;function dn(A,F,K,H,q,re,he,_e){let be,Ie=0,Pe=null,ct=!1,Me=!1;const Al=H!==-1;let Qr=-1,$l=ge(Ze(A,0))&&Ve(Ze(A,A.length-1));if(F||he)for(be=0;be<A.length;Ie>=65536?be+=2:be++){if(Ie=Ze(A,be),!je(Ie))return xt;$l=$l&&pe(Ie,Pe,_e),Pe=Ie}else{for(be=0;be<A.length;Ie>=65536?be+=2:be++){if(Ie=Ze(A,be),Ie===a)ct=!0,Al&&(Me=Me||be-Qr-1>H&&A[Qr+1]!==" ",Qr=be);else if(!je(Ie))return xt;$l=$l&&pe(Ie,Pe,_e),Pe=Ie}Me=Me||Al&&be-Qr-1>H&&A[Qr+1]!==" "}return!ct&&!Me?$l&&!he&&!q(A)?et:re===xe?xt:Qt:K>9&&Ge(A)?xt:he?re===xe?xt:Qt:Me?Ut:wt}function En(A,F,K,H,q){A.dump=(function(){if(F.length===0)return A.quotingType===xe?'""':"''";if(!A.noCompatMode&&(z.indexOf(F)!==-1||J.test(F)))return A.quotingType===xe?'"'+F+'"':"'"+F+"'";const re=A.indent*Math.max(1,K),he=A.lineWidth===-1?-1:Math.max(Math.min(A.lineWidth,40),A.lineWidth-re),_e=H||A.flowLevel>-1&&K>=A.flowLevel;function be(Ie){return lt(A,Ie)}switch(dn(F,_e,A.indent,he,be,A.quotingType,A.forceQuotes&&!H,q)){case et:return F;case Qt:return"'"+F.replace(/'/g,"''")+"'";case wt:return"|"+Tn(F,A.indent)+pn(Ae(F,re));case Ut:return">"+Tn(F,A.indent)+pn(Ae(An(F,he),re));case xt:return'"'+ft(F)+'"';default:throw new e("impossible error: invalid scalar style")}})()}function Tn(A,F){const K=Ge(A)?String(F):"",H=A[A.length-1]===`
|
|
87
|
+
`,re=H&&(A[A.length-2]===`
|
|
88
|
+
`||A===`
|
|
89
|
+
`)?"+":H?"":"-";return K+re+`
|
|
90
|
+
`}function pn(A){return A[A.length-1]===`
|
|
91
|
+
`?A.slice(0,-1):A}function An(A,F){const K=/(\n+)([^\n]*)/g;let H=(function(){let _e=A.indexOf(`
|
|
92
|
+
`);return _e=_e!==-1?_e:A.length,K.lastIndex=_e,vn(A.slice(0,_e),F)})(),q=A[0]===`
|
|
93
|
+
`||A[0]===" ",re,he;for(;he=K.exec(A);){const _e=he[1],be=he[2];re=be[0]===" ",H+=_e+(!q&&!re&&be!==""?`
|
|
94
|
+
`:"")+vn(be,F),q=re}return H}function vn(A,F){if(A===""||A[0]===" ")return A;const K=/ [^ ]/g;let H,q=0,re,he=0,_e=0,be="";for(;H=K.exec(A);)_e=H.index,_e-q>F&&(re=he>q?he:_e,be+=`
|
|
95
|
+
`+A.slice(q,re),q=re+1),he=_e;return be+=`
|
|
96
|
+
`,A.length-q>F&&he>q?be+=A.slice(q,he)+`
|
|
97
|
+
`+A.slice(he+1):be+=A.slice(q),be.slice(1)}function ft(A){let F="",K=0;for(let H=0;H<A.length;K>=65536?H+=2:H++){K=Ze(A,H);const q=G[K];!q&&je(K)?(F+=A[H],K>=65536&&(F+=A[H+1])):F+=q||Le(K)}return F}function $n(A,F,K){let H="";const q=A.tag;for(let re=0,he=K.length;re<he;re+=1){let _e=K[re];A.replacer&&(_e=A.replacer.call(K,String(re),_e)),(ie(A,F,_e,!1,!1)||typeof _e>"u"&&ie(A,F,null,!1,!1))&&(H!==""&&(H+=","+(A.condenseFlow?"":" ")),H+=A.dump)}A.tag=q,A.dump="["+H+"]"}function Di(A,F,K,H){let q="";const re=A.tag;for(let he=0,_e=K.length;he<_e;he+=1){let be=K[he];A.replacer&&(be=A.replacer.call(K,String(he),be)),(ie(A,F+1,be,!0,!0,!1,!0)||typeof be>"u"&&ie(A,F+1,null,!0,!0,!1,!0))&&((!H||q!=="")&&(q+=Be(A,F)),A.dump&&a===A.dump.charCodeAt(0)?q+="-":q+="- ",q+=A.dump)}A.tag=re,A.dump=q||"[]"}function Mt(A,F,K){let H="";const q=A.tag,re=Object.keys(K);for(let he=0,_e=re.length;he<_e;he+=1){let be="";H!==""&&(be+=", "),A.condenseFlow&&(be+='"');const Ie=re[he];let Pe=K[Ie];A.replacer&&(Pe=A.replacer.call(K,Ie,Pe)),ie(A,F,Ie,!1,!1)&&(A.dump.length>1024&&(be+="? "),be+=A.dump+(A.condenseFlow?'"':"")+":"+(A.condenseFlow?"":" "),ie(A,F,Pe,!1,!1)&&(be+=A.dump,H+=be))}A.tag=q,A.dump="{"+H+"}"}function O(A,F,K,H){let q="";const re=A.tag,he=Object.keys(K);if(A.sortKeys===!0)he.sort();else if(typeof A.sortKeys=="function")he.sort(A.sortKeys);else if(A.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let _e=0,be=he.length;_e<be;_e+=1){let Ie="";(!H||q!=="")&&(Ie+=Be(A,F));const Pe=he[_e];let ct=K[Pe];if(A.replacer&&(ct=A.replacer.call(K,Pe,ct)),!ie(A,F+1,Pe,!0,!0,!0))continue;const Me=A.tag!==null&&A.tag!=="?"||A.dump&&A.dump.length>1024;Me&&(A.dump&&a===A.dump.charCodeAt(0)?Ie+="?":Ie+="? "),Ie+=A.dump,Me&&(Ie+=Be(A,F)),ie(A,F+1,ct,!0,Me)&&(A.dump&&a===A.dump.charCodeAt(0)?Ie+=":":Ie+=": ",Ie+=A.dump,q+=Ie)}A.tag=re,A.dump=q||"{}"}function U(A,F,K){const H=K?A.explicitTypes:A.implicitTypes;for(let q=0,re=H.length;q<re;q+=1){const he=H[q];if((he.instanceOf||he.predicate)&&(!he.instanceOf||typeof F=="object"&&F instanceof he.instanceOf)&&(!he.predicate||he.predicate(F))){if(K?he.multi&&he.representName?A.tag=he.representName(F):A.tag=he.tag:A.tag="?",he.represent){const _e=A.styleMap[he.tag]||he.defaultStyle;let be;if(i.call(he.represent)==="[object Function]")be=he.represent(F,_e);else if(r.call(he.represent,_e))be=he.represent[_e](F,_e);else throw new e("!<"+he.tag+'> tag resolver accepts not "'+_e+'" style');A.dump=be}return!0}}return!1}function ie(A,F,K,H,q,re,he){A.tag=null,A.dump=K,U(A,K,!1)||U(A,K,!0);const _e=i.call(A.dump),be=H;H&&(H=A.flowLevel<0||A.flowLevel>F);const Ie=_e==="[object Object]"||_e==="[object Array]";let Pe,ct;if(Ie&&(Pe=A.duplicates.indexOf(K),ct=Pe!==-1),(A.tag!==null&&A.tag!=="?"||ct||A.indent!==2&&F>0)&&(q=!1),ct&&A.usedDuplicates[Pe])A.dump="*ref_"+Pe;else{if(Ie&&ct&&!A.usedDuplicates[Pe]&&(A.usedDuplicates[Pe]=!0),_e==="[object Object]")H&&Object.keys(A.dump).length!==0?(O(A,F,A.dump,q),ct&&(A.dump="&ref_"+Pe+A.dump)):(Mt(A,F,A.dump),ct&&(A.dump="&ref_"+Pe+" "+A.dump));else if(_e==="[object Array]")H&&A.dump.length!==0?(A.noArrayIndent&&!he&&F>0?Di(A,F-1,A.dump,q):Di(A,F,A.dump,q),ct&&(A.dump="&ref_"+Pe+A.dump)):($n(A,F,A.dump),ct&&(A.dump="&ref_"+Pe+" "+A.dump));else if(_e==="[object String]")A.tag!=="?"&&En(A,A.dump,F,re,be);else{if(_e==="[object Undefined]")return!1;if(A.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+_e)}if(A.tag!==null&&A.tag!=="?"){let Me=encodeURI(A.tag[0]==="!"?A.tag.slice(1):A.tag).replace(/!/g,"%21");A.tag[0]==="!"?Me="!"+Me:Me.slice(0,18)==="tag:yaml.org,2002:"?Me="!!"+Me.slice(18):Me="!<"+Me+">",A.dump=Me+" "+A.dump}}return!0}function M(A,F){const K=[],H=[];D(A,K,H);const q=H.length;for(let re=0;re<q;re+=1)F.duplicates.push(K[H[re]]);F.usedDuplicates=new Array(q)}function D(A,F,K){if(A!==null&&typeof A=="object"){const H=F.indexOf(A);if(H!==-1)K.indexOf(H)===-1&&K.push(H);else if(F.push(A),Array.isArray(A))for(let q=0,re=A.length;q<re;q+=1)D(A[q],F,K);else{const q=Object.keys(A);for(let re=0,he=q.length;re<he;re+=1)D(A[q[re]],F,K)}}}function L(A,F){F=F||{};const K=new Re(F);K.noRefs||M(A,K);let H=A;return K.replacer&&(H=K.replacer.call({"":H},"",H)),ie(K,0,H,!0,!0)?K.dump+`
|
|
98
|
+
`:""}return dv.dump=L,dv}var l3;function nie(){if(l3)return ki;l3=1;const t=eie(),e=tie();function n(i,r){return function(){throw new Error("Function yaml."+i+" is removed in js-yaml 4. Use yaml."+r+" instead, which is now safe by default.")}}return ki.Type=Yi(),ki.Schema=nN(),ki.FAILSAFE_SCHEMA=oN(),ki.JSON_SCHEMA=hN(),ki.CORE_SCHEMA=fN(),ki.DEFAULT_SCHEMA=H2(),ki.load=t.load,ki.loadAll=t.loadAll,ki.dump=e.dump,ki.YAMLException=hm(),ki.types={binary:mN(),float:cN(),map:sN(),null:aN(),pairs:ON(),set:xN(),timestamp:dN(),bool:lN(),int:uN(),merge:pN(),omap:gN(),seq:rN(),str:iN()},ki.safeLoad=n("safeLoad","load"),ki.safeLoadAll=n("safeLoadAll","loadAll"),ki.safeDump=n("safeDump","dump"),ki}var iie=nie();const qS=Kne(iie),{Type:g1e,Schema:O1e,FAILSAFE_SCHEMA:x1e,JSON_SCHEMA:y1e,CORE_SCHEMA:v1e,DEFAULT_SCHEMA:b1e,load:S1e,loadAll:_1e,dump:C1e,YAMLException:w1e,types:k1e,safeLoad:E1e,safeLoadAll:T1e,safeDump:P1e}=qS,rie=({yaml:t,onChange:e})=>{const[n,i,r,s]=Ft(zn,Vs,fn,Kd),o=Ht(),a=Tt(Kd),l=Tt(q2),u=C.useMemo(()=>t?Object.entries(qS.load(t)).map(([y,S])=>({key:y,value:S})):[],[t]),{register:c,control:h,handleSubmit:f}=dx({defaultValues:{yamlConfig:u}}),{fields:p,append:m,remove:g}=Ote({control:h,name:"yamlConfig"}),x=C.useCallback(({yamlConfig:y})=>{if(y.length===0){l(),a(!1);return}const S=y.reduce((_,{key:k,value:w})=>(k&&w&&(_[k]=w),_),{});e(qS.dump(S).trim()),a(!1)},[e,a,l]);return C.createElement(C.Fragment,null,C.createElement(m2,{open:s,onOpenChange:y=>{a(y)}},C.createElement(g2,{container:i==null?void 0:i.current},C.createElement(O2,{className:te.dialogOverlay}),C.createElement(x2,{className:te.largeDialogContent,"data-editor-type":"frontmatter"},C.createElement(b7,{className:te.dialogTitle},o("frontmatterEditor.title","Edit document frontmatter")),C.createElement("form",{onSubmit:y=>{f(x)(y),y.stopPropagation()},onReset:y=>{y.stopPropagation(),a(!1)}},C.createElement("table",{className:te.propertyEditorTable},C.createElement("colgroup",null,C.createElement("col",null),C.createElement("col",null),C.createElement("col",null)),C.createElement("thead",null,C.createElement("tr",null,C.createElement("th",null,o("frontmatterEditor.key","Key")),C.createElement("th",null,o("frontmatterEditor.value","Value")),C.createElement("th",null))),C.createElement("tbody",null,p.map((y,S)=>C.createElement("tr",{key:y.id},C.createElement("td",null,C.createElement(u3,{...c(`yamlConfig.${S}.key`,{required:!0}),autofocusIfEmpty:!0,readOnly:n})),C.createElement("td",null,C.createElement(u3,{...c(`yamlConfig.${S}.value`,{required:!0}),readOnly:n})),C.createElement("td",null,C.createElement("button",{type:"button",onClick:()=>{g(S)},className:te.iconButton,disabled:n},r("delete_big")))))),C.createElement("tfoot",null,C.createElement("tr",null,C.createElement("td",null,C.createElement("button",{disabled:n,className:yt(te.primaryButton,te.smallButton),type:"button",onClick:()=>{m({key:"",value:""})}},o("frontmatterEditor.addEntry","Add entry")))))),C.createElement("div",{style:{display:"flex",justifyContent:"flex-end",gap:"var(--spacing-2)"}},C.createElement("button",{type:"submit",className:te.primaryButton},o("dialogControls.save","Save")),C.createElement("button",{type:"reset",className:te.secondaryButton},o("dialogControls.cancel","Cancel")))),C.createElement(y2,{asChild:!0},C.createElement("button",{className:te.dialogCloseButton,"aria-label":o("dialogControls.cancel","Cancel")},r("close")))))))},u3=C.forwardRef(({className:t,autofocusIfEmpty:e,...n},i)=>C.createElement("input",{className:yt(te.propertyEditorInput,t),...n,ref:i}));var sie=Object.defineProperty,oie=(t,e,n)=>e in t?sie(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,aie=(t,e,n)=>oie(t,e+"",n);class rf extends us{constructor(e,n){super(n),aie(this,"__yaml"),this.__yaml=e}static getType(){return"frontmatter"}static clone(e){return new rf(e.__yaml,e.__key)}static importJSON(e){const{yaml:n}=e;return fm(n)}exportJSON(){return{yaml:this.getYaml(),type:"frontmatter",version:1}}createDOM(e){return document.createElement("div")}updateDOM(){return!1}getYaml(){return this.getLatest().__yaml}setYaml(e){e!==this.__yaml&&(this.getWritable().__yaml=e)}decorate(e){return C.createElement(rie,{yaml:this.getYaml(),onChange:n=>{e.update(()=>{this.setYaml(n)})}})}isKeyboardSelectable(){return!1}}function fm(t){return new rf(t)}function Ya(t){return t instanceof rf}const lie={testLexicalNode:Ya,visitLexicalNode:({actions:t,lexicalNode:e})=>{t.addAndStepInto("yaml",{value:e.getYaml()})}},uie={testNode:"yaml",visitNode({mdastNode:t,actions:e}){e.addAndStepInto(fm(t.value))}},Kd=Ee(!1),U2=Ds(t=>{t.sub(t.pipe(U2,On(mr)),([,e])=>{e==null||e.update(()=>{const n=pt().getFirstChild();if(!Ya(n)){const i=fm('"": ""');n?n.insertBefore(i):pt().append(i)}}),t.pub(Kd,!0)})}),q2=Ds(t=>{t.sub(t.pipe(q2,On(mr)),([,e])=>{e==null||e.update(()=>{const n=pt().getFirstChild();Ya(n)&&n.remove()}),t.pub(Kd,!1)})}),Y2=Ee(!1,t=>{t.pub(qh,e=>e.registerUpdateListener(({editorState:n})=>{n.read(()=>{t.pub(Y2,Ya(pt().getFirstChild()))})}))}),cie=Vn({init:t=>{t.pubIn({[ol]:Wne("yaml"),[sl]:zne(),[Nr]:rf,[hr]:uie,[Lr]:lie,[Wu]:Yne("yaml"),[qh]:e=>e.registerCommand(Mh,n=>{let i=!1;return e.read(()=>{const r=me();if(ae(r))if(r.isCollapsed()&&r.anchor.offset===0&&r.focus.offset===0&&n.key==="Backspace"){let s=r.getNodes()[0];le(s)&&(s=s.getParent());const o=s==null?void 0:s.getPreviousSibling();Ya(o)&&(i=!0,n.preventDefault())}else{const s=r.getNodes()[0];if(Ya(s)){const o=s.getYaml();setTimeout(()=>{e.update(()=>{const a=pt().getFirstChild();Ya(a)||pt().splice(0,0,[fm(o)])},{discrete:!0})})}}}),!!i},cr)})}}),hie={testNode:"blockquote",visitNode({actions:t}){t.addAndStepInto(zu())}},fie={testLexicalNode:dS,visitLexicalNode:({actions:t})=>{t.addAndStepInto("blockquote")}},die=Vn({init(t){t.pubIn({[Uu]:"quote",[hr]:hie,[Nr]:N1,[Lr]:fie})}}),pie=Vn({init:(t,e=1/0)=>{t.pub(qh,n=>{let i=null;return n.registerNodeTransform(fa,r=>{const s=me();if(!ae(s)||!s.isCollapsed())return;const o=n.getEditorState(),a=o.read(()=>r.getTextContentSize()),l=r.getTextContentSize();if(a!==l){const u=l-e,c=s.anchor;u>0&&(a===e&&i!==o?(i=o,KX(n,o)):WX(n,c,u))}})})}});function mie(){return{enter:{mdxFlowExpression:Oie,mdxTextExpression:xie},exit:{mdxFlowExpression:c3,mdxFlowExpressionChunk:h3,mdxTextExpression:c3,mdxTextExpressionChunk:h3}}}function gie(){return{handlers:{mdxFlowExpression:f3,mdxTextExpression:f3},unsafe:[{character:"{",inConstruct:["phrasing"]},{atBreak:!0,character:"{"}]}}function Oie(t){this.enter({type:"mdxFlowExpression",value:""},t),this.buffer()}function xie(t){this.enter({type:"mdxTextExpression",value:""},t),this.buffer()}function c3(t){const e=this.resume(),n=t.estree,i=this.stack[this.stack.length-1];yr(i.type==="mdxFlowExpression"||i.type==="mdxTextExpression"),this.exit(t),i.value=e,n&&(i.data={estree:n})}function h3(t){this.config.enter.data.call(this,t),this.config.exit.data.call(this,t)}function f3(t,e,n){const i=t.value||"";return"{"+n.indentLines(i,function(s,o,a){return(o===0||a?"":" ")+s})+"}"}function yie(){return{enter:{mdxjsEsm:bie},exit:{mdxjsEsm:Sie,mdxjsEsmData:_ie}}}function vie(){return{handlers:{mdxjsEsm:Cie}}}function bie(t){this.enter({type:"mdxjsEsm",value:""},t),this.buffer()}function Sie(t){const e=this.resume(),n=this.stack[this.stack.length-1];yr(n.type==="mdxjsEsm"),this.exit(t);const i=t.estree;n.value=e,i&&(n.data={estree:i})}function _ie(t){this.config.enter.data.call(this,t),this.config.exit.data.call(this,t)}function Cie(t){return t.value||""}function wie(){return[mie(),YR(),yie()]}function kie(t){return{extensions:[gie(),GR(),vie()]}}var Eie=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],yN=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],Tie="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ--ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",vN="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ--ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",pv={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},mv="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",Pie={5:mv,"5module":mv+" export import",6:mv+" const class extends export import super"},bN=/^in(stanceof)?$/,Aie=new RegExp("["+vN+"]"),$ie=new RegExp("["+vN+Tie+"]");function YS(t,e){for(var n=65536,i=0;i<e.length;i+=2){if(n+=e[i],n>t)return!1;if(n+=e[i+1],n>=t)return!0}return!1}function xo(t,e){return t<65?t===36:t<91?!0:t<97?t===95:t<123?!0:t<=65535?t>=170&&Aie.test(String.fromCharCode(t)):e===!1?!1:YS(t,yN)}function ul(t,e){return t<48?t===36:t<58?!0:t<65?!1:t<91?!0:t<97?t===95:t<123?!0:t<=65535?t>=170&&$ie.test(String.fromCharCode(t)):e===!1?!1:YS(t,yN)||YS(t,Eie)}var Nt=function(e,n){n===void 0&&(n={}),this.label=e,this.keyword=n.keyword,this.beforeExpr=!!n.beforeExpr,this.startsExpr=!!n.startsExpr,this.isLoop=!!n.isLoop,this.isAssign=!!n.isAssign,this.prefix=!!n.prefix,this.postfix=!!n.postfix,this.binop=n.binop||null,this.updateContext=null};function Br(t,e){return new Nt(t,{beforeExpr:!0,binop:e})}var Fr={beforeExpr:!0},Gi={startsExpr:!0},G2={};function kt(t,e){return e===void 0&&(e={}),e.keyword=t,G2[t]=new Nt(t,e)}var N={num:new Nt("num",Gi),regexp:new Nt("regexp",Gi),string:new Nt("string",Gi),name:new Nt("name",Gi),privateId:new Nt("privateId",Gi),eof:new Nt("eof"),bracketL:new Nt("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new Nt("]"),braceL:new Nt("{",{beforeExpr:!0,startsExpr:!0}),braceR:new Nt("}"),parenL:new Nt("(",{beforeExpr:!0,startsExpr:!0}),parenR:new Nt(")"),comma:new Nt(",",Fr),semi:new Nt(";",Fr),colon:new Nt(":",Fr),dot:new Nt("."),question:new Nt("?",Fr),questionDot:new Nt("?."),arrow:new Nt("=>",Fr),template:new Nt("template"),invalidTemplate:new Nt("invalidTemplate"),ellipsis:new Nt("...",Fr),backQuote:new Nt("`",Gi),dollarBraceL:new Nt("${",{beforeExpr:!0,startsExpr:!0}),eq:new Nt("=",{beforeExpr:!0,isAssign:!0}),assign:new Nt("_=",{beforeExpr:!0,isAssign:!0}),incDec:new Nt("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new Nt("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:Br("||",1),logicalAND:Br("&&",2),bitwiseOR:Br("|",3),bitwiseXOR:Br("^",4),bitwiseAND:Br("&",5),equality:Br("==/!=/===/!==",6),relational:Br("</>/<=/>=",7),bitShift:Br("<</>>/>>>",8),plusMin:new Nt("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:Br("%",10),star:Br("*",10),slash:Br("/",10),starstar:new Nt("**",{beforeExpr:!0}),coalesce:Br("??",1),_break:kt("break"),_case:kt("case",Fr),_catch:kt("catch"),_continue:kt("continue"),_debugger:kt("debugger"),_default:kt("default",Fr),_do:kt("do",{isLoop:!0,beforeExpr:!0}),_else:kt("else",Fr),_finally:kt("finally"),_for:kt("for",{isLoop:!0}),_function:kt("function",Gi),_if:kt("if"),_return:kt("return",Fr),_switch:kt("switch"),_throw:kt("throw",Fr),_try:kt("try"),_var:kt("var"),_const:kt("const"),_while:kt("while",{isLoop:!0}),_with:kt("with"),_new:kt("new",{beforeExpr:!0,startsExpr:!0}),_this:kt("this",Gi),_super:kt("super",Gi),_class:kt("class",Gi),_extends:kt("extends",Fr),_export:kt("export"),_import:kt("import",Gi),_null:kt("null",Gi),_true:kt("true",Gi),_false:kt("false",Gi),_in:kt("in",{beforeExpr:!0,binop:7}),_instanceof:kt("instanceof",{beforeExpr:!0,binop:7}),_typeof:kt("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:kt("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:kt("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},fr=/\r\n?|\n|\u2028|\u2029/,Iie=new RegExp(fr.source,"g");function sf(t){return t===10||t===13||t===8232||t===8233}function SN(t,e,n){n===void 0&&(n=t.length);for(var i=e;i<n;i++){var r=t.charCodeAt(i);if(sf(r))return i<n-1&&r===13&&t.charCodeAt(i+1)===10?i+2:i+1}return-1}var _N=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,oi=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,CN=Object.prototype,Rie=CN.hasOwnProperty,Mie=CN.toString,of=Object.hasOwn||(function(t,e){return Rie.call(t,e)}),d3=Array.isArray||(function(t){return Mie.call(t)==="[object Array]"}),p3=Object.create(null);function Va(t){return p3[t]||(p3[t]=new RegExp("^(?:"+t.replace(/ /g,"|")+")$"))}function aa(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}var Nie=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Jd=function(e,n){this.line=e,this.column=n};Jd.prototype.offset=function(e){return new Jd(this.line,this.column+e)};var px=function(e,n,i){this.start=n,this.end=i,e.sourceFile!==null&&(this.source=e.sourceFile)};function wN(t,e){for(var n=1,i=0;;){var r=SN(t,i,e);if(r<0)return new Jd(n,e-i);++n,i=r}}var GS={ecmaVersion:null,sourceType:"script",strict:!1,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,startLocation:null,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},m3=!1;function Lie(t){var e={};for(var n in GS)e[n]=t&&of(t,n)?t[n]:GS[n];if(e.ecmaVersion==="latest"?e.ecmaVersion=1e8:e.ecmaVersion==null?(!m3&&typeof console=="object"&&console.warn&&(m3=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
99
|
+
Defaulting to 2020, but this will stop working in the future.`)),e.ecmaVersion=11):e.ecmaVersion>=2015&&(e.ecmaVersion-=2009),e.allowReserved==null&&(e.allowReserved=e.ecmaVersion<5),(!t||t.allowHashBang==null)&&(e.allowHashBang=e.ecmaVersion>=14),d3(e.onToken)){var i=e.onToken;e.onToken=function(r){return i.push(r)}}if(d3(e.onComment)&&(e.onComment=Die(e,e.onComment)),e.sourceType==="commonjs"&&e.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return e}function Die(t,e){return function(n,i,r,s,o,a){var l={type:n?"Block":"Line",value:i,start:r,end:s};t.locations&&(l.loc=new px(this,o,a)),t.ranges&&(l.range=[r,s]),e.push(l)}}var ku=1,Ku=2,K2=4,kN=8,J2=16,EN=32,mx=64,TN=128,Ju=256,dm=512,PN=1024,gx=ku|Ku|Ju;function ek(t,e){return Ku|(t?K2:0)|(e?kN:0)}var pO=0,tk=1,ya=2,AN=3,$N=4,IN=5,Kn=function(e,n,i){this.options=e=Lie(e),this.sourceFile=e.sourceFile,this.keywords=Va(Pie[e.ecmaVersion>=6?6:e.sourceType==="module"?"5module":5]);var r="";e.allowReserved!==!0&&(r=pv[e.ecmaVersion>=6?6:e.ecmaVersion===5?5:3],e.sourceType==="module"&&(r+=" await")),this.reservedWords=Va(r);var s=(r?r+" ":"")+pv.strict;this.reservedWordsStrict=Va(s),this.reservedWordsStrictBind=Va(s+" "+pv.strictBind),this.input=String(n),this.containsEsc=!1,this.pos=i||0,this.curLine=1,e.startLocation?(this.lineStart=this.pos-e.startLocation.column,this.curLine=e.startLocation.line):i?(this.lineStart=this.input.lastIndexOf(`
|
|
100
|
+
`,i-1)+1,this.options.locations&&(this.curLine=this.input.slice(0,this.lineStart).split(fr).length)):this.lineStart=0,this.type=N.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=e.sourceType==="module",this.strict=this.inModule||e.strict===!0||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&e.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?Ku:ku),this.regexpState=null,this.privateNameStack=[]},hs={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};Kn.prototype.parse=function(){var e=this,n=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return e.parseTopLevel(n)})};hs.inFunction.get=function(){return(this.currentVarScope().flags&Ku)>0};hs.inGenerator.get=function(){return(this.currentVarScope().flags&kN)>0};hs.inAsync.get=function(){return(this.currentVarScope().flags&K2)>0};hs.canAwait.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t],n=e.flags;if(n&(Ju|dm))return!1;if(n&Ku)return(n&K2)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};hs.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&ku)};hs.allowSuper.get=function(){var t=this.currentThisScope(),e=t.flags;return(e&mx)>0||this.options.allowSuperOutsideMethod};hs.allowDirectSuper.get=function(){return(this.currentThisScope().flags&TN)>0};hs.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};hs.allowNewDotTarget.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t],n=e.flags;if(n&(Ju|dm)||n&Ku&&!(n&J2))return!0}return!1};hs.allowUsing.get=function(){var t=this.currentScope(),e=t.flags;return!(e&PN||!this.inModule&&e&ku)};hs.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Ju)>0};Kn.extend=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];for(var i=this,r=0;r<e.length;r++)i=e[r](i);return i};Kn.parse=function(e,n){return new this(n,e).parse()};Kn.parseExpressionAt=function(e,n,i){var r=new this(i,e,n);return r.nextToken(),r.parseExpression()};Kn.tokenizer=function(e,n){return new this(n,e)};Object.defineProperties(Kn.prototype,hs);var Ni=Kn.prototype,Qie=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;Ni.strictDirective=function(t){if(this.options.ecmaVersion<5)return!1;for(;;){oi.lastIndex=t,t+=oi.exec(this.input)[0].length;var e=Qie.exec(this.input.slice(t));if(!e)return!1;if((e[1]||e[2])==="use strict"){oi.lastIndex=t+e[0].length;var n=oi.exec(this.input),i=n.index+n[0].length,r=this.input.charAt(i);return r===";"||r==="}"||fr.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(r)||r==="!"&&this.input.charAt(i+1)==="=")}t+=e[0].length,oi.lastIndex=t,t+=oi.exec(this.input)[0].length,this.input[t]===";"&&t++}};Ni.eat=function(t){return this.type===t?(this.next(),!0):!1};Ni.isContextual=function(t){return this.type===N.name&&this.value===t&&!this.containsEsc};Ni.eatContextual=function(t){return this.isContextual(t)?(this.next(),!0):!1};Ni.catchStackOverflow=function(t){try{return t()}catch(e){if(e instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(e.message)||/\btoo much recursion\b/i.test(e.message)))this.raise(this.start,"Not enough stack space to parse input");else throw e}};Ni.expectContextual=function(t){this.eatContextual(t)||this.unexpected()};Ni.canInsertSemicolon=function(){return this.type===N.eof||this.type===N.braceR||fr.test(this.input.slice(this.lastTokEnd,this.start))};Ni.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};Ni.semicolon=function(){!this.eat(N.semi)&&!this.insertSemicolon()&&this.unexpected()};Ni.afterTrailingComma=function(t,e){if(this.type===t)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),e||this.next(),!0};Ni.expect=function(t){this.eat(t)||this.unexpected()};Ni.unexpected=function(t){this.raise(t??this.start,"Unexpected token")};var Ox=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Ni.checkPatternErrors=function(t,e){if(t){t.trailingComma>-1&&this.raiseRecoverable(t.trailingComma,"Comma is not permitted after the rest element");var n=e?t.parenthesizedAssign:t.parenthesizedBind;n>-1&&this.raiseRecoverable(n,e?"Assigning to rvalue":"Parenthesized pattern")}};Ni.checkExpressionErrors=function(t,e){if(!t)return!1;var n=t.shorthandAssign,i=t.doubleProto;if(!e)return n>=0||i>=0;n>=0&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns"),i>=0&&this.raiseRecoverable(i,"Redefinition of __proto__ property")};Ni.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")};Ni.isSimpleAssignTarget=function(t){return t.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(t.expression):t.type==="Identifier"||t.type==="MemberExpression"};var He=Kn.prototype;He.parseTopLevel=function(t){var e=Object.create(null);for(t.body||(t.body=[]);this.type!==N.eof;){var n=this.parseStatement(null,!0,e);t.body.push(n)}if(this.inModule)for(var i=0,r=Object.keys(this.undefinedExports);i<r.length;i+=1){var s=r[i];this.raiseRecoverable(this.undefinedExports[s].start,"Export '"+s+"' is not defined")}return this.adaptDirectivePrologue(t.body),this.next(),t.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(t,"Program")};var nk={kind:"loop"},Vie={kind:"switch"};He.isLet=function(t){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;oi.lastIndex=this.pos;var e=oi.exec(this.input),n=this.pos+e[0].length,i=this.fullCharCodeAt(n);if(i===91||i===92)return!0;if(t)return!1;if(i===123)return!0;if(xo(i)){var r=n;do n+=i<=65535?1:2;while(ul(i=this.fullCharCodeAt(n)));if(i===92)return!0;var s=this.input.slice(r,n);if(!bN.test(s))return!0}return!1};He.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;oi.lastIndex=this.pos;var t=oi.exec(this.input),e=this.pos+t[0].length,n;return!fr.test(this.input.slice(this.pos,e))&&this.input.slice(e,e+8)==="function"&&(e+8===this.input.length||!(ul(n=this.fullCharCodeAt(e+8))||n===92))};He.isUsingKeyword=function(t,e){if(this.options.ecmaVersion<17||!this.isContextual(t?"await":"using"))return!1;oi.lastIndex=this.pos;var n=oi.exec(this.input),i=this.pos+n[0].length;if(fr.test(this.input.slice(this.pos,i)))return!1;if(t){var r=i+5,s;if(this.input.slice(i,r)!=="using"||r===this.input.length||ul(s=this.fullCharCodeAt(r))||s===92)return!1;oi.lastIndex=r;var o=oi.exec(this.input);if(i=r+o[0].length,o&&fr.test(this.input.slice(r,i)))return!1}var a=this.fullCharCodeAt(i);if(!xo(a)&&a!==92)return!1;var l=i;do i+=a<=65535?1:2;while(ul(a=this.fullCharCodeAt(i)));if(a===92)return!0;var u=this.input.slice(l,i);if(bN.test(u))return!1;if(e&&!t&&u==="of"){oi.lastIndex=i;var c=oi.exec(this.input);if(i=i+c[0].length,this.input.charCodeAt(i)!==61||(a=this.input.charCodeAt(i+1))===61||a===62)return!1}return!0};He.isAwaitUsing=function(t){return this.isUsingKeyword(!0,t)};He.isUsing=function(t){return this.isUsingKeyword(!1,t)};He.parseStatement=function(t,e,n){var i=this.type,r=this.startNode(),s;switch(this.isLet(t)&&(i=N._var,s="let"),i){case N._break:case N._continue:return this.parseBreakContinueStatement(r,i.keyword);case N._debugger:return this.parseDebuggerStatement(r);case N._do:return this.parseDoStatement(r);case N._for:return this.parseForStatement(r);case N._function:return t&&(this.strict||t!=="if"&&t!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(r,!1,!t);case N._class:return t&&this.unexpected(),this.parseClass(r,!0);case N._if:return this.parseIfStatement(r);case N._return:return this.parseReturnStatement(r);case N._switch:return this.parseSwitchStatement(r);case N._throw:return this.parseThrowStatement(r);case N._try:return this.parseTryStatement(r);case N._const:case N._var:return s=s||this.value,t&&s!=="var"&&this.unexpected(),this.parseVarStatement(r,s);case N._while:return this.parseWhileStatement(r);case N._with:return this.parseWithStatement(r);case N.braceL:return this.parseBlock(!0,r);case N.semi:return this.parseEmptyStatement(r);case N._export:case N._import:if(this.options.ecmaVersion>10&&i===N._import){oi.lastIndex=this.pos;var o=oi.exec(this.input),a=this.pos+o[0].length,l=this.input.charCodeAt(a);if(l===40||l===46)return this.parseExpressionStatement(r,this.parseExpression())}return this.options.allowImportExportEverywhere||(e||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),i===N._import?this.parseImport(r):this.parseExport(r,n);default:if(this.isAsyncFunction())return t&&this.unexpected(),this.next(),this.parseFunctionStatement(r,!0,!t);var u=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(u)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),t&&this.raise(this.start,"Using declaration is not allowed in single-statement positions"),u==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(r,!1,u),this.semicolon(),this.finishNode(r,"VariableDeclaration");var c=this.value,h=this.parseExpression();return i===N.name&&h.type==="Identifier"&&this.eat(N.colon)?this.parseLabeledStatement(r,c,h,t):this.parseExpressionStatement(r,h)}};He.parseBreakContinueStatement=function(t,e){var n=e==="break";this.next(),this.eat(N.semi)||this.insertSemicolon()?t.label=null:this.type!==N.name?this.unexpected():(t.label=this.parseIdent(),this.semicolon());for(var i=0;i<this.labels.length;++i){var r=this.labels[i];if((t.label==null||r.name===t.label.name)&&(r.kind!=null&&(n||r.kind==="loop")||t.label&&n))break}return i===this.labels.length&&this.raise(t.start,"Unsyntactic "+e),this.finishNode(t,n?"BreakStatement":"ContinueStatement")};He.parseDebuggerStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")};He.parseDoStatement=function(t){return this.next(),this.labels.push(nk),t.body=this.parseStatement("do"),this.labels.pop(),this.expect(N._while),t.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(N.semi):this.semicolon(),this.finishNode(t,"DoWhileStatement")};He.parseForStatement=function(t){this.next();var e=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(nk),this.enterScope(0),this.expect(N.parenL),this.type===N.semi)return e>-1&&this.unexpected(e),this.parseFor(t,null);var n=this.isLet();if(this.type===N._var||this.type===N._const||n){var i=this.startNode(),r=n?"let":this.value;return this.next(),this.parseVar(i,!0,r),this.finishNode(i,"VariableDeclaration"),this.parseForAfterInit(t,i,e)}var s=this.isContextual("let"),o=!1,a=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(a){var l=this.startNode();return this.next(),a==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(l,!0,a),this.finishNode(l,"VariableDeclaration"),this.parseForAfterInit(t,l,e)}var u=this.containsEsc,c=new Ox,h=this.start,f=e>-1?this.parseExprSubscripts(c,"await"):this.parseExpression(!0,c);return this.type===N._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(e>-1?(this.type===N._in&&this.unexpected(e),t.await=!0):o&&this.options.ecmaVersion>=8&&(f.start===h&&!u&&f.type==="Identifier"&&f.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(t.await=!1)),s&&o&&this.raise(f.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(f,!1,c),this.checkLValPattern(f),this.parseForIn(t,f)):(this.checkExpressionErrors(c,!0),e>-1&&this.unexpected(e),this.parseFor(t,f))};He.parseForAfterInit=function(t,e,n){return(this.type===N._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&e.declarations.length===1?(this.type===N._in?((e.kind==="using"||e.kind==="await using")&&!e.declarations[0].init&&this.raise(this.start,"Using declaration is not allowed in for-in loops"),this.options.ecmaVersion>=9&&n>-1&&this.unexpected(n)):this.options.ecmaVersion>=9&&(t.await=n>-1),this.parseForIn(t,e)):(n>-1&&this.unexpected(n),this.parseFor(t,e))};He.parseFunctionStatement=function(t,e,n){return this.next(),this.parseFunction(t,hd|(n?0:KS),!1,e)};He.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(N._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")};He.parseReturnStatement=function(t){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(N.semi)||this.insertSemicolon()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")};He.parseSwitchStatement=function(t){this.next(),t.discriminant=this.parseParenExpression(),t.cases=[],this.expect(N.braceL),this.labels.push(Vie),this.enterScope(PN);for(var e,n=!1;this.type!==N.braceR;)if(this.type===N._case||this.type===N._default){var i=this.type===N._case;e&&this.finishNode(e,"SwitchCase"),t.cases.push(e=this.startNode()),e.consequent=[],this.next(),i?e.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,e.test=null),this.expect(N.colon)}else e||this.unexpected(),e.consequent.push(this.parseStatement(null));return this.exitScope(),e&&this.finishNode(e,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(t,"SwitchStatement")};He.parseThrowStatement=function(t){return this.next(),fr.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")};var Bie=[];He.parseCatchClauseParam=function(){var t=this.parseBindingAtom(),e=t.type==="Identifier";return this.enterScope(e?EN:0),this.checkLValPattern(t,e?$N:ya),this.expect(N.parenR),t};He.parseTryStatement=function(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.type===N._catch){var e=this.startNode();this.next(),this.eat(N.parenL)?e.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),e.param=null,this.enterScope(0)),e.body=this.parseBlock(!1),this.exitScope(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(N._finally)?this.parseBlock():null,!t.handler&&!t.finalizer&&this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")};He.parseVarStatement=function(t,e,n){return this.next(),this.parseVar(t,!1,e,n),this.semicolon(),this.finishNode(t,"VariableDeclaration")};He.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.labels.push(nk),t.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(t,"WhileStatement")};He.parseWithStatement=function(t){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),t.object=this.parseParenExpression(),t.body=this.parseStatement("with"),this.finishNode(t,"WithStatement")};He.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")};He.parseLabeledStatement=function(t,e,n,i){for(var r=0,s=this.labels;r<s.length;r+=1){var o=s[r];o.name===e&&this.raise(n.start,"Label '"+e+"' is already declared")}for(var a=this.type.isLoop?"loop":this.type===N._switch?"switch":null,l=this.labels.length-1;l>=0;l--){var u=this.labels[l];if(u.statementStart===t.start)u.statementStart=this.start,u.kind=a;else break}return this.labels.push({name:e,kind:a,statementStart:this.start}),t.body=this.parseStatement(i?i.indexOf("label")===-1?i+"label":i:"label"),this.labels.pop(),t.label=n,this.finishNode(t,"LabeledStatement")};He.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")};He.parseBlock=function(t,e,n){for(t===void 0&&(t=!0),e===void 0&&(e=this.startNode()),e.body=[],this.expect(N.braceL),t&&this.enterScope(0);this.type!==N.braceR;){var i=this.parseStatement(null);e.body.push(i)}return n&&(this.strict=!1),this.next(),t&&this.exitScope(),this.finishNode(e,"BlockStatement")};He.parseFor=function(t,e){return t.init=e,this.expect(N.semi),t.test=this.type===N.semi?null:this.parseExpression(),this.expect(N.semi),t.update=this.type===N.parenR?null:this.parseExpression(),this.expect(N.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,"ForStatement")};He.parseForIn=function(t,e){var n=this.type===N._in;return this.next(),e.type==="VariableDeclaration"&&e.declarations[0].init!=null&&(!n||this.options.ecmaVersion<8||this.strict||e.kind!=="var"||e.declarations[0].id.type!=="Identifier")&&this.raise(e.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer"),t.left=e,t.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(N.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,n?"ForInStatement":"ForOfStatement")};He.parseVar=function(t,e,n,i){for(t.declarations=[],t.kind=n;;){var r=this.startNode();if(this.parseVarId(r,n),this.eat(N.eq)?r.init=this.parseMaybeAssign(e):!i&&n==="const"&&!(this.type===N._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!i&&(n==="using"||n==="await using")&&this.options.ecmaVersion>=17&&this.type!==N._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+n+" declaration"):!i&&r.id.type!=="Identifier"&&!(e&&(this.type===N._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):r.init=null,t.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(N.comma))break}return t};He.parseVarId=function(t,e){t.id=e==="using"||e==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(t.id,e==="var"?tk:ya,!1)};var hd=1,KS=2,RN=4;He.parseFunction=function(t,e,n,i,r){this.initFunction(t),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!i)&&(this.type===N.star&&e&KS&&this.unexpected(),t.generator=this.eat(N.star)),this.options.ecmaVersion>=8&&(t.async=!!i),e&hd&&(t.id=e&RN&&this.type!==N.name?null:this.parseIdent(),t.id&&!(e&KS)&&this.checkLValSimple(t.id,this.strict||t.generator||t.async?this.treatFunctionsAsVar?tk:ya:AN));var s=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ek(t.async,t.generator)),e&hd||(t.id=this.type===N.name?this.parseIdent():null),this.parseFunctionParams(t),this.parseFunctionBody(t,n,!1,r),this.yieldPos=s,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(t,e&hd?"FunctionDeclaration":"FunctionExpression")};He.parseFunctionParams=function(t){this.expect(N.parenL),t.params=this.parseBindingList(N.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};He.parseClass=function(t,e){this.next();var n=this.strict;this.strict=!0,this.parseClassId(t,e),this.parseClassSuper(t);var i=this.enterClassBody(),r=this.startNode(),s=!1;for(r.body=[],this.expect(N.braceL);this.type!==N.braceR;){var o=this.parseClassElement(t.superClass!==null);o&&(r.body.push(o),o.type==="MethodDefinition"&&o.kind==="constructor"?(s&&this.raiseRecoverable(o.start,"Duplicate constructor in the same class"),s=!0):o.key&&o.key.type==="PrivateIdentifier"&&Fie(i,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=n,this.next(),t.body=this.finishNode(r,"ClassBody"),this.exitClassBody(),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")};He.parseClassElement=function(t){if(this.eat(N.semi))return null;var e=this.options.ecmaVersion,n=this.startNode(),i="",r=!1,s=!1,o="method",a=!1;if(this.eatContextual("static")){if(e>=13&&this.eat(N.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===N.star?a=!0:i="static"}if(n.static=a,!i&&e>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===N.star)&&!this.canInsertSemicolon()?s=!0:i="async"),!i&&(e>=9||!s)&&this.eat(N.star)&&(r=!0),!i&&!s&&!r){var l=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=l:i=l)}if(i?(n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=i,this.finishNode(n.key,"Identifier")):this.parseClassElementName(n),e<13||this.type===N.parenL||o!=="method"||r||s){var u=!n.static&&mO(n,"constructor"),c=u&&t;u&&o!=="method"&&this.raise(n.key.start,"Constructor can't have get/set modifier"),n.kind=u?"constructor":o,this.parseClassMethod(n,r,s,c)}else this.parseClassField(n);return n};He.isClassElementNameStart=function(){return this.type===N.name||this.type===N.privateId||this.type===N.num||this.type===N.string||this.type===N.bracketL||this.type.keyword};He.parseClassElementName=function(t){this.type===N.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),t.computed=!1,t.key=this.parsePrivateIdent()):this.parsePropertyName(t)};He.parseClassMethod=function(t,e,n,i){var r=t.key;t.kind==="constructor"?(e&&this.raise(r.start,"Constructor can't be a generator"),n&&this.raise(r.start,"Constructor can't be an async method")):t.static&&mO(t,"prototype")&&this.raise(r.start,"Classes may not have a static property named prototype");var s=t.value=this.parseMethod(e,n,i);return t.kind==="get"&&s.params.length!==0&&this.raiseRecoverable(s.start,"getter should have no params"),t.kind==="set"&&s.params.length!==1&&this.raiseRecoverable(s.start,"setter should have exactly one param"),t.kind==="set"&&s.params[0].type==="RestElement"&&this.raiseRecoverable(s.params[0].start,"Setter cannot use rest params"),this.finishNode(t,"MethodDefinition")};He.parseClassField=function(t){return mO(t,"constructor")?this.raise(t.key.start,"Classes can't have a field named 'constructor'"):t.static&&mO(t,"prototype")&&this.raise(t.key.start,"Classes can't have a static field named 'prototype'"),this.eat(N.eq)?(this.enterScope(dm|mx),t.value=this.parseMaybeAssign(),this.exitScope()):t.value=null,this.semicolon(),this.finishNode(t,"PropertyDefinition")};He.parseClassStaticBlock=function(t){t.body=[];var e=this.labels;for(this.labels=[],this.enterScope(Ju|mx);this.type!==N.braceR;){var n=this.parseStatement(null);t.body.push(n)}return this.next(),this.exitScope(),this.labels=e,this.finishNode(t,"StaticBlock")};He.parseClassId=function(t,e){this.type===N.name?(t.id=this.parseIdent(),e&&this.checkLValSimple(t.id,ya,!1)):(e===!0&&this.unexpected(),t.id=null)};He.parseClassSuper=function(t){t.superClass=this.eat(N._extends)?this.parseExprSubscripts(null,!1):null};He.enterClassBody=function(){var t={declared:Object.create(null),used:[]};return this.privateNameStack.push(t),t.declared};He.exitClassBody=function(){var t=this.privateNameStack.pop(),e=t.declared,n=t.used;if(this.options.checkPrivateFields)for(var i=this.privateNameStack.length,r=i===0?null:this.privateNameStack[i-1],s=0;s<n.length;++s){var o=n[s];of(e,o.name)||(r?r.used.push(o):this.raiseRecoverable(o.start,"Private field '#"+o.name+"' must be declared in an enclosing class"))}};function Fie(t,e){var n=e.key.name,i=t[n],r="true";return e.type==="MethodDefinition"&&(e.kind==="get"||e.kind==="set")&&(r=(e.static?"s":"i")+e.kind),i==="iget"&&r==="iset"||i==="iset"&&r==="iget"||i==="sget"&&r==="sset"||i==="sset"&&r==="sget"?(t[n]="true",!1):i?!0:(t[n]=r,!1)}function mO(t,e){var n=t.computed,i=t.key;return!n&&(i.type==="Identifier"&&i.name===e||i.type==="Literal"&&i.value===e)}He.parseExportAllDeclaration=function(t,e){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(t.exported=this.parseModuleExportName(),this.checkExport(e,t.exported,this.lastTokStart)):t.exported=null),this.expectContextual("from"),this.type!==N.string&&this.unexpected(),t.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ExportAllDeclaration")};He.parseExport=function(t,e){if(this.next(),this.eat(N.star))return this.parseExportAllDeclaration(t,e);if(this.eat(N._default))return this.checkExport(e,"default",this.lastTokStart),t.declaration=this.parseExportDefaultDeclaration(),this.finishNode(t,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())t.declaration=this.parseExportDeclaration(t),t.declaration.type==="VariableDeclaration"?this.checkVariableExport(e,t.declaration.declarations):this.checkExport(e,t.declaration.id,t.declaration.id.start),t.specifiers=[],t.source=null,this.options.ecmaVersion>=16&&(t.attributes=[]);else{if(t.declaration=null,t.specifiers=this.parseExportSpecifiers(e),this.eatContextual("from"))this.type!==N.string&&this.unexpected(),t.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause());else{for(var n=0,i=t.specifiers;n<i.length;n+=1){var r=i[n];this.checkUnreserved(r.local),this.checkLocalExport(r.local),r.local.type==="Literal"&&this.raise(r.local.start,"A string literal cannot be used as an exported binding without `from`.")}t.source=null,this.options.ecmaVersion>=16&&(t.attributes=[])}this.semicolon()}return this.finishNode(t,"ExportNamedDeclaration")};He.parseExportDeclaration=function(t){return this.parseStatement(null)};He.parseExportDefaultDeclaration=function(){var t;if(this.type===N._function||(t=this.isAsyncFunction())){var e=this.startNode();return this.next(),t&&this.next(),this.parseFunction(e,hd|RN,!1,t)}else if(this.type===N._class){var n=this.startNode();return this.parseClass(n,"nullableID")}else{var i=this.parseMaybeAssign();return this.semicolon(),i}};He.checkExport=function(t,e,n){t&&(typeof e!="string"&&(e=e.type==="Identifier"?e.name:e.value),of(t,e)&&this.raiseRecoverable(n,"Duplicate export '"+e+"'"),t[e]=!0)};He.checkPatternExport=function(t,e){var n=e.type;if(n==="Identifier")this.checkExport(t,e,e.start);else if(n==="ObjectPattern")for(var i=0,r=e.properties;i<r.length;i+=1){var s=r[i];this.checkPatternExport(t,s)}else if(n==="ArrayPattern")for(var o=0,a=e.elements;o<a.length;o+=1){var l=a[o];l&&this.checkPatternExport(t,l)}else n==="Property"?this.checkPatternExport(t,e.value):n==="AssignmentPattern"?this.checkPatternExport(t,e.left):n==="RestElement"&&this.checkPatternExport(t,e.argument)};He.checkVariableExport=function(t,e){if(t)for(var n=0,i=e;n<i.length;n+=1){var r=i[n];this.checkPatternExport(t,r.id)}};He.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};He.parseExportSpecifier=function(t){var e=this.startNode();return e.local=this.parseModuleExportName(),e.exported=this.eatContextual("as")?this.parseModuleExportName():e.local,this.checkExport(t,e.exported,e.exported.start),this.finishNode(e,"ExportSpecifier")};He.parseExportSpecifiers=function(t){var e=[],n=!0;for(this.expect(N.braceL);!this.eat(N.braceR);){if(n)n=!1;else if(this.expect(N.comma),this.afterTrailingComma(N.braceR))break;e.push(this.parseExportSpecifier(t))}return e};He.parseImport=function(t){return this.next(),this.type===N.string?(t.specifiers=Bie,t.source=this.parseExprAtom()):(t.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),t.source=this.type===N.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ImportDeclaration")};He.parseImportSpecifier=function(){var t=this.startNode();return t.imported=this.parseModuleExportName(),this.eatContextual("as")?t.local=this.parseIdent():(this.checkUnreserved(t.imported),t.local=t.imported),this.checkLValSimple(t.local,ya),this.finishNode(t,"ImportSpecifier")};He.parseImportDefaultSpecifier=function(){var t=this.startNode();return t.local=this.parseIdent(),this.checkLValSimple(t.local,ya),this.finishNode(t,"ImportDefaultSpecifier")};He.parseImportNamespaceSpecifier=function(){var t=this.startNode();return this.next(),this.expectContextual("as"),t.local=this.parseIdent(),this.checkLValSimple(t.local,ya),this.finishNode(t,"ImportNamespaceSpecifier")};He.parseImportSpecifiers=function(){var t=[],e=!0;if(this.type===N.name&&(t.push(this.parseImportDefaultSpecifier()),!this.eat(N.comma)))return t;if(this.type===N.star)return t.push(this.parseImportNamespaceSpecifier()),t;for(this.expect(N.braceL);!this.eat(N.braceR);){if(e)e=!1;else if(this.expect(N.comma),this.afterTrailingComma(N.braceR))break;t.push(this.parseImportSpecifier())}return t};He.parseWithClause=function(){var t=[];if(!this.eat(N._with))return t;this.expect(N.braceL);for(var e={},n=!0;!this.eat(N.braceR);){if(n)n=!1;else if(this.expect(N.comma),this.afterTrailingComma(N.braceR))break;var i=this.parseImportAttribute(),r=i.key.type==="Identifier"?i.key.name:i.key.value;of(e,r)&&this.raiseRecoverable(i.key.start,"Duplicate attribute key '"+r+"'"),e[r]=!0,t.push(i)}return t};He.parseImportAttribute=function(){var t=this.startNode();return t.key=this.type===N.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(N.colon),this.type!==N.string&&this.unexpected(),t.value=this.parseExprAtom(),this.finishNode(t,"ImportAttribute")};He.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===N.string){var t=this.parseLiteral(this.value);return Nie.test(t.value)&&this.raise(t.start,"An export name cannot include a lone surrogate."),t}return this.parseIdent(!0)};He.adaptDirectivePrologue=function(t){for(var e=0;e<t.length&&this.isDirectiveCandidate(t[e]);++e)t[e].directive=t[e].expression.raw.slice(1,-1)};He.isDirectiveCandidate=function(t){return this.options.ecmaVersion>=5&&t.type==="ExpressionStatement"&&t.expression.type==="Literal"&&typeof t.expression.value=="string"&&(this.input[t.start]==='"'||this.input[t.start]==="'")};var fs=Kn.prototype;fs.toAssignable=function(t,e,n){if(this.options.ecmaVersion>=6&&t)switch(t.type){case"Identifier":this.inAsync&&t.name==="await"&&this.raise(t.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern",n&&this.checkPatternErrors(n,!0);for(var i=0,r=t.properties;i<r.length;i+=1){var s=r[i];this.toAssignable(s,e),s.type==="RestElement"&&(s.argument.type==="ArrayPattern"||s.argument.type==="ObjectPattern")&&this.raise(s.argument.start,"Unexpected token")}break;case"Property":t.kind!=="init"&&this.raise(t.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(t.value,e);break;case"ArrayExpression":t.type="ArrayPattern",n&&this.checkPatternErrors(n,!0),this.toAssignableList(t.elements,e);break;case"SpreadElement":t.type="RestElement",this.toAssignable(t.argument,e),t.argument.type==="AssignmentPattern"&&this.raise(t.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":t.operator!=="="&&this.raise(t.left.end,"Only '=' operator can be used for specifying default value."),t.type="AssignmentPattern",delete t.operator,this.toAssignable(t.left,e);break;case"ParenthesizedExpression":this.toAssignable(t.expression,e,n);break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!e)break;default:this.raise(t.start,"Assigning to rvalue")}else n&&this.checkPatternErrors(n,!0);return t};fs.toAssignableList=function(t,e){for(var n=t.length,i=0;i<n;i++){var r=t[i];r&&this.toAssignable(r,e)}if(n){var s=t[n-1];this.options.ecmaVersion===6&&e&&s&&s.type==="RestElement"&&s.argument.type!=="Identifier"&&this.unexpected(s.argument.start)}return t};fs.parseSpread=function(t){var e=this.startNode();return this.next(),e.argument=this.parseMaybeAssign(!1,t),this.finishNode(e,"SpreadElement")};fs.parseRestBinding=function(){var t=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==N.name&&this.unexpected(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")};fs.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case N.bracketL:var t=this.startNode();return this.next(),t.elements=this.parseBindingList(N.bracketR,!0,!0),this.finishNode(t,"ArrayPattern");case N.braceL:return this.parseObj(!0)}return this.parseIdent()};fs.parseBindingList=function(t,e,n,i){for(var r=[],s=!0;!this.eat(t);)if(s?s=!1:this.expect(N.comma),e&&this.type===N.comma)r.push(null);else{if(n&&this.afterTrailingComma(t))break;if(this.type===N.ellipsis){var o=this.parseRestBinding();this.parseBindingListItem(o),r.push(o),this.type===N.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(t);break}else r.push(this.parseAssignableListItem(i))}return r};fs.parseAssignableListItem=function(t){var e=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(e),e};fs.parseBindingListItem=function(t){return t};fs.parseMaybeDefault=function(t,e,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(N.eq))return n;var i=this.startNodeAt(t,e);return i.left=n,i.right=this.parseMaybeAssign(),this.finishNode(i,"AssignmentPattern")};fs.checkLValSimple=function(t,e,n){e===void 0&&(e=pO);var i=e!==pO;switch(t.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(t.name)&&this.raiseRecoverable(t.start,(i?"Binding ":"Assigning to ")+t.name+" in strict mode"),i&&(e===ya&&t.name==="let"&&this.raiseRecoverable(t.start,"let is disallowed as a lexically bound name"),n&&(of(n,t.name)&&this.raiseRecoverable(t.start,"Argument name clash"),n[t.name]=!0),e!==IN&&this.declareName(t.name,e,t.start));break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":i&&this.raiseRecoverable(t.start,"Binding member expression");break;case"ParenthesizedExpression":return i&&this.raiseRecoverable(t.start,"Binding parenthesized expression"),this.checkLValSimple(t.expression,e,n);default:this.raise(t.start,(i?"Binding":"Assigning to")+" rvalue")}};fs.checkLValPattern=function(t,e,n){switch(e===void 0&&(e=pO),t.type){case"ObjectPattern":for(var i=0,r=t.properties;i<r.length;i+=1){var s=r[i];this.checkLValInnerPattern(s,e,n)}break;case"ArrayPattern":for(var o=0,a=t.elements;o<a.length;o+=1){var l=a[o];l&&this.checkLValInnerPattern(l,e,n)}break;default:this.checkLValSimple(t,e,n)}};fs.checkLValInnerPattern=function(t,e,n){switch(e===void 0&&(e=pO),t.type){case"Property":this.checkLValInnerPattern(t.value,e,n);break;case"AssignmentPattern":this.checkLValPattern(t.left,e,n);break;case"RestElement":this.checkLValPattern(t.argument,e,n);break;default:this.checkLValPattern(t,e,n)}};var ys=function(e,n,i,r,s){this.token=e,this.isExpr=!!n,this.preserveSpace=!!i,this.override=r,this.generator=!!s},_n={b_stat:new ys("{",!1),b_expr:new ys("{",!0),b_tmpl:new ys("${",!1),p_stat:new ys("(",!1),p_expr:new ys("(",!0),q_tmpl:new ys("`",!0,!0,function(t){return t.tryReadTemplateToken()}),f_stat:new ys("function",!1),f_expr:new ys("function",!0),f_expr_gen:new ys("function",!0,!1,null,!0),f_gen:new ys("function",!1,!1,null,!0)},af=Kn.prototype;af.initialContext=function(){return[_n.b_stat]};af.curContext=function(){return this.context[this.context.length-1]};af.braceIsBlock=function(t){var e=this.curContext();return e===_n.f_expr||e===_n.f_stat?!0:t===N.colon&&(e===_n.b_stat||e===_n.b_expr)?!e.isExpr:t===N._return||t===N.name&&this.exprAllowed?fr.test(this.input.slice(this.lastTokEnd,this.start)):t===N._else||t===N.semi||t===N.eof||t===N.parenR||t===N.arrow?!0:t===N.braceL?e===_n.b_stat:t===N._var||t===N._const||t===N.name?!1:!this.exprAllowed};af.inGeneratorContext=function(){for(var t=this.context.length-1;t>=1;t--){var e=this.context[t];if(e.token==="function")return e.generator}return!1};af.updateContext=function(t){var e,n=this.type;n.keyword&&t===N.dot?this.exprAllowed=!1:(e=n.updateContext)?e.call(this,t):this.exprAllowed=n.beforeExpr};af.overrideContext=function(t){this.curContext()!==t&&(this.context[this.context.length-1]=t)};N.parenR.updateContext=N.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var t=this.context.pop();t===_n.b_stat&&this.curContext().token==="function"&&(t=this.context.pop()),this.exprAllowed=!t.isExpr};N.braceL.updateContext=function(t){this.context.push(this.braceIsBlock(t)?_n.b_stat:_n.b_expr),this.exprAllowed=!0};N.dollarBraceL.updateContext=function(){this.context.push(_n.b_tmpl),this.exprAllowed=!0};N.parenL.updateContext=function(t){var e=t===N._if||t===N._for||t===N._with||t===N._while;this.context.push(e?_n.p_stat:_n.p_expr),this.exprAllowed=!0};N.incDec.updateContext=function(){};N._function.updateContext=N._class.updateContext=function(t){t.beforeExpr&&t!==N._else&&!(t===N.semi&&this.curContext()!==_n.p_stat)&&!(t===N._return&&fr.test(this.input.slice(this.lastTokEnd,this.start)))&&!((t===N.colon||t===N.braceL)&&this.curContext()===_n.b_stat)?this.context.push(_n.f_expr):this.context.push(_n.f_stat),this.exprAllowed=!1};N.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0};N.backQuote.updateContext=function(){this.curContext()===_n.q_tmpl?this.context.pop():this.context.push(_n.q_tmpl),this.exprAllowed=!1};N.star.updateContext=function(t){if(t===N._function){var e=this.context.length-1;this.context[e]===_n.f_expr?this.context[e]=_n.f_expr_gen:this.context[e]=_n.f_gen}this.exprAllowed=!0};N.name.updateContext=function(t){var e=!1;this.options.ecmaVersion>=6&&t!==N.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(e=!0),this.exprAllowed=e};var at=Kn.prototype;at.checkPropClash=function(t,e,n){if(!(this.options.ecmaVersion>=9&&t.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(t.computed||t.method||t.shorthand))){var i=t.key,r;switch(i.type){case"Identifier":r=i.name;break;case"Literal":r=String(i.value);break;default:return}var s=t.kind;if(this.options.ecmaVersion>=6){r==="__proto__"&&s==="init"&&(e.proto&&(n?n.doubleProto<0&&(n.doubleProto=i.start):this.raiseRecoverable(i.start,"Redefinition of __proto__ property")),e.proto=!0);return}r="$"+r;var o=e[r];if(o){var a;s==="init"?a=this.strict&&o.init||o.get||o.set:a=o.init||o[s],a&&this.raiseRecoverable(i.start,"Redefinition of property")}else o=e[r]={init:!1,get:!1,set:!1};o[s]=!0}};at.parseExpression=function(t,e){var n=this;return this.catchStackOverflow(function(){var i=n.start,r=n.startLoc,s=n.parseMaybeAssign(t,e);if(n.type===N.comma){var o=n.startNodeAt(i,r);for(o.expressions=[s];n.eat(N.comma);)o.expressions.push(n.parseMaybeAssign(t,e));return n.finishNode(o,"SequenceExpression")}return s})};at.parseMaybeAssign=function(t,e,n){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(t);this.exprAllowed=!1}var i=!1,r=-1,s=-1,o=-1;e?(r=e.parenthesizedAssign,s=e.trailingComma,o=e.doubleProto,e.parenthesizedAssign=e.trailingComma=-1):(e=new Ox,i=!0);var a=this.start,l=this.startLoc;(this.type===N.parenL||this.type===N.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=t==="await");var u=this.parseMaybeConditional(t,e);if(n&&(u=n.call(this,u,a,l)),this.type.isAssign){var c=this.startNodeAt(a,l);return c.operator=this.value,this.type===N.eq&&(u=this.toAssignable(u,!1,e)),i||(e.parenthesizedAssign=e.trailingComma=e.doubleProto=-1),e.shorthandAssign>=u.start&&(e.shorthandAssign=-1),this.type===N.eq?this.checkLValPattern(u):this.checkLValSimple(u),c.left=u,this.next(),c.right=this.parseMaybeAssign(t),o>-1&&(e.doubleProto=o),this.finishNode(c,"AssignmentExpression")}else i&&this.checkExpressionErrors(e,!0);return r>-1&&(e.parenthesizedAssign=r),s>-1&&(e.trailingComma=s),u};at.parseMaybeConditional=function(t,e){var n=this.start,i=this.startLoc,r=this.parseExprOps(t,e);if(this.checkExpressionErrors(e))return r;if(!(r.type==="ArrowFunctionExpression"&&r.start===n)&&this.eat(N.question)){var s=this.startNodeAt(n,i);return s.test=r,s.consequent=this.parseMaybeAssign(),this.expect(N.colon),s.alternate=this.parseMaybeAssign(t),this.finishNode(s,"ConditionalExpression")}return r};at.parseExprOps=function(t,e){var n=this.start,i=this.startLoc,r=this.parseMaybeUnary(e,!1,!1,t);return this.checkExpressionErrors(e)||r.start===n&&r.type==="ArrowFunctionExpression"?r:this.parseExprOp(r,n,i,-1,t)};at.parseExprOp=function(t,e,n,i,r){var s=this.type.binop;if(s!=null&&(!r||this.type!==N._in)&&s>i){var o=this.type===N.logicalOR||this.type===N.logicalAND,a=this.type===N.coalesce;a&&(s=N.logicalAND.binop);var l=this.value;this.next();var u=this.start,c=this.startLoc,h=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,r),u,c,s,r),f=this.buildBinary(e,n,t,h,l,o||a);return(o&&this.type===N.coalesce||a&&(this.type===N.logicalOR||this.type===N.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(f,e,n,i,r)}return t};at.buildBinary=function(t,e,n,i,r,s){i.type==="PrivateIdentifier"&&this.raise(i.start,"Private identifier can only be left side of binary expression");var o=this.startNodeAt(t,e);return o.left=n,o.operator=r,o.right=i,this.finishNode(o,s?"LogicalExpression":"BinaryExpression")};at.parseMaybeUnary=function(t,e,n,i){var r=this.start,s=this.startLoc,o;if(this.isContextual("await")&&this.canAwait)o=this.parseAwait(i),e=!0;else if(this.type.prefix){var a=this.startNode(),l=this.type===N.incDec;a.operator=this.value,a.prefix=!0,this.next(),a.argument=this.parseMaybeUnary(null,!0,l,i),this.checkExpressionErrors(t,!0),l?this.checkLValSimple(a.argument):this.strict&&a.operator==="delete"&&MN(a.argument)?this.raiseRecoverable(a.start,"Deleting local variable in strict mode"):a.operator==="delete"&&JS(a.argument)?this.raiseRecoverable(a.start,"Private fields can not be deleted"):e=!0,o=this.finishNode(a,l?"UpdateExpression":"UnaryExpression")}else if(!e&&this.type===N.privateId)(i||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),o=this.parsePrivateIdent(),this.type!==N._in&&this.unexpected();else{if(o=this.parseExprSubscripts(t,i),this.checkExpressionErrors(t))return o;for(;this.type.postfix&&!this.canInsertSemicolon();){var u=this.startNodeAt(r,s);u.operator=this.value,u.prefix=!1,u.argument=o,this.checkLValSimple(o),this.next(),o=this.finishNode(u,"UpdateExpression")}}if(!n&&!(o.type==="ArrowFunctionExpression"&&o.start===r)&&this.eat(N.starstar))if(e)this.unexpected(this.lastTokStart);else return this.buildBinary(r,s,o,this.parseMaybeUnary(null,!1,!1,i),"**",!1);else return o};function MN(t){return t.type==="Identifier"||t.type==="ParenthesizedExpression"&&MN(t.expression)}function JS(t){return t.type==="MemberExpression"&&t.property.type==="PrivateIdentifier"||t.type==="ChainExpression"&&JS(t.expression)||t.type==="ParenthesizedExpression"&&JS(t.expression)}at.parseExprSubscripts=function(t,e){var n=this.start,i=this.startLoc,r=this.parseExprAtom(t,e);if(r.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return r;var s=this.parseSubscripts(r,n,i,!1,e);return t&&s.type==="MemberExpression"&&(t.parenthesizedAssign>=s.start&&(t.parenthesizedAssign=-1),t.parenthesizedBind>=s.start&&(t.parenthesizedBind=-1),t.trailingComma>=s.start&&(t.trailingComma=-1)),s};at.parseSubscripts=function(t,e,n,i,r){for(var s=this.options.ecmaVersion>=8&&t.type==="Identifier"&&t.name==="async"&&this.lastTokEnd===t.end&&!this.canInsertSemicolon()&&t.end-t.start===5&&this.potentialArrowAt===t.start,o=!1;;){var a=this.parseSubscript(t,e,n,i,s,o,r);if(a.optional&&(o=!0),a===t||a.type==="ArrowFunctionExpression"){if(o){var l=this.startNodeAt(e,n);l.expression=a,a=this.finishNode(l,"ChainExpression")}return a}t=a}};at.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(N.arrow)};at.parseSubscriptAsyncArrow=function(t,e,n,i){return this.parseArrowExpression(this.startNodeAt(t,e),n,!0,i)};at.parseSubscript=function(t,e,n,i,r,s,o){var a=this.options.ecmaVersion>=11,l=a&&this.eat(N.questionDot);i&&l&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var u=this.eat(N.bracketL);if(u||l&&this.type!==N.parenL&&this.type!==N.backQuote||this.eat(N.dot)){var c=this.startNodeAt(e,n);c.object=t,u?(c.property=this.parseExpression(),this.expect(N.bracketR)):this.type===N.privateId&&t.type!=="Super"?c.property=this.parsePrivateIdent():c.property=this.parseIdent(this.options.allowReserved!=="never"),c.computed=!!u,a&&(c.optional=l),t=this.finishNode(c,"MemberExpression")}else if(!i&&this.eat(N.parenL)){var h=new Ox,f=this.yieldPos,p=this.awaitPos,m=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var g=this.parseExprList(N.parenR,this.options.ecmaVersion>=8,!1,h);if(r&&!l&&this.shouldParseAsyncArrow())return this.checkPatternErrors(h,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=f,this.awaitPos=p,this.awaitIdentPos=m,this.parseSubscriptAsyncArrow(e,n,g,o);this.checkExpressionErrors(h,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=p||this.awaitPos,this.awaitIdentPos=m||this.awaitIdentPos;var x=this.startNodeAt(e,n);x.callee=t,x.arguments=g,a&&(x.optional=l),t=this.finishNode(x,"CallExpression")}else if(this.type===N.backQuote){(l||s)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var y=this.startNodeAt(e,n);y.tag=t,y.quasi=this.parseTemplate({isTagged:!0}),t=this.finishNode(y,"TaggedTemplateExpression")}return t};at.parseExprAtom=function(t,e,n){this.type===N.slash&&this.readRegexp();var i,r=this.potentialArrowAt===this.start;switch(this.type){case N._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),i=this.startNode(),this.next(),this.type===N.parenL&&!this.allowDirectSuper&&this.raise(i.start,"super() call outside constructor of a subclass"),this.type!==N.dot&&this.type!==N.bracketL&&this.type!==N.parenL&&this.unexpected(),this.finishNode(i,"Super");case N._this:return i=this.startNode(),this.next(),this.finishNode(i,"ThisExpression");case N.name:var s=this.start,o=this.startLoc,a=this.containsEsc,l=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!a&&l.name==="async"&&!this.canInsertSemicolon()&&this.eat(N._function))return this.overrideContext(_n.f_expr),this.parseFunction(this.startNodeAt(s,o),0,!1,!0,e);if(r&&!this.canInsertSemicolon()){if(this.eat(N.arrow))return this.parseArrowExpression(this.startNodeAt(s,o),[l],!1,e);if(this.options.ecmaVersion>=8&&l.name==="async"&&this.type===N.name&&!a&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return l=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(N.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(s,o),[l],!0,e)}return l;case N.regexp:var u=this.value;return i=this.parseLiteral(u.value),i.regex={pattern:u.pattern,flags:u.flags},i;case N.num:case N.string:return this.parseLiteral(this.value);case N._null:case N._true:case N._false:return i=this.startNode(),i.value=this.type===N._null?null:this.type===N._true,i.raw=this.type.keyword,this.next(),this.finishNode(i,"Literal");case N.parenL:var c=this.start,h=this.parseParenAndDistinguishExpression(r,e);return t&&(t.parenthesizedAssign<0&&!this.isSimpleAssignTarget(h)&&(t.parenthesizedAssign=c),t.parenthesizedBind<0&&(t.parenthesizedBind=c)),h;case N.bracketL:return i=this.startNode(),this.next(),i.elements=this.parseExprList(N.bracketR,!0,!0,t),this.finishNode(i,"ArrayExpression");case N.braceL:return this.overrideContext(_n.b_expr),this.parseObj(!1,t);case N._function:return i=this.startNode(),this.next(),this.parseFunction(i,0);case N._class:return this.parseClass(this.startNode(),!1);case N._new:return this.parseNew();case N.backQuote:return this.parseTemplate();case N._import:return this.options.ecmaVersion>=11?this.parseExprImport(n):this.unexpected();default:return this.parseExprAtomDefault()}};at.parseExprAtomDefault=function(){this.unexpected()};at.parseExprImport=function(t){var e=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===N.parenL&&!t)return this.parseDynamicImport(e);if(this.type===N.dot){var n=this.startNodeAt(e.start,e.loc&&e.loc.start);return n.name="import",e.meta=this.finishNode(n,"Identifier"),this.parseImportMeta(e)}else this.unexpected()};at.parseDynamicImport=function(t){if(this.next(),t.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(N.parenR)?t.options=null:(this.expect(N.comma),this.afterTrailingComma(N.parenR)?t.options=null:(t.options=this.parseMaybeAssign(),this.eat(N.parenR)||(this.expect(N.comma),this.afterTrailingComma(N.parenR)||this.unexpected())));else if(!this.eat(N.parenR)){var e=this.start;this.eat(N.comma)&&this.eat(N.parenR)?this.raiseRecoverable(e,"Trailing comma is not allowed in import()"):this.unexpected(e)}return this.finishNode(t,"ImportExpression")};at.parseImportMeta=function(t){this.next();var e=this.containsEsc;return t.property=this.parseIdent(!0),t.property.name!=="meta"&&this.raiseRecoverable(t.property.start,"The only valid meta property for import is 'import.meta'"),e&&this.raiseRecoverable(t.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(t.start,"Cannot use 'import.meta' outside a module"),this.finishNode(t,"MetaProperty")};at.parseLiteral=function(t){var e=this.startNode();return e.value=t,e.raw=this.input.slice(this.start,this.end),e.raw.charCodeAt(e.raw.length-1)===110&&(e.bigint=e.value!=null?e.value.toString():e.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(e,"Literal")};at.parseParenExpression=function(){this.expect(N.parenL);var t=this.parseExpression();return this.expect(N.parenR),t};at.shouldParseArrow=function(t){return!this.canInsertSemicolon()};at.parseParenAndDistinguishExpression=function(t,e){var n=this.start,i=this.startLoc,r,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o=this.start,a=this.startLoc,l=[],u=!0,c=!1,h=new Ox,f=this.yieldPos,p=this.awaitPos,m;for(this.yieldPos=0,this.awaitPos=0;this.type!==N.parenR;)if(u?u=!1:this.expect(N.comma),s&&this.afterTrailingComma(N.parenR,!0)){c=!0;break}else if(this.type===N.ellipsis){m=this.start,l.push(this.parseParenItem(this.parseRestBinding())),this.type===N.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else l.push(this.parseMaybeAssign(!1,h,this.parseParenItem));var g=this.lastTokEnd,x=this.lastTokEndLoc;if(this.expect(N.parenR),t&&this.shouldParseArrow(l)&&this.eat(N.arrow))return this.checkPatternErrors(h,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=f,this.awaitPos=p,this.parseParenArrowList(n,i,l,e);(!l.length||c)&&this.unexpected(this.lastTokStart),m&&this.unexpected(m),this.checkExpressionErrors(h,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=p||this.awaitPos,l.length>1?(r=this.startNodeAt(o,a),r.expressions=l,this.finishNodeAt(r,"SequenceExpression",g,x)):r=l[0]}else r=this.parseParenExpression();if(this.options.preserveParens){var y=this.startNodeAt(n,i);return y.expression=r,this.finishNode(y,"ParenthesizedExpression")}else return r};at.parseParenItem=function(t){return t};at.parseParenArrowList=function(t,e,n,i){return this.parseArrowExpression(this.startNodeAt(t,e),n,!1,i)};var jie=[];at.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var t=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===N.dot){var e=this.startNodeAt(t.start,t.loc&&t.loc.start);e.name="new",t.meta=this.finishNode(e,"Identifier"),this.next();var n=this.containsEsc;return t.property=this.parseIdent(!0),t.property.name!=="target"&&this.raiseRecoverable(t.property.start,"The only valid meta property for new is 'new.target'"),n&&this.raiseRecoverable(t.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(t.start,"'new.target' can only be used in functions and class static block"),this.finishNode(t,"MetaProperty")}var i=this.start,r=this.startLoc;return t.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),i,r,!0,!1),t.callee.type==="Super"&&this.raiseRecoverable(i,"Invalid use of 'super'"),this.eat(N.parenL)?t.arguments=this.parseExprList(N.parenR,this.options.ecmaVersion>=8,!1):t.arguments=jie,this.finishNode(t,"NewExpression")};at.parseTemplateElement=function(t){var e=t.isTagged,n=this.startNode();return this.type===N.invalidTemplate?(e||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value.replace(/\r\n?/g,`
|
|
101
|
+
`),cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
|
|
102
|
+
`),cooked:this.value},this.next(),n.tail=this.type===N.backQuote,this.finishNode(n,"TemplateElement")};at.parseTemplate=function(t){t===void 0&&(t={});var e=t.isTagged;e===void 0&&(e=!1);var n=this.startNode();this.next(),n.expressions=[];var i=this.parseTemplateElement({isTagged:e});for(n.quasis=[i];!i.tail;)this.type===N.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(N.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(N.braceR),n.quasis.push(i=this.parseTemplateElement({isTagged:e}));return this.next(),this.finishNode(n,"TemplateLiteral")};at.isAsyncProp=function(t){return!t.computed&&t.key.type==="Identifier"&&t.key.name==="async"&&(this.type===N.name||this.type===N.num||this.type===N.string||this.type===N.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===N.star)&&!fr.test(this.input.slice(this.lastTokEnd,this.start))};at.parseObj=function(t,e){var n=this.startNode(),i=!0,r={};for(n.properties=[],this.next();!this.eat(N.braceR);){if(i)i=!1;else if(this.expect(N.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(N.braceR))break;var s=this.parseProperty(t,e);t||this.checkPropClash(s,r,e),n.properties.push(s)}return this.finishNode(n,t?"ObjectPattern":"ObjectExpression")};at.parseProperty=function(t,e){var n=this.startNode(),i,r,s,o;if(this.options.ecmaVersion>=9&&this.eat(N.ellipsis))return t?(n.argument=this.parseIdent(!1),this.type===N.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(n,"RestElement")):(n.argument=this.parseMaybeAssign(!1,e),this.type===N.comma&&e&&e.trailingComma<0&&(e.trailingComma=this.start),this.finishNode(n,"SpreadElement"));this.options.ecmaVersion>=6&&(n.method=!1,n.shorthand=!1,(t||e)&&(s=this.start,o=this.startLoc),t||(i=this.eat(N.star)));var a=this.containsEsc;return this.parsePropertyName(n),!t&&!a&&this.options.ecmaVersion>=8&&!i&&this.isAsyncProp(n)?(r=!0,i=this.options.ecmaVersion>=9&&this.eat(N.star),this.parsePropertyName(n)):r=!1,this.parsePropertyValue(n,t,i,r,s,o,e,a),this.finishNode(n,"Property")};at.parseGetterSetter=function(t){var e=t.key.name;this.parsePropertyName(t),t.value=this.parseMethod(!1),t.kind=e;var n=t.kind==="get"?0:1;if(t.value.params.length!==n){var i=t.value.start;t.kind==="get"?this.raiseRecoverable(i,"getter should have no params"):this.raiseRecoverable(i,"setter should have exactly one param")}else t.kind==="set"&&t.value.params[0].type==="RestElement"&&this.raiseRecoverable(t.value.params[0].start,"Setter cannot use rest params")};at.parsePropertyValue=function(t,e,n,i,r,s,o,a){(n||i)&&this.type===N.colon&&this.unexpected(),this.eat(N.colon)?(t.value=e?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),t.kind="init"):this.options.ecmaVersion>=6&&this.type===N.parenL?(e&&this.unexpected(),t.method=!0,t.value=this.parseMethod(n,i),t.kind="init"):!e&&!a&&this.options.ecmaVersion>=5&&!t.computed&&t.key.type==="Identifier"&&(t.key.name==="get"||t.key.name==="set")&&this.type!==N.comma&&this.type!==N.braceR&&this.type!==N.eq?((n||i)&&this.unexpected(),this.parseGetterSetter(t)):this.options.ecmaVersion>=6&&!t.computed&&t.key.type==="Identifier"?((n||i)&&this.unexpected(),this.checkUnreserved(t.key),t.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=r),e?t.value=this.parseMaybeDefault(r,s,this.copyNode(t.key)):this.type===N.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),t.value=this.parseMaybeDefault(r,s,this.copyNode(t.key))):t.value=this.copyNode(t.key),t.kind="init",t.shorthand=!0):this.unexpected()};at.parsePropertyName=function(t){if(this.options.ecmaVersion>=6){if(this.eat(N.bracketL))return t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(N.bracketR),t.key;t.computed=!1}return t.key=this.type===N.num||this.type===N.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};at.initFunction=function(t){t.id=null,this.options.ecmaVersion>=6&&(t.generator=t.expression=!1),this.options.ecmaVersion>=8&&(t.async=!1)};at.parseMethod=function(t,e,n){var i=this.startNode(),r=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(i),this.options.ecmaVersion>=6&&(i.generator=t),this.options.ecmaVersion>=8&&(i.async=!!e),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ek(e,i.generator)|mx|(n?TN:0)),this.expect(N.parenL),i.params=this.parseBindingList(N.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(i,!1,!0,!1),this.yieldPos=r,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(i,"FunctionExpression")};at.parseArrowExpression=function(t,e,n,i){var r=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(ek(n,!1)|J2),this.initFunction(t),this.options.ecmaVersion>=8&&(t.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,t.params=this.toAssignableList(e,!0),this.parseFunctionBody(t,!0,!1,i),this.yieldPos=r,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(t,"ArrowFunctionExpression")};at.parseFunctionBody=function(t,e,n,i){var r=e&&this.type!==N.braceL,s=this.strict,o=!1;if(r)t.body=this.parseMaybeAssign(i),t.expression=!0,this.checkParams(t,!1);else{var a=this.options.ecmaVersion>=7&&!this.isSimpleParamList(t.params);(!s||a)&&(o=this.strictDirective(this.end),o&&a&&this.raiseRecoverable(t.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var l=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(t,!s&&!o&&!e&&!n&&this.isSimpleParamList(t.params)),this.strict&&t.id&&this.checkLValSimple(t.id,IN),t.body=this.parseBlock(!1,void 0,o&&!s),t.expression=!1,this.adaptDirectivePrologue(t.body.body),this.labels=l}this.exitScope()};at.isSimpleParamList=function(t){for(var e=0,n=t;e<n.length;e+=1){var i=n[e];if(i.type!=="Identifier")return!1}return!0};at.checkParams=function(t,e){for(var n=Object.create(null),i=0,r=t.params;i<r.length;i+=1){var s=r[i];this.checkLValInnerPattern(s,tk,e?null:n)}};at.parseExprList=function(t,e,n,i){for(var r=[],s=!0;!this.eat(t);){if(s)s=!1;else if(this.expect(N.comma),e&&this.afterTrailingComma(t))break;var o=void 0;n&&this.type===N.comma?o=null:this.type===N.ellipsis?(o=this.parseSpread(i),i&&this.type===N.comma&&i.trailingComma<0&&(i.trailingComma=this.start)):o=this.parseMaybeAssign(!1,i),r.push(o)}return r};at.checkUnreserved=function(t){var e=t.start,n=t.end,i=t.name;if(this.inGenerator&&i==="yield"&&this.raiseRecoverable(e,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&i==="await"&&this.raiseRecoverable(e,"Cannot use 'await' as identifier inside an async function"),!(this.currentThisScope().flags&gx)&&i==="arguments"&&this.raiseRecoverable(e,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(i==="arguments"||i==="await")&&this.raise(e,"Cannot use "+i+" in class static initialization block"),this.keywords.test(i)&&this.raise(e,"Unexpected keyword '"+i+"'"),!(this.options.ecmaVersion<6&&this.input.slice(e,n).indexOf("\\")!==-1)){var r=this.strict?this.reservedWordsStrict:this.reservedWords;r.test(i)&&(!this.inAsync&&i==="await"&&this.raiseRecoverable(e,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(e,"The keyword '"+i+"' is reserved"))}};at.parseIdent=function(t){var e=this.parseIdentNode();return this.next(!!t),this.finishNode(e,"Identifier"),t||(this.checkUnreserved(e),e.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=e.start)),e};at.parseIdentNode=function(){var t=this.startNode();return this.type===N.name?t.name=this.value:this.type.keyword?(t.name=this.type.keyword,(t.name==="class"||t.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=N.name):this.unexpected(),t};at.parsePrivateIdent=function(){var t=this.startNode();return this.type===N.privateId?t.name=this.value:this.unexpected(),this.next(),this.finishNode(t,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(t.start,"Private field '#"+t.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(t)),t};at.parseYield=function(t){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type===N.semi||this.canInsertSemicolon()||this.type!==N.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(N.star),e.argument=this.parseMaybeAssign(t)),this.finishNode(e,"YieldExpression")};at.parseAwait=function(t){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0,!1,t),this.finishNode(e,"AwaitExpression")};var gO=Kn.prototype;gO.raise=function(t,e){var n=wN(this.input,t);e+=" ("+n.line+":"+n.column+")",this.sourceFile&&(e+=" in "+this.sourceFile);var i=new SyntaxError(e);throw i.pos=t,i.loc=n,i.raisedAt=this.pos,i};gO.raiseRecoverable=gO.raise;gO.curPosition=function(){if(this.options.locations)return new Jd(this.curLine,this.pos-this.lineStart)};var kl=Kn.prototype,Zie=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};kl.enterScope=function(t){this.scopeStack.push(new Zie(t))};kl.exitScope=function(){this.scopeStack.pop()};kl.treatFunctionsAsVarInScope=function(t){return t.flags&Ku||!this.inModule&&t.flags&ku};kl.declareName=function(t,e,n){var i=!1;if(e===ya){var r=this.currentScope();i=r.lexical.indexOf(t)>-1||r.functions.indexOf(t)>-1||r.var.indexOf(t)>-1,r.lexical.push(t),this.inModule&&r.flags&ku&&delete this.undefinedExports[t]}else if(e===$N){var s=this.currentScope();s.lexical.push(t)}else if(e===AN){var o=this.currentScope();this.treatFunctionsAsVar?i=o.lexical.indexOf(t)>-1:i=o.lexical.indexOf(t)>-1||o.var.indexOf(t)>-1,o.functions.push(t)}else for(var a=this.scopeStack.length-1;a>=0;--a){var l=this.scopeStack[a];if(l.lexical.indexOf(t)>-1&&!(l.flags&EN&&l.lexical[0]===t)||!this.treatFunctionsAsVarInScope(l)&&l.functions.indexOf(t)>-1){i=!0;break}if(l.var.push(t),this.inModule&&l.flags&ku&&delete this.undefinedExports[t],l.flags&gx)break}i&&this.raiseRecoverable(n,"Identifier '"+t+"' has already been declared")};kl.checkLocalExport=function(t){this.scopeStack[0].lexical.indexOf(t.name)===-1&&this.scopeStack[0].var.indexOf(t.name)===-1&&(this.undefinedExports[t.name]=t)};kl.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};kl.currentVarScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(e.flags&(gx|dm|Ju))return e}};kl.currentThisScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(e.flags&(gx|dm|Ju)&&!(e.flags&J2))return e}};var xx=function(e,n,i){this.type="",this.start=n,this.end=0,e.options.locations&&(this.loc=new px(e,i)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[n,0])},pm=Kn.prototype;pm.startNode=function(){return new xx(this,this.start,this.startLoc)};pm.startNodeAt=function(t,e){return new xx(this,t,e)};function NN(t,e,n,i){return t.type=e,t.end=n,this.options.locations&&(t.loc.end=i),this.options.ranges&&(t.range[1]=n),t}pm.finishNode=function(t,e){return NN.call(this,t,e,this.lastTokEnd,this.lastTokEndLoc)};pm.finishNodeAt=function(t,e,n,i){return NN.call(this,t,e,n,i)};pm.copyNode=function(t){var e=new xx(this,t.start,this.startLoc);for(var n in t)e[n]=t[n];return e};var zie="Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz",LN="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",DN=LN+" Extended_Pictographic",QN=DN,VN=QN+" EBase EComp EMod EPres ExtPict",BN=VN,Xie=BN,Wie={9:LN,10:DN,11:QN,12:VN,13:BN,14:Xie},Hie="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",Uie={9:"",10:"",11:"",12:"",13:"",14:Hie},g3="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",FN="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",jN=FN+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",ZN=jN+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",zN=ZN+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",XN=zN+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",qie=XN+" "+zie,Yie={9:FN,10:jN,11:ZN,12:zN,13:XN,14:qie},WN={};function Gie(t){var e=WN[t]={binary:Va(Wie[t]+" "+g3),binaryOfStrings:Va(Uie[t]),nonBinary:{General_Category:Va(g3),Script:Va(Yie[t])}};e.nonBinary.Script_Extensions=e.nonBinary.Script,e.nonBinary.gc=e.nonBinary.General_Category,e.nonBinary.sc=e.nonBinary.Script,e.nonBinary.scx=e.nonBinary.Script_Extensions}for(var gv=0,O3=[9,10,11,12,13,14];gv<O3.length;gv+=1){var Kie=O3[gv];Gie(Kie)}var We=Kn.prototype,OO=function(e,n){this.parent=e,this.base=n||this};OO.prototype.separatedFrom=function(e){for(var n=this;n;n=n.parent)for(var i=e;i;i=i.parent)if(n.base===i.base&&n!==i)return!0;return!1};OO.prototype.sibling=function(){return new OO(this.parent,this.base)};var Co=function(e){this.parser=e,this.validFlags="gim"+(e.options.ecmaVersion>=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"")+(e.options.ecmaVersion>=13?"d":"")+(e.options.ecmaVersion>=15?"v":""),this.unicodeProperties=WN[e.options.ecmaVersion>=14?14:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};Co.prototype.reset=function(e,n,i){var r=i.indexOf("v")!==-1,s=i.indexOf("u")!==-1;this.start=e|0,this.source=n+"",this.flags=i,r&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=s&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=s&&this.parser.options.ecmaVersion>=9)};Co.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)};Co.prototype.at=function(e,n){n===void 0&&(n=!1);var i=this.source,r=i.length;if(e>=r)return-1;var s=i.charCodeAt(e);if(!(n||this.switchU)||s<=55295||s>=57344||e+1>=r)return s;var o=i.charCodeAt(e+1);return o>=56320&&o<=57343?(s<<10)+o-56613888:s};Co.prototype.nextIndex=function(e,n){n===void 0&&(n=!1);var i=this.source,r=i.length;if(e>=r)return r;var s=i.charCodeAt(e),o;return!(n||this.switchU)||s<=55295||s>=57344||e+1>=r||(o=i.charCodeAt(e+1))<56320||o>57343?e+1:e+2};Co.prototype.current=function(e){return e===void 0&&(e=!1),this.at(this.pos,e)};Co.prototype.lookahead=function(e){return e===void 0&&(e=!1),this.at(this.nextIndex(this.pos,e),e)};Co.prototype.advance=function(e){e===void 0&&(e=!1),this.pos=this.nextIndex(this.pos,e)};Co.prototype.eat=function(e,n){return n===void 0&&(n=!1),this.current(n)===e?(this.advance(n),!0):!1};Co.prototype.eatChars=function(e,n){n===void 0&&(n=!1);for(var i=this.pos,r=0,s=e;r<s.length;r+=1){var o=s[r],a=this.at(i,n);if(a===-1||a!==o)return!1;i=this.nextIndex(i,n)}return this.pos=i,!0};We.validateRegExpFlags=function(t){for(var e=t.validFlags,n=t.flags,i=!1,r=!1,s=0;s<n.length;s++){var o=n.charAt(s);e.indexOf(o)===-1&&this.raise(t.start,"Invalid regular expression flag"),n.indexOf(o,s+1)>-1&&this.raise(t.start,"Duplicate regular expression flag"),o==="u"&&(i=!0),o==="v"&&(r=!0)}this.options.ecmaVersion>=15&&i&&r&&this.raise(t.start,"Invalid regular expression flag")};function Jie(t){for(var e in t)return!0;return!1}We.validateRegExpPattern=function(t){this.regexp_pattern(t),!t.switchN&&this.options.ecmaVersion>=9&&Jie(t.groupNames)&&(t.switchN=!0,this.regexp_pattern(t))};We.regexp_pattern=function(t){t.pos=0,t.lastIntValue=0,t.lastStringValue="",t.lastAssertionIsQuantifiable=!1,t.numCapturingParens=0,t.maxBackReference=0,t.groupNames=Object.create(null),t.backReferenceNames.length=0,t.branchID=null,this.regexp_disjunction(t),t.pos!==t.source.length&&(t.eat(41)&&t.raise("Unmatched ')'"),(t.eat(93)||t.eat(125))&&t.raise("Lone quantifier brackets")),t.maxBackReference>t.numCapturingParens&&t.raise("Invalid escape");for(var e=0,n=t.backReferenceNames;e<n.length;e+=1){var i=n[e];t.groupNames[i]||t.raise("Invalid named capture referenced")}};We.regexp_disjunction=function(t){var e=this.options.ecmaVersion>=16;for(e&&(t.branchID=new OO(t.branchID,null)),this.regexp_alternative(t);t.eat(124);)e&&(t.branchID=t.branchID.sibling()),this.regexp_alternative(t);e&&(t.branchID=t.branchID.parent),this.regexp_eatQuantifier(t,!0)&&t.raise("Nothing to repeat"),t.eat(123)&&t.raise("Lone quantifier brackets")};We.regexp_alternative=function(t){for(;t.pos<t.source.length&&this.regexp_eatTerm(t););};We.regexp_eatTerm=function(t){return this.regexp_eatAssertion(t)?(t.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(t)&&t.switchU&&t.raise("Invalid quantifier"),!0):(t.switchU?this.regexp_eatAtom(t):this.regexp_eatExtendedAtom(t))?(this.regexp_eatQuantifier(t),!0):!1};We.regexp_eatAssertion=function(t){var e=t.pos;if(t.lastAssertionIsQuantifiable=!1,t.eat(94)||t.eat(36))return!0;if(t.eat(92)){if(t.eat(66)||t.eat(98))return!0;t.pos=e}if(t.eat(40)&&t.eat(63)){var n=!1;if(this.options.ecmaVersion>=9&&(n=t.eat(60)),t.eat(61)||t.eat(33))return this.regexp_disjunction(t),t.eat(41)||t.raise("Unterminated group"),t.lastAssertionIsQuantifiable=!n,!0}return t.pos=e,!1};We.regexp_eatQuantifier=function(t,e){return e===void 0&&(e=!1),this.regexp_eatQuantifierPrefix(t,e)?(t.eat(63),!0):!1};We.regexp_eatQuantifierPrefix=function(t,e){return t.eat(42)||t.eat(43)||t.eat(63)||this.regexp_eatBracedQuantifier(t,e)};We.regexp_eatBracedQuantifier=function(t,e){var n=t.pos;if(t.eat(123)){var i=0,r=-1;if(this.regexp_eatDecimalDigits(t)&&(i=t.lastIntValue,t.eat(44)&&this.regexp_eatDecimalDigits(t)&&(r=t.lastIntValue),t.eat(125)))return r!==-1&&r<i&&!e&&t.raise("numbers out of order in {} quantifier"),!0;t.switchU&&!e&&t.raise("Incomplete quantifier"),t.pos=n}return!1};We.regexp_eatAtom=function(t){return this.regexp_eatPatternCharacters(t)||t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)};We.regexp_eatReverseSolidusAtomEscape=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatAtomEscape(t))return!0;t.pos=e}return!1};We.regexp_eatUncapturingGroup=function(t){var e=t.pos;if(t.eat(40)){if(t.eat(63)){if(this.options.ecmaVersion>=16){var n=this.regexp_eatModifiers(t),i=t.eat(45);if(n||i){for(var r=0;r<n.length;r++){var s=n.charAt(r);n.indexOf(s,r+1)>-1&&t.raise("Duplicate regular expression modifiers")}if(i){var o=this.regexp_eatModifiers(t);!n&&!o&&t.current()===58&&t.raise("Invalid regular expression modifiers");for(var a=0;a<o.length;a++){var l=o.charAt(a);(o.indexOf(l,a+1)>-1||n.indexOf(l)>-1)&&t.raise("Duplicate regular expression modifiers")}}}}if(t.eat(58)){if(this.regexp_disjunction(t),t.eat(41))return!0;t.raise("Unterminated group")}}t.pos=e}return!1};We.regexp_eatCapturingGroup=function(t){if(t.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(t):t.current()===63&&t.raise("Invalid group"),this.regexp_disjunction(t),t.eat(41))return t.numCapturingParens+=1,!0;t.raise("Unterminated group")}return!1};We.regexp_eatModifiers=function(t){for(var e="",n=0;(n=t.current())!==-1&&ere(n);)e+=aa(n),t.advance();return e};function ere(t){return t===105||t===109||t===115}We.regexp_eatExtendedAtom=function(t){return t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)||this.regexp_eatInvalidBracedQuantifier(t)||this.regexp_eatExtendedPatternCharacter(t)};We.regexp_eatInvalidBracedQuantifier=function(t){return this.regexp_eatBracedQuantifier(t,!0)&&t.raise("Nothing to repeat"),!1};We.regexp_eatSyntaxCharacter=function(t){var e=t.current();return HN(e)?(t.lastIntValue=e,t.advance(),!0):!1};function HN(t){return t===36||t>=40&&t<=43||t===46||t===63||t>=91&&t<=94||t>=123&&t<=125}We.regexp_eatPatternCharacters=function(t){for(var e=t.pos,n=0;(n=t.current())!==-1&&!HN(n);)t.advance();return t.pos!==e};We.regexp_eatExtendedPatternCharacter=function(t){var e=t.current();return e!==-1&&e!==36&&!(e>=40&&e<=43)&&e!==46&&e!==63&&e!==91&&e!==94&&e!==124?(t.advance(),!0):!1};We.regexp_groupSpecifier=function(t){if(t.eat(63)){this.regexp_eatGroupName(t)||t.raise("Invalid group");var e=this.options.ecmaVersion>=16,n=t.groupNames[t.lastStringValue];if(n)if(e)for(var i=0,r=n;i<r.length;i+=1){var s=r[i];s.separatedFrom(t.branchID)||t.raise("Duplicate capture group name")}else t.raise("Duplicate capture group name");e?(n||(t.groupNames[t.lastStringValue]=[])).push(t.branchID):t.groupNames[t.lastStringValue]=!0}};We.regexp_eatGroupName=function(t){if(t.lastStringValue="",t.eat(60)){if(this.regexp_eatRegExpIdentifierName(t)&&t.eat(62))return!0;t.raise("Invalid capture group name")}return!1};We.regexp_eatRegExpIdentifierName=function(t){if(t.lastStringValue="",this.regexp_eatRegExpIdentifierStart(t)){for(t.lastStringValue+=aa(t.lastIntValue);this.regexp_eatRegExpIdentifierPart(t);)t.lastStringValue+=aa(t.lastIntValue);return!0}return!1};We.regexp_eatRegExpIdentifierStart=function(t){var e=t.pos,n=this.options.ecmaVersion>=11,i=t.current(n);return t.advance(n),i===92&&this.regexp_eatRegExpUnicodeEscapeSequence(t,n)&&(i=t.lastIntValue),tre(i)?(t.lastIntValue=i,!0):(t.pos=e,!1)};function tre(t){return xo(t,!0)||t===36||t===95}We.regexp_eatRegExpIdentifierPart=function(t){var e=t.pos,n=this.options.ecmaVersion>=11,i=t.current(n);return t.advance(n),i===92&&this.regexp_eatRegExpUnicodeEscapeSequence(t,n)&&(i=t.lastIntValue),nre(i)?(t.lastIntValue=i,!0):(t.pos=e,!1)};function nre(t){return ul(t,!0)||t===36||t===95||t===8204||t===8205}We.regexp_eatAtomEscape=function(t){return this.regexp_eatBackReference(t)||this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)||t.switchN&&this.regexp_eatKGroupName(t)?!0:(t.switchU&&(t.current()===99&&t.raise("Invalid unicode escape"),t.raise("Invalid escape")),!1)};We.regexp_eatBackReference=function(t){var e=t.pos;if(this.regexp_eatDecimalEscape(t)){var n=t.lastIntValue;if(t.switchU)return n>t.maxBackReference&&(t.maxBackReference=n),!0;if(n<=t.numCapturingParens)return!0;t.pos=e}return!1};We.regexp_eatKGroupName=function(t){if(t.eat(107)){if(this.regexp_eatGroupName(t))return t.backReferenceNames.push(t.lastStringValue),!0;t.raise("Invalid named reference")}return!1};We.regexp_eatCharacterEscape=function(t){return this.regexp_eatControlEscape(t)||this.regexp_eatCControlLetter(t)||this.regexp_eatZero(t)||this.regexp_eatHexEscapeSequence(t)||this.regexp_eatRegExpUnicodeEscapeSequence(t,!1)||!t.switchU&&this.regexp_eatLegacyOctalEscapeSequence(t)||this.regexp_eatIdentityEscape(t)};We.regexp_eatCControlLetter=function(t){var e=t.pos;if(t.eat(99)){if(this.regexp_eatControlLetter(t))return!0;t.pos=e}return!1};We.regexp_eatZero=function(t){return t.current()===48&&!yx(t.lookahead())?(t.lastIntValue=0,t.advance(),!0):!1};We.regexp_eatControlEscape=function(t){var e=t.current();return e===116?(t.lastIntValue=9,t.advance(),!0):e===110?(t.lastIntValue=10,t.advance(),!0):e===118?(t.lastIntValue=11,t.advance(),!0):e===102?(t.lastIntValue=12,t.advance(),!0):e===114?(t.lastIntValue=13,t.advance(),!0):!1};We.regexp_eatControlLetter=function(t){var e=t.current();return UN(e)?(t.lastIntValue=e%32,t.advance(),!0):!1};function UN(t){return t>=65&&t<=90||t>=97&&t<=122}We.regexp_eatRegExpUnicodeEscapeSequence=function(t,e){e===void 0&&(e=!1);var n=t.pos,i=e||t.switchU;if(t.eat(117)){if(this.regexp_eatFixedHexDigits(t,4)){var r=t.lastIntValue;if(i&&r>=55296&&r<=56319){var s=t.pos;if(t.eat(92)&&t.eat(117)&&this.regexp_eatFixedHexDigits(t,4)){var o=t.lastIntValue;if(o>=56320&&o<=57343)return t.lastIntValue=(r-55296)*1024+(o-56320)+65536,!0}t.pos=s,t.lastIntValue=r}return!0}if(i&&t.eat(123)&&this.regexp_eatHexDigits(t)&&t.eat(125)&&ire(t.lastIntValue))return!0;i&&t.raise("Invalid unicode escape"),t.pos=n}return!1};function ire(t){return t>=0&&t<=1114111}We.regexp_eatIdentityEscape=function(t){if(t.switchU)return this.regexp_eatSyntaxCharacter(t)?!0:t.eat(47)?(t.lastIntValue=47,!0):!1;var e=t.current();return e!==99&&(!t.switchN||e!==107)?(t.lastIntValue=e,t.advance(),!0):!1};We.regexp_eatDecimalEscape=function(t){t.lastIntValue=0;var e=t.current();if(e>=49&&e<=57){do t.lastIntValue=10*t.lastIntValue+(e-48),t.advance();while((e=t.current())>=48&&e<=57);return!0}return!1};var qN=0,la=1,Hr=2;We.regexp_eatCharacterClassEscape=function(t){var e=t.current();if(rre(e))return t.lastIntValue=-1,t.advance(),la;var n=!1;if(t.switchU&&this.options.ecmaVersion>=9&&((n=e===80)||e===112)){t.lastIntValue=-1,t.advance();var i;if(t.eat(123)&&(i=this.regexp_eatUnicodePropertyValueExpression(t))&&t.eat(125))return n&&i===Hr&&t.raise("Invalid property name"),i;t.raise("Invalid property name")}return qN};function rre(t){return t===100||t===68||t===115||t===83||t===119||t===87}We.regexp_eatUnicodePropertyValueExpression=function(t){var e=t.pos;if(this.regexp_eatUnicodePropertyName(t)&&t.eat(61)){var n=t.lastStringValue;if(this.regexp_eatUnicodePropertyValue(t)){var i=t.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(t,n,i),la}}if(t.pos=e,this.regexp_eatLoneUnicodePropertyNameOrValue(t)){var r=t.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(t,r)}return qN};We.regexp_validateUnicodePropertyNameAndValue=function(t,e,n){of(t.unicodeProperties.nonBinary,e)||t.raise("Invalid property name"),t.unicodeProperties.nonBinary[e].test(n)||t.raise("Invalid property value")};We.regexp_validateUnicodePropertyNameOrValue=function(t,e){if(t.unicodeProperties.binary.test(e))return la;if(t.switchV&&t.unicodeProperties.binaryOfStrings.test(e))return Hr;t.raise("Invalid property name")};We.regexp_eatUnicodePropertyName=function(t){var e=0;for(t.lastStringValue="";YN(e=t.current());)t.lastStringValue+=aa(e),t.advance();return t.lastStringValue!==""};function YN(t){return UN(t)||t===95}We.regexp_eatUnicodePropertyValue=function(t){var e=0;for(t.lastStringValue="";sre(e=t.current());)t.lastStringValue+=aa(e),t.advance();return t.lastStringValue!==""};function sre(t){return YN(t)||yx(t)}We.regexp_eatLoneUnicodePropertyNameOrValue=function(t){return this.regexp_eatUnicodePropertyValue(t)};We.regexp_eatCharacterClass=function(t){if(t.eat(91)){var e=t.eat(94),n=this.regexp_classContents(t);return t.eat(93)||t.raise("Unterminated character class"),e&&n===Hr&&t.raise("Negated character class may contain strings"),!0}return!1};We.regexp_classContents=function(t){return t.current()===93?la:t.switchV?this.regexp_classSetExpression(t):(this.regexp_nonEmptyClassRanges(t),la)};We.regexp_nonEmptyClassRanges=function(t){for(;this.regexp_eatClassAtom(t);){var e=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassAtom(t)){var n=t.lastIntValue;t.switchU&&(e===-1||n===-1)&&t.raise("Invalid character class"),e!==-1&&n!==-1&&e>n&&t.raise("Range out of order in character class")}}};We.regexp_eatClassAtom=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatClassEscape(t))return!0;if(t.switchU){var n=t.current();(n===99||JN(n))&&t.raise("Invalid class escape"),t.raise("Invalid escape")}t.pos=e}var i=t.current();return i!==93?(t.lastIntValue=i,t.advance(),!0):!1};We.regexp_eatClassEscape=function(t){var e=t.pos;if(t.eat(98))return t.lastIntValue=8,!0;if(t.switchU&&t.eat(45))return t.lastIntValue=45,!0;if(!t.switchU&&t.eat(99)){if(this.regexp_eatClassControlLetter(t))return!0;t.pos=e}return this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)};We.regexp_classSetExpression=function(t){var e=la,n;if(!this.regexp_eatClassSetRange(t))if(n=this.regexp_eatClassSetOperand(t)){n===Hr&&(e=Hr);for(var i=t.pos;t.eatChars([38,38]);){if(t.current()!==38&&(n=this.regexp_eatClassSetOperand(t))){n!==Hr&&(e=la);continue}t.raise("Invalid character in character class")}if(i!==t.pos)return e;for(;t.eatChars([45,45]);)this.regexp_eatClassSetOperand(t)||t.raise("Invalid character in character class");if(i!==t.pos)return e}else t.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(t)){if(n=this.regexp_eatClassSetOperand(t),!n)return e;n===Hr&&(e=Hr)}};We.regexp_eatClassSetRange=function(t){var e=t.pos;if(this.regexp_eatClassSetCharacter(t)){var n=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassSetCharacter(t)){var i=t.lastIntValue;return n!==-1&&i!==-1&&n>i&&t.raise("Range out of order in character class"),!0}t.pos=e}return!1};We.regexp_eatClassSetOperand=function(t){return this.regexp_eatClassSetCharacter(t)?la:this.regexp_eatClassStringDisjunction(t)||this.regexp_eatNestedClass(t)};We.regexp_eatNestedClass=function(t){var e=t.pos;if(t.eat(91)){var n=t.eat(94),i=this.regexp_classContents(t);if(t.eat(93))return n&&i===Hr&&t.raise("Negated character class may contain strings"),i;t.pos=e}if(t.eat(92)){var r=this.regexp_eatCharacterClassEscape(t);if(r)return r;t.pos=e}return null};We.regexp_eatClassStringDisjunction=function(t){var e=t.pos;if(t.eatChars([92,113])){if(t.eat(123)){var n=this.regexp_classStringDisjunctionContents(t);if(t.eat(125))return n}else t.raise("Invalid escape");t.pos=e}return null};We.regexp_classStringDisjunctionContents=function(t){for(var e=this.regexp_classString(t);t.eat(124);)this.regexp_classString(t)===Hr&&(e=Hr);return e};We.regexp_classString=function(t){for(var e=0;this.regexp_eatClassSetCharacter(t);)e++;return e===1?la:Hr};We.regexp_eatClassSetCharacter=function(t){var e=t.pos;if(t.eat(92))return this.regexp_eatCharacterEscape(t)||this.regexp_eatClassSetReservedPunctuator(t)?!0:t.eat(98)?(t.lastIntValue=8,!0):(t.pos=e,!1);var n=t.current();return n<0||n===t.lookahead()&&ore(n)||are(n)?!1:(t.advance(),t.lastIntValue=n,!0)};function ore(t){return t===33||t>=35&&t<=38||t>=42&&t<=44||t===46||t>=58&&t<=64||t===94||t===96||t===126}function are(t){return t===40||t===41||t===45||t===47||t>=91&&t<=93||t>=123&&t<=125}We.regexp_eatClassSetReservedPunctuator=function(t){var e=t.current();return lre(e)?(t.lastIntValue=e,t.advance(),!0):!1};function lre(t){return t===33||t===35||t===37||t===38||t===44||t===45||t>=58&&t<=62||t===64||t===96||t===126}We.regexp_eatClassControlLetter=function(t){var e=t.current();return yx(e)||e===95?(t.lastIntValue=e%32,t.advance(),!0):!1};We.regexp_eatHexEscapeSequence=function(t){var e=t.pos;if(t.eat(120)){if(this.regexp_eatFixedHexDigits(t,2))return!0;t.switchU&&t.raise("Invalid escape"),t.pos=e}return!1};We.regexp_eatDecimalDigits=function(t){var e=t.pos,n=0;for(t.lastIntValue=0;yx(n=t.current());)t.lastIntValue=10*t.lastIntValue+(n-48),t.advance();return t.pos!==e};function yx(t){return t>=48&&t<=57}We.regexp_eatHexDigits=function(t){var e=t.pos,n=0;for(t.lastIntValue=0;GN(n=t.current());)t.lastIntValue=16*t.lastIntValue+KN(n),t.advance();return t.pos!==e};function GN(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function KN(t){return t>=65&&t<=70?10+(t-65):t>=97&&t<=102?10+(t-97):t-48}We.regexp_eatLegacyOctalEscapeSequence=function(t){if(this.regexp_eatOctalDigit(t)){var e=t.lastIntValue;if(this.regexp_eatOctalDigit(t)){var n=t.lastIntValue;e<=3&&this.regexp_eatOctalDigit(t)?t.lastIntValue=e*64+n*8+t.lastIntValue:t.lastIntValue=e*8+n}else t.lastIntValue=e;return!0}return!1};We.regexp_eatOctalDigit=function(t){var e=t.current();return JN(e)?(t.lastIntValue=e-48,t.advance(),!0):(t.lastIntValue=0,!1)};function JN(t){return t>=48&&t<=55}We.regexp_eatFixedHexDigits=function(t,e){var n=t.pos;t.lastIntValue=0;for(var i=0;i<e;++i){var r=t.current();if(!GN(r))return t.pos=n,!1;t.lastIntValue=16*t.lastIntValue+KN(r),t.advance()}return!0};var ik=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new px(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},_t=Kn.prototype;_t.next=function(t){!t&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new ik(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};_t.getToken=function(){return this.next(),new ik(this)};typeof Symbol<"u"&&(_t[Symbol.iterator]=function(){var t=this;return{next:function(){var e=t.getToken();return{done:e.type===N.eof,value:e}}}});_t.nextToken=function(){var t=this.curContext();if((!t||!t.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(N.eof);if(t.override)return t.override(this);this.readToken(this.fullCharCodeAtPos())};_t.readToken=function(t){return xo(t,this.options.ecmaVersion>=6)||t===92?this.readWord():this.getTokenFromCode(t)};_t.fullCharCodeAt=function(t){var e=this.input.charCodeAt(t);if(e<=55295||e>=56320)return e;var n=this.input.charCodeAt(t+1);return n<=56319||n>=57344?e:(e<<10)+n-56613888};_t.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)};_t.skipBlockComment=function(){var t=this.options.onComment&&this.curPosition(),e=this.pos,n=this.input.indexOf("*/",this.pos+=2);if(n===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=n+2,this.options.locations)for(var i=void 0,r=e;(i=SN(this.input,r,this.pos))>-1;)++this.curLine,r=this.lineStart=i;this.options.onComment&&this.options.onComment(!0,this.input.slice(e+2,n),e,this.pos,t,this.curPosition())};_t.skipLineComment=function(t){for(var e=this.pos,n=this.options.onComment&&this.curPosition(),i=this.input.charCodeAt(this.pos+=t);this.pos<this.input.length&&!sf(i);)i=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(e+t,this.pos),e,this.pos,n,this.curPosition())};_t.skipSpace=function(){e:for(;this.pos<this.input.length;){var t=this.input.charCodeAt(this.pos);switch(t){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(t>8&&t<14||t>=5760&&_N.test(String.fromCharCode(t)))++this.pos;else break e}}};_t.finishToken=function(t,e){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=t,this.value=e,this.updateContext(n)};_t.readToken_dot=function(){var t=this.input.charCodeAt(this.pos+1);if(t>=48&&t<=57)return this.readNumber(!0);var e=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&t===46&&e===46?(this.pos+=3,this.finishToken(N.ellipsis)):(++this.pos,this.finishToken(N.dot))};_t.readToken_slash=function(){var t=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):t===61?this.finishOp(N.assign,2):this.finishOp(N.slash,1)};_t.readToken_mult_modulo_exp=function(t){var e=this.input.charCodeAt(this.pos+1),n=1,i=t===42?N.star:N.modulo;return this.options.ecmaVersion>=7&&t===42&&e===42&&(++n,i=N.starstar,e=this.input.charCodeAt(this.pos+2)),e===61?this.finishOp(N.assign,n+1):this.finishOp(i,n)};_t.readToken_pipe_amp=function(t){var e=this.input.charCodeAt(this.pos+1);if(e===t){if(this.options.ecmaVersion>=12){var n=this.input.charCodeAt(this.pos+2);if(n===61)return this.finishOp(N.assign,3)}return this.finishOp(t===124?N.logicalOR:N.logicalAND,2)}return e===61?this.finishOp(N.assign,2):this.finishOp(t===124?N.bitwiseOR:N.bitwiseAND,1)};_t.readToken_caret=function(){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(N.assign,2):this.finishOp(N.bitwiseXOR,1)};_t.readToken_plus_min=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?e===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||fr.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(N.incDec,2):e===61?this.finishOp(N.assign,2):this.finishOp(N.plusMin,1)};_t.readToken_lt_gt=function(t){var e=this.input.charCodeAt(this.pos+1),n=1;return e===t?(n=t===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+n)===61?this.finishOp(N.assign,n+1):this.finishOp(N.bitShift,n)):e===33&&t===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(e===61&&(n=2),this.finishOp(N.relational,n))};_t.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(N.equality,this.input.charCodeAt(this.pos+2)===61?3:2):t===61&&e===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(N.arrow)):this.finishOp(t===61?N.eq:N.prefix,1)};_t.readToken_question=function(){var t=this.options.ecmaVersion;if(t>=11){var e=this.input.charCodeAt(this.pos+1);if(e===46){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(N.questionDot,2)}if(e===63){if(t>=12){var i=this.input.charCodeAt(this.pos+2);if(i===61)return this.finishOp(N.assign,3)}return this.finishOp(N.coalesce,2)}}return this.finishOp(N.question,1)};_t.readToken_numberSign=function(){var t=this.options.ecmaVersion,e=35;if(t>=13&&(++this.pos,e=this.fullCharCodeAtPos(),xo(e,!0)||e===92))return this.finishToken(N.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+aa(e)+"'")};_t.getTokenFromCode=function(t){switch(t){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(N.parenL);case 41:return++this.pos,this.finishToken(N.parenR);case 59:return++this.pos,this.finishToken(N.semi);case 44:return++this.pos,this.finishToken(N.comma);case 91:return++this.pos,this.finishToken(N.bracketL);case 93:return++this.pos,this.finishToken(N.bracketR);case 123:return++this.pos,this.finishToken(N.braceL);case 125:return++this.pos,this.finishToken(N.braceR);case 58:return++this.pos,this.finishToken(N.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(N.backQuote);case 48:var e=this.input.charCodeAt(this.pos+1);if(e===120||e===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(e===111||e===79)return this.readRadixNumber(8);if(e===98||e===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(t);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(t);case 124:case 38:return this.readToken_pipe_amp(t);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(t);case 60:case 62:return this.readToken_lt_gt(t);case 61:case 33:return this.readToken_eq_excl(t);case 63:return this.readToken_question();case 126:return this.finishOp(N.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+aa(t)+"'")};_t.finishOp=function(t,e){var n=this.input.slice(this.pos,this.pos+e);return this.pos+=e,this.finishToken(t,n)};_t.readRegexp=function(){for(var t,e,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var i=this.input.charAt(this.pos);if(fr.test(i)&&this.raise(n,"Unterminated regular expression"),t)t=!1;else{if(i==="[")e=!0;else if(i==="]"&&e)e=!1;else if(i==="/"&&!e)break;t=i==="\\"}++this.pos}var r=this.input.slice(n,this.pos);++this.pos;var s=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(s);var a=this.regexpState||(this.regexpState=new Co(this));a.reset(n,r,o),this.validateRegExpFlags(a),this.validateRegExpPattern(a);var l=null;try{l=new RegExp(r,o)}catch{}return this.finishToken(N.regexp,{pattern:r,flags:o,value:l})};_t.readInt=function(t,e,n){for(var i=this.options.ecmaVersion>=12&&e===void 0,r=n&&this.input.charCodeAt(this.pos)===48,s=this.pos,o=0,a=0,l=0,u=e??1/0;l<u;++l,++this.pos){var c=this.input.charCodeAt(this.pos),h=void 0;if(i&&c===95){r&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),a===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),l===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),a=c;continue}if(c>=97?h=c-97+10:c>=65?h=c-65+10:c>=48&&c<=57?h=c-48:h=1/0,h>=t)break;a=c,o=o*t+h}return i&&a===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===s||e!=null&&this.pos-s!==e?null:o};function ure(t,e){return e?parseInt(t,8):parseFloat(t.replace(/_/g,""))}function eL(t){return typeof BigInt!="function"?null:BigInt(t.replace(/_/g,""))}_t.readRadixNumber=function(t){var e=this.pos;this.pos+=2;var n=this.readInt(t);return n==null&&this.raise(this.start+2,"Expected number in radix "+t),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(n=eL(this.input.slice(e,this.pos)),++this.pos):xo(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(N.num,n)};_t.readNumber=function(t){var e=this.pos;!t&&this.readInt(10,void 0,!0)===null&&this.raise(e,"Invalid number");var n=this.pos-e>=2&&this.input.charCodeAt(e)===48;n&&this.strict&&this.raise(e,"Invalid number");var i=this.input.charCodeAt(this.pos);if(!n&&!t&&this.options.ecmaVersion>=11&&i===110){var r=eL(this.input.slice(e,this.pos));return++this.pos,xo(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(N.num,r)}n&&/[89]/.test(this.input.slice(e,this.pos))&&(n=!1),i===46&&!n&&(++this.pos,this.readInt(10),i=this.input.charCodeAt(this.pos)),(i===69||i===101)&&!n&&(i=this.input.charCodeAt(++this.pos),(i===43||i===45)&&++this.pos,this.readInt(10)===null&&this.raise(e,"Invalid number")),xo(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var s=ure(this.input.slice(e,this.pos),n);return this.finishToken(N.num,s)};_t.readCodePoint=function(){var t=this.input.charCodeAt(this.pos),e;if(t===123){this.options.ecmaVersion<6&&this.unexpected();var n=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(n,"Code point out of bounds")}else e=this.readHexChar(4);return e};_t.readString=function(t){for(var e="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var i=this.input.charCodeAt(this.pos);if(i===t)break;i===92?(e+=this.input.slice(n,this.pos),e+=this.readEscapedChar(!1),n=this.pos):i===8232||i===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(sf(i)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return e+=this.input.slice(n,this.pos++),this.finishToken(N.string,e)};var tL={};_t.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(t){if(t===tL)this.readInvalidTemplateToken();else throw t}this.inTemplateElement=!1};_t.invalidStringToken=function(t,e){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw tL;this.raise(t,e)};_t.readTmplToken=function(){for(var t="",e=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(n===96||n===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===N.template||this.type===N.invalidTemplate)?n===36?(this.pos+=2,this.finishToken(N.dollarBraceL)):(++this.pos,this.finishToken(N.backQuote)):(t+=this.input.slice(e,this.pos),this.finishToken(N.template,t));if(n===92)t+=this.input.slice(e,this.pos),t+=this.readEscapedChar(!0),e=this.pos;else if(sf(n)){switch(t+=this.input.slice(e,this.pos),++this.pos,n){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:t+=`
|
|
103
|
+
`;break;default:t+=String.fromCharCode(n);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),e=this.pos}else++this.pos}};_t.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(N.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
|
|
104
|
+
`&&++this.pos;case`
|
|
105
|
+
`:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};_t.readEscapedChar=function(t){var e=this.input.charCodeAt(++this.pos);switch(++this.pos,e){case 110:return`
|
|
106
|
+
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return aa(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),t){var n=this.pos-1;this.invalidStringToken(n,"Invalid escape sequence in template string")}default:if(e>=48&&e<=55){var i=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(i,8);return r>255&&(i=i.slice(0,-1),r=parseInt(i,8)),this.pos+=i.length-1,e=this.input.charCodeAt(this.pos),(i!=="0"||e===56||e===57)&&(this.strict||t)&&this.invalidStringToken(this.pos-1-i.length,t?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return sf(e)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(e)}};_t.readHexChar=function(t){var e=this.pos,n=this.readInt(16,t);return n===null&&this.invalidStringToken(e,"Bad character escape sequence"),n};_t.readWord1=function(){this.containsEsc=!1;for(var t="",e=!0,n=this.pos,i=this.options.ecmaVersion>=6;this.pos<this.input.length;){var r=this.fullCharCodeAtPos();if(ul(r,i))this.pos+=r<=65535?1:2;else if(r===92){this.containsEsc=!0,t+=this.input.slice(n,this.pos);var s=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var o=this.readCodePoint();(e?xo:ul)(o,i)||this.invalidStringToken(s,"Invalid Unicode escape"),t+=aa(o),n=this.pos}else break;e=!1}return t+this.input.slice(n,this.pos)};_t.readWord=function(){var t=this.readWord1(),e=N.name;return this.keywords.test(t)&&(e=G2[t]),this.finishToken(e,t)};var cre="8.18.0";Kn.acorn={Parser:Kn,version:cre,defaultOptions:GS,Position:Jd,SourceLocation:px,getLineInfo:wN,Node:xx,TokenType:Nt,tokTypes:N,keywordTypes:G2,TokContext:ys,tokContexts:_n,isIdentifierChar:ul,isIdentifierStart:xo,Token:ik,isNewLine:sf,lineBreak:fr,lineBreakG:Iie,nonASCIIwhitespace:_N};var Ov={exports:{}},xv,x3;function hre(){return x3||(x3=1,xv={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),xv}var Zf={exports:{}},fre=Zf.exports,y3;function v3(){return y3||(y3=1,(function(t,e){(function(n,i){i(e)})(fre,(function(n){var i=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],r=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],s="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ--ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",o="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ--ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",a={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},l="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",u={5:l,"5module":l+" export import",6:l+" const class extends export import super"},c=/^in(stanceof)?$/,h=new RegExp("["+o+"]"),f=new RegExp("["+o+s+"]");function p(d,v){for(var T=65536,I=0;I<v.length;I+=2){if(T+=v[I],T>d)return!1;if(T+=v[I+1],T>=d)return!0}return!1}function m(d,v){return d<65?d===36:d<91?!0:d<97?d===95:d<123?!0:d<=65535?d>=170&&h.test(String.fromCharCode(d)):v===!1?!1:p(d,r)}function g(d,v){return d<48?d===36:d<58?!0:d<65?!1:d<91?!0:d<97?d===95:d<123?!0:d<=65535?d>=170&&f.test(String.fromCharCode(d)):v===!1?!1:p(d,r)||p(d,i)}var x=function(v,T){T===void 0&&(T={}),this.label=v,this.keyword=T.keyword,this.beforeExpr=!!T.beforeExpr,this.startsExpr=!!T.startsExpr,this.isLoop=!!T.isLoop,this.isAssign=!!T.isAssign,this.prefix=!!T.prefix,this.postfix=!!T.postfix,this.binop=T.binop||null,this.updateContext=null};function y(d,v){return new x(d,{beforeExpr:!0,binop:v})}var S={beforeExpr:!0},_={startsExpr:!0},k={};function w(d,v){return v===void 0&&(v={}),v.keyword=d,k[d]=new x(d,v)}var b={num:new x("num",_),regexp:new x("regexp",_),string:new x("string",_),name:new x("name",_),privateId:new x("privateId",_),eof:new x("eof"),bracketL:new x("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new x("]"),braceL:new x("{",{beforeExpr:!0,startsExpr:!0}),braceR:new x("}"),parenL:new x("(",{beforeExpr:!0,startsExpr:!0}),parenR:new x(")"),comma:new x(",",S),semi:new x(";",S),colon:new x(":",S),dot:new x("."),question:new x("?",S),questionDot:new x("?."),arrow:new x("=>",S),template:new x("template"),invalidTemplate:new x("invalidTemplate"),ellipsis:new x("...",S),backQuote:new x("`",_),dollarBraceL:new x("${",{beforeExpr:!0,startsExpr:!0}),eq:new x("=",{beforeExpr:!0,isAssign:!0}),assign:new x("_=",{beforeExpr:!0,isAssign:!0}),incDec:new x("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new x("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:y("||",1),logicalAND:y("&&",2),bitwiseOR:y("|",3),bitwiseXOR:y("^",4),bitwiseAND:y("&",5),equality:y("==/!=/===/!==",6),relational:y("</>/<=/>=",7),bitShift:y("<</>>/>>>",8),plusMin:new x("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:y("%",10),star:y("*",10),slash:y("/",10),starstar:new x("**",{beforeExpr:!0}),coalesce:y("??",1),_break:w("break"),_case:w("case",S),_catch:w("catch"),_continue:w("continue"),_debugger:w("debugger"),_default:w("default",S),_do:w("do",{isLoop:!0,beforeExpr:!0}),_else:w("else",S),_finally:w("finally"),_for:w("for",{isLoop:!0}),_function:w("function",_),_if:w("if"),_return:w("return",S),_switch:w("switch"),_throw:w("throw",S),_try:w("try"),_var:w("var"),_const:w("const"),_while:w("while",{isLoop:!0}),_with:w("with"),_new:w("new",{beforeExpr:!0,startsExpr:!0}),_this:w("this",_),_super:w("super",_),_class:w("class",_),_extends:w("extends",S),_export:w("export"),_import:w("import",_),_null:w("null",_),_true:w("true",_),_false:w("false",_),_in:w("in",{beforeExpr:!0,binop:7}),_instanceof:w("instanceof",{beforeExpr:!0,binop:7}),_typeof:w("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:w("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:w("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},E=/\r\n?|\n|\u2028|\u2029/,P=new RegExp(E.source,"g");function $(d){return d===10||d===13||d===8232||d===8233}function B(d,v,T){T===void 0&&(T=d.length);for(var I=v;I<T;I++){var V=d.charCodeAt(I);if($(V))return I<T-1&&V===13&&d.charCodeAt(I+1)===10?I+2:I+1}return-1}var X=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,j=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Z=Object.prototype,G=Z.hasOwnProperty,z=Z.toString,J=Object.hasOwn||(function(d,v){return G.call(d,v)}),ue=Array.isArray||(function(d){return z.call(d)==="[object Array]"}),Le=Object.create(null);function ye(d){return Le[d]||(Le[d]=new RegExp("^(?:"+d.replace(/ /g,"|")+")$"))}function xe(d){return d<=65535?String.fromCharCode(d):(d-=65536,String.fromCharCode((d>>10)+55296,(d&1023)+56320))}var Re=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Ae=function(v,T){this.line=v,this.column=T};Ae.prototype.offset=function(v){return new Ae(this.line,this.column+v)};var Be=function(v,T,I){this.start=T,this.end=I,v.sourceFile!==null&&(this.source=v.sourceFile)};function lt(d,v){for(var T=1,I=0;;){var V=B(d,I,v);if(V<0)return new Ae(T,v-I);++T,I=V}}var qe={ecmaVersion:null,sourceType:"script",strict:!1,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,startLocation:null,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},je=!1;function we(d){var v={};for(var T in qe)v[T]=d&&J(d,T)?d[T]:qe[T];if(v.ecmaVersion==="latest"?v.ecmaVersion=1e8:v.ecmaVersion==null?(!je&&typeof console=="object"&&console.warn&&(je=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
107
|
+
Defaulting to 2020, but this will stop working in the future.`)),v.ecmaVersion=11):v.ecmaVersion>=2015&&(v.ecmaVersion-=2009),v.allowReserved==null&&(v.allowReserved=v.ecmaVersion<5),(!d||d.allowHashBang==null)&&(v.allowHashBang=v.ecmaVersion>=14),ue(v.onToken)){var I=v.onToken;v.onToken=function(V){return I.push(V)}}if(ue(v.onComment)&&(v.onComment=pe(v,v.onComment)),v.sourceType==="commonjs"&&v.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return v}function pe(d,v){return function(T,I,V,ee,ne,ve){var $e={type:T?"Block":"Line",value:I,start:V,end:ee};d.locations&&($e.loc=new Be(this,ne,ve)),d.ranges&&($e.range=[V,ee]),v.push($e)}}var ge=1,Ve=2,Ze=4,Ge=8,et=16,Qt=32,wt=64,Ut=128,xt=256,dn=512,En=1024,Tn=ge|Ve|xt;function pn(d,v){return Ve|(d?Ze:0)|(v?Ge:0)}var An=0,vn=1,ft=2,$n=3,Di=4,Mt=5,O=function(v,T,I){this.options=v=we(v),this.sourceFile=v.sourceFile,this.keywords=ye(u[v.ecmaVersion>=6?6:v.sourceType==="module"?"5module":5]);var V="";v.allowReserved!==!0&&(V=a[v.ecmaVersion>=6?6:v.ecmaVersion===5?5:3],v.sourceType==="module"&&(V+=" await")),this.reservedWords=ye(V);var ee=(V?V+" ":"")+a.strict;this.reservedWordsStrict=ye(ee),this.reservedWordsStrictBind=ye(ee+" "+a.strictBind),this.input=String(T),this.containsEsc=!1,this.pos=I||0,this.curLine=1,v.startLocation?(this.lineStart=this.pos-v.startLocation.column,this.curLine=v.startLocation.line):I?(this.lineStart=this.input.lastIndexOf(`
|
|
108
|
+
`,I-1)+1,this.options.locations&&(this.curLine=this.input.slice(0,this.lineStart).split(E).length)):this.lineStart=0,this.type=b.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=v.sourceType==="module",this.strict=this.inModule||v.strict===!0||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&v.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?Ve:ge),this.regexpState=null,this.privateNameStack=[]},U={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};O.prototype.parse=function(){var v=this,T=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return v.parseTopLevel(T)})},U.inFunction.get=function(){return(this.currentVarScope().flags&Ve)>0},U.inGenerator.get=function(){return(this.currentVarScope().flags&Ge)>0},U.inAsync.get=function(){return(this.currentVarScope().flags&Ze)>0},U.canAwait.get=function(){for(var d=this.scopeStack.length-1;d>=0;d--){var v=this.scopeStack[d],T=v.flags;if(T&(xt|dn))return!1;if(T&Ve)return(T&Ze)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},U.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&ge)},U.allowSuper.get=function(){var d=this.currentThisScope(),v=d.flags;return(v&wt)>0||this.options.allowSuperOutsideMethod},U.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Ut)>0},U.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},U.allowNewDotTarget.get=function(){for(var d=this.scopeStack.length-1;d>=0;d--){var v=this.scopeStack[d],T=v.flags;if(T&(xt|dn)||T&Ve&&!(T&et))return!0}return!1},U.allowUsing.get=function(){var d=this.currentScope(),v=d.flags;return!(v&En||!this.inModule&&v&ge)},U.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&xt)>0},O.extend=function(){for(var v=[],T=arguments.length;T--;)v[T]=arguments[T];for(var I=this,V=0;V<v.length;V++)I=v[V](I);return I},O.parse=function(v,T){return new this(T,v).parse()},O.parseExpressionAt=function(v,T,I){var V=new this(I,v,T);return V.nextToken(),V.parseExpression()},O.tokenizer=function(v,T){return new this(T,v)},Object.defineProperties(O.prototype,U);var ie=O.prototype,M=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;ie.strictDirective=function(d){if(this.options.ecmaVersion<5)return!1;for(;;){j.lastIndex=d,d+=j.exec(this.input)[0].length;var v=M.exec(this.input.slice(d));if(!v)return!1;if((v[1]||v[2])==="use strict"){j.lastIndex=d+v[0].length;var T=j.exec(this.input),I=T.index+T[0].length,V=this.input.charAt(I);return V===";"||V==="}"||E.test(T[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(V)||V==="!"&&this.input.charAt(I+1)==="=")}d+=v[0].length,j.lastIndex=d,d+=j.exec(this.input)[0].length,this.input[d]===";"&&d++}},ie.eat=function(d){return this.type===d?(this.next(),!0):!1},ie.isContextual=function(d){return this.type===b.name&&this.value===d&&!this.containsEsc},ie.eatContextual=function(d){return this.isContextual(d)?(this.next(),!0):!1},ie.catchStackOverflow=function(d){try{return d()}catch(v){if(v instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(v.message)||/\btoo much recursion\b/i.test(v.message)))this.raise(this.start,"Not enough stack space to parse input");else throw v}},ie.expectContextual=function(d){this.eatContextual(d)||this.unexpected()},ie.canInsertSemicolon=function(){return this.type===b.eof||this.type===b.braceR||E.test(this.input.slice(this.lastTokEnd,this.start))},ie.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},ie.semicolon=function(){!this.eat(b.semi)&&!this.insertSemicolon()&&this.unexpected()},ie.afterTrailingComma=function(d,v){if(this.type===d)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),v||this.next(),!0},ie.expect=function(d){this.eat(d)||this.unexpected()},ie.unexpected=function(d){this.raise(d??this.start,"Unexpected token")};var D=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};ie.checkPatternErrors=function(d,v){if(d){d.trailingComma>-1&&this.raiseRecoverable(d.trailingComma,"Comma is not permitted after the rest element");var T=v?d.parenthesizedAssign:d.parenthesizedBind;T>-1&&this.raiseRecoverable(T,v?"Assigning to rvalue":"Parenthesized pattern")}},ie.checkExpressionErrors=function(d,v){if(!d)return!1;var T=d.shorthandAssign,I=d.doubleProto;if(!v)return T>=0||I>=0;T>=0&&this.raise(T,"Shorthand property assignments are valid only in destructuring patterns"),I>=0&&this.raiseRecoverable(I,"Redefinition of __proto__ property")},ie.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},ie.isSimpleAssignTarget=function(d){return d.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(d.expression):d.type==="Identifier"||d.type==="MemberExpression"};var L=O.prototype;L.parseTopLevel=function(d){var v=Object.create(null);for(d.body||(d.body=[]);this.type!==b.eof;){var T=this.parseStatement(null,!0,v);d.body.push(T)}if(this.inModule)for(var I=0,V=Object.keys(this.undefinedExports);I<V.length;I+=1){var ee=V[I];this.raiseRecoverable(this.undefinedExports[ee].start,"Export '"+ee+"' is not defined")}return this.adaptDirectivePrologue(d.body),this.next(),d.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(d,"Program")};var A={kind:"loop"},F={kind:"switch"};L.isLet=function(d){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;j.lastIndex=this.pos;var v=j.exec(this.input),T=this.pos+v[0].length,I=this.fullCharCodeAt(T);if(I===91||I===92)return!0;if(d)return!1;if(I===123)return!0;if(m(I)){var V=T;do T+=I<=65535?1:2;while(g(I=this.fullCharCodeAt(T)));if(I===92)return!0;var ee=this.input.slice(V,T);if(!c.test(ee))return!0}return!1},L.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;j.lastIndex=this.pos;var d=j.exec(this.input),v=this.pos+d[0].length,T;return!E.test(this.input.slice(this.pos,v))&&this.input.slice(v,v+8)==="function"&&(v+8===this.input.length||!(g(T=this.fullCharCodeAt(v+8))||T===92))},L.isUsingKeyword=function(d,v){if(this.options.ecmaVersion<17||!this.isContextual(d?"await":"using"))return!1;j.lastIndex=this.pos;var T=j.exec(this.input),I=this.pos+T[0].length;if(E.test(this.input.slice(this.pos,I)))return!1;if(d){var V=I+5,ee;if(this.input.slice(I,V)!=="using"||V===this.input.length||g(ee=this.fullCharCodeAt(V))||ee===92)return!1;j.lastIndex=V;var ne=j.exec(this.input);if(I=V+ne[0].length,ne&&E.test(this.input.slice(V,I)))return!1}var ve=this.fullCharCodeAt(I);if(!m(ve)&&ve!==92)return!1;var $e=I;do I+=ve<=65535?1:2;while(g(ve=this.fullCharCodeAt(I)));if(ve===92)return!0;var rt=this.input.slice($e,I);if(c.test(rt))return!1;if(v&&!d&&rt==="of"){j.lastIndex=I;var dt=j.exec(this.input);if(I=I+dt[0].length,this.input.charCodeAt(I)!==61||(ve=this.input.charCodeAt(I+1))===61||ve===62)return!1}return!0},L.isAwaitUsing=function(d){return this.isUsingKeyword(!0,d)},L.isUsing=function(d){return this.isUsingKeyword(!1,d)},L.parseStatement=function(d,v,T){var I=this.type,V=this.startNode(),ee;switch(this.isLet(d)&&(I=b._var,ee="let"),I){case b._break:case b._continue:return this.parseBreakContinueStatement(V,I.keyword);case b._debugger:return this.parseDebuggerStatement(V);case b._do:return this.parseDoStatement(V);case b._for:return this.parseForStatement(V);case b._function:return d&&(this.strict||d!=="if"&&d!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(V,!1,!d);case b._class:return d&&this.unexpected(),this.parseClass(V,!0);case b._if:return this.parseIfStatement(V);case b._return:return this.parseReturnStatement(V);case b._switch:return this.parseSwitchStatement(V);case b._throw:return this.parseThrowStatement(V);case b._try:return this.parseTryStatement(V);case b._const:case b._var:return ee=ee||this.value,d&&ee!=="var"&&this.unexpected(),this.parseVarStatement(V,ee);case b._while:return this.parseWhileStatement(V);case b._with:return this.parseWithStatement(V);case b.braceL:return this.parseBlock(!0,V);case b.semi:return this.parseEmptyStatement(V);case b._export:case b._import:if(this.options.ecmaVersion>10&&I===b._import){j.lastIndex=this.pos;var ne=j.exec(this.input),ve=this.pos+ne[0].length,$e=this.input.charCodeAt(ve);if($e===40||$e===46)return this.parseExpressionStatement(V,this.parseExpression())}return this.options.allowImportExportEverywhere||(v||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),I===b._import?this.parseImport(V):this.parseExport(V,T);default:if(this.isAsyncFunction())return d&&this.unexpected(),this.next(),this.parseFunctionStatement(V,!0,!d);var rt=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(rt)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),d&&this.raise(this.start,"Using declaration is not allowed in single-statement positions"),rt==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(V,!1,rt),this.semicolon(),this.finishNode(V,"VariableDeclaration");var dt=this.value,bn=this.parseExpression();return I===b.name&&bn.type==="Identifier"&&this.eat(b.colon)?this.parseLabeledStatement(V,dt,bn,d):this.parseExpressionStatement(V,bn)}},L.parseBreakContinueStatement=function(d,v){var T=v==="break";this.next(),this.eat(b.semi)||this.insertSemicolon()?d.label=null:this.type!==b.name?this.unexpected():(d.label=this.parseIdent(),this.semicolon());for(var I=0;I<this.labels.length;++I){var V=this.labels[I];if((d.label==null||V.name===d.label.name)&&(V.kind!=null&&(T||V.kind==="loop")||d.label&&T))break}return I===this.labels.length&&this.raise(d.start,"Unsyntactic "+v),this.finishNode(d,T?"BreakStatement":"ContinueStatement")},L.parseDebuggerStatement=function(d){return this.next(),this.semicolon(),this.finishNode(d,"DebuggerStatement")},L.parseDoStatement=function(d){return this.next(),this.labels.push(A),d.body=this.parseStatement("do"),this.labels.pop(),this.expect(b._while),d.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(b.semi):this.semicolon(),this.finishNode(d,"DoWhileStatement")},L.parseForStatement=function(d){this.next();var v=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(A),this.enterScope(0),this.expect(b.parenL),this.type===b.semi)return v>-1&&this.unexpected(v),this.parseFor(d,null);var T=this.isLet();if(this.type===b._var||this.type===b._const||T){var I=this.startNode(),V=T?"let":this.value;return this.next(),this.parseVar(I,!0,V),this.finishNode(I,"VariableDeclaration"),this.parseForAfterInit(d,I,v)}var ee=this.isContextual("let"),ne=!1,ve=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(ve){var $e=this.startNode();return this.next(),ve==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar($e,!0,ve),this.finishNode($e,"VariableDeclaration"),this.parseForAfterInit(d,$e,v)}var rt=this.containsEsc,dt=new D,bn=this.start,Ci=v>-1?this.parseExprSubscripts(dt,"await"):this.parseExpression(!0,dt);return this.type===b._in||(ne=this.options.ecmaVersion>=6&&this.isContextual("of"))?(v>-1?(this.type===b._in&&this.unexpected(v),d.await=!0):ne&&this.options.ecmaVersion>=8&&(Ci.start===bn&&!rt&&Ci.type==="Identifier"&&Ci.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(d.await=!1)),ee&&ne&&this.raise(Ci.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(Ci,!1,dt),this.checkLValPattern(Ci),this.parseForIn(d,Ci)):(this.checkExpressionErrors(dt,!0),v>-1&&this.unexpected(v),this.parseFor(d,Ci))},L.parseForAfterInit=function(d,v,T){return(this.type===b._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&v.declarations.length===1?(this.type===b._in?((v.kind==="using"||v.kind==="await using")&&!v.declarations[0].init&&this.raise(this.start,"Using declaration is not allowed in for-in loops"),this.options.ecmaVersion>=9&&T>-1&&this.unexpected(T)):this.options.ecmaVersion>=9&&(d.await=T>-1),this.parseForIn(d,v)):(T>-1&&this.unexpected(T),this.parseFor(d,v))},L.parseFunctionStatement=function(d,v,T){return this.next(),this.parseFunction(d,H|(T?0:q),!1,v)},L.parseIfStatement=function(d){return this.next(),d.test=this.parseParenExpression(),d.consequent=this.parseStatement("if"),d.alternate=this.eat(b._else)?this.parseStatement("if"):null,this.finishNode(d,"IfStatement")},L.parseReturnStatement=function(d){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(b.semi)||this.insertSemicolon()?d.argument=null:(d.argument=this.parseExpression(),this.semicolon()),this.finishNode(d,"ReturnStatement")},L.parseSwitchStatement=function(d){this.next(),d.discriminant=this.parseParenExpression(),d.cases=[],this.expect(b.braceL),this.labels.push(F),this.enterScope(En);for(var v,T=!1;this.type!==b.braceR;)if(this.type===b._case||this.type===b._default){var I=this.type===b._case;v&&this.finishNode(v,"SwitchCase"),d.cases.push(v=this.startNode()),v.consequent=[],this.next(),I?v.test=this.parseExpression():(T&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),T=!0,v.test=null),this.expect(b.colon)}else v||this.unexpected(),v.consequent.push(this.parseStatement(null));return this.exitScope(),v&&this.finishNode(v,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(d,"SwitchStatement")},L.parseThrowStatement=function(d){return this.next(),E.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),d.argument=this.parseExpression(),this.semicolon(),this.finishNode(d,"ThrowStatement")};var K=[];L.parseCatchClauseParam=function(){var d=this.parseBindingAtom(),v=d.type==="Identifier";return this.enterScope(v?Qt:0),this.checkLValPattern(d,v?Di:ft),this.expect(b.parenR),d},L.parseTryStatement=function(d){if(this.next(),d.block=this.parseBlock(),d.handler=null,this.type===b._catch){var v=this.startNode();this.next(),this.eat(b.parenL)?v.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),v.param=null,this.enterScope(0)),v.body=this.parseBlock(!1),this.exitScope(),d.handler=this.finishNode(v,"CatchClause")}return d.finalizer=this.eat(b._finally)?this.parseBlock():null,!d.handler&&!d.finalizer&&this.raise(d.start,"Missing catch or finally clause"),this.finishNode(d,"TryStatement")},L.parseVarStatement=function(d,v,T){return this.next(),this.parseVar(d,!1,v,T),this.semicolon(),this.finishNode(d,"VariableDeclaration")},L.parseWhileStatement=function(d){return this.next(),d.test=this.parseParenExpression(),this.labels.push(A),d.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(d,"WhileStatement")},L.parseWithStatement=function(d){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),d.object=this.parseParenExpression(),d.body=this.parseStatement("with"),this.finishNode(d,"WithStatement")},L.parseEmptyStatement=function(d){return this.next(),this.finishNode(d,"EmptyStatement")},L.parseLabeledStatement=function(d,v,T,I){for(var V=0,ee=this.labels;V<ee.length;V+=1){var ne=ee[V];ne.name===v&&this.raise(T.start,"Label '"+v+"' is already declared")}for(var ve=this.type.isLoop?"loop":this.type===b._switch?"switch":null,$e=this.labels.length-1;$e>=0;$e--){var rt=this.labels[$e];if(rt.statementStart===d.start)rt.statementStart=this.start,rt.kind=ve;else break}return this.labels.push({name:v,kind:ve,statementStart:this.start}),d.body=this.parseStatement(I?I.indexOf("label")===-1?I+"label":I:"label"),this.labels.pop(),d.label=T,this.finishNode(d,"LabeledStatement")},L.parseExpressionStatement=function(d,v){return d.expression=v,this.semicolon(),this.finishNode(d,"ExpressionStatement")},L.parseBlock=function(d,v,T){for(d===void 0&&(d=!0),v===void 0&&(v=this.startNode()),v.body=[],this.expect(b.braceL),d&&this.enterScope(0);this.type!==b.braceR;){var I=this.parseStatement(null);v.body.push(I)}return T&&(this.strict=!1),this.next(),d&&this.exitScope(),this.finishNode(v,"BlockStatement")},L.parseFor=function(d,v){return d.init=v,this.expect(b.semi),d.test=this.type===b.semi?null:this.parseExpression(),this.expect(b.semi),d.update=this.type===b.parenR?null:this.parseExpression(),this.expect(b.parenR),d.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(d,"ForStatement")},L.parseForIn=function(d,v){var T=this.type===b._in;return this.next(),v.type==="VariableDeclaration"&&v.declarations[0].init!=null&&(!T||this.options.ecmaVersion<8||this.strict||v.kind!=="var"||v.declarations[0].id.type!=="Identifier")&&this.raise(v.start,(T?"for-in":"for-of")+" loop variable declaration may not have an initializer"),d.left=v,d.right=T?this.parseExpression():this.parseMaybeAssign(),this.expect(b.parenR),d.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(d,T?"ForInStatement":"ForOfStatement")},L.parseVar=function(d,v,T,I){for(d.declarations=[],d.kind=T;;){var V=this.startNode();if(this.parseVarId(V,T),this.eat(b.eq)?V.init=this.parseMaybeAssign(v):!I&&T==="const"&&!(this.type===b._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!I&&(T==="using"||T==="await using")&&this.options.ecmaVersion>=17&&this.type!==b._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+T+" declaration"):!I&&V.id.type!=="Identifier"&&!(v&&(this.type===b._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):V.init=null,d.declarations.push(this.finishNode(V,"VariableDeclarator")),!this.eat(b.comma))break}return d},L.parseVarId=function(d,v){d.id=v==="using"||v==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(d.id,v==="var"?vn:ft,!1)};var H=1,q=2,re=4;L.parseFunction=function(d,v,T,I,V){this.initFunction(d),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!I)&&(this.type===b.star&&v&q&&this.unexpected(),d.generator=this.eat(b.star)),this.options.ecmaVersion>=8&&(d.async=!!I),v&H&&(d.id=v&re&&this.type!==b.name?null:this.parseIdent(),d.id&&!(v&q)&&this.checkLValSimple(d.id,this.strict||d.generator||d.async?this.treatFunctionsAsVar?vn:ft:$n));var ee=this.yieldPos,ne=this.awaitPos,ve=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(pn(d.async,d.generator)),v&H||(d.id=this.type===b.name?this.parseIdent():null),this.parseFunctionParams(d),this.parseFunctionBody(d,T,!1,V),this.yieldPos=ee,this.awaitPos=ne,this.awaitIdentPos=ve,this.finishNode(d,v&H?"FunctionDeclaration":"FunctionExpression")},L.parseFunctionParams=function(d){this.expect(b.parenL),d.params=this.parseBindingList(b.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},L.parseClass=function(d,v){this.next();var T=this.strict;this.strict=!0,this.parseClassId(d,v),this.parseClassSuper(d);var I=this.enterClassBody(),V=this.startNode(),ee=!1;for(V.body=[],this.expect(b.braceL);this.type!==b.braceR;){var ne=this.parseClassElement(d.superClass!==null);ne&&(V.body.push(ne),ne.type==="MethodDefinition"&&ne.kind==="constructor"?(ee&&this.raiseRecoverable(ne.start,"Duplicate constructor in the same class"),ee=!0):ne.key&&ne.key.type==="PrivateIdentifier"&&he(I,ne)&&this.raiseRecoverable(ne.key.start,"Identifier '#"+ne.key.name+"' has already been declared"))}return this.strict=T,this.next(),d.body=this.finishNode(V,"ClassBody"),this.exitClassBody(),this.finishNode(d,v?"ClassDeclaration":"ClassExpression")},L.parseClassElement=function(d){if(this.eat(b.semi))return null;var v=this.options.ecmaVersion,T=this.startNode(),I="",V=!1,ee=!1,ne="method",ve=!1;if(this.eatContextual("static")){if(v>=13&&this.eat(b.braceL))return this.parseClassStaticBlock(T),T;this.isClassElementNameStart()||this.type===b.star?ve=!0:I="static"}if(T.static=ve,!I&&v>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===b.star)&&!this.canInsertSemicolon()?ee=!0:I="async"),!I&&(v>=9||!ee)&&this.eat(b.star)&&(V=!0),!I&&!ee&&!V){var $e=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?ne=$e:I=$e)}if(I?(T.computed=!1,T.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),T.key.name=I,this.finishNode(T.key,"Identifier")):this.parseClassElementName(T),v<13||this.type===b.parenL||ne!=="method"||V||ee){var rt=!T.static&&_e(T,"constructor"),dt=rt&&d;rt&&ne!=="method"&&this.raise(T.key.start,"Constructor can't have get/set modifier"),T.kind=rt?"constructor":ne,this.parseClassMethod(T,V,ee,dt)}else this.parseClassField(T);return T},L.isClassElementNameStart=function(){return this.type===b.name||this.type===b.privateId||this.type===b.num||this.type===b.string||this.type===b.bracketL||this.type.keyword},L.parseClassElementName=function(d){this.type===b.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),d.computed=!1,d.key=this.parsePrivateIdent()):this.parsePropertyName(d)},L.parseClassMethod=function(d,v,T,I){var V=d.key;d.kind==="constructor"?(v&&this.raise(V.start,"Constructor can't be a generator"),T&&this.raise(V.start,"Constructor can't be an async method")):d.static&&_e(d,"prototype")&&this.raise(V.start,"Classes may not have a static property named prototype");var ee=d.value=this.parseMethod(v,T,I);return d.kind==="get"&&ee.params.length!==0&&this.raiseRecoverable(ee.start,"getter should have no params"),d.kind==="set"&&ee.params.length!==1&&this.raiseRecoverable(ee.start,"setter should have exactly one param"),d.kind==="set"&&ee.params[0].type==="RestElement"&&this.raiseRecoverable(ee.params[0].start,"Setter cannot use rest params"),this.finishNode(d,"MethodDefinition")},L.parseClassField=function(d){return _e(d,"constructor")?this.raise(d.key.start,"Classes can't have a field named 'constructor'"):d.static&&_e(d,"prototype")&&this.raise(d.key.start,"Classes can't have a static field named 'prototype'"),this.eat(b.eq)?(this.enterScope(dn|wt),d.value=this.parseMaybeAssign(),this.exitScope()):d.value=null,this.semicolon(),this.finishNode(d,"PropertyDefinition")},L.parseClassStaticBlock=function(d){d.body=[];var v=this.labels;for(this.labels=[],this.enterScope(xt|wt);this.type!==b.braceR;){var T=this.parseStatement(null);d.body.push(T)}return this.next(),this.exitScope(),this.labels=v,this.finishNode(d,"StaticBlock")},L.parseClassId=function(d,v){this.type===b.name?(d.id=this.parseIdent(),v&&this.checkLValSimple(d.id,ft,!1)):(v===!0&&this.unexpected(),d.id=null)},L.parseClassSuper=function(d){d.superClass=this.eat(b._extends)?this.parseExprSubscripts(null,!1):null},L.enterClassBody=function(){var d={declared:Object.create(null),used:[]};return this.privateNameStack.push(d),d.declared},L.exitClassBody=function(){var d=this.privateNameStack.pop(),v=d.declared,T=d.used;if(this.options.checkPrivateFields)for(var I=this.privateNameStack.length,V=I===0?null:this.privateNameStack[I-1],ee=0;ee<T.length;++ee){var ne=T[ee];J(v,ne.name)||(V?V.used.push(ne):this.raiseRecoverable(ne.start,"Private field '#"+ne.name+"' must be declared in an enclosing class"))}};function he(d,v){var T=v.key.name,I=d[T],V="true";return v.type==="MethodDefinition"&&(v.kind==="get"||v.kind==="set")&&(V=(v.static?"s":"i")+v.kind),I==="iget"&&V==="iset"||I==="iset"&&V==="iget"||I==="sget"&&V==="sset"||I==="sset"&&V==="sget"?(d[T]="true",!1):I?!0:(d[T]=V,!1)}function _e(d,v){var T=d.computed,I=d.key;return!T&&(I.type==="Identifier"&&I.name===v||I.type==="Literal"&&I.value===v)}L.parseExportAllDeclaration=function(d,v){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(d.exported=this.parseModuleExportName(),this.checkExport(v,d.exported,this.lastTokStart)):d.exported=null),this.expectContextual("from"),this.type!==b.string&&this.unexpected(),d.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(d.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(d,"ExportAllDeclaration")},L.parseExport=function(d,v){if(this.next(),this.eat(b.star))return this.parseExportAllDeclaration(d,v);if(this.eat(b._default))return this.checkExport(v,"default",this.lastTokStart),d.declaration=this.parseExportDefaultDeclaration(),this.finishNode(d,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())d.declaration=this.parseExportDeclaration(d),d.declaration.type==="VariableDeclaration"?this.checkVariableExport(v,d.declaration.declarations):this.checkExport(v,d.declaration.id,d.declaration.id.start),d.specifiers=[],d.source=null,this.options.ecmaVersion>=16&&(d.attributes=[]);else{if(d.declaration=null,d.specifiers=this.parseExportSpecifiers(v),this.eatContextual("from"))this.type!==b.string&&this.unexpected(),d.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(d.attributes=this.parseWithClause());else{for(var T=0,I=d.specifiers;T<I.length;T+=1){var V=I[T];this.checkUnreserved(V.local),this.checkLocalExport(V.local),V.local.type==="Literal"&&this.raise(V.local.start,"A string literal cannot be used as an exported binding without `from`.")}d.source=null,this.options.ecmaVersion>=16&&(d.attributes=[])}this.semicolon()}return this.finishNode(d,"ExportNamedDeclaration")},L.parseExportDeclaration=function(d){return this.parseStatement(null)},L.parseExportDefaultDeclaration=function(){var d;if(this.type===b._function||(d=this.isAsyncFunction())){var v=this.startNode();return this.next(),d&&this.next(),this.parseFunction(v,H|re,!1,d)}else if(this.type===b._class){var T=this.startNode();return this.parseClass(T,"nullableID")}else{var I=this.parseMaybeAssign();return this.semicolon(),I}},L.checkExport=function(d,v,T){d&&(typeof v!="string"&&(v=v.type==="Identifier"?v.name:v.value),J(d,v)&&this.raiseRecoverable(T,"Duplicate export '"+v+"'"),d[v]=!0)},L.checkPatternExport=function(d,v){var T=v.type;if(T==="Identifier")this.checkExport(d,v,v.start);else if(T==="ObjectPattern")for(var I=0,V=v.properties;I<V.length;I+=1){var ee=V[I];this.checkPatternExport(d,ee)}else if(T==="ArrayPattern")for(var ne=0,ve=v.elements;ne<ve.length;ne+=1){var $e=ve[ne];$e&&this.checkPatternExport(d,$e)}else T==="Property"?this.checkPatternExport(d,v.value):T==="AssignmentPattern"?this.checkPatternExport(d,v.left):T==="RestElement"&&this.checkPatternExport(d,v.argument)},L.checkVariableExport=function(d,v){if(d)for(var T=0,I=v;T<I.length;T+=1){var V=I[T];this.checkPatternExport(d,V.id)}},L.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()},L.parseExportSpecifier=function(d){var v=this.startNode();return v.local=this.parseModuleExportName(),v.exported=this.eatContextual("as")?this.parseModuleExportName():v.local,this.checkExport(d,v.exported,v.exported.start),this.finishNode(v,"ExportSpecifier")},L.parseExportSpecifiers=function(d){var v=[],T=!0;for(this.expect(b.braceL);!this.eat(b.braceR);){if(T)T=!1;else if(this.expect(b.comma),this.afterTrailingComma(b.braceR))break;v.push(this.parseExportSpecifier(d))}return v},L.parseImport=function(d){return this.next(),this.type===b.string?(d.specifiers=K,d.source=this.parseExprAtom()):(d.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),d.source=this.type===b.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(d.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(d,"ImportDeclaration")},L.parseImportSpecifier=function(){var d=this.startNode();return d.imported=this.parseModuleExportName(),this.eatContextual("as")?d.local=this.parseIdent():(this.checkUnreserved(d.imported),d.local=d.imported),this.checkLValSimple(d.local,ft),this.finishNode(d,"ImportSpecifier")},L.parseImportDefaultSpecifier=function(){var d=this.startNode();return d.local=this.parseIdent(),this.checkLValSimple(d.local,ft),this.finishNode(d,"ImportDefaultSpecifier")},L.parseImportNamespaceSpecifier=function(){var d=this.startNode();return this.next(),this.expectContextual("as"),d.local=this.parseIdent(),this.checkLValSimple(d.local,ft),this.finishNode(d,"ImportNamespaceSpecifier")},L.parseImportSpecifiers=function(){var d=[],v=!0;if(this.type===b.name&&(d.push(this.parseImportDefaultSpecifier()),!this.eat(b.comma)))return d;if(this.type===b.star)return d.push(this.parseImportNamespaceSpecifier()),d;for(this.expect(b.braceL);!this.eat(b.braceR);){if(v)v=!1;else if(this.expect(b.comma),this.afterTrailingComma(b.braceR))break;d.push(this.parseImportSpecifier())}return d},L.parseWithClause=function(){var d=[];if(!this.eat(b._with))return d;this.expect(b.braceL);for(var v={},T=!0;!this.eat(b.braceR);){if(T)T=!1;else if(this.expect(b.comma),this.afterTrailingComma(b.braceR))break;var I=this.parseImportAttribute(),V=I.key.type==="Identifier"?I.key.name:I.key.value;J(v,V)&&this.raiseRecoverable(I.key.start,"Duplicate attribute key '"+V+"'"),v[V]=!0,d.push(I)}return d},L.parseImportAttribute=function(){var d=this.startNode();return d.key=this.type===b.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(b.colon),this.type!==b.string&&this.unexpected(),d.value=this.parseExprAtom(),this.finishNode(d,"ImportAttribute")},L.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===b.string){var d=this.parseLiteral(this.value);return Re.test(d.value)&&this.raise(d.start,"An export name cannot include a lone surrogate."),d}return this.parseIdent(!0)},L.adaptDirectivePrologue=function(d){for(var v=0;v<d.length&&this.isDirectiveCandidate(d[v]);++v)d[v].directive=d[v].expression.raw.slice(1,-1)},L.isDirectiveCandidate=function(d){return this.options.ecmaVersion>=5&&d.type==="ExpressionStatement"&&d.expression.type==="Literal"&&typeof d.expression.value=="string"&&(this.input[d.start]==='"'||this.input[d.start]==="'")};var be=O.prototype;be.toAssignable=function(d,v,T){if(this.options.ecmaVersion>=6&&d)switch(d.type){case"Identifier":this.inAsync&&d.name==="await"&&this.raise(d.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":d.type="ObjectPattern",T&&this.checkPatternErrors(T,!0);for(var I=0,V=d.properties;I<V.length;I+=1){var ee=V[I];this.toAssignable(ee,v),ee.type==="RestElement"&&(ee.argument.type==="ArrayPattern"||ee.argument.type==="ObjectPattern")&&this.raise(ee.argument.start,"Unexpected token")}break;case"Property":d.kind!=="init"&&this.raise(d.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(d.value,v);break;case"ArrayExpression":d.type="ArrayPattern",T&&this.checkPatternErrors(T,!0),this.toAssignableList(d.elements,v);break;case"SpreadElement":d.type="RestElement",this.toAssignable(d.argument,v),d.argument.type==="AssignmentPattern"&&this.raise(d.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":d.operator!=="="&&this.raise(d.left.end,"Only '=' operator can be used for specifying default value."),d.type="AssignmentPattern",delete d.operator,this.toAssignable(d.left,v);break;case"ParenthesizedExpression":this.toAssignable(d.expression,v,T);break;case"ChainExpression":this.raiseRecoverable(d.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!v)break;default:this.raise(d.start,"Assigning to rvalue")}else T&&this.checkPatternErrors(T,!0);return d},be.toAssignableList=function(d,v){for(var T=d.length,I=0;I<T;I++){var V=d[I];V&&this.toAssignable(V,v)}if(T){var ee=d[T-1];this.options.ecmaVersion===6&&v&&ee&&ee.type==="RestElement"&&ee.argument.type!=="Identifier"&&this.unexpected(ee.argument.start)}return d},be.parseSpread=function(d){var v=this.startNode();return this.next(),v.argument=this.parseMaybeAssign(!1,d),this.finishNode(v,"SpreadElement")},be.parseRestBinding=function(){var d=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==b.name&&this.unexpected(),d.argument=this.parseBindingAtom(),this.finishNode(d,"RestElement")},be.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case b.bracketL:var d=this.startNode();return this.next(),d.elements=this.parseBindingList(b.bracketR,!0,!0),this.finishNode(d,"ArrayPattern");case b.braceL:return this.parseObj(!0)}return this.parseIdent()},be.parseBindingList=function(d,v,T,I){for(var V=[],ee=!0;!this.eat(d);)if(ee?ee=!1:this.expect(b.comma),v&&this.type===b.comma)V.push(null);else{if(T&&this.afterTrailingComma(d))break;if(this.type===b.ellipsis){var ne=this.parseRestBinding();this.parseBindingListItem(ne),V.push(ne),this.type===b.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(d);break}else V.push(this.parseAssignableListItem(I))}return V},be.parseAssignableListItem=function(d){var v=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(v),v},be.parseBindingListItem=function(d){return d},be.parseMaybeDefault=function(d,v,T){if(T=T||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(b.eq))return T;var I=this.startNodeAt(d,v);return I.left=T,I.right=this.parseMaybeAssign(),this.finishNode(I,"AssignmentPattern")},be.checkLValSimple=function(d,v,T){v===void 0&&(v=An);var I=v!==An;switch(d.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(d.name)&&this.raiseRecoverable(d.start,(I?"Binding ":"Assigning to ")+d.name+" in strict mode"),I&&(v===ft&&d.name==="let"&&this.raiseRecoverable(d.start,"let is disallowed as a lexically bound name"),T&&(J(T,d.name)&&this.raiseRecoverable(d.start,"Argument name clash"),T[d.name]=!0),v!==Mt&&this.declareName(d.name,v,d.start));break;case"ChainExpression":this.raiseRecoverable(d.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":I&&this.raiseRecoverable(d.start,"Binding member expression");break;case"ParenthesizedExpression":return I&&this.raiseRecoverable(d.start,"Binding parenthesized expression"),this.checkLValSimple(d.expression,v,T);default:this.raise(d.start,(I?"Binding":"Assigning to")+" rvalue")}},be.checkLValPattern=function(d,v,T){switch(v===void 0&&(v=An),d.type){case"ObjectPattern":for(var I=0,V=d.properties;I<V.length;I+=1){var ee=V[I];this.checkLValInnerPattern(ee,v,T)}break;case"ArrayPattern":for(var ne=0,ve=d.elements;ne<ve.length;ne+=1){var $e=ve[ne];$e&&this.checkLValInnerPattern($e,v,T)}break;default:this.checkLValSimple(d,v,T)}},be.checkLValInnerPattern=function(d,v,T){switch(v===void 0&&(v=An),d.type){case"Property":this.checkLValInnerPattern(d.value,v,T);break;case"AssignmentPattern":this.checkLValPattern(d.left,v,T);break;case"RestElement":this.checkLValPattern(d.argument,v,T);break;default:this.checkLValPattern(d,v,T)}};var Ie=function(v,T,I,V,ee){this.token=v,this.isExpr=!!T,this.preserveSpace=!!I,this.override=V,this.generator=!!ee},Pe={b_stat:new Ie("{",!1),b_expr:new Ie("{",!0),b_tmpl:new Ie("${",!1),p_stat:new Ie("(",!1),p_expr:new Ie("(",!0),q_tmpl:new Ie("`",!0,!0,function(d){return d.tryReadTemplateToken()}),f_stat:new Ie("function",!1),f_expr:new Ie("function",!0),f_expr_gen:new Ie("function",!0,!1,null,!0),f_gen:new Ie("function",!1,!1,null,!0)},ct=O.prototype;ct.initialContext=function(){return[Pe.b_stat]},ct.curContext=function(){return this.context[this.context.length-1]},ct.braceIsBlock=function(d){var v=this.curContext();return v===Pe.f_expr||v===Pe.f_stat?!0:d===b.colon&&(v===Pe.b_stat||v===Pe.b_expr)?!v.isExpr:d===b._return||d===b.name&&this.exprAllowed?E.test(this.input.slice(this.lastTokEnd,this.start)):d===b._else||d===b.semi||d===b.eof||d===b.parenR||d===b.arrow?!0:d===b.braceL?v===Pe.b_stat:d===b._var||d===b._const||d===b.name?!1:!this.exprAllowed},ct.inGeneratorContext=function(){for(var d=this.context.length-1;d>=1;d--){var v=this.context[d];if(v.token==="function")return v.generator}return!1},ct.updateContext=function(d){var v,T=this.type;T.keyword&&d===b.dot?this.exprAllowed=!1:(v=T.updateContext)?v.call(this,d):this.exprAllowed=T.beforeExpr},ct.overrideContext=function(d){this.curContext()!==d&&(this.context[this.context.length-1]=d)},b.parenR.updateContext=b.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var d=this.context.pop();d===Pe.b_stat&&this.curContext().token==="function"&&(d=this.context.pop()),this.exprAllowed=!d.isExpr},b.braceL.updateContext=function(d){this.context.push(this.braceIsBlock(d)?Pe.b_stat:Pe.b_expr),this.exprAllowed=!0},b.dollarBraceL.updateContext=function(){this.context.push(Pe.b_tmpl),this.exprAllowed=!0},b.parenL.updateContext=function(d){var v=d===b._if||d===b._for||d===b._with||d===b._while;this.context.push(v?Pe.p_stat:Pe.p_expr),this.exprAllowed=!0},b.incDec.updateContext=function(){},b._function.updateContext=b._class.updateContext=function(d){d.beforeExpr&&d!==b._else&&!(d===b.semi&&this.curContext()!==Pe.p_stat)&&!(d===b._return&&E.test(this.input.slice(this.lastTokEnd,this.start)))&&!((d===b.colon||d===b.braceL)&&this.curContext()===Pe.b_stat)?this.context.push(Pe.f_expr):this.context.push(Pe.f_stat),this.exprAllowed=!1},b.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0},b.backQuote.updateContext=function(){this.curContext()===Pe.q_tmpl?this.context.pop():this.context.push(Pe.q_tmpl),this.exprAllowed=!1},b.star.updateContext=function(d){if(d===b._function){var v=this.context.length-1;this.context[v]===Pe.f_expr?this.context[v]=Pe.f_expr_gen:this.context[v]=Pe.f_gen}this.exprAllowed=!0},b.name.updateContext=function(d){var v=!1;this.options.ecmaVersion>=6&&d!==b.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(v=!0),this.exprAllowed=v};var Me=O.prototype;Me.checkPropClash=function(d,v,T){if(!(this.options.ecmaVersion>=9&&d.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(d.computed||d.method||d.shorthand))){var I=d.key,V;switch(I.type){case"Identifier":V=I.name;break;case"Literal":V=String(I.value);break;default:return}var ee=d.kind;if(this.options.ecmaVersion>=6){V==="__proto__"&&ee==="init"&&(v.proto&&(T?T.doubleProto<0&&(T.doubleProto=I.start):this.raiseRecoverable(I.start,"Redefinition of __proto__ property")),v.proto=!0);return}V="$"+V;var ne=v[V];if(ne){var ve;ee==="init"?ve=this.strict&&ne.init||ne.get||ne.set:ve=ne.init||ne[ee],ve&&this.raiseRecoverable(I.start,"Redefinition of property")}else ne=v[V]={init:!1,get:!1,set:!1};ne[ee]=!0}},Me.parseExpression=function(d,v){var T=this;return this.catchStackOverflow(function(){var I=T.start,V=T.startLoc,ee=T.parseMaybeAssign(d,v);if(T.type===b.comma){var ne=T.startNodeAt(I,V);for(ne.expressions=[ee];T.eat(b.comma);)ne.expressions.push(T.parseMaybeAssign(d,v));return T.finishNode(ne,"SequenceExpression")}return ee})},Me.parseMaybeAssign=function(d,v,T){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(d);this.exprAllowed=!1}var I=!1,V=-1,ee=-1,ne=-1;v?(V=v.parenthesizedAssign,ee=v.trailingComma,ne=v.doubleProto,v.parenthesizedAssign=v.trailingComma=-1):(v=new D,I=!0);var ve=this.start,$e=this.startLoc;(this.type===b.parenL||this.type===b.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=d==="await");var rt=this.parseMaybeConditional(d,v);if(T&&(rt=T.call(this,rt,ve,$e)),this.type.isAssign){var dt=this.startNodeAt(ve,$e);return dt.operator=this.value,this.type===b.eq&&(rt=this.toAssignable(rt,!1,v)),I||(v.parenthesizedAssign=v.trailingComma=v.doubleProto=-1),v.shorthandAssign>=rt.start&&(v.shorthandAssign=-1),this.type===b.eq?this.checkLValPattern(rt):this.checkLValSimple(rt),dt.left=rt,this.next(),dt.right=this.parseMaybeAssign(d),ne>-1&&(v.doubleProto=ne),this.finishNode(dt,"AssignmentExpression")}else I&&this.checkExpressionErrors(v,!0);return V>-1&&(v.parenthesizedAssign=V),ee>-1&&(v.trailingComma=ee),rt},Me.parseMaybeConditional=function(d,v){var T=this.start,I=this.startLoc,V=this.parseExprOps(d,v);if(this.checkExpressionErrors(v))return V;if(!(V.type==="ArrowFunctionExpression"&&V.start===T)&&this.eat(b.question)){var ee=this.startNodeAt(T,I);return ee.test=V,ee.consequent=this.parseMaybeAssign(),this.expect(b.colon),ee.alternate=this.parseMaybeAssign(d),this.finishNode(ee,"ConditionalExpression")}return V},Me.parseExprOps=function(d,v){var T=this.start,I=this.startLoc,V=this.parseMaybeUnary(v,!1,!1,d);return this.checkExpressionErrors(v)||V.start===T&&V.type==="ArrowFunctionExpression"?V:this.parseExprOp(V,T,I,-1,d)},Me.parseExprOp=function(d,v,T,I,V){var ee=this.type.binop;if(ee!=null&&(!V||this.type!==b._in)&&ee>I){var ne=this.type===b.logicalOR||this.type===b.logicalAND,ve=this.type===b.coalesce;ve&&(ee=b.logicalAND.binop);var $e=this.value;this.next();var rt=this.start,dt=this.startLoc,bn=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,V),rt,dt,ee,V),Ci=this.buildBinary(v,T,d,bn,$e,ne||ve);return(ne&&this.type===b.coalesce||ve&&(this.type===b.logicalOR||this.type===b.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(Ci,v,T,I,V)}return d},Me.buildBinary=function(d,v,T,I,V,ee){I.type==="PrivateIdentifier"&&this.raise(I.start,"Private identifier can only be left side of binary expression");var ne=this.startNodeAt(d,v);return ne.left=T,ne.operator=V,ne.right=I,this.finishNode(ne,ee?"LogicalExpression":"BinaryExpression")},Me.parseMaybeUnary=function(d,v,T,I){var V=this.start,ee=this.startLoc,ne;if(this.isContextual("await")&&this.canAwait)ne=this.parseAwait(I),v=!0;else if(this.type.prefix){var ve=this.startNode(),$e=this.type===b.incDec;ve.operator=this.value,ve.prefix=!0,this.next(),ve.argument=this.parseMaybeUnary(null,!0,$e,I),this.checkExpressionErrors(d,!0),$e?this.checkLValSimple(ve.argument):this.strict&&ve.operator==="delete"&&Al(ve.argument)?this.raiseRecoverable(ve.start,"Deleting local variable in strict mode"):ve.operator==="delete"&&Qr(ve.argument)?this.raiseRecoverable(ve.start,"Private fields can not be deleted"):v=!0,ne=this.finishNode(ve,$e?"UpdateExpression":"UnaryExpression")}else if(!v&&this.type===b.privateId)(I||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),ne=this.parsePrivateIdent(),this.type!==b._in&&this.unexpected();else{if(ne=this.parseExprSubscripts(d,I),this.checkExpressionErrors(d))return ne;for(;this.type.postfix&&!this.canInsertSemicolon();){var rt=this.startNodeAt(V,ee);rt.operator=this.value,rt.prefix=!1,rt.argument=ne,this.checkLValSimple(ne),this.next(),ne=this.finishNode(rt,"UpdateExpression")}}if(!T&&!(ne.type==="ArrowFunctionExpression"&&ne.start===V)&&this.eat(b.starstar))if(v)this.unexpected(this.lastTokStart);else return this.buildBinary(V,ee,ne,this.parseMaybeUnary(null,!1,!1,I),"**",!1);else return ne};function Al(d){return d.type==="Identifier"||d.type==="ParenthesizedExpression"&&Al(d.expression)}function Qr(d){return d.type==="MemberExpression"&&d.property.type==="PrivateIdentifier"||d.type==="ChainExpression"&&Qr(d.expression)||d.type==="ParenthesizedExpression"&&Qr(d.expression)}Me.parseExprSubscripts=function(d,v){var T=this.start,I=this.startLoc,V=this.parseExprAtom(d,v);if(V.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return V;var ee=this.parseSubscripts(V,T,I,!1,v);return d&&ee.type==="MemberExpression"&&(d.parenthesizedAssign>=ee.start&&(d.parenthesizedAssign=-1),d.parenthesizedBind>=ee.start&&(d.parenthesizedBind=-1),d.trailingComma>=ee.start&&(d.trailingComma=-1)),ee},Me.parseSubscripts=function(d,v,T,I,V){for(var ee=this.options.ecmaVersion>=8&&d.type==="Identifier"&&d.name==="async"&&this.lastTokEnd===d.end&&!this.canInsertSemicolon()&&d.end-d.start===5&&this.potentialArrowAt===d.start,ne=!1;;){var ve=this.parseSubscript(d,v,T,I,ee,ne,V);if(ve.optional&&(ne=!0),ve===d||ve.type==="ArrowFunctionExpression"){if(ne){var $e=this.startNodeAt(v,T);$e.expression=ve,ve=this.finishNode($e,"ChainExpression")}return ve}d=ve}},Me.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(b.arrow)},Me.parseSubscriptAsyncArrow=function(d,v,T,I){return this.parseArrowExpression(this.startNodeAt(d,v),T,!0,I)},Me.parseSubscript=function(d,v,T,I,V,ee,ne){var ve=this.options.ecmaVersion>=11,$e=ve&&this.eat(b.questionDot);I&&$e&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var rt=this.eat(b.bracketL);if(rt||$e&&this.type!==b.parenL&&this.type!==b.backQuote||this.eat(b.dot)){var dt=this.startNodeAt(v,T);dt.object=d,rt?(dt.property=this.parseExpression(),this.expect(b.bracketR)):this.type===b.privateId&&d.type!=="Super"?dt.property=this.parsePrivateIdent():dt.property=this.parseIdent(this.options.allowReserved!=="never"),dt.computed=!!rt,ve&&(dt.optional=$e),d=this.finishNode(dt,"MemberExpression")}else if(!I&&this.eat(b.parenL)){var bn=new D,Ci=this.yieldPos,bf=this.awaitPos,ic=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var Dm=this.parseExprList(b.parenR,this.options.ecmaVersion>=8,!1,bn);if(V&&!$e&&this.shouldParseAsyncArrow())return this.checkPatternErrors(bn,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=Ci,this.awaitPos=bf,this.awaitIdentPos=ic,this.parseSubscriptAsyncArrow(v,T,Dm,ne);this.checkExpressionErrors(bn,!0),this.yieldPos=Ci||this.yieldPos,this.awaitPos=bf||this.awaitPos,this.awaitIdentPos=ic||this.awaitIdentPos;var rc=this.startNodeAt(v,T);rc.callee=d,rc.arguments=Dm,ve&&(rc.optional=$e),d=this.finishNode(rc,"CallExpression")}else if(this.type===b.backQuote){($e||ee)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var sc=this.startNodeAt(v,T);sc.tag=d,sc.quasi=this.parseTemplate({isTagged:!0}),d=this.finishNode(sc,"TaggedTemplateExpression")}return d},Me.parseExprAtom=function(d,v,T){this.type===b.slash&&this.readRegexp();var I,V=this.potentialArrowAt===this.start;switch(this.type){case b._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),I=this.startNode(),this.next(),this.type===b.parenL&&!this.allowDirectSuper&&this.raise(I.start,"super() call outside constructor of a subclass"),this.type!==b.dot&&this.type!==b.bracketL&&this.type!==b.parenL&&this.unexpected(),this.finishNode(I,"Super");case b._this:return I=this.startNode(),this.next(),this.finishNode(I,"ThisExpression");case b.name:var ee=this.start,ne=this.startLoc,ve=this.containsEsc,$e=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!ve&&$e.name==="async"&&!this.canInsertSemicolon()&&this.eat(b._function))return this.overrideContext(Pe.f_expr),this.parseFunction(this.startNodeAt(ee,ne),0,!1,!0,v);if(V&&!this.canInsertSemicolon()){if(this.eat(b.arrow))return this.parseArrowExpression(this.startNodeAt(ee,ne),[$e],!1,v);if(this.options.ecmaVersion>=8&&$e.name==="async"&&this.type===b.name&&!ve&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return $e=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(b.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(ee,ne),[$e],!0,v)}return $e;case b.regexp:var rt=this.value;return I=this.parseLiteral(rt.value),I.regex={pattern:rt.pattern,flags:rt.flags},I;case b.num:case b.string:return this.parseLiteral(this.value);case b._null:case b._true:case b._false:return I=this.startNode(),I.value=this.type===b._null?null:this.type===b._true,I.raw=this.type.keyword,this.next(),this.finishNode(I,"Literal");case b.parenL:var dt=this.start,bn=this.parseParenAndDistinguishExpression(V,v);return d&&(d.parenthesizedAssign<0&&!this.isSimpleAssignTarget(bn)&&(d.parenthesizedAssign=dt),d.parenthesizedBind<0&&(d.parenthesizedBind=dt)),bn;case b.bracketL:return I=this.startNode(),this.next(),I.elements=this.parseExprList(b.bracketR,!0,!0,d),this.finishNode(I,"ArrayExpression");case b.braceL:return this.overrideContext(Pe.b_expr),this.parseObj(!1,d);case b._function:return I=this.startNode(),this.next(),this.parseFunction(I,0);case b._class:return this.parseClass(this.startNode(),!1);case b._new:return this.parseNew();case b.backQuote:return this.parseTemplate();case b._import:return this.options.ecmaVersion>=11?this.parseExprImport(T):this.unexpected();default:return this.parseExprAtomDefault()}},Me.parseExprAtomDefault=function(){this.unexpected()},Me.parseExprImport=function(d){var v=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===b.parenL&&!d)return this.parseDynamicImport(v);if(this.type===b.dot){var T=this.startNodeAt(v.start,v.loc&&v.loc.start);return T.name="import",v.meta=this.finishNode(T,"Identifier"),this.parseImportMeta(v)}else this.unexpected()},Me.parseDynamicImport=function(d){if(this.next(),d.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(b.parenR)?d.options=null:(this.expect(b.comma),this.afterTrailingComma(b.parenR)?d.options=null:(d.options=this.parseMaybeAssign(),this.eat(b.parenR)||(this.expect(b.comma),this.afterTrailingComma(b.parenR)||this.unexpected())));else if(!this.eat(b.parenR)){var v=this.start;this.eat(b.comma)&&this.eat(b.parenR)?this.raiseRecoverable(v,"Trailing comma is not allowed in import()"):this.unexpected(v)}return this.finishNode(d,"ImportExpression")},Me.parseImportMeta=function(d){this.next();var v=this.containsEsc;return d.property=this.parseIdent(!0),d.property.name!=="meta"&&this.raiseRecoverable(d.property.start,"The only valid meta property for import is 'import.meta'"),v&&this.raiseRecoverable(d.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(d.start,"Cannot use 'import.meta' outside a module"),this.finishNode(d,"MetaProperty")},Me.parseLiteral=function(d){var v=this.startNode();return v.value=d,v.raw=this.input.slice(this.start,this.end),v.raw.charCodeAt(v.raw.length-1)===110&&(v.bigint=v.value!=null?v.value.toString():v.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(v,"Literal")},Me.parseParenExpression=function(){this.expect(b.parenL);var d=this.parseExpression();return this.expect(b.parenR),d},Me.shouldParseArrow=function(d){return!this.canInsertSemicolon()},Me.parseParenAndDistinguishExpression=function(d,v){var T=this.start,I=this.startLoc,V,ee=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var ne=this.start,ve=this.startLoc,$e=[],rt=!0,dt=!1,bn=new D,Ci=this.yieldPos,bf=this.awaitPos,ic;for(this.yieldPos=0,this.awaitPos=0;this.type!==b.parenR;)if(rt?rt=!1:this.expect(b.comma),ee&&this.afterTrailingComma(b.parenR,!0)){dt=!0;break}else if(this.type===b.ellipsis){ic=this.start,$e.push(this.parseParenItem(this.parseRestBinding())),this.type===b.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else $e.push(this.parseMaybeAssign(!1,bn,this.parseParenItem));var Dm=this.lastTokEnd,rc=this.lastTokEndLoc;if(this.expect(b.parenR),d&&this.shouldParseArrow($e)&&this.eat(b.arrow))return this.checkPatternErrors(bn,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=Ci,this.awaitPos=bf,this.parseParenArrowList(T,I,$e,v);(!$e.length||dt)&&this.unexpected(this.lastTokStart),ic&&this.unexpected(ic),this.checkExpressionErrors(bn,!0),this.yieldPos=Ci||this.yieldPos,this.awaitPos=bf||this.awaitPos,$e.length>1?(V=this.startNodeAt(ne,ve),V.expressions=$e,this.finishNodeAt(V,"SequenceExpression",Dm,rc)):V=$e[0]}else V=this.parseParenExpression();if(this.options.preserveParens){var sc=this.startNodeAt(T,I);return sc.expression=V,this.finishNode(sc,"ParenthesizedExpression")}else return V},Me.parseParenItem=function(d){return d},Me.parseParenArrowList=function(d,v,T,I){return this.parseArrowExpression(this.startNodeAt(d,v),T,!1,I)};var $l=[];Me.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var d=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===b.dot){var v=this.startNodeAt(d.start,d.loc&&d.loc.start);v.name="new",d.meta=this.finishNode(v,"Identifier"),this.next();var T=this.containsEsc;return d.property=this.parseIdent(!0),d.property.name!=="target"&&this.raiseRecoverable(d.property.start,"The only valid meta property for new is 'new.target'"),T&&this.raiseRecoverable(d.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(d.start,"'new.target' can only be used in functions and class static block"),this.finishNode(d,"MetaProperty")}var I=this.start,V=this.startLoc;return d.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),I,V,!0,!1),d.callee.type==="Super"&&this.raiseRecoverable(I,"Invalid use of 'super'"),this.eat(b.parenL)?d.arguments=this.parseExprList(b.parenR,this.options.ecmaVersion>=8,!1):d.arguments=$l,this.finishNode(d,"NewExpression")},Me.parseTemplateElement=function(d){var v=d.isTagged,T=this.startNode();return this.type===b.invalidTemplate?(v||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),T.value={raw:this.value.replace(/\r\n?/g,`
|
|
109
|
+
`),cooked:null}):T.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
|
|
110
|
+
`),cooked:this.value},this.next(),T.tail=this.type===b.backQuote,this.finishNode(T,"TemplateElement")},Me.parseTemplate=function(d){d===void 0&&(d={});var v=d.isTagged;v===void 0&&(v=!1);var T=this.startNode();this.next(),T.expressions=[];var I=this.parseTemplateElement({isTagged:v});for(T.quasis=[I];!I.tail;)this.type===b.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(b.dollarBraceL),T.expressions.push(this.parseExpression()),this.expect(b.braceR),T.quasis.push(I=this.parseTemplateElement({isTagged:v}));return this.next(),this.finishNode(T,"TemplateLiteral")},Me.isAsyncProp=function(d){return!d.computed&&d.key.type==="Identifier"&&d.key.name==="async"&&(this.type===b.name||this.type===b.num||this.type===b.string||this.type===b.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===b.star)&&!E.test(this.input.slice(this.lastTokEnd,this.start))},Me.parseObj=function(d,v){var T=this.startNode(),I=!0,V={};for(T.properties=[],this.next();!this.eat(b.braceR);){if(I)I=!1;else if(this.expect(b.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(b.braceR))break;var ee=this.parseProperty(d,v);d||this.checkPropClash(ee,V,v),T.properties.push(ee)}return this.finishNode(T,d?"ObjectPattern":"ObjectExpression")},Me.parseProperty=function(d,v){var T=this.startNode(),I,V,ee,ne;if(this.options.ecmaVersion>=9&&this.eat(b.ellipsis))return d?(T.argument=this.parseIdent(!1),this.type===b.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(T,"RestElement")):(T.argument=this.parseMaybeAssign(!1,v),this.type===b.comma&&v&&v.trailingComma<0&&(v.trailingComma=this.start),this.finishNode(T,"SpreadElement"));this.options.ecmaVersion>=6&&(T.method=!1,T.shorthand=!1,(d||v)&&(ee=this.start,ne=this.startLoc),d||(I=this.eat(b.star)));var ve=this.containsEsc;return this.parsePropertyName(T),!d&&!ve&&this.options.ecmaVersion>=8&&!I&&this.isAsyncProp(T)?(V=!0,I=this.options.ecmaVersion>=9&&this.eat(b.star),this.parsePropertyName(T)):V=!1,this.parsePropertyValue(T,d,I,V,ee,ne,v,ve),this.finishNode(T,"Property")},Me.parseGetterSetter=function(d){var v=d.key.name;this.parsePropertyName(d),d.value=this.parseMethod(!1),d.kind=v;var T=d.kind==="get"?0:1;if(d.value.params.length!==T){var I=d.value.start;d.kind==="get"?this.raiseRecoverable(I,"getter should have no params"):this.raiseRecoverable(I,"setter should have exactly one param")}else d.kind==="set"&&d.value.params[0].type==="RestElement"&&this.raiseRecoverable(d.value.params[0].start,"Setter cannot use rest params")},Me.parsePropertyValue=function(d,v,T,I,V,ee,ne,ve){(T||I)&&this.type===b.colon&&this.unexpected(),this.eat(b.colon)?(d.value=v?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,ne),d.kind="init"):this.options.ecmaVersion>=6&&this.type===b.parenL?(v&&this.unexpected(),d.method=!0,d.value=this.parseMethod(T,I),d.kind="init"):!v&&!ve&&this.options.ecmaVersion>=5&&!d.computed&&d.key.type==="Identifier"&&(d.key.name==="get"||d.key.name==="set")&&this.type!==b.comma&&this.type!==b.braceR&&this.type!==b.eq?((T||I)&&this.unexpected(),this.parseGetterSetter(d)):this.options.ecmaVersion>=6&&!d.computed&&d.key.type==="Identifier"?((T||I)&&this.unexpected(),this.checkUnreserved(d.key),d.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=V),v?d.value=this.parseMaybeDefault(V,ee,this.copyNode(d.key)):this.type===b.eq&&ne?(ne.shorthandAssign<0&&(ne.shorthandAssign=this.start),d.value=this.parseMaybeDefault(V,ee,this.copyNode(d.key))):d.value=this.copyNode(d.key),d.kind="init",d.shorthand=!0):this.unexpected()},Me.parsePropertyName=function(d){if(this.options.ecmaVersion>=6){if(this.eat(b.bracketL))return d.computed=!0,d.key=this.parseMaybeAssign(),this.expect(b.bracketR),d.key;d.computed=!1}return d.key=this.type===b.num||this.type===b.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},Me.initFunction=function(d){d.id=null,this.options.ecmaVersion>=6&&(d.generator=d.expression=!1),this.options.ecmaVersion>=8&&(d.async=!1)},Me.parseMethod=function(d,v,T){var I=this.startNode(),V=this.yieldPos,ee=this.awaitPos,ne=this.awaitIdentPos;return this.initFunction(I),this.options.ecmaVersion>=6&&(I.generator=d),this.options.ecmaVersion>=8&&(I.async=!!v),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(pn(v,I.generator)|wt|(T?Ut:0)),this.expect(b.parenL),I.params=this.parseBindingList(b.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(I,!1,!0,!1),this.yieldPos=V,this.awaitPos=ee,this.awaitIdentPos=ne,this.finishNode(I,"FunctionExpression")},Me.parseArrowExpression=function(d,v,T,I){var V=this.yieldPos,ee=this.awaitPos,ne=this.awaitIdentPos;return this.enterScope(pn(T,!1)|et),this.initFunction(d),this.options.ecmaVersion>=8&&(d.async=!!T),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,d.params=this.toAssignableList(v,!0),this.parseFunctionBody(d,!0,!1,I),this.yieldPos=V,this.awaitPos=ee,this.awaitIdentPos=ne,this.finishNode(d,"ArrowFunctionExpression")},Me.parseFunctionBody=function(d,v,T,I){var V=v&&this.type!==b.braceL,ee=this.strict,ne=!1;if(V)d.body=this.parseMaybeAssign(I),d.expression=!0,this.checkParams(d,!1);else{var ve=this.options.ecmaVersion>=7&&!this.isSimpleParamList(d.params);(!ee||ve)&&(ne=this.strictDirective(this.end),ne&&ve&&this.raiseRecoverable(d.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var $e=this.labels;this.labels=[],ne&&(this.strict=!0),this.checkParams(d,!ee&&!ne&&!v&&!T&&this.isSimpleParamList(d.params)),this.strict&&d.id&&this.checkLValSimple(d.id,Mt),d.body=this.parseBlock(!1,void 0,ne&&!ee),d.expression=!1,this.adaptDirectivePrologue(d.body.body),this.labels=$e}this.exitScope()},Me.isSimpleParamList=function(d){for(var v=0,T=d;v<T.length;v+=1){var I=T[v];if(I.type!=="Identifier")return!1}return!0},Me.checkParams=function(d,v){for(var T=Object.create(null),I=0,V=d.params;I<V.length;I+=1){var ee=V[I];this.checkLValInnerPattern(ee,vn,v?null:T)}},Me.parseExprList=function(d,v,T,I){for(var V=[],ee=!0;!this.eat(d);){if(ee)ee=!1;else if(this.expect(b.comma),v&&this.afterTrailingComma(d))break;var ne=void 0;T&&this.type===b.comma?ne=null:this.type===b.ellipsis?(ne=this.parseSpread(I),I&&this.type===b.comma&&I.trailingComma<0&&(I.trailingComma=this.start)):ne=this.parseMaybeAssign(!1,I),V.push(ne)}return V},Me.checkUnreserved=function(d){var v=d.start,T=d.end,I=d.name;if(this.inGenerator&&I==="yield"&&this.raiseRecoverable(v,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&I==="await"&&this.raiseRecoverable(v,"Cannot use 'await' as identifier inside an async function"),!(this.currentThisScope().flags&Tn)&&I==="arguments"&&this.raiseRecoverable(v,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(I==="arguments"||I==="await")&&this.raise(v,"Cannot use "+I+" in class static initialization block"),this.keywords.test(I)&&this.raise(v,"Unexpected keyword '"+I+"'"),!(this.options.ecmaVersion<6&&this.input.slice(v,T).indexOf("\\")!==-1)){var V=this.strict?this.reservedWordsStrict:this.reservedWords;V.test(I)&&(!this.inAsync&&I==="await"&&this.raiseRecoverable(v,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(v,"The keyword '"+I+"' is reserved"))}},Me.parseIdent=function(d){var v=this.parseIdentNode();return this.next(!!d),this.finishNode(v,"Identifier"),d||(this.checkUnreserved(v),v.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=v.start)),v},Me.parseIdentNode=function(){var d=this.startNode();return this.type===b.name?d.name=this.value:this.type.keyword?(d.name=this.type.keyword,(d.name==="class"||d.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=b.name):this.unexpected(),d},Me.parsePrivateIdent=function(){var d=this.startNode();return this.type===b.privateId?d.name=this.value:this.unexpected(),this.next(),this.finishNode(d,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(d.start,"Private field '#"+d.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(d)),d},Me.parseYield=function(d){this.yieldPos||(this.yieldPos=this.start);var v=this.startNode();return this.next(),this.type===b.semi||this.canInsertSemicolon()||this.type!==b.star&&!this.type.startsExpr?(v.delegate=!1,v.argument=null):(v.delegate=this.eat(b.star),v.argument=this.parseMaybeAssign(d)),this.finishNode(v,"YieldExpression")},Me.parseAwait=function(d){this.awaitPos||(this.awaitPos=this.start);var v=this.startNode();return this.next(),v.argument=this.parseMaybeUnary(null,!0,!1,d),this.finishNode(v,"AwaitExpression")};var Rm=O.prototype;Rm.raise=function(d,v){var T=lt(this.input,d);v+=" ("+T.line+":"+T.column+")",this.sourceFile&&(v+=" in "+this.sourceFile);var I=new SyntaxError(v);throw I.pos=d,I.loc=T,I.raisedAt=this.pos,I},Rm.raiseRecoverable=Rm.raise,Rm.curPosition=function(){if(this.options.locations)return new Ae(this.curLine,this.pos-this.lineStart)};var ba=O.prototype,Oj=function(v){this.flags=v,this.var=[],this.lexical=[],this.functions=[]};ba.enterScope=function(d){this.scopeStack.push(new Oj(d))},ba.exitScope=function(){this.scopeStack.pop()},ba.treatFunctionsAsVarInScope=function(d){return d.flags&Ve||!this.inModule&&d.flags&ge},ba.declareName=function(d,v,T){var I=!1;if(v===ft){var V=this.currentScope();I=V.lexical.indexOf(d)>-1||V.functions.indexOf(d)>-1||V.var.indexOf(d)>-1,V.lexical.push(d),this.inModule&&V.flags&ge&&delete this.undefinedExports[d]}else if(v===Di){var ee=this.currentScope();ee.lexical.push(d)}else if(v===$n){var ne=this.currentScope();this.treatFunctionsAsVar?I=ne.lexical.indexOf(d)>-1:I=ne.lexical.indexOf(d)>-1||ne.var.indexOf(d)>-1,ne.functions.push(d)}else for(var ve=this.scopeStack.length-1;ve>=0;--ve){var $e=this.scopeStack[ve];if($e.lexical.indexOf(d)>-1&&!($e.flags&Qt&&$e.lexical[0]===d)||!this.treatFunctionsAsVarInScope($e)&&$e.functions.indexOf(d)>-1){I=!0;break}if($e.var.push(d),this.inModule&&$e.flags&ge&&delete this.undefinedExports[d],$e.flags&Tn)break}I&&this.raiseRecoverable(T,"Identifier '"+d+"' has already been declared")},ba.checkLocalExport=function(d){this.scopeStack[0].lexical.indexOf(d.name)===-1&&this.scopeStack[0].var.indexOf(d.name)===-1&&(this.undefinedExports[d.name]=d)},ba.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},ba.currentVarScope=function(){for(var d=this.scopeStack.length-1;;d--){var v=this.scopeStack[d];if(v.flags&(Tn|dn|xt))return v}},ba.currentThisScope=function(){for(var d=this.scopeStack.length-1;;d--){var v=this.scopeStack[d];if(v.flags&(Tn|dn|xt)&&!(v.flags&et))return v}};var yf=function(v,T,I){this.type="",this.start=T,this.end=0,v.options.locations&&(this.loc=new Be(v,I)),v.options.directSourceFile&&(this.sourceFile=v.options.directSourceFile),v.options.ranges&&(this.range=[T,0])},vf=O.prototype;vf.startNode=function(){return new yf(this,this.start,this.startLoc)},vf.startNodeAt=function(d,v){return new yf(this,d,v)};function eE(d,v,T,I){return d.type=v,d.end=T,this.options.locations&&(d.loc.end=I),this.options.ranges&&(d.range[1]=T),d}vf.finishNode=function(d,v){return eE.call(this,d,v,this.lastTokEnd,this.lastTokEndLoc)},vf.finishNodeAt=function(d,v,T,I){return eE.call(this,d,v,T,I)},vf.copyNode=function(d){var v=new yf(this,d.start,this.startLoc);for(var T in d)v[T]=d[T];return v};var xj="Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz",tE="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",nE=tE+" Extended_Pictographic",iE=nE,rE=iE+" EBase EComp EMod EPres ExtPict",sE=rE,yj=sE,vj={9:tE,10:nE,11:iE,12:rE,13:sE,14:yj},bj="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",Sj={9:"",10:"",11:"",12:"",13:"",14:bj},oE="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",aE="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",lE=aE+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",uE=lE+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",cE=uE+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",hE=cE+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",_j=hE+" "+xj,Cj={9:aE,10:lE,11:uE,12:cE,13:hE,14:_j},fE={};function wj(d){var v=fE[d]={binary:ye(vj[d]+" "+oE),binaryOfStrings:ye(Sj[d]),nonBinary:{General_Category:ye(oE),Script:ye(Cj[d])}};v.nonBinary.Script_Extensions=v.nonBinary.Script,v.nonBinary.gc=v.nonBinary.General_Category,v.nonBinary.sc=v.nonBinary.Script,v.nonBinary.scx=v.nonBinary.Script_Extensions}for(var Gx=0,dE=[9,10,11,12,13,14];Gx<dE.length;Gx+=1){var kj=dE[Gx];wj(kj)}var ze=O.prototype,Mm=function(v,T){this.parent=v,this.base=T||this};Mm.prototype.separatedFrom=function(v){for(var T=this;T;T=T.parent)for(var I=v;I;I=I.parent)if(T.base===I.base&&T!==I)return!0;return!1},Mm.prototype.sibling=function(){return new Mm(this.parent,this.base)};var Xs=function(v){this.parser=v,this.validFlags="gim"+(v.options.ecmaVersion>=6?"uy":"")+(v.options.ecmaVersion>=9?"s":"")+(v.options.ecmaVersion>=13?"d":"")+(v.options.ecmaVersion>=15?"v":""),this.unicodeProperties=fE[v.options.ecmaVersion>=14?14:v.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};Xs.prototype.reset=function(v,T,I){var V=I.indexOf("v")!==-1,ee=I.indexOf("u")!==-1;this.start=v|0,this.source=T+"",this.flags=I,V&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=ee&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=ee&&this.parser.options.ecmaVersion>=9)},Xs.prototype.raise=function(v){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+v)},Xs.prototype.at=function(v,T){T===void 0&&(T=!1);var I=this.source,V=I.length;if(v>=V)return-1;var ee=I.charCodeAt(v);if(!(T||this.switchU)||ee<=55295||ee>=57344||v+1>=V)return ee;var ne=I.charCodeAt(v+1);return ne>=56320&&ne<=57343?(ee<<10)+ne-56613888:ee},Xs.prototype.nextIndex=function(v,T){T===void 0&&(T=!1);var I=this.source,V=I.length;if(v>=V)return V;var ee=I.charCodeAt(v),ne;return!(T||this.switchU)||ee<=55295||ee>=57344||v+1>=V||(ne=I.charCodeAt(v+1))<56320||ne>57343?v+1:v+2},Xs.prototype.current=function(v){return v===void 0&&(v=!1),this.at(this.pos,v)},Xs.prototype.lookahead=function(v){return v===void 0&&(v=!1),this.at(this.nextIndex(this.pos,v),v)},Xs.prototype.advance=function(v){v===void 0&&(v=!1),this.pos=this.nextIndex(this.pos,v)},Xs.prototype.eat=function(v,T){return T===void 0&&(T=!1),this.current(T)===v?(this.advance(T),!0):!1},Xs.prototype.eatChars=function(v,T){T===void 0&&(T=!1);for(var I=this.pos,V=0,ee=v;V<ee.length;V+=1){var ne=ee[V],ve=this.at(I,T);if(ve===-1||ve!==ne)return!1;I=this.nextIndex(I,T)}return this.pos=I,!0},ze.validateRegExpFlags=function(d){for(var v=d.validFlags,T=d.flags,I=!1,V=!1,ee=0;ee<T.length;ee++){var ne=T.charAt(ee);v.indexOf(ne)===-1&&this.raise(d.start,"Invalid regular expression flag"),T.indexOf(ne,ee+1)>-1&&this.raise(d.start,"Duplicate regular expression flag"),ne==="u"&&(I=!0),ne==="v"&&(V=!0)}this.options.ecmaVersion>=15&&I&&V&&this.raise(d.start,"Invalid regular expression flag")};function Ej(d){for(var v in d)return!0;return!1}ze.validateRegExpPattern=function(d){this.regexp_pattern(d),!d.switchN&&this.options.ecmaVersion>=9&&Ej(d.groupNames)&&(d.switchN=!0,this.regexp_pattern(d))},ze.regexp_pattern=function(d){d.pos=0,d.lastIntValue=0,d.lastStringValue="",d.lastAssertionIsQuantifiable=!1,d.numCapturingParens=0,d.maxBackReference=0,d.groupNames=Object.create(null),d.backReferenceNames.length=0,d.branchID=null,this.regexp_disjunction(d),d.pos!==d.source.length&&(d.eat(41)&&d.raise("Unmatched ')'"),(d.eat(93)||d.eat(125))&&d.raise("Lone quantifier brackets")),d.maxBackReference>d.numCapturingParens&&d.raise("Invalid escape");for(var v=0,T=d.backReferenceNames;v<T.length;v+=1){var I=T[v];d.groupNames[I]||d.raise("Invalid named capture referenced")}},ze.regexp_disjunction=function(d){var v=this.options.ecmaVersion>=16;for(v&&(d.branchID=new Mm(d.branchID,null)),this.regexp_alternative(d);d.eat(124);)v&&(d.branchID=d.branchID.sibling()),this.regexp_alternative(d);v&&(d.branchID=d.branchID.parent),this.regexp_eatQuantifier(d,!0)&&d.raise("Nothing to repeat"),d.eat(123)&&d.raise("Lone quantifier brackets")},ze.regexp_alternative=function(d){for(;d.pos<d.source.length&&this.regexp_eatTerm(d););},ze.regexp_eatTerm=function(d){return this.regexp_eatAssertion(d)?(d.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(d)&&d.switchU&&d.raise("Invalid quantifier"),!0):(d.switchU?this.regexp_eatAtom(d):this.regexp_eatExtendedAtom(d))?(this.regexp_eatQuantifier(d),!0):!1},ze.regexp_eatAssertion=function(d){var v=d.pos;if(d.lastAssertionIsQuantifiable=!1,d.eat(94)||d.eat(36))return!0;if(d.eat(92)){if(d.eat(66)||d.eat(98))return!0;d.pos=v}if(d.eat(40)&&d.eat(63)){var T=!1;if(this.options.ecmaVersion>=9&&(T=d.eat(60)),d.eat(61)||d.eat(33))return this.regexp_disjunction(d),d.eat(41)||d.raise("Unterminated group"),d.lastAssertionIsQuantifiable=!T,!0}return d.pos=v,!1},ze.regexp_eatQuantifier=function(d,v){return v===void 0&&(v=!1),this.regexp_eatQuantifierPrefix(d,v)?(d.eat(63),!0):!1},ze.regexp_eatQuantifierPrefix=function(d,v){return d.eat(42)||d.eat(43)||d.eat(63)||this.regexp_eatBracedQuantifier(d,v)},ze.regexp_eatBracedQuantifier=function(d,v){var T=d.pos;if(d.eat(123)){var I=0,V=-1;if(this.regexp_eatDecimalDigits(d)&&(I=d.lastIntValue,d.eat(44)&&this.regexp_eatDecimalDigits(d)&&(V=d.lastIntValue),d.eat(125)))return V!==-1&&V<I&&!v&&d.raise("numbers out of order in {} quantifier"),!0;d.switchU&&!v&&d.raise("Incomplete quantifier"),d.pos=T}return!1},ze.regexp_eatAtom=function(d){return this.regexp_eatPatternCharacters(d)||d.eat(46)||this.regexp_eatReverseSolidusAtomEscape(d)||this.regexp_eatCharacterClass(d)||this.regexp_eatUncapturingGroup(d)||this.regexp_eatCapturingGroup(d)},ze.regexp_eatReverseSolidusAtomEscape=function(d){var v=d.pos;if(d.eat(92)){if(this.regexp_eatAtomEscape(d))return!0;d.pos=v}return!1},ze.regexp_eatUncapturingGroup=function(d){var v=d.pos;if(d.eat(40)){if(d.eat(63)){if(this.options.ecmaVersion>=16){var T=this.regexp_eatModifiers(d),I=d.eat(45);if(T||I){for(var V=0;V<T.length;V++){var ee=T.charAt(V);T.indexOf(ee,V+1)>-1&&d.raise("Duplicate regular expression modifiers")}if(I){var ne=this.regexp_eatModifiers(d);!T&&!ne&&d.current()===58&&d.raise("Invalid regular expression modifiers");for(var ve=0;ve<ne.length;ve++){var $e=ne.charAt(ve);(ne.indexOf($e,ve+1)>-1||T.indexOf($e)>-1)&&d.raise("Duplicate regular expression modifiers")}}}}if(d.eat(58)){if(this.regexp_disjunction(d),d.eat(41))return!0;d.raise("Unterminated group")}}d.pos=v}return!1},ze.regexp_eatCapturingGroup=function(d){if(d.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(d):d.current()===63&&d.raise("Invalid group"),this.regexp_disjunction(d),d.eat(41))return d.numCapturingParens+=1,!0;d.raise("Unterminated group")}return!1},ze.regexp_eatModifiers=function(d){for(var v="",T=0;(T=d.current())!==-1&&Tj(T);)v+=xe(T),d.advance();return v};function Tj(d){return d===105||d===109||d===115}ze.regexp_eatExtendedAtom=function(d){return d.eat(46)||this.regexp_eatReverseSolidusAtomEscape(d)||this.regexp_eatCharacterClass(d)||this.regexp_eatUncapturingGroup(d)||this.regexp_eatCapturingGroup(d)||this.regexp_eatInvalidBracedQuantifier(d)||this.regexp_eatExtendedPatternCharacter(d)},ze.regexp_eatInvalidBracedQuantifier=function(d){return this.regexp_eatBracedQuantifier(d,!0)&&d.raise("Nothing to repeat"),!1},ze.regexp_eatSyntaxCharacter=function(d){var v=d.current();return pE(v)?(d.lastIntValue=v,d.advance(),!0):!1};function pE(d){return d===36||d>=40&&d<=43||d===46||d===63||d>=91&&d<=94||d>=123&&d<=125}ze.regexp_eatPatternCharacters=function(d){for(var v=d.pos,T=0;(T=d.current())!==-1&&!pE(T);)d.advance();return d.pos!==v},ze.regexp_eatExtendedPatternCharacter=function(d){var v=d.current();return v!==-1&&v!==36&&!(v>=40&&v<=43)&&v!==46&&v!==63&&v!==91&&v!==94&&v!==124?(d.advance(),!0):!1},ze.regexp_groupSpecifier=function(d){if(d.eat(63)){this.regexp_eatGroupName(d)||d.raise("Invalid group");var v=this.options.ecmaVersion>=16,T=d.groupNames[d.lastStringValue];if(T)if(v)for(var I=0,V=T;I<V.length;I+=1){var ee=V[I];ee.separatedFrom(d.branchID)||d.raise("Duplicate capture group name")}else d.raise("Duplicate capture group name");v?(T||(d.groupNames[d.lastStringValue]=[])).push(d.branchID):d.groupNames[d.lastStringValue]=!0}},ze.regexp_eatGroupName=function(d){if(d.lastStringValue="",d.eat(60)){if(this.regexp_eatRegExpIdentifierName(d)&&d.eat(62))return!0;d.raise("Invalid capture group name")}return!1},ze.regexp_eatRegExpIdentifierName=function(d){if(d.lastStringValue="",this.regexp_eatRegExpIdentifierStart(d)){for(d.lastStringValue+=xe(d.lastIntValue);this.regexp_eatRegExpIdentifierPart(d);)d.lastStringValue+=xe(d.lastIntValue);return!0}return!1},ze.regexp_eatRegExpIdentifierStart=function(d){var v=d.pos,T=this.options.ecmaVersion>=11,I=d.current(T);return d.advance(T),I===92&&this.regexp_eatRegExpUnicodeEscapeSequence(d,T)&&(I=d.lastIntValue),Pj(I)?(d.lastIntValue=I,!0):(d.pos=v,!1)};function Pj(d){return m(d,!0)||d===36||d===95}ze.regexp_eatRegExpIdentifierPart=function(d){var v=d.pos,T=this.options.ecmaVersion>=11,I=d.current(T);return d.advance(T),I===92&&this.regexp_eatRegExpUnicodeEscapeSequence(d,T)&&(I=d.lastIntValue),Aj(I)?(d.lastIntValue=I,!0):(d.pos=v,!1)};function Aj(d){return g(d,!0)||d===36||d===95||d===8204||d===8205}ze.regexp_eatAtomEscape=function(d){return this.regexp_eatBackReference(d)||this.regexp_eatCharacterClassEscape(d)||this.regexp_eatCharacterEscape(d)||d.switchN&&this.regexp_eatKGroupName(d)?!0:(d.switchU&&(d.current()===99&&d.raise("Invalid unicode escape"),d.raise("Invalid escape")),!1)},ze.regexp_eatBackReference=function(d){var v=d.pos;if(this.regexp_eatDecimalEscape(d)){var T=d.lastIntValue;if(d.switchU)return T>d.maxBackReference&&(d.maxBackReference=T),!0;if(T<=d.numCapturingParens)return!0;d.pos=v}return!1},ze.regexp_eatKGroupName=function(d){if(d.eat(107)){if(this.regexp_eatGroupName(d))return d.backReferenceNames.push(d.lastStringValue),!0;d.raise("Invalid named reference")}return!1},ze.regexp_eatCharacterEscape=function(d){return this.regexp_eatControlEscape(d)||this.regexp_eatCControlLetter(d)||this.regexp_eatZero(d)||this.regexp_eatHexEscapeSequence(d)||this.regexp_eatRegExpUnicodeEscapeSequence(d,!1)||!d.switchU&&this.regexp_eatLegacyOctalEscapeSequence(d)||this.regexp_eatIdentityEscape(d)},ze.regexp_eatCControlLetter=function(d){var v=d.pos;if(d.eat(99)){if(this.regexp_eatControlLetter(d))return!0;d.pos=v}return!1},ze.regexp_eatZero=function(d){return d.current()===48&&!Nm(d.lookahead())?(d.lastIntValue=0,d.advance(),!0):!1},ze.regexp_eatControlEscape=function(d){var v=d.current();return v===116?(d.lastIntValue=9,d.advance(),!0):v===110?(d.lastIntValue=10,d.advance(),!0):v===118?(d.lastIntValue=11,d.advance(),!0):v===102?(d.lastIntValue=12,d.advance(),!0):v===114?(d.lastIntValue=13,d.advance(),!0):!1},ze.regexp_eatControlLetter=function(d){var v=d.current();return mE(v)?(d.lastIntValue=v%32,d.advance(),!0):!1};function mE(d){return d>=65&&d<=90||d>=97&&d<=122}ze.regexp_eatRegExpUnicodeEscapeSequence=function(d,v){v===void 0&&(v=!1);var T=d.pos,I=v||d.switchU;if(d.eat(117)){if(this.regexp_eatFixedHexDigits(d,4)){var V=d.lastIntValue;if(I&&V>=55296&&V<=56319){var ee=d.pos;if(d.eat(92)&&d.eat(117)&&this.regexp_eatFixedHexDigits(d,4)){var ne=d.lastIntValue;if(ne>=56320&&ne<=57343)return d.lastIntValue=(V-55296)*1024+(ne-56320)+65536,!0}d.pos=ee,d.lastIntValue=V}return!0}if(I&&d.eat(123)&&this.regexp_eatHexDigits(d)&&d.eat(125)&&$j(d.lastIntValue))return!0;I&&d.raise("Invalid unicode escape"),d.pos=T}return!1};function $j(d){return d>=0&&d<=1114111}ze.regexp_eatIdentityEscape=function(d){if(d.switchU)return this.regexp_eatSyntaxCharacter(d)?!0:d.eat(47)?(d.lastIntValue=47,!0):!1;var v=d.current();return v!==99&&(!d.switchN||v!==107)?(d.lastIntValue=v,d.advance(),!0):!1},ze.regexp_eatDecimalEscape=function(d){d.lastIntValue=0;var v=d.current();if(v>=49&&v<=57){do d.lastIntValue=10*d.lastIntValue+(v-48),d.advance();while((v=d.current())>=48&&v<=57);return!0}return!1};var gE=0,ko=1,Vr=2;ze.regexp_eatCharacterClassEscape=function(d){var v=d.current();if(Ij(v))return d.lastIntValue=-1,d.advance(),ko;var T=!1;if(d.switchU&&this.options.ecmaVersion>=9&&((T=v===80)||v===112)){d.lastIntValue=-1,d.advance();var I;if(d.eat(123)&&(I=this.regexp_eatUnicodePropertyValueExpression(d))&&d.eat(125))return T&&I===Vr&&d.raise("Invalid property name"),I;d.raise("Invalid property name")}return gE};function Ij(d){return d===100||d===68||d===115||d===83||d===119||d===87}ze.regexp_eatUnicodePropertyValueExpression=function(d){var v=d.pos;if(this.regexp_eatUnicodePropertyName(d)&&d.eat(61)){var T=d.lastStringValue;if(this.regexp_eatUnicodePropertyValue(d)){var I=d.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(d,T,I),ko}}if(d.pos=v,this.regexp_eatLoneUnicodePropertyNameOrValue(d)){var V=d.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(d,V)}return gE},ze.regexp_validateUnicodePropertyNameAndValue=function(d,v,T){J(d.unicodeProperties.nonBinary,v)||d.raise("Invalid property name"),d.unicodeProperties.nonBinary[v].test(T)||d.raise("Invalid property value")},ze.regexp_validateUnicodePropertyNameOrValue=function(d,v){if(d.unicodeProperties.binary.test(v))return ko;if(d.switchV&&d.unicodeProperties.binaryOfStrings.test(v))return Vr;d.raise("Invalid property name")},ze.regexp_eatUnicodePropertyName=function(d){var v=0;for(d.lastStringValue="";OE(v=d.current());)d.lastStringValue+=xe(v),d.advance();return d.lastStringValue!==""};function OE(d){return mE(d)||d===95}ze.regexp_eatUnicodePropertyValue=function(d){var v=0;for(d.lastStringValue="";Rj(v=d.current());)d.lastStringValue+=xe(v),d.advance();return d.lastStringValue!==""};function Rj(d){return OE(d)||Nm(d)}ze.regexp_eatLoneUnicodePropertyNameOrValue=function(d){return this.regexp_eatUnicodePropertyValue(d)},ze.regexp_eatCharacterClass=function(d){if(d.eat(91)){var v=d.eat(94),T=this.regexp_classContents(d);return d.eat(93)||d.raise("Unterminated character class"),v&&T===Vr&&d.raise("Negated character class may contain strings"),!0}return!1},ze.regexp_classContents=function(d){return d.current()===93?ko:d.switchV?this.regexp_classSetExpression(d):(this.regexp_nonEmptyClassRanges(d),ko)},ze.regexp_nonEmptyClassRanges=function(d){for(;this.regexp_eatClassAtom(d);){var v=d.lastIntValue;if(d.eat(45)&&this.regexp_eatClassAtom(d)){var T=d.lastIntValue;d.switchU&&(v===-1||T===-1)&&d.raise("Invalid character class"),v!==-1&&T!==-1&&v>T&&d.raise("Range out of order in character class")}}},ze.regexp_eatClassAtom=function(d){var v=d.pos;if(d.eat(92)){if(this.regexp_eatClassEscape(d))return!0;if(d.switchU){var T=d.current();(T===99||vE(T))&&d.raise("Invalid class escape"),d.raise("Invalid escape")}d.pos=v}var I=d.current();return I!==93?(d.lastIntValue=I,d.advance(),!0):!1},ze.regexp_eatClassEscape=function(d){var v=d.pos;if(d.eat(98))return d.lastIntValue=8,!0;if(d.switchU&&d.eat(45))return d.lastIntValue=45,!0;if(!d.switchU&&d.eat(99)){if(this.regexp_eatClassControlLetter(d))return!0;d.pos=v}return this.regexp_eatCharacterClassEscape(d)||this.regexp_eatCharacterEscape(d)},ze.regexp_classSetExpression=function(d){var v=ko,T;if(!this.regexp_eatClassSetRange(d))if(T=this.regexp_eatClassSetOperand(d)){T===Vr&&(v=Vr);for(var I=d.pos;d.eatChars([38,38]);){if(d.current()!==38&&(T=this.regexp_eatClassSetOperand(d))){T!==Vr&&(v=ko);continue}d.raise("Invalid character in character class")}if(I!==d.pos)return v;for(;d.eatChars([45,45]);)this.regexp_eatClassSetOperand(d)||d.raise("Invalid character in character class");if(I!==d.pos)return v}else d.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(d)){if(T=this.regexp_eatClassSetOperand(d),!T)return v;T===Vr&&(v=Vr)}},ze.regexp_eatClassSetRange=function(d){var v=d.pos;if(this.regexp_eatClassSetCharacter(d)){var T=d.lastIntValue;if(d.eat(45)&&this.regexp_eatClassSetCharacter(d)){var I=d.lastIntValue;return T!==-1&&I!==-1&&T>I&&d.raise("Range out of order in character class"),!0}d.pos=v}return!1},ze.regexp_eatClassSetOperand=function(d){return this.regexp_eatClassSetCharacter(d)?ko:this.regexp_eatClassStringDisjunction(d)||this.regexp_eatNestedClass(d)},ze.regexp_eatNestedClass=function(d){var v=d.pos;if(d.eat(91)){var T=d.eat(94),I=this.regexp_classContents(d);if(d.eat(93))return T&&I===Vr&&d.raise("Negated character class may contain strings"),I;d.pos=v}if(d.eat(92)){var V=this.regexp_eatCharacterClassEscape(d);if(V)return V;d.pos=v}return null},ze.regexp_eatClassStringDisjunction=function(d){var v=d.pos;if(d.eatChars([92,113])){if(d.eat(123)){var T=this.regexp_classStringDisjunctionContents(d);if(d.eat(125))return T}else d.raise("Invalid escape");d.pos=v}return null},ze.regexp_classStringDisjunctionContents=function(d){for(var v=this.regexp_classString(d);d.eat(124);)this.regexp_classString(d)===Vr&&(v=Vr);return v},ze.regexp_classString=function(d){for(var v=0;this.regexp_eatClassSetCharacter(d);)v++;return v===1?ko:Vr},ze.regexp_eatClassSetCharacter=function(d){var v=d.pos;if(d.eat(92))return this.regexp_eatCharacterEscape(d)||this.regexp_eatClassSetReservedPunctuator(d)?!0:d.eat(98)?(d.lastIntValue=8,!0):(d.pos=v,!1);var T=d.current();return T<0||T===d.lookahead()&&Mj(T)||Nj(T)?!1:(d.advance(),d.lastIntValue=T,!0)};function Mj(d){return d===33||d>=35&&d<=38||d>=42&&d<=44||d===46||d>=58&&d<=64||d===94||d===96||d===126}function Nj(d){return d===40||d===41||d===45||d===47||d>=91&&d<=93||d>=123&&d<=125}ze.regexp_eatClassSetReservedPunctuator=function(d){var v=d.current();return Lj(v)?(d.lastIntValue=v,d.advance(),!0):!1};function Lj(d){return d===33||d===35||d===37||d===38||d===44||d===45||d>=58&&d<=62||d===64||d===96||d===126}ze.regexp_eatClassControlLetter=function(d){var v=d.current();return Nm(v)||v===95?(d.lastIntValue=v%32,d.advance(),!0):!1},ze.regexp_eatHexEscapeSequence=function(d){var v=d.pos;if(d.eat(120)){if(this.regexp_eatFixedHexDigits(d,2))return!0;d.switchU&&d.raise("Invalid escape"),d.pos=v}return!1},ze.regexp_eatDecimalDigits=function(d){var v=d.pos,T=0;for(d.lastIntValue=0;Nm(T=d.current());)d.lastIntValue=10*d.lastIntValue+(T-48),d.advance();return d.pos!==v};function Nm(d){return d>=48&&d<=57}ze.regexp_eatHexDigits=function(d){var v=d.pos,T=0;for(d.lastIntValue=0;xE(T=d.current());)d.lastIntValue=16*d.lastIntValue+yE(T),d.advance();return d.pos!==v};function xE(d){return d>=48&&d<=57||d>=65&&d<=70||d>=97&&d<=102}function yE(d){return d>=65&&d<=70?10+(d-65):d>=97&&d<=102?10+(d-97):d-48}ze.regexp_eatLegacyOctalEscapeSequence=function(d){if(this.regexp_eatOctalDigit(d)){var v=d.lastIntValue;if(this.regexp_eatOctalDigit(d)){var T=d.lastIntValue;v<=3&&this.regexp_eatOctalDigit(d)?d.lastIntValue=v*64+T*8+d.lastIntValue:d.lastIntValue=v*8+T}else d.lastIntValue=v;return!0}return!1},ze.regexp_eatOctalDigit=function(d){var v=d.current();return vE(v)?(d.lastIntValue=v-48,d.advance(),!0):(d.lastIntValue=0,!1)};function vE(d){return d>=48&&d<=55}ze.regexp_eatFixedHexDigits=function(d,v){var T=d.pos;d.lastIntValue=0;for(var I=0;I<v;++I){var V=d.current();if(!xE(V))return d.pos=T,!1;d.lastIntValue=16*d.lastIntValue+yE(V),d.advance()}return!0};var Lm=function(v){this.type=v.type,this.value=v.value,this.start=v.start,this.end=v.end,v.options.locations&&(this.loc=new Be(v,v.startLoc,v.endLoc)),v.options.ranges&&(this.range=[v.start,v.end])},St=O.prototype;St.next=function(d){!d&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new Lm(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},St.getToken=function(){return this.next(),new Lm(this)},typeof Symbol<"u"&&(St[Symbol.iterator]=function(){var d=this;return{next:function(){var v=d.getToken();return{done:v.type===b.eof,value:v}}}}),St.nextToken=function(){var d=this.curContext();if((!d||!d.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(b.eof);if(d.override)return d.override(this);this.readToken(this.fullCharCodeAtPos())},St.readToken=function(d){return m(d,this.options.ecmaVersion>=6)||d===92?this.readWord():this.getTokenFromCode(d)},St.fullCharCodeAt=function(d){var v=this.input.charCodeAt(d);if(v<=55295||v>=56320)return v;var T=this.input.charCodeAt(d+1);return T<=56319||T>=57344?v:(v<<10)+T-56613888},St.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},St.skipBlockComment=function(){var d=this.options.onComment&&this.curPosition(),v=this.pos,T=this.input.indexOf("*/",this.pos+=2);if(T===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=T+2,this.options.locations)for(var I=void 0,V=v;(I=B(this.input,V,this.pos))>-1;)++this.curLine,V=this.lineStart=I;this.options.onComment&&this.options.onComment(!0,this.input.slice(v+2,T),v,this.pos,d,this.curPosition())},St.skipLineComment=function(d){for(var v=this.pos,T=this.options.onComment&&this.curPosition(),I=this.input.charCodeAt(this.pos+=d);this.pos<this.input.length&&!$(I);)I=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(v+d,this.pos),v,this.pos,T,this.curPosition())},St.skipSpace=function(){e:for(;this.pos<this.input.length;){var d=this.input.charCodeAt(this.pos);switch(d){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(d>8&&d<14||d>=5760&&X.test(String.fromCharCode(d)))++this.pos;else break e}}},St.finishToken=function(d,v){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var T=this.type;this.type=d,this.value=v,this.updateContext(T)},St.readToken_dot=function(){var d=this.input.charCodeAt(this.pos+1);if(d>=48&&d<=57)return this.readNumber(!0);var v=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&d===46&&v===46?(this.pos+=3,this.finishToken(b.ellipsis)):(++this.pos,this.finishToken(b.dot))},St.readToken_slash=function(){var d=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):d===61?this.finishOp(b.assign,2):this.finishOp(b.slash,1)},St.readToken_mult_modulo_exp=function(d){var v=this.input.charCodeAt(this.pos+1),T=1,I=d===42?b.star:b.modulo;return this.options.ecmaVersion>=7&&d===42&&v===42&&(++T,I=b.starstar,v=this.input.charCodeAt(this.pos+2)),v===61?this.finishOp(b.assign,T+1):this.finishOp(I,T)},St.readToken_pipe_amp=function(d){var v=this.input.charCodeAt(this.pos+1);if(v===d){if(this.options.ecmaVersion>=12){var T=this.input.charCodeAt(this.pos+2);if(T===61)return this.finishOp(b.assign,3)}return this.finishOp(d===124?b.logicalOR:b.logicalAND,2)}return v===61?this.finishOp(b.assign,2):this.finishOp(d===124?b.bitwiseOR:b.bitwiseAND,1)},St.readToken_caret=function(){var d=this.input.charCodeAt(this.pos+1);return d===61?this.finishOp(b.assign,2):this.finishOp(b.bitwiseXOR,1)},St.readToken_plus_min=function(d){var v=this.input.charCodeAt(this.pos+1);return v===d?v===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||E.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(b.incDec,2):v===61?this.finishOp(b.assign,2):this.finishOp(b.plusMin,1)},St.readToken_lt_gt=function(d){var v=this.input.charCodeAt(this.pos+1),T=1;return v===d?(T=d===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+T)===61?this.finishOp(b.assign,T+1):this.finishOp(b.bitShift,T)):v===33&&d===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(v===61&&(T=2),this.finishOp(b.relational,T))},St.readToken_eq_excl=function(d){var v=this.input.charCodeAt(this.pos+1);return v===61?this.finishOp(b.equality,this.input.charCodeAt(this.pos+2)===61?3:2):d===61&&v===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(b.arrow)):this.finishOp(d===61?b.eq:b.prefix,1)},St.readToken_question=function(){var d=this.options.ecmaVersion;if(d>=11){var v=this.input.charCodeAt(this.pos+1);if(v===46){var T=this.input.charCodeAt(this.pos+2);if(T<48||T>57)return this.finishOp(b.questionDot,2)}if(v===63){if(d>=12){var I=this.input.charCodeAt(this.pos+2);if(I===61)return this.finishOp(b.assign,3)}return this.finishOp(b.coalesce,2)}}return this.finishOp(b.question,1)},St.readToken_numberSign=function(){var d=this.options.ecmaVersion,v=35;if(d>=13&&(++this.pos,v=this.fullCharCodeAtPos(),m(v,!0)||v===92))return this.finishToken(b.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+xe(v)+"'")},St.getTokenFromCode=function(d){switch(d){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(b.parenL);case 41:return++this.pos,this.finishToken(b.parenR);case 59:return++this.pos,this.finishToken(b.semi);case 44:return++this.pos,this.finishToken(b.comma);case 91:return++this.pos,this.finishToken(b.bracketL);case 93:return++this.pos,this.finishToken(b.bracketR);case 123:return++this.pos,this.finishToken(b.braceL);case 125:return++this.pos,this.finishToken(b.braceR);case 58:return++this.pos,this.finishToken(b.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(b.backQuote);case 48:var v=this.input.charCodeAt(this.pos+1);if(v===120||v===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(v===111||v===79)return this.readRadixNumber(8);if(v===98||v===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(d);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(d);case 124:case 38:return this.readToken_pipe_amp(d);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(d);case 60:case 62:return this.readToken_lt_gt(d);case 61:case 33:return this.readToken_eq_excl(d);case 63:return this.readToken_question();case 126:return this.finishOp(b.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+xe(d)+"'")},St.finishOp=function(d,v){var T=this.input.slice(this.pos,this.pos+v);return this.pos+=v,this.finishToken(d,T)},St.readRegexp=function(){for(var d,v,T=this.pos;;){this.pos>=this.input.length&&this.raise(T,"Unterminated regular expression");var I=this.input.charAt(this.pos);if(E.test(I)&&this.raise(T,"Unterminated regular expression"),d)d=!1;else{if(I==="[")v=!0;else if(I==="]"&&v)v=!1;else if(I==="/"&&!v)break;d=I==="\\"}++this.pos}var V=this.input.slice(T,this.pos);++this.pos;var ee=this.pos,ne=this.readWord1();this.containsEsc&&this.unexpected(ee);var ve=this.regexpState||(this.regexpState=new Xs(this));ve.reset(T,V,ne),this.validateRegExpFlags(ve),this.validateRegExpPattern(ve);var $e=null;try{$e=new RegExp(V,ne)}catch{}return this.finishToken(b.regexp,{pattern:V,flags:ne,value:$e})},St.readInt=function(d,v,T){for(var I=this.options.ecmaVersion>=12&&v===void 0,V=T&&this.input.charCodeAt(this.pos)===48,ee=this.pos,ne=0,ve=0,$e=0,rt=v??1/0;$e<rt;++$e,++this.pos){var dt=this.input.charCodeAt(this.pos),bn=void 0;if(I&&dt===95){V&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),ve===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),$e===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),ve=dt;continue}if(dt>=97?bn=dt-97+10:dt>=65?bn=dt-65+10:dt>=48&&dt<=57?bn=dt-48:bn=1/0,bn>=d)break;ve=dt,ne=ne*d+bn}return I&&ve===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===ee||v!=null&&this.pos-ee!==v?null:ne};function Dj(d,v){return v?parseInt(d,8):parseFloat(d.replace(/_/g,""))}function bE(d){return typeof BigInt!="function"?null:BigInt(d.replace(/_/g,""))}St.readRadixNumber=function(d){var v=this.pos;this.pos+=2;var T=this.readInt(d);return T==null&&this.raise(this.start+2,"Expected number in radix "+d),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(T=bE(this.input.slice(v,this.pos)),++this.pos):m(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(b.num,T)},St.readNumber=function(d){var v=this.pos;!d&&this.readInt(10,void 0,!0)===null&&this.raise(v,"Invalid number");var T=this.pos-v>=2&&this.input.charCodeAt(v)===48;T&&this.strict&&this.raise(v,"Invalid number");var I=this.input.charCodeAt(this.pos);if(!T&&!d&&this.options.ecmaVersion>=11&&I===110){var V=bE(this.input.slice(v,this.pos));return++this.pos,m(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(b.num,V)}T&&/[89]/.test(this.input.slice(v,this.pos))&&(T=!1),I===46&&!T&&(++this.pos,this.readInt(10),I=this.input.charCodeAt(this.pos)),(I===69||I===101)&&!T&&(I=this.input.charCodeAt(++this.pos),(I===43||I===45)&&++this.pos,this.readInt(10)===null&&this.raise(v,"Invalid number")),m(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var ee=Dj(this.input.slice(v,this.pos),T);return this.finishToken(b.num,ee)},St.readCodePoint=function(){var d=this.input.charCodeAt(this.pos),v;if(d===123){this.options.ecmaVersion<6&&this.unexpected();var T=++this.pos;v=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,v>1114111&&this.invalidStringToken(T,"Code point out of bounds")}else v=this.readHexChar(4);return v},St.readString=function(d){for(var v="",T=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var I=this.input.charCodeAt(this.pos);if(I===d)break;I===92?(v+=this.input.slice(T,this.pos),v+=this.readEscapedChar(!1),T=this.pos):I===8232||I===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):($(I)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return v+=this.input.slice(T,this.pos++),this.finishToken(b.string,v)};var SE={};St.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(d){if(d===SE)this.readInvalidTemplateToken();else throw d}this.inTemplateElement=!1},St.invalidStringToken=function(d,v){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw SE;this.raise(d,v)},St.readTmplToken=function(){for(var d="",v=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var T=this.input.charCodeAt(this.pos);if(T===96||T===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===b.template||this.type===b.invalidTemplate)?T===36?(this.pos+=2,this.finishToken(b.dollarBraceL)):(++this.pos,this.finishToken(b.backQuote)):(d+=this.input.slice(v,this.pos),this.finishToken(b.template,d));if(T===92)d+=this.input.slice(v,this.pos),d+=this.readEscapedChar(!0),v=this.pos;else if($(T)){switch(d+=this.input.slice(v,this.pos),++this.pos,T){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:d+=`
|
|
111
|
+
`;break;default:d+=String.fromCharCode(T);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),v=this.pos}else++this.pos}},St.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(b.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
|
|
112
|
+
`&&++this.pos;case`
|
|
113
|
+
`:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")},St.readEscapedChar=function(d){var v=this.input.charCodeAt(++this.pos);switch(++this.pos,v){case 110:return`
|
|
114
|
+
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return xe(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),d){var T=this.pos-1;this.invalidStringToken(T,"Invalid escape sequence in template string")}default:if(v>=48&&v<=55){var I=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],V=parseInt(I,8);return V>255&&(I=I.slice(0,-1),V=parseInt(I,8)),this.pos+=I.length-1,v=this.input.charCodeAt(this.pos),(I!=="0"||v===56||v===57)&&(this.strict||d)&&this.invalidStringToken(this.pos-1-I.length,d?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(V)}return $(v)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(v)}},St.readHexChar=function(d){var v=this.pos,T=this.readInt(16,d);return T===null&&this.invalidStringToken(v,"Bad character escape sequence"),T},St.readWord1=function(){this.containsEsc=!1;for(var d="",v=!0,T=this.pos,I=this.options.ecmaVersion>=6;this.pos<this.input.length;){var V=this.fullCharCodeAtPos();if(g(V,I))this.pos+=V<=65535?1:2;else if(V===92){this.containsEsc=!0,d+=this.input.slice(T,this.pos);var ee=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var ne=this.readCodePoint();(v?m:g)(ne,I)||this.invalidStringToken(ee,"Invalid Unicode escape"),d+=xe(ne),T=this.pos}else break;v=!1}return d+this.input.slice(T,this.pos)},St.readWord=function(){var d=this.readWord1(),v=b.name;return this.keywords.test(d)&&(v=k[d]),this.finishToken(v,d)};var _E="8.18.0";O.acorn={Parser:O,version:_E,defaultOptions:qe,Position:Ae,SourceLocation:Be,getLineInfo:lt,Node:yf,TokenType:x,tokTypes:b,keywordTypes:k,TokContext:Ie,tokContexts:Pe,isIdentifierChar:g,isIdentifierStart:m,Token:Lm,isNewLine:$,lineBreak:E,lineBreakG:P,nonASCIIwhitespace:X};function Qj(d,v){return O.parse(d,v)}function Vj(d,v,T){return O.parseExpressionAt(d,v,T)}function Bj(d,v){return O.tokenizer(d,v)}n.Node=yf,n.Parser=O,n.Position=Ae,n.SourceLocation=Be,n.TokContext=Ie,n.Token=Lm,n.TokenType=x,n.defaultOptions=qe,n.getLineInfo=lt,n.isIdentifierChar=g,n.isIdentifierStart=m,n.isNewLine=$,n.keywordTypes=k,n.lineBreak=E,n.lineBreakG=P,n.nonASCIIwhitespace=X,n.parse=Qj,n.parseExpressionAt=Vj,n.tokContexts=Pe,n.tokTypes=b,n.tokenizer=Bj,n.version=_E}))})(Zf,Zf.exports)),Zf.exports}var b3;function dre(){return b3||(b3=1,(function(t){const e=hre(),n=/^[\da-fA-F]+$/,i=/^\d+$/,r=new WeakMap;function s(l){l=l.Parser.acorn||l;let u=r.get(l);if(!u){const c=l.tokTypes,h=l.TokContext,f=l.TokenType,p=new h("<tag",!1),m=new h("</tag",!1),g=new h("<tag>...</tag>",!0,!0),x={tc_oTag:p,tc_cTag:m,tc_expr:g},y={jsxName:new f("jsxName"),jsxText:new f("jsxText",{beforeExpr:!0}),jsxTagStart:new f("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new f("jsxTagEnd")};y.jsxTagStart.updateContext=function(){this.context.push(g),this.context.push(p),this.exprAllowed=!1},y.jsxTagEnd.updateContext=function(S){let _=this.context.pop();_===p&&S===c.slash||_===m?(this.context.pop(),this.exprAllowed=this.curContext()===g):this.exprAllowed=!0},u={tokContexts:x,tokTypes:y},r.set(l,u)}return u}function o(l){if(!l)return l;if(l.type==="JSXIdentifier")return l.name;if(l.type==="JSXNamespacedName")return l.namespace.name+":"+l.name.name;if(l.type==="JSXMemberExpression")return o(l.object)+"."+o(l.property)}t.exports=function(l){return l=l||{},function(u){return a({allowNamespaces:l.allowNamespaces!==!1,allowNamespacedObjects:!!l.allowNamespacedObjects},u)}},Object.defineProperty(t.exports,"tokTypes",{get:function(){return s(v3()).tokTypes},configurable:!0,enumerable:!0});function a(l,u){const c=u.acorn||v3(),h=s(c),f=c.tokTypes,p=h.tokTypes,m=c.tokContexts,g=h.tokContexts.tc_oTag,x=h.tokContexts.tc_cTag,y=h.tokContexts.tc_expr,S=c.isNewLine,_=c.isIdentifierStart,k=c.isIdentifierChar;return class extends u{static get acornJsx(){return h}jsx_readToken(){let w="",b=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let E=this.input.charCodeAt(this.pos);switch(E){case 60:case 123:return this.pos===this.start?E===60&&this.exprAllowed?(++this.pos,this.finishToken(p.jsxTagStart)):this.getTokenFromCode(E):(w+=this.input.slice(b,this.pos),this.finishToken(p.jsxText,w));case 38:w+=this.input.slice(b,this.pos),w+=this.jsx_readEntity(),b=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(E===62?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:S(E)?(w+=this.input.slice(b,this.pos),w+=this.jsx_readNewLine(!0),b=this.pos):++this.pos}}}jsx_readNewLine(w){let b=this.input.charCodeAt(this.pos),E;return++this.pos,b===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,E=w?`
|
|
115
|
+
`:`\r
|
|
116
|
+
`):E=String.fromCharCode(b),this.options.locations&&(++this.curLine,this.lineStart=this.pos),E}jsx_readString(w){let b="",E=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let P=this.input.charCodeAt(this.pos);if(P===w)break;P===38?(b+=this.input.slice(E,this.pos),b+=this.jsx_readEntity(),E=this.pos):S(P)?(b+=this.input.slice(E,this.pos),b+=this.jsx_readNewLine(!1),E=this.pos):++this.pos}return b+=this.input.slice(E,this.pos++),this.finishToken(f.string,b)}jsx_readEntity(){let w="",b=0,E,P=this.input[this.pos];P!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let $=++this.pos;for(;this.pos<this.input.length&&b++<10;){if(P=this.input[this.pos++],P===";"){w[0]==="#"?w[1]==="x"?(w=w.substr(2),n.test(w)&&(E=String.fromCharCode(parseInt(w,16)))):(w=w.substr(1),i.test(w)&&(E=String.fromCharCode(parseInt(w,10)))):E=e[w];break}w+=P}return E||(this.pos=$,"&")}jsx_readWord(){let w,b=this.pos;do w=this.input.charCodeAt(++this.pos);while(k(w)||w===45);return this.finishToken(p.jsxName,this.input.slice(b,this.pos))}jsx_parseIdentifier(){let w=this.startNode();return this.type===p.jsxName?w.name=this.value:this.type.keyword?w.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(w,"JSXIdentifier")}jsx_parseNamespacedName(){let w=this.start,b=this.startLoc,E=this.jsx_parseIdentifier();if(!l.allowNamespaces||!this.eat(f.colon))return E;var P=this.startNodeAt(w,b);return P.namespace=E,P.name=this.jsx_parseIdentifier(),this.finishNode(P,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===p.jsxTagEnd)return"";let w=this.start,b=this.startLoc,E=this.jsx_parseNamespacedName();for(this.type===f.dot&&E.type==="JSXNamespacedName"&&!l.allowNamespacedObjects&&this.unexpected();this.eat(f.dot);){let P=this.startNodeAt(w,b);P.object=E,P.property=this.jsx_parseIdentifier(),E=this.finishNode(P,"JSXMemberExpression")}return E}jsx_parseAttributeValue(){switch(this.type){case f.braceL:let w=this.jsx_parseExpressionContainer();return w.expression.type==="JSXEmptyExpression"&&this.raise(w.start,"JSX attributes must only be assigned a non-empty expression"),w;case p.jsxTagStart:case f.string:return this.parseExprAtom();default:this.raise(this.start,"JSX value should be either an expression or a quoted JSX text")}}jsx_parseEmptyExpression(){let w=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(w,"JSXEmptyExpression",this.start,this.startLoc)}jsx_parseExpressionContainer(){let w=this.startNode();return this.next(),w.expression=this.type===f.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(f.braceR),this.finishNode(w,"JSXExpressionContainer")}jsx_parseAttribute(){let w=this.startNode();return this.eat(f.braceL)?(this.expect(f.ellipsis),w.argument=this.parseMaybeAssign(),this.expect(f.braceR),this.finishNode(w,"JSXSpreadAttribute")):(w.name=this.jsx_parseNamespacedName(),w.value=this.eat(f.eq)?this.jsx_parseAttributeValue():null,this.finishNode(w,"JSXAttribute"))}jsx_parseOpeningElementAt(w,b){let E=this.startNodeAt(w,b);E.attributes=[];let P=this.jsx_parseElementName();for(P&&(E.name=P);this.type!==f.slash&&this.type!==p.jsxTagEnd;)E.attributes.push(this.jsx_parseAttribute());return E.selfClosing=this.eat(f.slash),this.expect(p.jsxTagEnd),this.finishNode(E,P?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(w,b){let E=this.startNodeAt(w,b),P=this.jsx_parseElementName();return P&&(E.name=P),this.expect(p.jsxTagEnd),this.finishNode(E,P?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(w,b){let E=this.startNodeAt(w,b),P=[],$=this.jsx_parseOpeningElementAt(w,b),B=null;if(!$.selfClosing){e:for(;;)switch(this.type){case p.jsxTagStart:if(w=this.start,b=this.startLoc,this.next(),this.eat(f.slash)){B=this.jsx_parseClosingElementAt(w,b);break e}P.push(this.jsx_parseElementAt(w,b));break;case p.jsxText:P.push(this.parseExprAtom());break;case f.braceL:P.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}o(B.name)!==o($.name)&&this.raise(B.start,"Expected corresponding JSX closing tag for <"+o($.name)+">")}let X=$.name?"Element":"Fragment";return E["opening"+X]=$,E["closing"+X]=B,E.children=P,this.type===f.relational&&this.value==="<"&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(E,"JSX"+X)}jsx_parseText(){let w=this.parseLiteral(this.value);return w.type="JSXText",w}jsx_parseElement(){let w=this.start,b=this.startLoc;return this.next(),this.jsx_parseElementAt(w,b)}parseExprAtom(w){return this.type===p.jsxText?this.jsx_parseText():this.type===p.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(w)}readToken(w){let b=this.curContext();if(b===y)return this.jsx_readToken();if(b===g||b===x){if(_(w))return this.jsx_readWord();if(w==62)return++this.pos,this.finishToken(p.jsxTagEnd);if((w===34||w===39)&&b==g)return this.jsx_readString(w)}return w===60&&this.exprAllowed&&this.input.charCodeAt(this.pos+1)!==33?(++this.pos,this.finishToken(p.jsxTagStart)):super.readToken(w)}updateContext(w){if(this.type==f.braceL){var b=this.curContext();b==g?this.context.push(m.b_expr):b==y?this.context.push(m.b_tmpl):super.updateContext(w),this.exprAllowed=!0}else if(this.type===f.slash&&w===p.jsxTagStart)this.context.length-=2,this.context.push(x),this.exprAllowed=!1;else return super.updateContext(w)}}}})(Ov)),Ov.exports}var pre=dre();const mre=i1(pre);function gre(t){const e=t||{},n=e.addResult,i=e.acorn,r=e.spread;let s=e.allowEmpty,o;if(s==null&&(s=!0),i){if(!i.parseExpressionAt)throw new Error("Expected a proper `acorn` instance passed in as `options.acorn`");o=Object.assign({ecmaVersion:2024,sourceType:"module"},e.acornOptions)}else if(e.acornOptions||e.addResult)throw new Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{123:{name:"mdxFlowExpression",tokenize:a,concrete:!0}},text:{123:{name:"mdxTextExpression",tokenize:l}}};function a(u,c,h){const f=this;return p;function p(y){return m(y)}function m(y){return W0.call(f,u,g,"mdxFlowExpression","mdxFlowExpressionMarker","mdxFlowExpressionChunk",i,o,n,r,s)(y)}function g(y){return Ur(y)?qr(u,x,"whitespace")(y):x(y)}function x(y){const S=f.parser.constructs.flow[60],k=(Array.isArray(S)?S:S?[S]:[]).find(function(w){return w.name==="mdxJsxFlowTag"});return y===60&&k?u.attempt(k,x,h)(y):y===null||ln(y)?c(y):h(y)}}function l(u,c){const h=this;return f;function f(p){return W0.call(h,u,c,"mdxTextExpression","mdxTextExpressionMarker","mdxTextExpressionChunk",i,o,n,r,s,!0)(p)}}}const Ore={tokenize:vre,partial:!0},S3="https://github.com/micromark/micromark-extension-mdxjs-esm",xre=new Set(["ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ImportDeclaration"]);function yre(t){const e={tokenize:r,concrete:!0};if(!t||!t.acorn||!t.acorn.parse)throw new Error("Expected an `acorn` instance passed in as `options.acorn`");const n=t.acorn,i=Object.assign({ecmaVersion:2024,sourceType:"module"},t.acornOptions,{locations:!0});return{flow:{101:e,105:e}};function r(s,o,a){const l=this,u=l.parser.definedModuleSpecifiers||(l.parser.definedModuleSpecifiers=[]),c=this.events.length+1;let h="";return l.interrupt?a:f;function f(S){return l.now().column>1?a(S):(s.enter("mdxjsEsm"),s.enter("mdxjsEsmData"),s.consume(S),h+=String.fromCharCode(S),p)}function p(S){return hC(S)?(s.consume(S),h+=String.fromCharCode(S),p):(h==="import"||h==="export")&&S===32?(s.consume(S),m):a(S)}function m(S){return S===null||ln(S)?(s.exit("mdxjsEsmData"),g(S)):(s.consume(S),m)}function g(S){return S===null?y(S):ln(S)?s.check(Ore,y,x)(S):(s.enter("mdxjsEsmData"),m(S))}function x(S){return s.enter("lineEnding"),s.consume(S),s.exit("lineEnding"),g}function y(S){const _=o8(l.events.slice(c),{acorn:n,acornOptions:i,tokenTypes:["mdxjsEsmData"],prefix:u.length>0?"var "+u.join(",")+`
|
|
117
|
+
`:""});if(_.error){if(S!==null&&_.swallow)return x(S);const w=new mi("Could not parse import/exports with acorn",{cause:_.error,place:{line:_.error.loc.line,column:_.error.loc.column+1,offset:_.error.pos},ruleId:"acorn",source:"micromark-extension-mdxjs-esm"});throw w.url=S3+"#could-not-parse-importexports-with-acorn",w}u.length>0&&_.estree.body.shift();let k=-1;for(;++k<_.estree.body.length;){const w=_.estree.body[k];if(!xre.has(w.type)){const b=new mi("Unexpected `"+w.type+"` in code: only import/exports are supported",{place:e0(w),ruleId:"non-esm",source:"micromark-extension-mdxjs-esm"});throw b.url=S3+"#unexpected-type-in-code-only-importexports-are-supported",b}if(w.type==="ImportDeclaration"&&!l.interrupt){let b=-1;for(;++b<w.specifiers.length;){const E=w.specifiers[b];u.push(E.local.name)}}}return Object.assign(s.exit("mdxjsEsm"),t.addResult?{estree:_.estree}:void 0),o(S)}}}function vre(t,e,n){return i;function i(r){return t.enter("lineEndingBlank"),t.consume(r),t.exit("lineEndingBlank"),t.attempt(oZ,e,n)}}function bre(t){const e=Object.assign({acorn:Kn.extend(mre()),acornOptions:{ecmaVersion:2024,sourceType:"module"},addResult:!0},t);return aZ([yre(e),gre(e),l8(e),u8()])}const vx=C.createContext(void 0);function mm(){const t=C.useContext(vx);if(!t)throw new Error("useNestedEditor must be used within a NestedEditorsProvider");return t}function bx(){const{parentEditor:t,mdastNode:e,lexicalNode:n}=mm();return function(r){t.update(()=>{Is("history-push");const s=st(n.getKey());s&&s.setMdastNode({...e,...r})},{discrete:!0}),t.dispatchCommand(il,void 0)}}function nL(){const{parentEditor:t,lexicalNode:e}=mm();return()=>{t.update(()=>{const n=st(e.getKey());n.selectNext(),n.remove()})}}const Sx=function(t){const{getContent:e,getUpdatedMdastNode:n,contentEditableProps:i,block:r=!1}=t,{parentEditor:s,mdastNode:o,lexicalNode:a,focusEmitter:l}=mm(),u=bx(),c=nL(),h=e(o),f=Ol(),[p,m,g,x,y,S,_,k,w,b,E]=Ft(mr,em,Hh,tm,ia,Su,Xu,rl,Uh,Qw,tO),P=Tt(Hu),[$,B]=C.useState(null);return C.useEffect(()=>{if(!p)return;const X=kw({name:"@mdxeditor/nested",nodes:x,theme:E,namespace:"NestedEditor",parentEditor:s,historyMode:Eq(p)?"nested-shared":"nested-external",historyState:f.getValue(Zd),initialEditorState:()=>{let j=h;r?j.length===0&&(j=[{type:"paragraph",children:[]}]):j=[{type:"paragraph",children:h}],V1({root:pt(),mdastRoot:{type:"root",children:j},visitors:m,directiveDescriptors:S,codeBlockEditorDescriptors:_,defaultCodeBlockLanguage:k,jsxComponentDescriptors:y})}});return B(X),()=>{X.dispose()}},[]),C.useEffect(()=>{if($)return l.subscribe(()=>{$.focus()}),()=>{l.subscribe(()=>{})}},[$,l]),C.useEffect(()=>{if(!$)return;function X(){$.getEditorState().read(()=>{const j=D1({root:pt(),visitors:g,jsxComponentDescriptors:y,jsxIsAvailable:w,addImportStatements:!1}),Z=r?j.children:j.children[0].children;u(n(structuredClone(o),Z))})}return wn($.registerCommand(Dh,()=>(P({editorType:"lexical",rootNode:a,editorRef:$}),!1),Gt),$.registerCommand(Vp,j=>{const Z=j.relatedTarget;return sx(Z,p.getRootElement())?!1:(X(),P(null),!0)},tt),$.registerCommand(il,()=>(X(),!0),tt),$.registerCommand(Ih,()=>(P({editorType:"lexical",rootNode:a,editorRef:$}),!1),Id),$.registerCommand(Nh,(j,Z)=>{const G=Z.getRootElement();return(G==null?void 0:G.innerText)===`
|
|
118
|
+
`?(c(),!0):!1},cr))},[r,$,g,n,y,w,a,o,c,P,u,p]),$?C.createElement(Zw,{initialEditor:$},C.createElement(Xw,{contentEditable:C.createElement(B1,{...i,className:yt(te.nestedEditor,i==null?void 0:i.className)}),placeholder:null,ErrorBoundary:F1}),b.map((X,j)=>C.createElement(X,{key:j}))):null};function ep(){let t=Ua;return{publish:()=>{t()},subscribe:e=>{t=e}}}var Sre=Object.defineProperty,_re=(t,e,n)=>e in t?Sre(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ag=(t,e,n)=>_re(t,typeof e!="symbol"?e+"":e,n);class gm extends us{constructor(e,n,i){super(i),ag(this,"__mdastNode"),ag(this,"__focusEmitter",ep()),ag(this,"__importStatement"),ag(this,"select",()=>{this.__focusEmitter.publish()}),this.__mdastNode=e,this.__importStatement=n}static getType(){return"jsx"}static clone(e){return new gm(structuredClone(e.__mdastNode),structuredClone(e.__importStatement),e.__key)}static importJSON(e){return tp(e.mdastNode,e.importStatement)}getMdastNode(){return this.__mdastNode}getImportStatement(){return this.__importStatement}exportJSON(){return{mdastNode:this.getMdastNode(),importStatement:this.getImportStatement(),type:"jsx",version:1}}createDOM(){return document.createElement(this.__mdastNode.type==="mdxJsxTextElement"?"span":"div")}updateDOM(){return!1}setMdastNode(e){this.getWritable().__mdastNode=e}decorate(e,n){return C.createElement(Cre,{lexicalJsxNode:this,config:n,mdastNode:this.getMdastNode(),parentEditor:e,focusEmitter:this.__focusEmitter})}isInline(){return this.__mdastNode.type==="mdxJsxTextElement"}isKeyboardSelectable(){return!0}}function Cre(t){const{mdastNode:e}=t,n=Bt(ia),i=n.find(s=>s.name===e.name)??n.find(s=>s.name==="*");if(!i)throw new Error(`No JSX descriptor found for ${e.name}`);const r=i.Editor;return C.createElement(vx.Provider,{value:{config:t.config,focusEmitter:t.focusEmitter,mdastNode:e,parentEditor:t.parentEditor,lexicalNode:t.lexicalJsxNode}},C.createElement(r,{descriptor:i,mdastNode:e}))}function tp(t,e){return new gm(t,e)}function wre(t){return t instanceof gm}function kre(t){return _w.includes(t)}const Ere={testLexicalNode:wre,visitLexicalNode({actions:t,mdastParent:e,lexicalNode:n}){function i(o){"children"in o&&o.children instanceof Array&&o.children.forEach(a=>{sL(a)&&!kre(a.name)&&t.registerReferredComponent(a.name),i(a)})}const r=n.getMdastNode(),s=n.getImportStatement();t.registerReferredComponent(r.name,s),i(r),t.appendToParent(e,r)},priority:-200},Tre={testNode:"mdxjsEsm",visitNode(){}},Pre={testNode:(t,{jsxComponentDescriptors:e})=>t.type==="mdxJsxTextElement"||t.type==="mdxJsxFlowElement"?(e.find(i=>i.name===t.name)??e.find(i=>i.name==="*"))!==void 0:!1,visitNode({lexicalParent:t,mdastNode:e,descriptors:{jsxComponentDescriptors:n},metaData:i}){const r=n.find(s=>s.name===e.name)??n.find(s=>s.name==="*");if((r==null?void 0:r.kind)==="text"&&e.type==="mdxJsxFlowElement"){const s={...e,type:"mdxJsxTextElement"},o=ut();o.append(tp(s,e.name?i.importDeclarations[e.name]:void 0)),t.append(o)}else t.append(tp(e,e.name?i.importDeclarations[e.name]:void 0))},priority:-200};var Are=Object.defineProperty,$re=(t,e,n)=>e in t?Are(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_3=(t,e,n)=>$re(t,typeof e!="symbol"?e+"":e,n);class Om extends us{constructor(e,n,i){super(i),_3(this,"__value"),_3(this,"__mdastType"),this.__value=e,this.__mdastType=n}static getType(){return"mdx-expression"}static clone(e){return new Om(e.__value,e.__mdastType,e.__key)}getValue(){return this.__value}getMdastType(){return this.__mdastType}createDOM(){const e=document.createElement("span");return e.classList.add(Hn.mdxExpression),e}updateDOM(){return!1}static importDOM(){return{}}exportDOM(e){const{element:n}=super.exportDOM(e);return{element:n}}static importJSON(e){return iL(e.value,e.mdastType)}exportJSON(){return{...super.exportJSON(),value:this.getValue(),mdastType:this.getMdastType(),type:"mdx-expression",version:1}}extractWithChild(){return!0}isInline(){return this.__mdastType==="mdxTextExpression"}decorate(e){return C.createElement(C.Fragment,null,"{",C.createElement("span",{className:te.inputSizer,"data-value":this.getValue()},C.createElement("input",{size:1,onKeyDown:n=>{(n.target.value===""&&n.key==="Backspace"||n.key==="Delete")&&(n.stopPropagation(),n.nativeEvent.stopImmediatePropagation(),n.preventDefault(),e.update(()=>{this.selectPrevious(),this.remove()}))},onChange:n=>{n.target.parentElement.dataset.value=n.target.value,e.update(()=>{this.getWritable().__value=n.target.value})},type:"text",value:this.getValue()})),"}")}}function iL(t,e){return Ui(new Om(t,e))}function Ire(t){return t instanceof Om}const Rre={testNode:t=>t.type==="mdxTextExpression"||t.type==="mdxFlowExpression",visitNode({lexicalParent:t,mdastNode:e}){t.append(iL(e.value,e.type))},priority:-200},Mre={testLexicalNode:Ire,visitLexicalNode({actions:t,mdastParent:e,lexicalNode:n}){const i={type:n.getMdastType(),value:n.getValue()};t.appendToParent(e,i)}},Nre=t=>{const e=Bt(Vs);return C.createElement(ex,{...t,container:e==null?void 0:e.current})},Lre=C.forwardRef((t,e)=>C.createElement(IM,{...t,className:te.popoverContent,sideOffset:5,side:"top",ref:e},C.createElement("span",{className:te.popoverArrow},C.createElement(tx,null)),t.children)),rk=({title:t,properties:e,onChange:n})=>{const[i,r]=C.useState(!1),s=Bt(fn),{register:o,handleSubmit:a,reset:l}=dx({defaultValues:e});return C.createElement(J1,{open:i,onOpenChange:u=>{r(u)}},C.createElement(EJ,{className:te.iconButton},C.createElement("div",null,s("settings"))),C.createElement(Nre,null,C.createElement(Lre,null,C.createElement("form",{onSubmit:u=>{a(n)(u),r(!1),u.preventDefault(),u.stopPropagation()}},C.createElement("h3",{className:te.propertyPanelTitle},t," Attributes"),C.createElement("table",{className:te.propertyEditorTable},C.createElement("thead",null,C.createElement("tr",null,C.createElement("th",{className:te.readOnlyColumnCell},"Attribute"),C.createElement("th",null,"Value"))),C.createElement("tbody",null,Object.keys(e).map(u=>C.createElement("tr",{key:u},C.createElement("th",{className:te.readOnlyColumnCell}," ",u," "),C.createElement("td",null,C.createElement("input",{...o(u),className:te.propertyEditorInput}))))),C.createElement("tfoot",null,C.createElement("tr",null,C.createElement("td",{colSpan:2},C.createElement("div",{className:te.buttonsFooter},C.createElement("button",{type:"submit",className:te.primaryButton},"Save"),C.createElement("button",{type:"reset",className:te.secondaryButton,onClick:u=>{u.preventDefault(),l(e),r(!1)}},"Cancel"))))))))))},Dre=t=>t!==null&&typeof t=="object"&&"type"in t&&"value"in t&&typeof t.value=="string",Qre=t=>typeof t=="string",Vre=t=>t.type==="mdxJsxAttribute"&&typeof t.name=="string",rL=({mdastNode:t,descriptor:e,PropertyEditor:n})=>{const i=bx(),r=C.useMemo(()=>e.props.reduce((l,{name:u})=>{const c=t.attributes.find(h=>Vre(h)?h.name===u:!1);if(c){if(Dre(c.value))return l[u]=c.value.value,l;if(Qre(c.value))return l[u]=c.value,l}return l[u]="",l},{}),[t,e]),s=C.useCallback(l=>{const u=Object.entries(l).reduce((c,[h,f])=>{if(f==="")return c;const p=e.props.find(m=>m.name===h);return(p==null?void 0:p.type)==="expression"?(c.push({type:"mdxJsxAttribute",name:h,value:{type:"mdxJsxAttributeValueExpression",value:f}}),c):(c.push({type:"mdxJsxAttribute",name:h,value:f}),c)},[]);i({attributes:u})},[t,i,e]),o=n??rk,a=e.props.length==0&&e.hasChildren&&e.kind==="flow";return C.createElement("div",{className:e.kind==="text"?te.inlineEditor:te.blockEditor},a?C.createElement("span",{className:te.genericComponentName},t.name??"Fragment"):null,e.props.length>0?C.createElement(o,{properties:r,title:t.name??"",onChange:s}):null,e.hasChildren?C.createElement(Sx,{block:e.kind==="flow",getContent:l=>l.children,getUpdatedMdastNode:(l,u)=>({...l,children:u})}):C.createElement("span",{className:te.genericComponentName},t.name))};function sL(t){return t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement"}const Bre=t=>t!==null&&typeof t=="object"&&"type"in t&&"value"in t&&typeof t.value=="string",Fre=t=>Object.entries(t).map(([e,n])=>({type:"mdxJsxAttribute",name:e,value:Bre(n)?{type:"mdxJsxAttributeValueExpression",value:n.value}:n})),oL=kn(t=>{t.link(t.pipe(oL,As(({kind:e,name:n,children:i,props:r})=>()=>{const s=Fre(r);return tp(e==="flow"?{type:"mdxJsxFlowElement",name:n,children:i??[],attributes:s}:{type:"mdxJsxTextElement",name:n,children:i??[],attributes:s})})),Yh)}),C3={name:null,kind:"flow",props:[],hasChildren:!0,Editor:rL},w3=t=>t?t.allowFragment??!0?[C3,...t.jsxComponentDescriptors]:t.jsxComponentDescriptors:[C3],jre=Vn({init:(t,e)=>{t.pubIn({[Uh]:!0,[ol]:wie(),[sl]:bre(),[hr]:[Pre,Tre,Rre],[Nr]:[gm,Om],[Lr]:[Ere,Mre],[Wu]:kie(),[ia]:w3(e)})},update(t,e){t.pub(ia,w3(e))}});function aL(t,e,n,i){const r=[...t].sort((o,a)=>a.priority-o.priority),s=n??"";return r.find(o=>o.match(e??"",s))??r.find(o=>o.match(i??"",s))}var Zre=Object.defineProperty,zre=(t,e,n)=>e in t?Zre(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,wa=(t,e,n)=>zre(t,typeof e!="symbol"?e+"":e,n);class ec extends us{constructor(e,n,i,r){super(r),wa(this,"__code"),wa(this,"__meta"),wa(this,"__language"),wa(this,"__focusEmitter",ep()),wa(this,"setCode",s=>{s!==this.__code&&(this.getWritable().__code=s)}),wa(this,"setMeta",s=>{s!==this.__meta&&(this.getWritable().__meta=s)}),wa(this,"setLanguage",s=>{s!==this.__language&&(this.getWritable().__language=s)}),wa(this,"select",()=>{this.__focusEmitter.publish()}),this.__code=e,this.__meta=i,this.__language=n}static getType(){return"codeblock"}static clone(e){return new ec(e.__code,e.__language,e.__meta,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__code=e.__code,this.__meta=e.__meta,this.__language=e.__language,this.__focusEmitter=ep()}static importJSON(e){const n=typeof e.code=="string"?e.code:"",i=typeof e.language=="string"?e.language:"",r=typeof e.meta=="string"?e.meta:"";return lf({code:n,language:i,meta:r})}static importDOM(){return{pre:()=>({conversion:uL,priority:3})}}exportJSON(){return{code:this.getCode(),language:this.getLanguage(),meta:this.getMeta(),type:"codeblock",version:1}}createDOM(e,n){return document.createElement("div")}updateDOM(){return!1}getCode(){return this.__code}getMeta(){return this.__meta}getLanguage(){return this.__language}decorate(e){return C.createElement(Wre,{parentEditor:e,code:this.getCode(),meta:this.getMeta(),language:this.getLanguage(),codeBlockNode:this,nodeKey:this.getKey(),focusEmitter:this.__focusEmitter})}isInline(){return!1}}const lL=C.createContext(null),Xre=({parentEditor:t,lexicalNode:e,children:n})=>{const i=C.useMemo(()=>({lexicalNode:e,parentEditor:t,setCode:r=>{t.update(()=>{e.setCode(r),setTimeout(()=>{t.dispatchCommand(il,void 0)},0)})},setLanguage:r=>{t.update(()=>{e.setLanguage(r)})},setMeta:r=>{t.update(()=>{e.setMeta(r)})}}),[e,t]);return C.createElement(lL.Provider,{value:i},n)};function xO(){const t=C.useContext(lL);if(!t)throw new Error("useCodeBlockEditor must be used within a CodeBlockEditor");return t}const Wre=t=>{const e=Bt(Xu),n=Bt(rl),i=aL(e,t.language,t.meta,n);if(!i)throw new Error(`No CodeBlockEditor registered for language=${t.language} meta=${t.meta}`);const r=i.Editor,{codeBlockNode:s,parentEditor:o,...a}=t;return C.createElement(Xre,{parentEditor:t.parentEditor,lexicalNode:t.codeBlockNode},C.createElement(r,{...a}))};function lf(t){const{code:e="",language:n="",meta:i=""}=t;return new ec(e,n,i)}function sk(t){return t instanceof ec}function uL(t){const e=t,n=e.textContent,i=t.getAttribute("class")??"",r=t.getAttribute("data-language")??"",s=/language-(\w+)/.exec(i),o=s?s[1]:r,a=e.getAttribute("data-meta")??"";return{node:lf({code:n,language:o,meta:a})}}const Hre={testLexicalNode:sk,visitLexicalNode:({lexicalNode:t,actions:e})=>{e.addAndStepInto("code",{value:t.getCode(),lang:t.getLanguage(),meta:t.getMeta()})}},Ure={testNode:(t,{codeBlockEditorDescriptors:e,defaultCodeBlockLanguage:n})=>t.type==="code"?aL(e,t.lang,t.meta,n)!==void 0:!1,visitNode({mdastNode:t,actions:e}){e.addAndStepInto(lf({code:t.value,language:t.lang??"",meta:t.meta??""}))}},_x=kn(t=>{t.link(t.pipe(_x,On(rl),As(([e,n])=>()=>lf({language:n,...e}))),Yh)}),cL=_i(Xu),qre=Vn({update(t,e){t.pub(rl,(e==null?void 0:e.defaultCodeBlockLanguage)??"")},init(t,e){t.pubIn({[Uu]:"codeblock",[rl]:(e==null?void 0:e.defaultCodeBlockLanguage)??"",[Xu]:(e==null?void 0:e.codeBlockEditorDescriptors)??[],[hr]:Ure,[Nr]:ec,[Lr]:Hre})}}),hL=1024;let Yre=0,Gr=class{constructor(e,n){this.from=e,this.to=n}};class ot{constructor(e={}){this.id=Yre++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Xn.match(e)),n=>{let i=e(n);return i===void 0?null:[this,i]}}}ot.closedBy=new ot({deserialize:t=>t.split(" ")});ot.openedBy=new ot({deserialize:t=>t.split(" ")});ot.group=new ot({deserialize:t=>t.split(" ")});ot.isolate=new ot({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});ot.contextHash=new ot({perNode:!0});ot.lookAhead=new ot({perNode:!0});ot.mounted=new ot({perNode:!0});class Bc{constructor(e,n,i,r=!1){this.tree=e,this.overlay=n,this.parser=i,this.bracketed=r}static get(e){return e&&e.props&&e.props[ot.mounted.id]}}const Gre=Object.create(null);class Xn{constructor(e,n,i,r=0){this.name=e,this.props=n,this.id=i,this.flags=r}static define(e){let n=e.props&&e.props.length?Object.create(null):Gre,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new Xn(e.name||"",n,e.id,i);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(r)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[s[0].id]=s[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(ot.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let i in e)for(let r of i.split(" "))n[r]=e[i];return i=>{for(let r=i.prop(ot.group),s=-1;s<(r?r.length:0);s++){let o=n[s<0?i.name:r[s]];if(o)return o}}}}Xn.none=new Xn("",Object.create(null),0,8);class uf{constructor(e){this.types=e;for(let n=0;n<e.length;n++)if(e[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let n=[];for(let i of this.types){let r=null;for(let s of e){let o=s(i);if(o){r||(r=Object.assign({},i.props));let a=o[1],l=o[0];l.combine&&l.id in r&&(a=l.combine(r[l.id],a)),r[l.id]=a}}n.push(r?new Xn(i.name,r,i.id,i.flags):i)}return new uf(n)}}const lg=new WeakMap,k3=new WeakMap;var Xt;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays",t[t.EnterBracketed=16]="EnterBracketed"})(Xt||(Xt={}));class bt{constructor(e,n,i,r,s){if(this.type=e,this.children=n,this.positions=i,this.length=r,this.props=null,s&&s.length){this.props=Object.create(null);for(let[o,a]of s)this.props[typeof o=="number"?o:o.id]=a}}toString(){let e=Bc.get(this);if(e&&!e.overlay)return e.tree.toString();let n="";for(let i of this.children){let r=i.toString();r&&(n&&(n+=","),n+=r)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(e=0){return new yO(this.topNode,e)}cursorAt(e,n=0,i=0){let r=lg.get(this)||this.topNode,s=new yO(r);return s.moveTo(e,n),lg.set(this,s._tree),s}get topNode(){return new Ai(this,0,0,null)}resolve(e,n=0){let i=np(lg.get(this)||this.topNode,e,n,!1);return lg.set(this,i),i}resolveInner(e,n=0){let i=np(k3.get(this)||this.topNode,e,n,!0);return k3.set(this,i),i}resolveStack(e,n=0){return ese(this,e,n)}iterate(e){let{enter:n,leave:i,from:r=0,to:s=this.length}=e,o=e.mode||0,a=(o&Xt.IncludeAnonymous)>0;for(let l=this.cursor(o|Xt.IncludeAnonymous);;){let u=!1;if(l.from<=s&&l.to>=r&&(!a&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;u=!0}for(;u&&i&&(a||!l.type.isAnonymous)&&i(l),!l.nextSibling();){if(!l.parent())return;u=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:lk(Xn.none,this.children,this.positions,0,this.children.length,0,this.length,(n,i,r)=>new bt(this.type,n,i,r,this.propValues),e.makeTree||((n,i,r)=>new bt(Xn.none,n,i,r)))}static build(e){return tse(e)}}bt.empty=new bt(Xn.none,[],[],0);class ok{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new ok(this.buffer,this.index)}}class cl{constructor(e,n,i){this.buffer=e,this.length=n,this.set=i}get type(){return Xn.none}toString(){let e=[];for(let n=0;n<this.buffer.length;)e.push(this.childString(n)),n=this.buffer[n+3];return e.join(",")}childString(e){let n=this.buffer[e],i=this.buffer[e+3],r=this.set.types[n],s=r.name;if(/\W/.test(s)&&!r.isError&&(s=JSON.stringify(s)),e+=4,i==e)return s;let o=[];for(;e<i;)o.push(this.childString(e)),e=this.buffer[e+3];return s+"("+o.join(",")+")"}findChild(e,n,i,r,s){let{buffer:o}=this,a=-1;for(let l=e;l!=n&&!(fL(s,r,o[l+1],o[l+2])&&(a=l,i>0));l=o[l+3]);return a}slice(e,n,i){let r=this.buffer,s=new Uint16Array(n-e),o=0;for(let a=e,l=0;a<n;){s[l++]=r[a++],s[l++]=r[a++]-i;let u=s[l++]=r[a++]-i;s[l++]=r[a++]-e,o=Math.max(o,u)}return new cl(s,o,this.set)}}function fL(t,e,n,i){switch(t){case-2:return n<e;case-1:return i>=e&&n<e;case 0:return n<e&&i>e;case 1:return n<=e&&i>e;case 2:return i>e;case 4:return!0}}function np(t,e,n,i){for(var r;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let o=!i&&t instanceof Ai&&t.index<0?null:t.parent;if(!o)return t;t=o}let s=i?0:Xt.IgnoreOverlays;if(i)for(let o=t,a=o.parent;a;o=a,a=o.parent)o instanceof Ai&&o.index<0&&((r=a.enter(e,n,s))===null||r===void 0?void 0:r.from)!=o.from&&(t=a);for(;;){let o=t.enter(e,n,s);if(!o)return t;t=o}}class dL{cursor(e=0){return new yO(this,e)}getChild(e,n=null,i=null){let r=E3(this,e,n,i);return r.length?r[0]:null}getChildren(e,n=null,i=null){return E3(this,e,n,i)}resolve(e,n=0){return np(this,e,n,!1)}resolveInner(e,n=0){return np(this,e,n,!0)}matchContext(e){return e_(this.parent,e)}enterUnfinishedNodesBefore(e){let n=this.childBefore(e),i=this;for(;n;){let r=n.lastChild;if(!r||r.to!=n.to)break;r.type.isError&&r.from==r.to?(i=n,n=r.prevSibling):n=r}return i}get node(){return this}get next(){return this.parent}}class Ai extends dL{constructor(e,n,i,r){super(),this._tree=e,this.from=n,this.index=i,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,n,i,r,s=0){for(let o=this;;){for(let{children:a,positions:l}=o._tree,u=n>0?a.length:-1;e!=u;e+=n){let c=a[e],h=l[e]+o.from,f;if(!(!(s&Xt.EnterBracketed&&c instanceof bt&&(f=Bc.get(c))&&!f.overlay&&f.bracketed&&i>=h&&i<=h+c.length)&&!fL(r,i,h,h+c.length))){if(c instanceof cl){if(s&Xt.ExcludeBuffers)continue;let p=c.findChild(0,c.buffer.length,n,i-h,r);if(p>-1)return new ro(new Kre(o,c,e,h),null,p)}else if(s&Xt.IncludeAnonymous||!c.type.isAnonymous||ak(c)){let p;if(!(s&Xt.IgnoreMounts)&&(p=Bc.get(c))&&!p.overlay)return new Ai(p.tree,h,e,o);let m=new Ai(c,h,e,o);return s&Xt.IncludeAnonymous||!m.type.isAnonymous?m:m.nextChild(n<0?c.children.length-1:0,n,i,r,s)}}}if(s&Xt.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+n:e=n<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,n,i=0){let r;if(!(i&Xt.IgnoreOverlays)&&(r=Bc.get(this._tree))&&r.overlay){let s=e-this.from,o=i&Xt.EnterBracketed&&r.bracketed;for(let{from:a,to:l}of r.overlay)if((n>0||o?a<=s:a<s)&&(n<0||o?l>=s:l>s))return new Ai(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function E3(t,e,n,i){let r=t.cursor(),s=[];if(!r.firstChild())return s;if(n!=null){for(let o=!1;!o;)if(o=r.type.is(n),!r.nextSibling())return s}for(;;){if(i!=null&&r.type.is(i))return s;if(r.type.is(e)&&s.push(r.node),!r.nextSibling())return i==null?s:[]}}function e_(t,e,n=e.length-1){for(let i=t;n>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[n]&&e[n]!=i.name)return!1;n--}}return!0}class Kre{constructor(e,n,i,r){this.parent=e,this.buffer=n,this.index=i,this.start=r}}class ro extends dL{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,i){super(),this.context=e,this._parent=n,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,n,i){let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.context.start,i);return s<0?null:new ro(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,n,i=0){if(i&Xt.ExcludeBuffers)return null;let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return s<0?null:new ro(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new ro(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new ro(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:i}=this.context,r=this.index+4,s=i.buffer[this.index+3];if(s>r){let o=i.buffer[this.index+1];e.push(i.slice(r,s,o)),n.push(0)}return new bt(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function pL(t){if(!t.length)return null;let e=0,n=t[0];for(let s=1;s<t.length;s++){let o=t[s];(o.from>n.from||o.to<n.to)&&(n=o,e=s)}let i=n instanceof Ai&&n.index<0?null:n.parent,r=t.slice();return i?r[e]=i:r.splice(e,1),new Jre(r,n)}class Jre{constructor(e,n){this.heads=e,this.node=n}get next(){return pL(this.heads)}}function ese(t,e,n){let i=t.resolveInner(e,n),r=null;for(let s=i instanceof Ai?i:i.context.parent;s;s=s.parent)if(s.index<0){let o=s.parent;(r||(r=[i])).push(o.resolve(e,n)),s=o}else{let o=Bc.get(s.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let a=new Ai(o.tree,o.overlay[0].from+s.from,-1,s);(r||(r=[i])).push(np(a,e,n,!1))}}return r?pL(r):i}class yO{get name(){return this.type.name}constructor(e,n=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=n&~Xt.EnterBracketed,e instanceof Ai)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:i,buffer:r}=this.buffer;return this.type=n||r.set.types[r.buffer[e]],this.from=i+r.buffer[e+1],this.to=i+r.buffer[e+2],!0}yield(e){return e?e instanceof Ai?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,i,this.mode));let{buffer:r}=this.buffer,s=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.buffer.start,i);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,i=this.mode){return this.buffer?i&Xt.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Xt.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Xt.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,i=this.stack.length-1;if(e<0){let r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(n.findChild(r,this.index,-1,0,4))}else{let r=n.buffer[this.index+3];if(r<(i<0?n.buffer.length:n.buffer[this.stack[i]+3]))return this.yieldBuf(r)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,i,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(r.buffer.buffer[s+3]<this.index)return!1;({index:n,parent:i}=r)}else({index:n,_parent:i}=this._tree);for(;i;{index:n,_parent:i}=i)if(n>-1)for(let s=n+e,o=e<0?-1:i._tree.children.length;s!=o;s+=e){let a=i._tree.children[s];if(this.mode&Xt.IncludeAnonymous||a instanceof cl||!a.type.isAnonymous||ak(a))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,n););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,n=null,i=0;if(e&&e.context==this.buffer)e:for(let r=this.index,s=this.stack.length;s>=0;){for(let o=e;o;o=o._parent)if(o.index==r){if(r==this.index)return o;n=o,i=s+1;break e}r=this.stack[--s]}for(let r=i;r<this.stack.length;r++)n=new ro(this.buffer,n,this.stack[r]);return this.bufferNode=new ro(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,n){for(let i=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){i++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&n&&n(this),r=this.type.isAnonymous,!i)return;if(this.nextSibling())break;this.parent(),i--,r=!0}}}matchContext(e){if(!this.buffer)return e_(this.node.parent,e);let{buffer:n}=this.buffer,{types:i}=n.set;for(let r=e.length-1,s=this.stack.length-1;r>=0;s--){if(s<0)return e_(this._tree,e,r);let o=i[n.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[r]&&e[r]!=o.name)return!1;r--}}return!0}}function ak(t){return t.children.some(e=>e instanceof cl||!e.type.isAnonymous||ak(e))}function tse(t){var e;let{buffer:n,nodeSet:i,maxBufferLength:r=hL,reused:s=[],minRepeatType:o=i.types.length}=t,a=Array.isArray(n)?new ok(n,n.length):n,l=i.types,u=0,c=0;function h(w,b,E,P,$,B){let{id:X,start:j,end:Z,size:G}=a,z=c,J=u;if(G<0)if(a.next(),G==-1){let Re=s[X];E.push(Re),P.push(j-w);return}else if(G==-3){u=X;return}else if(G==-4){c=X;return}else throw new RangeError(`Unrecognized record size: ${G}`);let ue=l[X],Le,ye,xe=j-w;if(Z-j<=r&&(ye=x(a.pos-b,$))){let Re=new Uint16Array(ye.size-ye.skip),Ae=a.pos-ye.size,Be=Re.length;for(;a.pos>Ae;)Be=y(ye.start,Re,Be);Le=new cl(Re,Z-ye.start,i),xe=ye.start-w}else{let Re=a.pos-G;a.next();let Ae=[],Be=[],lt=X>=o?X:-1,qe=0,je=Z;for(;a.pos>Re;)lt>=0&&a.id==lt&&a.size>=0?(a.end<=je-r&&(m(Ae,Be,j,qe,a.end,je,lt,z,J),qe=Ae.length,je=a.end),a.next()):B>2500?f(j,Re,Ae,Be):h(j,Re,Ae,Be,lt,B+1);if(lt>=0&&qe>0&&qe<Ae.length&&m(Ae,Be,j,qe,j,je,lt,z,J),Ae.reverse(),Be.reverse(),lt>-1&&qe>0){let we=p(ue,J);Le=lk(ue,Ae,Be,0,Ae.length,0,Z-j,we,we)}else Le=g(ue,Ae,Be,Z-j,z-Z,J)}E.push(Le),P.push(xe)}function f(w,b,E,P){let $=[],B=0,X=-1;for(;a.pos>b;){let{id:j,start:Z,end:G,size:z}=a;if(z>4)a.next();else{if(X>-1&&Z<X)break;X<0&&(X=G-r),$.push(j,Z,G),B++,a.next()}}if(B){let j=new Uint16Array(B*4),Z=$[$.length-2];for(let G=$.length-3,z=0;G>=0;G-=3)j[z++]=$[G],j[z++]=$[G+1]-Z,j[z++]=$[G+2]-Z,j[z++]=z;E.push(new cl(j,$[2]-Z,i)),P.push(Z-w)}}function p(w,b){return(E,P,$)=>{let B=0,X=E.length-1,j,Z;if(X>=0&&(j=E[X])instanceof bt){if(!X&&j.type==w&&j.length==$)return j;(Z=j.prop(ot.lookAhead))&&(B=P[X]+j.length+Z)}return g(w,E,P,$,B,b)}}function m(w,b,E,P,$,B,X,j,Z){let G=[],z=[];for(;w.length>P;)G.push(w.pop()),z.push(b.pop()+E-$);w.push(g(i.types[X],G,z,B-$,j-B,Z)),b.push($-E)}function g(w,b,E,P,$,B,X){if(B){let j=[ot.contextHash,B];X=X?[j].concat(X):[j]}if($>25){let j=[ot.lookAhead,$];X=X?[j].concat(X):[j]}return new bt(w,b,E,P,X)}function x(w,b){let E=a.fork(),P=0,$=0,B=0,X=E.end-r,j={size:0,start:0,skip:0};e:for(let Z=E.pos-w;E.pos>Z;){let G=E.size;if(E.id==b&&G>=0){j.size=P,j.start=$,j.skip=B,B+=4,P+=4,E.next();continue}let z=E.pos-G;if(G<0||z<Z||E.start<X)break;let J=E.id>=o?4:0,ue=E.start;for(E.next();E.pos>z;){if(E.size<0)if(E.size==-3||E.size==-4)J+=4;else break e;else E.id>=o&&(J+=4);E.next()}$=ue,P+=G,B+=J}return(b<0||P==w)&&(j.size=P,j.start=$,j.skip=B),j.size>4?j:void 0}function y(w,b,E){let{id:P,start:$,end:B,size:X}=a;if(a.next(),X>=0&&P<o){let j=E;if(X>4){let Z=a.pos-(X-4);for(;a.pos>Z;)E=y(w,b,E)}b[--E]=j,b[--E]=B-w,b[--E]=$-w,b[--E]=P}else X==-3?u=P:X==-4&&(c=P);return E}let S=[],_=[];for(;a.pos>0;)h(t.start||0,t.bufferStart||0,S,_,-1,0);let k=(e=t.length)!==null&&e!==void 0?e:S.length?_[0]+S[0].length:0;return new bt(l[t.topID],S.reverse(),_.reverse(),k)}const T3=new WeakMap;function s0(t,e){if(!t.isAnonymous||e instanceof cl||e.type!=t)return 1;let n=T3.get(e);if(n==null){n=1;for(let i of e.children){if(i.type!=t||!(i instanceof bt)){n=1;break}n+=s0(t,i)}T3.set(e,n)}return n}function lk(t,e,n,i,r,s,o,a,l){let u=0;for(let m=i;m<r;m++)u+=s0(t,e[m]);let c=Math.ceil(u*1.5/8),h=[],f=[];function p(m,g,x,y,S){for(let _=x;_<y;){let k=_,w=g[_],b=s0(t,m[_]);for(_++;_<y;_++){let E=s0(t,m[_]);if(b+E>=c)break;b+=E}if(_==k+1){if(b>c){let E=m[k];p(E.children,E.positions,0,E.children.length,g[k]+S);continue}h.push(m[k])}else{let E=g[_-1]+m[_-1].length-w;h.push(lk(t,m,g,k,_,w,E,null,l))}f.push(w+S-s)}}return p(e,n,i,r,0),(a||l)(h,f,o)}class mL{constructor(){this.map=new WeakMap}setBuffer(e,n,i){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(n,i)}getBuffer(e,n){let i=this.map.get(e);return i&&i.get(n)}set(e,n){e instanceof ro?this.setBuffer(e.context.buffer,e.index,n):e instanceof Ai&&this.map.set(e.tree,n)}get(e){return e instanceof ro?this.getBuffer(e.context.buffer,e.index):e instanceof Ai?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class qo{constructor(e,n,i,r,s=!1,o=!1){this.from=e,this.to=n,this.tree=i,this.offset=r,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],i=!1){let r=[new qo(0,e.length,e,0,!1,i)];for(let s of n)s.to>e.length&&r.push(s);return r}static applyChanges(e,n,i=128){if(!n.length)return e;let r=[],s=1,o=e.length?e[0]:null;for(let a=0,l=0,u=0;;a++){let c=a<n.length?n[a]:null,h=c?c.fromA:1e9;if(h-l>=i)for(;o&&o.from<h;){let f=o;if(l>=f.from||h<=f.to||u){let p=Math.max(f.from,l)-u,m=Math.min(f.to,h)-u;f=p>=m?null:new qo(p,m,f.tree,f.offset+u,a>0,!!c)}if(f&&r.push(f),o.to>h)break;o=s<e.length?e[s++]:null}if(!c)break;l=c.toA,u=c.toA-c.toB}return r}}class Cx{startParse(e,n,i){return typeof e=="string"&&(e=new nse(e)),i=i?i.length?i.map(r=>new Gr(r.from,r.to)):[new Gr(0,0)]:[new Gr(0,e.length)],this.createParse(e,n||[],i)}parse(e,n,i){let r=this.startParse(e,n,i);for(;;){let s=r.advance();if(s)return s}}}class nse{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}function gL(t){return(e,n,i,r)=>new rse(e,t,n,i,r)}class P3{constructor(e,n,i,r,s,o){this.parser=e,this.parse=n,this.overlay=i,this.bracketed=r,this.target=s,this.from=o}}function A3(t){if(!t.length||t.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class ise{constructor(e,n,i,r,s,o,a,l){this.parser=e,this.predicate=n,this.mounts=i,this.index=r,this.start=s,this.bracketed=o,this.target=a,this.prev=l,this.depth=0,this.ranges=[]}}const t_=new ot({perNode:!0});class rse{constructor(e,n,i,r,s){this.nest=n,this.input=i,this.fragments=r,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let r of this.inner)r.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new bt(i.type,i.children,i.positions,i.length,i.propValues.concat([[t_,this.stoppedAt]]))),i}let e=this.inner[this.innerDone],n=e.parse.advance();if(n){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[ot.mounted.id]=new Bc(n,e.overlay,e.parser,e.bracketed),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].from<e&&(e=Math.min(e,this.inner[n].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].parse.stopAt(e)}startInner(){let e=new ase(this.fragments),n=null,i=null,r=new yO(new Ai(this.baseTree,this.ranges[0].from,0,null),Xt.IncludeAnonymous|Xt.IgnoreMounts);e:for(let s,o;;){let a=!0,l;if(this.stoppedAt!=null&&r.from>=this.stoppedAt)a=!1;else if(e.hasNode(r)){if(n){let u=n.mounts.find(c=>c.frag.from<=r.from&&c.frag.to>=r.to&&c.mount.overlay);if(u)for(let c of u.mount.overlay){let h=c.from+u.pos,f=c.to+u.pos;h>=r.from&&f<=r.to&&!n.ranges.some(p=>p.from<f&&p.to>h)&&n.ranges.push({from:h,to:f})}}a=!1}else if(i&&(o=sse(i.ranges,r.from,r.to)))a=o!=2;else if(!r.type.isAnonymous&&(s=this.nest(r,this.input))&&(r.from<r.to||!s.overlay)){r.tree||(ose(r),n&&n.depth++,i&&i.depth++);let u=e.findMounts(r.from,s.parser);if(typeof s.overlay=="function")n=new ise(s.parser,s.overlay,u,this.inner.length,r.from,!!s.bracketed,r.tree,n);else{let c=R3(this.ranges,s.overlay||(r.from<r.to?[new Gr(r.from,r.to)]:[]));c.length&&A3(c),(c.length||!s.overlay)&&this.inner.push(new P3(s.parser,c.length?s.parser.startParse(this.input,M3(u,c),c):s.parser.startParse(""),s.overlay?s.overlay.map(h=>new Gr(h.from-r.from,h.to-r.from)):null,!!s.bracketed,r.tree,c.length?c[0].from:r.from)),s.overlay?c.length&&(i={ranges:c,depth:0,prev:i}):a=!1}}else if(n&&(l=n.predicate(r))&&(l===!0&&(l=new Gr(r.from,r.to)),l.from<l.to)){let u=n.ranges.length-1;u>=0&&n.ranges[u].to==l.from?n.ranges[u]={from:n.ranges[u].from,to:l.to}:n.ranges.push(l)}if(a&&r.firstChild())n&&n.depth++,i&&i.depth++;else for(;!r.nextSibling();){if(!r.parent())break e;if(n&&!--n.depth){let u=R3(this.ranges,n.ranges);u.length&&(A3(u),this.inner.splice(n.index,0,new P3(n.parser,n.parser.startParse(this.input,M3(n.mounts,u),u),n.ranges.map(c=>new Gr(c.from-n.start,c.to-n.start)),n.bracketed,n.target,u[0].from))),n=n.prev}i&&!--i.depth&&(i=i.prev)}}}}function sse(t,e,n){for(let i of t){if(i.from>=n)break;if(i.to>e)return i.from<=e&&i.to>=n?2:1}return 0}function $3(t,e,n,i,r,s){if(e<n){let o=t.buffer[e+1];i.push(t.slice(e,n,o)),r.push(o-s)}}function ose(t){let{node:e}=t,n=[],i=e.context.buffer;do n.push(t.index),t.parent();while(!t.tree);let r=t.tree,s=r.children.indexOf(i),o=r.children[s],a=o.buffer,l=[s];function u(c,h,f,p,m,g){let x=n[g],y=[],S=[];$3(o,c,x,y,S,p);let _=a[x+1],k=a[x+2];l.push(y.length);let w=g?u(x+4,a[x+3],o.set.types[a[x]],_,k-_,g-1):e.toTree();return y.push(w),S.push(_-p),$3(o,a[x+3],h,y,S,p),new bt(f,y,S,m)}r.children[s]=u(0,a.length,Xn.none,0,o.length,n.length-1);for(let c of l){let h=t.tree.children[c],f=t.tree.positions[c];t.yield(new Ai(h,f+t.from,c,t._tree))}}class I3{constructor(e,n){this.offset=n,this.done=!1,this.cursor=e.cursor(Xt.IncludeAnonymous|Xt.IgnoreMounts)}moveTo(e){let{cursor:n}=this,i=e-this.offset;for(;!this.done&&n.from<i;)if(!(n.to>=e&&n.enter(i,1,Xt.IgnoreOverlays|Xt.ExcludeBuffers)))if(n.to<=e)n.next(!1)||(this.done=!0);else break}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let n=this.cursor.tree;;){if(n==e.tree)return!0;if(n.children.length&&n.positions[0]==0&&n.children[0]instanceof bt)n=n.children[0];else break}return!1}}let ase=class{constructor(e){var n;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=(n=i.tree.prop(t_))!==null&&n!==void 0?n:i.to,this.inner=new I3(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let n=this.curFrag=this.fragments[this.fragI];this.curTo=(e=n.tree.prop(t_))!==null&&e!==void 0?e:n.to,this.inner=new I3(n.tree,-n.offset)}}findMounts(e,n){var i;let r=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let o=(i=s.tree)===null||i===void 0?void 0:i.prop(ot.mounted);if(o&&o.parser==n)for(let a=this.fragI;a<this.fragments.length;a++){let l=this.fragments[a];if(l.from>=s.to)break;l.tree==this.curFrag.tree&&r.push({frag:l,pos:s.from-l.offset,mount:o})}}}return r}};function R3(t,e){let n=null,i=e;for(let r=1,s=0;r<t.length;r++){let o=t[r-1].to,a=t[r].from;for(;s<i.length;s++){let l=i[s];if(l.from>=a)break;l.to<=o||(n||(i=n=e.slice()),l.from<o?(n[s]=new Gr(l.from,o),l.to>a&&n.splice(s+1,0,new Gr(a,l.to))):l.to>a?n[s--]=new Gr(a,l.to):n.splice(s--,1))}}return i}function lse(t,e,n,i){let r=0,s=0,o=!1,a=!1,l=-1e9,u=[];for(;;){let c=r==t.length?1e9:o?t[r].to:t[r].from,h=s==e.length?1e9:a?e[s].to:e[s].from;if(o!=a){let f=Math.max(l,n),p=Math.min(c,h,i);f<p&&u.push(new Gr(f,p))}if(l=Math.min(c,h),l==1e9)break;c==l&&(o?(o=!1,r++):o=!0),h==l&&(a?(a=!1,s++):a=!0)}return u}function M3(t,e){let n=[];for(let{pos:i,mount:r,frag:s}of t){let o=i+(r.overlay?r.overlay[0].from:0),a=o+r.tree.length,l=Math.max(s.from,o),u=Math.min(s.to,a);if(r.overlay){let c=r.overlay.map(f=>new Gr(f.from+i,f.to+i)),h=lse(e,c,l,u);for(let f=0,p=l;;f++){let m=f==h.length,g=m?u:h[f].from;if(g>p&&n.push(new qo(p,g,r.tree,-o,s.from>=p||s.openStart,s.to<=g||s.openEnd)),m)break;p=h[f].to}}else n.push(new qo(l,u,r.tree,-o,s.from>=o||s.openStart,s.to<=a||s.openEnd))}return n}let n_=[],OL=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e<t.length;e++)(e%2?OL:n_).push(n=n+t[e])})();function use(t){if(t<768)return!1;for(let e=0,n=n_.length;;){let i=e+n>>1;if(t<n_[i])n=i;else if(t>=OL[i])e=i+1;else return!0;if(e==n)return!1}}function N3(t){return t>=127462&&t<=127487}const L3=8205;function cse(t,e,n=!0,i=!0){return(n?xL:hse)(t,e,i)}function xL(t,e,n){if(e==t.length)return e;e&&yL(t.charCodeAt(e))&&vL(t.charCodeAt(e-1))&&e--;let i=yv(t,e);for(e+=D3(i);e<t.length;){let r=yv(t,e);if(i==L3||r==L3||n&&use(r))e+=D3(r),i=r;else if(N3(r)){let s=0,o=e-2;for(;o>=0&&N3(yv(t,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function hse(t,e,n){for(;e>1;){let i=xL(t,e-2,n);if(i<e)return i;e--}return 0}function yv(t,e){let n=t.charCodeAt(e);if(!vL(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return yL(i)?(n-55296<<10)+(i-56320)+65536:n}function yL(t){return t>=56320&&t<57344}function vL(t){return t>=55296&&t<56320}function D3(t){return t<65536?1:2}class $t{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,i){[e,n]=hh(this,e,n);let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(n,this.length,r,1),Ks.from(r,this.length-(n-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=hh(this,e,n);let i=[];return this.decompose(e,n,i,0),Ks.from(i,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new fd(this),s=new fd(e);for(let o=n,a=n;;){if(r.next(o),s.next(o),o=0,r.lineBreak!=s.lineBreak||r.done!=s.done||r.value!=s.value)return!1;if(a+=r.value.length,r.done||a>=i)return!0}}iter(e=1){return new fd(this,e)}iterRange(e,n=this.length){return new bL(this,e,n)}iterLines(e,n){let i;if(e==null)i=this.iter();else{n==null&&(n=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new SL(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?$t.empty:e.length<=32?new Dn(e):Ks.from(Dn.split(e,[]))}}class Dn extends $t{constructor(e,n=fse(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,i,r){for(let s=0;;s++){let o=this.text[s],a=r+o.length;if((n?i:a)>=e)return new dse(r,a,i,o);r=a+1,i++}}decompose(e,n,i,r){let s=e<=0&&n>=this.length?this:new Dn(Q3(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(r&1){let o=i.pop(),a=o0(s.text,o.text.slice(),0,s.length);if(a.length<=32)i.push(new Dn(a,o.length+s.length));else{let l=a.length>>1;i.push(new Dn(a.slice(0,l)),new Dn(a.slice(l)))}}else i.push(s)}replace(e,n,i){if(!(i instanceof Dn))return super.replace(e,n,i);[e,n]=hh(this,e,n);let r=o0(this.text,o0(i.text,Q3(this.text,0,e)),n),s=this.length+i.length-(n-e);return r.length<=32?new Dn(r,s):Ks.from(Dn.split(r,[]),s)}sliceString(e,n=this.length,i=`
|
|
119
|
+
`){[e,n]=hh(this,e,n);let r="";for(let s=0,o=0;s<=n&&o<this.text.length;o++){let a=this.text[o],l=s+a.length;s>e&&o&&(r+=i),e<l&&n>s&&(r+=a.slice(Math.max(0,e-s),n-s)),s=l+1}return r}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let i=[],r=-1;for(let s of e)i.push(s),r+=s.length+1,i.length==32&&(n.push(new Dn(i,r)),i=[],r=-1);return r>-1&&n.push(new Dn(i,r)),n}}class Ks extends $t{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,n,i,r){for(let s=0;;s++){let o=this.children[s],a=r+o.length,l=i+o.lines-1;if((n?l:a)>=e)return o.lineInner(e,n,i,r);r=a+1,i=l+1}}decompose(e,n,i,r){for(let s=0,o=0;o<=n&&s<this.children.length;s++){let a=this.children[s],l=o+a.length;if(e<=l&&n>=o){let u=r&((o<=e?1:0)|(l>=n?2:0));o>=e&&l<=n&&!u?i.push(a):a.decompose(e-o,n-o,i,u)}o=l+1}}replace(e,n,i){if([e,n]=hh(this,e,n),i.lines<this.lines)for(let r=0,s=0;r<this.children.length;r++){let o=this.children[r],a=s+o.length;if(e>=s&&n<=a){let l=o.replace(e-s,n-s,i),u=this.lines-o.lines+l.lines;if(l.lines<u>>4&&l.lines>u>>6){let c=this.children.slice();return c[r]=l,new Ks(c,this.length-(n-e)+i.length)}return super.replace(s,a,l)}s=a+1}return super.replace(e,n,i)}sliceString(e,n=this.length,i=`
|
|
120
|
+
`){[e,n]=hh(this,e,n);let r="";for(let s=0,o=0;s<this.children.length&&o<=n;s++){let a=this.children[s],l=o+a.length;o>e&&s&&(r+=i),e<l&&n>o&&(r+=a.sliceString(e-o,n-o,i)),o=l+1}return r}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof Ks))return 0;let i=0,[r,s,o,a]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=n,s+=n){if(r==o||s==a)return i;let l=this.children[r],u=e.children[s];if(l!=u)return i+l.scanIdentical(u,n);i+=l.length+1}}static from(e,n=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let p of e)i+=p.lines;if(i<32){let p=[];for(let m of e)m.flatten(p);return new Dn(p,n)}let r=Math.max(32,i>>5),s=r<<1,o=r>>1,a=[],l=0,u=-1,c=[];function h(p){let m;if(p.lines>s&&p instanceof Ks)for(let g of p.children)h(g);else p.lines>o&&(l>o||!l)?(f(),a.push(p)):p instanceof Dn&&l&&(m=c[c.length-1])instanceof Dn&&p.lines+m.lines<=32?(l+=p.lines,u+=p.length+1,c[c.length-1]=new Dn(m.text.concat(p.text),m.length+1+p.length)):(l+p.lines>r&&f(),l+=p.lines,u+=p.length+1,c.push(p))}function f(){l!=0&&(a.push(c.length==1?c[0]:Ks.from(c,u)),u=-1,l=c.length=0)}for(let p of e)h(p);return f(),a.length==1?a[0]:new Ks(a,n)}}$t.empty=new Dn([""],0);function fse(t){let e=-1;for(let n of t)e+=n.length+1;return e}function o0(t,e,n=0,i=1e9){for(let r=0,s=0,o=!0;s<t.length&&r<=i;s++){let a=t[s],l=r+a.length;l>=n&&(l>i&&(a=a.slice(0,i-r)),r<n&&(a=a.slice(n-r)),o?(e[e.length-1]+=a,o=!1):e.push(a)),r=l+1}return e}function Q3(t,e,n){return o0(t,[""],e,n)}class fd{constructor(e,n=1){this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[n>0?1:(e instanceof Dn?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],s=this.offsets[i],o=s>>1,a=r instanceof Dn?r.text.length:r.children.length;if(o==(n>0?a:0)){if(i==0)return this.done=!0,this.value="",this;n>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(n>0?0:1)){if(this.offsets[i]+=n,e==0)return this.lineBreak=!0,this.value=`
|
|
121
|
+
`,this;e--}else if(r instanceof Dn){let l=r.text[o+(n<0?-1:0)];if(this.offsets[i]+=n,l.length>Math.max(0,e))return this.value=e==0?l:n>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=r.children[o+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[i]+=n):(n<0&&this.offsets[i]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof Dn?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class bL{constructor(e,n,i){this.value="",this.done=!1,this.cursor=new fd(e,n>i?-1:1),this.pos=n>i?e.length:0,this.from=Math.min(n,i),this.to=Math.max(n,i)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let i=n<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*n,this.value=r.length<=i?r:n<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class SL{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:i,value:r}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&($t.prototype[Symbol.iterator]=function(){return this.iter()},fd.prototype[Symbol.iterator]=bL.prototype[Symbol.iterator]=SL.prototype[Symbol.iterator]=function(){return this});let dse=class{constructor(e,n,i,r){this.from=e,this.to=n,this.number=i,this.text=r}get length(){return this.to-this.from}};function hh(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function ui(t,e,n=!0,i=!0){return cse(t,e,n,i)}function pse(t){return t>=56320&&t<57344}function mse(t){return t>=55296&&t<56320}function tr(t,e){let n=t.charCodeAt(e);if(!mse(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return pse(i)?(n-55296<<10)+(i-56320)+65536:n}function uk(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function Js(t){return t<65536?1:2}const i_=/\r\n?|\n/;var xi=(function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t})(xi||(xi={}));class co{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;n<this.sections.length;n+=2)e+=this.sections[n];return e}get newLength(){let e=0;for(let n=0;n<this.sections.length;n+=2){let i=this.sections[n+1];e+=i<0?this.sections[n]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let n=0,i=0,r=0;n<this.sections.length;){let s=this.sections[n++],o=this.sections[n++];o<0?(e(i,r,s),r+=s):r+=o,i+=s}}iterChangedRanges(e,n=!1){r_(this,e,n)}get invertedDesc(){let e=[];for(let n=0;n<this.sections.length;){let i=this.sections[n++],r=this.sections[n++];r<0?e.push(i,r):e.push(r,i)}return new co(e)}composeDesc(e){return this.empty?e:e.empty?this:_L(this,e)}mapDesc(e,n=!1){return e.empty?this:s_(this,e,n)}mapPos(e,n=-1,i=xi.Simple){let r=0,s=0;for(let o=0;o<this.sections.length;){let a=this.sections[o++],l=this.sections[o++],u=r+a;if(l<0){if(u>e)return s+(e-r);s+=a}else{if(i!=xi.Simple&&u>=e&&(i==xi.TrackDel&&r<e&&u>e||i==xi.TrackBefore&&r<e||i==xi.TrackAfter&&u>e))return null;if(u>e||u==e&&n<0&&!a)return e==r||n<0?s:s+l;s+=l}r=u}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return s}touchesRange(e,n=e){for(let i=0,r=0;i<this.sections.length&&r<=n;){let s=this.sections[i++],o=this.sections[i++],a=r+s;if(o>=0&&r<=n&&a>=e)return r<e&&a>n?"cover":!0;r=a}return!1}toString(){let e="";for(let n=0;n<this.sections.length;){let i=this.sections[n++],r=this.sections[n++];e+=(e?" ":"")+i+(r>=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new co(e)}static create(e){return new co(e)}}class Fn extends co{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return r_(this,(n,i,r,s,o)=>e=e.replace(r,r+(i-n),o),!1),e}mapDesc(e,n=!1){return s_(this,e,n,!0)}invert(e){let n=this.sections.slice(),i=[];for(let r=0,s=0;r<n.length;r+=2){let o=n[r],a=n[r+1];if(a>=0){n[r]=a,n[r+1]=o;let l=r>>1;for(;i.length<l;)i.push($t.empty);i.push(o?e.slice(s,s+o):$t.empty)}s+=o}return new Fn(n,i)}compose(e){return this.empty?e:e.empty?this:_L(this,e,!0)}map(e,n=!1){return e.empty?this:s_(this,e,n,!0)}iterChanges(e,n=!1){r_(this,e,n)}get desc(){return co.create(this.sections)}filter(e){let n=[],i=[],r=[],s=new ip(this);e:for(let o=0,a=0;;){let l=o==e.length?1e9:e[o++];for(;a<l||a==l&&s.len==0;){if(s.done)break e;let c=Math.min(s.len,l-a);Ti(r,c,-1);let h=s.ins==-1?-1:s.off==0?s.ins:0;Ti(n,c,h),h>0&&Ba(i,n,s.text),s.forward(c),a+=c}let u=e[o++];for(;a<u;){if(s.done)break e;let c=Math.min(s.len,u-a);Ti(n,c,-1),Ti(r,c,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(c),a+=c}}return{changes:new Fn(n,i),filtered:co.create(r)}}toJSON(){let e=[];for(let n=0;n<this.sections.length;n+=2){let i=this.sections[n],r=this.sections[n+1];r<0?e.push(i):r==0?e.push([i]):e.push([i].concat(this.inserted[n>>1].toJSON()))}return e}static of(e,n,i){let r=[],s=[],o=0,a=null;function l(c=!1){if(!c&&!r.length)return;o<n&&Ti(r,n-o,-1);let h=new Fn(r,s);a=a?a.compose(h.map(a)):h,r=[],s=[],o=0}function u(c){if(Array.isArray(c))for(let h of c)u(h);else if(c instanceof Fn){if(c.length!=n)throw new RangeError(`Mismatched change set length (got ${c.length}, expected ${n})`);l(),a=a?a.compose(c.map(a)):c}else{let{from:h,to:f=h,insert:p}=c;if(h>f||h<0||f>n)throw new RangeError(`Invalid change range ${h} to ${f} (in doc of length ${n})`);let m=p?typeof p=="string"?$t.of(p.split(i||i_)):p:$t.empty,g=m.length;if(h==f&&g==0)return;h<o&&l(),h>o&&Ti(r,h-o,-1),Ti(r,f-h,g),Ba(s,r,m),o=f}}return u(e),l(!a),a}static empty(e){return new Fn(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],i=[];for(let r=0;r<e.length;r++){let s=e[r];if(typeof s=="number")n.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((o,a)=>a&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)n.push(s[0],0);else{for(;i.length<r;)i.push($t.empty);i[r]=$t.of(s.slice(1)),n.push(s[0],i[r].length)}}}return new Fn(n,i)}static createSet(e,n){return new Fn(e,n)}}function Ti(t,e,n,i=!1){if(e==0&&n<=0)return;let r=t.length-2;r>=0&&n<=0&&n==t[r+1]?t[r]+=e:r>=0&&e==0&&t[r]==0?t[r+1]+=n:i?(t[r]+=e,t[r+1]+=n):t.push(e,n)}function Ba(t,e,n){if(n.length==0)return;let i=e.length-2>>1;if(i<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<i;)t.push($t.empty);t.push(n)}}function r_(t,e,n){let i=t.inserted;for(let r=0,s=0,o=0;o<t.sections.length;){let a=t.sections[o++],l=t.sections[o++];if(l<0)r+=a,s+=a;else{let u=r,c=s,h=$t.empty;for(;u+=a,c+=l,l&&i&&(h=h.append(i[o-2>>1])),!(n||o==t.sections.length||t.sections[o+1]<0);)a=t.sections[o++],l=t.sections[o++];e(r,u,s,c,h),r=u,s=c}}}function s_(t,e,n,i=!1){let r=[],s=i?[]:null,o=new ip(t),a=new ip(e);for(let l=-1;;){if(o.done&&a.len||a.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&a.ins==-1){let u=Math.min(o.len,a.len);Ti(r,u,-1),o.forward(u),a.forward(u)}else if(a.ins>=0&&(o.ins<0||l==o.i||o.off==0&&(a.len<o.len||a.len==o.len&&!n))){let u=a.len;for(Ti(r,a.ins,-1);u;){let c=Math.min(o.len,u);o.ins>=0&&l<o.i&&o.len<=c&&(Ti(r,0,o.ins),s&&Ba(s,r,o.text),l=o.i),o.forward(c),u-=c}a.next()}else if(o.ins>=0){let u=0,c=o.len;for(;c;)if(a.ins==-1){let h=Math.min(c,a.len);u+=h,c-=h,a.forward(h)}else if(a.ins==0&&a.len<c)c-=a.len,a.next();else break;Ti(r,u,l<o.i?o.ins:0),s&&l<o.i&&Ba(s,r,o.text),l=o.i,o.forward(o.len-c)}else{if(o.done&&a.done)return s?Fn.createSet(r,s):co.create(r);throw new Error("Mismatched change set lengths")}}}function _L(t,e,n=!1){let i=[],r=n?[]:null,s=new ip(t),o=new ip(e);for(let a=!1;;){if(s.done&&o.done)return r?Fn.createSet(i,r):co.create(i);if(s.ins==0)Ti(i,s.len,0,a),s.next();else if(o.len==0&&!o.done)Ti(i,0,o.ins,a),r&&Ba(r,i,o.text),o.next();else{if(s.done||o.done)throw new Error("Mismatched change set lengths");{let l=Math.min(s.len2,o.len),u=i.length;if(s.ins==-1){let c=o.ins==-1?-1:o.off?0:o.ins;Ti(i,l,c,a),r&&c&&Ba(r,i,o.text)}else o.ins==-1?(Ti(i,s.off?0:s.len,l,a),r&&Ba(r,i,s.textBit(l))):(Ti(i,s.off?0:s.len,o.off?0:o.ins,a),r&&!o.off&&Ba(r,i,o.text));a=(s.ins>l||o.ins>=0&&o.len>l)&&(a||i.length>u),s.forward2(l),o.forward(l)}}}}class ip{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length?$t.empty:e[n]}textBit(e){let{inserted:n}=this.set,i=this.i-2>>1;return i>=n.length&&!e?$t.empty:n[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Ia{constructor(e,n,i,r){this.from=e,this.to=n,this.flags=i,this.goalColumn=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get undirectional(){return(this.flags&64)>0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}map(e,n=-1){let i,r;return this.empty?i=r=e.mapPos(this.from,n):(i=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new Ia(i,r,this.flags,this.goalColumn)}extend(e,n=e,i=0){if(e<=this.anchor&&n>=this.anchor)return fe.range(e,n,void 0,void 0,i);let r=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return fe.range(this.anchor,r,void 0,void 0,i)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return fe.range(e.anchor,e.head)}static create(e,n,i,r){return new Ia(e,n,i,r)}}class fe{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:fe.create(this.ranges.map(i=>i.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;i<this.ranges.length;i++)if(!this.ranges[i].eq(e.ranges[i],n))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new fe([this.main],0)}addRange(e,n=!0){return fe.create([e].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(e,n=this.mainIndex){let i=this.ranges.slice();return i[n]=e,fe.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new fe(e.ranges.map(n=>Ia.fromJSON(n)),e.main)}static single(e,n=e){return new fe([fe.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;r<e.length;r++){let s=e[r];if(s.empty?s.from<=i:s.from<i)return fe.normalized(e.slice(),n);i=s.to}return new fe(e,n)}static cursor(e,n=0,i,r){return Ia.create(e,e,(n==0?0:n<0?8:16)|(i==null?7:Math.min(6,i)),r)}static range(e,n,i,r,s){let o=r==null?7:Math.min(6,r);return!s&&e!=n&&(s=n<e?1:-1),s&&(o|=s<0?8:16),n<e?Ia.create(n,e,o|32,i):Ia.create(e,n,o,i)}static undirectionalRange(e,n){return Ia.create(e,n,64,void 0)}static normalized(e,n=0){let i=e[n];e.sort((r,s)=>r.from-s.from),n=e.indexOf(i);for(let r=1;r<e.length;r++){let s=e[r],o=e[r-1];if(s.empty?s.from<=o.to:s.from<o.to){let a=o.from,l=Math.max(s.to,o.to);r<=n&&n--,e.splice(--r,2,s.anchor>s.head?fe.range(l,a):fe.range(a,l))}}return new fe(e,n)}}function CL(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let ck=0;class Qe{constructor(e,n,i,r,s){this.combine=e,this.compareInput=n,this.compare=i,this.isStatic=r,this.id=ck++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new Qe(e.combine||(n=>n),e.compareInput||((n,i)=>n===i),e.compare||(e.combine?(n,i)=>n===i:hk),!!e.static,e.enables)}of(e){return new a0([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new a0(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new a0(e,this,2,n)}from(e,n){return n||(n=i=>i),this.compute([e],i=>n(i.field(e)))}}function hk(t,e){return t==e||t.length==e.length&&t.every((n,i)=>n===e[i])}class a0{constructor(e,n,i,r){this.dependencies=e,this.facet=n,this.type=i,this.value=r,this.id=ck++}dynamicSlot(e){var n;let i=this.value,r=this.facet.compareInput,s=this.id,o=e[s]>>1,a=this.type==2,l=!1,u=!1,c=[];for(let h of this.dependencies)h=="doc"?l=!0:h=="selection"?u=!0:(((n=e[h.id])!==null&&n!==void 0?n:1)&1)==0&&c.push(e[h.id]);return{create(h){return h.values[o]=i(h),1},update(h,f){if(l&&f.docChanged||u&&(f.docChanged||f.selection)||o_(h,c)){let p=i(h);if(a?!V3(p,h.values[o],r):!r(p,h.values[o]))return h.values[o]=p,1}return 0},reconfigure:(h,f)=>{let p,m=f.config.address[s];if(m!=null){let g=bO(f,m);if(this.dependencies.every(x=>x instanceof Qe?f.facet(x)===h.facet(x):x instanceof Wn?f.field(x,!1)==h.field(x,!1):!0)||(a?V3(p=i(h),g,r):r(p=i(h),g)))return h.values[o]=g,0}else p=i(h);return h.values[o]=p,1}}}get extension(){return this}}function V3(t,e,n){if(t.length!=e.length)return!1;for(let i=0;i<t.length;i++)if(!n(t[i],e[i]))return!1;return!0}function o_(t,e){let n=!1;for(let i of e)dd(t,i)&1&&(n=!0);return n}function gse(t,e,n){let i=n.map(l=>t[l.id]),r=n.map(l=>l.type),s=i.filter(l=>!(l&1)),o=t[e.id]>>1;function a(l){let u=[];for(let c=0;c<i.length;c++){let h=bO(l,i[c]);if(r[c]==2)for(let f of h)u.push(f);else u.push(h)}return e.combine(u)}return{create(l){for(let u of i)dd(l,u);return l.values[o]=a(l),1},update(l,u){if(!o_(l,s))return 0;let c=a(l);return e.compare(c,l.values[o])?0:(l.values[o]=c,1)},reconfigure(l,u){let c=o_(l,i),h=u.config.facets[e.id],f=u.facet(e);if(h&&!c&&hk(n,h))return l.values[o]=f,0;let p=a(l);return e.compare(p,f)?(l.values[o]=f,0):(l.values[o]=p,1)}}}const ug=Qe.define({static:!0});class Wn{constructor(e,n,i,r,s){this.id=e,this.createF=n,this.updateF=i,this.compareF=r,this.spec=s,this.provides=void 0}static define(e){let n=new Wn(ck++,e.create,e.update,e.compare||((i,r)=>i===r),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(ug).find(i=>i.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:i=>(i.values[n]=this.create(i),1),update:(i,r)=>{let s=i.values[n],o=this.updateF(s,r);return this.compareF(s,o)?0:(i.values[n]=o,1)},reconfigure:(i,r)=>{let s=i.facet(ug),o=r.facet(ug),a;return(a=s.find(l=>l.field==this))&&a!=o.find(l=>l.field==this)?(i.values[n]=a.create(i),1):r.config.address[this.id]!=null?(i.values[n]=r.field(this),0):(i.values[n]=this.create(i),1)}}}init(e){return[this,ug.of({field:this,create:e})]}get extension(){return this}}const jl={lowest:4,low:3,default:2,high:1,highest:0};function Rf(t){return e=>new wL(e,t)}const js={highest:Rf(jl.highest),high:Rf(jl.high),default:Rf(jl.default),low:Rf(jl.low),lowest:Rf(jl.lowest)};class wL{constructor(e,n){this.inner=e,this.prec=n}get extension(){return this}}class cf{of(e){return new a_(this,e)}reconfigure(e){return cf.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class a_{constructor(e,n){this.compartment=e,this.inner=n}get extension(){return this}}class vO{constructor(e,n,i,r,s,o){for(this.base=e,this.compartments=n,this.dynamicSlots=i,this.address=r,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<i.length;)this.statusTemplate.push(0)}staticFacet(e){let n=this.address[e.id];return n==null?e.default:this.staticValues[n>>1]}static resolve(e,n,i){let r=[],s=Object.create(null),o=new Map;for(let f of Ose(e,n,o))f instanceof Wn?r.push(f):(s[f.facet.id]||(s[f.facet.id]=[])).push(f);let a=Object.create(null),l=[],u=[];for(let f of r)a[f.id]=u.length<<1,u.push(p=>f.slot(p));let c=i==null?void 0:i.config.facets;for(let f in s){let p=s[f],m=p[0].facet,g=c&&c[f]||[];if(p.every(x=>x.type==0))if(a[m.id]=l.length<<1|1,hk(g,p))l.push(i.facet(m));else{let x=m.combine(p.map(y=>y.value));l.push(i&&m.compare(x,i.facet(m))?i.facet(m):x)}else{for(let x of p)x.type==0?(a[x.id]=l.length<<1|1,l.push(x.value)):(a[x.id]=u.length<<1,u.push(y=>x.dynamicSlot(y)));a[m.id]=u.length<<1,u.push(x=>gse(x,m,p))}}let h=u.map(f=>f(a));return new vO(e,o,h,a,l,s)}}function Ose(t,e,n){let i=[[],[],[],[],[]],r=new Map;function s(o,a){let l=r.get(o);if(l!=null){if(l<=a)return;let u=i[l].indexOf(o);u>-1&&i[l].splice(u,1),o instanceof a_&&n.delete(o.compartment)}if(r.set(o,a),Array.isArray(o))for(let u of o)s(u,a);else if(o instanceof a_){if(n.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let u=e.get(o.compartment)||o.inner;n.set(o.compartment,u),s(u,a)}else if(o instanceof wL)s(o.inner,o.prec);else if(o instanceof Wn)i[a].push(o),o.provides&&s(o.provides,a);else if(o instanceof a0)i[a].push(o),o.facet.extensions&&s(o.facet.extensions,jl.default);else{let u=o.extension;if(!u)throw new Error(`Unrecognized extension value in extension set (${o}).`);if(u==o)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(u,a)}}return s(t,jl.default),i.reduce((o,a)=>o.concat(a))}function dd(t,e){if(e&1)return 2;let n=e>>1,i=t.status[n];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;t.status[n]=4;let r=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|r}function bO(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const kL=Qe.define(),l_=Qe.define({combine:t=>t.some(e=>e),static:!0}),EL=Qe.define({combine:t=>t.length?t[0]:void 0,static:!0}),TL=Qe.define(),PL=Qe.define(),AL=Qe.define(),$L=Qe.define({combine:t=>t.length?t[0]:!1});class va{constructor(e,n){this.type=e,this.value=n}static define(){return new xse}}class xse{of(e){return new va(this,e)}}class yse{constructor(e){this.map=e}of(e){return new nt(this,e)}}class nt{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new nt(this.type,n)}is(e){return this.type==e}static define(e={}){return new yse(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let i=[];for(let r of e){let s=r.map(n);s&&i.push(s)}return i}}nt.reconfigure=nt.define();nt.appendConfig=nt.define();class Zn{constructor(e,n,i,r,s,o){this.startState=e,this.changes=n,this.selection=i,this.effects=r,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,i&&CL(i,n.newLength),s.some(a=>a.type==Zn.time)||(this.annotations=s.concat(Zn.time.of(Date.now())))}static create(e,n,i,r,s,o){return new Zn(e,n,i,r,s,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(Zn.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}Zn.time=va.define();Zn.userEvent=va.define();Zn.addToHistory=va.define();Zn.remote=va.define();function vse(t,e){let n=[];for(let i=0,r=0;;){let s,o;if(i<t.length&&(r==e.length||e[r]>=t[i]))s=t[i++],o=t[i++];else if(r<e.length)s=e[r++],o=e[r++];else return n;!n.length||n[n.length-1]<s?n.push(s,o):n[n.length-1]<o&&(n[n.length-1]=o)}}function IL(t,e,n){var i;let r,s,o;return n?(r=e.changes,s=Fn.empty(e.changes.length),o=t.changes.compose(e.changes)):(r=e.changes.map(t.changes),s=t.changes.mapDesc(e.changes,!0),o=t.changes.compose(r)),{changes:o,selection:e.selection?e.selection.map(s):(i=t.selection)===null||i===void 0?void 0:i.map(r),effects:nt.mapEffects(t.effects,r).concat(nt.mapEffects(e.effects,s)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function u_(t,e,n){let i=e.selection,r=Fc(e.annotations);return e.userEvent&&(r=r.concat(Zn.userEvent.of(e.userEvent))),{changes:e.changes instanceof Fn?e.changes:Fn.of(e.changes||[],n,t.facet(EL)),selection:i&&(i instanceof fe?i:fe.single(i.anchor,i.head)),effects:Fc(e.effects),annotations:r,scrollIntoView:!!e.scrollIntoView}}function RL(t,e,n){let i=u_(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(n=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(n=!1);let o=!!e[s].sequential;i=IL(i,u_(t,e[s],o?i.changes.newLength:t.doc.length),o)}let r=Zn.create(t,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return Sse(n?bse(r):r)}function bse(t){let e=t.startState,n=!0;for(let r of e.facet(TL)){let s=r(t);if(s===!1){n=!1;break}Array.isArray(s)&&(n=n===!0?s:vse(n,s))}if(n!==!0){let r,s;if(n===!1)s=t.changes.invertedDesc,r=Fn.empty(e.doc.length);else{let o=t.changes.filter(n);r=o.changes,s=o.filtered.mapDesc(o.changes).invertedDesc}t=Zn.create(e,r,t.selection&&t.selection.map(s),nt.mapEffects(t.effects,s),t.annotations,t.scrollIntoView)}let i=e.facet(PL);for(let r=i.length-1;r>=0;r--){let s=i[r](t);s instanceof Zn?t=s:Array.isArray(s)&&s.length==1&&s[0]instanceof Zn?t=s[0]:t=RL(e,Fc(s),!1)}return t}function Sse(t){let e=t.startState,n=e.facet(AL),i=t;for(let r=n.length-1;r>=0;r--){let s=n[r](t);s&&Object.keys(s).length&&(i=IL(i,u_(e,s,t.changes.newLength),!0))}return i==t?t:Zn.create(e,t.changes,t.selection,i.effects,i.annotations,i.scrollIntoView)}const _se=[];function Fc(t){return t==null?_se:Array.isArray(t)?t:[t]}var Cn=(function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t})(Cn||(Cn={}));const Cse=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let c_;try{c_=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function wse(t){if(c_)return c_.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>""&&(n.toUpperCase()!=n.toLowerCase()||Cse.test(n)))return!0}return!1}function kse(t){return e=>{if(!/\S/.test(e))return Cn.Space;if(wse(e))return Cn.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return Cn.Word;return Cn.Other}}class mt{constructor(e,n,i,r,s,o){this.config=e,this.doc=n,this.selection=i,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let a=0;a<this.config.dynamicSlots.length;a++)dd(this,a<<1);this.computeSlot=null}field(e,n=!0){let i=this.config.address[e.id];if(i==null){if(n)throw new RangeError("Field is not present in this state");return}return dd(this,i),bO(this,i)}update(...e){return RL(this,e,!0)}applyTransaction(e){let n=this.config,{base:i,compartments:r}=n;for(let a of e.effects)a.is(cf.reconfigure)?(n&&(r=new Map,n.compartments.forEach((l,u)=>r.set(u,l)),n=null),r.set(a.value.compartment,a.value.extension)):a.is(nt.reconfigure)?(n=null,i=a.value):a.is(nt.appendConfig)&&(n=null,i=Fc(i).concat(a.value));let s;n?s=e.startState.values.slice():(n=vO.resolve(i,r,this),s=new mt(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,u)=>u.reconfigure(l,this),null).values);let o=e.startState.facet(l_)?e.newSelection:e.newSelection.asSingle();new mt(n,e.newDoc,o,s,(a,l)=>l.update(a,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:fe.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,i=e(n.ranges[0]),r=this.changes(i.changes),s=[i.range],o=Fc(i.effects);for(let a=1;a<n.ranges.length;a++){let l=e(n.ranges[a]),u=this.changes(l.changes),c=u.map(r);for(let f=0;f<a;f++)s[f]=s[f].map(c);let h=r.mapDesc(u,!0);s.push(l.range.map(h)),r=r.compose(c),o=nt.mapEffects(o,c).concat(nt.mapEffects(Fc(l.effects),h))}return{changes:r,selection:fe.create(s,n.mainIndex),effects:o}}changes(e=[]){return e instanceof Fn?e:Fn.of(e,this.doc.length,this.facet(mt.lineSeparator))}toText(e){return $t.of(e.split(this.facet(mt.lineSeparator)||i_))}sliceDoc(e=0,n=this.doc.length){return this.doc.sliceString(e,n,this.lineBreak)}facet(e){let n=this.config.address[e.id];return n==null?e.default:(dd(this,n),bO(this,n))}toJSON(e){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let i in e){let r=e[i];r instanceof Wn&&this.config.address[r.id]!=null&&(n[i]=r.spec.toJSON(this.field(e[i]),this))}return n}static fromJSON(e,n={},i){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let r=[];if(i){for(let s in i)if(Object.prototype.hasOwnProperty.call(e,s)){let o=i[s],a=e[s];r.push(o.init(l=>o.spec.fromJSON(a,l)))}}return mt.create({doc:e.doc,selection:fe.fromJSON(e.selection),extensions:n.extensions?r.concat([n.extensions]):r})}static create(e={}){let n=vO.resolve(e.extensions||[],new Map),i=e.doc instanceof $t?e.doc:$t.of((e.doc||"").split(n.staticFacet(mt.lineSeparator)||i_)),r=e.selection?e.selection instanceof fe?e.selection:fe.single(e.selection.anchor,e.selection.head):fe.single(0);return CL(r,i.length),n.staticFacet(l_)||(r=r.asSingle()),new mt(n,i,r,n.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(mt.tabSize)}get lineBreak(){return this.facet(mt.lineSeparator)||`
|
|
122
|
+
`}get readOnly(){return this.facet($L)}phrase(e,...n){for(let i of this.facet(mt.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(i,r)=>{if(r=="$")return"$";let s=+(r||1);return!s||s>n.length?i:n[s-1]})),e}languageDataAt(e,n,i=-1){let r=[];for(let s of this.facet(kL))for(let o of s(this,n,i))Object.prototype.hasOwnProperty.call(o,e)&&r.push(o[e]);return r}charCategorizer(e){let n=this.languageDataAt("wordChars",e);return kse(n.length?n[0]:"")}wordAt(e){let{text:n,from:i,length:r}=this.doc.lineAt(e),s=this.charCategorizer(e),o=e-i,a=e-i;for(;o>0;){let l=ui(n,o,!1);if(s(n.slice(l,o))!=Cn.Word)break;o=l}for(;a<r;){let l=ui(n,a);if(s(n.slice(a,l))!=Cn.Word)break;a=l}return o==a?null:fe.range(o+i,a+i)}}mt.allowMultipleSelections=l_;mt.tabSize=Qe.define({combine:t=>t.length?t[0]:4});mt.lineSeparator=EL;mt.readOnly=$L;mt.phrases=Qe.define({compare(t,e){let n=Object.keys(t),i=Object.keys(e);return n.length==i.length&&n.every(r=>t[r]==e[r])}});mt.languageData=kL;mt.changeFilter=TL;mt.transactionFilter=PL;mt.transactionExtender=AL;cf.reconfigure=nt.define();function wo(t,e,n={}){let i={};for(let r of t)for(let s of Object.keys(r)){let o=r[s],a=i[s];if(a===void 0)i[s]=o;else if(!(a===o||o===void 0))if(Object.hasOwnProperty.call(n,s))i[s]=n[s](a,o);else throw new Error("Config merge conflict for field "+s)}for(let r in e)i[r]===void 0&&(i[r]=e[r]);return i}class hl{eq(e){return this==e}range(e,n=e){return rp.create(e,n,this)}}hl.prototype.startSide=hl.prototype.endSide=0;hl.prototype.point=!1;hl.prototype.mapMode=xi.TrackDel;function fk(t,e){return t==e||t.constructor==e.constructor&&t.eq(e)}class rp{constructor(e,n,i){this.from=e,this.to=n,this.value=i}static create(e,n,i){return new rp(e,n,i)}}function h_(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}let Ese=class ML{constructor(e,n,i,r){this.from=e,this.to=n,this.value=i,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,n,i,r=0){let s=i?this.to:this.from;for(let o=r,a=s.length;;){if(o==a)return o;let l=o+a>>1,u=s[l]-e||(i?this.value[l].endSide:this.value[l].startSide)-n;if(l==o)return u>=0?o:a;u>=0?a=l:o=l+1}}between(e,n,i,r){for(let s=this.findIndex(n,-1e9,!0),o=this.findIndex(i,1e9,!1,s);s<o;s++)if(r(this.from[s]+e,this.to[s]+e,this.value[s])===!1)return!1}map(e,n){let i=[],r=[],s=[],o=-1,a=-1;for(let l=0;l<this.value.length;l++){let u=this.value[l],c=this.from[l]+e,h=this.to[l]+e,f,p;if(c==h){let m=n.mapPos(c,u.startSide,u.mapMode);if(m==null||(f=p=m,u.startSide!=u.endSide&&(p=n.mapPos(c,u.endSide),p<f)))continue}else if(f=n.mapPos(c,u.startSide),p=n.mapPos(h,u.endSide),f>p||f==p&&u.startSide>0&&u.endSide<=0)continue;(p-f||u.endSide-u.startSide)<0||(o<0&&(o=f),u.point&&(a=Math.max(a,p-f)),i.push(u),r.push(f-o),s.push(p-o))}return{mapped:i.length?new ML(r,s,i,a):null,pos:o}}};class vt{constructor(e,n,i,r){this.chunkPos=e,this.chunk=n,this.nextLayer=i,this.maxPoint=r}static create(e,n,i,r){return new vt(e,n,i,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:i=!1,filterFrom:r=0,filterTo:s=this.length}=e,o=e.filter;if(n.length==0&&!o)return this;if(i&&(n=n.slice().sort(h_)),this.isEmpty)return n.length?vt.of(n):this;let a=new NL(this,null,-1).goto(0),l=0,u=[],c=new dr;for(;a.value||l<n.length;)if(l<n.length&&(a.from-n[l].from||a.startSide-n[l].value.startSide)>=0){let h=n[l++];c.addInner(h.from,h.to,h.value)||u.push(h)}else a.rangeIndex==1&&a.chunkIndex<this.chunk.length&&(l==n.length||this.chunkEnd(a.chunkIndex)<n[l].from)&&(!o||r>this.chunkEnd(a.chunkIndex)||s<this.chunkPos[a.chunkIndex])&&c.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!o||r>a.to||s<a.from||o(a.from,a.to,a.value))&&(c.addInner(a.from,a.to,a.value)||u.push(rp.create(a.from,a.to,a.value))),a.next());return c.finishInner(this.nextLayer.isEmpty&&!u.length?vt.empty:this.nextLayer.update({add:u,filter:o,filterFrom:r,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let n=[],i=[],r=-1;for(let o=0;o<this.chunk.length;o++){let a=this.chunkPos[o],l=this.chunk[o],u=e.touchesRange(a,a+l.length);if(u===!1)r=Math.max(r,l.maxPoint),n.push(l),i.push(e.mapPos(a));else if(u===!0){let{mapped:c,pos:h}=l.map(a,e);c&&(r=Math.max(r,c.maxPoint),n.push(c),i.push(h))}}let s=this.nextLayer.map(e);return n.length==0?s:new vt(i,n,s||vt.empty,r)}between(e,n,i){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let s=this.chunkPos[r],o=this.chunk[r];if(n>=s&&e<=s+o.length&&o.between(s,e-s,n-s,i)===!1)return}this.nextLayer.between(e,n,i)}}iter(e=0){return sp.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return sp.from(e).goto(n)}static compare(e,n,i,r,s=-1){let o=e.filter(h=>h.maxPoint>0||!h.isEmpty&&h.maxPoint>=s),a=n.filter(h=>h.maxPoint>0||!h.isEmpty&&h.maxPoint>=s),l=B3(o,a,i),u=new Mf(o,l,s),c=new Mf(a,l,s);i.iterGaps((h,f,p)=>F3(u,h,c,f,p,r)),i.empty&&i.length==0&&F3(u,0,c,0,0,r)}static eq(e,n,i=0,r){r==null&&(r=999999999);let s=e.filter(c=>!c.isEmpty&&n.indexOf(c)<0),o=n.filter(c=>!c.isEmpty&&e.indexOf(c)<0);if(s.length!=o.length)return!1;if(!s.length)return!0;let a=B3(s,o),l=new Mf(s,a,0).goto(i),u=new Mf(o,a,0).goto(i);for(;;){if(l.to!=u.to||!f_(l.active,u.active)||l.point&&(!u.point||!fk(l.point,u.point)))return!1;if(l.to>r)return!0;l.next(),u.next()}}static spans(e,n,i,r,s=-1){let o=new Mf(e,null,s).goto(n),a=n,l=o.openStart;for(;;){let u=Math.min(o.to,i);if(o.point){let c=o.activeForPoint(o.to),h=o.pointFrom<n?c.length+1:o.point.startSide<0?c.length:Math.min(c.length,l);r.point(a,u,o.point,c,h,o.pointRank),l=Math.min(o.openEnd(u),c.length)}else u>a&&(r.span(a,u,o.active,l),l=o.openEnd(u));if(o.to>i)return l+(o.point&&o.to>i?1:0);a=o.to,o.next()}}static of(e,n=!1){let i=new dr;for(let r of e instanceof rp?[e]:n?Tse(e):e)i.add(r.from,r.to,r.value);return i.finish()}static join(e){if(!e.length)return vt.empty;let n=e[e.length-1];for(let i=e.length-2;i>=0;i--)for(let r=e[i];r!=vt.empty;r=r.nextLayer)n=new vt(r.chunkPos,r.chunk,n,Math.max(r.maxPoint,n.maxPoint));return n}}vt.empty=new vt([],[],null,-1);function Tse(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let i=t[n];if(h_(e,i)>0)return t.slice().sort(h_);e=i}return t}vt.empty.nextLayer=vt.empty;class dr{finishChunk(e){this.chunks.push(new Ese(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,i){this.addInner(e,n,i)||(this.nextLayer||(this.nextLayer=new dr)).add(e,n,i)}addInner(e,n,i){let r=e-this.lastTo||i.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=n,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let i=n.value.length-1;return this.last=n.value[i],this.lastFrom=n.from[i]+e,this.lastTo=n.to[i]+e,!0}finish(){return this.finishInner(vt.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=vt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function B3(t,e,n){let i=new Map;for(let s of t)for(let o=0;o<s.chunk.length;o++)s.chunk[o].maxPoint<=0&&i.set(s.chunk[o],s.chunkPos[o]);let r=new Set;for(let s of e)for(let o=0;o<s.chunk.length;o++){let a=i.get(s.chunk[o]);a!=null&&(n?n.mapPos(a):a)==s.chunkPos[o]&&!(n!=null&&n.touchesRange(a,a+s.chunk[o].length))&&r.add(s.chunk[o])}return r}class NL{constructor(e,n,i,r=0){this.layer=e,this.skip=n,this.minPoint=i,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,n=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,n,!1),this}gotoInner(e,n,i){for(;this.chunkIndex<this.layer.chunk.length;){let r=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(r)||this.layer.chunkEnd(this.chunkIndex)<e||r.maxPoint<this.minPoint))break;this.chunkIndex++,i=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],n,!0);(!i||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(e,n){(this.to-e||this.endSide-n)<0&&this.gotoInner(e,n,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],n=this.layer.chunk[this.chunkIndex],i=e+n.from[this.rangeIndex];if(this.from=i,this.to=e+n.to[this.rangeIndex],this.value=n.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class sp{constructor(e){this.heap=e}static from(e,n=null,i=-1){let r=[];for(let s=0;s<e.length;s++)for(let o=e[s];!o.isEmpty;o=o.nextLayer)o.maxPoint>=i&&r.push(new NL(o,n,i,s));return r.length==1?r[0]:new sp(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let i of this.heap)i.goto(e,n);for(let i=this.heap.length>>1;i>=0;i--)vv(this.heap,i);return this.next(),this}forward(e,n){for(let i of this.heap)i.forward(e,n);for(let i=this.heap.length>>1;i>=0;i--)vv(this.heap,i);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),vv(this.heap,0)}}}function vv(t,e){for(let n=t[e];;){let i=(e<<1)+1;if(i>=t.length)break;let r=t[i];if(i+1<t.length&&r.compare(t[i+1])>=0&&(r=t[i+1],i++),n.compare(r)<0)break;t[i]=n,t[e]=r,e=i}}class Mf{constructor(e,n,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=sp.from(e,n,i)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){cg(this.active,e),cg(this.activeTo,e),cg(this.activeRank,e),this.minActive=j3(this.active,this.activeTo)}addActive(e){let n=0,{value:i,to:r,rank:s}=this.cursor;for(;n<this.activeRank.length&&(s-this.activeRank[n]||r-this.activeTo[n])>0;)n++;hg(this.active,n,i),hg(this.activeTo,n,r),hg(this.activeRank,n,s),e&&hg(e,n,this.cursor.from),this.minActive=j3(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),i&&cg(i,r)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(i),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=s,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=s.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(i){this.openStart=0;for(let r=i.length-1;r>=0&&i[r]<e;r--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let n=[];for(let i=this.active.length-1;i>=0&&!(this.activeRank[i]<this.pointRank);i--)(this.activeTo[i]>e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&n.push(this.active[i]);return n.reverse()}openEnd(e){let n=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)n++;return n}}function F3(t,e,n,i,r,s){t.goto(e),n.goto(i);let o=i+r,a=i,l=i-e,u=!!s.boundChange;for(let c=!1;;){let h=t.to+l-n.to,f=h||t.endSide-n.endSide,p=f<0?t.to+l:n.to,m=Math.min(p,o);if(t.point||n.point?(t.point&&n.point&&fk(t.point,n.point)&&f_(t.activeForPoint(t.to),n.activeForPoint(n.to))||s.comparePoint(a,m,t.point,n.point),c=!1):(c&&s.boundChange(a),m>a&&!f_(t.active,n.active)&&s.compareRange(a,m,t.active,n.active),u&&m<o&&(h||t.openEnd(p)!=n.openEnd(p))&&(c=!0)),p>o)break;a=p,f<=0&&t.next(),f>=0&&n.next()}}function f_(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!fk(t[n],e[n]))return!1;return!0}function cg(t,e){for(let n=e,i=t.length-1;n<i;n++)t[n]=t[n+1];t.pop()}function hg(t,e,n){for(let i=t.length-1;i>=e;i--)t[i+1]=t[i];t[e]=n}function j3(t,e){let n=-1,i=1e9;for(let r=0;r<e.length;r++)(e[r]-i||t[r].endSide-t[n].endSide)<0&&(n=r,i=e[r]);return n}function Ns(t,e,n=t.length){let i=0;for(let r=0;r<n&&r<t.length;)t.charCodeAt(r)==9?(i+=e-i%e,r++):(i++,r=ui(t,r));return i}function d_(t,e,n,i){for(let r=0,s=0;;){if(s>=e)return r;if(r==t.length)break;s+=t.charCodeAt(r)==9?n-s%n:1,r=ui(t,r)}return i===!0?-1:t.length}const p_="ͼ",Z3=typeof Symbol>"u"?"__"+p_:Symbol.for(p_),m_=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),z3=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class ua{constructor(e,n){this.rules=[];let{finish:i}=n||{};function r(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function s(o,a,l,u){let c=[],h=/^@(\w+)\b/.exec(o[0]),f=h&&h[1]=="keyframes";if(h&&a==null)return l.push(o[0]+";");for(let p in a){let m=a[p];if(/&/.test(p))s(p.split(/,\s*/).map(g=>o.map(x=>g.replace(/&/,x))).reduce((g,x)=>g.concat(x)),m,l);else if(m&&typeof m=="object"){if(!h)throw new RangeError("The value of a property ("+p+") should be a primitive value.");s(r(p),m,c,f)}else m!=null&&c.push(p.replace(/_.*/,"").replace(/[A-Z]/g,g=>"-"+g.toLowerCase())+": "+m+";")}(c.length||f)&&l.push((i&&!h&&!u?o.map(i):o).join(", ")+" {"+c.join(" ")+"}")}for(let o in e)s(r(o),e[o],this.rules)}getRules(){return this.rules.join(`
|
|
123
|
+
`)}static newName(){let e=z3[Z3]||1;return z3[Z3]=e+1,p_+e.toString(36)}static mount(e,n,i){let r=e[m_],s=i&&i.nonce;r?s&&r.setNonce(s):r=new Pse(e,s),r.mount(Array.isArray(n)?n:[n],e)}}let X3=new Map;class Pse{constructor(e,n){let i=e.ownerDocument||e,r=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let s=X3.get(i);if(s)return e[m_]=s;this.sheet=new r.CSSStyleSheet,X3.set(i,this)}else this.styleTag=i.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[m_]=this}mount(e,n){let i=this.sheet,r=0,s=0;for(let o=0;o<e.length;o++){let a=e[o],l=this.modules.indexOf(a);if(l<s&&l>-1&&(this.modules.splice(l,1),s--,l=-1),l==-1){if(this.modules.splice(s++,0,a),i)for(let u=0;u<a.rules.length;u++)i.insertRule(a.rules[u],r++)}else{for(;s<l;)r+=this.modules[s++].rules.length;r+=a.rules.length,s++}}if(i)n.adoptedStyleSheets.indexOf(this.sheet)<0&&(n.adoptedStyleSheets=[this.sheet,...n.adoptedStyleSheets]);else{let o="";for(let l=0;l<this.modules.length;l++)o+=this.modules[l].getRules()+`
|
|
124
|
+
`;this.styleTag.textContent=o;let a=n.head||n;this.styleTag.parentNode!=a&&a.insertBefore(this.styleTag,a.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var fl={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},op={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Ase=typeof navigator<"u"&&/Mac/.test(navigator.platform),$se=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Oi=0;Oi<10;Oi++)fl[48+Oi]=fl[96+Oi]=String(Oi);for(var Oi=1;Oi<=24;Oi++)fl[Oi+111]="F"+Oi;for(var Oi=65;Oi<=90;Oi++)fl[Oi]=String.fromCharCode(Oi+32),op[Oi]=String.fromCharCode(Oi);for(var bv in fl)op.hasOwnProperty(bv)||(op[bv]=fl[bv]);function Ise(t){var e=Ase&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||$se&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?op:fl)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function en(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i];typeof r=="string"?t.setAttribute(i,r):r!=null&&(t[i]=r)}e++}for(;e<arguments.length;e++)LL(t,arguments[e]);return t}function LL(t,e){if(typeof e=="string")t.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)t.appendChild(e);else if(Array.isArray(e))for(var n=0;n<e.length;n++)LL(t,e[n]);else throw new RangeError("Unsupported child node: "+e)}let Fi=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},g_=typeof document<"u"?document:{documentElement:{style:{}}};const O_=/Edge\/(\d+)/.exec(Fi.userAgent),DL=/MSIE \d/.test(Fi.userAgent),x_=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Fi.userAgent),wx=!!(DL||x_||O_),W3=!wx&&/gecko\/(\d+)/i.test(Fi.userAgent),Sv=!wx&&/Chrome\/(\d+)/.exec(Fi.userAgent),H3="webkitFontSmoothing"in g_.documentElement.style,y_=!wx&&/Apple Computer/.test(Fi.vendor),U3=y_&&(/Mobile\/\w+/.test(Fi.userAgent)||Fi.maxTouchPoints>2);var De={mac:U3||/Mac/.test(Fi.platform),windows:/Win/.test(Fi.platform),linux:/Linux|X11/.test(Fi.platform),ie:wx,ie_version:DL?g_.documentMode||6:x_?+x_[1]:O_?+O_[1]:0,gecko:W3,gecko_version:W3?+(/Firefox\/(\d+)/.exec(Fi.userAgent)||[0,0])[1]:0,chrome:!!Sv,chrome_version:Sv?+Sv[1]:0,ios:U3,android:/Android\b/.test(Fi.userAgent),webkit:H3,webkit_version:H3?+(/\bAppleWebKit\/(\d+)/.exec(Fi.userAgent)||[0,0])[1]:0,safari:y_,safari_version:y_?+(/\bVersion\/(\d+(\.\d+)?)/.exec(Fi.userAgent)||[0,0])[1]:0,tabSize:g_.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function dk(t,e){for(let n in t)n=="class"&&e.class?e.class+=" "+t.class:n=="style"&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}const SO=Object.create(null);function pk(t,e,n){if(t==e)return!0;t||(t=SO),e||(e=SO);let i=Object.keys(t),r=Object.keys(e);if(i.length-0!=r.length-0)return!1;for(let s of i)if(s!=n&&(r.indexOf(s)==-1||t[s]!==e[s]))return!1;return!0}function Rse(t,e){for(let n=t.attributes.length-1;n>=0;n--){let i=t.attributes[n].name;e[i]==null&&t.removeAttribute(i)}for(let n in e){let i=e[n];n=="style"?t.style.cssText=i:t.getAttribute(n)!=i&&t.setAttribute(n,i)}}function q3(t,e,n){let i=!1;if(e)for(let r in e)n&&r in n||(i=!0,r=="style"?t.style.cssText="":t.removeAttribute(r));if(n)for(let r in n)e&&e[r]==n[r]||(i=!0,r=="style"?t.style.cssText=n[r]:t.setAttribute(r,n[r]));return i}function Mse(t){let e=Object.create(null);for(let n=0;n<t.attributes.length;n++){let i=t.attributes[n];e[i.name]=i.value}return e}class ds{eq(e){return!1}updateDOM(e,n,i){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,n,i){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var Si=(function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t})(Si||(Si={}));class Xe extends hl{constructor(e,n,i,r){super(),this.startSide=e,this.endSide=n,this.widget=i,this.spec=r}get heightRelevant(){return!1}static mark(e){return new xm(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),i=!!e.block;return n+=i&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new Eu(e,n,n,i,e.widget||null,!1)}static replace(e){let n=!!e.block,i,r;if(e.isBlockGap)i=-5e8,r=4e8;else{let{start:s,end:o}=QL(e,n);i=(s?n?-3e8:-1:5e8)-1,r=(o?n?2e8:1:-6e8)+1}return new Eu(e,i,r,n,e.widget||null,!0)}static line(e){return new ym(e)}static set(e,n=!1){return vt.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Xe.none=vt.empty;class xm extends Xe{constructor(e){let{start:n,end:i}=QL(e);super(n?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.attrs=e.class&&e.attributes?dk(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||SO}eq(e){return this==e||e instanceof xm&&this.tagName==e.tagName&&pk(this.attrs,e.attrs)}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}xm.prototype.point=!1;class ym extends Xe{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof ym&&this.spec.class==e.spec.class&&pk(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}ym.prototype.mapMode=xi.TrackBefore;ym.prototype.point=!0;class Eu extends Xe{constructor(e,n,i,r,s,o){super(n,i,s,e),this.block=r,this.isReplace=o,this.mapMode=r?n<=0?xi.TrackBefore:xi.TrackAfter:xi.TrackDel}get type(){return this.startSide!=this.endSide?Si.WidgetRange:this.startSide<=0?Si.WidgetBefore:Si.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Eu&&Nse(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}Eu.prototype.point=!0;function QL(t,e=!1){let{inclusiveStart:n,inclusiveEnd:i}=t;return n==null&&(n=t.inclusive),i==null&&(i=t.inclusive),{start:n??e,end:i??e}}function Nse(t,e){return t==e||!!(t&&e&&t.compare(e))}function jc(t,e,n,i=0){let r=n.length-1;r>=0&&n[r]+i>=t?n[r]=Math.max(n[r],e):n.push(t,e)}class ap extends hl{constructor(e,n,i){super(),this.tagName=e,this.attributes=n,this.rank=i}eq(e){return e==this||e instanceof ap&&this.tagName==e.tagName&&pk(this.attributes,e.attributes)}static create(e){return new ap(e.tagName,e.attributes||SO,e.rank==null?50:Math.max(0,Math.min(e.rank,100)))}static set(e,n=!1){return vt.of(e,n)}}ap.prototype.startSide=ap.prototype.endSide=-1;function lp(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function v_(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function pd(t,e){if(!e.anchorNode)return!1;try{return v_(t,e.anchorNode)}catch{return!1}}function l0(t){return t.nodeType==3?up(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function md(t,e,n,i){return n?Y3(t,e,n,i,-1)||Y3(t,e,n,i,1):!1}function dl(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function _O(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function Y3(t,e,n,i,r){for(;;){if(t==n&&e==i)return!0;if(e==(r<0?0:ca(t))){if(t.nodeName=="DIV")return!1;let s=t.parentNode;if(!s||s.nodeType!=1)return!1;e=dl(t)+(r<0?0:1),t=s}else if(t.nodeType==1){if(t=t.childNodes[e+(r<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=r<0?ca(t):0}else return!1}}function ca(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function CO(t,e){let{left:n,right:i}=t;if(n==i)return t;let r=e?n:i;return{left:r,right:r,top:t.top,bottom:t.bottom}}function Lse(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function VL(t,e){let n=e.width/t.offsetWidth,i=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.height-t.offsetHeight)<1)&&(i=1),{scaleX:n,scaleY:i}}function Dse(t,e,n,i,r,s,o,a){let l=t.ownerDocument,u=l.defaultView||window;for(let c=t,h=!1;c&&!h;)if(c.nodeType==1){let f,p=c==l.body,m=1,g=1;if(p)f=Lse(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(h=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let S=c.getBoundingClientRect();({scaleX:m,scaleY:g}=VL(c,S)),f={left:S.left,right:S.left+c.clientWidth*m,top:S.top,bottom:S.top+c.clientHeight*g}}let x=0,y=0;if(r=="nearest")e.top<f.top+o?(y=e.top-(f.top+o),n>0&&e.bottom>f.bottom+y&&(y=e.bottom-f.bottom+o)):e.bottom>f.bottom-o&&(y=e.bottom-f.bottom+o,n<0&&e.top-y<f.top&&(y=e.top-(f.top+o)));else{let S=e.bottom-e.top,_=f.bottom-f.top;y=(r=="center"&&S<=_?e.top+S/2-_/2:r=="start"||r=="center"&&n<0?e.top-o:e.bottom-_+o)-f.top}if(i=="nearest"?e.left<f.left+s?(x=e.left-(f.left+s),n>0&&e.right>f.right+x&&(x=e.right-f.right+s)):e.right>f.right-s&&(x=e.right-f.right+s,n<0&&e.left<f.left+x&&(x=e.left-(f.left+s))):x=(i=="center"?e.left+(e.right-e.left)/2-(f.right-f.left)/2:i=="start"==a?e.left-s:e.right-(f.right-f.left)+s)-f.left,x||y)if(p)u.scrollBy(x,y);else{let S=0,_=0;if(y){let k=c.scrollTop;c.scrollTop+=y/g,_=(c.scrollTop-k)*g}if(x){let k=c.scrollLeft;c.scrollLeft+=x/m,S=(c.scrollLeft-k)*m}e={left:e.left-S,top:e.top-_,right:e.right-S,bottom:e.bottom-_},S&&Math.abs(S-x)<1&&(i="nearest"),_&&Math.abs(_-y)<1&&(r="nearest")}if(p)break;(e.top<f.top||e.bottom>f.bottom||e.left<f.left||e.right>f.right)&&(e={left:Math.max(e.left,f.left),right:Math.min(e.right,f.right),top:Math.max(e.top,f.top),bottom:Math.min(e.bottom,f.bottom)}),c=c.assignedSlot||c.parentNode}else if(c.nodeType==11)c=c.host;else break}function BL(t,e=!0){let n=t.ownerDocument,i=null,r=null;for(let s=t.parentNode;s&&!(s==n.body||(!e||i)&&r);)if(s.nodeType==1)!r&&s.scrollHeight>s.clientHeight&&(r=s),e&&!i&&s.scrollWidth>s.clientWidth&&(i=s),s=s.assignedSlot||s.parentNode;else if(s.nodeType==11)s=s.host;else break;return{x:i,y:r}}class Qse{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:i}=e;this.set(n,Math.min(e.anchorOffset,n?ca(n):0),i,Math.min(e.focusOffset,i?ca(i):0))}set(e,n,i,r){this.anchorNode=e,this.anchorOffset=n,this.focusNode=i,this.focusOffset=r}}let Bl=null;De.safari&&De.safari_version>=26&&(Bl=!1);function FL(t){if(t.setActive)return t.setActive();if(Bl)return t.focus(Bl);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(Bl==null?{get preventScroll(){return Bl={preventScroll:!0},!0}}:void 0),!Bl){Bl=!1;for(let n=0;n<e.length;){let i=e[n++],r=e[n++],s=e[n++];i.scrollTop!=r&&(i.scrollTop=r),i.scrollLeft!=s&&(i.scrollLeft=s)}}}let G3;function up(t,e,n=e){let i=G3||(G3=document.createRange());return i.setEnd(t,n),i.setStart(t,e),i}function Zc(t,e,n,i){let r={key:e,code:e,keyCode:n,which:n,cancelable:!0};i&&({altKey:r.altKey,ctrlKey:r.ctrlKey,shiftKey:r.shiftKey,metaKey:r.metaKey}=i);let s=new KeyboardEvent("keydown",r);s.synthetic=!0,t.dispatchEvent(s);let o=new KeyboardEvent("keyup",r);return o.synthetic=!0,t.dispatchEvent(o),s.defaultPrevented||o.defaultPrevented}function Vse(t){for(;t;){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function Bse(t,e){let n=e.focusNode,i=e.focusOffset;if(!n||e.anchorNode!=n||e.anchorOffset!=i)return!1;for(i=Math.min(i,ca(n));;)if(i){if(n.nodeType!=1)return!1;let r=n.childNodes[i-1];r.contentEditable=="false"?i--:(n=r,i=ca(n))}else{if(n==t)return!0;i=dl(n),n=n.parentNode}}function jL(t){return t instanceof Window?t.pageYOffset>Math.max(0,t.document.documentElement.scrollHeight-t.innerHeight-4):t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function ZL(t,e){for(let n=t,i=e;;){if(n.nodeType==3&&i>0)return{node:n,offset:i};if(n.nodeType==1&&i>0){if(n.contentEditable=="false")return null;n=n.childNodes[i-1],i=ca(n)}else if(n.parentNode&&!_O(n))i=dl(n),n=n.parentNode;else return null}}function zL(t,e){for(let n=t,i=e;;){if(n.nodeType==3&&i<n.nodeValue.length)return{node:n,offset:i};if(n.nodeType==1&&i<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[i],i=0}else if(n.parentNode&&!_O(n))i=dl(n)+1,n=n.parentNode;else return null}}class Es{constructor(e,n,i=!0){this.node=e,this.offset=n,this.precise=i}static before(e,n){return new Es(e.parentNode,dl(e),n)}static after(e,n){return new Es(e.parentNode,dl(e)+1,n)}}var un=(function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t})(un||(un={}));const Tu=un.LTR,mk=un.RTL;function XL(t){let e=[];for(let n=0;n<t.length;n++)e.push(1<<+t[n]);return e}const Fse=XL("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),jse=XL("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),b_=Object.create(null),Hs=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),n=t.charCodeAt(1);b_[e]=n,b_[n]=-e}function WL(t){return t<=247?Fse[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?jse[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const Zse=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class so{get dir(){return this.level%2?mk:Tu}constructor(e,n,i){this.from=e,this.to=n,this.level=i}side(e,n){return this.dir==n==e?this.to:this.from}forward(e,n){return e==(this.dir==n)}static find(e,n,i,r){let s=-1;for(let o=0;o<e.length;o++){let a=e[o];if(a.from<=n&&a.to>=n){if(a.level==i)return o;(s<0||(r!=0?r<0?a.from<n:a.to>n:e[s].level>a.level))&&(s=o)}}if(s<0)throw new RangeError("Index out of range");return s}}function HL(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++){let i=t[n],r=e[n];if(i.from!=r.from||i.to!=r.to||i.direction!=r.direction||!HL(i.inner,r.inner))return!1}return!0}const an=[];function zse(t,e,n,i,r){for(let s=0;s<=i.length;s++){let o=s?i[s-1].to:e,a=s<i.length?i[s].from:n,l=s?256:r;for(let u=o,c=l,h=l;u<a;u++){let f=WL(t.charCodeAt(u));f==512?f=c:f==8&&h==4&&(f=16),an[u]=f==4?2:f,f&7&&(h=f),c=f}for(let u=o,c=l,h=l;u<a;u++){let f=an[u];if(f==128)u<a-1&&c==an[u+1]&&c&24?f=an[u]=c:an[u]=256;else if(f==64){let p=u+1;for(;p<a&&an[p]==64;)p++;let m=u&&c==8||p<n&&an[p]==8?h==1?1:8:256;for(let g=u;g<p;g++)an[g]=m;u=p-1}else f==8&&h==1&&(an[u]=1);c=f,f&7&&(h=f)}}}function Xse(t,e,n,i,r){let s=r==1?2:1;for(let o=0,a=0,l=0;o<=i.length;o++){let u=o?i[o-1].to:e,c=o<i.length?i[o].from:n;for(let h=u,f,p,m;h<c;h++)if(p=b_[f=t.charCodeAt(h)])if(p<0){for(let g=a-3;g>=0;g-=3)if(Hs[g+1]==-p){let x=Hs[g+2],y=x&2?r:x&4?x&1?s:r:0;y&&(an[h]=an[Hs[g]]=y),a=g;break}}else{if(Hs.length==189)break;Hs[a++]=h,Hs[a++]=f,Hs[a++]=l}else if((m=an[h])==2||m==1){let g=m==r;l=g?0:1;for(let x=a-3;x>=0;x-=3){let y=Hs[x+2];if(y&2)break;if(g)Hs[x+2]|=2;else{if(y&4)break;Hs[x+2]|=4}}}}}function Wse(t,e,n,i){for(let r=0,s=i;r<=n.length;r++){let o=r?n[r-1].to:t,a=r<n.length?n[r].from:e;for(let l=o;l<a;){let u=an[l];if(u==256){let c=l+1;for(;;)if(c==a){if(r==n.length)break;c=n[r++].to,a=r<n.length?n[r].from:e}else if(an[c]==256)c++;else break;let h=s==1,f=(c<e?an[c]:i)==1,p=h==f?h?1:2:i;for(let m=c,g=r,x=g?n[g-1].to:t;m>l;)m==x&&(m=n[--g].from,x=g?n[g-1].to:t),an[--m]=p;l=c}else s=u,l++}}}function S_(t,e,n,i,r,s,o){let a=i%2?2:1;if(i%2==r%2)for(let l=e,u=0;l<n;){let c=!0,h=!1;if(u==s.length||l<s[u].from){let g=an[l];g!=a&&(c=!1,h=g==16)}let f=!c&&a==1?[]:null,p=c?i:i+1,m=l;e:for(;;)if(u<s.length&&m==s[u].from){if(h)break e;let g=s[u];if(!c)for(let x=g.to,y=u+1;;){if(x==n)break e;if(y<s.length&&s[y].from==x)x=s[y++].to;else{if(an[x]==a)break e;break}}if(u++,f)f.push(g);else{g.from>l&&o.push(new so(l,g.from,p));let x=g.direction==Tu!=!(p%2);__(t,x?i+1:i,r,g.inner,g.from,g.to,o),l=g.to}m=g.to}else{if(m==n||(c?an[m]!=a:an[m]==a))break;m++}f?S_(t,l,m,i+1,r,f,o):l<m&&o.push(new so(l,m,p)),l=m}else for(let l=n,u=s.length;l>e;){let c=!0,h=!1;if(!u||l>s[u-1].to){let g=an[l-1];g!=a&&(c=!1,h=g==16)}let f=!c&&a==1?[]:null,p=c?i:i+1,m=l;e:for(;;)if(u&&m==s[u-1].to){if(h)break e;let g=s[--u];if(!c)for(let x=g.from,y=u;;){if(x==e)break e;if(y&&s[y-1].to==x)x=s[--y].from;else{if(an[x-1]==a)break e;break}}if(f)f.push(g);else{g.to<l&&o.push(new so(g.to,l,p));let x=g.direction==Tu!=!(p%2);__(t,x?i+1:i,r,g.inner,g.from,g.to,o),l=g.from}m=g.from}else{if(m==e||(c?an[m-1]!=a:an[m-1]==a))break;m--}f?S_(t,m,l,i+1,r,f,o):m<l&&o.push(new so(m,l,p)),l=m}}function __(t,e,n,i,r,s,o){let a=e%2?2:1;zse(t,r,s,i,a),Xse(t,r,s,i,a),Wse(r,s,i,a),S_(t,r,s,e,n,i,o)}function Hse(t,e,n){if(!t)return[new so(0,0,e==mk?1:0)];if(e==Tu&&!n.length&&!Zse.test(t))return UL(t.length);if(n.length)for(;t.length>an.length;)an[an.length]=256;let i=[],r=e==Tu?0:1;return __(t,r,r,n,0,t.length,i),i}function UL(t){return[new so(0,t,0)]}let qL="";function Use(t,e,n,i,r){var s;let o=i.head-t.from,a=so.find(e,o,(s=i.bidiLevel)!==null&&s!==void 0?s:-1,i.assoc),l=e[a],u=l.side(r,n);if(o==u){let f=a+=r?1:-1;if(f<0||f>=e.length)return null;l=e[a=f],o=l.side(!r,n),u=l.side(r,n)}let c=ui(t.text,o,l.forward(r,n));(c<l.from||c>l.to)&&(c=u),qL=t.text.slice(Math.min(o,c),Math.max(o,c));let h=a==(r?e.length-1:0)?null:e[a+(r?1:-1)];return h&&c==u&&h.level+(r?0:1)<l.level?fe.cursor(h.side(!r,n)+t.from,h.forward(r,n)?1:-1,h.level):fe.cursor(c+t.from,l.forward(r,n)?-1:1,l.level)}function qse(t,e,n){for(let i=e;i<n;i++){let r=WL(t.charCodeAt(i));if(r==1)return Tu;if(r==2||r==4)return mk}return Tu}const YL=Qe.define(),GL=Qe.define(),KL=Qe.define(),JL=Qe.define(),C_=Qe.define(),eD=Qe.define(),tD=Qe.define(),gk=Qe.define(),Ok=Qe.define(),nD=Qe.define({combine:t=>t.some(e=>e)}),iD=Qe.define({combine:t=>t.some(e=>e)}),rD=Qe.define();class zc{constructor(e,n,i,r,s,o=!1){this.range=e,this.y=n,this.x=i,this.yMargin=r,this.xMargin=s,this.isSnapshot=o}map(e){return e.empty?this:new zc(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new zc(fe.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const fg=nt.define({map:(t,e)=>t.map(e)}),sD=nt.define();function sr(t,e,n){let i=t.facet(JL);i.length?i[0](e):window.onerror&&window.onerror(String(e),n,void 0,void 0,e)||(n?console.error(n+":",e):console.error(e))}const Qo=Qe.define({combine:t=>t.length?t[0]:!0});let Yse=0;const Cc=Qe.define({combine(t){return t.filter((e,n)=>{for(let i=0;i<n;i++)if(t[i].plugin==e.plugin)return!1;return!0})}});class Ln{constructor(e,n,i,r,s){this.id=e,this.create=n,this.domEventHandlers=i,this.domEventObservers=r,this.baseExtensions=s(this),this.extension=this.baseExtensions.concat(Cc.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(Cc.of({plugin:this,arg:e}))}static define(e,n){const{eventHandlers:i,eventObservers:r,provide:s,decorations:o}=n||{};return new Ln(Yse++,e,i,r,a=>{let l=[];return o&&l.push(kx.of(u=>{let c=u.plugin(a);return c?o(c):Xe.none})),s&&l.push(s(a)),l})}static fromClass(e,n){return Ln.define((i,r)=>new e(i,r),n)}}class _v{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(i){if(sr(n.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(n){sr(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(i){sr(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const oD=Qe.define(),xk=Qe.define(),kx=Qe.define(),aD=Qe.define(),yk=Qe.define(),vm=Qe.define(),lD=Qe.define();function K3(t,e){let n=t.state.facet(lD);if(!n.length)return n;let i=n.map(s=>s instanceof Function?s(t):s),r=[];return vt.spans(i,e.from,e.to,{point(){},span(s,o,a,l){let u=s-e.from,c=o-e.from,h=r;for(let f=a.length-1;f>=0;f--,l--){let p=a[f].spec.bidiIsolate,m;if(p==null&&(p=qse(e.text,u,c)),l>0&&h.length&&(m=h[h.length-1]).to==u&&m.direction==p)m.to=c,h=m.inner;else{let g={from:u,to:c,direction:p,inner:[]};h.push(g),h=g.inner}}}}),r}const uD=Qe.define();function vk(t){let e=0,n=0,i=0,r=0;for(let s of t.state.facet(uD)){let o=s(t);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(n=Math.max(n,o.right)),o.top!=null&&(i=Math.max(i,o.top)),o.bottom!=null&&(r=Math.max(r,o.bottom)))}return{left:e,right:n,top:i,bottom:r}}const zf=Qe.define();class Kr{constructor(e,n,i,r){this.fromA=e,this.toA=n,this.fromB=i,this.toB=r}join(e){return new Kr(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,i=this;for(;n>0;n--){let r=e[n-1];if(!(r.fromA>i.toA)){if(r.toA<i.fromA)break;i=i.join(r),e.splice(n-1,1)}}return e.splice(n,0,i),e}static extendWithRanges(e,n){if(n.length==0)return e;let i=[];for(let r=0,s=0,o=0;;){let a=r<e.length?e[r].fromB:1e9,l=s<n.length?n[s]:1e9,u=Math.min(a,l);if(u==1e9)break;let c=u+o,h=u,f=c;for(;;)if(s<n.length&&n[s]<=h){let p=n[s+1];s+=2,h=Math.max(h,p);for(let m=r;m<e.length&&e[m].fromB<=h;m++)o=e[m].toA-e[m].toB;f=Math.max(f,p+o)}else if(r<e.length&&e[r].fromB<=h){let p=e[r++];h=Math.max(h,p.toB),f=Math.max(f,p.toA),o=p.toA-p.toB}else break;i.push(new Kr(c,f,u,h))}return i}}class wO{constructor(e,n,i){this.view=e,this.state=n,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=Fn.empty(this.startState.doc.length);for(let s of i)this.changes=this.changes.compose(s.changes);let r=[];this.changes.iterChangedRanges((s,o,a,l)=>r.push(new Kr(s,o,a,l))),this.changedRanges=r}static create(e,n,i){return new wO(e,n,i)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}const Gse=[];class Nn{constructor(e,n,i=0){this.dom=e,this.length=n,this.flags=i,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return Gse}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let n=this.domAttrs;n&&Rse(this.dom,n)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,n=this.posAtStart){let i=n;for(let r of this.children){if(r==e)return i;i+=r.length+r.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,n,i){return null}domPosFor(e,n){let i=dl(this.dom),r=this.length?e>0:n>0;return new Es(this.parent.dom,i+(r?1:0),e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof Tx)return e;return null}static get(e){return e.cmTile}}class Ex extends Nn{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let n=this.dom,i=null,r,s=(e==null?void 0:e.node)==n?e:null,o=0;for(let a of this.children){if(a.sync(e),o+=a.length+a.breakAfter,r=i?i.nextSibling:n.firstChild,s&&r!=a.dom&&(s.written=!0),a.dom.parentNode==n)for(;r&&r!=a.dom;)r=J3(r);else n.insertBefore(a.dom,r);i=a.dom}for(r=i?i.nextSibling:n.firstChild,s&&r&&(s.written=!0);r;)r=J3(r);this.length=o}}function J3(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class Tx extends Ex{constructor(e,n){super(n),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let n=Nn.get(e);if(n&&this.owns(n))return n;e=e.parentNode}}blockTiles(e){for(let n=[],i=this,r=0,s=0;;)if(r==i.children.length){if(!n.length)return;i=i.parent,i.breakAfter&&s++,r=n.pop()}else{let o=i.children[r++];if(o instanceof Yo)n.push(r),i=o,r=0;else{let a=s+o.length,l=e(o,s);if(l!==void 0)return l;s=a+o.breakAfter}}}resolveBlock(e,n){let i,r=-1,s,o=-1;if(this.blockTiles((a,l)=>{let u=l+a.length;if(e>=l&&e<=u){if(a.isWidget()&&n>=-1&&n<=1){if(a.flags&32)return!0;a.flags&16&&(i=void 0)}(l<e||e==u&&(n<-1?a.length:a.covers(1)))&&(!i||!a.isWidget()&&i.isWidget())&&(i=a,r=e-l),(u>e||e==l&&(n>1?a.length:a.covers(-1)))&&(!s||!a.isWidget()&&s.isWidget())&&(s=a,o=e-l)}}),!i&&!s)throw new Error("No tile at position "+e);return i&&n<0||!s?{tile:i,offset:r}:{tile:s,offset:o}}}class Yo extends Ex{constructor(e,n){super(e),this.wrapper=n}isBlock(){return!0}covers(e){return this.children.length?e<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(e,n){let i=new Yo(n||document.createElement(e.tagName),e);return n||(i.flags|=4),i}}class fh extends Ex{constructor(e,n){super(e),this.attrs=n}isLine(){return!0}static start(e,n,i){let r=new fh(n||document.createElement("div"),e);return(!n||!i)&&(r.flags|=4),r}get domAttrs(){return this.attrs}resolveInline(e,n,i){let r=null,s=-1,o=null,a=-1;function l(c,h){for(let f=0,p=0;f<c.children.length&&p<=h;f++){let m=c.children[f],g=p+m.length;g>=h&&(m.isComposite()?l(m,h-p):(!o||o.isHidden&&(n>0&&!(o.flags&32)||i&&Jse(o,m)))&&(g>h||m.flags&32&&n<=1)?(o=m,a=h-p):(p<h||m.flags&16&&!m.isHidden&&n>=-1)&&(r=m,s=h-p)),p=g}}l(this,e);let u=(n<0?r:o)||r||o;return u?{tile:u,offset:u==r?s:a}:null}coordsIn(e,n,i){let r=this.resolveInline(e,n,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),n,i):Kse(this)}domIn(e,n){let i=this.resolveInline(e,n);if(i){let{tile:r,offset:s}=i;if(this.dom.contains(r.dom))return r.isText()?new Es(r.dom,Math.min(r.dom.nodeValue.length,s)):r.domPosFor(s,r.flags&16?1:r.flags&32?-1:n);let o=i.tile.parent,a=!1;for(let l of o.children){if(a)return new Es(l.dom,0);l==i.tile&&(a=!0)}}return new Es(this.dom,0)}}function Kse(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let n=l0(e);return n[n.length-1]||null}function Jse(t,e){let n=t.coordsIn(0,1),i=e.coordsIn(0,1);return n&&i&&i.top<n.bottom}class ir extends Ex{constructor(e,n){super(e),this.mark=n}get domAttrs(){return this.mark.attrs}static of(e,n){let i=new ir(n||document.createElement(e.tagName),e);return n||(i.flags|=4),i}}class Ul extends Nn{constructor(e,n){super(e,n.length),this.text=n}sync(e){this.flags&2||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,n,i){let r=this.dom.nodeValue.length;e>r&&(e=r);let s=e,o=e,a=0;e==0&&n<0||e==r&&n>=0?De.chrome||De.gecko||(e?(s--,a=1):o<r&&(o++,a=-1)):n<0?s--:o<r&&o++;let l=up(this.dom,s,o).getClientRects();if(!l.length)return null;let u=l[(a?a<0:n>=0)?0:l.length-1];return De.safari&&!a&&u.width==0&&(u=Array.prototype.find.call(l,c=>c.width)||u),i==null?u:CO(u,(a?a>0:n<0)==i)}static of(e,n){let i=new Ul(n||document.createTextNode(e),e);return n||(i.flags|=2),i}}class Pu extends Nn{constructor(e,n,i,r){super(e,n,r),this.widget=i}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return this.flags&48?!1:(this.flags&(e<0?64:128))>0}coordsIn(e,n){return this.coordsInWidget(e,n,!1)}coordsInWidget(e,n,i){let r=this.widget.coordsAt(this.dom,e,n);if(r)return r;if(i)return CO(this.dom.getBoundingClientRect(),this.length?e==0:n<=0);{let s=this.dom.getClientRects(),o=null;if(!s.length)return null;let a=this.flags&16?!0:this.flags&32?!1:e>0;for(let l=a?s.length-1:0;o=s[l],!(e>0?l==0:l==s.length-1||o.top<o.bottom);l+=a?-1:1);return CO(o,!a)}}get overrideDOMText(){if(!this.length)return $t.empty;let{root:e}=this;if(!e)return $t.empty;let n=this.posAtStart;return e.view.state.doc.slice(n,n+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(e,n,i,r,s){return s||(s=e.toDOM(n),e.editable||(s.contentEditable="false")),new Pu(s,i,e,r)}}class kO extends Nn{constructor(e){let n=document.createElement("img");n.className="cm-widgetBuffer",n.setAttribute("aria-hidden","true"),super(n,0,e)}get isHidden(){return!0}get overrideDOMText(){return $t.empty}coordsIn(e,n,i){let r=this.dom.getBoundingClientRect();return i==null?r:CO(r,n>0==i)}}class eoe{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,n,i){let{tile:r,index:s,beforeBreak:o,parents:a}=this;for(;e||n>0;)if(r.isComposite())if(o){if(!e)break;i&&i.break(),e--,o=!1}else if(s==r.children.length){if(!e&&!a.length)break;i&&i.leave(r),o=!!r.breakAfter,{tile:r,index:s}=a.pop(),s++}else{let l=r.children[s],u=l.breakAfter;(n>0?l.length<=e:l.length<e)&&(!i||i.skip(l,0,l.length)!==!1||!l.isComposite)?(o=!!u,s++,e-=l.length):(a.push({tile:r,index:s}),r=l,s=0,i&&l.isComposite()&&i.enter(l))}else{let l=r.length;if(s<l&&e){let u=Math.min(e,l-s);i&&i.skip(r,s,s+u),e-=u,s+=u}if(s==l)o=!!r.breakAfter,{tile:r,index:s}=a.pop(),s++;else if(!e)break}return this.tile=r,this.index=s,this.beforeBreak=o,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}}class toe{constructor(e,n,i,r){this.from=e,this.to=n,this.wrapper=i,this.rank=r}}class noe{constructor(e,n,i){this.cache=e,this.root=n,this.blockWrappers=i,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,n,i,r){var s;this.flushBuffer();let o=this.ensureMarks(n,i),a=o.lastChild;if(a&&a.isText()&&!(a.flags&8)&&a.length+e.length<512){this.cache.reused.set(a,2);let l=o.children[o.children.length-1]=new Ul(a.dom,a.text+e);l.parent=o}else o.append(r||Ul.of(e,(s=this.cache.find(Ul))===null||s===void 0?void 0:s.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,n){let i=this.curLine;i.dom!=n.line.dom&&(i.setDOM(this.cache.reused.has(n.line)?Cv(n.line.dom):n.line.dom),this.cache.reused.set(n.line,2));let r=i;for(let a=n.marks.length-1;a>=0;a--){let l=n.marks[a],u=r.lastChild;if(u instanceof ir&&u.mark.eq(l.mark))u.dom!=l.dom&&u.setDOM(Cv(l.dom)),r=u;else{if(this.cache.reused.get(l)){let h=Nn.get(l.dom);h&&h.setDOM(Cv(l.dom))}let c=ir.of(l.mark,l.dom);r.append(c),r=c}this.cache.reused.set(l,2)}let s=Nn.get(e.text);s&&this.cache.reused.set(s,2);let o=new Ul(e.text,e.text.nodeValue);o.flags|=8,this.pos=e.range.toB,r.append(o)}addInlineWidget(e,n,i){let r=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);r||this.flushBuffer();let s=this.ensureMarks(n,i);!r&&!(e.flags&16)&&s.append(this.getBuffer(1)),s.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,n,i){this.flushBuffer(),this.ensureMarks(n,i).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let n=this.afterWidget||this.lastBlock;n.length+=e,this.pos+=e}addLineStart(e,n){var i;e||(e=cD);let r=fh.start(e,n||((i=this.cache.find(fh))===null||i===void 0?void 0:i.dom),!!n);this.getBlockPos().append(this.lastBlock=this.curLine=r)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,n){var i;let r=this.curLine;for(let s=e.length-1;s>=0;s--){let o=e[s],a;if(n>0&&(a=r.lastChild)&&a instanceof ir&&a.mark.eq(o))r=a,n--;else{let l=ir.of(o,(i=this.cache.find(ir,u=>u.mark.eq(o)))===null||i===void 0?void 0:i.dom);r.append(l),r=l,n=0}}return r}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!e9(this.curLine,!1)||e.dom.nodeName!="BR"&&e.isWidget()&&!(De.ios&&e9(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(wv,0,32)||new Pu(wv.toDOM(),0,wv,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let n=e.rank*102+e.value.rank,i=new toe(e.from,e.to,e.value,n),r=this.wrappers.length;for(;r>0&&(this.wrappers[r-1].rank-i.rank||this.wrappers[r-1].to-i.to)<0;)r--;this.wrappers.splice(r,0,i)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let n=this.root;for(let i of this.wrappers){let r=n.lastChild;if(i.from<this.pos&&r instanceof Yo&&r.wrapper.eq(i.wrapper))n=r;else{let s=Yo.of(i.wrapper,(e=this.cache.find(Yo,o=>o.wrapper.eq(i.wrapper)))===null||e===void 0?void 0:e.dom);n.append(s),n=s}}return n}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let n=2|(e<0?16:32),i=this.cache.find(kO,void 0,1);return i&&(i.flags=n),i||new kO(n)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}}class ioe{constructor(e){this.skipCount=0,this.text="",this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:r,lineBreak:s,done:o}=this.cursor.next(this.skipCount);if(this.skipCount=0,o)throw new Error("Ran out of text content when drawing inline views");this.text=r;let a=this.textOff=Math.min(e,r.length);return s?null:r.slice(0,a)}let n=Math.min(this.text.length,this.textOff+e),i=this.text.slice(this.textOff,n);return this.textOff=n,i}}const EO=[Pu,fh,Ul,ir,kO,Yo,Tx];for(let t=0;t<EO.length;t++)EO[t].bucket=t;class roe{constructor(e){this.view=e,this.buckets=EO.map(()=>[]),this.index=EO.map(()=>0),this.reused=new Map}add(e){let n=e.constructor.bucket,i=this.buckets[n];i.length<6?i.push(e):i[this.index[n]=(this.index[n]+1)%6]=e}find(e,n,i=2){let r=e.bucket,s=this.buckets[r],o=this.index[r];for(let a=0;a<s.length;a++){let l=(a+o)%s.length,u=s[l];if((!n||n(u))&&!this.reused.has(u))return s.splice(l,1),l<o&&this.index[r]--,this.reused.set(u,i),u}return null}findWidget(e,n,i){let r=this.buckets[0];if(r.length)for(let s=0,o=0;;s++){if(s==r.length){if(o)return null;o=1,s=0}let a=r[s];if(!this.reused.has(a)&&(o==0?a.widget.compare(e):a.widget.constructor==e.constructor&&e.updateDOM(a.dom,this.view,a.widget)))return r.splice(s,1),s<this.index[0]&&this.index[0]--,a.widget==e&&a.length==n&&(a.flags&497)==i?(this.reused.set(a,1),a):(this.reused.set(a,2),new Pu(a.dom,n,e,a.flags&-498|i))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,n=2){if(!this.reused.has(e))return this.reused.set(e,n),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}}class soe{constructor(e,n,i,r,s){this.view=e,this.decorations=r,this.disallowBlockEffectsFor=s,this.openWidget=!1,this.openMarks=0,this.cache=new roe(e),this.text=new ioe(e.state.doc),this.builder=new noe(this.cache,new Tx(e,e.contentDOM),vt.iter(i)),this.cache.reused.set(n,2),this.old=new eoe(n),this.reuseWalker={skip:(o,a,l)=>{if(this.cache.add(o),o.isComposite())return!1},enter:o=>this.cache.add(o),leave:()=>{},break:()=>{}}}run(e,n){let i=n&&this.getCompositionContext(n.text);for(let r=0,s=0,o=0;;){let a=o<e.length?e[o++]:null,l=a?a.fromA:this.old.root.length;if(l>r){let u=l-r;this.preserve(u,!o,!a),r=l,s+=u}if(!a)break;n&&a.fromA<=n.range.fromA&&a.toA>=n.range.toA?(this.forward(a.fromA,n.range.fromA,n.range.fromA<n.range.toA?1:-1),this.emit(s,n.range.fromB),this.builder.flushBuffer(),this.cache.clear(),this.builder.addComposition(n,i),this.text.skip(n.range.toB-n.range.fromB),this.forward(n.range.fromA,a.toA),this.emit(n.range.toB,a.toB)):(this.forward(a.fromA,a.toA),this.emit(s,a.toB)),s=a.toB,r=a.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,n,i){let r=loe(this.old),s=this.openMarks;this.old.advance(e,i?1:-1,{skip:(o,a,l)=>{if(o.isWidget())if(this.openWidget)this.builder.continueWidget(l-a);else{let u=l>0||a<o.length?Pu.of(o.widget,this.view,l-a,o.flags&496,this.cache.maybeReuse(o)):this.cache.reuse(o);u.flags&256?(u.flags&=-2,this.builder.addBlockWidget(u)):(this.builder.ensureLine(null),this.builder.addInlineWidget(u,r,s),s=r.length)}else if(o.isText())this.builder.ensureLine(null),!a&&l==o.length&&!this.cache.reused.has(o)?this.builder.addText(o.text,r,s,this.cache.reuse(o)):(this.cache.add(o),this.builder.addText(o.text.slice(a,l),r,s)),s=r.length;else if(o.isLine())o.flags&=-2,this.cache.reused.set(o,1),this.builder.addLine(o);else if(o instanceof kO)this.cache.add(o);else if(o instanceof ir)this.builder.ensureLine(null),this.builder.addMark(o,r,s),this.cache.reused.set(o,1),s=r.length;else return!1;this.openWidget=!1},enter:o=>{o.isLine()?this.builder.addLineStart(o.attrs,this.cache.maybeReuse(o)):(this.cache.add(o),o instanceof ir&&r.unshift(o.mark)),this.openWidget=!1},leave:o=>{o.isLine()?r.length&&(r.length=s=0):o instanceof ir&&(r.shift(),s=Math.min(s,r.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,n){let i=null,r=this.builder,s=-1,o=vt.spans(this.decorations,e,n,{point:(a,l,u,c,h,f)=>{if(u instanceof Eu){if(this.disallowBlockEffectsFor[f]){if(u.block)throw new RangeError("Block decorations may not be specified via plugins");if(l>this.view.state.doc.lineAt(a).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}if(s=c.length,h>c.length)r.continueWidget(l-a);else{let p=u.widget||(u.block?dh.block:dh.inline),m=ooe(u),g=this.cache.findWidget(p,l-a,m)||Pu.of(p,this.view,l-a,m);u.block?(u.startSide>0&&r.addLineStartIfNotCovered(i),r.addBlockWidget(g)):(r.ensureLine(i),r.addInlineWidget(g,c,h))}i=null}else i=aoe(i,u);l>a&&this.text.skip(l-a)},span:(a,l,u,c)=>{for(let h=a;h<l;){let f=this.text.next(Math.min(512,l-h));f==null?(r.addLineStartIfNotCovered(i),r.addBreak(),h++):(r.ensureLine(i),r.addText(f,u,h==a?c:u.length),h+=f.length),i=null}s=u.length}});s>-1&&(this.openWidget=o>s),this.openWidget||r.addLineStartIfNotCovered(i),this.openMarks=o}forward(e,n,i=1){n-e<=10?this.old.advance(n-e,i,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(n-e-10,-1),this.old.advance(5,i,this.reuseWalker))}getCompositionContext(e){let n=[],i=null;for(let r=e.parentNode;;r=r.parentNode){let s=Nn.get(r);if(r==this.view.contentDOM)break;s instanceof ir?n.push(s):s!=null&&s.isLine()?i=s:s instanceof Yo||(r.nodeName=="DIV"&&!i&&r!=this.view.contentDOM?i=new fh(r,cD):i||n.push(ir.of(new xm({tagName:r.nodeName.toLowerCase(),attributes:Mse(r)}),r)))}return{line:i,marks:n}}}function e9(t,e){let n=i=>{for(let r of i.children)if((e?r.isText():r.length)||n(r))return!0;return!1};return n(t)}function ooe(t){let e=t.isReplace?(t.startSide<0?64:0)|(t.endSide>0?128:0):t.startSide>0?32:16;return t.block&&(e|=256),e}const cD={class:"cm-line"};function aoe(t,e){let n=e.spec.attributes,i=e.spec.class;return!n&&!i||(t||(t={class:"cm-line"}),n&&dk(n,t),i&&(t.class+=" "+i)),t}function loe(t){let e=[];for(let n=t.parents.length;n>1;n--){let i=n==t.parents.length?t.tile:t.parents[n].tile;i instanceof ir&&e.push(i.mark)}return e}function Cv(t){let e=Nn.get(t);return e&&e.setDOM(t.cloneNode()),t}class dh extends ds{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}dh.inline=new dh("span");dh.block=new dh("div");const wv=new class extends ds{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class t9{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=Xe.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new Tx(e,e.contentDOM),this.updateInner([new Kr(0,0,0,e.state.doc.length)],null)}update(e){var n;let i=e.changedRanges;this.minWidth>0&&i.length&&(i.every(({fromA:c,toA:h})=>h<this.minWidthFrom||c>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let r=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?r=this.domChanged.newSel.head:!Ooe(e.changes,this.hasComposition)&&!e.selectionSet&&(r=e.state.selection.main.head));let s=r>-1?coe(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){let{from:c,to:h}=this.hasComposition;i=new Kr(c,h,e.changes.mapPos(c,-1),e.changes.mapPos(h,1)).addToSet(i.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(De.ie||De.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,a=this.blockWrappers;this.updateDeco();let l=doe(o,this.decorations,e.changes);l.length&&(i=Kr.extendWithRanges(i,l));let u=moe(a,this.blockWrappers,e.changes);return u.length&&(i=Kr.extendWithRanges(i,u)),s&&!i.some(c=>c.fromA<=s.range.fromA&&c.toA>=s.range.toA)&&(i=s.range.addToSet(i.slice())),this.tile.flags&2&&i.length==0?!1:(this.updateInner(i,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n){this.view.viewState.mustMeasureContent=!0;let{observer:i}=this.view;i.ignore(()=>{if(n||e.length){let o=this.tile,a=new soe(this.view,o,this.blockWrappers,this.decorations,this.dynamicDecorationMap);n&&Nn.get(n.text)&&a.cache.reused.set(Nn.get(n.text),2),this.tile=a.run(e,n),w_(o,a.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=De.chrome||De.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(s),s&&(s.written||i.selectionRange.focusNode!=s.node||!this.tile.dom.contains(s.node))&&(this.forceSelection=!0),this.tile.dom.style.height=""});let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let s of this.tile.children)s.isWidget()&&s.widget instanceof kv&&r.push(s.dom);i.updateGaps(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let i of n.effects)i.is(sD)&&(this.editContextFormatting=i.value)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:i}=this.tile,r=this.view.root.activeElement,s=r==i,o=!s&&!(this.view.state.facet(Qo)||i.tabIndex>-1)&&pd(i,this.view.observer.selectionRange)&&!(r&&i.contains(r));if(!(s||n||o))return;let a=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,u,c;if(l.empty?c=u=this.inlineDOMNearPos(l.anchor,l.assoc||1):(c=this.inlineDOMNearPos(l.head,l.head==l.from?1:-1),u=this.inlineDOMNearPos(l.anchor,l.anchor==l.from?1:-1)),De.gecko&&l.empty&&!this.hasComposition&&uoe(u)){let f=document.createTextNode("");this.view.observer.ignore(()=>u.node.insertBefore(f,u.node.childNodes[u.offset]||null)),u=c=new Es(f,0),a=!0}let h=this.view.observer.selectionRange;(a||!h.focusNode||(!md(u.node,u.offset,h.anchorNode,h.anchorOffset)||!md(c.node,c.offset,h.focusNode,h.focusOffset))&&!this.suppressWidgetCursorChange(h,l))&&(this.view.observer.ignore(()=>{De.android&&De.chrome&&i.contains(h.focusNode)&&goe(h.focusNode,i)&&(i.blur(),i.focus({preventScroll:!0}));let f=lp(this.view.root);if(f)if(l.empty){if(De.gecko){let p=hoe(u.node,u.offset);if(p&&p!=3){let m=(p==1?ZL:zL)(u.node,u.offset);m&&(u=new Es(m.node,m.offset))}}f.collapse(u.node,u.offset),l.bidiLevel!=null&&f.caretBidiLevel!==void 0&&(f.caretBidiLevel=l.bidiLevel)}else if(f.extend){f.collapse(u.node,u.offset);try{f.extend(c.node,c.offset)}catch{}}else{let p=document.createRange();l.anchor>l.head&&([u,c]=[c,u]),p.setEnd(c.node,c.offset),p.setStart(u.node,u.offset),f.removeAllRanges(),f.addRange(p)}o&&this.view.root.activeElement==i&&(i.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(u,c)),this.impreciseAnchor=u.precise?null:new Es(h.anchorNode,h.anchorOffset),this.impreciseHead=c.precise?null:new Es(h.focusNode,h.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&md(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,i=lp(e.root),{anchorNode:r,anchorOffset:s}=e.observer.selectionRange;if(!i||!n.empty||!n.assoc||!i.modify)return;let o=this.lineAt(n.head,n.assoc);if(!o)return;let a=o.posAtStart;if(n.head==a||n.head==a+o.length)return;let l=this.coordsAt(n.head,-1),u=this.coordsAt(n.head,1);if(!l||!u||l.bottom>u.top)return;let c=this.domAtPos(n.head+n.assoc,n.assoc);i.collapse(c.node,c.offset),i.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let h=e.observer.selectionRange;e.docView.posFromDOM(h.anchorNode,h.anchorOffset)!=n.from&&i.collapse(r,s)}posFromDOM(e,n){let i=this.tile.nearest(e);if(!i)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let r=i.posAtStart;if(i.isComposite()){let s;if(e==i.dom)s=i.dom.childNodes[n];else{let o=ca(e)==0?0:n==0?-1:1;for(;;){let a=e.parentNode;if(a==i.dom)break;o==0&&a.firstChild!=a.lastChild&&(e==a.firstChild?o=-1:o=1),e=a}o<0?s=e:s=e.nextSibling}if(s==i.dom.firstChild)return r;for(;s&&!Nn.get(s);)s=s.nextSibling;if(!s)return r+i.length;for(let o=0,a=r;;o++){let l=i.children[o];if(l.dom==s)return a;a+=l.length+l.breakAfter}}else return i.isText()?e==i.dom?r+n:r+(n?i.length:0):r}domAtPos(e,n){let{tile:i,offset:r}=this.tile.resolveBlock(e,n);return i.isWidget()?i.domPosFor(r,n):i.domIn(r,n)}inlineDOMNearPos(e,n){let i,r=-1,s=!1,o,a=-1,l=!1;return this.tile.blockTiles((u,c)=>{if(u.isWidget()){if(u.flags&32&&c>=e)return!0;u.flags&16&&(s=!0)}else{let h=c+u.length;if(c<=e&&(i=u,r=e-c,s=h<e),h>=e&&!o&&(o=u,a=e-c,l=c>e),c>e&&o)return!0}}),!i&&!o?this.domAtPos(e,n):(s&&o?i=null:l&&i&&(o=null),i&&n<0||!o?i.domIn(r,n):o.domIn(a,n))}coordsAt(e,n,i){let{tile:r,offset:s}=this.tile.resolveBlock(e,n);return r.isWidget()?r.widget instanceof kv?null:r.coordsInWidget(s,n,!0):r.coordsIn(s,n,i)}lineAt(e,n){let{tile:i}=this.tile.resolveBlock(e,n);return i.isLine()?i:null}coordsForChar(e){let{tile:n,offset:i}=this.tile.resolveBlock(e,1);if(!n.isLine())return null;function r(s,o){if(s.isComposite())for(let a of s.children){if(a.length>=o){let l=r(a,o);if(l)return l}if(o-=a.length,o<0)break}else if(s.isText()&&o<s.length){let a=ui(s.text,o);if(a==o)return null;let l=up(s.dom,o,a).getClientRects();for(let u=0;u<l.length;u++){let c=l[u];if(u==l.length-1||c.top<c.bottom&&c.left<c.right)return c}}return null}return r(n,i)}measureVisibleLineHeights(e){let n=[],{from:i,to:r}=e,s=this.view.contentDOM.clientWidth,o=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,l=this.view.textDirection==un.LTR,u=0,c=(h,f,p)=>{for(let m=0;m<h.children.length&&!(f>r);m++){let g=h.children[m],x=f+g.length,y=g.dom.getBoundingClientRect(),{height:S}=y;if(p&&!m&&(u+=y.top-p.top),g instanceof Yo)x>i&&c(g,f,y);else if(f>=i&&(u>0&&n.push(-u),n.push(S+u),u=0,o)){let _=g.dom.lastChild,k=_?l0(_):[];if(k.length){let w=k[k.length-1],b=l?w.right-y.left:y.right-w.left;b>a&&(a=b,this.minWidth=s,this.minWidthFrom=f,this.minWidthTo=x)}}p&&m==h.children.length-1&&(u+=p.bottom-y.bottom),f=x+g.breakAfter}};return c(this.tile,0,null),n}textDirectionAt(e){let{tile:n}=this.tile.resolveBlock(e,1);return getComputedStyle(n.dom).direction=="rtl"?un.RTL:un.LTR}measureTextSize(){let e=this.tile.blockTiles(o=>{if(o.isLine()&&o.children.length&&o.length<=20){let a=0,l;for(let u of o.children){if(!u.isText()||/[^ -~]/.test(u.text))return;let c=l0(u.dom);if(c.length!=1)return;a+=c[0].width,l=c[0].height}if(a)return{lineHeight:o.dom.getBoundingClientRect().height,charWidth:a/o.length,textHeight:l}}});if(e)return e;let n=document.createElement("div"),i,r,s;return n.className="cm-line",n.style.width="99999px",n.style.position="absolute",n.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(n);let o=l0(n.firstChild)[0];i=n.getBoundingClientRect().height,r=o&&o.width?o.width/27:7,s=o&&o.height?o.height:i,n.remove()}),{lineHeight:i,charWidth:r,textHeight:s}}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let i=0,r=0;;r++){let s=r==n.viewports.length?null:n.viewports[r],o=s?s.from-1:this.view.state.doc.length;if(o>i){let a=(n.lineBlockAt(o).bottom-n.lineBlockAt(i).top)/this.view.scaleY;e.push(Xe.replace({widget:new kv(a),block:!0,inclusive:!0,isBlockGap:!0}).range(i,o))}if(!s)break;i=s.to+1}return Xe.set(e)}updateDeco(){let e=1,n=this.view.state.facet(kx).map(s=>(this.dynamicDecorationMap[e++]=typeof s=="function")?s(this.view):s),i=!1,r=this.view.state.facet(yk).map((s,o)=>{let a=typeof s=="function";return a&&(i=!0),a?s(this.view):s});for(r.length&&(this.dynamicDecorationMap[e++]=i,n.push(vt.join(r))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(aD).map(s=>typeof s=="function"?s(this.view):s)}scrollIntoView(e){if(e.isSnapshot){let u=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=u.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let u of this.view.state.facet(rD))try{if(u(this.view,e.range,e))return!0}catch(c){sr(this.view.state,c,"scroll handler")}let{range:n}=e,i=this.coordsAt(n.head,n.assoc||(n.head>n.anchor?-1:1)),r;if(!i)return;!n.empty&&(r=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(i={left:Math.min(i.left,r.left),top:Math.min(i.top,r.top),right:Math.max(i.right,r.right),bottom:Math.max(i.bottom,r.bottom)});let s=vk(this.view),o={left:i.left-s.left,top:i.top-s.top,right:i.right+s.right,bottom:i.bottom+s.bottom},{offsetWidth:a,offsetHeight:l}=this.view.scrollDOM;if(Dse(this.view.scrollDOM,o,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,a),-a),Math.max(Math.min(e.yMargin,l),-l),this.view.textDirection==un.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(i.top>window.pageYOffset+window.visualViewport.offsetTop+window.visualViewport.height||i.bottom<window.pageYOffset+window.visualViewport.offsetTop)){let u=this.view.docView.lineAt(n.head,1);u&&u.dom.scrollIntoView({block:"nearest"})}}lineHasWidget(e){let n=i=>i.isWidget()||i.children.some(n);return n(this.tile.resolveBlock(e,1).tile)}destroy(){w_(this.tile)}}function w_(t,e){let n=e==null?void 0:e.get(t);if(n!=1){n==null&&t.destroy();for(let i of t.children)w_(i,e)}}function uoe(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}function hD(t,e){let n=t.observer.selectionRange;if(!n.focusNode)return null;let i=ZL(n.focusNode,n.focusOffset),r=zL(n.focusNode,n.focusOffset),s=i||r;if(r&&i&&r.node!=i.node){let a=Nn.get(r.node);if(!a||a.isText()&&a.text!=r.node.nodeValue)s=r;else if(t.docView.lastCompositionAfterCursor){let l=Nn.get(i.node);!l||l.isText()&&l.text!=i.node.nodeValue||(s=r)}}if(t.docView.lastCompositionAfterCursor=s!=i,!s)return null;let o=e-s.offset;return{from:o,to:o+s.node.nodeValue.length,node:s.node}}function coe(t,e,n){let i=hD(t,n);if(!i)return null;let{node:r,from:s,to:o}=i,a=r.nodeValue;if(/[\n\r]/.test(a)||t.state.doc.sliceString(i.from,i.to)!=a)return null;let l=e.invertedDesc;return{range:new Kr(l.mapPos(s),l.mapPos(o),s,o),text:r}}function hoe(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e<t.childNodes.length&&t.childNodes[e].contentEditable=="false"?2:0)}let foe=class{constructor(){this.changes=[]}compareRange(e,n){jc(e,n,this.changes)}comparePoint(e,n){jc(e,n,this.changes)}boundChange(e){jc(e,e,this.changes)}};function doe(t,e,n){let i=new foe;return vt.compare(t,e,n,i),i.changes}class poe{constructor(){this.changes=[]}compareRange(e,n){jc(e,n,this.changes)}comparePoint(){}boundChange(e){jc(e,e,this.changes)}}function moe(t,e,n){let i=new poe;return vt.compare(t,e,n,i),i.changes}function goe(t,e){for(let n=t;n&&n!=e;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function Ooe(t,e){let n=!1;return e&&t.iterChangedRanges((i,r)=>{i<e.to&&r>e.from&&(n=!0)}),n}class kv extends ds{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function xoe(t,e,n=1){let i=t.charCategorizer(e),r=t.doc.lineAt(e),s=e-r.from;if(r.length==0)return fe.cursor(e);s==0?n=1:s==r.length&&(n=-1);let o=s,a=s;n<0?o=ui(r.text,s,!1):a=ui(r.text,s);let l=i(r.text.slice(o,a));for(;o>0;){let u=ui(r.text,o,!1);if(i(r.text.slice(u,o))!=l)break;o=u}for(;a<r.length;){let u=ui(r.text,a);if(i(r.text.slice(a,u))!=l)break;a=u}return fe.undirectionalRange(o+r.from,a+r.from)}function yoe(t,e,n,i,r){let s=Math.round((i-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&n.height>t.defaultLineHeight*1.5){let a=t.viewState.heightOracle.textHeight,l=Math.floor((r-n.top-(t.defaultLineHeight-a)*.5)/a);s+=l*t.viewState.heightOracle.lineLength}let o=t.state.sliceDoc(n.from,n.to);return n.from+d_(o,s,t.state.tabSize)}function k_(t,e,n){let i=t.lineBlockAt(e);if(Array.isArray(i.type)){let r;for(let s of i.type){if(s.from>e)break;if(!(s.to<e)){if(s.from<e&&s.to>e)return s;(!r||s.type==Si.Text&&(r.type!=s.type||(n<0?s.from<e:s.to>e)))&&(r=s)}}return r||i}return i}function voe(t,e,n,i){let r=k_(t,e.head,e.assoc||-1),s=!i||r.type!=Si.Text||!(t.lineWrapping||r.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>r.from?e.head-1:e.head);if(s){let o=t.dom.getBoundingClientRect(),a=t.textDirectionAt(r.from),l=t.posAtCoords({x:n==(a==un.LTR)?o.right-1:o.left+1,y:(s.top+s.bottom)/2});if(l!=null)return fe.cursor(l,n?-1:1)}return fe.cursor(n?r.to:r.from,n?-1:1)}function n9(t,e,n,i){let r=t.state.doc.lineAt(e.head),s=t.bidiSpans(r),o=t.textDirectionAt(r.from);for(let a=e,l=null;;){let u=Use(r,s,o,a,n),c=qL;if(!u){if(r.number==(n?t.state.doc.lines:1))return a;c=`
|
|
125
|
+
`,r=t.state.doc.line(r.number+(n?1:-1)),s=t.bidiSpans(r),u=t.visualLineSide(r,!n)}if(l){if(!l(c))return a}else{if(!i)return u;l=i(c)}a=u}}function boe(t,e,n){let i=t.state.charCategorizer(e),r=i(n);return s=>{let o=i(s);return r==Cn.Space&&(r=o),r==o}}function Soe(t,e,n,i){let r=e.head,s=n?1:-1;if(r==(n?t.state.doc.length:0))return fe.cursor(r,e.assoc);let o=e.goalColumn,a,l=t.contentDOM.getBoundingClientRect(),u=t.coordsAtPos(r,e.assoc||((e.empty?n:e.head==e.from)?1:-1)),c=t.documentTop;if(u)o==null&&(o=u.left-l.left),a=s<0?u.top:u.bottom;else{let m=t.viewState.lineBlockAt(r);o==null&&(o=Math.min(l.right-l.left,t.defaultCharacterWidth*(r-m.from))),a=(s<0?m.top:m.bottom)+c}let h=l.left+o,f=t.viewState.heightOracle.textHeight>>1,p=i??f;for(let m=0;;m+=f){let g=a+(p+m)*s,x=E_(t,{x:h,y:g},!1,s);if(n?g>l.bottom:g<l.top)return fe.cursor(x.pos,x.assoc);let y=t.coordsAtPos(x.pos,x.assoc),S=y?(y.top+y.bottom)/2:0;if(!y||(n?S>a:S<a))return fe.cursor(x.pos,x.assoc,void 0,o)}}function gd(t,e,n){for(;;){let i=0;for(let r of t)r.between(e-1,e+1,(s,o,a)=>{if(e>s&&e<o){let l=i||n||(e-s<o-e?-1:1);e=l<0?s:o,i=l}});if(!i)return e}}function fD(t,e){let n=null;for(let i=0;i<e.ranges.length;i++){let r=e.ranges[i],s=null;if(r.empty){let o=gd(t,r.from,0);o!=r.from&&(s=fe.cursor(o,-1))}else{let o=gd(t,r.from,-1),a=gd(t,r.to,1);(o!=r.from||a!=r.to)&&(r.undirectional?s=fe.undirectionalRange(r.from,r.to):s=fe.range(r.from==r.anchor?o:a,r.from==r.head?o:a))}s&&(n||(n=e.ranges.slice()),n[i]=s)}return n?fe.create(n,e.mainIndex):e}function Ev(t,e,n){let i=gd(t.state.facet(vm).map(r=>r(t)),n.from,e.head>n.from?-1:1);return i==n.from?n:fe.cursor(i,i<n.from?1:-1)}class eo{constructor(e,n){this.pos=e,this.assoc=n}}function E_(t,e,n,i){let r=t.contentDOM.getBoundingClientRect(),s=r.top+t.viewState.paddingTop,{x:o,y:a}=e,l=a-s,u;for(;;){if(l<0)return new eo(0,1);if(l>t.viewState.docHeight)return new eo(t.state.doc.length,-1);if(u=t.elementAtHeight(l),i==null)break;if(u.type==Si.Text){if(i<0?u.to<t.viewport.from:u.from>t.viewport.to)break;let f=t.docView.coordsAt(i<0?u.from:u.to,i>0?-1:1);if(f&&(i<0?f.top<=l+s:f.bottom>=l+s))break}let h=t.viewState.heightOracle.textHeight/2;l=i>0?u.bottom+h:u.top-h}if(t.viewport.from>=u.to||t.viewport.to<=u.from){if(n)return null;if(u.type==Si.Text){let h=yoe(t,r,u,o,a);return new eo(h,h==u.from?1:-1)}}if(u.type!=Si.Text)return l<(u.top+u.bottom)/2?new eo(u.from,1):new eo(u.to,-1);let c=t.docView.lineAt(u.from,2);return(!c||c.length!=u.length)&&(c=t.docView.lineAt(u.from,-2)),new _oe(t,o,a,t.textDirectionAt(u.from)).scanTile(c,u.from)}class _oe{constructor(e,n,i,r){this.view=e,this.x=n,this.y=i,this.baseDir=r,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,n){let{line:i,spans:r}=this.bidiSpansAt(e);return r[so.find(r,e-i.from,-1,n)].level==this.baseDir}dirAt(e,n){let{line:i,spans:r}=this.bidiSpansAt(e);return r[so.find(r,e-i.from,-1,n)].dir}bidiIn(e,n){let{spans:i,line:r}=this.bidiSpansAt(e);return i.length>1||i.length&&(i[0].level!=this.baseDir||i[0].to+r.from<n)}scan(e,n,i=!1){let r=0,s=e.length-1,o=new Set,a=this.bidiIn(e[0],e[s]),l,u,c=-1,h=1e9,f;e:for(;r<s;){let m=s-r,g=r+s>>1;t:if(o.has(g)){let y=r+Math.floor(Math.random()*m);for(let S=0;S<m;S++){if(!o.has(y)){g=y;break t}y++,y==s&&(y=r)}break e}o.add(g);let x=n(g);if(x)for(let y=0;y<x.length;y++){let S=x[y],_=0;if(!(S.width==0&&x.length>1)){if(S.bottom<this.y)(!l||l.bottom<S.bottom)&&(l=S),_=1;else if(S.top>this.y)(!u||u.top>S.top)&&(u=S),_=-1;else{let k=S.left>this.x?this.x-S.left:S.right<this.x?this.x-S.right:0,w=Math.abs(k);w<h&&(c=g,h=w,f=S),k&&(_=k<0==(this.baseDir==un.LTR)?-1:1)}_==-1&&(!a||this.baseDirAt(e[g],1))?s=g:_==1&&(!a||this.baseDirAt(e[g+1],-1))&&(r=g+1)}}}if(!f){if(!u&&!l)return{i:e[0],after:!1};let m=l&&(!u||this.y-l.bottom<u.top-this.y)?l:u;return this.y=(m.top+m.bottom)/2,this.scan(e,n,!0)}if(h&&!i){let{top:m,bottom:g}=f;if(l&&l.bottom>(m+m+g)/3)return this.y=l.bottom-1,this.scan(e,n,!0);if(u&&u.top<(m+g+g)/3)return this.y=u.top+1,this.scan(e,n,!0)}let p=(a?this.dirAt(e[c],1):this.baseDir)==un.LTR;return{i:c,after:this.x>(f.left+f.right)/2==p}}scanText(e,n){let i=[];for(let s=0;s<e.length;s=ui(e.text,s))i.push(n+s);i.push(n+e.length);let r=this.scan(i,s=>{let o=i[s]-n,a=i[s+1]-n;return up(e.dom,o,a).getClientRects()});return r.after?new eo(i[r.i+1],-1):new eo(i[r.i],1)}scanTile(e,n){if(!e.length)return new eo(n,1);if(e.children.length==1){let a=e.children[0];if(a.isText())return this.scanText(a,n);if(a.isComposite())return this.scanTile(a,n)}let i=[n];for(let a=0,l=n;a<e.children.length;a++)i.push(l+=e.children[a].length);let r=this.scan(i,a=>{let l=e.children[a];return l.flags&48?null:(l.dom.nodeType==1?l.dom:up(l.dom,0,l.length)).getClientRects()}),s=e.children[r.i],o=i[r.i];return s.isText()?this.scanText(s,o):s.isComposite()?this.scanTile(s,o):r.after?new eo(i[r.i+1],-1):new eo(o,1)}}const gc="";class Coe{constructor(e,n){this.points=e,this.view=n,this.text="",this.lineSeparator=n.state.facet(mt.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=gc}readRange(e,n){if(!e)return this;let i=e.parentNode;for(let r=e;;){this.findPointBefore(i,r);let s=this.text.length;this.readNode(r);let o=Nn.get(r),a=r.nextSibling;if(a==n){o!=null&&o.breakAfter&&!a&&i!=this.view.contentDOM&&this.lineBreak();break}let l=Nn.get(a);(o&&l?o.breakAfter:(o?o.breakAfter:_O(r))||_O(a)&&(r.nodeName!="BR"||o!=null&&o.isWidget())&&this.text.length>s)&&!koe(a,n)&&this.lineBreak(),r=a}return this.findPointBefore(i,n),this}readTextNode(e){let n=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,n.length));for(let i=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,o=1,a;if(this.lineSeparator?(s=n.indexOf(this.lineSeparator,i),o=this.lineSeparator.length):(a=r.exec(n))&&(s=a.index,o=a[0].length),this.append(n.slice(i,s<0?n.length:s)),s<0)break;if(this.lineBreak(),o>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=o-1);i=s+o}}readNode(e){let n=Nn.get(e),i=n&&n.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let r=i.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==n&&(i.pos=this.text.length)}findPointInside(e,n){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(woe(e,i.node,i.offset)?n:0))}}function woe(t,e,n){for(;;){if(!e||n<ca(e))return!1;if(e==t)return!0;n=dl(e)+1,e=e.parentNode}}function koe(t,e){let n;for(;!(t==e||!t);t=t.nextSibling){let i=Nn.get(t);if(!(i!=null&&i.isWidget()))return!1;i&&(n||(n=[])).push(i)}if(n)for(let i of n){let r=i.overrideDOMText;if(r!=null&&r.length)return!1}return!0}class i9{constructor(e,n){this.node=e,this.offset=n,this.pos=-1}}class Eoe{constructor(e,n,i,r){this.typeOver=r,this.bounds=null,this.text="",this.domChanged=n>-1;let{impreciseHead:s,impreciseAnchor:o}=e.docView,a=e.state.selection;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=dD(e.docView.tile,n,i,0))){let l=s||o?[]:Poe(e),u=new Coe(l,e);u.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=u.text,this.newSel=Aoe(l,this.bounds.from)}else{let l=e.observer.selectionRange,u=s&&s.node==l.focusNode&&s.offset==l.focusOffset||!v_(e.contentDOM,l.focusNode)?a.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),c=o&&o.node==l.anchorNode&&o.offset==l.anchorOffset||!v_(e.contentDOM,l.anchorNode)?a.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset),h=e.viewport;if((De.ios||De.chrome)&&u!=c&&Math.min(u,c)<=a.main.from&&Math.max(u,c)>=a.main.to&&(h.from>0||h.to<e.state.doc.length)){let f=Math.min(u,c),p=Math.max(u,c),m=h.from-f,g=h.to-p;(m==0||m==1||f==0)&&(g==0||g==-1||p==e.state.doc.length)&&(u=0,c=e.state.doc.length)}if(e.inputState.composing>-1&&a.ranges.length>1)this.newSel=a.replaceRange(fe.range(c,u));else if(e.lineWrapping&&c==u&&!(a.main.empty&&a.main.head==u)&&e.inputState.lastTouchTime>Date.now()-100){let f=e.coordsAtPos(u,-1),p=0;f&&(p=e.inputState.lastTouchY<=f.bottom?-1:1),this.newSel=fe.create([fe.cursor(u,p)])}else this.newSel=fe.single(c,u)}}}function dD(t,e,n,i){if(t.isComposite()){let r=-1,s=-1,o=-1,a=-1;for(let l=0,u=i,c=i;l<t.children.length;l++){let h=t.children[l],f=u+h.length;if(u<e&&f>n)return dD(h,e,n,u);if(f>=e&&r==-1&&(r=l,s=u),u>n&&h.dom.parentNode==t.dom){o=l,a=c;break}c=f,u=f+h.breakAfter}return{from:s,to:a<0?i+t.length:a,startDOM:(r?t.children[r-1].dom.nextSibling:null)||t.dom.firstChild,endDOM:o<t.children.length&&o>=0?t.children[o].dom:null}}else return t.isText()?{from:i,to:i+t.length,startDOM:t.dom,endDOM:t.dom.nextSibling}:null}function pD(t,e){let n,{newSel:i}=e,{state:r}=t,s=r.selection.main,o=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:a,to:l}=e.bounds,u=s.from,c=null;(o===8||De.android&&e.text.length<l-a)&&(u=s.to,c="end");let h=r.doc.sliceString(a,l,gc),f,p;!s.empty&&s.from>=a&&s.to<=l&&(e.typeOver||h!=e.text)&&h.slice(0,s.from-a)==e.text.slice(0,s.from-a)&&h.slice(s.to-a)==e.text.slice(f=e.text.length-(h.length-(s.to-a)))?n={from:s.from,to:s.to,insert:$t.of(e.text.slice(s.from-a,f).split(gc))}:(p=mD(h,e.text,u-a,c))&&(De.chrome&&o==13&&p.toB==p.from+2&&e.text.slice(p.from,p.toB)==gc+gc&&p.toB--,n={from:a+p.from,to:a+p.toA,insert:$t.of(e.text.slice(p.from,p.toB).split(gc))})}else i&&(!t.hasFocus&&r.facet(Qo)||TO(i,s))&&(i=null);if(!n&&!i)return!1;if((De.mac||De.android)&&n&&n.from==n.to&&n.from==s.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(i&&n.insert.length==2&&(i=fe.single(i.main.anchor-1,i.main.head-1)),n={from:n.from,to:n.to,insert:$t.of([n.insert.toString().replace("."," ")])}):r.doc.lineAt(s.from).to<s.to&&t.docView.lineHasWidget(s.to)&&t.inputState.insertingTextAt>Date.now()-50?n={from:s.from,to:s.to,insert:r.toText(t.inputState.insertingText)}:De.chrome&&n&&n.from==n.to&&n.from==s.head&&n.insert.toString()==`
|
|
126
|
+
`&&t.lineWrapping&&(i&&(i=fe.single(i.main.anchor-1,i.main.head-1)),n={from:s.from,to:s.to,insert:$t.of([" "])}),n)return bk(t,n,i,o);if(i&&!TO(i,s)){let a=!1,l="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(a=!0),l=t.inputState.lastSelectionOrigin,l=="select.pointer"&&(i=fD(r.facet(vm).map(u=>u(t)),i))),t.dispatch({selection:i,scrollIntoView:a,userEvent:l}),!0}else return!1}function bk(t,e,n,i=-1){if(De.ios&&t.inputState.flushIOSKey(e))return!0;let r=t.state.selection.main;if(De.android&&(e.to==r.to&&(e.from==r.from||e.from==r.from-1&&t.state.sliceDoc(e.from,r.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Zc(t.contentDOM,"Enter",13)||(e.from==r.from-1&&e.to==r.to&&e.insert.length==0||i==8&&e.insert.length<e.to-e.from&&e.to>r.head)&&Zc(t.contentDOM,"Backspace",8)||e.from==r.from&&e.to==r.to+1&&e.insert.length==0&&Zc(t.contentDOM,"Delete",46)))return!0;let s=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let o,a=()=>o||(o=Toe(t,e,n));return t.state.facet(eD).some(l=>l(t,e.from,e.to,s,a))||t.dispatch(a()),!0}function Toe(t,e,n){let i,r=t.state,s=r.selection.main,o=-1;if(e.from==e.to&&e.from<s.from||e.from>s.to){let l=e.from<s.from?-1:1,u=l<0?s.from:s.to,c=gd(r.facet(vm).map(h=>h(t)),u,l);e.from==c&&(o=c)}if(o>-1)i={changes:e,selection:fe.cursor(e.from+e.insert.length,-1)};else if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let l=s.from<e.from?r.sliceDoc(s.from,e.from):"",u=s.to>e.to?r.sliceDoc(e.to,s.to):"";i=r.replaceSelection(t.state.toText(l+e.insert.sliceString(0,void 0,t.state.lineBreak)+u))}else{let l=r.changes(e),u=n&&n.main.to<=l.newLength?n.main:void 0;if(r.selection.ranges.length>1&&(t.inputState.composing>=0||t.inputState.compositionPendingChange)&&e.to<=s.to+10&&e.to>=s.to-10){let c=t.state.sliceDoc(e.from,e.to),h,f=n&&hD(t,n.main.head);if(f){let m=e.insert.length-(e.to-e.from);h={from:f.from,to:f.to-m}}else h=t.state.doc.lineAt(s.head);let p=s.to-e.to;i=r.changeByRange(m=>{if(m.from==s.from&&m.to==s.to)return{changes:l,range:u||m.map(l)};let g=m.to-p,x=g-c.length;if(t.state.sliceDoc(x,g)!=c||g>=h.from&&x<=h.to)return{range:m};let y=r.changes({from:x,to:g,insert:e.insert}),S=m.to-s.to;return{changes:y,range:u?fe.range(Math.max(0,u.anchor+S),Math.max(0,u.head+S)):m.map(y)}})}else i={changes:l,selection:u&&r.selection.replaceRange(u)}}let a="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,a+=".compose",t.inputState.compositionFirstChange&&(a+=".start",t.inputState.compositionFirstChange=!1)),r.update(i,{userEvent:a,scrollIntoView:!0})}function mD(t,e,n,i){let r=Math.min(t.length,e.length),s=0;for(;s<r&&t.charCodeAt(s)==e.charCodeAt(s);)s++;if(s==r&&t.length==e.length)return null;let o=t.length,a=e.length;for(;o>0&&a>0&&t.charCodeAt(o-1)==e.charCodeAt(a-1);)o--,a--;if(i=="end"){let l=Math.max(0,s-Math.min(o,a));n-=o+l-s}if(o<s&&t.length<e.length){let l=n<=s&&n>=o?s-n:0;s-=l,a=s+(a-o),o=s}else if(a<s){let l=n<=s&&n>=a?s-n:0;s-=l,o=s+(o-a),a=s}return{from:s,toA:o,toB:a}}function Poe(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:s}=t.observer.selectionRange;return n&&(e.push(new i9(n,i)),(r!=n||s!=i)&&e.push(new i9(r,s))),e}function Aoe(t,e){if(t.length==0)return null;let n=t[0].pos,i=t.length==2?t[1].pos:n;return n>-1&&i>-1?fe.single(n+e,i+e):null}function TO(t,e){return e.head==t.main.head&&e.anchor==t.main.anchor}class $oe{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.touchActive=!1,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.lastIOSMomentumScroll=0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,De.safari&&e.contentDOM.addEventListener("input",()=>null),De.gecko&&Hoe(e.contentDOM.ownerDocument)}handleEvent(e){!Boe(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,n){let i=this.handlers[e];if(i){for(let r of i.observers)r(this.view,n);for(let r of i.handlers){if(n.defaultPrevented)break;if(r(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=Roe(e),i=this.handlers,r=this.view.contentDOM;for(let s in n)if(s!="scroll"){let o=!n[s].handlers.length,a=i[s];a&&o!=!a.handlers.length&&(r.removeEventListener(s,this.handleEvent),a=null),a||r.addEventListener(s,this.handleEvent,{passive:o})}for(let s in i)s!="scroll"&&!n[s]&&r.removeEventListener(s,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&OD.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),De.android&&De.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;if(De.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&(gD.some(n=>n.keyCode==e.keyCode)&&!e.ctrlKey||Moe.indexOf(e.key)>-1&&e.ctrlKey)){let n={ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey,shiftKey:e.shiftKey};return n.shiftKey&&De.ios&&!/^(off|none)$/.test(this.view.contentDOM.autocapitalize)&&Ioe(this.view.win)&&(n.shiftKey=!1),this.pendingIOSKey={key:e.key,keyCode:e.keyCode,mods:n},setTimeout(()=>this.flushIOSKey(),250),!0}return e.keyCode!=229&&this.view.observer.forceFlush(),!1}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,Zc(this.view.contentDOM,n.key,n.keyCode,n.mods))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:De.safari&&!De.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function Ioe(t){return t.visualViewport?t.visualViewport.height*t.visualViewport.scale/t.document.documentElement.clientHeight<.85:!1}function r9(t,e){return(n,i)=>{try{return e.call(t,i,n)}catch(r){sr(n.state,r)}}}function Roe(t){let e=Object.create(null);function n(i){return e[i]||(e[i]={observers:[],handlers:[]})}for(let i of t){let r=i.spec,s=r&&r.plugin.domEventHandlers,o=r&&r.plugin.domEventObservers;if(s)for(let a in s){let l=s[a];l&&n(a).handlers.push(r9(i.value,l))}if(o)for(let a in o){let l=o[a];l&&n(a).observers.push(r9(i.value,l))}}for(let i in Ls)n(i).handlers.push(Ls[i]);for(let i in Wi)n(i).observers.push(Wi[i]);return e}const gD=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Moe="dthko",OD=[16,17,18,20,91,92,224,225],dg=6;function pg(t){return Math.max(0,t)*.7+8}function Noe(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class Loe{constructor(e,n,i,r){this.view=e,this.startEvent=n,this.style=i,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=BL(e.contentDOM),this.atoms=e.state.facet(vm).map(o=>o(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(mt.allowMultipleSelections)&&Doe(e,n),this.dragging=Voe(e,n)&&vD(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&Noe(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,i=0,r=0,s=0,o=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:a}=this.scrollParents.y.getBoundingClientRect());let l=vk(this.view);e.clientX-l.left<=r+dg?n=-pg(r-e.clientX):e.clientX+l.right>=o-dg&&(n=pg(e.clientX-o)),e.clientY-l.top<=s+dg?i=-pg(s-e.clientY):e.clientY+l.bottom>=a-dg&&(i=pg(e.clientY-a)),this.setScrollSpeed(n,i)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:n}=this,i=fD(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!i.eq(n.state.selection,this.dragging===!1))&&this.view.dispatch({selection:i,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(n=>n.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function Doe(t,e){let n=t.state.facet(YL);return n.length?n[0](e):De.mac?e.metaKey:e.ctrlKey}function Qoe(t,e){let n=t.state.facet(GL);return n.length?n[0](e):De.mac?!e.altKey:!e.ctrlKey}function Voe(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let i=lp(t.root);if(!i||i.rangeCount==0)return!0;let r=i.getRangeAt(0).getClientRects();for(let s=0;s<r.length;s++){let o=r[s];if(o.left<=e.clientX&&o.right>=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function Boe(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,i;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(i=Nn.get(n))&&i.isWidget()&&!i.isHidden&&i.widget.ignoreEvent(e))return!1;return!0}const Ls=Object.create(null),Wi=Object.create(null),xD=De.ie&&De.ie_version<15||De.ios&&De.webkit_version<604;function Foe(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),yD(t,n.value)},50)}function Px(t,e,n){for(let i of t.facet(e))n=i(n,t);return n}function yD(t,e){e=Px(t.state,gk,e);let{state:n}=t,i,r=1,s=n.toText(e),o=s.lines==n.selection.ranges.length;if(T_!=null&&n.selection.ranges.every(l=>l.empty)&&T_==s.toString()){let l=-1;i=n.changeByRange(u=>{let c=n.doc.lineAt(u.from);if(c.from==l)return{range:u};l=c.from;let h=n.toText((o?s.line(r++).text:e)+n.lineBreak);return{changes:{from:c.from,insert:h},range:fe.cursor(u.from+h.length)}})}else o?i=n.changeByRange(l=>{let u=s.line(r++);return{changes:{from:l.from,to:l.to,insert:u.text},range:fe.cursor(l.from+u.length)}}):i=n.replaceSelection(s);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}Wi.scroll=t=>{let e=t.inputState;e.lastScrollTop=t.scrollDOM.scrollTop,e.lastScrollLeft=t.scrollDOM.scrollLeft,De.ios&&!e.touchActive&&(e.lastIOSMomentumScroll=Date.now())};Wi.wheel=Wi.mousewheel=t=>{t.inputState.lastWheelEvent=Date.now()};Ls.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);Wi.touchstart=(t,e)=>{let n=t.inputState,i=e.targetTouches[0];n.touchActive=!0,n.lastTouchTime=Date.now(),i&&(n.lastTouchX=i.clientX,n.lastTouchY=i.clientY),n.setSelectionOrigin("select.pointer")};Wi.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};Wi.touchend=(t,e)=>{t.inputState.touchActive=!1};Ls.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let i of t.state.facet(KL))if(n=i(t,e),n)break;if(!n&&e.button==0&&(n=Zoe(t,e)),n){let i=!t.hasFocus;t.inputState.startMouseSelection(new Loe(t,e,n,i)),i&&t.observer.ignore(()=>{FL(t.contentDOM);let s=t.root.activeElement;s&&!s.contains(t.contentDOM)&&s.blur()});let r=t.inputState.mouseSelection;if(r)return r.start(e),r.dragging===!1}else t.inputState.setSelectionOrigin("select.pointer");return!1};function s9(t,e,n,i){if(i==1)return fe.cursor(e,n);if(i==2)return xoe(t.state,e,n);{let r=t.docView.lineAt(e,n),s=t.state.doc.lineAt(r?r.posAtEnd:e),o=r?r.posAtStart:s.from,a=r?r.posAtEnd:s.to;return a<t.state.doc.length&&a==s.to&&a++,fe.undirectionalRange(o,a)}}const joe=De.ie&&De.ie_version<=11;let o9=null,a9=0,l9=0;function vD(t){if(!joe)return t.detail;let e=o9,n=l9;return o9=t,l9=Date.now(),a9=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(a9+1)%3:1}function Zoe(t,e){let n=t.posAndSideAtCoords({x:e.clientX,y:e.clientY},!1),i=vD(e),r=t.state.selection;return{update(s){s.docChanged&&(n.pos=s.changes.mapPos(n.pos),r=r.map(s.changes))},get(s,o,a){let l=t.posAndSideAtCoords({x:s.clientX,y:s.clientY},!1),u,c=s9(t,l.pos,l.assoc,i);if(n.pos!=l.pos&&!o){let h=s9(t,n.pos,n.assoc,i),f=Math.min(h.from,c.from),p=Math.max(h.to,c.to);c=f<c.from?fe.range(f,p,c.assoc):fe.range(p,f,c.assoc)}return o?r.replaceRange(r.main.extend(c.from,c.to,c.assoc)):a&&i==1&&r.ranges.length>1&&(u=zoe(r,l.pos))?u:a?r.addRange(c):fe.create([c])}}}function zoe(t,e){for(let n=0;n<t.ranges.length;n++){let{from:i,to:r}=t.ranges[n];if(i<=e&&r>=e)return fe.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}Ls.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let r=t.docView.tile.nearest(e.target);if(r&&r.isWidget()){let s=r.posAtStart,o=s+r.length;(s>=n.to||o<=n.from)&&(n=fe.undirectionalRange(s,o))}}let{inputState:i}=t;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",Px(t.state,Ok,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};Ls.dragend=t=>(t.inputState.draggedContent=null,!1);function u9(t,e,n,i){if(n=Px(t.state,gk,n),!n)return;let r=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=t.inputState,o=i&&s&&Qoe(t,e)?{from:s.from,to:s.to}:null,a={from:r,insert:n},l=t.state.changes(o?[o,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(r,-1),head:l.mapPos(r,1)},userEvent:o?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Ls.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let i=Array(n.length),r=0,s=()=>{++r==n.length&&u9(t,e,i.filter(o=>o!=null).join(t.state.lineBreak),!1)};for(let o=0;o<n.length;o++){let a=new FileReader;a.onerror=s,a.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(a.result)||(i[o]=a.result),s()},a.readAsText(n[o])}return!0}else{let i=e.dataTransfer.getData("Text");if(i)return u9(t,e,i,!0),!0}return!1};Ls.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=xD?null:e.clipboardData;return n?(yD(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(Foe(t),!1)};function Xoe(t,e){let n=t.dom.parentNode;if(!n)return;let i=n.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),t.focus()},50)}function Woe(t){let e=[],n=[],i=!1;for(let r of t.selection.ranges)r.empty||(e.push(t.sliceDoc(r.from,r.to)),n.push(r));if(!e.length){let r=-1;for(let{from:s}of t.selection.ranges){let o=t.doc.lineAt(s);o.number>r&&(e.push(o.text),n.push({from:o.from,to:Math.min(t.doc.length,o.to+1)})),r=o.number}i=!0}return{text:Px(t,Ok,e.join(t.lineBreak)),ranges:n,linewise:i}}let T_=null;Ls.copy=Ls.cut=(t,e)=>{if(!pd(t.contentDOM,t.observer.selectionRange))return!1;let{text:n,ranges:i,linewise:r}=Woe(t.state);if(!n&&!r)return!1;T_=r?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let s=xD?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",n),!0):(Xoe(t,n),!1)};const bD=va.define();function SD(t,e){let n=[];for(let i of t.facet(tD)){let r=i(t,e);r&&n.push(r)}return n.length?t.update({effects:n,annotations:bD.of(!0)}):null}function _D(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=SD(t.state,e);n?t.dispatch(n):t.update([])}},10)}Wi.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),_D(t)};Wi.blur=t=>{t.observer.clearSelectionRange(),_D(t)};Wi.compositionstart=Wi.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};Wi.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,De.chrome&&De.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};Wi.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};Ls.beforeinput=(t,e)=>{var n,i;if((e.inputType=="insertText"||e.inputType=="insertCompositionText")&&(t.inputState.insertingText=e.data,t.inputState.insertingTextAt=Date.now()),e.inputType=="insertReplacementText"&&t.observer.editContext){let s=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),o=e.getTargetRanges();if(s&&o.length){let a=o[0],l=t.posAtDOM(a.startContainer,a.startOffset),u=t.posAtDOM(a.endContainer,a.endOffset);return bk(t,{from:l,to:u,insert:t.state.toText(s)},null),!0}}let r;if(De.chrome&&De.android&&(r=gD.find(s=>s.inputType==e.inputType))&&(t.observer.delayAndroidKey(r.key,r.keyCode),r.key=="Backspace"||r.key=="Delete")){let s=((i=window.visualViewport)===null||i===void 0?void 0:i.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>s+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return De.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),De.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>Wi.compositionend(t,e),20),!1};const c9=new Set;function Hoe(t){c9.has(t)||(c9.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const h9=["pre-wrap","normal","pre-line","break-spaces"];let ph=!1;function f9(){ph=!1}class Uoe{constructor(e){this.lineWrapping=e,this.doc=$t.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let i=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((n-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return h9.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let i=0;i<e.length;i++){let r=e[i];r<0?i++:this.heightSamples[Math.floor(r*10)]||(n=!0,this.heightSamples[Math.floor(r*10)]=!0)}return n}refresh(e,n,i,r,s,o){let a=h9.indexOf(e)>-1,l=Math.abs(n-this.lineHeight)>.3||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=n,this.charWidth=i,this.textHeight=r,this.lineLength=s,l){this.heightSamples={};for(let u=0;u<o.length;u++){let c=o[u];c<0?u++:this.heightSamples[Math.floor(c*10)]=!0}}return l}}class qoe{constructor(e,n){this.from=e,this.heights=n,this.index=0}get more(){return this.index<this.heights.length}}class Ss{constructor(e,n,i,r,s){this.from=e,this.length=n,this.top=i,this.height=r,this._content=s}get type(){return typeof this._content=="number"?Si.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof Eu?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new Ss(this.from,this.length+e.length,this.top,this.height+e.height,n)}}var gn=(function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t})(gn||(gn={}));const u0=.001;class zi{constructor(e,n,i=2){this.length=e,this.height=n,this.flags=i}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>u0&&(ph=!0),this.height=e)}replace(e,n,i){return zi.of(i)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,i,r){let s=this,o=i.doc;for(let a=r.length-1;a>=0;a--){let{fromA:l,toA:u,fromB:c,toB:h}=r[a],f=s.lineAt(l,gn.ByPosNoHeight,i.setDoc(n),0,0),p=f.to>=u?f:s.lineAt(u,gn.ByPosNoHeight,i,0,0);for(h+=p.to-u,u=p.to;a>0&&f.from<=r[a-1].toA;)l=r[a-1].fromA,c=r[a-1].fromB,a--,l<f.from&&(f=s.lineAt(l,gn.ByPosNoHeight,i,0,0));c+=f.from-l,l=f.from;let m=Sk.build(i.setDoc(o),e,c,h);s=PO(s,s.replace(l,u,m))}return s.updateHeight(i,0)}static empty(){return new vr(0,0,0)}static of(e){if(e.length==1)return e[0];let n=0,i=e.length,r=0,s=0;for(;;)if(n==i)if(r>s*2){let a=e[n-1];a.break?e.splice(--n,1,a.left,null,a.right):e.splice(--n,1,a.left,a.right),i+=1+a.break,r-=a.size}else if(s>r*2){let a=e[i];a.break?e.splice(i,1,a.left,null,a.right):e.splice(i,1,a.left,a.right),i+=2+a.break,s-=a.size}else break;else if(r<s){let a=e[n++];a&&(r+=a.size)}else{let a=e[--i];a&&(s+=a.size)}let o=0;return e[n-1]==null?(o=1,n--):e[n]==null&&(o=1,i++),new Goe(zi.of(e.slice(0,n)),o,zi.of(e.slice(i)))}}function PO(t,e){return t==e?t:(t.constructor!=e.constructor&&(ph=!0),e)}zi.prototype.size=1;const Yoe=Xe.replace({});class CD extends zi{constructor(e,n,i){super(e,n),this.deco=i,this.spaceAbove=0}mainBlock(e,n){return new Ss(n,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,n,i,r){return this.spaceAbove&&e<i+this.spaceAbove?new Ss(r,0,i,this.spaceAbove,Yoe):this.mainBlock(i,r)}lineAt(e,n,i,r,s){let o=this.mainBlock(r,s);return this.spaceAbove?this.blockAt(0,i,r,s).join(o):o}forEachLine(e,n,i,r,s,o){e<=s+this.length&&n>=s&&o(this.lineAt(0,gn.ByPos,i,r,s))}setMeasuredHeight(e){let n=e.heights[e.index++];n<0?(this.spaceAbove=-n,n=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(n)}updateHeight(e,n=0,i=!1,r){return r&&r.from<=n&&r.more&&this.setMeasuredHeight(r),this.outdated=!1,this}toString(){return`block(${this.length})`}}class vr extends CD{constructor(e,n,i){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=i}mainBlock(e,n){return new Ss(n,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(e,n,i){let r=i[0];return i.length==1&&(r instanceof vr||r instanceof fi&&r.flags&4)&&Math.abs(this.length-r.length)<10?(r instanceof fi?r=new vr(r.length,this.height,this.spaceAbove):r.height=this.height,this.outdated||(r.outdated=!1),r):zi.of(i)}updateHeight(e,n=0,i=!1,r){return r&&r.from<=n&&r.more?this.setMeasuredHeight(r):(i||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class fi extends zi{constructor(e){super(e,0)}heightMetrics(e,n){let i=e.doc.lineAt(n).number,r=e.doc.lineAt(n+this.length).number,s=r-i+1,o,a=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*s);o=l/s,this.length>s+1&&(a=(this.height-l)/(this.length-s-1))}else o=this.height/s;return{firstLine:i,lastLine:r,perLine:o,perChar:a}}blockAt(e,n,i,r){let{firstLine:s,lastLine:o,perLine:a,perChar:l}=this.heightMetrics(n,r);if(n.lineWrapping){let u=r+(e<n.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-i)/this.height))*this.length)),c=n.doc.lineAt(u),h=a+c.length*l,f=Math.max(i,e-h/2);return new Ss(c.from,c.length,f,h,0)}else{let u=Math.max(0,Math.min(o-s,Math.floor((e-i)/a))),{from:c,length:h}=n.doc.line(s+u);return new Ss(c,h,i+a*u,a,0)}}lineAt(e,n,i,r,s){if(n==gn.ByHeight)return this.blockAt(e,i,r,s);if(n==gn.ByPosNoHeight){let{from:p,to:m}=i.doc.lineAt(e);return new Ss(p,m-p,0,0,0)}let{firstLine:o,perLine:a,perChar:l}=this.heightMetrics(i,s),u=i.doc.lineAt(e),c=a+u.length*l,h=u.number-o,f=r+a*h+l*(u.from-s-h);return new Ss(u.from,u.length,Math.max(r,Math.min(f,r+this.height-c)),c,0)}forEachLine(e,n,i,r,s,o){e=Math.max(e,s),n=Math.min(n,s+this.length);let{firstLine:a,perLine:l,perChar:u}=this.heightMetrics(i,s);for(let c=e,h=r;c<=n;){let f=i.doc.lineAt(c);if(c==e){let m=f.number-a;h+=l*m+u*(e-s-m)}let p=l+u*f.length;o(new Ss(f.from,f.length,h,p,0)),h+=p,c=f.to+1}}replace(e,n,i){let r=this.length-n;if(r>0){let s=i[i.length-1];s instanceof fi?i[i.length-1]=new fi(s.length+r):i.push(null,new fi(r-1))}if(e>0){let s=i[0];s instanceof fi?i[0]=new fi(e+s.length):i.unshift(new fi(e-1),null)}return zi.of(i)}decomposeLeft(e,n){n.push(new fi(e-1),null)}decomposeRight(e,n){n.push(null,new fi(this.length-e-1))}updateHeight(e,n=0,i=!1,r){let s=n+this.length;if(r&&r.from<=n+this.length&&r.more){let o=[],a=Math.max(n,r.from),l=-1;for(r.from>n&&o.push(new fi(r.from-n-1).updateHeight(e,n));a<=s&&r.more;){let c=e.doc.lineAt(a).length;o.length&&o.push(null);let h=r.heights[r.index++],f=0;h<0&&(f=-h,h=r.heights[r.index++]),l==-1?l=h:Math.abs(h-l)>=u0&&(l=-2);let p=new vr(c,h,f);p.outdated=!1,o.push(p),a+=c+1}a<=s&&o.push(null,new fi(s-a).updateHeight(e,a));let u=zi.of(o);return(l<0||Math.abs(u.height-this.height)>=u0||Math.abs(l-this.heightMetrics(e,n).perLine)>=u0)&&(ph=!0),PO(this,u)}else(i||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class Goe extends zi{constructor(e,n,i){super(e.length+n+i.length,e.height+i.height,n|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,n,i,r){let s=i+this.left.height;return e<s?this.left.blockAt(e,n,i,r):this.right.blockAt(e,n,s,r+this.left.length+this.break)}lineAt(e,n,i,r,s){let o=r+this.left.height,a=s+this.left.length+this.break,l=n==gn.ByHeight?e<o:e<a,u=l?this.left.lineAt(e,n,i,r,s):this.right.lineAt(e,n,i,o,a);if(this.break||(l?u.to<a:u.from>a))return u;let c=n==gn.ByPosNoHeight?gn.ByPosNoHeight:gn.ByPos;return l?u.join(this.right.lineAt(a,c,i,o,a)):this.left.lineAt(a,c,i,r,s).join(u)}forEachLine(e,n,i,r,s,o){let a=r+this.left.height,l=s+this.left.length+this.break;if(this.break)e<l&&this.left.forEachLine(e,n,i,r,s,o),n>=l&&this.right.forEachLine(e,n,i,a,l,o);else{let u=this.lineAt(l,gn.ByPos,i,r,s);e<u.from&&this.left.forEachLine(e,u.from-1,i,r,s,o),u.to>=e&&u.from<=n&&o(u),n>u.to&&this.right.forEachLine(u.to+1,n,i,a,l,o)}}replace(e,n,i){let r=this.left.length+this.break;if(n<r)return this.balanced(this.left.replace(e,n,i),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,n-r,i));let s=[];e>0&&this.decomposeLeft(e,s);let o=s.length;for(let a of i)s.push(a);if(e>0&&d9(s,o-1),n<this.length){let a=s.length;this.decomposeRight(n,s),d9(s,a)}return zi.of(s)}decomposeLeft(e,n){let i=this.left.length;if(e<=i)return this.left.decomposeLeft(e,n);n.push(this.left),this.break&&(i++,e>=i&&n.push(null)),e>i&&this.right.decomposeLeft(e-i,n)}decomposeRight(e,n){let i=this.left.length,r=i+this.break;if(e>=r)return this.right.decomposeRight(e-r,n);e<i&&this.left.decomposeRight(e,n),this.break&&e<r&&n.push(null),n.push(this.right)}balanced(e,n){return e.size>2*n.size||n.size>2*e.size?zi.of(this.break?[e,null,n]:[e,n]):(this.left=PO(this.left,e),this.right=PO(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,i=!1,r){let{left:s,right:o}=this,a=n+s.length+this.break,l=null;return r&&r.from<=n+s.length&&r.more?l=s=s.updateHeight(e,n,i,r):s.updateHeight(e,n,i),r&&r.from<=a+o.length&&r.more?l=o=o.updateHeight(e,a,i,r):o.updateHeight(e,a,i),l?this.balanced(s,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function d9(t,e){let n,i;t[e]==null&&(n=t[e-1])instanceof fi&&(i=t[e+1])instanceof fi&&t.splice(e-1,3,new fi(n.length+1+i.length))}const Koe=5;class Sk{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let i=Math.min(n,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof vr?r.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new vr(i-this.pos,-1,0)),this.writtenTo=i,n>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,i){if(e<n||i.heightRelevant){let r=i.widget?i.widget.estimatedHeight:0,s=i.widget?i.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let o=n-e;i.block?this.addBlock(new CD(o,r,i)):(o||s||r>=Koe)&&this.addLineDeco(r,s,o)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new vr(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,n){let i=new fi(n-e);return this.oracle.doc.lineAt(e).to==n&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof vr)return e;let n=new vr(0,-1,0);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,i){let r=this.ensureLine();r.length+=i,r.collapsed+=i,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=n,this.writtenTo=this.pos=this.pos+i}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof vr)&&!this.isCovered?this.nodes.push(new vr(0,-1,0)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let i=e;for(let r of this.nodes)r instanceof vr&&r.updateHeight(this.oracle,i),i+=r?r.length:1;return this.nodes}static build(e,n,i,r){let s=new Sk(i,e);return vt.spans(n,i,r,s,0),s.finish(i)}}function Joe(t,e,n){let i=new eae;return vt.compare(t,e,n,i,0),i.changes}class eae{constructor(){this.changes=[]}compareRange(){}comparePoint(e,n,i,r){(e<n||i&&i.heightRelevant||r&&r.heightRelevant)&&jc(e,n,this.changes,5)}}function tae(t,e){let n=t.getBoundingClientRect(),i=t.ownerDocument,r=i.defaultView||window,s=Math.max(0,n.left),o=Math.min(r.innerWidth,n.right),a=Math.max(0,n.top),l=Math.min(r.innerHeight,n.bottom);for(let u=t.parentNode;u&&u!=i.body;)if(u.nodeType==1){let c=u,h=window.getComputedStyle(c);if((c.scrollHeight>c.clientHeight||c.scrollWidth>c.clientWidth)&&h.overflow!="visible"){let f=c.getBoundingClientRect();s=Math.max(s,f.left),o=Math.min(o,f.right),a=Math.max(a,f.top),l=Math.min(u==t.parentNode?r.innerHeight:l,f.bottom)}u=h.position=="absolute"||h.position=="fixed"?c.offsetParent:c.parentNode}else if(u.nodeType==11)u=u.host;else break;return{left:s-n.left,right:Math.max(s,o)-n.left,top:a-(n.top+e),bottom:Math.max(a,l)-(n.top+e)}}function nae(t){let e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView||window;return e.left<n.innerWidth&&e.right>0&&e.top<n.innerHeight&&e.bottom>0}function iae(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class Tv{constructor(e,n,i,r){this.from=e,this.to=n,this.size=i,this.displaySize=r}static same(e,n){if(e.length!=n.length)return!1;for(let i=0;i<e.length;i++){let r=e[i],s=n[i];if(r.from!=s.from||r.to!=s.to||r.size!=s.size)return!1}return!0}draw(e,n){return Xe.replace({widget:new rae(this.displaySize*(n?e.scaleY:e.scaleX),n)}).range(this.from,this.to)}}class rae extends ds{constructor(e,n){super(),this.size=e,this.vertical=n}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class p9{constructor(e,n){this.view=e,this.state=n,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=m9,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=un.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let i=n.facet(xk).some(r=>typeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new Uoe(i),this.stateDeco=g9(n),this.heightMap=zi.empty().applyChanges(this.stateDeco,$t.empty,this.heightOracle.setDoc(n.doc),[new Kr(0,0,0,n.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Xe.set(this.lineGaps.map(r=>r.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let i=0;i<=1;i++){let r=i?n.head:n.anchor;if(!e.some(({from:s,to:o})=>r>=s&&r<=o)){let{from:s,to:o}=this.lineBlockAt(r);e.push(new mg(s,o))}}return this.viewports=e.sort((i,r)=>i.from-r.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?m9:new _k(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(Xf(e,this.scaler))})}update(e,n=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=g9(this.state);let r=e.changedRanges,s=Kr.extendWithRanges(r,Joe(i,this.stateDeco,e?e.changes:Fn.empty(this.state.doc.length))),o=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);f9(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=o||ph)&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=o);let l=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.head<l.from||n.range.head>l.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,n));let u=l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,e.flags|=this.updateForViewport(),(u||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(iD)&&(this.mustEnforceCursorAssoc=!0)}measure(){let{view:e}=this,n=e.contentDOM,i=window.getComputedStyle(n),r=this.heightOracle,s=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?un.RTL:un.LTR;let o=this.heightOracle.mustRefreshForWrapping(s)||this.mustMeasureContent==="refresh",a=n.getBoundingClientRect(),l=o||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let u=0,c=0;if(a.width&&a.height){let{scaleX:w,scaleY:b}=VL(n,a);(w>.005&&Math.abs(this.scaleX-w)>.005||b>.005&&Math.abs(this.scaleY-b)>.005)&&(this.scaleX=w,this.scaleY=b,u|=16,o=l=!0)}let h=(parseInt(i.paddingTop)||0)*this.scaleY,f=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=h||this.paddingBottom!=f)&&(this.paddingTop=h,this.paddingBottom=f,u|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,u|=16);let p=BL(this.view.contentDOM,!1).y;p!=this.scrollParent&&(this.scrollParent=p,this.scrollAnchorHeight=-1,this.scrollOffset=0);let m=this.getScrollOffset();this.scrollOffset!=m&&(this.scrollAnchorHeight=-1,this.scrollOffset=m),this.scrolledToBottom=jL(this.scrollParent||e.win);let g=(this.printing?iae:tae)(n,this.paddingTop),x=g.top-this.pixelViewport.top,y=g.bottom-this.pixelViewport.bottom;this.pixelViewport=g;let S=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(S!=this.inView&&(this.inView=S,S&&(l=!0)),!this.inView&&!this.scrollTarget&&!nae(e.dom))return 0;let _=a.width;if((this.contentDOMWidth!=_||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,u|=16),l){let w=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(w)&&(o=!0),o||r.lineWrapping&&Math.abs(_-this.contentDOMWidth)>r.charWidth){let{lineHeight:b,charWidth:E,textHeight:P}=e.docView.measureTextSize();o=b>0&&r.refresh(s,b,E,P,Math.max(5,_/E),w),o&&(e.docView.minWidth=0,u|=16)}x>0&&y>0?c=Math.max(x,y):x<0&&y<0&&(c=Math.min(x,y)),f9();for(let b of this.viewports){let E=b.from==this.viewport.from?w:e.docView.measureVisibleLineHeights(b);this.heightMap=(o?zi.empty().applyChanges(this.stateDeco,$t.empty,this.heightOracle,[new Kr(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,o,new qoe(b.from,E))}ph&&(u|=2)}let k=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return k&&(u&2&&(u|=this.updateScaler()),this.viewport=this.getViewport(c,this.scrollTarget),u|=this.updateForViewport()),(u&2||k)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),u|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),u}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,s=this.heightOracle,{visibleTop:o,visibleBottom:a}=this,l=new mg(r.lineAt(o-i*1e3,gn.ByHeight,s,0,0).from,r.lineAt(a+(1-i)*1e3,gn.ByHeight,s,0,0).to);if(n){let{head:u}=n.range;if(u<l.from||u>l.to){let c=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),h=r.lineAt(u,gn.ByPos,s,0,0),f;n.y=="center"?f=(h.top+h.bottom)/2-c/2:n.y=="start"||n.y=="nearest"&&u<l.from?f=h.top:f=h.bottom-c,l=new mg(r.lineAt(f-1e3/2,gn.ByHeight,s,0,0).from,r.lineAt(f+c+1e3/2,gn.ByHeight,s,0,0).to)}}return l}mapViewport(e,n){let i=n.mapPos(e.from,-1),r=n.mapPos(e.to,1);return new mg(this.heightMap.lineAt(i,gn.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,gn.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:n},i=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,gn.ByPos,this.heightOracle,0,0),{bottom:s}=this.heightMap.lineAt(n,gn.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:a}=this;return(e==0||r<=o-Math.max(10,Math.min(-i,250)))&&(n==this.state.doc.length||s>=a+Math.max(10,Math.min(i,250)))&&r>o-2*1e3&&s<a+2*1e3}mapLineGaps(e,n){if(!e.length||n.empty)return e;let i=[];for(let r of e)n.touchesRange(r.from,r.to)||i.push(new Tv(n.mapPos(r.from),n.mapPos(r.to),r.size,r.displaySize));return i}ensureLineGaps(e,n){let i=this.heightOracle.lineWrapping,r=i?1e4:2e3,s=r>>1,o=r<<1;if(this.defaultTextDirection!=un.LTR&&!i)return[];let a=[],l=(c,h,f,p)=>{if(h-c<s)return;let m=this.state.selection.main,g=[m.from];m.empty||g.push(m.to);for(let y of g)if(y>c&&y<h){l(c,y-10,f,p),l(y+10,h,f,p);return}let x=oae(e,y=>y.from>=f.from&&y.to<=f.to&&Math.abs(y.from-c)<s&&Math.abs(y.to-h)<s&&!g.some(S=>y.from<S&&y.to>S));if(!x){if(h<f.to&&n&&i&&n.visibleRanges.some(_=>_.from<=h&&_.to>=h)){let _=n.moveToLineBoundary(fe.cursor(h),!1,!0).head;_>c&&(h=_)}let y=this.gapSize(f,c,h,p),S=i||y<2e6?y:2e6;x=new Tv(c,h,y,S)}a.push(x)},u=c=>{if(c.length<o||c.type!=Si.Text)return;let h=sae(c.from,c.to,this.stateDeco);if(h.total<o)return;let f=this.scrollTarget?this.scrollTarget.range.head:null,p,m;if(i){let g=r/this.heightOracle.lineLength*this.heightOracle.lineHeight,x,y;if(f!=null){let S=Og(h,f),_=((this.visibleBottom-this.visibleTop)/2+g)/c.height;x=S-_,y=S+_}else x=(this.visibleTop-c.top-g)/c.height,y=(this.visibleBottom-c.top+g)/c.height;p=gg(h,x),m=gg(h,y)}else{let g=h.total*this.heightOracle.charWidth,x=r*this.heightOracle.charWidth,y=0;if(g>2e6)for(let b of e)b.from>=c.from&&b.from<c.to&&b.size!=b.displaySize&&b.from*this.heightOracle.charWidth+y<this.pixelViewport.left&&(y=b.size-b.displaySize);let S=this.pixelViewport.left+y,_=this.pixelViewport.right+y,k,w;if(f!=null){let b=Og(h,f),E=((_-S)/2+x)/g;k=b-E,w=b+E}else k=(S-x)/g,w=(_+x)/g;p=gg(h,k),m=gg(h,w)}p>c.from&&l(c.from,p,c,h),m<c.to&&l(m,c.to,c,h)};for(let c of this.viewportLines)Array.isArray(c.type)?c.type.forEach(u):u(c);return a}gapSize(e,n,i,r){let s=Og(r,i)-Og(r,n);return this.heightOracle.lineWrapping?e.height*s:r.total*this.heightOracle.charWidth*s}updateLineGaps(e){Tv.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=Xe.set(e.map(n=>n.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let i=[];vt.spans(n,this.viewport.from,this.viewport.to,{span(s,o){i.push({from:s,to:o})},point(){}},20);let r=0;if(i.length!=this.visibleRanges.length)r=12;else for(let s=0;s<i.length&&!(r&8);s++){let o=this.visibleRanges[s],a=i[s];(o.from!=a.from||o.to!=a.to)&&(r|=4,e&&e.mapPos(o.from,-1)==a.from&&e.mapPos(o.to,1)==a.to||(r|=8))}return this.visibleRanges=i,r}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||Xf(this.heightMap.lineAt(e,gn.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||Xf(this.heightMap.lineAt(this.scaler.fromDOM(e),gn.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return(this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top)*this.scaleY}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return Xf(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class mg{constructor(e,n){this.from=e,this.to=n}}function sae(t,e,n){let i=[],r=t,s=0;return vt.spans(n,t,e,{span(){},point(o,a){o>r&&(i.push({from:r,to:o}),s+=o-r),r=a}},20),r<e&&(i.push({from:r,to:e}),s+=e-r),{total:s,ranges:i}}function gg({total:t,ranges:e},n){if(n<=0)return e[0].from;if(n>=1)return e[e.length-1].to;let i=Math.floor(t*n);for(let r=0;;r++){let{from:s,to:o}=e[r],a=o-s;if(i<=a)return s+i;i-=a}}function Og(t,e){let n=0;for(let{from:i,to:r}of t.ranges){if(e<=r){n+=e-i;break}n+=r-i}return n/t.total}function oae(t,e){for(let n of t)if(e(n))return n}const m9={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};function g9(t){let e=t.facet(kx).filter(i=>typeof i!="function"),n=t.facet(yk).filter(i=>typeof i!="function");return n.length&&e.push(vt.join(n)),e}class _k{constructor(e,n,i){let r=0,s=0,o=0;this.viewports=i.map(({from:a,to:l})=>{let u=n.lineAt(a,gn.ByPos,e,0,0).top,c=n.lineAt(l,gn.ByPos,e,0,0).bottom;return r+=c-u,{from:a,to:l,top:u,bottom:c,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(n.height-r);for(let a of this.viewports)a.domTop=o+(a.top-s)*this.scale,o=a.domBottom=a.domTop+(a.bottom-a.top),s=a.bottom}toDOM(e){for(let n=0,i=0,r=0;;n++){let s=n<this.viewports.length?this.viewports[n]:null;if(!s||e<s.top)return r+(e-i)*this.scale;if(e<=s.bottom)return s.domTop+(e-s.top);i=s.bottom,r=s.domBottom}}fromDOM(e){for(let n=0,i=0,r=0;;n++){let s=n<this.viewports.length?this.viewports[n]:null;if(!s||e<s.domTop)return i+(e-r)/this.scale;if(e<=s.domBottom)return s.top+(e-s.domTop);i=s.bottom,r=s.domBottom}}eq(e){return e instanceof _k?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((n,i)=>n.from==e.viewports[i].from&&n.to==e.viewports[i].to):!1}}function Xf(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),i=e.toDOM(t.bottom);return new Ss(t.from,t.length,n,i-n,Array.isArray(t._content)?t._content.map(r=>Xf(r,e)):t._content)}const xg=Qe.define({combine:t=>t.join(" ")}),P_=Qe.define({combine:t=>t.indexOf(!0)>-1}),A_=ua.newName(),wD=ua.newName(),kD=ua.newName(),ED={"&light":"."+wD,"&dark":"."+kD};function $_(t,e,n){return new ua(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,r=>{if(r=="&")return t;if(!n||!n[r])throw new RangeError(`Unsupported selector: ${r}`);return n[r]}):t+" "+i}})}const aae=$_("."+A_,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{userSelect:"none",position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-selectionHandle":{backgroundColor:"currentColor",width:"1.5px"},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:'""',backgroundColor:"inherit",borderRadius:"50%",width:"8px",height:"8px",position:"absolute",left:"-3.25px"},".cm-selectionHandle-start::before":{top:"-8px"},".cm-selectionHandle-end::before":{bottom:"-8px"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},".cm-panels-top":{top:"0"},".cm-panels-bottom":{bottom:"0"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},ED),lae={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Pv=De.ie&&De.ie_version<=11;class uae{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new Qse,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let i of n)this.queue.push(i);(De.ie&&De.ie_version<=11||De.ios&&e.composing)&&n.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&De.android&&e.constructor.EDIT_CONTEXT!==!1&&!(De.chrome&&De.chrome_version<126)&&(this.editContext=new hae(e),e.state.facet(Qo)&&(e.contentDOM.editContext=this.editContext.editContext)),Pv&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(n=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,i)=>n!=e[i]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,r=this.selectionRange;if(i.state.facet(Qo)?i.root.activeElement!=this.dom:!pd(this.dom,r))return;let s=r.anchorNode&&i.docView.tile.nearest(r.anchorNode);if(s&&s.isWidget()&&s.widget.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(De.ie&&De.ie_version<=11||De.android&&De.chrome)&&!i.state.selection.main.empty&&r.focusNode&&md(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=lp(e.root);if(!n)return!1;let i=De.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&cae(this.view,n)||n;if(!i||this.selectionRange.eq(i))return!1;let r=pd(this.dom,i);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&Bse(this.dom,i)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(i),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,n){this.selectionRange.set(e.node,e.offset,n.node,n.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,n=null;for(let i=this.dom;i;)if(i.nodeType==1)!n&&e<this.scrollTargets.length&&this.scrollTargets[e]==i?e++:n||(n=this.scrollTargets.slice(0,e)),n&&n.push(i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;if(e<this.scrollTargets.length&&!n&&(n=this.scrollTargets.slice(0,e)),n){for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);for(let i of this.scrollTargets=n)i.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,lae),Pv&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Pv&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,n){var i;if(!this.delayedAndroidKey){let r=()=>{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&Zc(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange<Date.now()-50||!!(!((i=this.delayedAndroidKey)===null||i===void 0)&&i.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,i=-1,r=!1;for(let s of e){let o=this.readMutation(s);o&&(o.typeOver&&(r=!0),n==-1?{from:n,to:i}=o:(n=Math.min(o.from,n),i=Math.max(o.to,i)))}return{from:n,to:i,typeOver:r}}readChange(){let{from:e,to:n,typeOver:i}=this.processRecords(),r=this.selectionChanged&&pd(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new Eoe(this.view,e,n,i);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let i=this.view.state,r=pD(this.view,n);return this.view.state==i&&(n.domChanged||n.newSel&&!TO(this.view.state.selection,n.newSel.main))&&this.view.update([]),r}readMutation(e){let n=this.view.docView.tile.nearest(e.target);if(!n||n.isWidget())return null;if(n.markDirty(e.type=="attributes"),e.type=="childList"){let i=O9(n,e.previousSibling||e.target.previousSibling,-1),r=O9(n,e.nextSibling||e.target.nextSibling,1);return{from:i?n.posAfter(i):n.posAtStart,to:r?n.posBefore(r):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Qo)!=e.state.facet(Qo)&&(e.view.contentDOM.editContext=e.state.facet(Qo)?this.editContext.editContext:null))}destroy(){var e,n,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function O9(t,e,n){for(;e;){let i=Nn.get(e);if(i&&i.parent==t)return i;let r=e.parentNode;e=r!=t.dom?r:n>0?e.nextSibling:e.previousSibling}return null}function x9(t,e){let n=e.startContainer,i=e.startOffset,r=e.endContainer,s=e.endOffset,o=t.docView.domAtPos(t.state.selection.main.anchor,1);return md(o.node,o.offset,r,s)&&([n,i,r,s]=[r,s,n,i]),{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:s}}function cae(t,e){if(e.getComposedRanges){let r=e.getComposedRanges(t.root)[0];if(r)return x9(t,r)}let n=null;function i(r){r.preventDefault(),r.stopImmediatePropagation(),n=r.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",i,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",i,!0),n?x9(t,n):null}class hae{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=i=>{let r=e.state.selection.main,{anchor:s,head:o}=r,a=this.toEditorPos(i.updateRangeStart),l=this.toEditorPos(i.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:i.updateRangeStart,editorBase:a,drifted:!1});let u=l-a>i.text.length;a==this.from&&s<this.from?a=s:l==this.to&&s>this.to&&(l=s);let c=mD(e.state.sliceDoc(a,l),i.text,(u?r.from:r.to)-a,u?"end":null);if(!c){let f=fe.single(this.toEditorPos(i.selectionStart),this.toEditorPos(i.selectionEnd));TO(f,r)||e.dispatch({selection:f,userEvent:"select"});return}let h={from:c.from+a,to:c.toA+a,insert:$t.of(i.text.slice(c.from,c.toB).split(`
|
|
127
|
+
`))};if((De.mac||De.android)&&h.from==o-1&&/^\. ?$/.test(i.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(h={from:a,to:l,insert:$t.of([i.text.replace("."," ")])}),this.pendingContextChange=h,!e.state.readOnly){let f=this.to-this.from+(h.to-h.from+h.insert.length);bk(e,h,fe.single(this.toEditorPos(i.selectionStart,f),this.toEditorPos(i.selectionEnd,f)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),h.from<h.to&&!h.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(n.text.slice(Math.max(0,i.updateRangeStart-1),Math.min(n.text.length,i.updateRangeStart+1)))&&this.handlers.compositionend(i)},this.handlers.characterboundsupdate=i=>{let r=[],s=null;for(let o=this.toEditorPos(i.rangeStart),a=this.toEditorPos(i.rangeEnd);o<a;o++){let l=e.coordsForChar(o);s=l&&new DOMRect(l.left,l.top,l.right-l.left,l.bottom-l.top)||s||new DOMRect,r.push(s)}n.updateCharacterBounds(i.rangeStart,r)},this.handlers.textformatupdate=i=>{let r=[];for(let s of i.getTextFormats()){let o=s.underlineStyle,a=s.underlineThickness;if(!/none/i.test(o)&&!/none/i.test(a)){let l=this.toEditorPos(s.rangeStart),u=this.toEditorPos(s.rangeEnd);if(l<u){let c=`text-decoration: underline ${/^[a-z]/.test(o)?o+" ":o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${/thin/i.test(a)?1:2}px`;r.push(Xe.mark({attributes:{style:c}}).range(l,u))}}}e.dispatch({effects:sD.of(Xe.set(r))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:i}=this.composing;this.composing=null,i&&this.reset(e.state)}};for(let i in this.handlers)n.addEventListener(i,this.handlers[i]);this.measureReq={read:i=>{let r=lp(i.root);r&&r.rangeCount&&this.editContext.updateSelectionBounds(r.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,i=!1,r=this.pendingContextChange;return e.changes.iterChanges((s,o,a,l,u)=>{if(i)return;let c=u.length-(o-s);if(r&&o>=r.to)if(r.from==s&&r.to==o&&r.insert.eq(u)){r=this.pendingContextChange=null,n+=c,this.to+=c;return}else r=null,this.revertPending(e.state);if(s+=n,o+=n,o<=this.from)this.from+=c,this.to+=c;else if(s<this.to){if(s<this.from||o>this.to||this.to-this.from+u.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(o),u.toString()),this.to+=c}n+=c}),r&&!i&&this.revertPending(e.state),!i}update(e){let n=this.pendingContextChange,i=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(i.from,i.to)&&e.transactions.some(r=>!r.isUserEvent("input.type")&&r.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),r=this.toContextPos(n.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(i,r)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to<e.doc.length&&this.to-n<500||this.to-this.from>1e4*3)}toEditorPos(e,n=this.to-this.from){e=Math.min(e,n);let i=this.composing;return i&&i.drifted?i.editorBase+(e-i.contextBase):e+this.from}toContextPos(e){let n=this.composing;return n&&n.drifted?n.contextBase+(e-n.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class Se{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:i}=e;this.dispatchTransactions=e.dispatchTransactions||i&&(r=>r.forEach(s=>i(s,this)))||(r=>this.update(r)),this.dispatch=this.dispatch.bind(this),this._root=e.root||Vse(e.parent)||document,this.viewState=new p9(this,e.state||mt.create(e)),e.scrollTo&&e.scrollTo.is(fg)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Cc).map(r=>new _v(r));for(let r of this.plugins)r.update(this);this.observer=new uae(this),this.inputState=new $oe(this),this.inputState.ensureHandlers(this.plugins),this.docView=new t9(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...e){let n=e.length==1&&e[0]instanceof Zn?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,i=!1,r,s=this.state;for(let f of e){if(f.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=f.state}if(this.destroyed){this.viewState.state=s;return}let o=this.hasFocus,a=0,l=null;e.some(f=>f.annotation(bD))?(this.inputState.notifiedFocused=o,a=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,l=SD(s,o),l||(a=1));let u=this.observer.delayedAndroidKey,c=null;if(u?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(c=null)):this.observer.clear(),s.facet(mt.phrases)!=this.state.facet(mt.phrases))return this.setState(s);r=wO.create(this,s,e),r.flags|=a;let h=this.viewState.scrollTarget;try{this.updateState=2;for(let f of e){if(h&&(h=h.map(f.changes)),f.scrollIntoView){let{main:p}=f.state.selection,{x:m,y:g}=this.state.facet(Se.cursorScrollMargin);h=new zc(p.empty?p:fe.cursor(p.head,p.head>p.anchor?-1:1),"nearest","nearest",g,m)}for(let p of f.effects)p.is(fg)&&(h=p.value.clip(this.state))}this.viewState.update(r,h),this.bidiCache=AO.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),n=this.docView.update(r),this.state.facet(zf)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(f=>f.isUserEvent("select.pointer")))}finally{this.updateState=0}if(r.startState.facet(xg)!=r.state.facet(xg)&&(this.viewState.mustMeasureContent=!0),(n||i||h||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!r.empty)for(let f of this.state.facet(C_))try{f(r)}catch(p){sr(this.state,p,"update listener")}(l||c)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),c&&!pD(this,c)&&u.force&&Zc(this.contentDOM,u.key,u.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new p9(this,e),this.plugins=e.facet(Cc).map(i=>new _v(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView.destroy(),this.docView=new t9(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(Cc),i=e.state.facet(Cc);if(n!=i){let r=[];for(let s of i){let o=n.indexOf(s);if(o<0)r.push(new _v(s));else{let a=this.plugins[o];a.mustUpdate=e,r.push(a)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let r of this.plugins)r.mustUpdate=e;for(let r=0;r<this.plugins.length;r++)this.plugins[r].update(this);n!=i&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let n=e.value;if(n&&n.docViewUpdate)try{n.docViewUpdate(this)}catch(i){sr(this.state,i,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,i=this.viewState.scrollParent,r=this.viewState.getScrollOffset(),{scrollAnchorPos:s,scrollAnchorHeight:o}=this.viewState;Math.abs(r-this.viewState.scrollOffset)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(o<0)if(jL(i||this.win))s=-1,o=this.viewState.heightMap.height;else{let p=this.viewState.scrollAnchorAt(r);s=p.from,o=p.top}this.updateState=1;let l=this.viewState.measure();if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(a>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let u=[];l&4||([this.measureRequests,u]=[u,this.measureRequests]);let c=u.map(p=>{try{return p.read(this)}catch(m){return sr(this.state,m),y9}}),h=wO.create(this,this.state,[]),f=!1;h.flags|=l,n?n.flags|=l:n=h,this.updateState=2,h.empty||(this.updatePlugins(h),this.inputState.update(h),this.updateAttrs(),f=this.docView.update(h),f&&this.docViewUpdate());for(let p=0;p<u.length;p++)if(c[p]!=y9)try{let m=u[p];m.write&&m.write(c[p],this)}catch(m){sr(this.state,m)}if(f&&this.docView.updateSelection(!0),!h.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,o=-1;continue}else{let m=((s<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(s).top)-o)/this.scaleY;if((m>1||m<-1)&&!(De.ios&&this.inputState.lastIOSMomentumScroll>Date.now()-100)&&(i==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){r=r+m,i?i.scrollTop+=m:this.win.scrollBy(0,m),o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let a of this.state.facet(C_))a(n)}get themeClasses(){return A_+" "+(this.state.facet(P_)?kD:wD)+" "+this.state.facet(xg)}updateAttrs(){let e=v9(this,oD,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(Qo)?"true":"false",class:"cm-content",style:`${De.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),v9(this,xk,n);let i=this.observer.ignore(()=>{let r=q3(this.contentDOM,this.contentAttrs,n),s=q3(this.dom,this.editorAttrs,e);return r||s});return this.editorAttrs=e,this.contentAttrs=n,i}showAnnouncements(e){let n=!0;for(let i of e)for(let r of i.effects)if(r.is(Se.announce)){n&&(this.announceDOM.textContent=""),n=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=r.value}}mountStyles(){this.styleModules=this.state.facet(zf);let e=this.state.facet(Se.cspNonce);ua.mount(this.root,this.styleModules.concat(aae).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===e.key){this.measureRequests[n]=e;return}}this.measureRequests.push(e)}}plugin(e){let n=this.pluginMap.get(e);return(n===void 0||n&&n.plugin!=e)&&this.pluginMap.set(e,n=this.plugins.find(i=>i.plugin==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,i){return Ev(this,e,n9(this,e,n,i))}moveByGroup(e,n){return Ev(this,e,n9(this,e,n,i=>boe(this,e.head,i)))}visualLineSide(e,n){let i=this.bidiSpans(e),r=this.textDirectionAt(e.from),s=i[n?i.length-1:0];return fe.cursor(s.side(n,r)+e.from,s.forward(!n,r)?1:-1)}moveToLineBoundary(e,n,i=!0){return voe(this,e,n,i)}moveVertically(e,n,i){return Ev(this,e,Soe(this,e,n,i))}domAtPos(e,n=1){return this.docView.domAtPos(e,n)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){this.readMeasured();let i=E_(this,e,n);return i&&i.pos}posAndSideAtCoords(e,n=!0){return this.readMeasured(),E_(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let i=this.state.doc.lineAt(e),r=this.bidiSpans(i),s=r[so.find(r,e-i.from,-1,n)];return this.docView.coordsAt(e,n,s.dir==un.RTL)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(nD)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>fae)return UL(e.length);let n=this.textDirectionAt(e.from),i;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==n&&(s.fresh||HL(s.isolates,i=K3(this,e))))return s.order;i||(i=K3(this,e));let r=Hse(e.text,n,i);return this.bidiCache.push(new AO(e.from,e.to,n,i,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||De.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{FL(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){var i,r,s,o;return fg.of(new zc(typeof e=="number"?fe.cursor(e):e,(i=n.y)!==null&&i!==void 0?i:"nearest",(r=n.x)!==null&&r!==void 0?r:"nearest",(s=n.yMargin)!==null&&s!==void 0?s:5,(o=n.xMargin)!==null&&o!==void 0?o:5))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,i=this.viewState.scrollAnchorAt(e);return fg.of(new zc(fe.cursor(i.from),"start","start",i.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Ln.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Ln.define(()=>({}),{eventObservers:e})}static theme(e,n){let i=ua.newName(),r=[xg.of(i),zf.of($_(`.${i}`,e))];return n&&n.dark&&r.push(P_.of(!0)),r}static baseTheme(e){return js.lowest(zf.of($_("."+A_,e,ED)))}static findFromDOM(e){var n;let i=e.querySelector(".cm-content"),r=i&&Nn.get(i)||Nn.get(e);return((n=r==null?void 0:r.root)===null||n===void 0?void 0:n.view)||null}}Se.styleModule=zf;Se.inputHandler=eD;Se.clipboardInputFilter=gk;Se.clipboardOutputFilter=Ok;Se.scrollHandler=rD;Se.focusChangeEffect=tD;Se.perLineTextDirection=nD;Se.exceptionSink=JL;Se.updateListener=C_;Se.editable=Qo;Se.mouseSelectionStyle=KL;Se.dragMovesSelection=GL;Se.clickAddsSelectionRange=YL;Se.decorations=kx;Se.blockWrappers=aD;Se.outerDecorations=yk;Se.atomicRanges=vm;Se.bidiIsolatedRanges=lD;Se.cursorScrollMargin=Qe.define({combine:t=>{let e=5,n=5;for(let i of t)typeof i=="number"?e=n=i:{x:e,y:n}=i;return{x:e,y:n}}});Se.scrollMargins=uD;Se.darkTheme=P_;Se.cspNonce=Qe.define({combine:t=>t.length?t[0]:""});Se.contentAttributes=xk;Se.editorAttributes=oD;Se.lineWrapping=Se.contentAttributes.of({class:"cm-lineWrapping"});Se.announce=nt.define();const fae=4096,y9={};class AO{constructor(e,n,i,r,s,o){this.from=e,this.to=n,this.dir=i,this.isolates=r,this.fresh=s,this.order=o}static update(e,n){if(n.empty&&!e.some(s=>s.fresh))return e;let i=[],r=e.length?e[e.length-1].dir:un.LTR;for(let s=Math.max(0,e.length-10);s<e.length;s++){let o=e[s];o.dir==r&&!n.touchesRange(o.from,o.to)&&i.push(new AO(n.mapPos(o.from,1),n.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return i}}function v9(t,e,n){for(let i=t.state.facet(e),r=i.length-1;r>=0;r--){let s=i[r],o=typeof s=="function"?s(t):s;o&&dk(o,n)}return n}const dae=De.mac?"mac":De.windows?"win":De.linux?"linux":"key";function pae(t,e){const n=t.split(/-(?!$)/);let i=n[n.length-1];i=="Space"&&(i=" ");let r,s,o,a;for(let l=0;l<n.length-1;++l){const u=n[l];if(/^(cmd|meta|m)$/i.test(u))a=!0;else if(/^a(lt)?$/i.test(u))r=!0;else if(/^(c|ctrl|control)$/i.test(u))s=!0;else if(/^s(hift)?$/i.test(u))o=!0;else if(/^mod$/i.test(u))e=="mac"?a=!0:s=!0;else throw new Error("Unrecognized modifier name: "+u)}return r&&(i="Alt-"+i),s&&(i="Ctrl-"+i),a&&(i="Meta-"+i),o&&(i="Shift-"+i),i}function yg(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n!==!1&&e.shiftKey&&(t="Shift-"+t),t}const mae=js.default(Se.domEventHandlers({keydown(t,e){return PD(TD(e.state),t,e,"editor")}})),hf=Qe.define({enables:mae}),b9=new WeakMap;function TD(t){let e=t.facet(hf),n=b9.get(e);return n||b9.set(e,n=xae(e.reduce((i,r)=>i.concat(r),[]))),n}function gae(t,e,n){return PD(TD(t.state),e,t,n)}let Ra=null;const Oae=4e3;function xae(t,e=dae){let n=Object.create(null),i=Object.create(null),r=(o,a)=>{let l=i[o];if(l==null)i[o]=a;else if(l!=a)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},s=(o,a,l,u,c)=>{var h,f;let p=n[o]||(n[o]=Object.create(null)),m=a.split(/ (?!$)/).map(y=>pae(y,e));for(let y=1;y<m.length;y++){let S=m.slice(0,y).join(" ");r(S,!0),p[S]||(p[S]={preventDefault:!0,stopPropagation:!1,run:[_=>{let k=Ra={view:_,prefix:S,scope:o};return setTimeout(()=>{Ra==k&&(Ra=null)},Oae),!0}]})}let g=m.join(" ");r(g,!1);let x=p[g]||(p[g]={preventDefault:!1,stopPropagation:!1,run:((f=(h=p._any)===null||h===void 0?void 0:h.run)===null||f===void 0?void 0:f.slice())||[]});l&&x.run.push(l),u&&(x.preventDefault=!0),c&&(x.stopPropagation=!0)};for(let o of t){let a=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let u of a){let c=n[u]||(n[u]=Object.create(null));c._any||(c._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:h}=o;for(let f in c)c[f].run.push(p=>h(p,I_))}let l=o[e]||o.key;if(l)for(let u of a)s(u,l,o.run,o.preventDefault,o.stopPropagation),o.shift&&s(u,"Shift-"+l,o.shift,o.preventDefault,o.stopPropagation)}return n}let I_=null;function PD(t,e,n,i){I_=e;let r=Ise(e),s=tr(r,0),o=Js(s)==r.length&&r!=" ",a="",l=!1,u=!1,c=!1;Ra&&Ra.view==n&&Ra.scope==i&&(a=Ra.prefix+" ",OD.indexOf(e.keyCode)<0&&(u=!0,Ra=null));let h=new Set,f=x=>{if(x){for(let y of x.run)if(!h.has(y)&&(h.add(y),y(n)))return x.stopPropagation&&(c=!0),!0;x.preventDefault&&(x.stopPropagation&&(c=!0),u=!0)}return!1},p=t[i],m,g;return p&&(f(p[a+yg(r,e,!o)])?l=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(De.windows&&e.ctrlKey&&e.altKey)&&!(De.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(m=fl[e.keyCode])&&m!=r?(f(p[a+yg(m,e,!0)])||e.shiftKey&&(g=op[e.keyCode])!=r&&g!=m&&f(p[a+yg(g,e,!1)]))&&(l=!0):o&&e.shiftKey&&f(p[a+yg(r,e,!0)])&&(l=!0),!l&&f(p._any)&&(l=!0)),u&&(l=!0),l&&c&&e.stopPropagation(),I_=null,l}class iu{constructor(e,n,i,r,s){this.className=e,this.left=n,this.top=i,this.width=r,this.height=s}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,i){if(i.empty){let r=e.coordsAtPos(i.head,i.assoc||1);if(!r)return[];let s=AD(e);return[new iu(n,r.left-s.left,r.top-s.top,null,r.bottom-r.top)]}else return yae(e,n,i)}}function AD(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==un.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function S9(t,e,n,i){let r=t.coordsAtPos(e,n*2);if(!r)return i;let s=t.dom.getBoundingClientRect(),o=(r.top+r.bottom)/2,a=t.posAtCoords({x:s.left+1,y:o}),l=t.posAtCoords({x:s.right-1,y:o});return a==null||l==null?i:{from:Math.max(i.from,Math.min(a,l)),to:Math.min(i.to,Math.max(a,l))}}function yae(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let i=Math.max(n.from,t.viewport.from),r=Math.min(n.to,t.viewport.to),s=t.textDirection==un.LTR,o=t.contentDOM,a=o.getBoundingClientRect(),l=AD(t),u=o.querySelector(".cm-line"),c=u&&window.getComputedStyle(u),h=a.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),f=a.right-(c?parseInt(c.paddingRight):0),p=k_(t,i,1),m=k_(t,r,-1),g=p.type==Si.Text?p:null,x=m.type==Si.Text?m:null;if(g&&(t.lineWrapping||p.widgetLineBreaks)&&(g=S9(t,i,1,g)),x&&(t.lineWrapping||m.widgetLineBreaks)&&(x=S9(t,r,-1,x)),g&&x&&g.from==x.from&&g.to==x.to)return S(_(n.from,n.to,g));{let w=g?_(n.from,null,g):k(p,!1),b=x?_(null,n.to,x):k(m,!0),E=[];return(g||p).to<(x||m).from-(g&&x?1:0)||p.widgetLineBreaks>1&&w.bottom+t.defaultLineHeight/2<b.top?E.push(y(h,w.bottom,f,b.top)):w.bottom<b.top&&t.elementAtHeight((w.bottom+b.top)/2).type==Si.Text&&(w.bottom=b.top=(w.bottom+b.top)/2),S(w).concat(E).concat(S(b))}function y(w,b,E,P){return new iu(e,w-l.left,b-l.top,Math.max(0,E-w),P-b)}function S({top:w,bottom:b,horizontal:E}){let P=[];for(let $=0;$<E.length;$+=2)P.push(y(E[$],w,E[$+1],b));return P}function _(w,b,E){let P=1e9,$=-1e9,B=[];function X(G,z,J,ue,Le){let ye=t.coordsAtPos(G,G==E.to?-2:2),xe=t.coordsAtPos(J,J==E.from?2:-2);!ye||!xe||(P=Math.min(ye.top,xe.top,P),$=Math.max(ye.bottom,xe.bottom,$),Le==un.LTR?B.push(s&&z?h:ye.left,s&&ue?f:xe.right):B.push(!s&&ue?h:xe.left,!s&&z?f:ye.right))}let j=w??E.from,Z=b??E.to;for(let G of t.visibleRanges)if(G.to>j&&G.from<Z)for(let z=Math.max(G.from,j),J=Math.min(G.to,Z);;){let ue=t.state.doc.lineAt(z);for(let Le of t.bidiSpans(ue)){let ye=Le.from+ue.from,xe=Le.to+ue.from;if(ye>=J)break;xe>z&&X(Math.max(ye,z),w==null&&ye<=j,Math.min(xe,J),b==null&&xe>=Z,Le.dir)}if(z=ue.to+1,z>=J)break}return B.length==0&&X(j,w==null,Z,b==null,t.textDirection),{top:P,bottom:$,horizontal:B}}function k(w,b){let E=a.top+(b?w.top:w.bottom);return{top:E,bottom:E,horizontal:[]}}}function vae(t,e){return t.constructor==e.constructor&&t.eq(e)}class bae{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(c0)!=e.state.facet(c0)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,i=e.facet(c0);for(;n<i.length&&i[n]!=this.layer;)n++;this.dom.style.zIndex=String((this.layer.above?150:-1)-n)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:n}=this.view;(e!=this.scaleX||n!=this.scaleY)&&(this.scaleX=e,this.scaleY=n,this.dom.style.transform=`scale(${1/e}, ${1/n})`)}draw(e){if(e.length!=this.drawn.length||e.some((n,i)=>!vae(n,this.drawn[i]))){let n=this.dom.firstChild,i=0;for(let r of e)r.update&&n&&r.constructor&&this.drawn[i].constructor&&r.update(n,this.drawn[i])?(n=n.nextSibling,i++):this.dom.insertBefore(r.draw(),n);for(;n;){let r=n.nextSibling;n.remove(),n=r}this.drawn=e,De.webkit&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const c0=Qe.define();function $D(t){return[Ln.define(e=>new bae(e,t)),c0.of(t)]}const mh=Qe.define({combine(t){return wo(t,{cursorBlinkRate:1200,drawRangeCursor:!0,iosSelectionHandles:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function Sae(t={}){return[mh.of(t),_ae,Cae,kae,iD.of(!0)]}function ID(t){return t.startState.facet(mh)!=t.state.facet(mh)}const _ae=$D({above:!0,markers(t){let{state:e}=t,n=e.facet(mh),i=[];for(let r of e.selection.ranges){let s=r==e.selection.main;if(r.empty||n.drawRangeCursor&&!(s&&De.ios&&n.iosSelectionHandles)){let o=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",a=r.empty?r:fe.cursor(r.head,r.assoc);for(let l of iu.forRange(t,o,a))i.push(l)}}return i},update(t,e){t.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=ID(t);return n&&_9(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){_9(e.state,t)},class:"cm-cursorLayer"});function _9(t,e){e.style.animationDuration=t.facet(mh).cursorBlinkRate+"ms"}const Cae=$D({above:!1,markers(t){let e=[],{main:n,ranges:i}=t.state.selection;for(let r of i)if(!r.empty)for(let s of iu.forRange(t,"cm-selectionBackground",r))e.push(s);if(De.ios&&!n.empty&&t.state.facet(mh).iosSelectionHandles){for(let r of iu.forRange(t,"cm-selectionHandle cm-selectionHandle-start",fe.cursor(n.from,1)))e.push(r);for(let r of iu.forRange(t,"cm-selectionHandle cm-selectionHandle-end",fe.cursor(n.to,1)))e.push(r)}return e},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||ID(t)},class:"cm-selectionLayer"}),wae=De.gecko&&De.gecko_version>=153?"#ffffff01":"transparent",kae=js.highest(Se.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:`${wae} !important`},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),RD=nt.define({map(t,e){return t==null?null:e.mapPos(t)}}),Wf=Wn.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,i)=>i.is(RD)?i.value:n,t)}}),Eae=Ln.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(Wf);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(Wf)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(Wf),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let i=t.scrollDOM.getBoundingClientRect();return{left:n.left-i.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-i.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(Wf)!=t&&this.view.dispatch({effects:RD.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function Tae(){return[Wf,Eae]}function C9(t,e,n,i,r){e.lastIndex=0;for(let s=t.iterRange(n,i),o=n,a;!s.next().done;o+=s.value.length)if(!s.lineBreak)for(;a=e.exec(s.value);)r(o+a.index,a)}function Pae(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let i=[];for(let{from:r,to:s}of n)r=Math.max(t.state.doc.lineAt(r).from,r-e),s=Math.min(t.state.doc.lineAt(s).to,s+e),i.length&&i[i.length-1].to>=r?i[i.length-1].to=s:i.push({from:r,to:s});return i}class Aae{constructor(e){const{regexp:n,decoration:i,decorate:r,boundary:s,maxLength:o=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,r)this.addMatch=(a,l,u,c)=>r(c,u,u+a[0].length,a,l);else if(typeof i=="function")this.addMatch=(a,l,u,c)=>{let h=i(a,l,u);h&&c(u,u+a[0].length,h)};else if(i)this.addMatch=(a,l,u,c)=>c(u,u+a[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=s,this.maxLength=o}createDeco(e){let n=new dr,i=n.add.bind(n);for(let{from:r,to:s}of Pae(e,this.maxLength))C9(e.state.doc,this.regexp,r,s,(o,a)=>this.addMatch(a,e,o,i));return n.finish()}updateDeco(e,n){let i=1e9,r=-1;return e.docChanged&&e.changes.iterChanges((s,o,a,l)=>{l>=e.view.viewport.from&&a<=e.view.viewport.to&&(i=Math.min(a,i),r=Math.max(l,r))}),e.viewportMoved||r-i>1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,n.map(e.changes),i,r):n}updateRange(e,n,i,r){for(let s of e.visibleRanges){let o=Math.max(s.from,i),a=Math.min(s.to,r);if(a>=o){let l=e.state.doc.lineAt(o),u=l.to<a?e.state.doc.lineAt(a):l,c=Math.max(s.from,l.from),h=Math.min(s.to,u.to);if(this.boundary){for(;o>l.from;o--)if(this.boundary.test(l.text[o-1-l.from])){c=o;break}for(;a<u.to;a++)if(this.boundary.test(u.text[a-u.from])){h=a;break}}let f=[],p,m=(g,x,y)=>f.push(y.range(g,x));if(l==u)for(this.regexp.lastIndex=c-l.from;(p=this.regexp.exec(l.text))&&p.index<h-l.from;)this.addMatch(p,e,p.index+l.from,m);else C9(e.state.doc,this.regexp,c,h,(g,x)=>this.addMatch(x,e,g,m));n=n.update({filterFrom:c,filterTo:h,filter:(g,x)=>g<c||x>h,add:f})}}return n}}const R_=/x/.unicode!=null?"gu":"g",$ae=new RegExp(`[\0-\b
|
|
128
|
+
--\u2028\u2029\uFEFF-]`,R_),Iae={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Av=null;function Rae(){var t;if(Av==null&&typeof document<"u"&&document.body){let e=document.body.style;Av=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return Av||!1}const h0=Qe.define({combine(t){let e=wo(t,{render:null,specialChars:$ae,addSpecialChars:null});return(e.replaceTabs=!Rae())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,R_)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,R_)),e}});function Mae(t={}){return[h0.of(t),Nae()]}let w9=null;function Nae(){return w9||(w9=Ln.fromClass(class{constructor(t){this.view=t,this.decorations=Xe.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(h0)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new Aae({regexp:t.specialChars,decoration:(e,n,i)=>{let{doc:r}=n.state,s=tr(e[0],0);if(s==9){let o=r.lineAt(i),a=n.state.tabSize,l=Ns(o.text,a,i-o.from);return Xe.replace({widget:new Vae((a-l%a)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[s]||(this.decorationCache[s]=Xe.replace({widget:new Qae(t,s)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(h0);t.startState.facet(h0)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const Lae="•";function Dae(t){return t>=32?Lae:t==10?"":String.fromCharCode(9216+t)}class Qae extends ds{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=Dae(this.code),i=e.state.phrase("Control character")+" "+(Iae[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,i,n);if(r)return r;let s=document.createElement("span");return s.textContent=n,s.title=i,s.setAttribute("aria-label",i),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class Vae extends ds{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function Bae(){return jae}const Fae=Xe.line({class:"cm-activeLine"}),jae=Ln.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let i of t.state.selection.ranges){let r=t.lineBlockAt(i.head);r.from>e&&(n.push(Fae.range(r.from)),e=r.from)}return Xe.set(n)}},{decorations:t=>t.decorations}),M_=2e3;function Zae(t,e,n){let i=Math.min(e.line,n.line),r=Math.max(e.line,n.line),s=[];if(e.off>M_||n.off>M_||e.col<0||n.col<0){let o=Math.min(e.off,n.off),a=Math.max(e.off,n.off);for(let l=i;l<=r;l++){let u=t.doc.line(l);u.length<=a&&s.push(fe.range(u.from+o,u.to+a))}}else{let o=Math.min(e.col,n.col),a=Math.max(e.col,n.col);for(let l=i;l<=r;l++){let u=t.doc.line(l),c=d_(u.text,o,t.tabSize,!0);if(c<0)s.push(fe.cursor(u.to));else{let h=d_(u.text,a,t.tabSize);s.push(fe.range(u.from+c,u.from+h))}}}return s}function zae(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function k9(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),i=t.state.doc.lineAt(n),r=n-i.from,s=r>M_?-1:r==i.length?zae(t,e.clientX):Ns(i.text,t.state.tabSize,n-i.from);return{line:i.number,col:s,off:r}}function Xae(t,e){let n=k9(t,e),i=t.state.selection;return n?{update(r){if(r.docChanged){let s=r.changes.mapPos(r.startState.doc.line(n.line).from),o=r.state.doc.lineAt(s);n={line:o.number,col:n.col,off:Math.min(n.off,o.length)},i=i.map(r.changes)}},get(r,s,o){let a=k9(t,r);if(!a)return i;let l=Zae(t.state,n,a);return l.length?o?fe.create(l.concat(i.ranges)):fe.create(l):i}}:null}function Wae(t){let e=(n=>n.altKey&&n.button==0);return Se.mouseSelectionStyle.of((n,i)=>e(i)?Xae(n,i):null)}const Hae={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},Uae={style:"cursor: crosshair"};function qae(t={}){let[e,n]=Hae[t.key||"Alt"],i=Ln.fromClass(class{constructor(r){this.view=r,this.isDown=!1}set(r){this.isDown!=r&&(this.isDown=r,this.view.update([]))}},{eventObservers:{keydown(r){this.set(r.keyCode==e||n(r))},keyup(r){(r.keyCode==e||!n(r))&&this.set(!1)},mousemove(r){this.set(n(r))}}});return[i,Se.contentAttributes.of(r=>{var s;return!((s=r.plugin(i))===null||s===void 0)&&s.isDown?Uae:null})]}const vg="-10000px";class MD{constructor(e,n,i,r){this.facet=n,this.createTooltipView=i,this.removeTooltipView=r,this.input=e.state.facet(n),this.tooltips=this.input.filter(o=>o);let s=null;this.tooltipViews=this.tooltips.map(o=>s=i(o,s))}update(e,n){var i;let r=e.state.facet(this.facet),s=r.filter(l=>l);if(r===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let o=[],a=n?[]:null;for(let l=0;l<s.length;l++){let u=s[l],c=-1;if(u){for(let h=0;h<this.tooltips.length;h++){let f=this.tooltips[h];f&&f.create==u.create&&(c=h)}if(c<0)o[l]=this.createTooltipView(u,l?o[l-1]:null),a&&(a[l]=!!u.above);else{let h=o[l]=this.tooltipViews[c];a&&(a[l]=n[c]),h.update&&h.update(e)}}}for(let l of this.tooltipViews)o.indexOf(l)<0&&(this.removeTooltipView(l),(i=l.destroy)===null||i===void 0||i.call(l));return n&&(a.forEach((l,u)=>n[u]=l),n.length=a.length),this.input=r,this.tooltips=s,this.tooltipViews=o,!0}}function Yae(t){let e=t.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const $v=Qe.define({combine:t=>{var e,n,i;return{position:De.ios?"absolute":((e=t.find(r=>r.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(r=>r.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((i=t.find(r=>r.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||Yae}}}),E9=new WeakMap,Ck=Ln.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet($v);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new MD(t,wk,(n,i)=>this.createTooltip(n,i),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,i=t.state.facet($v);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let r of this.manager.tooltipViews)r.dom.style.position=this.position;n=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let r of this.manager.tooltipViews)this.container.appendChild(r.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),i=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let r=document.createElement("div");r.className="cm-tooltip-arrow",n.dom.appendChild(r)}return n.dom.style.position=this.position,n.dom.style.top=vg,n.dom.style.left="0px",this.container.insertBefore(n.dom,i),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let i of this.manager.tooltipViews)i.dom.remove(),(t=i.destroy)===null||t===void 0||t.call(i);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:s}=this.manager.tooltipViews[0];if(De.safari){let o=s.getBoundingClientRect();n=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}else n=!!s.offsetParent&&s.offsetParent!=this.container.ownerDocument.body}if(n||this.position=="absolute")if(this.parent){let s=this.parent.getBoundingClientRect();s.width&&s.height&&(t=s.width/this.parent.offsetWidth,e=s.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let i=this.view.scrollDOM.getBoundingClientRect(),r=vk(this.view);return{visible:{left:i.left+r.left,top:i.top+r.top,right:i.right-r.right,bottom:i.bottom-r.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((s,o)=>{let a=this.manager.tooltipViews[o];return a.getCoords?a.getCoords(s.pos):this.view.coordsAtPos(s.pos)}),size:this.manager.tooltipViews.map(({dom:s})=>s.getBoundingClientRect()),space:this.view.state.facet($v).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let a of this.manager.tooltipViews)a.dom.style.position="absolute"}let{visible:n,space:i,scaleX:r,scaleY:s}=t,o=[];for(let a=0;a<this.manager.tooltips.length;a++){let l=this.manager.tooltips[a],u=this.manager.tooltipViews[a],{dom:c}=u,h=t.pos[a],f=t.size[a];if(!h||l.clip!==!1&&(h.bottom<=Math.max(n.top,i.top)||h.top>=Math.min(n.bottom,i.bottom)||h.right<Math.max(n.left,i.left)-.1||h.left>Math.min(n.right,i.right)+.1)){c.style.top=vg;continue}let p=l.arrow?u.dom.querySelector(".cm-tooltip-arrow"):null,m=p?7:0,g=f.right-f.left,x=(e=E9.get(u))!==null&&e!==void 0?e:f.bottom-f.top,y=u.offset||Kae,S=this.view.textDirection==un.LTR,_=f.width>i.right-i.left?S?i.left:i.right-f.width:S?Math.max(i.left,Math.min(h.left-(p?14:0)+y.x,i.right-g)):Math.min(Math.max(i.left,h.left-g+(p?14:0)-y.x),i.right-g),k=this.above[a];!l.strictSide&&(k?h.top-x-m-y.y<i.top:h.bottom+x+m+y.y>i.bottom)&&k==i.bottom-h.bottom>h.top-i.top&&(k=this.above[a]=!k);let w=(k?h.top-i.top:i.bottom-h.bottom)-m;if(w<x&&u.resize!==!1){if(w<this.view.defaultLineHeight){c.style.top=vg;continue}E9.set(u,x),c.style.height=(x=w)/s+"px"}else c.style.height&&(c.style.height="");let b=k?h.top-x-m-y.y:h.bottom+m+y.y,E=_+g;if(u.overlap!==!0)for(let P of o)P.left<E&&P.right>_&&P.top<b+x&&P.bottom>b&&(b=k?P.top-x-2-m:P.bottom+m+2);if(this.position=="absolute"?(c.style.top=(b-t.parent.top)/s+"px",T9(c,(_-t.parent.left)/r)):(c.style.top=b/s+"px",T9(c,_/r)),p){let P=h.left+(S?y.x:-y.x)-(_+14-7);p.style.left=P/r+"px"}u.overlap!==!0&&o.push({left:_,top:b,right:E,bottom:b+x}),c.classList.toggle("cm-tooltip-above",k),c.classList.toggle("cm-tooltip-below",!k),u.positioned&&u.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=vg}},{eventObservers:{scroll(){this.maybeMeasure()}}});function T9(t,e){let n=parseInt(t.style.left,10);(isNaN(n)||Math.abs(e-n)>1)&&(t.style.left=e+"px")}const Gae=Se.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Kae={x:0,y:0},wk=Qe.define({enables:[Ck,Gae]}),$O=Qe.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class Ax{static create(e){return new Ax(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new MD(e,$O,(n,i)=>this.createHostedView(n,i),n=>n.dom.remove())}createHostedView(e,n){let i=e.create(this.view);return i.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(i.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&i.mount&&i.mount(this.view),i}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let i of this.manager.tooltipViews){let r=i[e];if(r!==void 0){if(n===void 0)n=r;else if(n!==r)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const Jae=wk.compute([$O],t=>{let e=t.facet($O);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var i;return(i=n.end)!==null&&i!==void 0?i:n.pos})),create:Ax.create,above:e[0].above,arrow:e.some(n=>n.arrow)}}),ND=Qe.define();class ele{constructor(e,n,i,r,s,o){this.view=e,this.source=n,this.field=i,this.locked=r,this.setHover=s,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(e){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:n}=this,i=e.docView.tile.nearest(n.target);if(!i)return;let r,s=1;if(i.isWidget())r=i.posAtStart;else{if(r=e.posAtCoords(n),r==null)return;let o=e.coordsAtPos(r);if(!o||n.y<o.top||n.y>o.bottom||n.x<o.left-e.defaultCharacterWidth||n.x>o.right+e.defaultCharacterWidth)return;let a=e.bidiSpans(e.state.doc.lineAt(r)).find(u=>u.from<=r&&u.to>=r),l=a&&a.dir==un.RTL?-1:1;s=n.x<o.left?-l:l}this.activateHover(e,r,s)}activateHover(e,n,i,r){let s=this.source(e,n,i),o=a=>{if(a&&!(Array.isArray(a)&&!a.length)){let l=Array.isArray(a)?a:[a];r&&this.locked.set(l,r),e.dispatch({effects:this.setHover.of(l)})}};if(s&&"then"in s){let a=this.pending={pos:n};s.then(l=>{this.pending==a&&(this.pending=null,o(l))},l=>sr(e.state,l,"hover tooltip"))}else o(s)}get tooltip(){let e=this.view.plugin(Ck),n=e?e.manager.tooltips.findIndex(i=>i.create==Ax.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,i;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:s}=this;if(r.length&&!this.locked.has(r)&&s&&!tle(s.dom,e)||this.pending){let{pos:o}=r[0]||this.pending,a=(i=(n=r[0])===null||n===void 0?void 0:n.end)!==null&&i!==void 0?i:o;(o==a?this.view.posAtCoords(this.lastMove)!=o:!nle(this.view,o,a,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length&&!this.locked.has(n)){let{tooltip:i}=this;i&&i.dom.contains(e.relatedTarget)?this.watchTooltipLeave(i.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=i=>{e.removeEventListener("mouseleave",n);let{active:r}=this;r.length&&!this.locked.has(r)&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),clearTimeout(this.restartTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const bg=4;function tle(t,e){let{left:n,right:i,top:r,bottom:s}=t.getBoundingClientRect(),o;if(o=t.querySelector(".cm-tooltip-arrow")){let a=o.getBoundingClientRect();r=Math.min(a.top,r),s=Math.max(a.bottom,s)}return e.clientX>=n-bg&&e.clientX<=i+bg&&e.clientY>=r-bg&&e.clientY<=s+bg}function nle(t,e,n,i,r,s){let o=t.scrollDOM.getBoundingClientRect(),a=t.documentTop+t.documentPadding.top+t.contentHeight;if(o.left>i||o.right<i||o.top>r||Math.min(o.bottom,a)<r)return!1;let l=t.posAtCoords({x:i,y:r},!1);return l>=e&&l<=n}function ile(t,e={}){let n=nt.define(),i=new WeakMap,r=Wn.define({create(){return[]},update(o,a){let l=i.get(o);if(o.length&&(e.hideOnChange&&(a.docChanged||a.selection)?o=[]:l&&l(a)?o=[]:e.hideOn&&(o=o.filter(u=>!e.hideOn(a,u)))),a.docChanged&&o.length){let u=[];for(let c of o){let h=a.changes.mapPos(c.pos,-1,xi.TrackDel);if(h!=null){let f=Object.assign(Object.create(null),c);f.pos=h,f.end!=null&&(f.end=a.changes.mapPos(f.end)),u.push(f)}}o=u}for(let u of a.effects)u.is(n)&&(o=u.value,l=void 0),(u.is(sle)&&!u.value||u.value==r)&&(o=[]);return o.length&&l&&i.set(o,l),o},provide:o=>$O.from(o)});const s=Ln.define(o=>new ele(o,t,r,i,n,e.hoverTime||300));return{active:r,extension:[r,s,ND.of(s),Jae]}}function rle(t,e,n,i={}){var r;let s=t.state.facet(ND).map(o=>t.plugin(o)).filter(o=>!!o);if(i.tooltip&&i.tooltip.active){let o=s.find(a=>a.field==i.tooltip.active);o&&(s=[o])}for(let o of s)o.activateHover(t,e,n,(r=i.until)!==null&&r!==void 0?r:(()=>!1))}function LD(t,e){let n=t.plugin(Ck);if(!n)return null;let i=n.manager.tooltips.indexOf(e);return i<0?null:n.manager.tooltipViews[i]}const sle=nt.define(),P9=Qe.define({combine(t){let e,n;for(let i of t)e=e||i.topContainer,n=n||i.bottomContainer;return{topContainer:e,bottomContainer:n}}});function kk(t,e){let n=t.plugin(DD),i=n?n.specs.indexOf(e):-1;return i>-1?n.panels[i]:null}const DD=Ln.fromClass(class{constructor(t){this.input=t.state.facet(cp),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(P9);this.top=new Sg(t,!0,e.topContainer),this.bottom=new Sg(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(P9);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Sg(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Sg(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(cp);if(n!=this.input){let i=n.filter(l=>l),r=[],s=[],o=[],a=[];for(let l of i){let u=this.specs.indexOf(l),c;u<0?(c=l(t.view),a.push(c)):(c=this.panels[u],c.update&&c.update(t)),r.push(c),(c.top?s:o).push(c)}this.specs=i,this.panels=r,this.top.sync(s),this.bottom.sync(o);for(let l of a)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let i of this.panels)i.update&&i.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>Se.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class Sg{constructor(e,n,i){this.view=e,this.top=n,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=A9(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=A9(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function A9(t){let e=t.nextSibling;return t.remove(),e}const cp=Qe.define({enables:DD});function ole(t,e){let n,i=new Promise(o=>n=o),r=o=>ale(o,e,n);t.state.field(Iv,!1)?t.dispatch({effects:QD.of(r)}):t.dispatch({effects:nt.appendConfig.of(Iv.init(()=>[r]))});let s=VD.of(r);return{close:s,result:i.then(o=>((t.win.queueMicrotask||(l=>t.win.setTimeout(l,10)))(()=>{t.state.field(Iv).indexOf(r)>-1&&t.dispatch({effects:s})}),o))}}const Iv=Wn.define({create(){return[]},update(t,e){for(let n of e.effects)n.is(QD)?t=[n.value].concat(t):n.is(VD)&&(t=t.filter(i=>i!=n.value));return t},provide:t=>cp.computeN([t],e=>e.field(t))}),QD=nt.define(),VD=nt.define();function ale(t,e,n){let i=e.content?e.content(t,()=>o(null)):null;if(!i){if(i=en("form"),e.input){let a=en("input",e.input);/^(text|password|number|email|tel|url)$/.test(a.type)&&a.classList.add("cm-textfield"),a.name||(a.name="input"),i.appendChild(en("label",(e.label||"")+": ",a))}else i.appendChild(document.createTextNode(e.label||""));i.appendChild(document.createTextNode(" ")),i.appendChild(en("button",{class:"cm-button",type:"submit"},e.submitLabel||"OK"))}let r=i.nodeName=="FORM"?[i]:i.querySelectorAll("form");for(let a=0;a<r.length;a++){let l=r[a];l.addEventListener("keydown",u=>{u.keyCode==27?(u.preventDefault(),o(null)):u.keyCode==13&&(u.preventDefault(),o(l))}),l.addEventListener("submit",u=>{u.preventDefault(),o(l)})}let s=en("div",i,en("button",{onclick:()=>o(null),"aria-label":t.state.phrase("close"),class:"cm-dialog-close",type:"button"},["×"]));e.class&&(s.className=e.class),s.classList.add("cm-dialog");function o(a){s.contains(s.ownerDocument.activeElement)&&t.focus(),n(a)}return{dom:s,top:e.top,mount:()=>{if(e.focus){let a;typeof e.focus=="string"?a=i.querySelector(e.focus):a=i.querySelector("input")||i.querySelector("button"),a&&"select"in a?a.select():a&&"focus"in a&&a.focus()}}}}class yo extends hl{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}yo.prototype.elementClass="";yo.prototype.toDOM=void 0;yo.prototype.mapMode=xi.TrackBefore;yo.prototype.startSide=yo.prototype.endSide=-1;yo.prototype.point=!0;const f0=Qe.define(),lle=Qe.define(),ule={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>vt.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},Od=Qe.define();function BD(t){return[FD(),Od.of({...ule,...t})]}const $9=Qe.define({combine:t=>t.some(e=>e)});function FD(t){return[cle]}const cle=Ln.fromClass(class{constructor(t){this.view=t,this.domAfter=null,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(Od).map(e=>new R9(t,e)),this.fixed=!t.state.facet($9);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,i=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(i<(n.to-n.from)*.8)}if(t.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet($9)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=vt.iter(this.view.state.facet(f0),this.view.viewport.from),i=[],r=this.gutters.map(s=>new hle(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(s.type)){let o=!0;for(let a of s.type)if(a.type==Si.Text&&o){N_(n,i,a.from);for(let l of r)l.line(this.view,a,i);o=!1}else if(a.widget)for(let l of r)l.widget(this.view,a)}else if(s.type==Si.Text){N_(n,i,s.from);for(let o of r)o.line(this.view,s,i)}else if(s.widget)for(let o of r)o.widget(this.view,s);for(let s of r)s.finish();t&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(t){let e=t.startState.facet(Od),n=t.state.facet(Od),i=t.docChanged||t.heightChanged||t.viewportChanged||!vt.eq(t.startState.facet(f0),t.state.facet(f0),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let r of this.gutters)r.update(t)&&(i=!0);else{i=!0;let r=[];for(let s of n){let o=e.indexOf(s);o<0?r.push(new R9(this.view,s)):(this.gutters[o].update(t),r.push(this.gutters[o]))}for(let s of this.gutters)s.dom.remove(),r.indexOf(s)<0&&s.destroy();for(let s of r)s.config.side=="after"?this.getDOMAfter().appendChild(s.dom):this.dom.appendChild(s.dom);this.gutters=r}return i}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:t=>Se.scrollMargins.of(e=>{let n=e.plugin(t);if(!n||n.gutters.length==0||!n.fixed)return null;let i=n.dom.offsetWidth*e.scaleX,r=n.domAfter?n.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==un.LTR?{left:i,right:r}:{right:i,left:r}})});function I9(t){return Array.isArray(t)?t:[t]}function N_(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class hle{constructor(e,n,i){this.gutter=e,this.height=i,this.i=0,this.cursor=vt.iter(e.markers,n.from)}addElement(e,n,i){let{gutter:r}=this,s=(n.top-this.height)/e.scaleY,o=n.height/e.scaleY;if(this.i==r.elements.length){let a=new jD(e,o,s,i);r.elements.push(a),r.dom.appendChild(a.dom)}else r.elements[this.i].update(e,o,s,i);this.height=n.bottom,this.i++}line(e,n,i){let r=[];N_(this.cursor,r,n.from),i.length&&(r=r.concat(i));let s=this.gutter.config.lineMarker(e,n,r);s&&r.unshift(s);let o=this.gutter;r.length==0&&!o.config.renderEmptyElements||this.addElement(e,n,r)}widget(e,n){let i=this.gutter.config.widgetMarker(e,n.widget,n),r=i?[i]:null;for(let s of e.state.facet(lle)){let o=s(e,n.widget,n);o&&(r||(r=[])).push(o)}r&&this.addElement(e,n,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class R9{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in n.domEventHandlers)this.dom.addEventListener(i,r=>{let s=r.target,o;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let l=s.getBoundingClientRect();o=(l.top+l.bottom)/2}else o=r.clientY;let a=e.lineBlockAtHeight(o-e.documentTop);n.domEventHandlers[i](e,a,r)&&r.preventDefault()});this.markers=I9(n.markers(e)),n.initialSpacer&&(this.spacer=new jD(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=I9(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let r=this.config.updateSpacer(this.spacer.markers[0],e);r!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[r])}let i=e.view.viewport;return!vt.eq(this.markers,n,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class jD{constructor(e,n,i,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,i,r)}update(e,n,i,r){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),fle(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,n){let i="cm-gutterElement",r=this.dom.firstChild;for(let s=0,o=0;;){let a=o,l=s<n.length?n[s++]:null,u=!1;if(l){let c=l.elementClass;c&&(i+=" "+c);for(let h=o;h<this.markers.length;h++)if(this.markers[h].compare(l)){a=h,u=!0;break}}else a=this.markers.length;for(;o<a;){let c=this.markers[o++];if(c.toDOM){c.destroy(r);let h=r.nextSibling;r.remove(),r=h}}if(!l)break;l.toDOM&&(u?r=r.nextSibling:this.dom.insertBefore(l.toDOM(e),r)),u&&o++}this.dom.className=i,this.markers=n}destroy(){this.setMarkers(null,[])}}function fle(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].compare(e[n]))return!1;return!0}const dle=Qe.define(),ple=Qe.define(),wc=Qe.define({combine(t){return wo(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,n){let i=Object.assign({},e);for(let r in n){let s=i[r],o=n[r];i[r]=s?(a,l,u)=>s(a,l,u)||o(a,l,u):o}return i}})}});class Rv extends yo{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Mv(t,e){return t.state.facet(wc).formatNumber(e,t.state)}const mle=Od.compute([wc],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(dle)},lineMarker(e,n,i){return i.some(r=>r.toDOM)?null:new Rv(Mv(e,e.state.doc.lineAt(n.from).number))},widgetMarker:(e,n,i)=>{for(let r of e.state.facet(ple)){let s=r(e,n,i);if(s)return s}return null},lineMarkerChange:e=>e.startState.facet(wc)!=e.state.facet(wc),initialSpacer(e){return new Rv(Mv(e,M9(e.state.doc.lines)))},updateSpacer(e,n){let i=Mv(n.view,M9(n.view.state.doc.lines));return i==e.number?e:new Rv(i)},domEventHandlers:t.facet(wc).domEventHandlers,side:"before"}));function Ek(t={}){return[wc.of(t),FD(),mle]}function M9(t){let e=9;for(;e<t;)e=e*10+9;return e}const gle=new class extends yo{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},Ole=f0.compute(["selection"],t=>{let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.head).from;r>n&&(n=r,e.push(gle.range(r)))}return vt.of(e)});function xle(){return Ole}let yle=0;class wr{constructor(e,n,i,r){this.name=e,this.set=n,this.base=i,this.modified=r,this.id=yle++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let i=typeof e=="string"?e:"?";if(e instanceof wr&&(n=e),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let r=new wr(i,[],null,[]);if(r.set.push(r),n)for(let s of n.set)r.set.push(s);return r}static defineModifier(e){let n=new IO(e);return i=>i.modified.indexOf(n)>-1?i:IO.get(i.base||i,i.modified.concat(n).sort((r,s)=>r.id-s.id))}}let vle=0;class IO{constructor(e){this.name=e,this.instances=[],this.id=vle++}static get(e,n){if(!n.length)return e;let i=n[0].instances.find(a=>a.base==e&&ble(n,a.modified));if(i)return i;let r=[],s=new wr(e.name,r,e,n);for(let a of n)a.instances.push(s);let o=Sle(n);for(let a of e.set)if(!a.modified.length)for(let l of o)r.push(IO.get(a,l));return s}}function ble(t,e){return t.length==e.length&&t.every((n,i)=>n==e[i])}function Sle(t){let e=[[]];for(let n=0;n<t.length;n++)for(let i=0,r=e.length;i<r;i++)e.push(e[i].concat(t[n]));return e.sort((n,i)=>i.length-n.length)}function ff(t){let e=Object.create(null);for(let n in t){let i=t[n];Array.isArray(i)||(i=[i]);for(let r of n.split(" "))if(r){let s=[],o=2,a=r;for(let h=0;;){if(a=="..."&&h>0&&h+3==r.length){o=1;break}let f=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!f)throw new RangeError("Invalid path: "+r);if(s.push(f[0]=="*"?"":f[0][0]=='"'?JSON.parse(f[0]):f[0]),h+=f[0].length,h==r.length)break;let p=r[h++];if(h==r.length&&p=="!"){o=0;break}if(p!="/")throw new RangeError("Invalid path: "+r);a=r.slice(h)}let l=s.length-1,u=s[l];if(!u)throw new RangeError("Invalid path: "+r);let c=new hp(i,o,l>0?s.slice(0,l):null);e[u]=c.sort(e[u])}}return ZD.add(e)}const ZD=new ot({combine(t,e){let n,i,r;for(;t||e;){if(!t||e&&t.depth>=e.depth?(r=e,e=e.next):(r=t,t=t.next),n&&n.mode==r.mode&&!r.context&&!n.context)continue;let s=new hp(r.tags,r.mode,r.context);n?n.next=s:i=s,n=s}return i}});class hp{constructor(e,n,i,r){this.tags=e,this.mode=n,this.context=i,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}hp.empty=new hp([],2,null);function zD(t,e){let n=Object.create(null);for(let s of t)if(!Array.isArray(s.tag))n[s.tag.id]=s.class;else for(let o of s.tag)n[o.id]=s.class;let{scope:i,all:r=null}=e||{};return{style:s=>{let o=r;for(let a of s)for(let l of a.set){let u=n[l.id];if(u){o=o?o+" "+u:u;break}}return o},scope:i}}function _le(t,e){let n=null;for(let i of t){let r=i.style(e);r&&(n=n?n+" "+r:r)}return n}function Cle(t,e,n,i=0,r=t.length){let s=new wle(i,Array.isArray(e)?e:[e],n);s.highlightRange(t.cursor(),i,r,"",s.highlighters),s.flush(r)}class wle{constructor(e,n,i){this.at=e,this.highlighters=n,this.span=i,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,i,r,s){let{type:o,from:a,to:l}=e;if(a>=i||l<=n)return;o.isTop&&(s=this.highlighters.filter(p=>!p.scope||p.scope(o)));let u=r,c=kle(e)||hp.empty,h=_le(s,c.tags);if(h&&(u&&(u+=" "),u+=h,c.mode==1&&(r+=(r?" ":"")+h)),this.startSpan(Math.max(n,a),u),c.opaque)return;let f=e.tree&&e.tree.prop(ot.mounted);if(f&&f.overlay){let p=e.node.enter(f.overlay[0].from+a,1),m=this.highlighters.filter(x=>!x.scope||x.scope(f.tree.type)),g=e.firstChild();for(let x=0,y=a;;x++){let S=x<f.overlay.length?f.overlay[x]:null,_=S?S.from+a:l,k=Math.max(n,y),w=Math.min(i,_);if(k<w&&g)for(;e.from<w&&(this.highlightRange(e,k,w,r,s),this.startSpan(Math.min(w,e.to),u),!(e.to>=_||!e.nextSibling())););if(!S||_>i)break;y=S.to+a,y>n&&(this.highlightRange(p.cursor(),Math.max(n,S.from+a),Math.min(i,y),"",m),this.startSpan(Math.min(i,y),u))}g&&e.parent()}else if(e.firstChild()){f&&(r="");do if(!(e.to<=n)){if(e.from>=i)break;this.highlightRange(e,n,i,r,s),this.startSpan(Math.min(i,e.to),u)}while(e.nextSibling());e.parent()}}}function kle(t){let e=t.type.prop(ZD);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const Ne=wr.define,_g=Ne(),Pa=Ne(),N9=Ne(Pa),L9=Ne(Pa),Aa=Ne(),Cg=Ne(Aa),Nv=Ne(Aa),Ys=Ne(),Ql=Ne(Ys),Us=Ne(),qs=Ne(),L_=Ne(),Nf=Ne(L_),wg=Ne(),Q={comment:_g,lineComment:Ne(_g),blockComment:Ne(_g),docComment:Ne(_g),name:Pa,variableName:Ne(Pa),typeName:N9,tagName:Ne(N9),propertyName:L9,attributeName:Ne(L9),className:Ne(Pa),labelName:Ne(Pa),namespace:Ne(Pa),macroName:Ne(Pa),literal:Aa,string:Cg,docString:Ne(Cg),character:Ne(Cg),attributeValue:Ne(Cg),number:Nv,integer:Ne(Nv),float:Ne(Nv),bool:Ne(Aa),regexp:Ne(Aa),escape:Ne(Aa),color:Ne(Aa),url:Ne(Aa),keyword:Us,self:Ne(Us),null:Ne(Us),atom:Ne(Us),unit:Ne(Us),modifier:Ne(Us),operatorKeyword:Ne(Us),controlKeyword:Ne(Us),definitionKeyword:Ne(Us),moduleKeyword:Ne(Us),operator:qs,derefOperator:Ne(qs),arithmeticOperator:Ne(qs),logicOperator:Ne(qs),bitwiseOperator:Ne(qs),compareOperator:Ne(qs),updateOperator:Ne(qs),definitionOperator:Ne(qs),typeOperator:Ne(qs),controlOperator:Ne(qs),punctuation:L_,separator:Ne(L_),bracket:Nf,angleBracket:Ne(Nf),squareBracket:Ne(Nf),paren:Ne(Nf),brace:Ne(Nf),content:Ys,heading:Ql,heading1:Ne(Ql),heading2:Ne(Ql),heading3:Ne(Ql),heading4:Ne(Ql),heading5:Ne(Ql),heading6:Ne(Ql),contentSeparator:Ne(Ys),list:Ne(Ys),quote:Ne(Ys),emphasis:Ne(Ys),strong:Ne(Ys),link:Ne(Ys),monospace:Ne(Ys),strikethrough:Ne(Ys),inserted:Ne(),deleted:Ne(),changed:Ne(),invalid:Ne(),meta:wg,documentMeta:Ne(wg),annotation:Ne(wg),processingInstruction:Ne(wg),definition:wr.defineModifier("definition"),constant:wr.defineModifier("constant"),function:wr.defineModifier("function"),standard:wr.defineModifier("standard"),local:wr.defineModifier("local"),special:wr.defineModifier("special")};for(let t in Q){let e=Q[t];e instanceof wr&&(e.name=t)}zD([{tag:Q.link,class:"tok-link"},{tag:Q.heading,class:"tok-heading"},{tag:Q.emphasis,class:"tok-emphasis"},{tag:Q.strong,class:"tok-strong"},{tag:Q.keyword,class:"tok-keyword"},{tag:Q.atom,class:"tok-atom"},{tag:Q.bool,class:"tok-bool"},{tag:Q.url,class:"tok-url"},{tag:Q.labelName,class:"tok-labelName"},{tag:Q.inserted,class:"tok-inserted"},{tag:Q.deleted,class:"tok-deleted"},{tag:Q.literal,class:"tok-literal"},{tag:Q.string,class:"tok-string"},{tag:Q.number,class:"tok-number"},{tag:[Q.regexp,Q.escape,Q.special(Q.string)],class:"tok-string2"},{tag:Q.variableName,class:"tok-variableName"},{tag:Q.local(Q.variableName),class:"tok-variableName tok-local"},{tag:Q.definition(Q.variableName),class:"tok-variableName tok-definition"},{tag:Q.special(Q.variableName),class:"tok-variableName2"},{tag:Q.definition(Q.propertyName),class:"tok-propertyName tok-definition"},{tag:Q.typeName,class:"tok-typeName"},{tag:Q.namespace,class:"tok-namespace"},{tag:Q.className,class:"tok-className"},{tag:Q.macroName,class:"tok-macroName"},{tag:Q.propertyName,class:"tok-propertyName"},{tag:Q.operator,class:"tok-operator"},{tag:Q.comment,class:"tok-comment"},{tag:Q.meta,class:"tok-meta"},{tag:Q.invalid,class:"tok-invalid"},{tag:Q.punctuation,class:"tok-punctuation"}]);var Lv;const Fa=new ot;function $x(t){return Qe.define({combine:t?e=>e.concat(t):void 0})}const Tk=new ot;class Er{constructor(e,n,i=[],r=""){this.data=e,this.name=r,mt.prototype.hasOwnProperty("tree")||Object.defineProperty(mt.prototype,"tree",{get(){return sn(this)}}),this.parser=n,this.extension=[pl.of(this),mt.languageData.of((s,o,a)=>{let l=D9(s,o,a),u=l.type.prop(Fa);if(!u)return[];let c=s.facet(u),h=l.type.prop(Tk);if(h){let f=l.resolve(o-l.from,a);for(let p of h)if(p.test(f,s)){let m=s.facet(p.facet);return p.type=="replace"?m:m.concat(c)}}return c})].concat(i)}isActiveAt(e,n,i=-1){return D9(e,n,i).type.prop(Fa)==this.data}findRegions(e){let n=e.facet(pl);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let i=[],r=(s,o)=>{if(s.prop(Fa)==this.data){i.push({from:o,to:o+s.length});return}let a=s.prop(ot.mounted);if(a){if(a.tree.prop(Fa)==this.data){if(a.overlay)for(let l of a.overlay)i.push({from:l.from+o,to:l.to+o});else i.push({from:o,to:o+s.length});return}else if(a.overlay){let l=i.length;if(r(a.tree,a.overlay[0].from+o),i.length>l)return}}for(let l=0;l<s.children.length;l++){let u=s.children[l];u instanceof bt&&r(u,s.positions[l]+o)}};return r(sn(e),0),i}get allowsNesting(){return!0}}Er.setState=nt.define();function D9(t,e,n){let i=t.facet(pl),r=sn(t).topNode;if(!i||i.allowsNesting)for(let s=r;s;s=s.enter(e,n,Xt.ExcludeBuffers|Xt.EnterBracketed))s.type.isTop&&(r=s);return r}class gh extends Er{constructor(e,n,i){super(e,n,[],i),this.parser=n}static define(e){let n=$x(e.languageData);return new gh(n,e.parser.configure({props:[Fa.add(i=>i.isTop?n:void 0)]}),e.name)}configure(e,n){return new gh(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function sn(t){let e=t.field(Er.state,!1);return e?e.tree:bt.empty}class Ele{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let i=this.cursorPos-this.string.length;return e<i||n>=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-i,n-i)}}let Lf=null;class Au{constructor(e,n,i=[],r,s,o,a,l){this.parser=e,this.state=n,this.fragments=i,this.tree=r,this.treeLen=s,this.viewport=o,this.skipped=a,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,n,i){return new Au(e,n,[],bt.empty,0,i,[],null)}startParse(){return this.parser.startParse(new Ele(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=bt.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let r=Date.now()+e;e=()=>Date.now()>r}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let r=this.parse.advance();if(r)if(this.fragments=this.withoutTempSkipped(qo.addTree(r,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(i=this.parse.stoppedAt)!==null&&i!==void 0?i:this.state.doc.length,this.tree=r,this.parse=null,this.treeLen<(n??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,n;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(qo.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=Lf;Lf=this;try{return e()}finally{Lf=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=Q9(e,n.from,n.to);return e}changes(e,n){let{fragments:i,tree:r,treeLen:s,viewport:o,skipped:a}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((u,c,h,f)=>l.push({fromA:u,toA:c,fromB:h,toB:f})),i=qo.applyChanges(i,l),r=bt.empty,s=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){a=[];for(let u of this.skipped){let c=e.mapPos(u.from,1),h=e.mapPos(u.to,-1);c<h&&a.push({from:c,to:h})}}}return new Au(this.parser,n,i,r,s,o,a,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let n=this.skipped.length;for(let i=0;i<this.skipped.length;i++){let{from:r,to:s}=this.skipped[i];r<e.to&&s>e.from&&(this.fragments=Q9(this.fragments,r,s),this.skipped.splice(i--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends Cx{createParse(n,i,r){let s=r[0].from,o=r[r.length-1].to;return{parsedPos:s,advance(){let l=Lf;if(l){for(let u of r)l.tempSkipped.push(u);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=o,new bt(Xn.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return Lf}}function Q9(t,e,n){return qo.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class Oh{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,i)||n.takeTree(),new Oh(n)}static init(e){let n=Math.min(3e3,e.doc.length),i=Au.create(e.facet(pl).parser,e,{from:0,to:n});return i.work(20,n)||i.takeTree(),new Oh(i)}}Er.state=Wn.define({create:Oh.init,update(t,e){for(let n of e.effects)if(n.is(Er.setState))return n.value;return e.startState.facet(pl)!=e.state.facet(pl)?Oh.init(e.state):t.apply(e)}});let XD=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(XD=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const Dv=typeof navigator<"u"&&(!((Lv=navigator.scheduling)===null||Lv===void 0)&&Lv.isInputPending)?()=>navigator.scheduling.isInputPending():null,Tle=Ln.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(Er.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(Er.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=XD(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:i,viewport:{to:r}}=this.view,s=i.field(Er.state);if(s.tree==s.context.tree&&s.context.isDone(r+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!Dv?Math.max(25,e.timeRemaining()-5):1e9),a=s.context.treeLen<r&&i.doc.length>r+1e3,l=s.context.work(()=>Dv&&Dv()||Date.now()>o,r+(a?0:1e5));this.chunkBudget-=Date.now()-n,(l||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:Er.setState.of(new Oh(s.context))})),this.chunkBudget>0&&!(l&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>sr(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),pl=Qe.define({combine(t){return t.length?t[0]:null},enables:t=>[Er.state,Tle,Se.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class xh{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}class oe{constructor(e,n,i,r,s,o=void 0){this.name=e,this.alias=n,this.extensions=i,this.filename=r,this.loadFunc=s,this.support=o,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(e=>this.support=e,e=>{throw this.loading=null,e}))}static of(e){let{load:n,support:i}=e;if(!n){if(!i)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");n=()=>Promise.resolve(i)}return new oe(e.name,(e.alias||[]).concat(e.name).map(r=>r.toLowerCase()),e.extensions||[],e.filename,n,i)}static matchFilename(e,n){for(let r of e)if(r.filename&&r.filename.test(n))return r;let i=/\.([^.]+)$/.exec(n);if(i){for(let r of e)if(r.extensions.indexOf(i[1])>-1)return r}return null}static matchLanguageName(e,n,i=!0){n=n.toLowerCase();for(let r of e)if(r.alias.some(s=>s==n))return r;if(i)for(let r of e)for(let s of r.alias){let o=n.indexOf(s);if(o>-1&&(s.length>2||!/\w/.test(n[o-1])&&!/\w/.test(n[o+s.length])))return r}return null}}const Ple=Qe.define(),bm=Qe.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function $u(t){let e=t.facet(bm);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function fp(t,e){let n="",i=t.tabSize,r=t.facet(bm)[0];if(r==" "){for(;e>=i;)n+=" ",e-=i;r=" "}for(let s=0;s<e;s++)n+=r;return n}function Pk(t,e){t instanceof mt&&(t=new Ix(t));for(let i of t.state.facet(Ple)){let r=i(t,e);if(r!==void 0)return r}let n=sn(t.state);return n.length>=e?Ale(t,n,e):null}class Ix{constructor(e,n={}){this.state=e,this.options=n,this.unit=$u(e)}lineAt(e,n=1){let i=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:s}=this.options;return r!=null&&r>=i.from&&r<=i.to?s&&r==e?{text:"",from:e}:(n<0?r<e:r<=e)?{text:i.text.slice(r-i.from),from:r}:{text:i.text.slice(0,r-i.from),from:i.from}:i}textAfterPos(e,n=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:i,from:r}=this.lineAt(e,n);return i.slice(e-r,Math.min(i.length,e+100-r))}column(e,n=1){let{text:i,from:r}=this.lineAt(e,n),s=this.countColumn(i,e-r),o=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return o>-1&&(s+=o-this.countColumn(i,i.search(/\S|$/))),s}countColumn(e,n=e.length){return Ns(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:i,from:r}=this.lineAt(e,n),s=this.options.overrideIndentation;if(s){let o=s(r);if(o>-1)return o}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const df=new ot;function Ale(t,e,n){let i=e.resolveStack(n),r=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(r!=i.node){let s=[];for(let o=r;o&&!(o.from<i.node.from||o.to>i.node.to||o.from==i.node.from&&o.type==i.node.type);o=o.parent)s.push(o);for(let o=s.length-1;o>=0;o--)i={node:s[o],next:i}}return WD(i,t,n)}function WD(t,e,n){for(let i=t;i;i=i.next){let r=Ile(i.node);if(r)return r(Ak.create(e,n,i))}return 0}function $le(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function Ile(t){let e=t.type.prop(df);if(e)return e;let n=t.firstChild,i;if(n&&(i=n.type.prop(ot.closedBy))){let r=t.lastChild,s=r&&i.indexOf(r.name)>-1;return o=>HD(o,!0,1,void 0,s&&!$le(o)?r.from:void 0)}return t.parent==null?Rle:null}function Rle(){return 0}class Ak extends Ix{constructor(e,n,i){super(e.state,e.options),this.base=e,this.pos=n,this.context=i}get node(){return this.context.node}static create(e,n,i){return new Ak(e,n,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let i=e.resolve(n.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(Mle(i,e))break;n=this.state.doc.lineAt(i.from)}return this.lineIndent(n.from)}continue(){return WD(this.context.next,this.base,this.pos)}}function Mle(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function Nle(t){let e=t.node,n=e.childAfter(e.from),i=e.lastChild;if(!n)return null;let r=t.options.simulateBreak,s=t.state.doc.lineAt(n.from),o=r==null||r<=s.from?s.to:Math.min(s.to,r);for(let a=n.to;;){let l=e.childAfter(a);if(!l||l==i)return null;if(!l.type.isSkipped){if(l.from>=o)return null;let u=/^ */.exec(s.text.slice(n.to-s.from))[0].length;return{from:n.from,to:n.to+u}}a=l.to}}function Lle({closing:t,align:e=!0,units:n=1}){return i=>HD(i,e,n,t)}function HD(t,e,n,i,r){let s=t.textAfter,o=s.match(/^\s*/)[0].length,a=i&&s.slice(o,o+i.length)==i||r==t.pos+o,l=e?Nle(t):null;return l?a?t.column(l.from):t.column(l.to):t.baseIndent+(a?0:t.unit*n)}const Dle=t=>t.baseIndent;function d0({except:t,units:e=1}={}){return n=>{let i=t&&t.test(n.textAfter);return n.baseIndent+(i?0:e*n.unit)}}const Qle=200;function Vle(){return mt.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:i}=t.newSelection.main,r=n.lineAt(i);if(i>r.from+Qle)return t;let s=n.sliceString(r.from,i);if(!e.some(u=>u.test(s)))return t;let{state:o}=t,a=-1,l=[];for(let{head:u}of o.selection.ranges){let c=o.doc.lineAt(u);if(c.from==a)continue;a=c.from;let h=Pk(o,c.from);if(h==null)continue;let f=/^\s*/.exec(c.text)[0],p=fp(o,h);f!=p&&l.push({from:c.from,to:c.from+f.length,insert:p})}return l.length?[t,{changes:l,sequential:!0}]:t})}const UD=Qe.define(),pf=new ot;function qD(t){let e=t.firstChild,n=t.lastChild;return e&&e.to<n.from?{from:e.to,to:n.type.isError?t.to:n.from}:null}function Ble(t,e,n){let i=sn(t);if(i.length<n)return null;let r=i.resolveStack(n,1),s=null;for(let o=r;o;o=o.next){let a=o.node;if(a.to<=n||a.from>n)continue;if(s&&a.from<e)break;let l=a.type.prop(pf);if(l&&(a.to<i.length-50||i.length==t.doc.length||!Fle(a))){let u=l(a,t);u&&u.from<=n&&u.from>=e&&u.to>n&&(s=u)}}return s}function Fle(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function RO(t,e,n){for(let i of t.facet(UD)){let r=i(t,e,n);if(r)return r}return Ble(t,e,n)}function YD(t,e){let n=e.mapPos(t.from,1),i=e.mapPos(t.to,-1);return n>=i?void 0:{from:n,to:i}}const Rx=nt.define({map:YD}),Sm=nt.define({map:YD});function GD(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(i=>i.from<=n&&i.to>=n)||e.push(t.lineBlockAt(n));return e}const Iu=Wn.define({create(){return Xe.none},update(t,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((i,r)=>t=V9(t,i,r)),t=t.map(e.changes);let n=[];for(let i of e.effects)i.is(Rx)&&!jle(t,i.value.from,i.value.to)?n.push(i.value):i.is(Sm)&&(t=t.update({filter:(r,s)=>i.value.from!=r||i.value.to!=s,filterFrom:i.value.from,filterTo:i.value.to}));if(n.length){let{preparePlaceholder:i}=e.state.facet(eQ),r=n.map(s=>(i?Xe.replace({widget:new qle(i(e.state,s))}):B9).range(s.from,s.to));t=t.update({add:r})}return e.selection&&(t=V9(t,e.selection.main.head)),t},provide:t=>Se.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(i,r)=>{n.push(i,r)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n<t.length;){let i=t[n++],r=t[n++];if(typeof i!="number"||typeof r!="number")throw new RangeError("Invalid JSON for fold state");e.push(B9.range(i,r))}return Xe.set(e,!0)}});function V9(t,e,n=e){let i=!1;return t.between(e,n,(r,s)=>{r<n&&s>e&&(i=!0)}),i?t.update({filterFrom:e,filterTo:n,filter:(r,s)=>r>=n||s<=e}):t}function MO(t,e,n){var i;let r=null;return(i=t.field(Iu,!1))===null||i===void 0||i.between(e,n,(s,o)=>{(!r||r.from>s)&&(r={from:s,to:o})}),r}function jle(t,e,n){let i=!1;return t.between(e,e,(r,s)=>{r==e&&s==n&&(i=!0)}),i}function KD(t,e){return t.field(Iu,!1)?e:e.concat(nt.appendConfig.of(tQ()))}const Zle=t=>{for(let e of GD(t)){let n=RO(t.state,e.from,e.to);if(n)return t.dispatch({effects:KD(t.state,[Rx.of(n),JD(t,n)])}),!0}return!1},zle=t=>{if(!t.state.field(Iu,!1))return!1;let e=[];for(let n of GD(t)){let i=MO(t.state,n.from,n.to);i&&e.push(Sm.of(i),JD(t,i,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function JD(t,e,n=!0){let i=t.state.doc.lineAt(e.from).number,r=t.state.doc.lineAt(e.to).number;return Se.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${i} ${t.state.phrase("to")} ${r}.`)}const Xle=t=>{let{state:e}=t,n=[];for(let i=0;i<e.doc.length;){let r=t.lineBlockAt(i),s=RO(e,r.from,r.to);s&&n.push(Rx.of(s)),i=(s?t.lineBlockAt(s.to):r).to+1}return n.length&&t.dispatch({effects:KD(t.state,n)}),!!n.length},Wle=t=>{let e=t.state.field(Iu,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(i,r)=>{n.push(Sm.of({from:i,to:r}))}),t.dispatch({effects:n}),!0},Hle=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:Zle},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:zle},{key:"Ctrl-Alt-[",run:Xle},{key:"Ctrl-Alt-]",run:Wle}],Ule={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},eQ=Qe.define({combine(t){return wo(t,Ule)}});function tQ(t){return[Iu,Kle]}function nQ(t,e){let{state:n}=t,i=n.facet(eQ),r=o=>{let a=t.lineBlockAt(t.posAtDOM(o.target)),l=MO(t.state,a.from,a.to);l&&t.dispatch({effects:Sm.of(l)}),o.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(t,r,e);let s=document.createElement("span");return s.textContent=i.placeholderText,s.setAttribute("aria-label",n.phrase("folded code")),s.title=n.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=r,s}const B9=Xe.replace({widget:new class extends ds{toDOM(t){return nQ(t,null)}}});class qle extends ds{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return nQ(e,this.value)}}const Yle={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Qv extends yo{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function Gle(t={}){let e={...Yle,...t},n=new Qv(e,!0),i=new Qv(e,!1),r=Ln.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(pl)!=o.state.facet(pl)||o.startState.field(Iu,!1)!=o.state.field(Iu,!1)||sn(o.startState)!=sn(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let a=new dr;for(let l of o.viewportLineBlocks){let u=MO(o.state,l.from,l.to)?i:RO(o.state,l.from,l.to)?n:null;u&&a.add(l.from,l.from,u)}return a.finish()}}),{domEventHandlers:s}=e;return[r,BD({class:"cm-foldGutter",markers(o){var a;return((a=o.plugin(r))===null||a===void 0?void 0:a.markers)||vt.empty},initialSpacer(){return new Qv(e,!1)},domEventHandlers:{...s,click:(o,a,l)=>{if(s.click&&s.click(o,a,l))return!0;let u=MO(o.state,a.from,a.to);if(u)return o.dispatch({effects:Sm.of(u)}),!0;let c=RO(o.state,a.from,a.to);return c?(o.dispatch({effects:Rx.of(c)}),!0):!1}}}),tQ()]}const Kle=Se.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class _m{constructor(e,n){this.specs=e;let i;function r(a){let l=ua.newName();return(i||(i=Object.create(null)))["."+l]=a,l}const s=typeof n.all=="string"?n.all:n.all?r(n.all):void 0,o=n.scope;this.scope=o instanceof Er?a=>a.prop(Fa)==o.data:o?a=>a==o:void 0,this.style=zD(e.map(a=>({tag:a.tag,class:a.class||r(Object.assign({},a,{tag:null}))})),{all:s}).style,this.module=i?new ua(i):null,this.themeType=n.themeType}static define(e,n){return new _m(e,n||{})}}const D_=Qe.define(),iQ=Qe.define({combine(t){return t.length?[t[0]]:null}});function Vv(t){let e=t.facet(D_);return e.length?e:t.facet(iQ)}function rQ(t,e){let n=[eue],i;return t instanceof _m&&(t.module&&n.push(Se.styleModule.of(t.module)),i=t.themeType),e!=null&&e.fallback?n.push(iQ.of(t)):i?n.push(D_.computeN([Se.darkTheme],r=>r.facet(Se.darkTheme)==(i=="dark")?[t]:[])):n.push(D_.of(t)),n}class Jle{constructor(e){this.markCache=Object.create(null),this.tree=sn(e.state),this.decorations=this.buildDeco(e,Vv(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=sn(e.state),i=Vv(e.state),r=i!=Vv(e.startState),{viewport:s}=e.view,o=e.changes.mapPos(this.decoratedTo,1);n.length<s.to&&!r&&n.type==this.tree.type&&o>=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(n!=this.tree||e.viewportChanged||r)&&(this.tree=n,this.decorations=this.buildDeco(e.view,i),this.decoratedTo=s.to)}buildDeco(e,n){if(!n||!this.tree.length)return Xe.none;let i=new dr;for(let{from:r,to:s}of e.visibleRanges)Cle(this.tree,n,(o,a,l)=>{i.add(o,a,this.markCache[l]||(this.markCache[l]=Xe.mark({class:l})))},r,s);return i.finish()}}const eue=js.high(Ln.fromClass(Jle,{decorations:t=>t.decorations})),tue=_m.define([{tag:Q.meta,color:"#404740"},{tag:Q.link,textDecoration:"underline"},{tag:Q.heading,textDecoration:"underline",fontWeight:"bold"},{tag:Q.emphasis,fontStyle:"italic"},{tag:Q.strong,fontWeight:"bold"},{tag:Q.strikethrough,textDecoration:"line-through"},{tag:Q.keyword,color:"#708"},{tag:[Q.atom,Q.bool,Q.url,Q.contentSeparator,Q.labelName],color:"#219"},{tag:[Q.literal,Q.inserted],color:"#164"},{tag:[Q.string,Q.deleted],color:"#a11"},{tag:[Q.regexp,Q.escape,Q.special(Q.string)],color:"#e40"},{tag:Q.definition(Q.variableName),color:"#00f"},{tag:Q.local(Q.variableName),color:"#30a"},{tag:[Q.typeName,Q.namespace],color:"#085"},{tag:Q.className,color:"#167"},{tag:[Q.special(Q.variableName),Q.macroName],color:"#256"},{tag:Q.definition(Q.propertyName),color:"#00c"},{tag:Q.comment,color:"#940"},{tag:Q.invalid,color:"#f00"}]),nue=Se.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),sQ=1e4,oQ="()[]{}",aQ=Qe.define({combine(t){return wo(t,{afterCursor:!0,brackets:oQ,maxScanDistance:sQ,renderMatch:sue})}}),iue=Xe.mark({class:"cm-matchingBracket"}),rue=Xe.mark({class:"cm-nonmatchingBracket"});function sue(t){let e=[],n=t.matched?iue:rue;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}function F9(t){let e=[],n=t.facet(aQ);for(let i of t.selection.ranges){if(!i.empty)continue;let r=oo(t,i.head,-1,n)||i.head>0&&oo(t,i.head-1,1,n)||n.afterCursor&&(oo(t,i.head,1,n)||i.head<t.doc.length&&oo(t,i.head+1,-1,n));r&&(e=e.concat(n.renderMatch(r,t)))}return Xe.set(e,!0)}const oue=Ln.fromClass(class{constructor(t){this.paused=!1,this.decorations=F9(t.state)}update(t){(t.docChanged||t.selectionSet||this.paused)&&(t.view.composing?(this.decorations=this.decorations.map(t.changes),this.paused=!0):(this.decorations=F9(t.state),this.paused=!1))}},{decorations:t=>t.decorations}),aue=[oue,nue];function lue(t={}){return[aQ.of(t),aue]}const lQ=new ot;function Q_(t,e,n){let i=t.prop(e<0?ot.openedBy:ot.closedBy);if(i)return i;if(t.name.length==1){let r=n.indexOf(t.name);if(r>-1&&r%2==(e<0?1:0))return[n[r+e]]}return null}function V_(t){let e=t.type.prop(lQ);return e?e(t.node):t}function oo(t,e,n,i={}){let r=i.maxScanDistance||sQ,s=i.brackets||oQ,o=sn(t),a=o.resolveInner(e,n);for(let l=a;l;l=l.parent){let u=Q_(l.type,n,s);if(u&&l.from<l.to){let c=V_(l);if(c&&(n>0?e>=c.from&&e<c.to:e>c.from&&e<=c.to))return uue(t,e,n,l,c,u,s)}}return cue(t,e,n,o,a.type,r,s)}function uue(t,e,n,i,r,s,o){let a=i.parent,l={from:r.from,to:r.to},u=0,c=a==null?void 0:a.cursor();if(c&&(n<0?c.childBefore(i.from):c.childAfter(i.to)))do if(n<0?c.to<=i.from:c.from>=i.to){if(u==0&&s.indexOf(c.type.name)>-1&&c.from<c.to){let h=V_(c);return{start:l,end:h?{from:h.from,to:h.to}:void 0,matched:!0}}else if(Q_(c.type,n,o))u++;else if(Q_(c.type,-n,o)){if(u==0){let h=V_(c);return{start:l,end:h&&h.from<h.to?{from:h.from,to:h.to}:void 0,matched:!1}}u--}}while(n<0?c.prevSibling():c.nextSibling());return{start:l,matched:!1}}function cue(t,e,n,i,r,s,o){if(n<0?!e:e==t.doc.length)return null;let a=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),l=o.indexOf(a);if(l<0||l%2==0!=n>0)return null;let u={from:n<0?e-1:e,to:n>0?e+1:e},c=t.doc.iterRange(e,n>0?t.doc.length:0),h=0;for(let f=0;!c.next().done&&f<=s;){let p=c.value;n<0&&(f+=p.length);let m=e+f*n;for(let g=n>0?0:p.length-1,x=n>0?p.length:-1;g!=x;g+=n){let y=o.indexOf(p[g]);if(!(y<0||i.resolveInner(m+g,1).type!=r))if(y%2==0==n>0)h++;else{if(h==1)return{start:u,end:{from:m+g,to:m+g+1},matched:y>>1==l>>1};h--}}n>0&&(f+=p.length)}return c.done?{start:u,matched:!1}:null}function j9(t,e,n,i=0,r=0){e==null&&(e=t.search(/[^\s\u00a0]/),e==-1&&(e=t.length));let s=r;for(let o=i;o<e;o++)t.charCodeAt(o)==9?s+=n-s%n:s++;return s}class uQ{constructor(e,n,i,r){this.string=e,this.tabSize=n,this.indentUnit=i,this.overrideIndent=r,this.pos=0,this.start=0,this.lastColumnPos=0,this.lastColumnValue=0}eol(){return this.pos>=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)}eat(e){let n=this.string.charAt(this.pos),i;if(typeof e=="string"?i=n==e:i=n&&(e instanceof RegExp?e.test(n):e(n)),i)return++this.pos,n}eatWhile(e){let n=this.pos;for(;this.eat(e););return this.pos>n}eatSpace(){let e=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e}skipToEnd(){this.pos=this.string.length}skipTo(e){let n=this.string.indexOf(e,this.pos);if(n>-1)return this.pos=n,!0}backUp(e){this.pos-=e}column(){return this.lastColumnPos<this.start&&(this.lastColumnValue=j9(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue}indentation(){var e;return(e=this.overrideIndent)!==null&&e!==void 0?e:j9(this.string,null,this.tabSize)}match(e,n,i){if(typeof e=="string"){let r=o=>i?o.toLowerCase():o,s=this.string.substr(this.pos,e.length);return r(s)==r(e)?(n!==!1&&(this.pos+=e.length),!0):null}else{let r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&n!==!1&&(this.pos+=r[0].length),r)}}current(){return this.string.slice(this.start,this.pos)}}function hue(t){return{name:t.name||"",token:t.token,blankLine:t.blankLine||(()=>{}),startState:t.startState||(()=>!0),copyState:t.copyState||fue,indent:t.indent||(()=>null),languageData:t.languageData||{},tokenTable:t.tokenTable||Rk,mergeTokens:t.mergeTokens!==!1}}function fue(t){if(typeof t!="object")return t;let e={};for(let n in t){let i=t[n];e[n]=i instanceof Array?i.slice():i}return e}const Z9=new WeakMap;class $k extends Er{constructor(e){let n=$x(e.languageData),i=hue(e),r,s=new class extends Cx{createParse(o,a,l){return new pue(r,o,a,l)}};super(n,s,[],e.name),this.topNode=Oue(n,this),r=this,this.streamParser=i,this.stateAfter=new ot({perNode:!0}),this.tokenTable=e.tokenTable?new dQ(i.tokenTable):gue}static define(e){return new $k(e)}getIndent(e){let n,{overrideIndentation:i}=e.options;i&&(n=Z9.get(e.state),n!=null&&n<e.pos-1e4&&(n=void 0));let r=Ik(this,e.node.tree,e.node.from,e.node.from,n??e.pos),s,o;if(r?(o=r.state,s=r.pos+1):(o=this.streamParser.startState(e.unit),s=e.node.from),e.pos-s>1e4)return null;for(;s<e.pos;){let l=e.state.doc.lineAt(s),u=Math.min(e.pos,l.to);if(l.length){let c=i?i(l.from):-1,h=new uQ(l.text,e.state.tabSize,e.unit,c<0?void 0:c);for(;h.pos<u-l.from;)hQ(this.streamParser.token,h,o)}else this.streamParser.blankLine(o,e.unit);if(u==e.pos)break;s=l.to+1}let a=e.lineAt(e.pos);return i&&n==null&&Z9.set(e.state,a.from),this.streamParser.indent(o,/^\s*(.*)/.exec(a.text)[1],e)}get allowsNesting(){return!1}}function Ik(t,e,n,i,r){let s=n>=i&&n+e.length<=r&&e.prop(t.stateAfter);if(s)return{state:t.streamParser.copyState(s),pos:n+e.length};for(let o=e.children.length-1;o>=0;o--){let a=e.children[o],l=n+e.positions[o],u=a instanceof bt&&l<r&&Ik(t,a,l,i,r);if(u)return u}return null}function cQ(t,e,n,i,r){if(r&&n<=0&&i>=e.length)return e;!r&&n==0&&e.type==t.topNode&&(r=!0);for(let s=e.children.length-1;s>=0;s--){let o=e.positions[s],a=e.children[s],l;if(o<i&&a instanceof bt){if(!(l=cQ(t,a,n-o,i-o,r)))break;return r?new bt(e.type,e.children.slice(0,s).concat(l),e.positions.slice(0,s+1),o+l.length):l}}return null}function due(t,e,n,i,r){for(let s of e){let o=s.from+(s.openStart?25:0),a=s.to-(s.openEnd?25:0),l=o<=n&&a>n&&Ik(t,s.tree,0-s.offset,n,a),u;if(l&&l.pos<=i&&(u=cQ(t,s.tree,n+s.offset,l.pos+s.offset,!1)))return{state:l.state,tree:u}}return{state:t.streamParser.startState(r?$u(r):4),tree:bt.empty}}let pue=class{constructor(e,n,i,r){this.lang=e,this.input=n,this.fragments=i,this.ranges=r,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=r[r.length-1].to;let s=Au.get(),o=r[0].from,{state:a,tree:l}=due(e,i,o,this.to,s==null?void 0:s.state);this.state=a,this.parsedPos=this.chunkStart=o+l.length;for(let u=0;u<l.children.length;u++)this.chunks.push(l.children[u]),this.chunkPos.push(l.positions[u]);s&&this.parsedPos<s.viewport.from-1e5&&r.some(u=>u.from<=s.viewport.from&&u.to>=s.viewport.from)&&(this.state=this.lang.streamParser.startState($u(s.state)),s.skipUntilInView(this.parsedPos,s.viewport.from),this.parsedPos=s.viewport.from),this.moveRangeIndex()}advance(){let e=Au.get(),n=this.stoppedAt==null?this.to:Math.min(this.to,this.stoppedAt),i=Math.min(n,this.chunkStart+512);for(e&&(i=Math.min(i,e.viewport.to));this.parsedPos<i;)this.parseLine(e);return this.chunkStart<this.parsedPos&&this.finishChunk(),this.parsedPos>=n?this.finish():e&&this.parsedPos>=e.viewport.to?(e.skipUntilInView(this.parsedPos,n),this.finish()):null}stopAt(e){this.stoppedAt=e}lineAfter(e){let n=this.input.chunk(e);if(this.input.lineChunks)n==`
|
|
129
|
+
`&&(n="");else{let i=n.indexOf(`
|
|
130
|
+
`);i>-1&&(n=n.slice(0,i))}return e+n.length<=this.to?n:n.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,n=this.lineAfter(e),i=e+n.length;for(let r=this.rangeIndex;;){let s=this.ranges[r].to;if(s>=i||(n=n.slice(0,s-(i-n.length)),r++,r==this.ranges.length))break;let o=this.ranges[r].from,a=this.lineAfter(o);n+=a,i=o+a.length}return{line:n,end:i}}skipGapsTo(e,n,i){for(;;){let r=this.ranges[this.rangeIndex].to,s=e+n;if(i>0?r>s:r>=s)break;let o=this.ranges[++this.rangeIndex].from;n+=o-r}return n}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to<this.parsedPos;)this.rangeIndex++}emitToken(e,n,i,r){let s=4;if(this.ranges.length>1){r=this.skipGapsTo(n,r,1),n+=r;let a=this.chunk.length;r=this.skipGapsTo(i,r,-1),i+=r,s+=this.chunk.length-a}let o=this.chunk.length-4;return this.lang.streamParser.mergeTokens&&s==4&&o>=0&&this.chunk[o]==e&&this.chunk[o+2]==n?this.chunk[o+2]=i:this.chunk.push(e,n,i,s),r}parseLine(e){let{line:n,end:i}=this.nextLine(),r=0,{streamParser:s}=this.lang,o=new uQ(n,e?e.state.tabSize:4,e?$u(e.state):2);if(o.eol())s.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let a=hQ(s.token,o,this.state);if(a&&(r=this.emitToken(this.lang.tokenTable.resolve(a),this.parsedPos+o.start,this.parsedPos+o.pos,r)),o.start>1e4)break}this.parsedPos=i,this.moveRangeIndex(),this.parsedPos<this.to&&this.parsedPos++}finishChunk(){let e=bt.build({buffer:this.chunk,start:this.chunkStart,length:this.parsedPos-this.chunkStart,nodeSet:mue,topID:0,maxBufferLength:512,reused:this.chunkReused});e=new bt(e.type,e.children,e.positions,e.length,[[this.lang.stateAfter,this.lang.streamParser.copyState(this.state)]]),this.chunks.push(e),this.chunkPos.push(this.chunkStart-this.ranges[0].from),this.chunk=[],this.chunkReused=void 0,this.chunkStart=this.parsedPos}finish(){return new bt(this.lang.topNode,this.chunks,this.chunkPos,this.parsedPos-this.ranges[0].from).balance()}};function hQ(t,e,n){e.start=e.pos;for(let i=0;i<10;i++){let r=t(e,n);if(e.pos>e.start)return r}throw new Error("Stream parser failed to advance stream.")}const Rk=Object.create(null),dp=[Xn.none],mue=new uf(dp),z9=[],X9=Object.create(null),fQ=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])fQ[t]=pQ(Rk,e);class dQ{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),fQ)}resolve(e){return e?this.table[e]||(this.table[e]=pQ(this.extra,e)):0}}const gue=new dQ(Rk);function Bv(t,e){z9.indexOf(t)>-1||(z9.push(t),console.warn(e))}function pQ(t,e){let n=[];for(let a of e.split(" ")){let l=[];for(let u of a.split(".")){let c=t[u]||Q[u];c?typeof c=="function"?l.length?l=l.map(c):Bv(u,`Modifier ${u} used at start of tag`):l.length?Bv(u,`Tag ${u} used as modifier`):l=Array.isArray(c)?c:[c]:Bv(u,`Unknown highlighting tag ${u}`)}for(let u of l)n.push(u)}if(!n.length)return 0;let i=e.replace(/ /g,"_"),r=i+" "+n.map(a=>a.id),s=X9[r];if(s)return s.id;let o=X9[r]=Xn.define({id:dp.length,name:i,props:[ff({[i]:n})]});return dp.push(o),o.id}function Oue(t,e){let n=Xn.define({id:dp.length,name:"Document",props:[Fa.add(()=>t),df.add(()=>i=>e.getIndent(i))],top:!0});return dp.push(n),n}un.RTL,un.LTR;function Oe(t){return new xh($k.define(t))}function ka(t){return ce(()=>import("./index-BnxV3k_S.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])).then(e=>e.sql({dialect:e[t]}))}const xue=[oe.of({name:"C",extensions:["c","h","ino"],load(){return ce(()=>import("./index-DPMxd3Qn.js"),__vite__mapDeps([20,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])).then(t=>t.cpp())}}),oe.of({name:"C++",alias:["cpp"],extensions:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],load(){return ce(()=>import("./index-DPMxd3Qn.js"),__vite__mapDeps([20,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])).then(t=>t.cpp())}}),oe.of({name:"CQL",alias:["cassandra"],extensions:["cql"],load(){return ka("Cassandra")}}),oe.of({name:"CSS",extensions:["css"],load(){return ce(()=>Promise.resolve().then(()=>jge),void 0).then(t=>t.css())}}),oe.of({name:"Go",extensions:["go"],load(){return ce(()=>import("./index-CZvmcCab.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])).then(t=>t.go())}}),oe.of({name:"HTML",alias:["xhtml"],extensions:["html","htm","handlebars","hbs"],load(){return ce(()=>Promise.resolve().then(()=>M0e),void 0).then(t=>t.html())}}),oe.of({name:"Java",extensions:["java"],load(){return ce(()=>import("./index-R8NM9I_9.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])).then(t=>t.java())}}),oe.of({name:"JavaScript",alias:["ecmascript","js","node"],extensions:["js","mjs","cjs"],load(){return ce(()=>Promise.resolve().then(()=>Fg),void 0).then(t=>t.javascript())}}),oe.of({name:"Jinja",extensions:["j2","jinja","jinja2"],load(){return ce(()=>import("./index-39SJtrt0.js"),__vite__mapDeps([23,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])).then(t=>t.jinja())}}),oe.of({name:"JSON",alias:["json5"],extensions:["json","map"],load(){return ce(()=>import("./index-BQ0LIrW-.js"),__vite__mapDeps([24,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])).then(t=>t.json())}}),oe.of({name:"JSX",extensions:["jsx"],load(){return ce(()=>Promise.resolve().then(()=>Fg),void 0).then(t=>t.javascript({jsx:!0}))}}),oe.of({name:"LESS",extensions:["less"],load(){return ce(()=>import("./index-POndwsCI.js"),__vite__mapDeps([25,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])).then(t=>t.less())}}),oe.of({name:"Liquid",extensions:["liquid"],load(){return ce(()=>import("./index-DzpuR0Jg.js"),__vite__mapDeps([26,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])).then(t=>t.liquid())}}),oe.of({name:"MariaDB SQL",load(){return ka("MariaSQL")}}),oe.of({name:"Markdown",extensions:["md","markdown","mkd"],load(){return ce(()=>Promise.resolve().then(()=>X0e),void 0).then(t=>t.markdown())}}),oe.of({name:"MS SQL",load(){return ka("MSSQL")}}),oe.of({name:"MySQL",load(){return ka("MySQL")}}),oe.of({name:"PHP",extensions:["php","php3","php4","php5","php7","phtml"],load(){return ce(()=>import("./index-DUirCkgW.js"),__vite__mapDeps([27,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])).then(t=>t.php())}}),oe.of({name:"PLSQL",extensions:["pls"],load(){return ka("PLSQL")}}),oe.of({name:"PostgreSQL",load(){return ka("PostgreSQL")}}),oe.of({name:"Python",extensions:["BUILD","bzl","py","pyw"],filename:/^(BUCK|BUILD)$/,load(){return ce(()=>import("./index-DSe2jx3k.js"),__vite__mapDeps([28,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])).then(t=>t.python())}}),oe.of({name:"Rust",extensions:["rs"],load(){return ce(()=>import("./index-CCvKI2rM.js"),__vite__mapDeps([29,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])).then(t=>t.rust())}}),oe.of({name:"Sass",extensions:["sass"],load(){return ce(()=>import("./index-Yi5ytFFr.js"),__vite__mapDeps([30,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])).then(t=>t.sass({indented:!0}))}}),oe.of({name:"SCSS",extensions:["scss"],load(){return ce(()=>import("./index-Yi5ytFFr.js"),__vite__mapDeps([30,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])).then(t=>t.sass())}}),oe.of({name:"SQL",extensions:["sql"],load(){return ka("StandardSQL")}}),oe.of({name:"SQLite",load(){return ka("SQLite")}}),oe.of({name:"TSX",extensions:["tsx"],load(){return ce(()=>Promise.resolve().then(()=>Fg),void 0).then(t=>t.javascript({jsx:!0,typescript:!0}))}}),oe.of({name:"TypeScript",alias:["ts"],extensions:["ts","mts","cts"],load(){return ce(()=>Promise.resolve().then(()=>Fg),void 0).then(t=>t.javascript({typescript:!0}))}}),oe.of({name:"WebAssembly",extensions:["wat","wast"],load(){return ce(()=>import("./index-Cp3hLKNl.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])).then(t=>t.wast())}}),oe.of({name:"XML",alias:["rss","wsdl","xsd"],extensions:["xml","xsl","xsd","svg"],load(){return ce(()=>import("./index-DAYxSQGU.js"),__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])).then(t=>t.xml())}}),oe.of({name:"YAML",alias:["yml"],extensions:["yaml","yml"],load(){return ce(()=>import("./index-D7ayFxcx.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])).then(t=>t.yaml())}}),oe.of({name:"APL",extensions:["dyalog","apl"],load(){return ce(()=>import("./apl-B4CMkyY2.js"),[]).then(t=>Oe(t.apl))}}),oe.of({name:"PGP",alias:["asciiarmor"],extensions:["asc","pgp","sig"],load(){return ce(()=>import("./asciiarmor-Df11BRmG.js"),[]).then(t=>Oe(t.asciiArmor))}}),oe.of({name:"ASN.1",extensions:["asn","asn1"],load(){return ce(()=>import("./asn1-EdZsLKOL.js"),[]).then(t=>Oe(t.asn1({})))}}),oe.of({name:"Asterisk",filename:/^extensions\.conf$/i,load(){return ce(()=>import("./asterisk-B-8jnY81.js"),[]).then(t=>Oe(t.asterisk))}}),oe.of({name:"Brainfuck",extensions:["b","bf"],load(){return ce(()=>import("./brainfuck-C4LP7Hcl.js"),[]).then(t=>Oe(t.brainfuck))}}),oe.of({name:"Cobol",extensions:["cob","cpy"],load(){return ce(()=>import("./cobol-CWcv1MsR.js"),[]).then(t=>Oe(t.cobol))}}),oe.of({name:"C#",alias:["csharp","cs"],extensions:["cs"],load(){return ce(()=>import("./clike-B9uivgTg.js"),[]).then(t=>Oe(t.csharp))}}),oe.of({name:"Clojure",extensions:["clj","cljc","cljx"],load(){return ce(()=>import("./clojure-BMjYHr_A.js"),[]).then(t=>Oe(t.clojure))}}),oe.of({name:"ClojureScript",extensions:["cljs"],load(){return ce(()=>import("./clojure-BMjYHr_A.js"),[]).then(t=>Oe(t.clojure))}}),oe.of({name:"Closure Stylesheets (GSS)",extensions:["gss"],load(){return ce(()=>import("./css-BnMrqG3P.js"),[]).then(t=>Oe(t.gss))}}),oe.of({name:"CMake",extensions:["cmake","cmake.in"],filename:/^CMakeLists\.txt$/,load(){return ce(()=>import("./cmake-BQqOBYOt.js"),[]).then(t=>Oe(t.cmake))}}),oe.of({name:"CoffeeScript",alias:["coffee","coffee-script"],extensions:["coffee"],load(){return ce(()=>import("./coffeescript-S37ZYGWr.js"),[]).then(t=>Oe(t.coffeeScript))}}),oe.of({name:"Common Lisp",alias:["lisp"],extensions:["cl","lisp","el"],load(){return ce(()=>import("./commonlisp-DBKNyK5s.js"),[]).then(t=>Oe(t.commonLisp))}}),oe.of({name:"Cypher",extensions:["cyp","cypher"],load(){return ce(()=>import("./cypher-C_CwsFkJ.js"),[]).then(t=>Oe(t.cypher))}}),oe.of({name:"Cython",extensions:["pyx","pxd","pxi"],load(){return ce(()=>import("./python-BuPzkPfP.js"),[]).then(t=>Oe(t.cython))}}),oe.of({name:"Crystal",extensions:["cr"],load(){return ce(()=>import("./crystal-SjHAIU92.js"),[]).then(t=>Oe(t.crystal))}}),oe.of({name:"D",extensions:["d"],load(){return ce(()=>import("./d-pRatUO7H.js"),[]).then(t=>Oe(t.d))}}),oe.of({name:"Dart",extensions:["dart"],load(){return ce(()=>import("./clike-B9uivgTg.js"),[]).then(t=>Oe(t.dart))}}),oe.of({name:"diff",extensions:["diff","patch"],load(){return ce(()=>import("./diff-DbItnlRl.js"),[]).then(t=>Oe(t.diff))}}),oe.of({name:"Dockerfile",filename:/^Dockerfile$/,load(){return ce(()=>import("./dockerfile-BKs6k2Af.js"),__vite__mapDeps([34,35])).then(t=>Oe(t.dockerFile))}}),oe.of({name:"DTD",extensions:["dtd"],load(){return ce(()=>import("./dtd-DF_7sFjM.js"),[]).then(t=>Oe(t.dtd))}}),oe.of({name:"Dylan",extensions:["dylan","dyl","intr"],load(){return ce(()=>import("./dylan-DwRh75JA.js"),[]).then(t=>Oe(t.dylan))}}),oe.of({name:"EBNF",load(){return ce(()=>import("./ebnf-CDyGwa7X.js"),[]).then(t=>Oe(t.ebnf))}}),oe.of({name:"ECL",extensions:["ecl"],load(){return ce(()=>import("./ecl-Cabwm37j.js"),[]).then(t=>Oe(t.ecl))}}),oe.of({name:"edn",extensions:["edn"],load(){return ce(()=>import("./clojure-BMjYHr_A.js"),[]).then(t=>Oe(t.clojure))}}),oe.of({name:"Eiffel",extensions:["e"],load(){return ce(()=>import("./eiffel-CnydiIhH.js"),[]).then(t=>Oe(t.eiffel))}}),oe.of({name:"Elm",extensions:["elm"],load(){return ce(()=>import("./elm-vLlmbW-K.js"),[]).then(t=>Oe(t.elm))}}),oe.of({name:"Erlang",extensions:["erl"],load(){return ce(()=>import("./erlang-BNw1qcRV.js"),[]).then(t=>Oe(t.erlang))}}),oe.of({name:"Esper",load(){return ce(()=>import("./sql-D0XecflT.js"),[]).then(t=>Oe(t.esper))}}),oe.of({name:"Factor",extensions:["factor"],load(){return ce(()=>import("./factor-kuTfRLto.js"),__vite__mapDeps([36,35])).then(t=>Oe(t.factor))}}),oe.of({name:"FCL",load(){return ce(()=>import("./fcl-Kvtd6kyn.js"),[]).then(t=>Oe(t.fcl))}}),oe.of({name:"Forth",extensions:["forth","fth","4th"],load(){return ce(()=>import("./forth-Ffai-XNe.js"),[]).then(t=>Oe(t.forth))}}),oe.of({name:"Fortran",extensions:["f","for","f77","f90","f95"],load(){return ce(()=>import("./fortran-DYz_wnZ1.js"),[]).then(t=>Oe(t.fortran))}}),oe.of({name:"F#",alias:["fsharp"],extensions:["fs"],load(){return ce(()=>import("./mllike-CXdrOF99.js"),[]).then(t=>Oe(t.fSharp))}}),oe.of({name:"Gas",extensions:["s"],load(){return ce(()=>import("./gas-Bneqetm1.js"),[]).then(t=>Oe(t.gas))}}),oe.of({name:"Gherkin",extensions:["feature"],load(){return ce(()=>import("./gherkin-heZmZLOM.js"),[]).then(t=>Oe(t.gherkin))}}),oe.of({name:"Groovy",extensions:["groovy","gradle"],filename:/^Jenkinsfile$/,load(){return ce(()=>import("./groovy-D9Dt4D0W.js"),[]).then(t=>Oe(t.groovy))}}),oe.of({name:"Haskell",extensions:["hs"],load(){return ce(()=>import("./haskell-Cw1EW3IL.js"),[]).then(t=>Oe(t.haskell))}}),oe.of({name:"Haxe",extensions:["hx"],load(){return ce(()=>import("./haxe-H-WmDvRZ.js"),[]).then(t=>Oe(t.haxe))}}),oe.of({name:"HXML",extensions:["hxml"],load(){return ce(()=>import("./haxe-H-WmDvRZ.js"),[]).then(t=>Oe(t.hxml))}}),oe.of({name:"HTTP",load(){return ce(()=>import("./http-DBlCnlav.js"),[]).then(t=>Oe(t.http))}}),oe.of({name:"IDL",extensions:["pro"],load(){return ce(()=>import("./idl-BEugSyMb.js"),[]).then(t=>Oe(t.idl))}}),oe.of({name:"JSON-LD",alias:["jsonld"],extensions:["jsonld"],load(){return ce(()=>import("./javascript-iXu5QeM3.js"),[]).then(t=>Oe(t.jsonld))}}),oe.of({name:"Julia",extensions:["jl"],load(){return ce(()=>import("./julia-DuME0IfC.js"),[]).then(t=>Oe(t.julia))}}),oe.of({name:"Kotlin",extensions:["kt","kts"],load(){return ce(()=>import("./clike-B9uivgTg.js"),[]).then(t=>Oe(t.kotlin))}}),oe.of({name:"LiveScript",alias:["ls"],extensions:["ls"],load(){return ce(()=>import("./livescript-BwQOo05w.js"),[]).then(t=>Oe(t.liveScript))}}),oe.of({name:"Lua",extensions:["lua"],load(){return ce(()=>import("./lua-VAEuO923.js"),[]).then(t=>Oe(t.lua))}}),oe.of({name:"mIRC",extensions:["mrc"],load(){return ce(()=>import("./mirc-CjQqDB4T.js"),[]).then(t=>Oe(t.mirc))}}),oe.of({name:"Mathematica",extensions:["m","nb","wl","wls"],load(){return ce(()=>import("./mathematica-DTrFuWx2.js"),[]).then(t=>Oe(t.mathematica))}}),oe.of({name:"Modelica",extensions:["mo"],load(){return ce(()=>import("./modelica-Dc1JOy9r.js"),[]).then(t=>Oe(t.modelica))}}),oe.of({name:"MUMPS",extensions:["mps"],load(){return ce(()=>import("./mumps-BT43cFF4.js"),[]).then(t=>Oe(t.mumps))}}),oe.of({name:"Mbox",extensions:["mbox"],load(){return ce(()=>import("./mbox-CNhZ1qSd.js"),[]).then(t=>Oe(t.mbox))}}),oe.of({name:"Nginx",filename:/nginx.*\.conf$/i,load(){return ce(()=>import("./nginx-DdIZxoE0.js"),[]).then(t=>Oe(t.nginx))}}),oe.of({name:"NSIS",extensions:["nsh","nsi"],load(){return ce(()=>import("./nsis-LdVXkNf5.js"),__vite__mapDeps([37,35])).then(t=>Oe(t.nsis))}}),oe.of({name:"NTriples",extensions:["nt","nq"],load(){return ce(()=>import("./ntriples-BfvgReVJ.js"),[]).then(t=>Oe(t.ntriples))}}),oe.of({name:"Objective-C",alias:["objective-c","objc"],extensions:["m"],load(){return ce(()=>import("./clike-B9uivgTg.js"),[]).then(t=>Oe(t.objectiveC))}}),oe.of({name:"Objective-C++",alias:["objective-c++","objc++"],extensions:["mm"],load(){return ce(()=>import("./clike-B9uivgTg.js"),[]).then(t=>Oe(t.objectiveCpp))}}),oe.of({name:"OCaml",extensions:["ml","mli","mll","mly"],load(){return ce(()=>import("./mllike-CXdrOF99.js"),[]).then(t=>Oe(t.oCaml))}}),oe.of({name:"Octave",extensions:["m"],load(){return ce(()=>import("./octave-Ck1zUtKM.js"),[]).then(t=>Oe(t.octave))}}),oe.of({name:"Oz",extensions:["oz"],load(){return ce(()=>import("./oz-BzwKVEFT.js"),[]).then(t=>Oe(t.oz))}}),oe.of({name:"Pascal",extensions:["p","pas"],load(){return ce(()=>import("./pascal--L3eBynH.js"),[]).then(t=>Oe(t.pascal))}}),oe.of({name:"Perl",extensions:["pl","pm"],load(){return ce(()=>import("./perl-CdXCOZ3F.js"),[]).then(t=>Oe(t.perl))}}),oe.of({name:"Pig",extensions:["pig"],load(){return ce(()=>import("./pig-CevX1Tat.js"),[]).then(t=>Oe(t.pig))}}),oe.of({name:"PowerShell",extensions:["ps1","psd1","psm1"],load(){return ce(()=>import("./powershell-CFHJl5sT.js"),[]).then(t=>Oe(t.powerShell))}}),oe.of({name:"Properties files",alias:["ini","properties"],extensions:["properties","ini","in"],load(){return ce(()=>import("./properties-C78fOPTZ.js"),[]).then(t=>Oe(t.properties))}}),oe.of({name:"ProtoBuf",extensions:["proto"],load(){return ce(()=>import("./protobuf-ChK-085T.js"),[]).then(t=>Oe(t.protobuf))}}),oe.of({name:"Pug",alias:["jade"],extensions:["pug","jade"],load(){return ce(()=>import("./pug-DeIclll2.js"),__vite__mapDeps([38,39])).then(t=>Oe(t.pug))}}),oe.of({name:"Puppet",extensions:["pp"],load(){return ce(()=>import("./puppet-DMA9R1ak.js"),[]).then(t=>Oe(t.puppet))}}),oe.of({name:"Q",extensions:["q"],load(){return ce(()=>import("./q-pXgVlZs6.js"),[]).then(t=>Oe(t.q))}}),oe.of({name:"R",alias:["rscript"],extensions:["r","R"],load(){return ce(()=>import("./r-B6wPVr8A.js"),[]).then(t=>Oe(t.r))}}),oe.of({name:"RPM Changes",load(){return ce(()=>import("./rpm-CTu-6PCP.js"),[]).then(t=>Oe(t.rpmChanges))}}),oe.of({name:"RPM Spec",extensions:["spec"],load(){return ce(()=>import("./rpm-CTu-6PCP.js"),[]).then(t=>Oe(t.rpmSpec))}}),oe.of({name:"Ruby",alias:["jruby","macruby","rake","rb","rbx"],extensions:["rb"],filename:/^(Gemfile|Rakefile)$/,load(){return ce(()=>import("./ruby-B2Rjki9n.js"),[]).then(t=>Oe(t.ruby))}}),oe.of({name:"SAS",extensions:["sas"],load(){return ce(()=>import("./sas-B4kiWyti.js"),[]).then(t=>Oe(t.sas))}}),oe.of({name:"Scala",extensions:["scala"],load(){return ce(()=>import("./clike-B9uivgTg.js"),[]).then(t=>Oe(t.scala))}}),oe.of({name:"Scheme",extensions:["scm","ss"],load(){return ce(()=>import("./scheme-C41bIUwD.js"),[]).then(t=>Oe(t.scheme))}}),oe.of({name:"Shell",alias:["bash","sh","zsh"],extensions:["sh","ksh","bash"],filename:/^PKGBUILD$/,load(){return ce(()=>import("./shell-CjFT_Tl9.js"),[]).then(t=>Oe(t.shell))}}),oe.of({name:"Sieve",extensions:["siv","sieve"],load(){return ce(()=>import("./sieve-C3Gn_uJK.js"),[]).then(t=>Oe(t.sieve))}}),oe.of({name:"Smalltalk",extensions:["st"],load(){return ce(()=>import("./smalltalk-CnHTOXQT.js"),[]).then(t=>Oe(t.smalltalk))}}),oe.of({name:"Solr",load(){return ce(()=>import("./solr-DehyRSwq.js"),[]).then(t=>Oe(t.solr))}}),oe.of({name:"SML",extensions:["sml","sig","fun","smackspec"],load(){return ce(()=>import("./mllike-CXdrOF99.js"),[]).then(t=>Oe(t.sml))}}),oe.of({name:"SPARQL",alias:["sparul"],extensions:["rq","sparql"],load(){return ce(()=>import("./sparql-DkYu6x3z.js"),[]).then(t=>Oe(t.sparql))}}),oe.of({name:"Spreadsheet",alias:["excel","formula"],load(){return ce(()=>import("./spreadsheet-BCZA_wO0.js"),[]).then(t=>Oe(t.spreadsheet))}}),oe.of({name:"Squirrel",extensions:["nut"],load(){return ce(()=>import("./clike-B9uivgTg.js"),[]).then(t=>Oe(t.squirrel))}}),oe.of({name:"Stylus",extensions:["styl"],load(){return ce(()=>import("./stylus-B533Al4x.js"),[]).then(t=>Oe(t.stylus))}}),oe.of({name:"Swift",extensions:["swift"],load(){return ce(()=>import("./swift-BzpIVaGY.js"),[]).then(t=>Oe(t.swift))}}),oe.of({name:"sTeX",load(){return ce(()=>import("./stex-C3f8Ysf7.js"),[]).then(t=>Oe(t.stex))}}),oe.of({name:"LaTeX",alias:["tex"],extensions:["text","ltx","tex"],load(){return ce(()=>import("./stex-C3f8Ysf7.js"),[]).then(t=>Oe(t.stex))}}),oe.of({name:"SystemVerilog",extensions:["v","sv","svh"],load(){return ce(()=>import("./verilog-C6RDOZhf.js"),[]).then(t=>Oe(t.verilog))}}),oe.of({name:"Tcl",extensions:["tcl"],load(){return ce(()=>import("./tcl-DVfN8rqt.js"),[]).then(t=>Oe(t.tcl))}}),oe.of({name:"Textile",extensions:["textile"],load(){return ce(()=>import("./textile-CnDTJFAw.js"),[]).then(t=>Oe(t.textile))}}),oe.of({name:"TiddlyWiki",load(){return ce(()=>import("./tiddlywiki-DO-Gjzrf.js"),[]).then(t=>Oe(t.tiddlyWiki))}}),oe.of({name:"Tiki wiki",load(){return ce(()=>import("./tiki-DGYXhP31.js"),[]).then(t=>Oe(t.tiki))}}),oe.of({name:"TOML",extensions:["toml"],load(){return ce(()=>import("./toml-Bm5Em-hy.js"),[]).then(t=>Oe(t.toml))}}),oe.of({name:"Troff",extensions:["1","2","3","4","5","6","7","8","9"],load(){return ce(()=>import("./troff-wAsdV37c.js"),[]).then(t=>Oe(t.troff))}}),oe.of({name:"TTCN",extensions:["ttcn","ttcn3","ttcnpp"],load(){return ce(()=>import("./ttcn-CfJYG6tj.js"),[]).then(t=>Oe(t.ttcn))}}),oe.of({name:"TTCN_CFG",extensions:["cfg"],load(){return ce(()=>import("./ttcn-cfg-B9xdYoR4.js"),[]).then(t=>Oe(t.ttcnCfg))}}),oe.of({name:"Turtle",extensions:["ttl"],load(){return ce(()=>import("./turtle-B1tBg_DP.js"),[]).then(t=>Oe(t.turtle))}}),oe.of({name:"Web IDL",extensions:["webidl"],load(){return ce(()=>import("./webidl-ZXfAyPTL.js"),[]).then(t=>Oe(t.webIDL))}}),oe.of({name:"VB.NET",extensions:["vb"],load(){return ce(()=>import("./vb-CmGdzxic.js"),[]).then(t=>Oe(t.vb))}}),oe.of({name:"VBScript",extensions:["vbs"],load(){return ce(()=>import("./vbscript-BuJXcnF6.js"),[]).then(t=>Oe(t.vbScript))}}),oe.of({name:"Velocity",extensions:["vtl"],load(){return ce(()=>import("./velocity-D8B20fx6.js"),[]).then(t=>Oe(t.velocity))}}),oe.of({name:"Verilog",extensions:["v"],load(){return ce(()=>import("./verilog-C6RDOZhf.js"),[]).then(t=>Oe(t.verilog))}}),oe.of({name:"VHDL",extensions:["vhd","vhdl"],load(){return ce(()=>import("./vhdl-lSbBsy5d.js"),[]).then(t=>Oe(t.vhdl))}}),oe.of({name:"XQuery",extensions:["xy","xquery","xq","xqm","xqy"],load(){return ce(()=>import("./xquery-DzFWVndE.js"),[]).then(t=>Oe(t.xQuery))}}),oe.of({name:"Yacas",extensions:["ys"],load(){return ce(()=>import("./yacas-BJ4BC0dw.js"),[]).then(t=>Oe(t.yacas))}}),oe.of({name:"Z80",extensions:["z80"],load(){return ce(()=>import("./z80-Hz9HOZM7.js"),[]).then(t=>Oe(t.z80))}}),oe.of({name:"MscGen",extensions:["mscgen","mscin","msc"],load(){return ce(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(t=>Oe(t.mscgen))}}),oe.of({name:"Xù",extensions:["xu"],load(){return ce(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(t=>Oe(t.xu))}}),oe.of({name:"MsGenny",extensions:["msgenny"],load(){return ce(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(t=>Oe(t.msgenny))}}),oe.of({name:"Vue",extensions:["vue"],load(){return ce(()=>import("./index-TCDuDhBj.js"),__vite__mapDeps([40,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])).then(t=>t.vue())}}),oe.of({name:"Angular Template",load(){return ce(()=>import("./index-TckzASdM.js"),__vite__mapDeps([41,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])).then(t=>t.angular())}})],yue=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),i=Nk(t.state,n.from);return i.line?vue(t):i.block?Sue(t):!1};function Mk(t,e){return({state:n,dispatch:i})=>{if(n.readOnly)return!1;let r=t(e,n);return r?(i(n.update(r)),!0):!1}}const vue=Mk(wue,0),bue=Mk(mQ,0),Sue=Mk((t,e)=>mQ(t,e,Cue(e)),0);function Nk(t,e){let n=t.languageDataAt("commentTokens",e,1);return n.length?n[0]:{}}const Df=50;function _ue(t,{open:e,close:n},i,r){let s=t.sliceDoc(i-Df,i),o=t.sliceDoc(r,r+Df),a=/\s*$/.exec(s)[0].length,l=/^\s*/.exec(o)[0].length,u=s.length-a;if(s.slice(u-e.length,u)==e&&o.slice(l,l+n.length)==n)return{open:{pos:i-a,margin:a&&1},close:{pos:r+l,margin:l&&1}};let c,h;r-i<=2*Df?c=h=t.sliceDoc(i,r):(c=t.sliceDoc(i,i+Df),h=t.sliceDoc(r-Df,r));let f=/^\s*/.exec(c)[0].length,p=/\s*$/.exec(h)[0].length,m=h.length-p-n.length;return c.slice(f,f+e.length)==e&&h.slice(m,m+n.length)==n?{open:{pos:i+f+e.length,margin:/\s/.test(c.charAt(f+e.length))?1:0},close:{pos:r-p-n.length,margin:/\s/.test(h.charAt(m-1))?1:0}}:null}function Cue(t){let e=[];for(let n of t.selection.ranges){let i=t.doc.lineAt(n.from),r=n.to<=i.to?i:t.doc.lineAt(n.to);r.from>i.from&&r.from==n.to&&(r=n.to==i.to+1?i:t.doc.lineAt(n.to-1));let s=e.length-1;s>=0&&e[s].to>i.from?e[s].to=r.to:e.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:r.to})}return e}function mQ(t,e,n=e.selection.ranges){let i=n.map(s=>Nk(e,s.from).block);if(!i.every(s=>s))return null;let r=n.map((s,o)=>_ue(e,i[o],s.from,s.to));if(t!=2&&!r.every(s=>s))return{changes:e.changes(n.map((s,o)=>r[o]?[]:[{from:s.from,insert:i[o].open+" "},{from:s.to,insert:" "+i[o].close}]))};if(t!=1&&r.some(s=>s)){let s=[];for(let o=0,a;o<r.length;o++)if(a=r[o]){let l=i[o],{open:u,close:c}=a;s.push({from:u.pos-l.open.length,to:u.pos+u.margin},{from:c.pos-c.margin,to:c.pos+l.close.length})}return{changes:s}}return null}function wue(t,e,n=e.selection.ranges){let i=[],r=-1;e:for(let{from:s,to:o}of n){let a=i.length,l=1e9,u;for(let c=s;c<=o;){let h=e.doc.lineAt(c);if(u==null&&(u=Nk(e,h.from).line,!u))continue e;if(h.from>r&&(s==o||o>h.from)){r=h.from;let f=/^\s*/.exec(h.text)[0].length,p=f==h.length,m=h.text.slice(f,f+u.length)==u?f:-1;f<h.text.length&&f<l&&(l=f),i.push({line:h,comment:m,token:u,indent:f,empty:p,single:!1})}c=h.to+1}if(l<1e9)for(let c=a;c<i.length;c++)i[c].indent<i[c].line.text.length&&(i[c].indent=l);i.length==a+1&&(i[a].single=!0)}if(t!=2&&i.some(s=>s.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:a,token:l,indent:u,empty:c,single:h}of i)(h||!c)&&s.push({from:a.from+u,insert:l+" "});let o=e.changes(s);return{changes:o,selection:e.selection.map(o,1)}}else if(t!=1&&i.some(s=>s.comment>=0)){let s=[];for(let{line:o,comment:a,token:l}of i)if(a>=0){let u=o.from+a,c=u+l.length;o.text[c-o.from]==" "&&c++,s.push({from:u,to:c})}return{changes:s}}return null}const B_=va.define(),kue=va.define(),Eue=Qe.define(),gQ=Qe.define({combine(t){return wo(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(i,r)=>e(i,r)||n(i,r)})}}),OQ=Wn.define({create(){return ao.empty},update(t,e){let n=e.state.facet(gQ),i=e.annotation(B_);if(i){let l=or.fromTransaction(e,i.selection),u=i.side,c=u==0?t.undone:t.done;return l?c=NO(c,c.length,n.minDepth,l):c=vQ(c,e.startState.selection),new ao(u==0?i.rest:c,u==0?c:i.rest)}let r=e.annotation(kue);if((r=="full"||r=="before")&&(t=t.isolate()),e.annotation(Zn.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let s=or.fromTransaction(e),o=e.annotation(Zn.time),a=e.annotation(Zn.userEvent);return s?t=t.addChanges(s,o,a,n,e):e.selection&&(t=t.addSelection(e.startState.selection,o,a,n.newGroupDelay)),(r=="full"||r=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new ao(t.done.map(or.fromJSON),t.undone.map(or.fromJSON))}});function Tue(t={}){return[OQ,gQ.of(t),Se.domEventHandlers({beforeinput(e,n){let i=e.inputType=="historyUndo"?xQ:e.inputType=="historyRedo"?F_:null;return i?(e.preventDefault(),i(n)):!1}})]}function Mx(t,e){return function({state:n,dispatch:i}){if(!e&&n.readOnly)return!1;let r=n.field(OQ,!1);if(!r)return!1;let s=r.pop(t,n,e);return s?(i(s),!0):!1}}const xQ=Mx(0,!1),F_=Mx(1,!1),Pue=Mx(0,!0),Aue=Mx(1,!0);class or{constructor(e,n,i,r,s){this.changes=e,this.effects=n,this.mapped=i,this.startSelection=r,this.selectionsAfter=s}setSelAfter(e){return new or(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(r=>r.toJSON())}}static fromJSON(e){return new or(e.changes&&Fn.fromJSON(e.changes),[],e.mapped&&co.fromJSON(e.mapped),e.startSelection&&fe.fromJSON(e.startSelection),e.selectionsAfter.map(fe.fromJSON))}static fromTransaction(e,n){let i=Jr;for(let r of e.startState.facet(Eue)){let s=r(e);s.length&&(i=i.concat(s))}return!i.length&&e.changes.empty?null:new or(e.changes.invert(e.startState.doc),i,void 0,n||e.startState.selection,Jr)}static selection(e){return new or(void 0,Jr,void 0,void 0,e)}}function NO(t,e,n,i){let r=e+1>n+20?e-n-1:0,s=t.slice(r,e);return s.push(i),s}function $ue(t,e){let n=[],i=!1;return t.iterChangedRanges((r,s)=>n.push(r,s)),e.iterChangedRanges((r,s,o,a)=>{for(let l=0;l<n.length;){let u=n[l++],c=n[l++];a>=u&&o<=c&&(i=!0)}}),i}function Iue(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,i)=>n.empty!=e.ranges[i].empty).length===0}function yQ(t,e){return t.length?e.length?t.concat(e):t:e}const Jr=[],Rue=200;function vQ(t,e){if(t.length){let n=t[t.length-1],i=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-Rue));return i.length&&i[i.length-1].eq(e)?t:(i.push(e),NO(t,t.length-1,1e9,n.setSelAfter(i)))}else return[or.selection([e])]}function Mue(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function Fv(t,e){if(!t.length)return t;let n=t.length,i=Jr;for(;n;){let r=Nue(t[n-1],e,i);if(r.changes&&!r.changes.empty||r.effects.length){let s=t.slice(0,n);return s[n-1]=r,s}else e=r.mapped,n--,i=r.selectionsAfter}return i.length?[or.selection(i)]:Jr}function Nue(t,e,n){let i=yQ(t.selectionsAfter.length?t.selectionsAfter.map(a=>a.map(e)):Jr,n);if(!t.changes)return or.selection(i);let r=t.changes.map(e),s=e.mapDesc(t.changes,!0),o=t.mapped?t.mapped.composeDesc(s):s;return new or(r,nt.mapEffects(t.effects,e),o,t.startSelection.map(s),i)}const Lue=/^(input\.type|delete)($|\.)/;class ao{constructor(e,n,i=0,r=void 0){this.done=e,this.undone=n,this.prevTime=i,this.prevUserEvent=r}isolate(){return this.prevTime?new ao(this.done,this.undone):this}addChanges(e,n,i,r,s){let o=this.done,a=o[o.length-1];return a&&a.changes&&!a.changes.empty&&e.changes&&(!i||Lue.test(i))&&(!a.selectionsAfter.length&&n-this.prevTime<r.newGroupDelay&&r.joinToEvent(s,$ue(a.changes,e.changes))||i=="input.type.compose")?o=NO(o,o.length-1,r.minDepth,new or(e.changes.compose(a.changes),yQ(nt.mapEffects(e.effects,a.changes),a.effects),a.mapped,a.startSelection,Jr)):o=NO(o,o.length,r.minDepth,e),new ao(o,Jr,n,i)}addSelection(e,n,i,r){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:Jr;return s.length>0&&n-this.prevTime<r&&i==this.prevUserEvent&&i&&/^select($|\.)/.test(i)&&Iue(s[s.length-1],e)?this:new ao(vQ(this.done,e),this.undone,n,i)}addMapping(e){return new ao(Fv(this.done,e),Fv(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,n,i){let r=e==0?this.done:this.undone;if(r.length==0)return null;let s=r[r.length-1],o=s.selectionsAfter[0]||(s.startSelection?s.startSelection.map(s.changes.invertedDesc,1):n.selection);if(i&&s.selectionsAfter.length)return n.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:B_.of({side:e,rest:Mue(r),selection:o}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let a=r.length==1?Jr:r.slice(0,r.length-1);return s.mapped&&(a=Fv(a,s.mapped)),n.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:B_.of({side:e,rest:a,selection:o}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}ao.empty=new ao(Jr,Jr);const Due=[{key:"Mod-z",run:xQ,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:F_,preventDefault:!0},{linux:"Ctrl-Shift-z",run:F_,preventDefault:!0},{key:"Mod-u",run:Pue,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:Aue,preventDefault:!0}];function mf(t,e){return fe.create(t.ranges.map(e),t.mainIndex)}function Zs(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function zs({state:t,dispatch:e},n){let i=mf(t.selection,n);return i.eq(t.selection,!0)?!1:(e(Zs(t,i)),!0)}function Nx(t,e){return fe.cursor(e?t.to:t.from)}function bQ(t,e){return zs(t,n=>n.empty?t.moveByChar(n,e):Nx(n,e))}function Li(t){return t.textDirectionAt(t.state.selection.main.head)==un.LTR}const SQ=t=>bQ(t,!Li(t)),_Q=t=>bQ(t,Li(t));function CQ(t,e){return zs(t,n=>n.empty?t.moveByGroup(n,e):Nx(n,e))}const Que=t=>CQ(t,!Li(t)),Vue=t=>CQ(t,Li(t));function Bue(t,e,n){if(e.type.prop(n))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function Lx(t,e,n){let i=sn(t).resolveInner(e.head),r=n?ot.closedBy:ot.openedBy;for(let l=e.head;;){let u=n?i.childAfter(l):i.childBefore(l);if(!u)break;Bue(t,u,r)?i=u:l=n?u.to:u.from}let s=i.type.prop(r),o,a;return s&&(o=n?oo(t,i.from,1):oo(t,i.to,-1))&&o.matched?a=n?o.end.to:o.end.from:a=n?i.to:i.from,fe.cursor(a,n?-1:1)}const Fue=t=>zs(t,e=>Lx(t.state,e,!Li(t))),jue=t=>zs(t,e=>Lx(t.state,e,Li(t)));function wQ(t,e){return zs(t,n=>{if(!n.empty)return Nx(n,e);let i=t.moveVertically(n,e);return i.head!=n.head?i:t.moveToLineBoundary(n,e)})}const kQ=t=>wQ(t,!1),EQ=t=>wQ(t,!0);function TQ(t){let e=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,n=0,i=0,r;if(e){for(let s of t.state.facet(Se.scrollMargins)){let o=s(t);o!=null&&o.top&&(n=Math.max(o==null?void 0:o.top,n)),o!=null&&o.bottom&&(i=Math.max(o==null?void 0:o.bottom,i))}r=t.scrollDOM.clientHeight-n-i}else r=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:i,selfScroll:e,height:Math.max(t.defaultLineHeight,r-5)}}function PQ(t,e){let n=TQ(t),{state:i}=t,r=mf(i.selection,o=>o.empty?t.moveVertically(o,e,n.height):Nx(o,e));if(r.eq(i.selection))return!1;let s;if(n.selfScroll){let o=t.coordsAtPos(i.selection.main.head),a=t.scrollDOM.getBoundingClientRect(),l=a.top+n.marginTop,u=a.bottom-n.marginBottom;o&&o.top>l&&o.bottom<u&&(s=Se.scrollIntoView(r.main.head,{y:"start",yMargin:o.top-l}))}return t.dispatch(Zs(i,r),{effects:s}),!0}const W9=t=>PQ(t,!1),j_=t=>PQ(t,!0);function El(t,e,n){let i=t.lineBlockAt(e.head),r=t.moveToLineBoundary(e,n);if(r.head==e.head&&r.head!=(n?i.to:i.from)&&(r=t.moveToLineBoundary(e,n,!1)),!n&&r.head==i.from&&i.length){let s=/^\s*/.exec(t.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;s&&e.head!=i.from+s&&(r=fe.cursor(i.from+s))}return r}const Zue=t=>zs(t,e=>El(t,e,!0)),zue=t=>zs(t,e=>El(t,e,!1)),Xue=t=>zs(t,e=>El(t,e,!Li(t))),Wue=t=>zs(t,e=>El(t,e,Li(t))),Hue=t=>zs(t,e=>fe.cursor(t.lineBlockAt(e.head).from,1)),Uue=t=>zs(t,e=>fe.cursor(t.lineBlockAt(e.head).to,-1));function que(t,e,n){let i=!1,r=mf(t.selection,s=>{let o=oo(t,s.head,-1)||oo(t,s.head,1)||s.head>0&&oo(t,s.head-1,1)||s.head<t.doc.length&&oo(t,s.head+1,-1);if(!o||!o.end)return s;i=!0;let a=o.start.from==s.head?o.end.to:o.end.from;return fe.cursor(a)});return i?(e(Zs(t,r)),!0):!1}const Yue=({state:t,dispatch:e})=>que(t,e);function ps(t,e,n){let i=mf(t.state.selection,r=>{r.undirectional&&r.head>=r.anchor!=e&&(r=fe.range(r.head,r.anchor));let s=n(r);return fe.range(r.anchor,s.head,s.goalColumn,s.bidiLevel||void 0,s.assoc)});return i.eq(t.state.selection)?!1:(t.dispatch(Zs(t.state,i)),!0)}function AQ(t,e){return ps(t,e,n=>t.moveByChar(n,e))}const $Q=t=>AQ(t,!Li(t)),IQ=t=>AQ(t,Li(t));function RQ(t,e){return ps(t,e,n=>t.moveByGroup(n,e))}const Gue=t=>RQ(t,!Li(t)),Kue=t=>RQ(t,Li(t)),Jue=t=>{let e=!Li(t);return ps(t,e,n=>Lx(t.state,n,e))},ece=t=>{let e=Li(t);return ps(t,e,n=>Lx(t.state,n,e))};function MQ(t,e){return ps(t,e,n=>t.moveVertically(n,e))}const NQ=t=>MQ(t,!1),LQ=t=>MQ(t,!0);function DQ(t,e){return ps(t,e,n=>t.moveVertically(n,e,TQ(t).height))}const H9=t=>DQ(t,!1),U9=t=>DQ(t,!0),tce=t=>ps(t,!0,e=>El(t,e,!0)),nce=t=>ps(t,!1,e=>El(t,e,!1)),ice=t=>{let e=!Li(t);return ps(t,e,n=>El(t,n,e))},rce=t=>{let e=Li(t);return ps(t,e,n=>El(t,n,e))},sce=t=>ps(t,!1,e=>fe.cursor(t.lineBlockAt(e.head).from)),oce=t=>ps(t,!0,e=>fe.cursor(t.lineBlockAt(e.head).to)),q9=({state:t,dispatch:e})=>(e(Zs(t,{anchor:0})),!0),Y9=({state:t,dispatch:e})=>(e(Zs(t,{anchor:t.doc.length})),!0),G9=({state:t,dispatch:e})=>(e(Zs(t,{anchor:t.selection.main.anchor,head:0})),!0),K9=({state:t,dispatch:e})=>(e(Zs(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),ace=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),lce=({state:t,dispatch:e})=>{let n=Dx(t).map(({from:i,to:r})=>fe.range(i,Math.min(r+1,t.doc.length)));return e(t.update({selection:fe.create(n),userEvent:"select"})),!0},uce=({state:t,dispatch:e})=>{let n=mf(t.selection,i=>{let r=sn(t),s=r.resolveStack(i.from,1);if(i.empty){let o=r.resolveStack(i.from,-1);o.node.from>=s.node.from&&o.node.to<=s.node.to&&(s=o)}for(let o=s;o;o=o.next){let{node:a}=o;if((a.from<i.from&&a.to>=i.to||a.to>i.to&&a.from<=i.from)&&o.next)return fe.range(a.to,a.from)}return i});return n.eq(t.selection)?!1:(e(Zs(t,n)),!0)};function QQ(t,e){let{state:n}=t,i=n.selection,r=n.selection.ranges.slice();for(let s of n.selection.ranges){let o=n.doc.lineAt(s.head);if(e?o.to<t.state.doc.length:o.from>0)for(let a=s;;){let l=t.moveVertically(a,e);if(l.head<o.from||l.head>o.to){r.some(u=>u.head==l.head)||r.push(l);break}else{if(l.head==a.head)break;a=l}}}return r.length==i.ranges.length?!1:(t.dispatch(Zs(n,fe.create(r,r.length-1))),!0)}const cce=t=>QQ(t,!1),hce=t=>QQ(t,!0),fce=({state:t,dispatch:e})=>{let n=t.selection,i=null;return n.ranges.length>1?i=fe.create([n.main]):n.main.empty||(i=fe.create([fe.cursor(n.main.head)])),i?(e(Zs(t,i)),!0):!1};function Cm(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:i}=t,r=i.changeByRange(s=>{let{from:o,to:a}=s;if(o==a){let l=e(s);l<o?(n="delete.backward",l=kg(t,l,!1)):l>o&&(n="delete.forward",l=kg(t,l,!0)),o=Math.min(o,l),a=Math.max(a,l)}else o=kg(t,o,!1),a=kg(t,a,!0);return o==a?{range:s}:{changes:{from:o,to:a},range:fe.cursor(o,o<s.head?-1:1)}});return r.changes.empty?!1:(t.dispatch(i.update(r,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?Se.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function kg(t,e,n){if(t instanceof Se)for(let i of t.state.facet(Se.atomicRanges).map(r=>r(t)))i.between(e,e,(r,s)=>{r<e&&s>e&&(e=n?s:r)});return e}const VQ=(t,e,n)=>Cm(t,i=>{let r=i.from,{state:s}=t,o=s.doc.lineAt(r),a,l;if(n&&!e&&r>o.from&&r<o.from+200&&!/[^ \t]/.test(a=o.text.slice(0,r-o.from))){if(a[a.length-1]==" ")return r-1;let u=Ns(a,s.tabSize),c=u%$u(s)||$u(s);for(let h=0;h<c&&a[a.length-1-h]==" ";h++)r--;l=r}else l=ui(o.text,r-o.from,e,e)+o.from,l==r&&o.number!=(e?s.doc.lines:1)?l+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(o.text.slice(l-o.from,r-o.from))&&(l=ui(o.text,l-o.from,!1,!1)+o.from);return l}),Z_=t=>VQ(t,!1,!0),BQ=t=>VQ(t,!0,!1),FQ=(t,e)=>Cm(t,n=>{let i=n.head,{state:r}=t,s=r.doc.lineAt(i),o=r.charCategorizer(i);for(let a=null;;){if(i==(e?s.to:s.from)){i==n.head&&s.number!=(e?r.doc.lines:1)&&(i+=e?1:-1);break}let l=ui(s.text,i-s.from,e)+s.from,u=s.text.slice(Math.min(i,l)-s.from,Math.max(i,l)-s.from),c=o(u);if(a!=null&&c!=a)break;(u!=" "||i!=n.head)&&(a=c),i=l}return i}),jQ=t=>FQ(t,!1),dce=t=>FQ(t,!0),pce=t=>Cm(t,e=>{let n=t.lineBlockAt(e.head).to;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),mce=t=>Cm(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),gce=t=>Cm(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),Oce=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:$t.of(["",""])},range:fe.cursor(i.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},xce=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(i=>{if(!i.empty||i.from==0||i.from==t.doc.length)return{range:i};let r=i.from,s=t.doc.lineAt(r),o=r==s.from?r-1:ui(s.text,r-s.from,!1)+s.from,a=r==s.to?r+1:ui(s.text,r-s.from,!0)+s.from;return{changes:{from:o,to:a,insert:t.doc.slice(r,a).append(t.doc.slice(o,r))},range:fe.cursor(a)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Dx(t){let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.from),s=t.doc.lineAt(i.to);if(!i.empty&&i.to==s.from&&(s=t.doc.lineAt(i.to-1)),n>=r.number){let o=e[e.length-1];o.to=s.to,o.ranges.push(i)}else e.push({from:r.from,to:s.to,ranges:[i]});n=s.number+1}return e}function ZQ(t,e,n){if(t.readOnly)return!1;let i=[],r=[];for(let s of Dx(t)){if(n?s.to==t.doc.length:s.from==0)continue;let o=t.doc.lineAt(n?s.to+1:s.from-1),a=o.length+1;if(n){i.push({from:s.to,to:o.to},{from:s.from,insert:o.text+t.lineBreak});for(let l of s.ranges)r.push(fe.range(Math.min(t.doc.length,l.anchor+a),Math.min(t.doc.length,l.head+a)))}else{i.push({from:o.from,to:s.from},{from:s.to,insert:t.lineBreak+o.text});for(let l of s.ranges)r.push(fe.range(l.anchor-a,l.head-a))}}return i.length?(e(t.update({changes:i,scrollIntoView:!0,selection:fe.create(r,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const yce=({state:t,dispatch:e})=>ZQ(t,e,!1),vce=({state:t,dispatch:e})=>ZQ(t,e,!0);function zQ(t,e,n){if(t.readOnly)return!1;let i=[];for(let s of Dx(t))n?i.push({from:s.from,insert:t.doc.slice(s.from,s.to)+t.lineBreak}):i.push({from:s.to,insert:t.lineBreak+t.doc.slice(s.from,s.to)});let r=t.changes(i);return e(t.update({changes:r,selection:t.selection.map(r,n?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}const bce=({state:t,dispatch:e})=>zQ(t,e,!1),Sce=({state:t,dispatch:e})=>zQ(t,e,!0),_ce=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(Dx(e).map(({from:r,to:s})=>(r>0?r--:s<e.doc.length&&s++,{from:r,to:s}))),i=mf(e.selection,r=>{let s;if(t.lineWrapping){let o=t.lineBlockAt(r.head),a=t.coordsAtPos(r.head,r.assoc||1);a&&(s=o.bottom+t.documentTop-a.bottom+t.defaultLineHeight/2)}return t.moveVertically(r,!0,s)}).map(n);return t.dispatch({changes:n,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function Cce(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=sn(t).resolveInner(e),i=n.childBefore(e),r=n.childAfter(e),s;return i&&r&&i.to<=e&&r.from>=e&&(s=i.type.prop(ot.closedBy))&&s.indexOf(r.name)>-1&&t.doc.lineAt(i.to).from==t.doc.lineAt(r.from).from&&!/\S/.test(t.sliceDoc(i.to,r.from))?{from:i.to,to:r.from}:null}const J9=XQ(!1),wce=XQ(!0);function XQ(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let i=e.changeByRange(r=>{let{from:s,to:o}=r,a=e.doc.lineAt(s),l=!t&&s==o&&Cce(e,s);t&&(s=o=(o<=a.to?a:e.doc.lineAt(o)).to);let u=new Ix(e,{simulateBreak:s,simulateDoubleBreak:!!l}),c=Pk(u,s);for(c==null&&(c=Ns(/^\s*/.exec(e.doc.lineAt(s).text)[0],e.tabSize));o<a.to&&/\s/.test(a.text[o-a.from]);)o++;l?{from:s,to:o}=l:s>a.from&&s<a.from+100&&!/\S/.test(a.text.slice(0,s))&&(s=a.from);let h=["",fp(e,c)];return l&&h.push(fp(e,u.lineIndent(a.from,-1))),{changes:{from:s,to:o,insert:$t.of(h)},range:fe.cursor(s+1+h[1].length)}});return n(e.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}}function Lk(t,e){let n=-1;return t.changeByRange(i=>{let r=[];for(let o=i.from;o<=i.to;){let a=t.doc.lineAt(o);a.number>n&&(i.empty||i.to>a.from)&&(e(a,r,i),n=a.number),o=a.to+1}let s=t.changes(r);return{changes:r,range:fe.range(s.mapPos(i.anchor,1),s.mapPos(i.head,1))}})}const kce=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),i=new Ix(t,{overrideIndentation:s=>{let o=n[s];return o??-1}}),r=Lk(t,(s,o,a)=>{let l=Pk(i,s.from);if(l==null)return;/\S/.test(s.text)||(l=0);let u=/^\s*/.exec(s.text)[0],c=fp(t,l);(u!=c||a.from<s.from+u.length)&&(n[s.from]=l,o.push({from:s.from,to:s.from+u.length,insert:c}))});return r.changes.empty||e(t.update(r,{userEvent:"indent"})),!0},WQ=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(Lk(t,(n,i)=>{i.push({from:n.from,insert:t.facet(bm)})}),{userEvent:"input.indent"})),!0),HQ=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(Lk(t,(n,i)=>{let r=/^\s*/.exec(n.text)[0];if(!r)return;let s=Ns(r,t.tabSize),o=0,a=fp(t,Math.max(0,s-$u(t)));for(;o<r.length&&o<a.length&&r.charCodeAt(o)==a.charCodeAt(o);)o++;i.push({from:n.from+o,to:n.from+r.length,insert:a.slice(o)})}),{userEvent:"delete.dedent"})),!0),Ece=t=>(t.setTabFocusMode(),!0),Tce=[{key:"Ctrl-b",run:SQ,shift:$Q,preventDefault:!0},{key:"Ctrl-f",run:_Q,shift:IQ},{key:"Ctrl-p",run:kQ,shift:NQ},{key:"Ctrl-n",run:EQ,shift:LQ},{key:"Ctrl-a",run:Hue,shift:sce},{key:"Ctrl-e",run:Uue,shift:oce},{key:"Ctrl-d",run:BQ},{key:"Ctrl-h",run:Z_},{key:"Ctrl-k",run:pce},{key:"Ctrl-Alt-h",run:jQ},{key:"Ctrl-o",run:Oce},{key:"Ctrl-t",run:xce},{key:"Ctrl-v",run:j_}],Pce=[{key:"ArrowLeft",run:SQ,shift:$Q,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:Que,shift:Gue,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:Xue,shift:ice,preventDefault:!0},{key:"ArrowRight",run:_Q,shift:IQ,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:Vue,shift:Kue,preventDefault:!0},{mac:"Cmd-ArrowRight",run:Wue,shift:rce,preventDefault:!0},{key:"ArrowUp",run:kQ,shift:NQ,preventDefault:!0},{mac:"Cmd-ArrowUp",run:q9,shift:G9},{mac:"Ctrl-ArrowUp",run:W9,shift:H9},{key:"ArrowDown",run:EQ,shift:LQ,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Y9,shift:K9},{mac:"Ctrl-ArrowDown",run:j_,shift:U9},{key:"PageUp",run:W9,shift:H9},{key:"PageDown",run:j_,shift:U9},{key:"Home",run:zue,shift:nce,preventDefault:!0},{key:"Mod-Home",run:q9,shift:G9},{key:"End",run:Zue,shift:tce,preventDefault:!0},{key:"Mod-End",run:Y9,shift:K9},{key:"Enter",run:J9,shift:J9},{key:"Mod-a",run:ace},{key:"Backspace",run:Z_,shift:Z_,preventDefault:!0},{key:"Delete",run:BQ,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:jQ,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:dce,preventDefault:!0},{mac:"Mod-Backspace",run:mce,preventDefault:!0},{mac:"Mod-Delete",run:gce,preventDefault:!0}].concat(Tce.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),Ace=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:Fue,shift:Jue},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:jue,shift:ece},{key:"Alt-ArrowUp",run:yce},{key:"Shift-Alt-ArrowUp",run:bce},{key:"Alt-ArrowDown",run:vce},{key:"Shift-Alt-ArrowDown",run:Sce},{key:"Mod-Alt-ArrowUp",run:cce},{key:"Mod-Alt-ArrowDown",run:hce},{key:"Escape",run:fce},{key:"Mod-Enter",run:wce},{key:"Alt-l",mac:"Ctrl-l",run:lce},{key:"Mod-i",run:uce,preventDefault:!0},{key:"Mod-[",run:HQ},{key:"Mod-]",run:WQ},{key:"Mod-Alt-\\",run:kce},{key:"Shift-Mod-k",run:_ce},{key:"Shift-Mod-\\",run:Yue},{key:"Mod-/",run:yue},{key:"Alt-A",run:bue},{key:"Ctrl-m",mac:"Shift-Alt-m",run:Ece}].concat(Pce),$ce={key:"Tab",run:WQ,shift:HQ},e$="#2e3440",Dk="#3b4252",t$="#434c5e",Eg="#4c566a",n$="#e5e9f0",z_="#eceff4",jv="#8fbcbb",i$="#88c0d0",Ice="#81a1c1",xs="#5e81ac",Rce="#bf616a",dc="#d08770",Zv="#ebcb8b",r$="#a3be8c",Mce="#b48ead",s$="#d30102",Qk=z_,zv=Qk,Nce="#ffffff",Xv=Dk,Lce=Qk,o$=Dk,Dce=Se.theme({"&":{color:e$,backgroundColor:Nce},".cm-content":{caretColor:o$},".cm-cursor, .cm-dropCursor":{borderLeftColor:o$},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Lce},".cm-panels":{backgroundColor:Qk,color:Eg},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:`1px solid ${Eg}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:n$},".cm-activeLine":{backgroundColor:zv},".cm-selectionMatch":{backgroundColor:n$},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{outline:`1px solid ${Eg}`},"&.cm-focused .cm-matchingBracket":{backgroundColor:z_},".cm-gutters":{backgroundColor:z_,color:e$,border:"none"},".cm-activeLineGutter":{backgroundColor:zv},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Xv},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Xv,borderBottomColor:Xv},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:zv,color:Eg}}},{dark:!1}),Qce=_m.define([{tag:Q.keyword,color:xs},{tag:[Q.name,Q.deleted,Q.character,Q.propertyName,Q.macroName],color:dc},{tag:[Q.variableName],color:dc},{tag:[Q.function(Q.variableName)],color:xs},{tag:[Q.labelName],color:Ice},{tag:[Q.color,Q.constant(Q.name),Q.standard(Q.name)],color:xs},{tag:[Q.definition(Q.name),Q.separator],color:r$},{tag:[Q.brace],color:jv},{tag:[Q.annotation],color:s$},{tag:[Q.number,Q.changed,Q.annotation,Q.modifier,Q.self,Q.namespace],color:i$},{tag:[Q.typeName,Q.className],color:Zv},{tag:[Q.operator,Q.operatorKeyword],color:r$},{tag:[Q.tagName],color:Mce},{tag:[Q.squareBracket],color:Rce},{tag:[Q.angleBracket],color:dc},{tag:[Q.attributeName],color:Zv},{tag:[Q.regexp],color:xs},{tag:[Q.quote],color:Dk},{tag:[Q.string],color:dc},{tag:Q.link,color:jv,textDecoration:"underline",textUnderlinePosition:"under"},{tag:[Q.url,Q.escape,Q.special(Q.string)],color:dc},{tag:[Q.meta],color:i$},{tag:[Q.comment],color:t$,fontStyle:"italic"},{tag:Q.strong,fontWeight:"bold",color:xs},{tag:Q.emphasis,fontStyle:"italic",color:xs},{tag:Q.strikethrough,textDecoration:"line-through"},{tag:Q.heading,fontWeight:"bold",color:xs},{tag:Q.special(Q.heading1),fontWeight:"bold",color:xs},{tag:Q.heading1,fontWeight:"bold",color:xs},{tag:[Q.heading2,Q.heading3,Q.heading4],fontWeight:"bold",color:xs},{tag:[Q.heading5,Q.heading6],color:xs},{tag:[Q.atom,Q.bool,Q.special(Q.variableName)],color:dc},{tag:[Q.processingInstruction,Q.inserted],color:jv},{tag:[Q.contentSeparator],color:Zv},{tag:Q.invalid,color:t$,borderBottom:`1px dotted ${s$}`}]),UQ=[Dce,rQ(Qce)],a$=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class yh{constructor(e,n,i=0,r=e.length,s,o){this.test=o,this.value={from:0,to:0,precise:!1},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,r),this.bufferStart=i,this.normalize=s?a=>s(a$(a)):a$,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return tr(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=uk(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=Js(e);let r=this.normalize(n);if(r.length)for(let s=0,o=i,a=!0;;s++){let l=r.charCodeAt(s),u=this.match(l,o,a,this.bufferPos+this.bufferStart,s==r.length-1);if(u)return this.value=u,this;if(s==r.length-1)break;a&&s<n.length&&n.charCodeAt(s)==l?o++:a=!1}}}match(e,n,i,r,s){let o=null;for(let a=0;a<this.matches.length;){let l=this.matches[a],u=!1;this.query.charCodeAt(l.index)==e&&(l.index==this.query.length-1?o={from:l.from,to:r,precise:s&&l.precise}:(l.index++,u=!0)),u?a++:this.matches.splice(a,1)}return this.query.charCodeAt(0)==e&&(this.query.length==1?o={from:n,to:r,precise:i&&s}:this.matches.push({from:n,index:1,precise:i})),o&&this.test&&!this.test(o.from,o.to,this.buffer,this.bufferStart)&&(o=null),o}}typeof Symbol<"u"&&(yh.prototype[Symbol.iterator]=function(){return this});const qQ={from:-1,to:-1,match:/.*/.exec(""),precise:!0},Vk="gm"+(/x/.unicode==null?"":"u");class YQ{constructor(e,n,i,r=0,s=e.length){if(this.text=e,this.to=s,this.curLine="",this.done=!1,this.value=qQ,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new GQ(e,n,i,r,s);this.re=new RegExp(n,Vk+(i!=null&&i.ignoreCase?"i":"")),this.test=i==null?void 0:i.test,this.iter=e.iter();let o=e.lineAt(r);this.curLineStart=o.from,this.matchPos=LO(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let i=this.curLineStart+n.index,r=i+n[0].length;if(this.matchPos=LO(this.text,r+(i==r?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(i<r||i>this.value.to)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,precise:!0,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const Wv=new WeakMap;class Xc{constructor(e,n){this.from=e,this.text=n}get to(){return this.from+this.text.length}static get(e,n,i){let r=Wv.get(e);if(!r||r.from>=i||r.to<=n){let a=new Xc(n,e.sliceString(n,i));return Wv.set(e,a),a}if(r.from==n&&r.to==i)return r;let{text:s,from:o}=r;return o>n&&(s=e.sliceString(n,o)+s,o=n),r.to<i&&(s+=e.sliceString(r.to,i)),Wv.set(e,new Xc(o,s)),new Xc(n,s.slice(n-o,i-o))}}class GQ{constructor(e,n,i,r,s){this.text=e,this.to=s,this.done=!1,this.value=qQ,this.matchPos=LO(e,r),this.re=new RegExp(n,Vk+(i!=null&&i.ignoreCase?"i":"")),this.test=i==null?void 0:i.test,this.flat=Xc.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let i=this.flat.from+n.index,r=i+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,precise:!0,match:n},this.matchPos=LO(this.text,r+(i==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Xc.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(YQ.prototype[Symbol.iterator]=GQ.prototype[Symbol.iterator]=function(){return this});function Vce(t){try{return new RegExp(t,Vk),!0}catch{return!1}}function LO(t,e){if(e>=t.length)return e;let n=t.lineAt(e),i;for(;e<n.to&&(i=n.text.charCodeAt(e-n.from))>=56320&&i<57344;)e++;return e}const Bce=t=>{let{state:e}=t,n=String(e.doc.lineAt(t.state.selection.main.head).number),{close:i,result:r}=ole(t,{label:e.phrase("Go to line"),input:{type:"text",name:"line",value:n},focus:!0,submitLabel:e.phrase("go")});return r.then(s=>{let o=s&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(s.elements.line.value);if(!o){t.dispatch({effects:i});return}let a=e.doc.lineAt(e.selection.main.head),[,l,u,c,h]=o,f=c?+c.slice(1):0,p=u?+u:a.number;if(u&&h){let x=p/100;l&&(x=x*(l=="-"?-1:1)+a.number/e.doc.lines),p=Math.round(e.doc.lines*x)}else u&&l&&(p=p*(l=="-"?-1:1)+a.number);let m=e.doc.line(Math.max(1,Math.min(e.doc.lines,p))),g=fe.cursor(m.from+Math.max(0,Math.min(f,m.length)));t.dispatch({effects:[i,Se.scrollIntoView(g.from,{y:"center"})],selection:g})}),!0},Fce={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},jce=Qe.define({combine(t){return wo(t,Fce,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function Zce(t){return[Uce,Hce]}const zce=Xe.mark({class:"cm-selectionMatch"}),Xce=Xe.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function l$(t,e,n,i){return(n==0||t(e.sliceDoc(n-1,n))!=Cn.Word)&&(i==e.doc.length||t(e.sliceDoc(i,i+1))!=Cn.Word)}function Wce(t,e,n,i){return t(e.sliceDoc(n,n+1))==Cn.Word&&t(e.sliceDoc(i-1,i))==Cn.Word}const Hce=Ln.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(jce),{state:n}=t,i=n.selection;if(i.ranges.length>1)return Xe.none;let r=i.main,s,o=null;if(r.empty){if(!e.highlightWordAroundCursor)return Xe.none;let l=n.wordAt(r.head);if(!l)return Xe.none;o=n.charCategorizer(r.head),s=n.sliceDoc(l.from,l.to)}else{let l=r.to-r.from;if(l<e.minSelectionLength||l>200)return Xe.none;if(e.wholeWords){if(s=n.sliceDoc(r.from,r.to),o=n.charCategorizer(r.head),!(l$(o,n,r.from,r.to)&&Wce(o,n,r.from,r.to)))return Xe.none}else if(s=n.sliceDoc(r.from,r.to),!s)return Xe.none}let a=[];for(let l of t.visibleRanges){let u=new yh(n.doc,s,l.from,l.to);for(;!u.next().done;){let{from:c,to:h}=u.value;if((!o||l$(o,n,c,h))&&(r.empty&&c<=r.from&&h>=r.to?a.push(Xce.range(c,h)):(c>=r.to||h<=r.from)&&a.push(zce.range(c,h)),a.length>e.maxMatches))return Xe.none}}return Xe.set(a)}},{decorations:t=>t.decorations}),Uce=Se.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),qce=({state:t,dispatch:e})=>{let{selection:n}=t,i=fe.create(n.ranges.map(r=>t.wordAt(r.head)||fe.cursor(r.head)),n.mainIndex);return i.eq(n)?!1:(e(t.update({selection:i})),!0)};function Yce(t,e){let{main:n,ranges:i}=t.selection,r=t.wordAt(n.head),s=r&&r.from==n.from&&r.to==n.to;for(let o=!1,a=new yh(t.doc,e,i[i.length-1].to);;)if(a.next(),a.done){if(o)return null;a=new yh(t.doc,e,0,Math.max(0,i[i.length-1].from-1)),o=!0}else{if(o&&i.some(l=>l.from==a.value.from))continue;if(s){let l=t.wordAt(a.value.from);if(!l||l.from!=a.value.from||l.to!=a.value.to)continue}return a.value}}const Gce=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(s=>s.from===s.to))return qce({state:t,dispatch:e});let i=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(s=>t.sliceDoc(s.from,s.to)!=i))return!1;let r=Yce(t,i);return r?(e(t.update({selection:t.selection.addRange(fe.range(r.from,r.to),!1),effects:Se.scrollIntoView(r.to)})),!0):!1},gf=Qe.define({combine(t){return wo(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new hhe(e),scrollToMatch:e=>Se.scrollIntoView(e)})}});class KQ{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||Vce(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,i)=>i=="n"?`
|
|
131
|
+
`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new ihe(this):new ehe(this)}getCursor(e,n=0,i){let r=e.doc?e:mt.create({doc:e});return i==null&&(i=r.doc.length),this.regexp?xc(this,r,n,i):Oc(this,r,n,i)}}class JQ{constructor(e){this.spec=e}}function Kce(t,e,n){return(i,r,s,o)=>{if(n&&!n(i,r,s,o))return!1;let a=i>=o&&r<=o+s.length?s.slice(i-o,r-o):e.doc.sliceString(i,r);return t(a,e,i,r)}}function Oc(t,e,n,i){let r;return t.wholeWord&&(r=Jce(e.doc,e.charCategorizer(e.selection.main.head))),t.test&&(r=Kce(t.test,e,r)),new yh(e.doc,t.unquoted,n,i,t.caseSensitive?void 0:s=>s.toLowerCase(),r)}function Jce(t,e){return(n,i,r,s)=>((s>n||s+r.length<i)&&(s=Math.max(0,n-2),r=t.sliceString(s,Math.min(t.length,i+2))),(e(DO(r,n-s))!=Cn.Word||e(QO(r,n-s))!=Cn.Word)&&(e(QO(r,i-s))!=Cn.Word||e(DO(r,i-s))!=Cn.Word))}class ehe extends JQ{constructor(e){super(e)}nextMatch(e,n,i){let r=Oc(this.spec,e,i,e.doc.length).nextOverlapping();if(r.done){let s=Math.min(e.doc.length,n+this.spec.unquoted.length);r=Oc(this.spec,e,0,s).nextOverlapping()}return r.done||r.value.from==n&&r.value.to==i?null:r.value}prevMatchInRange(e,n,i){for(let r=i;;){let s=Math.max(n,r-1e4-this.spec.unquoted.length),o=Oc(this.spec,e,s,r),a=null;for(;!o.nextOverlapping().done;)a=o.value;if(a)return a;if(s==n)return null;r-=1e4}}prevMatch(e,n,i){let r=this.prevMatchInRange(e,0,n);return r||(r=this.prevMatchInRange(e,Math.max(0,i-this.spec.unquoted.length),e.doc.length)),r&&(r.from!=n||r.to!=i)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,n){let i=Oc(this.spec,e,0,e.doc.length),r=[];for(;!i.next().done;){if(r.length>=n)return null;r.push(i.value)}return r}highlight(e,n,i,r){let s=Oc(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)r(s.value.from,s.value.to)}}function the(t,e,n){return(i,r,s)=>(!n||n(i,r,s))&&t(s[0],e,i,r)}function xc(t,e,n,i){let r;return t.wholeWord&&(r=nhe(e.charCategorizer(e.selection.main.head))),t.test&&(r=the(t.test,e,r)),new YQ(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:r},n,i)}function DO(t,e){return t.slice(ui(t,e,!1),e)}function QO(t,e){return t.slice(e,ui(t,e))}function nhe(t){return(e,n,i)=>!i[0].length||(t(DO(i.input,i.index))!=Cn.Word||t(QO(i.input,i.index))!=Cn.Word)&&(t(QO(i.input,i.index+i[0].length))!=Cn.Word||t(DO(i.input,i.index+i[0].length))!=Cn.Word)}class ihe extends JQ{nextMatch(e,n,i){let r=xc(this.spec,e,i,e.doc.length).next();return r.done&&(r=xc(this.spec,e,0,n).next()),r.done?null:r.value}prevMatchInRange(e,n,i){for(let r=1;;r++){let s=Math.max(n,i-r*1e4),o=xc(this.spec,e,s,i),a=null;for(;!o.next().done;)a=o.value;if(a&&(s==n||a.from>s+10))return a;if(s==n)return null}}prevMatch(e,n,i){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(n,i)=>{if(i=="&")return e.match[0];if(i=="$")return"$";for(let r=i.length;r>0;r--){let s=+i.slice(0,r);if(s>0&&s<e.match.length)return e.match[s]+i.slice(r)}return n})}matchAll(e,n){let i=xc(this.spec,e,0,e.doc.length),r=[];for(;!i.next().done;){if(r.length>=n)return null;r.push(i.value)}return r}highlight(e,n,i,r){let s=xc(this.spec,e,Math.max(0,n-250),Math.min(i+250,e.doc.length));for(;!s.next().done;)r(s.value.from,s.value.to)}}const pp=nt.define(),Bk=nt.define(),Ga=Wn.define({create(t){return new Hv(X_(t).create(),null)},update(t,e){for(let n of e.effects)n.is(pp)?t=new Hv(n.value.create(),t.panel):n.is(Bk)&&(t=new Hv(t.query,n.value?Fk:null));return t},provide:t=>cp.from(t,e=>e.panel)});class Hv{constructor(e,n){this.query=e,this.panel=n}}const rhe=Xe.mark({class:"cm-searchMatch"}),she=Xe.mark({class:"cm-searchMatch cm-searchMatch-selected"}),ohe=Ln.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Ga))}update(t){let e=t.state.field(Ga);(e!=t.startState.field(Ga)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return Xe.none;let{view:n}=this,i=new dr;for(let r=0,s=n.visibleRanges,o=s.length;r<o;r++){let{from:a,to:l}=s[r];for(;r<o-1&&l>s[r+1].from-500;)l=s[++r].to;t.highlight(n.state,a,l,(u,c)=>{let h=n.state.selection.ranges.some(f=>f.from==u&&f.to==c);i.add(u,c,h?she:rhe)})}return i.finish()}},{decorations:t=>t.decorations});function wm(t){return e=>{let n=e.state.field(Ga,!1);return n&&n.query.spec.valid?t(e,n):nV(e)}}const VO=wm((t,{query:e})=>{let{to:n}=t.state.selection.main,i=e.nextMatch(t.state,n,n);if(!i)return!1;let r=fe.single(i.from,i.to),s=t.state.facet(gf);return t.dispatch({selection:r,effects:[jk(t,i),s.scrollToMatch(r.main,t)],userEvent:"select.search"}),tV(t),!0}),BO=wm((t,{query:e})=>{let{state:n}=t,{from:i}=n.selection.main,r=e.prevMatch(n,i,i);if(!r)return!1;let s=fe.single(r.from,r.to),o=t.state.facet(gf);return t.dispatch({selection:s,effects:[jk(t,r),o.scrollToMatch(s.main,t)],userEvent:"select.search"}),tV(t),!0}),ahe=wm((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:fe.create(n.map(i=>fe.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),lhe=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:i,to:r}=n.main,s=[],o=0;for(let a=new yh(t.doc,t.sliceDoc(i,r));!a.next().done;){if(s.length>1e3)return!1;a.value.from==i&&(o=s.length),s.push(fe.range(a.value.from,a.value.to))}return e(t.update({selection:fe.create(s,o),userEvent:"select.search.matches"})),!0},u$=wm((t,{query:e})=>{let{state:n}=t,{from:i,to:r}=n.selection.main;if(n.readOnly)return!1;let s=e.nextMatch(n,i,i);if(!s)return!1;let o=s,a=[],l,u,c=[];o.precise?o.from==i&&o.to==r&&(u=n.toText(e.getReplacement(o)),a.push({from:o.from,to:o.to,insert:u}),o=e.nextMatch(n,o.from,o.to),c.push(Se.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(i).number)+"."))):o=e.nextMatch(n,o.from,o.to);let h=t.state.changes(a);return o&&(l=fe.single(o.from,o.to).map(h),c.push(jk(t,o)),c.push(n.facet(gf).scrollToMatch(l.main,t))),t.dispatch({changes:h,selection:l,effects:c,userEvent:"input.replace"}),!0}),uhe=wm((t,{query:e})=>{if(t.state.readOnly)return!1;let n=[];for(let r of e.matchAll(t.state,1e9)){let{from:s,to:o,precise:a}=r;a&&n.push({from:s,to:o,insert:e.getReplacement(r)})}if(!n.length)return!1;let i=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:Se.announce.of(i),userEvent:"input.replace.all"}),!0});function Fk(t){return t.state.facet(gf).createPanel(t)}function X_(t,e){var n,i,r,s,o;let a=t.selection.main,l=a.empty||a.to>a.from+100?"":t.sliceDoc(a.from,a.to);if(e&&!l)return e;let u=t.facet(gf);return new KQ({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:u.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(i=e==null?void 0:e.caseSensitive)!==null&&i!==void 0?i:u.caseSensitive,literal:(r=e==null?void 0:e.literal)!==null&&r!==void 0?r:u.literal,regexp:(s=e==null?void 0:e.regexp)!==null&&s!==void 0?s:u.regexp,wholeWord:(o=e==null?void 0:e.wholeWord)!==null&&o!==void 0?o:u.wholeWord})}function eV(t){let e=kk(t,Fk);return e&&e.dom.querySelector("[main-field]")}function tV(t){let e=eV(t);e&&e==t.root.activeElement&&e.select()}const nV=t=>{let e=t.state.field(Ga,!1);if(e&&e.panel){let n=eV(t);if(n&&n!=t.root.activeElement){let i=X_(t.state,e.query.spec);i.valid&&t.dispatch({effects:pp.of(i)}),n.focus(),n.select()}}else t.dispatch({effects:[Bk.of(!0),e?pp.of(X_(t.state,e.query.spec)):nt.appendConfig.of(dhe)]});return!0},iV=t=>{let e=t.state.field(Ga,!1);if(!e||!e.panel)return!1;let n=kk(t,Fk);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:Bk.of(!1)}),!0},che=[{key:"Mod-f",run:nV,scope:"editor search-panel"},{key:"F3",run:VO,shift:BO,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:VO,shift:BO,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:iV,scope:"editor search-panel"},{key:"Mod-Shift-l",run:lhe},{key:"Mod-Alt-g",run:Bce},{key:"Mod-d",run:Gce,preventDefault:!0}];class hhe{constructor(e){this.view=e;let n=this.query=e.state.field(Ga).query.spec;this.commit=this.commit.bind(this),this.searchField=en("input",{value:n.search,placeholder:gr(e,"Find"),"aria-label":gr(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=en("input",{value:n.replace,placeholder:gr(e,"Replace"),"aria-label":gr(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=en("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=en("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=en("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function i(r,s,o){return en("button",{class:"cm-button",name:r,onclick:s,type:"button"},o)}this.dom=en("div",{onkeydown:r=>this.keydown(r),class:"cm-search"},[this.searchField,i("next",()=>VO(e),[gr(e,"next")]),i("prev",()=>BO(e),[gr(e,"previous")]),i("select",()=>ahe(e),[gr(e,"all")]),en("label",null,[this.caseField,gr(e,"match case")]),en("label",null,[this.reField,gr(e,"regexp")]),en("label",null,[this.wordField,gr(e,"by word")]),...e.state.readOnly?[]:[en("br"),this.replaceField,i("replace",()=>u$(e),[gr(e,"replace")]),i("replaceAll",()=>uhe(e),[gr(e,"replace all")])],en("button",{name:"close",onclick:()=>iV(e),"aria-label":gr(e,"close"),type:"button"},["×"])])}commit(){let e=new KQ({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:pp.of(e)}))}keydown(e){gae(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?BO:VO)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),u$(this.view))}update(e){for(let n of e.transactions)for(let i of n.effects)i.is(pp)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(gf).top}}function gr(t,e){return t.state.phrase(e)}const Tg=30,Pg=/[\s\.,:;?!]/;function jk(t,{from:e,to:n}){let i=t.state.doc.lineAt(e),r=t.state.doc.lineAt(n).to,s=Math.max(i.from,e-Tg),o=Math.min(r,n+Tg),a=t.state.sliceDoc(s,o);if(s!=i.from){for(let l=0;l<Tg;l++)if(!Pg.test(a[l+1])&&Pg.test(a[l])){a=a.slice(l);break}}if(o!=r){for(let l=a.length-1;l>a.length-Tg;l--)if(!Pg.test(a[l-1])&&Pg.test(a[l])){a=a.slice(0,l);break}}return Se.announce.of(`${t.state.phrase("current match")}. ${a} ${t.state.phrase("on line")} ${i.number}.`)}const fhe=Se.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),dhe=[Ga,js.low(ohe),fhe];class Zk{constructor(e,n,i,r){this.state=e,this.pos=n,this.explicit=i,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=sn(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),i=Math.max(n.from,this.pos-250),r=n.text.slice(i-n.from,this.pos-n.from),s=r.search(sV(e,!1));return s<0?null:{from:i+s,to:this.pos,text:r.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,i){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),i&&i.onDocChange&&(this.abortOnDocChange=!0))}}function c$(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function phe(t){let e=Object.create(null),n=Object.create(null);for(let{label:r}of t){e[r[0]]=!0;for(let s=1;s<r.length;s++)n[r[s]]=!0}let i=c$(e)+c$(n)+"*$";return[new RegExp("^"+i),new RegExp(i)]}function rV(t){let e=t.map(r=>typeof r=="string"?{label:r}:r),[n,i]=e.every(r=>/^\w+$/.test(r.label))?[/\w*$/,/\w+$/]:phe(e);return r=>{let s=r.matchBefore(i);return s||r.explicit?{from:s?s.from:r.pos,options:e,validFor:n}:null}}function mhe(t,e){return n=>{for(let i=sn(n.state).resolveInner(n.pos,-1);i;i=i.parent){if(t.indexOf(i.name)>-1)return null;if(i.type.isTop)break}return e(n)}}class h${constructor(e,n,i,r){this.completion=e,this.source=n,this.match=i,this.score=r}}function ru(t){return t.selection.main.from}function sV(t,e){var n;let{source:i}=t,r=e&&i[0]!="^",s=i[i.length-1]!="$";return!r&&!s?t:new RegExp(`${r?"^":""}(?:${i})${s?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const zk=va.define();function ghe(t,e,n,i){let{main:r}=t.selection,s=n-r.from,o=i-r.from;return{...t.changeByRange(a=>{if(a!=r&&n!=i&&t.sliceDoc(a.from+s,a.from+o)!=t.sliceDoc(n,i))return{range:a};let l=t.toText(e);return{changes:{from:a.from+s,to:i==r.from?a.to:a.from+o,insert:l},range:fe.cursor(a.from+s+l.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const f$=new WeakMap;function Ohe(t){if(!Array.isArray(t))return t;let e=f$.get(t);return e||f$.set(t,e=rV(t)),e}const FO=nt.define(),mp=nt.define();class xhe{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n<e.length;){let i=tr(e,n),r=Js(i);this.chars.push(i);let s=e.slice(n,n+r),o=s.toUpperCase();this.folded.push(tr(o==s?s.toLowerCase():o,0)),n+=r}this.astral=e.length!=this.chars.length}ret(e,n){return this.score=e,this.matched=n,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:n,folded:i,any:r,precise:s,byWord:o}=this;if(n.length==1){let S=tr(e,0),_=Js(S),k=_==e.length?0:-100;if(S!=n[0])if(S==i[0])k+=-200;else return null;return this.ret(k,[0,_])}let a=e.indexOf(this.pattern);if(a==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let l=n.length,u=0;if(a<0){for(let S=0,_=Math.min(e.length,200);S<_&&u<l;){let k=tr(e,S);(k==n[u]||k==i[u])&&(r[u++]=S),S+=Js(k)}if(u<l)return null}let c=0,h=0,f=!1,p=0,m=-1,g=-1,x=/[a-z]/.test(e),y=!0;for(let S=0,_=Math.min(e.length,200),k=0;S<_&&h<l;){let w=tr(e,S);a<0&&(c<l&&w==n[c]&&(s[c++]=S),p<l&&(w==n[p]||w==i[p]?(p==0&&(m=S),g=S+1,p++):p=0));let b,E=w<255?w>=48&&w<=57||w>=97&&w<=122?2:w>=65&&w<=90?1:0:(b=uk(w))!=b.toLowerCase()?1:b!=b.toUpperCase()?2:0;(!S||E==1&&x||k==0&&E!=0)&&(n[h]==w||i[h]==w&&(f=!0)?o[h++]=S:o.length&&(y=!1)),k=E,S+=Js(w)}return h==l&&o[0]==0&&y?this.result(-100+(f?-200:0),o,e):p==l&&m==0?this.ret(-200-e.length+(g==e.length?0:-100),[0,g]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):p==l?this.ret(-900-e.length,[m,g]):h==l?this.result(-100+(f?-200:0)+-700+(y?0:-1100),o,e):n.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,n,i){let r=[],s=0;for(let o of n){let a=o+(this.astral?Js(tr(i,o)):1);s&&r[s-1]==o?r[s-1]=a:(r[s++]=o,r[s++]=a)}return this.ret(e-i.length,r)}}class yhe{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let n=e.slice(0,this.pattern.length),i=n==this.pattern?0:n.toLowerCase()==this.folded?-200:null;return i==null?null:(this.matched=[0,n.length],this.score=i+(e.length==this.pattern.length?0:-100),this)}}const li=Qe.define({combine(t){return wo(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:vhe,filterStrict:!1,compareCompletions:(e,n)=>(e.sortText||e.label).localeCompare(n.sortText||n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>i=>d$(e(i),n(i)),optionClass:(e,n)=>i=>d$(e(i),n(i)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function d$(t,e){return t?e?t+" "+e:t:e}function vhe(t,e,n,i,r,s){let o=t.textDirection==un.RTL,a=o,l=!1,u="top",c,h,f=e.left-r.left,p=r.right-e.right,m=i.right-i.left,g=i.bottom-i.top;if(a&&f<Math.min(m,p)?a=!1:!a&&p<Math.min(m,f)&&(a=!0),m<=(a?f:p))c=Math.max(r.top,Math.min(n.top,r.bottom-g))-e.top,h=Math.min(400,a?f:p);else{l=!0,h=Math.min(400,(o?e.right:r.right-e.left)-30);let S=r.bottom-e.bottom;S>=g||S>e.top?c=n.bottom-e.top:(u="bottom",c=e.bottom-n.top)}let x=(e.bottom-e.top)/s.offsetHeight,y=(e.right-e.left)/s.offsetWidth;return{style:`${u}: ${c/x}px; max-width: ${h/y}px`,class:"cm-completionInfo-"+(l?o?"left-narrow":"right-narrow":a?"left":"right")}}const Xk=nt.define();function bhe(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),n.type&&i.classList.add(...n.type.split(/\s+/g).map(r=>"cm-completionIcon-"+r)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(n,i,r,s){let o=document.createElement("span");o.className="cm-completionLabel";let a=n.displayLabel||n.label,l=0;for(let u=0;u<s.length;){let c=s[u++],h=s[u++];c>l&&o.appendChild(document.createTextNode(a.slice(l,c)));let f=o.appendChild(document.createElement("span"));f.appendChild(document.createTextNode(a.slice(c,h))),f.className="cm-completionMatchedText",l=h}return l<a.length&&o.appendChild(document.createTextNode(a.slice(l))),o},position:50},{render(n){if(!n.detail)return null;let i=document.createElement("span");return i.className="cm-completionDetail",i.textContent=n.detail,i},position:80}),e.sort((n,i)=>n.position-i.position).map(n=>n.render)}function Uv(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let r=Math.floor(e/n);return{from:r*n,to:(r+1)*n}}let i=Math.ceil((t-e)/n);return{from:t-i*n,to:t-(i-1)*n}}class She{constructor(e,n,i){this.view=e,this.stateField=n,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let r=e.state.field(n),{options:s,selected:o}=r.open,a=e.state.facet(li);this.optionContent=bhe(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=Uv(s.length,o,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:u}=e.state.field(n).open;for(let c=l.target,h;c&&c!=this.dom;c=c.parentNode)if(c.nodeName=="LI"&&(h=/-(\d+)$/.exec(c.id))&&+h[1]<u.length){this.applyCompletion(e,u[+h[1]]),l.preventDefault();return}if(l.target==this.list){let c=this.list.classList.contains("cm-completionListIncompleteTop")&&l.clientY<this.list.firstChild.getBoundingClientRect().top?this.range.from-1:this.list.classList.contains("cm-completionListIncompleteBottom")&&l.clientY>this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;c!=null&&(e.dispatch({effects:Xk.of(c)}),l.preventDefault())}}),this.dom.addEventListener("focusout",l=>{let u=e.state.field(this.stateField,!1);u&&u.tooltip&&e.state.facet(li).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:mp.of(null)})}),this.showOptions(s,r.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let i=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),i!=r){let{options:s,selected:o,disabled:a}=i.open;(!r.open||r.open.options!=s)&&(this.range=Uv(s.length,o,e.state.facet(li).maxRenderedOptions),this.showOptions(s,i.id)),this.updateSel(),a!=((n=r.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of n.split(" "))i&&this.dom.classList.add(i);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;(n.selected>-1&&n.selected<this.range.from||n.selected>=this.range.to)&&(this.range=Uv(n.options.length,n.selected,this.view.state.facet(li).maxRenderedOptions),this.showOptions(n.options,e.id));let i=this.updateSelectedOption(n.selected);if(i){this.destroyInfo();let{completion:r}=n.options[n.selected],{info:s}=r;if(!s)return;let o=typeof s=="string"?document.createTextNode(s):s(r);if(!o)return;"then"in o?o.then(a=>{a&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(a,r)}).catch(a=>sr(this.view.state,a,"completion info")):(this.addInfoPane(o,r),i.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,n){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",i.id="cm-completionInfo-"+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)i.appendChild(e),this.infoDestroy=null;else{let{dom:r,destroy:s}=e;i.appendChild(r),this.infoDestroy=s||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let i=this.list.firstChild,r=this.range.from;i;i=i.nextSibling,r++)i.nodeName!="LI"||!i.id?r--:r==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),n=i):i.hasAttribute("aria-selected")&&(i.removeAttribute("aria-selected"),i.removeAttribute("aria-describedby"));return n&&Che(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),s=this.space;if(!s){let o=this.dom.ownerDocument.documentElement;s={left:0,top:0,right:o.clientWidth,bottom:o.clientHeight}}return r.top>Math.min(s.bottom,n.bottom)-10||r.bottom<Math.max(s.top,n.top)+10?null:this.view.state.facet(li).positionInfo(this.view,n,r,i,s,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,n,i){const r=document.createElement("ul");r.id=n,r.setAttribute("role","listbox"),r.setAttribute("aria-expanded","true"),r.setAttribute("aria-label",this.view.state.phrase("Completions")),r.addEventListener("mousedown",o=>{o.target==r&&o.preventDefault()});let s=null;for(let o=i.from;o<i.to;o++){let{completion:a,match:l}=e[o],{section:u}=a;if(u){let f=typeof u=="string"?u:u.name;if(f!=s&&(o>i.from||i.from==0))if(s=f,typeof u!="string"&&u.header)r.appendChild(u.header(u));else{let p=r.appendChild(document.createElement("completion-section"));p.textContent=f}}const c=r.appendChild(document.createElement("li"));c.id=n+"-"+o,c.setAttribute("role","option");let h=this.optionClass(a);h&&(c.className=h);for(let f of this.optionContent){let p=f(a,this.view.state,this.view,l);p&&c.appendChild(p)}}return i.from&&r.classList.add("cm-completionListIncompleteTop"),i.to<e.length&&r.classList.add("cm-completionListIncompleteBottom"),r}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function _he(t,e){return n=>new She(n,t,e)}function Che(t,e){let n=t.getBoundingClientRect(),i=e.getBoundingClientRect(),r=n.height/t.offsetHeight;i.top<n.top?t.scrollTop-=(n.top-i.top)/r:i.bottom>n.bottom&&(t.scrollTop+=(i.bottom-n.bottom)/r)}function p$(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function whe(t,e){let n=[],i=null,r=null,s=c=>{n.push(c);let{section:h}=c.completion;if(h){i||(i=[]);let f=typeof h=="string"?h:h.name;i.some(p=>p.name==f)||i.push(typeof h=="string"?{name:f}:h)}},o=e.facet(li);for(let c of t)if(c.hasResult()){let h=c.result.getMatch;if(c.result.filter===!1)for(let f of c.result.options)s(new h$(f,c.source,h?h(f):[],1e9-n.length));else{let f=e.sliceDoc(c.from,c.to),p,m=o.filterStrict?new yhe(f):new xhe(f);for(let g of c.result.options)if(p=m.match(g.label)){let x=g.displayLabel?h?h(g,p.matched):[]:p.matched,y=p.score+(g.boost||0);if(s(new h$(g,c.source,x,y)),typeof g.section=="object"&&g.section.rank==="dynamic"){let{name:S}=g.section;r||(r=Object.create(null)),r[S]=Math.max(y,r[S]||-1e9)}}}}if(i){let c=Object.create(null),h=0,f=(p,m)=>(p.rank==="dynamic"&&m.rank==="dynamic"?r[m.name]-r[p.name]:0)||(typeof p.rank=="number"?p.rank:1e9)-(typeof m.rank=="number"?m.rank:1e9)||(p.name<m.name?-1:1);for(let p of i.sort(f))h-=1e5,c[p.name]=h;for(let p of n){let{section:m}=p.completion;m&&(p.score+=c[typeof m=="string"?m:m.name])}}let a=[],l=null,u=o.compareCompletions;for(let c of n.sort((h,f)=>f.score-h.score||u(h.completion,f.completion))){let h=c.completion;!l||l.label!=h.label||l.detail!=h.detail||l.type!=null&&h.type!=null&&l.type!=h.type||l.apply!=h.apply||l.boost!=h.boost?a.push(c):p$(c.completion)>p$(l)&&(a[a.length-1]=c),l=c.completion}return a}class kc{constructor(e,n,i,r,s,o){this.options=e,this.attrs=n,this.tooltip=i,this.timestamp=r,this.selected=s,this.disabled=o}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new kc(this.options,m$(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,i,r,s,o){if(r&&!o&&e.some(u=>u.isPending))return r.setDisabled();let a=whe(e,n);if(!a.length)return r&&e.some(u=>u.isPending)?r.setDisabled():null;let l=n.facet(li).selectOnOpen?0:-1;if(r&&r.selected!=l&&r.selected!=-1){let u=r.options[r.selected].completion;for(let c=0;c<a.length;c++)if(a[c].completion==u){l=c;break}}return new kc(a,m$(i,l),{pos:e.reduce((u,c)=>c.hasResult()?Math.min(u,c.from):u,1e8),create:$he,above:s.aboveCursor},r?r.timestamp:Date.now(),l,!1)}map(e){return new kc(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new kc(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class jO{constructor(e,n,i){this.active=e,this.id=n,this.open=i}static start(){return new jO(Phe,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,i=n.facet(li),s=(i.override||n.languageDataAt("autocomplete",ru(n)).map(Ohe)).map(l=>(this.active.find(c=>c.source==l)||new es(l,this.active.some(c=>c.state!=0)?1:0)).update(e,i));s.length==this.active.length&&s.every((l,u)=>l==this.active[u])&&(s=this.active);let o=this.open,a=e.effects.some(l=>l.is(Wk));o&&e.docChanged&&(o=o.map(e.changes)),e.selection||s.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!khe(s,this.active)||a?o=kc.build(s,n,this.id,o,i,a):o&&o.disabled&&!s.some(l=>l.isPending)&&(o=null),!o&&s.every(l=>!l.isPending)&&s.some(l=>l.hasResult())&&(s=s.map(l=>l.hasResult()?new es(l.source,0):l));for(let l of e.effects)l.is(Xk)&&(o=o&&o.setSelected(l.value,this.id));return s==this.active&&o==this.open?this:new jO(s,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?Ehe:The}}function khe(t,e){if(t==e)return!0;for(let n=0,i=0;;){for(;n<t.length&&!t[n].hasResult();)n++;for(;i<e.length&&!e[i].hasResult();)i++;let r=n==t.length,s=i==e.length;if(r||s)return r==s;if(t[n++].result!=e[i++].result)return!1}}const Ehe={"aria-autocomplete":"list"},The={};function m$(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}const Phe=[];function oV(t,e){if(t.isUserEvent("input.complete")){let i=t.annotation(zk);if(i&&e.activateOnCompletion(i))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class es{constructor(e,n,i=!1){this.source=e,this.state=n,this.explicit=i}hasResult(){return!1}get isPending(){return this.state==1}update(e,n){let i=oV(e,n),r=this;(i&8||i&16&&this.touches(e))&&(r=new es(r.source,0)),i&4&&r.state==0&&(r=new es(this.source,1)),r=r.updateFor(e,i);for(let s of e.effects)if(s.is(FO))r=new es(r.source,1,s.value);else if(s.is(mp))r=new es(r.source,0);else if(s.is(Wk))for(let o of s.value)o.source==r.source&&(r=o);return r}updateFor(e,n){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(ru(e.state))}}class Wc extends es{constructor(e,n,i,r,s,o){super(e,3,n),this.limit=i,this.result=r,this.from=s,this.to=o}hasResult(){return!0}updateFor(e,n){var i;if(!(n&3))return this.map(e.changes);let r=this.result;r.map&&!e.changes.empty&&(r=r.map(r,e.changes));let s=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),a=ru(e.state);if(a>o||!r||n&2&&(ru(e.startState)==this.from||a<this.limit))return new es(this.source,n&4?1:0);let l=e.changes.mapPos(this.limit);return Ahe(r.validFor,e.state,s,o)?new Wc(this.source,this.explicit,l,r,s,o):r.update&&(r=r.update(r,s,o,new Zk(e.state,a,!1)))?new Wc(this.source,this.explicit,l,r,r.from,(i=r.to)!==null&&i!==void 0?i:ru(e.state)):new es(this.source,1,this.explicit)}map(e){if(e.empty)return this;let n=this.result.map?this.result.map(this.result,e):this.result;return n?new Wc(this.source,this.explicit,e.mapPos(this.limit),n,e.mapPos(this.from),e.mapPos(this.to,1)):new es(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function Ahe(t,e,n,i){if(!t)return!1;let r=e.sliceDoc(n,i);return typeof t=="function"?t(r,n,i,e):sV(t,!0).test(r)}const Wk=nt.define({map(t,e){return t.map(n=>n.map(e))}}),nr=Wn.define({create(){return jO.start()},update(t,e){return t.update(e)},provide:t=>[wk.from(t,e=>e.tooltip),Se.contentAttributes.from(t,e=>e.attrs)]});function Hk(t,e){const n=e.completion.apply||e.completion.label;let i=t.state.field(nr).active.find(r=>r.source==e.source);return i instanceof Wc?(typeof n=="string"?t.dispatch({...ghe(t.state,n,i.from,i.to),annotations:zk.of(e.completion)}):n(t,e.completion,i.from,i.to),!0):!1}const $he=_he(nr,Hk);function Ag(t,e="option"){return n=>{let i=n.state.field(nr,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp<n.state.facet(li).interactionDelay)return!1;let r=1,s;e=="page"&&(s=LD(n,i.open.tooltip))&&(r=Math.max(2,Math.floor(s.dom.offsetHeight/s.dom.querySelector("li").offsetHeight)-1));let{length:o}=i.open.options,a=i.open.selected>-1?i.open.selected+r*(t?1:-1):t?0:o-1;return a<0?a=e=="page"?0:o-1:a>=o&&(a=e=="page"?o-1:0),n.dispatch({effects:Xk.of(a)}),!0}}const Ihe=t=>{let e=t.state.field(nr,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(li).interactionDelay?!1:Hk(t,e.open.options[e.open.selected])},qv=t=>t.state.field(nr,!1)?(t.dispatch({effects:FO.of(!0)}),!0):!1,Rhe=t=>{let e=t.state.field(nr,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:mp.of(null)}),!0)};class Mhe{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const Nhe=50,Lhe=1e3,Dhe=Ln.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(nr).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(nr),n=t.state.facet(li);if(!t.selectionSet&&!t.docChanged&&t.startState.field(nr)==e)return;let i=t.transactions.some(s=>{let o=oV(s,n);return o&8||(s.selection||s.docChanged)&&!(o&3)});for(let s=0;s<this.running.length;s++){let o=this.running[s];if(i||o.context.abortOnDocChange&&t.docChanged||o.updates.length+t.transactions.length>Nhe&&Date.now()-o.time>Lhe){for(let a of o.context.abortListeners)try{a()}catch(l){sr(this.view.state,l)}o.context.abortListeners=null,this.running.splice(s--,1)}else o.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(s=>s.effects.some(o=>o.is(FO)))&&(this.pendingStart=!0);let r=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(s=>s.isPending&&!this.running.some(o=>o.active.source==s.source))?setTimeout(()=>this.startUpdate(),r):-1,this.composing!=0)for(let s of t.transactions)s.isUserEvent("input.type")?this.composing=2:this.composing==2&&s.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(nr);for(let n of e.active)n.isPending&&!this.running.some(i=>i.active.source==n.source)&&this.startQuery(n);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(li).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=ru(e),i=new Zk(e,n,t.explicit,this.view),r=new Mhe(t,i);this.running.push(r),Promise.resolve(t.source(i)).then(s=>{r.context.aborted||(r.done=s||null,this.scheduleAccept())},s=>{this.view.dispatch({effects:mp.of(null)}),sr(this.view.state,s)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(li).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(li),i=this.view.state.field(nr);for(let r=0;r<this.running.length;r++){let s=this.running[r];if(s.done===void 0)continue;if(this.running.splice(r--,1),s.done){let a=ru(s.updates.length?s.updates[0].startState:this.view.state),l=Math.min(a,s.done.from+(s.active.explicit?0:1)),u=new Wc(s.active.source,s.active.explicit,l,s.done,s.done.from,(t=s.done.to)!==null&&t!==void 0?t:a);for(let c of s.updates)u=u.update(c,n);if(u.hasResult()){e.push(u);continue}}let o=i.active.find(a=>a.source==s.active.source);if(o&&o.isPending)if(s.done==null){let a=new es(s.active.source,0);for(let l of s.updates)a=a.update(l,n);a.isPending||e.push(a)}else this.startQuery(o)}(e.length||i.open&&i.open.disabled)&&this.view.dispatch({effects:Wk.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(nr,!1);if(e&&e.tooltip&&this.view.state.facet(li).closeOnBlur){let n=e.open&&LD(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:mp.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:FO.of(!1)}),20),this.composing=0}}}),Qhe=typeof navigator=="object"&&/Win/.test(navigator.platform),Vhe=js.highest(Se.domEventHandlers({keydown(t,e){let n=e.state.field(nr,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(Qhe&&t.altKey)||t.metaKey)return!1;let i=n.open.options[n.open.selected],r=n.active.find(o=>o.source==i.source),s=i.completion.commitCharacters||r.result.commitCharacters;return s&&s.indexOf(t.key)>-1&&Hk(e,i),!1}})),aV=Se.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center",cursor:"pointer"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class Bhe{constructor(e,n,i,r){this.field=e,this.line=n,this.from=i,this.to=r}}class Uk{constructor(e,n,i){this.field=e,this.from=n,this.to=i}map(e){let n=e.mapPos(this.from,-1,xi.TrackDel),i=e.mapPos(this.to,1,xi.TrackDel);return n==null||i==null?null:new Uk(this.field,n,i)}}class qk{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let i=[],r=[n],s=e.doc.lineAt(n),o=/^\s*/.exec(s.text)[0];for(let l of this.lines){if(i.length){let u=o,c=/^\t*/.exec(l)[0].length;for(let h=0;h<c;h++)u+=e.facet(bm);r.push(n+u.length-c),l=u+l.slice(c)}i.push(l),n+=l.length+1}let a=this.fieldPositions.map(l=>new Uk(l.field,r[l.line]+l.from,r[l.line]+l.to));return{text:i,ranges:a}}static parse(e){let n=[],i=[],r=[],s;for(let o of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(o);){let a=s[1]?+s[1]:null,l=s[2]||s[3]||"",u=-1;a===0&&(a=1e9);let c=l.replace(/\\[{}]/g,h=>h[1]);for(let h=0;h<n.length;h++)(a!=null?n[h].seq==a:c&&n[h].name==c)&&(u=h);if(u<0){let h=0;for(;h<n.length&&(a==null||n[h].seq!=null&&n[h].seq<a);)h++;n.splice(h,0,{seq:a,name:c}),u=h;for(let f of r)f.field>=u&&f.field++}for(let h of r)if(h.line==i.length&&h.from>s.index){let f=s[2]?3+(s[1]||"").length:2;h.from-=f,h.to-=f}r.push(new Bhe(u,i.length,s.index,s.index+c.length)),o=o.slice(0,s.index)+l+o.slice(s.index+s[0].length)}o=o.replace(/\\([{}])/g,(a,l,u)=>{for(let c of r)c.line==i.length&&c.from>u&&(c.from--,c.to--);return l}),i.push(o)}return new qk(i,r)}}let Fhe=Xe.widget({widget:new class extends ds{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),jhe=Xe.mark({class:"cm-snippetField"});class Of{constructor(e,n){this.ranges=e,this.active=n,this.deco=Xe.set(e.map(i=>(i.from==i.to?Fhe:jhe).range(i.from,i.to)),!0)}map(e){let n=[];for(let i of this.ranges){let r=i.map(e);if(!r)return null;n.push(r)}return new Of(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(i=>i.field==this.active&&i.from<=n.from&&i.to>=n.to))}}const km=nt.define({map(t,e){return t&&t.map(e)}}),Zhe=nt.define(),gp=Wn.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(km))return n.value;if(n.is(Zhe)&&t)return new Of(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>Se.decorations.from(t,e=>e?e.deco:Xe.none)});function Yk(t,e){return fe.create(t.filter(n=>n.field==e).map(n=>fe.range(n.from,n.to)))}function zhe(t){let e=qk.parse(t);return(n,i,r,s)=>{let{text:o,ranges:a}=e.instantiate(n.state,r),{main:l}=n.state.selection,u={changes:{from:r,to:s==l.from?l.to:s,insert:$t.of(o)},scrollIntoView:!0,annotations:i?[zk.of(i),Zn.userEvent.of("input.complete")]:void 0};if(a.length&&(u.selection=Yk(a,0)),a.some(c=>c.field>0)){let c=new Of(a,0),h=u.effects=[km.of(c)];n.state.field(gp,!1)===void 0&&h.push(nt.appendConfig.of([gp,qhe,Yhe,aV]))}n.dispatch(n.state.update(u))}}function lV(t){return({state:e,dispatch:n})=>{let i=e.field(gp,!1);if(!i||t<0&&i.active==0)return!1;let r=i.active+t,s=t>0&&!i.ranges.some(o=>o.field==r+t);return n(e.update({selection:Yk(i.ranges,r),effects:km.of(s?null:new Of(i.ranges,r)),scrollIntoView:!0})),!0}}const Xhe=({state:t,dispatch:e})=>t.field(gp,!1)?(e(t.update({effects:km.of(null)})),!0):!1,Whe=lV(1),Hhe=lV(-1),Uhe=[{key:"Tab",run:Whe,shift:Hhe},{key:"Escape",run:Xhe}],g$=Qe.define({combine(t){return t.length?t[0]:Uhe}}),qhe=js.highest(hf.compute([g$],t=>t.facet(g$)));function Ki(t,e){return{...e,apply:zhe(t)}}const Yhe=Se.domEventHandlers({mousedown(t,e){let n=e.state.field(gp,!1),i;if(!n||(i=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let r=n.ranges.find(s=>s.from<=i&&s.to>=i);return!r||r.field==n.active?!1:(e.dispatch({selection:Yk(n.ranges,r.field),effects:km.of(n.ranges.some(s=>s.field>r.field)?new Of(n.ranges,r.field):null),scrollIntoView:!0}),!0)}}),Op={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},ql=nt.define({map(t,e){let n=e.mapPos(t,-1,xi.TrackAfter);return n??void 0}}),Gk=new class extends hl{};Gk.startSide=1;Gk.endSide=-1;const uV=Wn.define({create(){return vt.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:i=>i>=n.from&&i<=n.to})}for(let n of e.effects)n.is(ql)&&(t=t.update({add:[Gk.range(n.value,n.value+1)]}));return t}});function Ghe(){return[Jhe,uV]}const Yv="()[]{}<>«»»«[]{}";function cV(t){for(let e=0;e<Yv.length;e+=2)if(Yv.charCodeAt(e)==t)return Yv.charAt(e+1);return uk(t<128?t:t+1)}function hV(t,e){return t.languageDataAt("closeBrackets",e)[0]||Op}const Khe=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Jhe=Se.inputHandler.of((t,e,n,i)=>{if((Khe?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let r=t.state.selection.main;if(i.length>2||i.length==2&&Js(tr(i,0))==1||e!=r.from||n!=r.to)return!1;let s=nfe(t.state,i);return s?(t.dispatch(s),!0):!1}),efe=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=hV(t,t.selection.main.head).brackets||Op.brackets,r=null,s=t.changeByRange(o=>{if(o.empty){let a=ife(t.doc,o.head);for(let l of i)if(l==a&&Qx(t.doc,o.head)==cV(tr(l,0)))return{changes:{from:o.head-l.length,to:o.head+l.length},range:fe.cursor(o.head-l.length)}}return{range:r=o}});return r||e(t.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!r},tfe=[{key:"Backspace",run:efe}];function nfe(t,e){let n=hV(t,t.selection.main.head),i=n.brackets||Op.brackets;for(let r of i){let s=cV(tr(r,0));if(e==r)return s==r?ofe(t,r,i.indexOf(r+r+r)>-1,n):rfe(t,r,s,n.before||Op.before);if(e==s&&fV(t,t.selection.main.from))return sfe(t,r,s)}return null}function fV(t,e){let n=!1;return t.field(uV).between(0,t.doc.length,i=>{i==e&&(n=!0)}),n}function Qx(t,e){let n=t.sliceString(e,e+2);return n.slice(0,Js(tr(n,0)))}function ife(t,e){let n=t.sliceString(e-2,e);return Js(tr(n,0))==n.length?n:n.slice(1)}function rfe(t,e,n,i){let r=null,s=t.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:n,from:o.to}],effects:ql.of(o.to+e.length),range:fe.range(o.anchor+e.length,o.head+e.length)};let a=Qx(t.doc,o.head);return!a||/\s/.test(a)||i.indexOf(a)>-1?{changes:{insert:e+n,from:o.head},effects:ql.of(o.head+e.length),range:fe.cursor(o.head+e.length)}:{range:r=o}});return r?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function sfe(t,e,n){let i=null,r=t.changeByRange(s=>s.empty&&Qx(t.doc,s.head)==n?{changes:{from:s.head,to:s.head+n.length,insert:n},range:fe.cursor(s.head+n.length)}:i={range:s});return i?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function ofe(t,e,n,i){let r=i.stringPrefixes||Op.stringPrefixes,s=null,o=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:e,from:a.to}],effects:ql.of(a.to+e.length),range:fe.range(a.anchor+e.length,a.head+e.length)};let l=a.head,u=Qx(t.doc,l),c;if(u==e){if(O$(t,l))return{changes:{insert:e+e,from:l},effects:ql.of(l+e.length),range:fe.cursor(l+e.length)};if(fV(t,l)){let f=n&&t.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+f.length,insert:f},range:fe.cursor(l+f.length)}}}else{if(n&&t.sliceDoc(l-2*e.length,l)==e+e&&(c=x$(t,l-2*e.length,r))>-1&&O$(t,c))return{changes:{insert:e+e+e+e,from:l},effects:ql.of(l+e.length),range:fe.cursor(l+e.length)};if(t.charCategorizer(l)(u)!=Cn.Word&&x$(t,l,r)>-1&&!afe(t,l,e,r))return{changes:{insert:e+e,from:l},effects:ql.of(l+e.length),range:fe.cursor(l+e.length)}}return{range:s=a}});return s?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function O$(t,e){let n=sn(t).resolveInner(e+1);return n.parent&&n.from==e}function afe(t,e,n,i){let r=sn(t).resolveInner(e,-1),s=i.reduce((o,a)=>Math.max(o,a.length),0);for(let o=0;o<5;o++){let a=t.sliceDoc(r.from,Math.min(r.to,r.from+n.length+s)),l=a.indexOf(n);if(!l||l>-1&&i.indexOf(a.slice(0,l))>-1){let c=r.firstChild;for(;c&&c.from==r.from&&c.to-c.from>n.length+l;){if(t.sliceDoc(c.to-n.length,c.to)==n)return!1;c=c.firstChild}return!0}let u=r.to==e&&r.parent;if(!u)break;r=u}return!1}function x$(t,e,n){let i=t.charCategorizer(e);if(i(t.sliceDoc(e-1,e))!=Cn.Word)return e;for(let r of n){let s=e-r.length;if(t.sliceDoc(s,e)==r&&i(t.sliceDoc(s-1,s))!=Cn.Word)return s}return-1}function lfe(t={}){return[Vhe,nr,li.of(t),Dhe,ufe,aV]}const dV=[{key:"Ctrl-Space",run:qv},{mac:"Alt-`",run:qv},{mac:"Alt-i",run:qv},{key:"Escape",run:Rhe},{key:"ArrowDown",run:Ag(!0)},{key:"ArrowUp",run:Ag(!1)},{key:"PageDown",run:Ag(!0,"page")},{key:"PageUp",run:Ag(!1,"page")},{key:"Enter",run:Ihe}],ufe=js.highest(hf.computeN([li],t=>t.facet(li).defaultKeymap?[dV]:[]));class y${constructor(e,n,i){this.from=e,this.to=n,this.diagnostic=i}}class Zl{constructor(e,n,i){this.diagnostics=e,this.panel=n,this.selected=i}static init(e,n,i){let r=i.facet(xp).markerFilter;r&&(e=r(e,i));let s=e.slice().sort((p,m)=>p.from-m.from||p.to-m.to),o=new dr,a=[],l=0,u=i.doc.iter(),c=0,h=i.doc.length;for(let p=0;;){let m=p==s.length?null:s[p];if(!m&&!a.length)break;let g,x;if(a.length)g=l,x=a.reduce((_,k)=>Math.min(_,k.to),m&&m.from>g?m.from:1e8);else{if(g=m.from,g>h)break;x=m.to,a.push(m),p++}for(;p<s.length;){let _=s[p];if(_.from==g&&(_.to>_.from||_.to==g))a.push(_),p++,x=Math.min(_.to,x);else{x=Math.min(_.from,x);break}}x=Math.min(x,h);let y=!1;if(a.some(_=>_.from==g&&(_.to==x||x==h))&&(y=g==x,!y&&x-g<10)){let _=g-(c+u.value.length);_>0&&(u.next(_),c=g);for(let k=g;;){if(k>=x){y=!0;break}if(!u.lineBreak&&c+u.value.length>k)break;k=c+u.value.length,c+=u.value.length,u.next()}}let S=Sfe(a);if(y)o.add(g,g,Xe.widget({widget:new xfe(S),diagnostics:a.slice()}));else{let _=a.reduce((k,w)=>w.markClass?k+" "+w.markClass:k,"");o.add(g,x,Xe.mark({class:"cm-lintRange cm-lintRange-"+S+_,diagnostics:a.slice(),inclusiveEnd:a.some(k=>k.to>x)}))}if(l=x,l==h)break;for(let _=0;_<a.length;_++)a[_].to<=l&&a.splice(_--,1)}let f=o.finish();return new Zl(f,n,ml(f))}}function ml(t,e=null,n=0){let i=null;return t.between(n,1e9,(r,s,{spec:o})=>{if(!(e&&o.diagnostics.indexOf(e)<0))if(!i)i=new y$(r,s,e||o.diagnostics[0]);else{if(o.diagnostics.indexOf(i.diagnostic)<0)return!1;i=new y$(i.from,s,i.diagnostic)}}),i}function cfe(t,e){let n=e.pos,i=e.end||n,r=t.state.facet(xp).hideOn(t,n,i);if(r!=null)return r;let s=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(o=>o.is(pV))||t.changes.touchesRange(s.from,Math.max(s.to,i)))}function hfe(t,e){return t.field(Tr,!1)?e:e.concat(nt.appendConfig.of(_fe))}const pV=nt.define(),Kk=nt.define(),mV=nt.define(),Tr=Wn.define({create(){return new Zl(Xe.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),i=null,r=t.panel;if(t.selected){let s=e.changes.mapPos(t.selected.from,1);i=ml(n,t.selected.diagnostic,s)||ml(n,null,s)}!n.size&&r&&e.state.facet(xp).autoPanel&&(r=null),t=new Zl(n,r,i)}for(let n of e.effects)if(n.is(pV)){let i=e.state.facet(xp).autoPanel?n.value.length?yp.open:null:t.panel;t=Zl.init(n.value,i,e.state)}else n.is(Kk)?t=new Zl(t.diagnostics,n.value?yp.open:null,t.selected):n.is(mV)&&(t=new Zl(t.diagnostics,t.panel,n.value));return t},provide:t=>[cp.from(t,e=>e.panel),Se.decorations.from(t,e=>e.diagnostics)]}),ffe=Xe.mark({class:"cm-lintRange cm-lintRange-active"});function dfe(t,e,n){let{diagnostics:i}=t.state.field(Tr),r,s=-1,o=-1;i.between(e-(n<0?1:0),e+(n>0?1:0),(l,u,{spec:c})=>{if(e>=l&&e<=u&&(l==u||(e>l||n>0)&&(e<u||n<0)))return r=c.diagnostics,s=l,o=u,!1});let a=t.state.facet(xp).tooltipFilter;return r&&a&&(r=a(r,t.state)),r?{pos:s,end:o,above:!0,create(){return{dom:pfe(t,r)}}}:null}function pfe(t,e){return en("ul",{class:"cm-tooltip-lint"},e.map(n=>OV(t,n,!1)))}const mfe=t=>{let e=t.state.field(Tr,!1);(!e||!e.panel)&&t.dispatch({effects:hfe(t.state,[Kk.of(!0)])});let n=kk(t,yp.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},v$=t=>{let e=t.state.field(Tr,!1);return!e||!e.panel?!1:(t.dispatch({effects:Kk.of(!1)}),!0)},gfe=t=>{let e=t.state.field(Tr,!1);if(!e)return!1;let n=t.state.selection.main,i=ml(e.diagnostics,null,n.to+1);return!i&&(i=ml(e.diagnostics,null,0),!i||i.from==n.from&&i.to==n.to)?!1:(t.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),rle(t,i.from,1,{tooltip:xV,until:r=>r.docChanged||r.newSelection.main.head<i.from||r.newSelection.main.head>i.to}),!0)},Ofe=[{key:"Mod-Shift-m",run:mfe,preventDefault:!0},{key:"F8",run:gfe}],xp=Qe.define({combine(t){return{sources:t.map(e=>e.source).filter(e=>e!=null),...wo(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:b$,tooltipFilter:b$,needsRefresh:(e,n)=>e?n?i=>e(i)||n(i):e:n,hideOn:(e,n)=>e?n?(i,r,s)=>e(i,r,s)||n(i,r,s):e:n,autoPanel:(e,n)=>e||n})}}});function b$(t,e){return t?e?(n,i)=>e(t(n,i),i):t:e}function gV(t){let e=[];if(t)e:for(let{name:n}of t){for(let i=0;i<n.length;i++){let r=n[i];if(/[a-zA-Z]/.test(r)&&!e.some(s=>s.toLowerCase()==r.toLowerCase())){e.push(r);continue e}}e.push("")}return e}function OV(t,e,n){var i;let r=n?gV(e.actions):[];return en("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},en("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(i=e.actions)===null||i===void 0?void 0:i.map((s,o)=>{let a=!1,l=p=>{if(p.preventDefault(),a)return;a=!0;let m=ml(t.state.field(Tr).diagnostics,e);m&&s.apply(t,m.from,m.to)},{name:u}=s,c=r[o]?u.indexOf(r[o]):-1,h=c<0?u:[u.slice(0,c),en("u",u.slice(c,c+1)),u.slice(c+1)],f=s.markClass?" "+s.markClass:"";return en("button",{type:"button",class:"cm-diagnosticAction"+f,onclick:l,onmousedown:l,"aria-label":` Action: ${u}${c<0?"":` (access key "${r[o]})"`}.`},h)}),e.source&&en("div",{class:"cm-diagnosticSource"},e.source))}class xfe extends ds{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return en("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class S${constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=OV(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class yp{constructor(e){this.view=e,this.items=[];let n=r=>{if(!(r.ctrlKey||r.altKey||r.metaKey)){if(r.keyCode==27)v$(this.view),this.view.focus();else if(r.keyCode==38||r.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(r.keyCode==40||r.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(r.keyCode==36)this.moveSelection(0);else if(r.keyCode==35)this.moveSelection(this.items.length-1);else if(r.keyCode==13)this.view.focus();else if(r.keyCode>=65&&r.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:s}=this.items[this.selectedIndex],o=gV(s.actions);for(let a=0;a<o.length;a++)if(o[a].toUpperCase().charCodeAt(0)==r.keyCode){let l=ml(this.view.state.field(Tr).diagnostics,s);l&&s.actions[a].apply(e,l.from,l.to)}}else return;r.preventDefault()}},i=r=>{for(let s=0;s<this.items.length;s++)this.items[s].dom.contains(r.target)&&this.moveSelection(s)};this.list=en("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:n,onclick:i}),this.dom=en("div",{class:"cm-panel-lint"},this.list,en("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>v$(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Tr).selected;if(!e)return-1;for(let n=0;n<this.items.length;n++)if(this.items[n].diagnostic==e.diagnostic)return n;return-1}update(){let{diagnostics:e,selected:n}=this.view.state.field(Tr),i=0,r=!1,s=null,o=new Set;for(e.between(0,this.view.state.doc.length,(a,l,{spec:u})=>{for(let c of u.diagnostics){if(o.has(c))continue;o.add(c);let h=-1,f;for(let p=i;p<this.items.length;p++)if(this.items[p].diagnostic==c){h=p;break}h<0?(f=new S$(this.view,c),this.items.splice(i,0,f),r=!0):(f=this.items[h],h>i&&(this.items.splice(i,h-i),r=!0)),n&&f.diagnostic==n.diagnostic?f.dom.hasAttribute("aria-selected")||(f.dom.setAttribute("aria-selected","true"),s=f):f.dom.hasAttribute("aria-selected")&&f.dom.removeAttribute("aria-selected"),i++}});i<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)r=!0,this.items.pop();this.items.length==0&&(this.items.push(new S$(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),r=!0),s?(this.list.setAttribute("aria-activedescendant",s.id),this.view.requestMeasure({key:this,read:()=>({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:a,panel:l})=>{let u=l.height/this.list.offsetHeight;a.top<l.top?this.list.scrollTop-=(l.top-a.top)/u:a.bottom>l.bottom&&(this.list.scrollTop+=(a.bottom-l.bottom)/u)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function n(){let i=e;e=i.nextSibling,i.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)n();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(Tr),i=ml(n.diagnostics,this.items[e].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:mV.of(i)})}static open(e){return new yp(e)}}function yfe(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}function $g(t){return yfe(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const vfe=Se.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:$g("#f11")},".cm-lintRange-warning":{backgroundImage:$g("orange")},".cm-lintRange-info":{backgroundImage:$g("#999")},".cm-lintRange-hint":{backgroundImage:$g("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}},"&dark .cm-lintRange-active":{backgroundColor:"#86714a80"},"&dark .cm-panel.cm-panel-lint ul":{"& [aria-selected]":{backgroundColor:"#2e343e"}}});function bfe(t){return t=="error"?4:t=="warning"?3:t=="info"?2:1}function Sfe(t){let e="hint",n=1;for(let i of t){let r=bfe(i.severity);r>n&&(n=r,e=i.severity)}return e}const xV=ile(dfe,{hideOn:cfe}),_fe=[Tr,Se.decorations.compute([Tr],t=>{let{selected:e,panel:n}=t.field(Tr);return!e||!n||e.from==e.to?Xe.none:Xe.set([ffe.range(e.from,e.to)])}),xV,vfe],yV=[Ek(),xle(),Mae(),Tue(),Gle(),Sae(),Tae(),mt.allowMultipleSelections.of(!0),Vle(),rQ(tue,{fallback:!0}),lue(),Ghe(),lfe(),Wae(),qae(),Bae(),Zce(),hf.of([...tfe,...Ace,...che,...Due,...Hle,...dV,...Ofe])];function Cfe(t,e,n){const i=Bt(tn),r=Tt(Hu),s=C.useRef(null),{lexicalNode:o}=xO(),a=C.useRef(!1),l=C.useRef(!1),u=C.useCallback(()=>{r({editorType:"codeblock",rootNode:o,editorRef:s.current})},[o,r]),c=C.useCallback(h=>{var f,p,m,g,x,y;if(h.key==="ArrowDown"){const S=(p=(f=s.current)==null?void 0:f.getCodemirror())==null?void 0:p.state;if(S){const _=S.doc.length,k=S.selection.ranges[0].to;_===k&&(a.current?(i==null||i.update(()=>{var w,b;const E=st(t);E.getNextSibling()?((b=(w=s.current)==null?void 0:w.getCodemirror())==null||b.contentDOM.blur(),E.selectNext()):E.insertAfter(ut())}),a.current=!1):a.current=!0)}}else if(h.key==="ArrowUp"){const S=(g=(m=s.current)==null?void 0:m.getCodemirror())==null?void 0:g.state;S&&S.selection.ranges[0].from===0&&(l.current?(i==null||i.update(()=>{var k,w;const b=st(t);b.getPreviousSibling()&&((w=(k=s.current)==null?void 0:k.getCodemirror())==null||w.contentDOM.blur(),b.selectPrevious())}),l.current=!1):l.current=!0)}else if(h.key==="Enter")h.stopPropagation();else if(h.key==="Backspace"||h.key==="Delete"){const S=(y=(x=s.current)==null?void 0:x.getCodemirror())==null?void 0:y.state;(S==null?void 0:S.doc.length)===0&&(i==null||i.update(()=>{st(t).remove()}))}},[i,t]);return C.useEffect(()=>{const h=s.current;return setTimeout(()=>{var f,p;(f=h==null?void 0:h.getCodemirror())==null||f.contentDOM.addEventListener("focus",u),(p=h==null?void 0:h.getCodemirror())==null||p.contentDOM.addEventListener("keydown",c)},300),()=>{var f,p;(f=h==null?void 0:h.getCodemirror())==null||f.contentDOM.removeEventListener("focus",u),(p=h==null?void 0:h.getCodemirror())==null||p.contentDOM.removeEventListener("keydown",c)}},[s,u,c,e]),C.useEffect(()=>{n.subscribe(()=>{var h,f;(f=(h=s.current)==null?void 0:h.getCodemirror())==null||f.focus(),u()})},[n,s,t,u]),s}var wfe=Object.defineProperty,kfe=(t,e)=>wfe(t,"name",{value:e,configurable:!0});function W_(t,[e,n]){return Math.min(n,Math.max(e,t))}kfe(W_,"clamp");var Efe=Object.defineProperty,Tfe=(t,e)=>Efe(t,"name",{value:e,configurable:!0});function vV(t){const e=R.useRef({value:t,previous:t});return R.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}Tfe(vV,"usePrevious");var Pfe=Object.defineProperty,Afe=(t,e)=>Pfe(t,"name",{value:e,configurable:!0}),bV=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),$fe=R.forwardRef(Afe(function(e,n){return Y.jsx(Wt.span,{...e,ref:n,style:{...bV,...e.style}})},"VisuallyHidden")),Ife=$fe,Rfe=Object.defineProperty,nn=(t,e)=>Rfe(t,"name",{value:e,configurable:!0}),Mfe=[" ","Enter","ArrowUp","ArrowDown"],Nfe=[" ","Enter"],vh="Select",[Vx,Jk,Lfe]=l2(vh),[tc,L1e]=Bs(vh,[Lfe,Jh]),e5=Jh(),[Dfe,Tl]=tc(vh),[Qfe,Vfe]=tc(vh);function SV(t){const{__scopeSelect:e,children:n,open:i,defaultOpen:r,onOpenChange:s,value:o,defaultValue:a,onValueChange:l,dir:u,name:c,autoComplete:h,disabled:f,required:p,form:m,internal_do_not_use_render:g}=t,x=e5(e),[y,S]=R.useState(null),[_,k]=R.useState(null),[w,b]=R.useState(!1),E=om(u),[P,$]=Oo({prop:i,defaultProp:r??!1,onChange:s,caller:vh}),[B,X]=Oo({prop:o,defaultProp:a,onChange:l,caller:vh}),j=R.useRef(null),Z=R.useRef(B);R.useEffect(()=>{const Ae=m?y==null?void 0:y.ownerDocument.getElementById(m):y==null?void 0:y.form;if(Ae instanceof HTMLFormElement){const Be=nn(()=>X(Z.current),"reset");return Ae.addEventListener("reset",Be),()=>Ae.removeEventListener("reset",Be)}},[m,y,X]);const G=y?!!m||!!y.closest("form"):!0,[z,J]=R.useState(new Set),ue=Wo(),Le=Array.from(z).map(Ae=>Ae.props.value).join(";"),ye=R.useCallback(Ae=>{J(Be=>new Set(Be).add(Ae))},[]),xe=R.useCallback(Ae=>{J(Be=>{const lt=new Set(Be);return lt.delete(Ae),lt})},[]),Re={required:p,trigger:y,onTriggerChange:S,valueNode:_,onValueNodeChange:k,valueNodeHasChildren:w,onValueNodeHasChildrenChange:b,contentId:ue,value:B,onValueChange:X,open:P,onOpenChange:$,dir:E,triggerPointerDownPosRef:j,disabled:f,name:c,autoComplete:h,form:m,nativeOptions:z,nativeSelectKey:Le,isFormControl:G};return Y.jsx(n2,{...x,children:Y.jsx(Dfe,{scope:e,...Re,children:Y.jsx(Vx.Provider,{scope:e,children:Y.jsx(Qfe,{scope:e,onNativeOptionAdd:ye,onNativeOptionRemove:xe,children:EV(g)?g(Re):n})})})})}nn(SV,"SelectProvider");var _V=nn(t=>{const{__scopeSelect:e,children:n,...i}=t;return Y.jsx(SV,{__scopeSelect:e,...i,internal_do_not_use_render:({isFormControl:r})=>Y.jsxs(Y.Fragment,{children:[n,r?Y.jsx(lde,{__scopeSelect:e}):null]})})},"Select"),Bfe="SelectTrigger",CV=R.forwardRef(nn(function(e,n){const{__scopeSelect:i,disabled:r=!1,...s}=e,o=e5(i),a=Tl(Bfe,i),l=a.disabled||r,u=cn(n,a.onTriggerChange),c=Jk(i),h=R.useRef("touch"),[f,p,m]=t5(x=>{const y=c().filter(k=>!k.disabled),S=y.find(k=>k.value===a.value),_=n5(y,x,S);_!==void 0&&a.onValueChange(_.value)}),g=nn(x=>{l||(a.onOpenChange(!0),m()),x&&(a.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)})},"handleOpen");return Y.jsx(G1,{asChild:!0,...o,children:Y.jsx(Wt.button,{type:"button",role:"combobox","aria-controls":a.open?a.contentId:void 0,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":Em(a.value)?"":void 0,...s,ref:u,onClick:Ot(s.onClick,x=>{x.currentTarget.focus(),h.current!=="mouse"&&g(x)}),onPointerDown:Ot(s.onPointerDown,x=>{h.current=x.pointerType;const y=x.target;y.hasPointerCapture(x.pointerId)&&y.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&x.pointerType==="mouse"&&(g(x),x.preventDefault())}),onKeyDown:Ot(s.onKeyDown,x=>{const y=f.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&p(x.key),!(y&&x.key===" ")&&Mfe.includes(x.key)&&(g(),x.preventDefault())})})})},"SelectTrigger")),Ffe="SelectValue",jfe=R.forwardRef(nn(function(e,n){const{__scopeSelect:i,className:r,style:s,children:o,placeholder:a="",...l}=e,u=Tl(Ffe,i),{onValueNodeHasChildrenChange:c}=u,h=o!==void 0,f=cn(n,u.onValueNodeChange);ci(()=>{c(h)},[c,h]);const p=Em(u.value);return Y.jsx(Wt.span,{...l,asChild:p?!1:l.asChild,ref:f,style:{pointerEvents:"none"},children:Y.jsx(R.Fragment,{children:p?a:o},p?"placeholder":"value")})},"SelectValue")),wV=R.forwardRef(nn(function(e,n){const{__scopeSelect:i,children:r,...s}=e;return Y.jsx(Wt.span,{"aria-hidden":!0,...s,ref:n,children:r||"▼"})},"SelectIcon")),Zfe="SelectPortal",[zfe,Xfe]=tc(Zfe,{forceMount:void 0}),Wfe=nn(t=>{const{__scopeSelect:e,forceMount:n,...i}=t;return Y.jsx(zfe,{scope:t.__scopeSelect,forceMount:n,children:Y.jsx(K1,{asChild:!0,...i})})},"SelectPortal"),Ru="SelectContent",Hfe=R.forwardRef(nn(function(e,n){const i=Xfe(Ru,e.__scopeSelect),{forceMount:r=i.forceMount,...s}=e,o=Tl(Ru,e.__scopeSelect),[a,l]=R.useState();return ci(()=>{l(new DocumentFragment)},[]),Y.jsx(Cl,{present:r||o.open,children:({present:u})=>u?Y.jsx(Yfe,{...s,ref:n}):Y.jsx(Ufe,{...s,fragment:a})})},"SelectContent")),Ufe=R.forwardRef(nn(function(e,n){const{__scopeSelect:i,children:r,fragment:s}=e;return s?au.createPortal(Y.jsx(kV,{scope:i,children:Y.jsx(Vx.Slot,{scope:i,children:Y.jsx("div",{ref:n,children:r})})}),s):null},"SelectContentFragment")),bs=10,[kV,Bx]=tc(Ru),qfe=ra("SelectContent.RemoveScroll"),Yfe=R.forwardRef(nn(function(e,n){const{__scopeSelect:i}=e,{position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:a,side:l,sideOffset:u,align:c,alignOffset:h,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:g,hideWhenDetached:x,avoidCollisions:y,...S}=e,_=Tl(Ru,i),[k,w]=R.useState(null),[b,E]=R.useState(null),P=cn(n,w),[$,B]=R.useState(null),[X,j]=R.useState(null),Z=Jk(i),[G,z]=R.useState(!1),J=R.useRef(!1);R.useEffect(()=>{if(k)return fC(k)},[k]),im();const ue=R.useCallback(pe=>{const[ge,...Ve]=Z().map(et=>et.ref.current),[Ze]=Ve.slice(-1),Ge=document.activeElement;for(const et of pe)if(et===Ge||(et==null||et.scrollIntoView({block:"nearest"}),et===ge&&b&&(b.scrollTop=0),et===Ze&&b&&(b.scrollTop=b.scrollHeight),et==null||et.focus(),document.activeElement!==Ge))return},[Z,b]),Le=R.useCallback(()=>ue([$,k]),[ue,$,k]);R.useEffect(()=>{G&&Le()},[G,Le]);const{onOpenChange:ye,triggerPointerDownPosRef:xe}=_;R.useEffect(()=>{if(k){let pe={x:0,y:0};const ge=nn(Ze=>{var Ge,et;pe={x:Math.abs(Math.round(Ze.pageX)-(((Ge=xe.current)==null?void 0:Ge.x)??0)),y:Math.abs(Math.round(Ze.pageY)-(((et=xe.current)==null?void 0:et.y)??0))}},"handlePointerMove"),Ve=nn(Ze=>{pe.x<=10&&pe.y<=10?Ze.preventDefault():Ze.composedPath().includes(k)||ye(!1),document.removeEventListener("pointermove",ge),xe.current=null},"handlePointerUp");return xe.current!==null&&(document.addEventListener("pointermove",ge),document.addEventListener("pointerup",Ve,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ge),document.removeEventListener("pointerup",Ve,{capture:!0})}}},[k,ye,xe]),R.useEffect(()=>{const pe=nn(()=>ye(!1),"close");return window.addEventListener("blur",pe),window.addEventListener("resize",pe),()=>{window.removeEventListener("blur",pe),window.removeEventListener("resize",pe)}},[ye]);const[Re,Ae]=t5(pe=>{const ge=Z().filter(Ge=>!Ge.disabled),Ve=ge.find(Ge=>Ge.ref.current===document.activeElement),Ze=n5(ge,pe,Ve);Ze&&setTimeout(()=>{var Ge;return(Ge=Ze.ref.current)==null?void 0:Ge.focus()})}),Be=R.useCallback((pe,ge,Ve)=>{const Ze=!J.current&&!Ve;(_.value!==void 0&&_.value===ge||Ze)&&(B(pe),Ze&&(J.current=!0))},[_.value]),lt=R.useCallback(()=>k==null?void 0:k.focus(),[k]),qe=R.useCallback((pe,ge,Ve)=>{const Ze=!J.current&&!Ve;(_.value!==void 0&&_.value===ge||Ze)&&j(pe)},[_.value]),je=r==="popper"?_$:Gfe,we=je===_$?{side:l,sideOffset:u,align:c,alignOffset:h,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:g,hideWhenDetached:x,avoidCollisions:y}:{};return Y.jsx(kV,{scope:i,content:k,viewport:b,onViewportChange:E,itemRefCallback:Be,selectedItem:$,onItemLeave:lt,itemTextRefCallback:qe,focusSelectedItem:Le,selectedItemText:X,position:r,isPositioned:G,searchRef:Re,children:Y.jsx(dC,{as:qfe,allowPinchZoom:!0,children:Y.jsx(e2,{asChild:!0,trapped:_.open,onMountAutoFocus:pe=>{pe.preventDefault()},onUnmountAutoFocus:Ot(s,pe=>{var ge;(ge=_.trigger)==null||ge.focus({preventScroll:!0}),pe.preventDefault()}),children:Y.jsx(q1,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:pe=>pe.preventDefault(),onDismiss:()=>_.onOpenChange(!1),children:Y.jsx(je,{role:"listbox",id:_.contentId,"data-state":_.open?"open":"closed",dir:_.dir,onContextMenu:pe=>pe.preventDefault(),...S,...we,onPlaced:()=>z(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:Ot(S.onKeyDown,pe=>{const ge=pe.ctrlKey||pe.altKey||pe.metaKey;if(pe.key==="Tab"&&pe.preventDefault(),!ge&&pe.key.length===1&&Ae(pe.key),["ArrowUp","ArrowDown","Home","End"].includes(pe.key)){let Ze=Z().filter(Ge=>!Ge.disabled).map(Ge=>Ge.ref.current);if(["ArrowUp","End"].includes(pe.key)&&(Ze=Ze.slice().reverse()),["ArrowUp","ArrowDown"].includes(pe.key)){const Ge=pe.target,et=Ze.indexOf(Ge);Ze=Ze.slice(et+1)}setTimeout(()=>ue(Ze)),pe.preventDefault()}})})})})})})},"SelectContentImpl")),Gfe=R.forwardRef(nn(function(e,n){const{__scopeSelect:i,onPlaced:r,...s}=e,o=Tl(Ru,i),a=Bx(Ru,i),[l,u]=R.useState(null),[c,h]=R.useState(null),f=cn(n,h),p=Jk(i),m=R.useRef(!1),g=R.useRef(!0),{viewport:x,selectedItem:y,selectedItemText:S,focusSelectedItem:_}=a,k=R.useCallback(()=>{if(o.trigger&&o.valueNode&&l&&c&&x&&y&&S){const P=o.trigger.getBoundingClientRect(),$=c.getBoundingClientRect(),B=o.valueNode.getBoundingClientRect(),X=S.getBoundingClientRect();if(o.dir!=="rtl"){const Ge=X.left-$.left,et=B.left-Ge,Qt=P.left-et,wt=P.width+Qt,Ut=Math.max(wt,$.width),xt=window.innerWidth-bs,dn=W_(et,[bs,Math.max(bs,xt-Ut)]);l.style.minWidth=wt+"px",l.style.left=dn+"px"}else{const Ge=$.right-X.right,et=window.innerWidth-B.right-Ge,Qt=window.innerWidth-P.right-et,wt=P.width+Qt,Ut=Math.max(wt,$.width),xt=window.innerWidth-bs,dn=W_(et,[bs,Math.max(bs,xt-Ut)]);l.style.minWidth=wt+"px",l.style.right=dn+"px"}const j=p(),Z=window.innerHeight-bs*2,G=x.scrollHeight,z=window.getComputedStyle(c),J=parseInt(z.borderTopWidth,10),ue=parseInt(z.paddingTop,10),Le=parseInt(z.borderBottomWidth,10),ye=parseInt(z.paddingBottom,10),xe=J+ue+G+ye+Le,Re=Math.min(y.offsetHeight*5,xe),Ae=window.getComputedStyle(x),Be=parseInt(Ae.paddingTop,10),lt=parseInt(Ae.paddingBottom,10),qe=P.top+P.height/2-bs,je=Z-qe,we=y.offsetHeight/2,pe=y.offsetTop+we,ge=J+ue+pe,Ve=xe-ge;if(ge<=qe){const Ge=j.length>0&&y===j[j.length-1].ref.current;l.style.bottom="0px";const et=c.clientHeight-x.offsetTop-x.offsetHeight,Qt=Math.max(je,we+(Ge?lt:0)+et+Le),wt=ge+Qt;l.style.height=wt+"px"}else{const Ge=j.length>0&&y===j[0].ref.current;l.style.top="0px";const Qt=Math.max(qe,J+x.offsetTop+(Ge?Be:0)+we)+Ve;l.style.height=Qt+"px",x.scrollTop=ge-qe+x.offsetTop}l.style.margin=`${bs}px 0`,l.style.minHeight=Re+"px",l.style.maxHeight=Z+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[p,o.trigger,o.valueNode,l,c,x,y,S,o.dir,r]);ci(()=>k(),[k]);const[w,b]=R.useState();ci(()=>{c&&b(window.getComputedStyle(c).zIndex)},[c]);const E=R.useCallback(P=>{P&&g.current===!0&&(k(),_==null||_(),g.current=!1)},[k,_]);return Y.jsx(Kfe,{scope:i,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:E,children:Y.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:Y.jsx(Wt.div,{...s,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})},"SelectItemAlignedPosition")),_$=R.forwardRef(nn(function(e,n){const{__scopeSelect:i,align:r="start",collisionPadding:s=bs,...o}=e,a=e5(i);return Y.jsx(i2,{...a,...o,ref:n,align:r,collisionPadding:s,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[Kfe,Jfe]=tc(Ru,{}),C$="SelectViewport",ede=R.forwardRef(nn(function(e,n){const{__scopeSelect:i,nonce:r,...s}=e,o=Bx(C$,i),a=Jfe(C$,i),l=cn(n,o.onViewportChange),u=R.useRef(0);return Y.jsxs(Y.Fragment,{children:[Y.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),Y.jsx(Vx.Slot,{scope:i,children:Y.jsx(Wt.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:Ot(s.onScroll,c=>{const h=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:p}=a;if(p!=null&&p.current&&f){const m=Math.abs(u.current-h.scrollTop);if(m>0){const g=window.innerHeight-bs*2,x=parseFloat(f.style.minHeight),y=parseFloat(f.style.height),S=Math.max(x,y);if(S<g){const _=S+m,k=Math.min(g,_),w=_-k;f.style.height=k+"px",f.style.bottom==="0px"&&(h.scrollTop=w>0?w:0,f.style.justifyContent="flex-end")}}}u.current=h.scrollTop})})})]})},"SelectViewport")),tde="SelectGroup",[D1e,Q1e]=tc(tde),H_="SelectItem",[nde,ide]=tc(H_),rde=R.forwardRef(nn(function(e,n){const{__scopeSelect:i,value:r,disabled:s=!1,textValue:o,...a}=e,l=Tl(H_,i),u=Bx(H_,i),c=l.value===r,[h,f]=R.useState(o??""),[p,m]=R.useState(!1),g=Ms(k=>{var w;return(w=u.itemRefCallback)==null?void 0:w.call(u,k,r,s)}),x=cn(n,g),y=Wo(),S=R.useRef("touch"),_=nn(()=>{s||(l.onValueChange(r),l.onOpenChange(!1))},"handleSelect");return Y.jsx(nde,{scope:i,value:r,disabled:s,textId:y,isSelected:c,onItemTextChange:R.useCallback(k=>{f(w=>w||((k==null?void 0:k.textContent)??"").trim())},[]),children:Y.jsx(Vx.ItemSlot,{scope:i,value:r,disabled:s,textValue:h,children:Y.jsx(Wt.div,{role:"option","aria-labelledby":y,"data-highlighted":p?"":void 0,"aria-selected":c&&p,"data-state":c?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...a,ref:x,onFocus:Ot(a.onFocus,()=>m(!0)),onBlur:Ot(a.onBlur,()=>m(!1)),onClick:Ot(a.onClick,()=>{S.current!=="mouse"&&_()}),onPointerUp:Ot(a.onPointerUp,()=>{S.current==="mouse"&&_()}),onPointerDown:Ot(a.onPointerDown,k=>{S.current=k.pointerType}),onPointerMove:Ot(a.onPointerMove,k=>{var w;S.current=k.pointerType,s?(w=u.onItemLeave)==null||w.call(u):S.current==="mouse"&&k.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ot(a.onPointerLeave,k=>{var w;k.currentTarget===document.activeElement&&((w=u.onItemLeave)==null||w.call(u))}),onKeyDown:Ot(a.onKeyDown,k=>{var b;s||k.target!==k.currentTarget||((b=u.searchRef)==null?void 0:b.current)!==""&&k.key===" "||(Nfe.includes(k.key)&&_(),k.key===" "&&k.preventDefault())})})})})},"SelectItem")),Ig="SelectItemText",sde=R.forwardRef(nn(function(e,n){const{__scopeSelect:i,className:r,style:s,...o}=e,a=Tl(Ig,i),l=Bx(Ig,i),u=ide(Ig,i),c=Vfe(Ig,i),[h,f]=R.useState(null),p=Ms(_=>{var k;return(k=l.itemTextRefCallback)==null?void 0:k.call(l,_,u.value,u.disabled)}),m=cn(n,f,u.onItemTextChange,p),g=h==null?void 0:h.textContent,x=R.useMemo(()=>Y.jsx("option",{value:u.value,disabled:u.disabled,children:g},u.value),[u.disabled,u.value,g]),{onNativeOptionAdd:y,onNativeOptionRemove:S}=c;return ci(()=>(y(x),()=>S(x)),[y,S,x]),Y.jsxs(Y.Fragment,{children:[Y.jsx(Wt.span,{id:u.textId,...o,ref:m}),u.isSelected&&a.valueNode&&!a.valueNodeHasChildren&&!Em(a.value)?au.createPortal(o.children,a.valueNode):null]})},"SelectItemText")),ode=R.forwardRef(nn(function(e,n){const{__scopeSelect:i,...r}=e;return Y.jsx(Wt.div,{"aria-hidden":!0,...r,ref:n})},"SelectSeparator")),ade="SelectBubbleInput",lde=R.forwardRef(nn(function({__scopeSelect:e,...n},i){const r=Tl(ade,e),{value:s,onValueChange:o,required:a,disabled:l,name:u,autoComplete:c,form:h}=r,{nativeOptions:f,nativeSelectKey:p}=r,m=R.useRef(null),g=cn(i,m),x=s??"",y=vV(x),S=Array.from(f).some(_=>(_.props.value??"")==="");return R.useEffect(()=>{const _=m.current;if(!_)return;const k=window.HTMLSelectElement.prototype,b=Object.getOwnPropertyDescriptor(k,"value").set;if(y!==x&&b){const E=new Event("change",{bubbles:!0});b.call(_,x),_.dispatchEvent(E)}},[y,x]),Y.jsxs(Wt.select,{"aria-hidden":!0,required:a,tabIndex:-1,name:u,autoComplete:c,disabled:l,form:h,onChange:_=>o(_.target.value),...n,style:{...bV,...n.style},ref:g,defaultValue:x,children:[Em(s)&&!S?Y.jsx("option",{value:""}):null,Array.from(f)]},p)},"SelectBubbleInput"));function EV(t){return typeof t=="function"}nn(EV,"isFunction");function Em(t){return t===""||t===void 0}nn(Em,"shouldShowPlaceholder");function t5(t){const e=Ms(t),n=R.useRef(""),i=R.useRef(0),r=R.useCallback(o=>{const a=n.current+o;e(a),nn((function l(u){n.current=u,window.clearTimeout(i.current),u!==""&&(i.current=window.setTimeout(()=>l(""),1e3))}),"updateSearch")(a)},[e]),s=R.useCallback(()=>{n.current="",window.clearTimeout(i.current)},[]);return R.useEffect(()=>()=>window.clearTimeout(i.current),[]),[n,r,s]}nn(t5,"useTypeaheadSearch");function n5(t,e,n){const r=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,s=n?t.indexOf(n):-1;let o=TV(t,Math.max(s,0));r.length===1&&(o=o.filter(u=>u!==n));const l=o.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}nn(n5,"findNextItem");function TV(t,e){return t.map((n,i)=>t[(e+i)%t.length])}nn(TV,"wrapArray");var ude=Object.defineProperty,Yn=(t,e)=>ude(t,"name",{value:e,configurable:!0}),[i5,V1e]=Bs("Tooltip",[Jh]),Fx=Jh(),cde="TooltipProvider",hde=700,U_="tooltip.open",[fde,r5]=i5(cde),dde=Yn(t=>{const{__scopeTooltip:e,delayDuration:n=hde,skipDelayDuration:i=300,disableHoverableContent:r=!1,children:s}=t,o=R.useRef(!0),a=R.useRef(!1),l=R.useRef(0);return R.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),Y.jsx(fde,{scope:e,isOpenDelayedRef:o,delayDuration:n,onOpen:R.useCallback(()=>{i<=0||(window.clearTimeout(l.current),o.current=!1)},[i]),onClose:R.useCallback(()=>{i<=0||(window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,i))},[i]),isPointerInTransitRef:a,onPointerInTransitChange:R.useCallback(u=>{a.current=u},[]),disableHoverableContent:r,children:s})},"TooltipProvider"),q_="Tooltip",[pde,Tm]=i5(q_),mde=Yn(t=>{const{__scopeTooltip:e,children:n,open:i,defaultOpen:r,onOpenChange:s,disableHoverableContent:o,delayDuration:a}=t,l=r5(q_,t.__scopeTooltip),u=Fx(e),[c,h]=R.useState(null),[f,p]=R.useState(void 0),m=Wo(),g=R.useRef(0),x=o??l.disableHoverableContent,y=a??l.delayDuration,S=R.useRef(!1),[_,k]=Oo({prop:i,defaultProp:r??!1,onChange:Yn(B=>{B?(l.onOpen(),document.dispatchEvent(new CustomEvent(U_))):l.onClose(),s==null||s(B)},"onChange"),caller:q_}),w=R.useMemo(()=>_?S.current?"delayed-open":"instant-open":"closed",[_]),b=R.useCallback(()=>{window.clearTimeout(g.current),g.current=0,S.current=!1,k(!0)},[k]),E=R.useCallback(()=>{window.clearTimeout(g.current),g.current=0,k(!1)},[k]),P=R.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{S.current=!0,k(!0),g.current=0},y)},[y,k]);R.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]);const $=f??m;return Y.jsx(n2,{...u,children:Y.jsx(pde,{scope:e,contentId:$,setContentId:p,open:_,stateAttribute:w,trigger:c,onTriggerChange:h,onTriggerEnter:R.useCallback(()=>{l.isOpenDelayedRef.current?P():b()},[l.isOpenDelayedRef,P,b]),onTriggerLeave:R.useCallback(()=>{x?E():(window.clearTimeout(g.current),g.current=0)},[E,x]),onOpen:b,onClose:E,disableHoverableContent:x,children:n})})},"Tooltip"),w$="TooltipTrigger",gde=R.forwardRef(Yn(function(e,n){const{__scopeTooltip:i,...r}=e,s=Tm(w$,i),o=r5(w$,i),a=Fx(i),l=R.useRef(null),u=cn(n,l,s.onTriggerChange),c=R.useRef(!1),h=R.useRef(!1),f=R.useCallback(()=>c.current=!1,[]);return R.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),Y.jsx(G1,{asChild:!0,...a,children:Y.jsx(Wt.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:u,onPointerMove:Ot(e.onPointerMove,p=>{p.pointerType!=="touch"&&!h.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),h.current=!0)}),onPointerLeave:Ot(e.onPointerLeave,()=>{s.onTriggerLeave(),h.current=!1}),onPointerDown:Ot(e.onPointerDown,()=>{s.open&&s.onClose(),c.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Ot(e.onFocus,()=>{c.current||s.onOpen()}),onBlur:Ot(e.onBlur,s.onClose),onClick:Ot(e.onClick,s.onClose)})})},"TooltipTrigger")),PV="TooltipPortal",[Ode,xde]=i5(PV,{forceMount:void 0}),yde=Yn(t=>{const{__scopeTooltip:e,forceMount:n,children:i,container:r}=t,s=Tm(PV,e);return Y.jsx(Ode,{scope:e,forceMount:n,children:Y.jsx(Cl,{present:n||s.open,children:Y.jsx(K1,{asChild:!0,container:r,children:i})})})},"TooltipPortal"),vp="TooltipContent",vde=R.forwardRef(Yn(function(e,n){const i=xde(vp,e.__scopeTooltip),{forceMount:r=i.forceMount,side:s="top",...o}=e,a=Tm(vp,e.__scopeTooltip);return Y.jsx(Cl,{present:r||a.open,children:a.disableHoverableContent?Y.jsx(AV,{side:s,...o,ref:n}):Y.jsx(bde,{side:s,...o,ref:n})})},"TooltipContent")),bde=R.forwardRef(Yn(function(e,n){const i=Tm(vp,e.__scopeTooltip),r=r5(vp,e.__scopeTooltip),s=R.useRef(null),o=cn(n,s),[a,l]=R.useState(null),{trigger:u,onClose:c}=i,h=s.current,{onPointerInTransitChange:f}=r,p=R.useCallback(()=>{l(null),f(!1)},[f]),m=R.useCallback((g,x)=>{const y=g.currentTarget,S={x:g.clientX,y:g.clientY},_=$V(S,y.getBoundingClientRect()),k=IV(S,_),w=RV(x.getBoundingClientRect()),b=NV([...k,...w]);l(b),f(!0)},[f]);return R.useEffect(()=>()=>p(),[p]),R.useEffect(()=>{if(u&&h){const g=Yn(y=>m(y,h),"handleTriggerLeave"),x=Yn(y=>m(y,u),"handleContentLeave");return u.addEventListener("pointerleave",g),h.addEventListener("pointerleave",x),()=>{u.removeEventListener("pointerleave",g),h.removeEventListener("pointerleave",x)}}},[u,h,m,p]),R.useEffect(()=>{if(a){const g=Yn(x=>{const y=x.target,S={x:x.clientX,y:x.clientY},_=(u==null?void 0:u.contains(y))||(h==null?void 0:h.contains(y)),k=!MV(S,a);_?p():k&&(p(),c())},"handleTrackPointerGrace");return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[u,h,a,c,p]),Y.jsx(AV,{...e,ref:o})},"TooltipContentHoverable")),Sde=J8("TooltipContent"),AV=R.forwardRef(Yn(function(e,n){const{__scopeTooltip:i,children:r,"aria-label":s,id:o,onEscapeKeyDown:a,onPointerDownOutside:l,...u}=e,c=Tm(vp,i),h=Fx(i),{onClose:f}=c;R.useEffect(()=>(document.addEventListener(U_,f),()=>document.removeEventListener(U_,f)),[f]),R.useEffect(()=>{if(c.trigger){const m=Yn(g=>{g.target instanceof Node&&g.target.contains(c.trigger)&&f()},"handleScroll");return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[c.trigger,f]);const{setContentId:p}=c;return ci(()=>(p(o),()=>{p(void 0)}),[o,p]),Y.jsx(q1,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:m=>m.preventDefault(),onDismiss:f,children:Y.jsxs(i2,{"data-state":c.stateAttribute,role:s?void 0:"tooltip",id:s?void 0:c.contentId,...h,...u,ref:n,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[Y.jsx(Sde,{children:r}),s?Y.jsx(Ife,{id:c.contentId,role:"tooltip",children:s}):null]})})},"TooltipContentImpl")),_de=R.forwardRef(Yn(function(e,n){const{__scopeTooltip:i,...r}=e,s=Fx(i);return Y.jsx(bM,{...s,...r,ref:n})},"TooltipArrow"));function $V(t,e){const n=Math.abs(e.top-t.y),i=Math.abs(e.bottom-t.y),r=Math.abs(e.right-t.x),s=Math.abs(e.left-t.x);switch(Math.min(n,i,r,s)){case s:return"left";case r:return"right";case n:return"top";case i:return"bottom";default:throw new Error("unreachable")}}Yn($V,"getExitSideFromRect");function IV(t,e,n=5){const i=[];switch(e){case"top":i.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":i.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":i.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":i.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return i}Yn(IV,"getPaddedExitPoints");function RV(t){const{top:e,right:n,bottom:i,left:r}=t;return[{x:r,y:e},{x:n,y:e},{x:n,y:i},{x:r,y:i}]}Yn(RV,"getPointsFromRect");function MV(t,e){const{x:n,y:i}=t;let r=!1;for(let s=0,o=e.length-1;s<e.length;o=s++){const a=e[s],l=e[o],u=a.x,c=a.y,h=l.x,f=l.y;c>i!=f>i&&n<(h-u)*(i-c)/(f-c)+u&&(r=!r)}return r}Yn(MV,"isPointInPolygon");function NV(t){const e=t.slice();return e.sort((n,i)=>n.x<i.x?-1:n.x>i.x?1:n.y<i.y?-1:n.y>i.y?1:0),LV(e)}Yn(NV,"getHull");function LV(t){if(t.length<=1)return t.slice();const e=[];for(let i=0;i<t.length;i++){const r=t[i];for(;e.length>=2;){const s=e[e.length-1],o=e[e.length-2];if((s.x-o.x)*(r.y-o.y)>=(s.y-o.y)*(r.x-o.x))e.pop();else break}e.push(r)}e.pop();const n=[];for(let i=t.length-1;i>=0;i--){const r=t[i];for(;n.length>=2;){const s=n[n.length-1],o=n[n.length-2];if((s.x-o.x)*(r.y-o.y)>=(s.y-o.y)*(r.x-o.x))n.pop();else break}n.push(r)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}Yn(LV,"getHullPresorted");var DV=dde,QV=mde,VV=gde,BV=yde,FV=vde,Cde=_de;const Pl=C.forwardRef(({title:t,children:e},n)=>{const i=Bt(Vs);return C.createElement(DV,{delayDuration:100},C.createElement(QV,null,C.createElement(VV,{ref:n,asChild:!0},C.createElement("span",{className:te.tooltipTrigger},e)),C.createElement(BV,{container:i==null?void 0:i.current},C.createElement(FV,{className:yt(te.tooltipContent),sideOffset:10},t))))}),s5=C.forwardRef(({children:t,className:e,...n},i)=>C.createElement(rde,{...n,ref:i,className:yt(e,te.selectItem)},C.createElement(sde,null,t))),jV=({title:t,placeholder:e,className:n})=>{const[i,r]=Ft(zn,fn);return C.createElement(Pl,{title:t},C.createElement(CV,{"aria-label":e,className:yt(te.selectTrigger,n),"data-toolbar-item":!0,disabled:i},C.createElement(jfe,{placeholder:e}),C.createElement(wV,{className:te.selectDropdownArrow},r("arrow_drop_down"))))},o5=({children:t,className:e=te.selectContainer})=>{const n=Bt(Vs);return C.createElement(Wfe,{container:n==null?void 0:n.current},C.createElement(Hfe,{className:yt(e,"mdxeditor-select-content"),onCloseAutoFocus:i=>{i.preventDefault()},position:"popper"},C.createElement(ede,{"data-editor-dropdown":!0,style:{maxHeight:"var(--radix-select-content-available-height)"}},t)))},ZV=({children:t,title:e,className:n})=>{const[i,r]=Ft(zn,fn);return C.createElement(Pl,{title:e},C.createElement(CV,{"aria-label":e,className:yt(te.toolbarButtonSelectTrigger,n),disabled:i},t,C.createElement(wV,{className:te.selectDropdownArrow},r("arrow_drop_down"))))},Pm=t=>C.createElement(_V,{value:t.value||"",onValueChange:t.onChange,disabled:t.disabled},C.createElement(jV,{title:t.triggerTitle,placeholder:t.placeholder}),C.createElement(o5,null,t.items.map((e,n)=>e==="separator"?C.createElement(ode,{key:n}):C.createElement(s5,{key:n,value:e.value},e.label)))),wde=[],zV=({language:t,nodeKey:e,code:n,focusEmitter:i})=>{const r=Ht(),{parentEditor:s,lexicalNode:o}=xO(),[a,l,u,c,h]=Ft(zn,zO,XO,fn,bp),f=Cfe(e,t,i),{setCode:p}=xO(),m=C.useRef(null),g=C.useRef(null),{value:x,items:y}=C.useMemo(()=>a5(h,t),[h,t]),S=C.useRef(p);return S.current=p,f.current={getCodemirror:()=>m.current},C.useEffect(()=>{const _=g.current;return(async()=>{const k=[...l,yV,UQ,Ek(),hf.of([$ce]),Se.lineWrapping,Se.updateListener.of(({state:w})=>{S.current(w.doc.toString())}),Se.domEventHandlers({focus:()=>{s.update(()=>{yn(null)})}})];if(a&&k.push(mt.readOnly.of(!0)),t!==""){const w=h.keyMap[t]??t,b=h.supportMap[w];if(b)k.push(b.extension);else if(u){const E=xue.find(P=>P.name===t||P.alias.includes(t)||P.extensions.includes(t));if(E)try{const P=await E.load();k.push(P.extension)}catch{console.warn("failed to load language support for",t)}}}_.innerHTML="",m.current=new Se({parent:_,state:mt.create({doc:n,extensions:k})}),_.addEventListener("keydown",k$)})(),()=>{var k;(k=m.current)==null||k.destroy(),m.current=null,_.removeEventListener("keydown",k$)}},[a,t,...l]),C.createElement("div",{className:te.codeMirrorWrapper},C.createElement("div",{className:te.codeMirrorToolbar},C.createElement(Pm,{disabled:a,value:x,onChange:_=>{s.update(()=>{o.setLanguage(_===su?"":_),setTimeout(()=>{s.update(()=>{o.getLatest().select()})})})},triggerTitle:r("codeBlock.selectLanguage","Select code block language"),placeholder:r("codeBlock.inlineLanguage","Language"),items:y}),C.createElement("button",{className:te.iconButton,type:"button",disabled:a,title:r("codeblock.delete","Delete code block"),onClick:_=>{_.preventDefault(),s.update(()=>{o.remove()})}},c("delete_small"))),C.createElement("div",{ref:g}))};function k$(t){t.stopPropagation()}const su="__EMPTY_VALUE__";function ZO(t){var e;const n=[],i={},r={};if(Array.isArray(t))for(const s of t){const o=((e=s.alias)==null?void 0:e[0])??s.name.toLowerCase(),a=o||su;if(n.push({value:a,label:s.name}),i[o]=a,s.alias)for(const l of s.alias)i[l]=a;if(s.extensions)for(const l of s.extensions)i[l]=a;i[s.name.toLowerCase()]=a,s.support&&(r[a]=s.support)}else{const s={};for(const[o,a]of Object.entries(t))a in s||(s[a]=o,n.push({value:o||su,label:a})),i[o]=s[a]||su}return{items:n,keyMap:i,supportMap:r}}function a5(t,e){const n=t.keyMap[e]??e;return!n||t.items.some(i=>i.value===n)?{value:n,items:t.items}:{value:n,items:[...t.items,{value:n,label:e}]}}const bp=Ee(ZO({js:"JavaScript",ts:"TypeScript",tsx:"TypeScript (React)",jsx:"JavaScript (React)",css:"CSS"})),XV=kn(t=>{t.link(t.pipe(XV,As(({language:e,code:n})=>({code:n,language:e,meta:""}))),_x)}),zO=Ee([]),XO=Ee(!0),kde=Vn({update(t,e){t.pubIn({[bp]:ZO((e==null?void 0:e.codeBlockLanguages)??{}),[zO]:(e==null?void 0:e.codeMirrorExtensions)??[],[XO]:(e==null?void 0:e.autoLoadLanguageSupport)??!0})},init(t,e){const n=ZO((e==null?void 0:e.codeBlockLanguages)??{});t.pubIn({[bp]:n,[zO]:(e==null?void 0:e.codeMirrorExtensions)??[],[cL]:Ede(n),[XO]:(e==null?void 0:e.autoLoadLanguageSupport)??!0})}});function Ede(t){return{match(e,n){return!n||Object.hasOwn(t.keyMap,e??"")},priority:1,Editor:zV}}const Tde={}.hasOwnProperty,Pde={},E$=/^[^\t\n\r "#'.<=>`}]+$/,Ade=/^[^\t\n\r "'<=>`}]+$/;function $de(){return{canContainEols:["textDirective"],enter:{directiveContainer:Rde,directiveContainerAttributes:Kv,directiveContainerLabel:Lde,directiveLeaf:Mde,directiveLeafAttributes:Kv,directiveText:Nde,directiveTextAttributes:Kv},exit:{directiveContainer:rb,directiveContainerAttributeClassValue:eb,directiveContainerAttributeIdValue:Jv,directiveContainerAttributeName:nb,directiveContainerAttributeValue:tb,directiveContainerAttributes:ib,directiveContainerLabel:Dde,directiveContainerName:Gv,directiveLeaf:rb,directiveLeafAttributeClassValue:eb,directiveLeafAttributeIdValue:Jv,directiveLeafAttributeName:nb,directiveLeafAttributeValue:tb,directiveLeafAttributes:ib,directiveLeafName:Gv,directiveText:rb,directiveTextAttributeClassValue:eb,directiveTextAttributeIdValue:Jv,directiveTextAttributeName:nb,directiveTextAttributeValue:tb,directiveTextAttributes:ib,directiveTextName:Gv}}}function Ide(t){const e=Pde;if(e.quote!=='"'&&e.quote!=="'"&&e.quote!==null&&e.quote!==void 0)throw new Error("Invalid quote `"+e.quote+"`, expected `'` or `\"`");return n.peek=Qde,{handlers:{containerDirective:n,leafDirective:n,textDirective:n},unsafe:[{character:"\r",inConstruct:["leafDirectiveLabel","containerDirectiveLabel"]},{character:`
|
|
132
|
+
`,inConstruct:["leafDirectiveLabel","containerDirectiveLabel"]},{before:"[^:]",character:":",after:"[A-Za-z]",inConstruct:["phrasing"]},{atBreak:!0,character:":",after:":"}]};function n(s,o,a,l){const u=a.createTracker(l),c=Vde(s),h=a.enter(s.type);let f=u.move(c+(s.name||"")),p;if(s.type==="containerDirective"){const m=(s.children||[])[0];p=T$(m)?m:void 0}else p=s;if(p&&p.children&&p.children.length>0){const m=a.enter("label"),g=`${s.type}Label`,x=a.enter(g);f+=u.move("["),f+=u.move(a.containerPhrasing(p,{...u.current(),before:f,after:"]"})),f+=u.move("]"),x(),m()}if(f+=u.move(i(s,a)),s.type==="containerDirective"){const m=(s.children||[])[0];let g=s;T$(m)&&(g=Object.assign({},s,{children:s.children.slice(1)})),g&&g.children&&g.children.length>0&&(f+=u.move(`
|
|
133
|
+
`),f+=u.move(a.containerFlow(g,u.current()))),f+=u.move(`
|
|
134
|
+
`+c)}return h(),f}function i(s,o){const a=s.attributes||{},l=[];let u,c,h,f;for(f in a)if(Tde.call(a,f)&&a[f]!==void 0&&a[f]!==null){const p=String(a[f]);if(f==="id")h=e.preferShortcut!==!1&&E$.test(p)?"#"+p:r("id",p,s,o);else if(f==="class"){const m=p.split(/[\t\n\r ]+/g),g=[],x=[];let y=-1;for(;++y<m.length;)(e.preferShortcut!==!1&&E$.test(m[y])?x:g).push(m[y]);u=g.length>0?r("class",g.join(" "),s,o):"",c=x.length>0?"."+x.join("."):""}else l.push(r(f,p,s,o))}return u&&l.unshift(u),c&&l.unshift(c),h&&l.unshift(h),l.length>0?"{"+l.join(" ")+"}":""}function r(s,o,a,l){if(e.collapseEmptyAttributes!==!1&&!o)return s;if(e.preferUnquoted&&Ade.test(o))return s+"="+o;const u=e.quote||l.options.quote||'"',c=u==='"'?"'":'"',h=e.quoteSmart&&y0(o,u)>y0(o,c)?c:u,f=a.type==="textDirective"?[h]:[h,`
|
|
135
|
+
`,"\r"];return s+"="+h+e6(o,{subset:f})+h}}function Rde(t){l5.call(this,"containerDirective",t)}function Mde(t){l5.call(this,"leafDirective",t)}function Nde(t){l5.call(this,"textDirective",t)}function l5(t,e){this.enter({type:t,name:"",attributes:{},children:[]},e)}function Gv(t){const e=this.stack[this.stack.length-1];yr(e.type==="containerDirective"||e.type==="leafDirective"||e.type==="textDirective"),e.name=this.sliceSerialize(t)}function Lde(t){this.enter({type:"paragraph",data:{directiveLabel:!0},children:[]},t)}function Dde(t){this.exit(t)}function Kv(){this.data.directiveAttributes=[],this.buffer()}function Jv(t){this.data.directiveAttributes.push(["id",r1(this.sliceSerialize(t),{attribute:!0})])}function eb(t){this.data.directiveAttributes.push(["class",r1(this.sliceSerialize(t),{attribute:!0})])}function tb(t){const e=this.data.directiveAttributes;e[e.length-1][1]=r1(this.sliceSerialize(t),{attribute:!0})}function nb(t){this.data.directiveAttributes.push([this.sliceSerialize(t),""])}function ib(){const t=this.data.directiveAttributes,e={};let n=-1;for(;++n<t.length;){const r=t[n];r[0]==="class"&&e.class?e.class+=" "+r[1]:e[r[0]]=r[1]}this.data.directiveAttributes=void 0,this.resume();const i=this.stack[this.stack.length-1];yr(i.type==="containerDirective"||i.type==="leafDirective"||i.type==="textDirective"),i.attributes=e}function rb(t){this.exit(t)}function Qde(){return":"}function T$(t){return!!(t&&t.type==="paragraph"&&t.data&&t.data.directiveLabel)}function Vde(t){let e=0;return t.type==="containerDirective"?(lZ(t,function(n,i){if(n.type==="containerDirective"){let r=i.length,s=0;for(;r--;)i[r].type==="containerDirective"&&s++;s>e&&(e=s)}}),e+=3):t.type==="leafDirective"?e=2:e=1,":".repeat(e)}function u5(t,e,n,i,r,s,o,a,l,u,c,h,f,p,m){let g,x;return y;function y(z){return t.enter(i),t.enter(r),t.consume(z),t.exit(r),S}function S(z){return z===35?(g=o,_(z)):z===46?(g=a,_(z)):z===58||z===95||hC(z)?(t.enter(s),t.enter(l),t.consume(z),b):m&&Ur(z)?qr(t,S,"whitespace")(z):!m&&Ji(z)?Vm(t,S)(z):G(z)}function _(z){const J=g+"Marker";return t.enter(s),t.enter(g),t.enter(J),t.consume(z),t.exit(J),k}function k(z){if(z===null||z===34||z===35||z===39||z===46||z===60||z===61||z===62||z===96||z===125||Ji(z))return n(z);const J=g+"Value";return t.enter(J),t.consume(z),w}function w(z){if(z===null||z===34||z===39||z===60||z===61||z===62||z===96)return n(z);if(z===35||z===46||z===125||Ji(z)){const J=g+"Value";return t.exit(J),t.exit(g),t.exit(s),S(z)}return t.consume(z),w}function b(z){return z===45||z===46||z===58||z===95||t6(z)?(t.consume(z),b):(t.exit(l),m&&Ur(z)?qr(t,E,"whitespace")(z):!m&&Ji(z)?Vm(t,E)(z):E(z))}function E(z){return z===61?(t.enter(u),t.consume(z),t.exit(u),P):(t.exit(s),S(z))}function P(z){return z===null||z===60||z===61||z===62||z===96||z===125||m&&ln(z)?n(z):z===34||z===39?(t.enter(c),t.enter(f),t.consume(z),t.exit(f),x=z,B):m&&Ur(z)?qr(t,P,"whitespace")(z):!m&&Ji(z)?Vm(t,P)(z):(t.enter(h),t.enter(p),t.consume(z),x=void 0,$)}function $(z){return z===null||z===34||z===39||z===60||z===61||z===62||z===96?n(z):z===125||Ji(z)?(t.exit(p),t.exit(h),t.exit(s),S(z)):(t.consume(z),$)}function B(z){return z===x?(t.enter(f),t.consume(z),t.exit(f),t.exit(c),t.exit(s),Z):(t.enter(h),X(z))}function X(z){return z===x?(t.exit(h),B(z)):z===null?n(z):ln(z)?m?n(z):Vm(t,X)(z):(t.enter(p),t.consume(z),j)}function j(z){return z===x||z===null||ln(z)?(t.exit(p),X(z)):(t.consume(z),j)}function Z(z){return z===125||Ji(z)?S(z):G(z)}function G(z){return z===125?(t.enter(r),t.consume(z),t.exit(r),t.exit(i),e):n(z)}}function c5(t,e,n,i,r,s,o){let a=0,l=0,u;return c;function c(x){return t.enter(i),t.enter(r),t.consume(x),t.exit(r),h}function h(x){return x===93?(t.enter(r),t.consume(x),t.exit(r),t.exit(i),e):(t.enter(s),f(x))}function f(x){if(x===93&&!l)return g(x);const y=t.enter("chunkText",{contentType:"text",previous:u});return u&&(u.next=y),u=y,p(x)}function p(x){return x===null||a>999||x===91&&++l>32?n(x):x===93&&!l--?(t.exit("chunkText"),g(x)):ln(x)?o?n(x):(t.consume(x),t.exit("chunkText"),f):(t.consume(x),x===92?m:p)}function m(x){return x===91||x===92||x===93?(t.consume(x),a++,p):p(x)}function g(x){return t.exit(s),t.enter(r),t.consume(x),t.exit(r),t.exit(i),e}}function h5(t,e,n,i){const r=this;return s;function s(a){return hC(a)?(t.enter(i),t.consume(a),o):n(a)}function o(a){return a===45||a===95||t6(a)?(t.consume(a),o):(t.exit(i),r.previous===45||r.previous===95?n(a):e(a))}}const Bde={tokenize:Zde,concrete:!0},Fde={tokenize:zde,partial:!0},jde={tokenize:Xde,partial:!0},Rg={tokenize:Wde,partial:!0};function Zde(t,e,n){const i=this,r=i.events[i.events.length-1],s=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0;let o=0,a;return l;function l($){return t.enter("directiveContainer"),t.enter("directiveContainerFence"),t.enter("directiveContainerSequence"),u($)}function u($){return $===58?(t.consume($),o++,u):o<3?n($):(t.exit("directiveContainerSequence"),h5.call(i,t,c,n,"directiveContainerName")($))}function c($){return $===91?t.attempt(Fde,h,h)($):h($)}function h($){return $===123?t.attempt(jde,f,f)($):f($)}function f($){return qr(t,p,"whitespace")($)}function p($){return t.exit("directiveContainerFence"),$===null?E($):ln($)?i.interrupt?e($):t.attempt(Rg,m,E)($):n($)}function m($){return $===null?E($):ln($)?t.check(Rg,_,E)($):(t.enter("directiveContainerContent"),g($))}function g($){return t.attempt({tokenize:P,partial:!0},b,s?qr(t,x,"linePrefix",s+1):x)($)}function x($){return $===null?b($):ln($)?t.check(Rg,S,b)($):S($)}function y($){if($===null){const B=t.exit("chunkDocument");return i.parser.lazy[B.start.line]=!1,b($)}return ln($)?t.check(Rg,k,w)($):(t.consume($),y)}function S($){const B=t.enter("chunkDocument",{contentType:"document",previous:a});return a&&(a.next=B),a=B,y($)}function _($){return t.enter("directiveContainerContent"),g($)}function k($){t.consume($);const B=t.exit("chunkDocument");return i.parser.lazy[B.start.line]=!1,g}function w($){const B=t.exit("chunkDocument");return i.parser.lazy[B.start.line]=!1,b($)}function b($){return t.exit("directiveContainerContent"),E($)}function E($){return t.exit("directiveContainer"),e($)}function P($,B,X){let j=0;return qr($,Z,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function Z(J){return $.enter("directiveContainerFence"),$.enter("directiveContainerSequence"),G(J)}function G(J){return J===58?($.consume(J),j++,G):j<o?X(J):($.exit("directiveContainerSequence"),qr($,z,"whitespace")(J))}function z(J){return J===null||ln(J)?($.exit("directiveContainerFence"),B(J)):X(J)}}}function zde(t,e,n){return c5(t,e,n,"directiveContainerLabel","directiveContainerLabelMarker","directiveContainerLabelString",!0)}function Xde(t,e,n){return u5(t,e,n,"directiveContainerAttributes","directiveContainerAttributesMarker","directiveContainerAttribute","directiveContainerAttributeId","directiveContainerAttributeClass","directiveContainerAttributeName","directiveContainerAttributeInitializerMarker","directiveContainerAttributeValueLiteral","directiveContainerAttributeValue","directiveContainerAttributeValueMarker","directiveContainerAttributeValueData",!0)}function Wde(t,e,n){const i=this;return r;function r(o){return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),s}function s(o){return i.parser.lazy[i.now().line]?n(o):e(o)}}const Hde={tokenize:Yde},Ude={tokenize:Gde,partial:!0},qde={tokenize:Kde,partial:!0};function Yde(t,e,n){const i=this;return r;function r(c){return t.enter("directiveLeaf"),t.enter("directiveLeafSequence"),t.consume(c),s}function s(c){return c===58?(t.consume(c),t.exit("directiveLeafSequence"),h5.call(i,t,o,n,"directiveLeafName")):n(c)}function o(c){return c===91?t.attempt(Ude,a,a)(c):a(c)}function a(c){return c===123?t.attempt(qde,l,l)(c):l(c)}function l(c){return qr(t,u,"whitespace")(c)}function u(c){return c===null||ln(c)?(t.exit("directiveLeaf"),e(c)):n(c)}}function Gde(t,e,n){return c5(t,e,n,"directiveLeafLabel","directiveLeafLabelMarker","directiveLeafLabelString",!0)}function Kde(t,e,n){return u5(t,e,n,"directiveLeafAttributes","directiveLeafAttributesMarker","directiveLeafAttribute","directiveLeafAttributeId","directiveLeafAttributeClass","directiveLeafAttributeName","directiveLeafAttributeInitializerMarker","directiveLeafAttributeValueLiteral","directiveLeafAttributeValue","directiveLeafAttributeValueMarker","directiveLeafAttributeValueData",!0)}const Jde={tokenize:ipe,previous:npe},epe={tokenize:rpe,partial:!0},tpe={tokenize:spe,partial:!0};function npe(t){return t!==58||this.events[this.events.length-1][1].type==="characterEscape"}function ipe(t,e,n){const i=this;return r;function r(l){return t.enter("directiveText"),t.enter("directiveTextMarker"),t.consume(l),t.exit("directiveTextMarker"),h5.call(i,t,s,n,"directiveTextName")}function s(l){return l===58?n(l):l===91?t.attempt(epe,o,o)(l):o(l)}function o(l){return l===123?t.attempt(tpe,a,a)(l):a(l)}function a(l){return t.exit("directiveText"),e(l)}}function rpe(t,e,n){return c5(t,e,n,"directiveTextLabel","directiveTextLabelMarker","directiveTextLabelString")}function spe(t,e,n){return u5(t,e,n,"directiveTextAttributes","directiveTextAttributesMarker","directiveTextAttribute","directiveTextAttributeId","directiveTextAttributeClass","directiveTextAttributeName","directiveTextAttributeInitializerMarker","directiveTextAttributeValueLiteral","directiveTextAttributeValue","directiveTextAttributeValueMarker","directiveTextAttributeValueData")}function ope(){return{text:{58:Jde},flow:{58:[Bde,Hde]}}}var ape=Object.defineProperty,lpe=(t,e,n)=>e in t?ape(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,sb=(t,e,n)=>lpe(t,typeof e!="symbol"?e+"":e,n);class xf extends us{constructor(e,n){super(n),sb(this,"__mdastNode"),sb(this,"__focusEmitter",ep()),sb(this,"select",()=>{this.__focusEmitter.publish()}),this.__mdastNode=e}static getType(){return"directive"}static clone(e){return new xf(structuredClone(e.__mdastNode),e.__key)}static importJSON(e){return jx(e.mdastNode)}getMdastNode(){return this.__mdastNode}exportJSON(){return{mdastNode:structuredClone(this.__mdastNode),type:"directive",version:1}}createDOM(){return document.createElement(this.__mdastNode.type==="textDirective"?"span":"div")}updateDOM(){return!1}setMdastNode(e){this.getWritable().__mdastNode=e}decorate(e,n){return C.createElement(upe,{lexicalNode:this,mdastNode:this.getMdastNode(),parentEditor:e,config:n,focusEmitter:this.__focusEmitter})}isInline(){return this.__mdastNode.type==="textDirective"}isKeyboardSelectable(){return!0}}const upe=t=>{const{mdastNode:e}=t,[n]=Ft(Su),i=n.find(s=>s.testNode(e));if(!i)throw new Error(`No descriptor found for directive ${e.name}`);const r=i.Editor;return C.createElement(vx.Provider,{value:t},C.createElement(r,{descriptor:i,mdastNode:e,lexicalNode:t.lexicalNode,parentEditor:t.parentEditor}))};function jx(t,e){return new xf(t,e)}function WV(t){return t instanceof xf}const cpe={testLexicalNode:WV,visitLexicalNode({actions:t,mdastParent:e,lexicalNode:n}){t.appendToParent(e,n.getMdastNode())}},hpe=["leafDirective","containerDirective","textDirective"];function fpe(t){return hpe.includes(t.type)}const dpe=t=>({testNode:(e,{directiveDescriptors:n})=>{if(fpe(e)){const i=n.find(r=>r.testNode(e));return t&&!i&&e.type==="textDirective"?!0:i!==void 0}return!1},visitNode({lexicalParent:e,mdastNode:n,descriptors:i}){!t||i.directiveDescriptors.some(s=>s.testNode(n))?e.append(jx(n)):e.append(Vt(`:${n.name}`))}}),f5=kn(t=>{t.link(t.pipe(f5,As(e=>()=>jx({children:[],...e}))),Yh)}),ppe=Vn({update:(t,e)=>{t.pub(Su,(e==null?void 0:e.directiveDescriptors)??[])},init:(t,e)=>{t.pubIn({[Su]:(e==null?void 0:e.directiveDescriptors)??[],[ol]:$de(),[sl]:ope(),[hr]:dpe(e==null?void 0:e.escapeUnknownTextDirectives),[Nr]:xf,[Lr]:cpe,[Wu]:Ide()})}}),Zx=["note","tip","danger","info","caution"],mpe={name:"admonition",attributes:[],hasChildren:!0,testNode(t){return Zx.includes(t.name)},Editor({mdastNode:t}){var e;const{config:{theme:n}}=mm();return C.createElement("div",{className:(e=n.admonition)==null?void 0:e[t.name]},C.createElement(Sx,{block:!0,getContent:i=>i.children,getUpdatedMdastNode:(i,r)=>({...i,children:r})}))}},gpe=({mdastNode:t,descriptor:e})=>{const n=bx(),i=C.useMemo(()=>e.attributes.reduce((s,o)=>{var a;return s[o]=((a=t.attributes)==null?void 0:a[o])??"",s},{}),[t,e]),r=C.useCallback(s=>{n({attributes:Object.fromEntries(Object.entries(s).filter(([,o])=>o!==""))})},[n]);return C.createElement("div",{className:t.type==="textDirective"?te.inlineEditor:te.blockEditor},e.attributes.length==0&&e.hasChildren&&t.type!=="textDirective"?C.createElement("span",{className:te.genericComponentName},t.name):null,e.attributes.length>0?C.createElement(rk,{properties:i,title:t.name||"",onChange:r}):null,e.hasChildren?C.createElement(Sx,{block:t.type==="containerDirective",getContent:s=>s.children,getUpdatedMdastNode:(s,o)=>({...s,children:o})}):C.createElement("span",{className:te.genericComponentName},t.name))};function Ope({url:t,title:e,text:n,onSubmit:i,onCancel:r,linkAutocompleteSuggestions:s,showLinkTitleField:o,showAnchorTextField:a}){const{register:l,handleSubmit:u,control:c,setValue:h,reset:f}=dx({values:{url:t,title:e,text:n}}),p=Ht();return C.createElement("form",{onSubmit:m=>{u(i)(m),m.stopPropagation(),m.preventDefault()},onReset:m=>{m.stopPropagation(),r()},onKeyDown:m=>{m.key==="Escape"&&(m.stopPropagation(),r())},className:yt(te.multiFieldForm,te.linkDialogEditForm)},C.createElement("div",{className:te.formField},C.createElement("label",{htmlFor:"link-url"},p("createLink.url","URL")),C.createElement(J7,{register:l,initialInputValue:t,inputName:"url",suggestions:s,setValue:h,control:c,placeholder:p("createLink.urlPlaceholder","Select or paste an URL"),autofocus:!0})),a?C.createElement("div",{className:te.formField},C.createElement("label",{htmlFor:"link-text",title:p("createLink.textTooltip","The text to be displayed for the link")},p("createLink.text","Anchor text")),C.createElement("input",{id:"link-text",className:te.textInput,size:40,...l("text")})):null,o?C.createElement("div",{className:te.formField},C.createElement("label",{htmlFor:"link-title",title:p("createLink.titleTooltip","The link's title attribute, shown on hover")},p("createLink.title","Link title")),C.createElement("input",{id:"link-title",className:te.textInput,size:40,...l("title")})):null,C.createElement("div",{style:{display:"flex",justifyContent:"flex-end",gap:"var(--spacing-2)"}},C.createElement("button",{type:"submit",title:p("createLink.saveTooltip","Set URL"),"aria-label":p("createLink.saveTooltip","Set URL"),className:yt(te.primaryButton)},p("dialogControls.save","Save")),C.createElement("button",{type:"reset",title:p("createLink.cancelTooltip","Cancel change"),"aria-label":p("createLink.cancelTooltip","Cancel change"),className:yt(te.secondaryButton)},p("dialogControls.cancel","Cancel"))))}const xpe=()=>{const[t,e,n,i,r,s,o]=Ft(Vs,tn,fn,Vi,x5,y5,b5),a=Tt(d5),l=Tt(p5),u=Tt(m5),c=Tt(g5),h=Tt(O5);C.useEffect(()=>{const y=()=>{e==null||e.getEditorState().read(()=>{a(!0)})};return window.addEventListener("resize",y),window.addEventListener("scroll",y),()=>{window.removeEventListener("resize",y),window.removeEventListener("scroll",y)}},[e,a]);const[f,p]=C.useState(!1),m=Ht();if(i.type==="inactive")return null;const g=i.rectangle,x=i.type==="preview"&&i.url.startsWith("http");return C.createElement(J1,{open:!0},C.createElement(kJ,{"data-visible":i.type==="edit",className:te.linkDialogAnchor,style:{top:`${g.top}px`,left:`${g.left}px`,width:`${g.width}px`,height:`${g.height}px`}}),C.createElement(ex,{container:t==null?void 0:t.current},C.createElement(IM,{className:yt(te.linkDialogPopoverContent),sideOffset:5,onOpenAutoFocus:y=>{y.preventDefault()},key:i.linkNodeKey},i.type==="edit"&&C.createElement(Ope,{url:i.url,title:i.title,text:i.text,onSubmit:l,onCancel:u.bind(null),linkAutocompleteSuggestions:r,showLinkTitleField:o,showAnchorTextField:i.withAnchorText}),i.type==="preview"&&C.createElement(C.Fragment,null,C.createElement("a",{className:te.linkDialogPreviewAnchor,"data-testid":"link-dialog-preview",href:i.href??"about:blank",...x?{target:"_blank",rel:"noreferrer"}:{},onClick:y=>{s!==null&&(y.preventDefault(),s(i.url))},title:x?m("linkPreview.open","Open {{url}} in new window",{url:i.url}):i.url},C.createElement("span",null,i.url),x&&n("open_in_new")),C.createElement(ob,{onClick:()=>{c()},title:m("linkPreview.edit","Edit link URL"),"aria-label":m("linkPreview.edit","Edit link URL")},n("edit")),C.createElement(DV,null,C.createElement(QV,{open:f},C.createElement(VV,{asChild:!0},C.createElement(ob,{title:m("linkPreview.copyToClipboard","Copy to clipboard"),"aria-label":m("linkPreview.copyToClipboard","Copy to clipboard"),onClick:()=>{window.navigator.clipboard.writeText(i.url).then(()=>{p(!0),setTimeout(()=>{p(!1)},1e3)})}},n(f?"check":"content_copy"))),C.createElement(BV,{container:t==null?void 0:t.current},C.createElement(FV,{className:yt(te.tooltipContent),sideOffset:5},m("linkPreview.copied","Copied!"),C.createElement(Cde,null))))),C.createElement(ob,{title:m("linkPreview.remove","Remove link"),"aria-label":m("linkPreview.remove","Remove link"),onClick:()=>{h()}},n("link_off"))),C.createElement(tx,{className:te.popoverArrow}))))},ob=C.forwardRef(({className:t,...e},n)=>C.createElement("button",{className:yt(te.actionButton,t),ref:n,...e}));function WO(t){if(!t)return null;const e=$8(t);if(e===null)return null;const n=e.getParent();return ni(n)?n:ni(e)?e:null}function P$(t,e,n){return t?t.getEditorState().read(()=>{const i=e===""?null:st(e),r=me(),s=ae(r)?WO(r):null,o=ni(i)?i:s;return(o==null?void 0:o.sanitizeUrl(n))??"about:blank"}):"about:blank"}const d5=kn(),Vi=Ee({type:"inactive"},t=>{t.pub(_u,e=>e.registerCommand(Lh,()=>t.getValue(Vi).type==="preview"?(t.pub(Vi,{type:"inactive"}),!0):!1,Gt)),t.sub(t.pipe(go),e=>{e!=="rich-text"&&t.pub(Vi,{type:"inactive"})}),t.pub(_u,e=>e.registerCommand(Mh,n=>{if(n.key==="k"&&(Xd?n.metaKey:n.ctrlKey)&&!t.getValue(zn)){const i=me();return ae(i)?(t.pub(zx),n.stopPropagation(),n.preventDefault(),!0):!1}return!1},Id)),t.sub(t.pipe(g5,On(Vi,tn)),([,e,n])=>{if(e.type==="preview")setTimeout(()=>{n==null||n.getEditorState().read(()=>{const i=st(e.linkNodeKey),r=ni(i)?i.getTextContent().length>0&&i.getChildrenSize()<=1:!1,s=r&&i?i.getTextContent():"";t.pub(Vi,{type:"edit",initialUrl:e.url,url:e.url,title:e.title,text:s,withAnchorText:r,linkNodeKey:e.linkNodeKey,rectangle:e.rectangle})})});else throw new Error("Cannot switch to edit mode when not in preview mode")}),t.sub(t.pipe(p5,On(tn,Vi,bu)),([e,n,i,r])=>{var s,o,a;const l=((s=e.text)==null?void 0:s.trim())??"",u=((o=e.url)==null?void 0:o.trim())??"",c=((a=e.title)==null?void 0:a.trim())??"";if(u!==""){if(r!=null&&r.isCollapsed()){const h=l||c||u;n==null||n.update(()=>{const f=WO(r);if(f)if(Bi(f)){const p=oa(u,{title:c});p.append(Vt(l)),f.replace(p),p.select()}else f.setURL(u),f.setTitle(c),A$(f.getFirstChild(),l);else{const p=oa(u,{title:c});p.append(Vt(h)),Du([p]),p.select()}},{discrete:!0})}else n==null||n.update(()=>{A$(r==null?void 0:r.anchor.getNode(),l)}),n==null||n.dispatchCommand(uh,{url:u,title:c});t.pub(Vi,{type:"preview",linkNodeKey:i.linkNodeKey,rectangle:i.rectangle,title:c,url:u,href:P$(n,i.linkNodeKey??"",u)})}else i.type==="edit"&&i.initialUrl!==""&&(n==null||n.dispatchCommand(uh,null)),t.pub(Vi,{type:"inactive"})}),t.link(t.pipe(m5,On(Vi,tn),As(([,e,n])=>{if(e.type==="edit")return n==null||n.focus(),e.initialUrl===""?{type:"inactive"}:{type:"preview",url:e.initialUrl,href:P$(n,e.linkNodeKey,e.initialUrl),linkNodeKey:e.linkNodeKey,rectangle:e.rectangle};throw new Error("Cannot cancel edit when not in edit mode")})),Vi),t.link(t.pipe(t.combine(bu,d5),On(tn,Vi,zn),As(([[e],n,i,r])=>{if(ae(e)&&n&&!r){const s=WO(e);if(!e.isCollapsed())return{type:"inactive"};if(s){const o=Ww(n);return o?{type:"preview",url:s.getURL(),href:s.sanitizeUrl(s.getURL()),linkNodeKey:s.getKey(),title:s.getTitle(),rectangle:o}:{type:"inactive"}}else return{type:"inactive"}}else return{type:"inactive"}})),Vi)}),p5=kn(),m5=Ds(),ype=Ds(),g5=Ds(),O5=Ds(t=>{t.sub(t.pipe(O5,On(tn)),([,e])=>{e==null||e.dispatchCommand(uh,null)})}),zx=Ds(t=>{t.sub(t.pipe(zx,On(bu,tn),Th(([,e])=>ae(e))),([,e,n])=>{n==null||n.focus(()=>{setTimeout(()=>{n.getEditorState().read(()=>{const i=WO(e),r=Ww(n),s=(i==null?void 0:i.getURL())??"",o=(i==null?void 0:i.getURL())??"",a=(i==null?void 0:i.getTitle())??"",l=(i==null?void 0:i.getKey())??"",u=i?i.getTextContent().length>0&&i.getChildrenSize()<=1:!!(e!=null&&e.isCollapsed()),c=u&&i?i.getTextContent():"";t.pub(Vi,{type:"edit",initialUrl:s,url:o,title:a,text:c,withAnchorText:u,linkNodeKey:l,rectangle:r})})})})})}),x5=Ee([]),y5=Ee(null),v5=Ee(null,t=>{t.pub(_u,e=>{function n(i){const[r,s]=t.getValues([zn,v5]);!r||s===null||e.update(()=>{const o=os(i.target);if(o!==null){const a=Lt(o,l=>l instanceof So);a!==null&&s(i,a,a.getURL())}})}return e.registerRootListener((i,r)=>{i&&i.addEventListener("click",n),r&&r.removeEventListener("click",n)})})});function A$(t,e){le(t)&&e&&(t.setTextContent(e),t.selectStart())}const b5=Ee(!0),vpe=Vn({init(t,e){t.pub(_l,(e==null?void 0:e.LinkDialog)??xpe),t.pub(y5,(e==null?void 0:e.onClickLinkCallback)??null),t.pub(v5,(e==null?void 0:e.onReadOnlyClickLinkCallback)??null),t.pub(b5,(e==null?void 0:e.showLinkTitleField)??!0)},update(t,e={}){t.pub(x5,e.linkAutocompleteSuggestions??[])}});function S5(t,e){return C.forwardRef((n,i)=>{const r=yt(e.className,n.className);return C.createElement(t,{...e,...n,className:r,ref:i})})}function bpe(t){return({title:e,children:n,...i})=>C.createElement(t,{"aria-label":e,...i},C.createElement(Pl,{title:e},n))}const HV=({readOnly:t,children:e,className:n})=>C.createElement(f2,{className:yt("mdxeditor-toolbar",te.toolbarRoot,{[te.readOnlyToolbarRoot]:t},n),...t?{tabIndex:-1}:{}},e),UV=S5(Uo,{className:te.toolbarButton,"data-toolbar-item":!0}),nc=bpe(UV),_5=S5(i0,{className:te.toolbarToggleItem,"data-toolbar-item":!0}),Spe=S5(rx,{type:"single",className:te.toolbarToggleSingleGroup}),C5=C.forwardRef(({on:t,title:e,children:n,disabled:i,...r},s)=>C.createElement(rx,{type:"single",className:te.toolbarToggleSingleGroup,...r,value:t?"on":"off",ref:s},C.createElement(_5,{"aria-label":e,value:"on",disabled:i},C.createElement(Pl,{title:e},n)))),Xx=({items:t})=>C.createElement("div",{className:te.toolbarGroupOfGroups},t.map((e,n)=>C.createElement(C5,{key:n,title:e.title,on:e.active,onValueChange:i=>{e.onChange(i==="on")},disabled:e.disabled},e.contents))),w5=({value:t,onChange:e,className:n,ggClassName:i,items:r,disabled:s})=>{const o=Ht();return C.createElement("div",{className:yt(te.toolbarGroupOfGroups,i)},C.createElement(rx,{"aria-label":o("toolbar.toggleGroup","toggle group"),type:"single",className:yt(te.toolbarToggleSingleGroup,n),onValueChange:e,value:t||"",disabled:s,onFocus:a=>{a.preventDefault()}},r.map((a,l)=>C.createElement(_5,{key:l,"aria-label":a.title,value:a.value},C.createElement(Pl,{title:a.title},a.contents)))))},qV=t=>{const e=Bt(zn);return C.createElement(C.Fragment,null,t.items.length===1?C.createElement(nc,{title:t.title,onClick:()=>{t.onChoose("")},disabled:e},t.children):C.createElement(_V,{value:"",onValueChange:t.onChoose},C.createElement(ZV,{title:t.title},t.children),C.createElement(o5,{className:te.toolbarButtonDropdownContainer},t.items.map((n,i)=>C.createElement(s5,{key:i,value:n.value},n.label)))))};function $$(t){return Object.hasOwn(t,"when")}const p0=({options:t})=>{const e=Bt(Hu),n=C.useMemo(()=>{const i=t.find(r=>{if($$(r)){if(r.when(e))return!0}else return!0});return i?$$(i)?i.contents():i.fallback():null},[t,e]);return C.createElement("div",{style:{display:"flex"}},n)},Gs=o7,m0=Ee(()=>null),g0=Ee(""),I$=()=>"This is an empty toolbar. Pass `{toolbarContents: () => { return <>toolbar components</> }}` to the toolbarPlugin to customize it.",_pe=Vn({init(t,e){const n=(e==null?void 0:e.toolbarPosition)==="bottom"?E8:k8;t.pubIn({[m0]:(e==null?void 0:e.toolbarContents)??I$,[g0]:(e==null?void 0:e.toolbarClassName)??"",[n]:()=>{const[i,r,s]=Ft(m0,zn,g0);return C.createElement(HV,{className:s,readOnly:r},i())}})},update(t,e){t.pub(m0,(e==null?void 0:e.toolbarContents)??I$),t.pub(g0,(e==null?void 0:e.toolbarClassName)??"")}});class jn{constructor(e,n,i,r){this.fromA=e,this.toA=n,this.fromB=i,this.toB=r}offset(e,n=e){return new jn(this.fromA+e,this.toA+e,this.fromB+n,this.toB+n)}}function Mu(t,e,n,i,r,s){if(t==i)return[];let o=E5(t,e,n,i,r,s),a=T5(t,e+o,n,i,r+o,s);e+=o,n-=a,r+=o,s-=a;let l=n-e,u=s-r;if(!l||!u)return[new jn(e,n,r,s)];if(l>u){let h=t.slice(e,n).indexOf(i.slice(r,s));if(h>-1)return[new jn(e,e+h,r,r),new jn(e+h+u,n,s,s)]}else if(u>l){let h=i.slice(r,s).indexOf(t.slice(e,n));if(h>-1)return[new jn(e,e,r,r+h),new jn(n,n,r+h+l,s)]}if(l==1||u==1)return[new jn(e,n,r,s)];let c=KV(t,e,n,i,r,s);if(c){let[h,f,p]=c;return Mu(t,e,h,i,r,f).concat(Mu(t,h+p,n,i,f+p,s))}return Cpe(t,e,n,i,r,s)}let Hf=1e9,Uf=0,k5=!1;function Cpe(t,e,n,i,r,s){let o=n-e,a=s-r;if(Hf<1e9&&Math.min(o,a)>Hf*16||Uf>0&&Date.now()>Uf)return Math.min(o,a)>Hf*64?[new jn(e,n,r,s)]:R$(t,e,n,i,r,s);let l=Math.ceil((o+a)/2);ab.reset(l),lb.reset(l);let u=(p,m)=>t.charCodeAt(e+p)==i.charCodeAt(r+m),c=(p,m)=>t.charCodeAt(n-p-1)==i.charCodeAt(s-m-1),h=(o-a)%2!=0?lb:null,f=h?null:ab;for(let p=0;p<l;p++){if(p>Hf||Uf>0&&!(p&63)&&Date.now()>Uf)return R$(t,e,n,i,r,s);let m=ab.advance(p,o,a,l,h,!1,u)||lb.advance(p,o,a,l,f,!0,c);if(m)return wpe(t,e,n,e+m[0],i,r,s,r+m[1])}return[new jn(e,n,r,s)]}class YV{constructor(){this.vec=[]}reset(e){this.len=e<<1;for(let n=0;n<this.len;n++)this.vec[n]=-1;this.vec[e+1]=0,this.start=this.end=0}advance(e,n,i,r,s,o,a){for(let l=-e+this.start;l<=e-this.end;l+=2){let u=r+l,c=l==-e||l!=e&&this.vec[u-1]<this.vec[u+1]?this.vec[u+1]:this.vec[u-1]+1,h=c-l;for(;c<n&&h<i&&a(c,h);)c++,h++;if(this.vec[u]=c,c>n)this.end+=2;else if(h>i)this.start+=2;else if(s){let f=r+(n-i)-l;if(f>=0&&f<this.len&&s.vec[f]!=-1)if(o){let p=s.vec[f];if(p>=n-c)return[p,r+p-f]}else{let p=n-s.vec[f];if(c>=p)return[c,h]}}}return null}}const ab=new YV,lb=new YV;function wpe(t,e,n,i,r,s,o,a){let l=!1;return!bh(t,i)&&++i==n&&(l=!0),!bh(r,a)&&++a==o&&(l=!0),l?[new jn(e,n,s,o)]:Mu(t,e,i,r,s,a).concat(Mu(t,i,n,r,a,o))}function GV(t,e){let n=1,i=Math.min(t,e);for(;n<i;)n=n<<1;return n}function E5(t,e,n,i,r,s){if(e==n||e==s||t.charCodeAt(e)!=i.charCodeAt(r))return 0;let o=GV(n-e,s-r);for(let a=e,l=r;;){let u=a+o,c=l+o;if(u>n||c>s||t.slice(a,u)!=i.slice(l,c)){if(o==1)return a-e-(bh(t,a)?0:1);o=o>>1}else{if(u==n||c==s)return u-e;a=u,l=c}}}function T5(t,e,n,i,r,s){if(e==n||r==s||t.charCodeAt(n-1)!=i.charCodeAt(s-1))return 0;let o=GV(n-e,s-r);for(let a=n,l=s;;){let u=a-o,c=l-o;if(u<e||c<r||t.slice(u,a)!=i.slice(c,l)){if(o==1)return n-a-(bh(t,a)?0:1);o=o>>1}else{if(u==e||c==r)return n-u;a=u,l=c}}}function Y_(t,e,n,i,r,s,o,a){let l=i.slice(r,s),u=null;for(;;){if(u||o<a)return u;for(let c=e+o;;){bh(t,c)||c++;let h=c+o;if(bh(t,h)||(h+=h==c+1?1:-1),h>=n)break;let f=t.slice(c,h),p=-1;for(;(p=l.indexOf(f,p+1))!=-1;){let m=E5(t,h,n,i,r+p+f.length,s),g=T5(t,e,c,i,r,r+p),x=f.length+m+g;(!u||u[2]<x)&&(u=[c-g,r+p-g,x])}c=h}if(a<0)return u;o=o>>1}}function KV(t,e,n,i,r,s){let o=n-e,a=s-r;if(o<a){let l=KV(i,r,s,t,e,n);return l&&[l[1],l[0],l[2]]}return o<4||a*2<o?null:Y_(t,e,n,i,r,s,Math.floor(o/4),-1)}function R$(t,e,n,i,r,s){k5=!0;let o=n-e,a=s-r,l;if(o<a){let f=Y_(i,r,s,t,e,n,Math.floor(o/6),50);l=f&&[f[1],f[0],f[2]]}else l=Y_(t,e,n,i,r,s,Math.floor(a/6),50);if(!l)return[new jn(e,n,r,s)];let[u,c,h]=l;return Mu(t,e,u,i,r,c).concat(Mu(t,u+h,n,i,c+h,s))}function JV(t,e){for(let n=1;n<t.length;n++){let i=t[n-1],r=t[n];i.toA>r.fromA-e&&i.toB>r.fromB-e&&(t[n-1]=new jn(i.fromA,r.toA,i.fromB,r.toB),t.splice(n--,1))}}function kpe(t,e,n){for(;;){JV(n,1);let i=!1;for(let r=0;r<n.length;r++){let s=n[r],o,a;(o=E5(t,s.fromA,s.toA,e,s.fromB,s.toB))&&(s=n[r]=new jn(s.fromA+o,s.toA,s.fromB+o,s.toB)),(a=T5(t,s.fromA,s.toA,e,s.fromB,s.toB))&&(s=n[r]=new jn(s.fromA,s.toA-a,s.fromB,s.toB-a));let l=s.toA-s.fromA,u=s.toB-s.fromB;if(l&&u)continue;let c=s.fromA-(r?n[r-1].toA:0),h=(r<n.length-1?n[r+1].fromA:t.length)-s.toA;if(!c||!h)continue;let f=l?t.slice(s.fromA,s.toA):e.slice(s.fromB,s.toB);c<=f.length&&t.slice(s.fromA-c,s.fromA)==f.slice(f.length-c)?(n[r]=new jn(s.fromA-c,s.toA-c,s.fromB-c,s.toB-c),i=!0):h<=f.length&&t.slice(s.toA,s.toA+h)==f.slice(0,h)&&(n[r]=new jn(s.fromA+h,s.toA+h,s.fromB+h,s.toB+h),i=!0)}if(!i)break}return n}function Epe(t,e,n){for(let i=0,r=0;r<t.length;r++){let s=t[r],o=s.toA-s.fromA,a=s.toB-s.fromB;if(o&&a||o>3||a>3){let l=r==t.length-1?e.length:t[r+1].fromA,u=s.fromA-i,c=l-s.toA,h=N$(e,s.fromA,u),f=M$(e,s.toA,c),p=s.fromA-h,m=f-s.toA;if((!o||!a)&&p&&m){let g=Math.max(o,a),[x,y,S]=o?[e,s.fromA,s.toA]:[n,s.fromB,s.toB];g>p&&e.slice(h,s.fromA)==x.slice(S-p,S)?(s=t[r]=new jn(h,h+o,s.fromB-p,s.toB-p),h=s.fromA,f=M$(e,s.toA,l-s.toA)):g>m&&e.slice(s.toA,f)==x.slice(y,y+m)&&(s=t[r]=new jn(f-o,f,s.fromB+m,s.toB+m),f=s.toA,h=N$(e,s.fromA,s.fromA-i)),p=s.fromA-h,m=f-s.toA}if(p||m)s=t[r]=new jn(s.fromA-p,s.toA+m,s.fromB-p,s.toB+m);else if(o){if(!a){let g=D$(e,s.fromA,s.toA),x,y=g<0?-1:L$(e,s.toA,s.fromA);g>-1&&(x=g-s.fromA)<=c&&e.slice(s.fromA,g)==e.slice(s.toA,s.toA+x)?s=t[r]=s.offset(x):y>-1&&(x=s.toA-y)<=u&&e.slice(s.fromA-x,s.fromA)==e.slice(y,s.toA)&&(s=t[r]=s.offset(-x))}}else{let g=D$(n,s.fromB,s.toB),x,y=g<0?-1:L$(n,s.toB,s.fromB);g>-1&&(x=g-s.fromB)<=c&&n.slice(s.fromB,g)==n.slice(s.toB,s.toB+x)?s=t[r]=s.offset(x):y>-1&&(x=s.toB-y)<=u&&n.slice(s.fromB-x,s.fromB)==n.slice(y,s.toB)&&(s=t[r]=s.offset(-x))}}i=s.toA}return JV(t,3),t}let ou;try{ou=new RegExp("[\\p{Alphabetic}\\p{Number}]","u")}catch{}function eB(t){return t>48&&t<58||t>64&&t<91||t>96&&t<123}function tB(t,e){if(e==t.length)return 0;let n=t.charCodeAt(e);return n<192?eB(n)?1:0:ou?!rB(n)||e==t.length-1?ou.test(String.fromCharCode(n))?1:0:ou.test(t.slice(e,e+2))?2:0:0}function nB(t,e){if(!e)return 0;let n=t.charCodeAt(e-1);return n<192?eB(n)?1:0:ou?!sB(n)||e==1?ou.test(String.fromCharCode(n))?1:0:ou.test(t.slice(e-2,e))?2:0:0}const iB=8;function M$(t,e,n){if(e==t.length||!nB(t,e))return e;for(let i=e,r=e+n,s=0;s<iB;s++){let o=tB(t,i);if(!o||i+o>r)return i;i+=o}return e}function N$(t,e,n){if(!e||!tB(t,e))return e;for(let i=e,r=e-n,s=0;s<iB;s++){let o=nB(t,i);if(!o||i-o<r)return i;i-=o}return e}function L$(t,e,n){for(;e!=n;e--)if(t.charCodeAt(e-1)==10)return e;return-1}function D$(t,e,n){for(;e!=n;e++)if(t.charCodeAt(e)==10)return e;return-1}const rB=t=>t>=55296&&t<=56319,sB=t=>t>=56320&&t<=57343;function bh(t,e){return!e||e==t.length||!rB(t.charCodeAt(e-1))||!sB(t.charCodeAt(e))}function Tpe(t,e,n){var i;let r=n==null?void 0:n.override;return r?r(t,e):(Hf=((i=n==null?void 0:n.scanLimit)!==null&&i!==void 0?i:1e9)>>1,Uf=n!=null&&n.timeout?Date.now()+n.timeout:0,k5=!1,kpe(t,e,Mu(t,0,t.length,e,0,e.length)))}function oB(){return!k5}function aB(t,e,n){return Epe(Tpe(t,e,n),t,e)}const _s=Qe.define({combine:t=>t[0]}),G_=nt.define(),Ppe=Qe.define(),Go=Wn.define({create(t){return null},update(t,e){for(let n of e.effects)n.is(G_)&&(t=n.value);for(let n of e.state.facet(Ppe))t=n(t,e);return t}});class Hc{constructor(e,n,i,r,s,o=!0){this.changes=e,this.fromA=n,this.toA=i,this.fromB=r,this.toB=s,this.precise=o}offset(e,n){return e||n?new Hc(this.changes,this.fromA+e,this.toA+e,this.fromB+n,this.toB+n,this.precise):this}get endA(){return Math.max(this.fromA,this.toA-1)}get endB(){return Math.max(this.fromB,this.toB-1)}static build(e,n,i){let r=aB(e.toString(),n.toString(),i);return lB(r,e,n,0,0,oB())}static updateA(e,n,i,r,s){return j$(F$(e,r,!0,i.length),e,n,i,s)}static updateB(e,n,i,r,s){return j$(F$(e,r,!1,n.length),e,n,i,s)}}function Q$(t,e,n,i){let r=n.lineAt(t),s=i.lineAt(e);return r.to==t&&s.to==e&&t<n.length&&e<i.length?[t+1,e+1]:[r.from,s.from]}function V$(t,e,n,i){let r=n.lineAt(t),s=i.lineAt(e);return r.from==t&&s.from==e?[t,e]:[r.to+1,s.to+1]}function lB(t,e,n,i,r,s){let o=[];for(let a=0;a<t.length;a++){let l=t[a],[u,c]=Q$(l.fromA+i,l.fromB+r,e,n),[h,f]=V$(l.toA+i,l.toB+r,e,n),p=[l.offset(-u+i,-c+r)];for(;a<t.length-1;){let m=t[a+1],[g,x]=Q$(m.fromA+i,m.fromB+r,e,n);if(g>h+1&&x>f+1)break;p.push(m.offset(-u+i,-c+r)),[h,f]=V$(m.toA+i,m.toB+r,e,n),a++}o.push(new Hc(p,u,Math.max(u,h),c,Math.max(c,f),s))}return o}const Mg=1e3;function B$(t,e,n,i){let r=0,s=t.length;for(;;){if(r==s){let c=0,h=0;r&&({toA:c,toB:h}=t[r-1]);let f=e-(n?c:h);return[c+f,h+f]}let o=r+s>>1,a=t[o],[l,u]=n?[a.fromA,a.toA]:[a.fromB,a.toB];if(l>e)s=o;else if(u<=e)r=o+1;else return i?[a.fromA,a.fromB]:[a.toA,a.toB]}}function F$(t,e,n,i){let r=[];return e.iterChangedRanges((s,o,a,l)=>{let u=0,c=n?e.length:i,h=0,f=n?i:e.length;s>Mg&&([u,h]=B$(t,s-Mg,n,!0)),o<e.length-Mg&&([c,f]=B$(t,o+Mg,n,!1));let p=l-a-(o-s),m,[g,x]=n?[p,0]:[0,p];r.length&&(m=r[r.length-1]).toA>=u?r[r.length-1]={fromA:m.fromA,fromB:m.fromB,toA:c,toB:f,diffA:m.diffA+g,diffB:m.diffB+x}:r.push({fromA:u,toA:c,fromB:h,toB:f,diffA:g,diffB:x})}),r}function j$(t,e,n,i,r){if(!t.length)return e;let s=[];for(let o=0,a=0,l=0,u=0;;o++){let c=o==t.length?null:t[o],h=c?c.fromA+a:n.length,f=c?c.fromB+l:i.length;for(;u<e.length;){let x=e[u];if(c&&(x.toA+a>h||x.toB+l>f))break;s.push(x.offset(a,l)),u++}if(!c)break;let p=c.toA+a+c.diffA,m=c.toB+l+c.diffB,g=aB(n.sliceString(h,p),i.sliceString(f,m),r);for(let x of lB(g,n,i,h,f,oB()))s.push(x);for(a+=c.diffA,l+=c.diffB;u<e.length;){let x=e[u];if(x.fromA+a>p&&x.fromB+l>m)break;u++}}return s}const Ape={scanLimit:500},uB=Ln.fromClass(class{constructor(t){({deco:this.deco,gutter:this.gutter}=X$(t))}update(t){(t.docChanged||t.viewportChanged||$pe(t.startState,t.state)||Ipe(t.startState,t.state))&&({deco:this.deco,gutter:this.gutter}=X$(t.view))}},{decorations:t=>t.deco}),Ng=js.low(BD({class:"cm-changeGutter",markers:t=>{var e;return((e=t.plugin(uB))===null||e===void 0?void 0:e.gutter)||vt.empty}}));function $pe(t,e){return t.field(Go,!1)!=e.field(Go,!1)}function Ipe(t,e){return t.facet(_s)!=e.facet(_s)}const Z$=Xe.line({class:"cm-changedLine"}),Rpe=Xe.mark({class:"cm-changedText"}),Mpe=Xe.mark({tagName:"ins",class:"cm-insertedLine"}),Npe=Xe.mark({tagName:"del",class:"cm-deletedLine"}),z$=new class extends yo{constructor(){super(...arguments),this.elementClass="cm-changedLineGutter"}};function Lpe(t,e,n,i,r,s){let o=n?t.fromA:t.fromB,a=n?t.toA:t.toB,l=0;if(o!=a){r.add(o,o,Z$),r.add(o,a,n?Npe:Mpe),s&&s.add(o,o,z$);for(let u=e.iterRange(o,a-1),c=o;!u.next().done;){if(u.lineBreak){c++,r.add(c,c,Z$),s&&s.add(c,c,z$);continue}let h=c+u.value.length;if(i)for(;l<t.changes.length;){let f=t.changes[l],p=o+(n?f.fromA:f.fromB),m=o+(n?f.toA:f.toB),g=Math.max(c,p),x=Math.min(h,m);if(g<x&&r.add(g,x,Rpe),m<h)l++;else break}c=h}}}function X$(t){let e=t.state.field(Go),{side:n,highlightChanges:i,markGutter:r,overrideChunk:s}=t.state.facet(_s),o=n=="a",a=new dr,l=r?new dr:null,{from:u,to:c}=t.viewport;for(let h of e){if((o?h.fromA:h.fromB)>=c)break;(o?h.toA:h.toB)>u&&(!s||!s(t.state,h,a,l))&&Lpe(h,t.state.doc,o,i,a,l)}return{deco:a.finish(),gutter:l&&l.finish()}}class Lg extends ds{constructor(e){super(),this.height=e}eq(e){return this.height==e.height}toDOM(){let e=document.createElement("div");return e.className="cm-mergeSpacer",e.style.height=this.height+"px",e}updateDOM(e){return e.style.height=this.height+"px",!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}const HO=nt.define({map:(t,e)=>t.map(e)}),qf=Wn.define({create:()=>Xe.none,update:(t,e)=>{for(let n of e.effects)if(n.is(HO))return n.value;return t.map(e.changes)},provide:t=>Se.decorations.from(t)}),Dg=.01;function W$(t,e){if(t.size!=e.size)return!1;let n=t.iter(),i=e.iter();for(;n.value;){if(n.from!=i.from||Math.abs(n.value.spec.widget.height-i.value.spec.widget.height)>1)return!1;n.next(),i.next()}return!0}function Dpe(t,e,n){let i=new dr,r=new dr,s=t.state.field(qf).iter(),o=e.state.field(qf).iter(),a=0,l=0,u=0,c=0,h=t.viewport,f=e.viewport;for(let x=0;;x++){let y=x<n.length?n[x]:null,S=y?y.fromA:t.state.doc.length,_=y?y.fromB:e.state.doc.length;if(a<S){let k=t.lineBlockAt(a).top+u,w=e.lineBlockAt(l).top+c,b=k-w;b<-Dg?(u-=b,i.add(a,a,Xe.widget({widget:new Lg(-b),block:!0,side:-1}))):b>Dg&&(c+=b,r.add(l,l,Xe.widget({widget:new Lg(b),block:!0,side:-1})))}if(S>a+1e3&&a<h.from&&S>h.from&&l<f.from&&_>f.from){let k=Math.min(h.from-a,f.from-l);a+=k,l+=k,x--}else if(y)a=y.toA,l=y.toB;else break;for(;s.value&&s.from<a;)u-=s.value.spec.widget.height,s.next();for(;o.value&&o.from<l;)c-=o.value.spec.widget.height,o.next()}for(;s.value;)u-=s.value.spec.widget.height,s.next();for(;o.value;)c-=o.value.spec.widget.height,o.next();let p=t.contentHeight+u-(e.contentHeight+c);p<Dg?i.add(t.state.doc.length,t.state.doc.length,Xe.widget({widget:new Lg(-p),block:!0,side:1})):p>Dg&&r.add(e.state.doc.length,e.state.doc.length,Xe.widget({widget:new Lg(p),block:!0,side:1}));let m=i.finish(),g=r.finish();W$(m,t.state.field(qf))||t.dispatch({effects:HO.of(m)}),W$(g,e.state.field(qf))||e.dispatch({effects:HO.of(g)})}const K_=nt.define({map:(t,e)=>e.mapPos(t)});class Qpe extends ds{constructor(e){super(),this.lines=e}eq(e){return this.lines==e.lines}toDOM(e){let n=document.createElement("div");return n.className="cm-collapsedLines",n.textContent=e.state.phrase("$ unchanged lines",this.lines),n.addEventListener("click",i=>{let r=e.posAtDOM(i.target);e.dispatch({effects:K_.of(r)});let{side:s,sibling:o}=e.state.facet(_s);o&&o().dispatch({effects:K_.of(Vpe(r,e.state.field(Go),s=="a"))})}),n}ignoreEvent(e){return e instanceof MouseEvent}get estimatedHeight(){return 27}get type(){return"collapsed-unchanged-code"}}function Vpe(t,e,n){let i=0,r=0;for(let s=0;;s++){let o=s<e.length?e[s]:null;if(!o||(n?o.fromA:o.fromB)>=t)return r+(t-i);[i,r]=n?[o.toA,o.toB]:[o.toB,o.toA]}}const Bpe=Wn.define({create(t){return Xe.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)n.is(K_)&&(t=t.update({filter:i=>i!=n.value}));if(t.size&&e.state.field(Go)!=e.startState.field(Go,!1)){let n=e.state.facet(_s).side=="a",i=[];for(let r of e.state.field(Go))t.between(n?r.fromA:r.fromB,n?r.toA:r.toB,s=>{i.push(s)});i.length&&(t=t.update({filter:r=>i.indexOf(r)<0}))}return t},provide:t=>Se.decorations.from(t)});function H$({margin:t=3,minSize:e=4}){return Bpe.init(n=>Fpe(n,t,e))}function Fpe(t,e,n){let i=new dr,r=t.facet(_s).side=="a",s=t.field(Go),o=1;for(let a=0;;a++){let l=a<s.length?s[a]:null,u=a?o+e:1,c=l?t.doc.lineAt(r?l.fromA:l.fromB).number-1-e:t.doc.lines,h=c-u+1;if(h>=n&&i.add(t.doc.line(u).from,t.doc.line(c).to,Xe.replace({widget:new Qpe(h),block:!0})),!l)break;o=t.doc.lineAt(Math.min(t.doc.length,r?l.toA:l.toB)).number}return i.finish()}const jpe=Se.styleModule.of(new ua({".cm-mergeView":{overflowY:"auto"},".cm-mergeViewEditors":{display:"flex",alignItems:"stretch"},".cm-mergeViewEditor":{flexGrow:1,flexBasis:0,overflow:"hidden"},".cm-merge-revert":{width:"1.6em",flexGrow:0,flexShrink:0,position:"relative"},".cm-merge-revert button":{position:"absolute",display:"block",width:"100%",boxSizing:"border-box",textAlign:"center",background:"none",border:"none",font:"inherit",cursor:"pointer"}})),Zpe=Se.baseTheme({".cm-mergeView & .cm-scroller, .cm-mergeView &":{height:"auto !important",overflowY:"visible !important"},"&.cm-merge-a .cm-changedLine, .cm-deletedChunk":{backgroundColor:"rgba(160, 128, 100, .08)"},"&.cm-merge-b .cm-changedLine, .cm-inlineChangedLine":{backgroundColor:"rgba(100, 160, 128, .08)"},"&light.cm-merge-a .cm-changedText, &light .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ee443366, #ee443366) bottom/100% 2px no-repeat"},"&dark.cm-merge-a .cm-changedText, &dark .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ffaa9966, #ffaa9966) bottom/100% 2px no-repeat"},"&light.cm-merge-b .cm-changedText":{background:"linear-gradient(#22bb22aa, #22bb22aa) bottom/100% 2px no-repeat"},"&dark.cm-merge-b .cm-changedText":{background:"linear-gradient(#88ff88aa, #88ff88aa) bottom/100% 2px no-repeat"},"&.cm-merge-b .cm-deletedText":{background:"#ff000033"},".cm-insertedLine, .cm-deletedLine, .cm-deletedLine del":{textDecoration:"none"},".cm-deletedChunk":{paddingLeft:"6px","& .cm-chunkButtons":{position:"absolute",insetInlineEnd:"5px"},"& button":{border:"none",cursor:"pointer",color:"white",margin:"0 2px",borderRadius:"3px","&[name=accept]":{background:"#2a2"},"&[name=reject]":{background:"#d43"}}},".cm-collapsedLines":{padding:"5px 5px 5px 10px",cursor:"pointer","&:before":{content:'"⦚"',marginInlineEnd:"7px"},"&:after":{content:'"⦚"',marginInlineStart:"7px"}},"&light .cm-collapsedLines":{color:"#444",background:"linear-gradient(to bottom, transparent 0, #f3f3f3 30%, #f3f3f3 70%, transparent 100%)"},"&dark .cm-collapsedLines":{color:"#ddd",background:"linear-gradient(to bottom, transparent 0, #222 30%, #222 70%, transparent 100%)"},".cm-changeGutter":{width:"3px",paddingLeft:"1px"},"&light.cm-merge-a .cm-changedLineGutter, &light .cm-deletedLineGutter":{background:"#e43"},"&dark.cm-merge-a .cm-changedLineGutter, &dark .cm-deletedLineGutter":{background:"#fa9"},"&light.cm-merge-b .cm-changedLineGutter":{background:"#2b2"},"&dark.cm-merge-b .cm-changedLineGutter":{background:"#8f8"},".cm-inlineChangedLineGutter":{background:"#75d"}}),U$=new cf,Qg=new cf;class zpe{constructor(e){this.revertDOM=null,this.revertToA=!1,this.revertToLeft=!1,this.measuring=-1,this.diffConf=e.diffConfig||Ape;let n=[js.low(uB),Zpe,jpe,qf,Se.updateListener.of(h=>{this.measuring<0&&(h.heightChanged||h.viewportChanged)&&!h.transactions.some(f=>f.effects.some(p=>p.is(HO)))&&this.measure()})],i=[_s.of({side:"a",sibling:()=>this.b,highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1})];e.gutter!==!1&&i.push(Ng);let r=mt.create({doc:e.a.doc,selection:e.a.selection,extensions:[e.a.extensions||[],Se.editorAttributes.of({class:"cm-merge-a"}),Qg.of(i),n]}),s=[_s.of({side:"b",sibling:()=>this.a,highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1})];e.gutter!==!1&&s.push(Ng);let o=mt.create({doc:e.b.doc,selection:e.b.selection,extensions:[e.b.extensions||[],Se.editorAttributes.of({class:"cm-merge-b"}),Qg.of(s),n]});this.chunks=Hc.build(r.doc,o.doc,this.diffConf);let a=[Go.init(()=>this.chunks),U$.of(e.collapseUnchanged?H$(e.collapseUnchanged):[])];r=r.update({effects:nt.appendConfig.of(a)}).state,o=o.update({effects:nt.appendConfig.of(a)}).state,this.dom=document.createElement("div"),this.dom.className="cm-mergeView",this.editorDOM=this.dom.appendChild(document.createElement("div")),this.editorDOM.className="cm-mergeViewEditors";let l=e.orientation||"a-b",u=document.createElement("div");u.className="cm-mergeViewEditor";let c=document.createElement("div");c.className="cm-mergeViewEditor",this.editorDOM.appendChild(l=="a-b"?u:c),this.editorDOM.appendChild(l=="a-b"?c:u),this.a=new Se({state:r,parent:u,root:e.root,dispatchTransactions:h=>this.dispatch(h,this.a)}),this.b=new Se({state:o,parent:c,root:e.root,dispatchTransactions:h=>this.dispatch(h,this.b)}),this.setupRevertControls(!!e.revertControls,e.revertControls=="b-to-a",e.renderRevertControl),e.parent&&e.parent.appendChild(this.dom),this.scheduleMeasure()}dispatch(e,n){if(e.some(i=>i.docChanged)){let i=e[e.length-1],r=e.reduce((o,a)=>o.compose(a.changes),Fn.empty(e[0].startState.doc.length));this.chunks=n==this.a?Hc.updateA(this.chunks,i.newDoc,this.b.state.doc,r,this.diffConf):Hc.updateB(this.chunks,this.a.state.doc,i.newDoc,r,this.diffConf),n.update([...e,i.state.update({effects:G_.of(this.chunks)})]);let s=n==this.a?this.b:this.a;s.update([s.state.update({effects:G_.of(this.chunks)})]),this.scheduleMeasure()}else n.update(e)}reconfigure(e){if("diffConfig"in e&&(this.diffConf=e.diffConfig),"orientation"in e){let s=e.orientation!="b-a";if(s!=(this.editorDOM.firstChild==this.a.dom.parentNode)){let o=this.a.dom.parentNode,a=this.b.dom.parentNode;o.remove(),a.remove(),this.editorDOM.insertBefore(s?o:a,this.editorDOM.firstChild),this.editorDOM.appendChild(s?a:o),this.revertToLeft=!this.revertToLeft,this.revertDOM&&(this.revertDOM.textContent="")}}if("revertControls"in e||"renderRevertControl"in e){let s=!!this.revertDOM,o=this.revertToA,a=this.renderRevert;"revertControls"in e&&(s=!!e.revertControls,o=e.revertControls=="b-to-a"),"renderRevertControl"in e&&(a=e.renderRevertControl),this.setupRevertControls(s,o,a)}let n="highlightChanges"in e,i="gutter"in e,r="collapseUnchanged"in e;if(n||i||r){let s=[],o=[];if(n||i){let a=this.a.state.facet(_s),l=i?e.gutter!==!1:a.markGutter,u=n?e.highlightChanges!==!1:a.highlightChanges;s.push(Qg.reconfigure([_s.of({side:"a",sibling:()=>this.b,highlightChanges:u,markGutter:l}),l?Ng:[]])),o.push(Qg.reconfigure([_s.of({side:"b",sibling:()=>this.a,highlightChanges:u,markGutter:l}),l?Ng:[]]))}if(r){let a=U$.reconfigure(e.collapseUnchanged?H$(e.collapseUnchanged):[]);s.push(a),o.push(a)}this.a.dispatch({effects:s}),this.b.dispatch({effects:o})}this.scheduleMeasure()}setupRevertControls(e,n,i){this.revertToA=n,this.revertToLeft=this.revertToA==(this.editorDOM.firstChild==this.a.dom.parentNode),this.renderRevert=i,!e&&this.revertDOM?(this.revertDOM.remove(),this.revertDOM=null):e&&!this.revertDOM?(this.revertDOM=this.editorDOM.insertBefore(document.createElement("div"),this.editorDOM.firstChild.nextSibling),this.revertDOM.addEventListener("mousedown",r=>this.revertClicked(r)),this.revertDOM.className="cm-merge-revert"):this.revertDOM&&(this.revertDOM.textContent="")}scheduleMeasure(){if(this.measuring<0){let e=this.dom.ownerDocument.defaultView||window;this.measuring=e.requestAnimationFrame(()=>{this.measuring=-1,this.measure()})}}measure(){Dpe(this.a,this.b,this.chunks),this.revertDOM&&this.updateRevertButtons()}updateRevertButtons(){let e=this.revertDOM,n=e.firstChild,i=this.a.viewport,r=this.b.viewport;for(let s=0;s<this.chunks.length;s++){let o=this.chunks[s];if(o.fromA>i.to||o.fromB>r.to)break;if(o.fromA<i.from||o.fromB<r.from)continue;let a=this.a.lineBlockAt(o.fromA).top+"px";for(;n&&+n.dataset.chunk<s;)n=q$(n);n&&n.dataset.chunk==String(s)?(n.style.top!=a&&(n.style.top=a),n=n.nextSibling):e.insertBefore(this.renderRevertButton(a,s),n)}for(;n;)n=q$(n)}renderRevertButton(e,n){let i;if(this.renderRevert)i=this.renderRevert();else{i=document.createElement("button");let r=this.a.state.phrase("Revert this chunk");i.setAttribute("aria-label",r),i.setAttribute("title",r),i.textContent=this.revertToLeft?"⇜":"⇝"}return i.style.top=e,i.setAttribute("data-chunk",String(n)),i}revertClicked(e){let n=e.target,i;for(;n&&n.parentNode!=this.revertDOM;)n=n.parentNode;if(n&&(i=this.chunks[n.dataset.chunk])){let[r,s,o,a,l,u]=this.revertToA?[this.b,this.a,i.fromB,i.toB,i.fromA,i.toA]:[this.a,this.b,i.fromA,i.toA,i.fromB,i.toB],c=r.state.sliceDoc(o,Math.max(o,a-1));o!=a&&u<=s.state.doc.length&&(c+=r.state.lineBreak),s.dispatch({changes:{from:l,to:Math.min(s.state.doc.length,u),insert:c},userEvent:"revert"}),e.preventDefault()}}destroy(){this.a.destroy(),this.b.destroy(),this.measuring>-1&&(this.dom.ownerDocument.defaultView||window).cancelAnimationFrame(this.measuring),this.dom.remove()}}function q$(t){let e=t.nextSibling;return t.remove(),e}class UO{static create(e,n,i,r,s){let o=r+(r<<8)+e+(n<<4)|0;return new UO(e,n,i,o,s,[],[])}constructor(e,n,i,r,s,o,a){this.type=e,this.value=n,this.from=i,this.hash=r,this.end=s,this.children=o,this.positions=a,this.hashProp=[[ot.contextHash,r]]}addChild(e,n){e.prop(ot.contextHash)!=this.hash&&(e=new bt(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(n)}toTree(e,n=this.end){let i=this.children.length-1;return i>=0&&(n=Math.max(n,this.positions[i]+this.children[i].length+this.from)),new bt(e.types[this.type],this.children,this.positions,n-this.from).balance({makeTree:(r,s,o)=>new bt(Xn.none,r,s,o,this.hashProp)})}}var Ce;(function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.Autolink=33]="Autolink",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel",t[t.URL=44]="URL"})(Ce||(Ce={}));class Xpe{constructor(e,n){this.start=e,this.content=n,this.marks=[],this.parsers=[]}}class Wpe{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return xd(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,n=0,i=0){for(let r=n;r<e;r++)i+=this.text.charCodeAt(r)==9?4-i%4:1;return i}findColumn(e){let n=0;for(let i=0;n<this.text.length&&i<e;n++)i+=this.text.charCodeAt(n)==9?4-i%4:1;return n}scrub(){if(!this.baseIndent)return this.text;let e="";for(let n=0;n<this.basePos;n++)e+=" ";return e+this.text.slice(this.basePos)}}function Y$(t,e,n){if(n.pos==n.text.length||t!=e.block&&n.indent>=e.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let i=(t.type==Ce.OrderedList?$5:A5)(n,e,!1);return i>0&&(t.type!=Ce.BulletList||P5(n,e,!1)<0)&&n.text.charCodeAt(n.pos+i-1)==t.value}const cB={[Ce.Blockquote](t,e,n){return n.next!=62?!1:(n.markers.push(Pt(Ce.QuoteMark,e.lineStart+n.pos,e.lineStart+n.pos+1)),n.moveBase(n.pos+(ms(n.text.charCodeAt(n.pos+1))?2:1)),t.end=e.lineStart+n.text.length,!0)},[Ce.ListItem](t,e,n){return n.indent<n.baseIndent+t.value&&n.next>-1?!1:(n.moveBaseColumn(n.baseIndent+t.value),!0)},[Ce.OrderedList]:Y$,[Ce.BulletList]:Y$,[Ce.Document](){return!0}};function ms(t){return t==32||t==9||t==10||t==13}function xd(t,e=0){for(;e<t.length&&ms(t.charCodeAt(e));)e++;return e}function G$(t,e,n){for(;e>n&&ms(t.charCodeAt(e-1));)e--;return e}function hB(t){if(t.next!=96&&t.next!=126)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;if(e<t.pos+3)return-1;if(t.next==96){for(let n=e;n<t.text.length;n++)if(t.text.charCodeAt(n)==96)return-1}return e}function fB(t){return t.next!=62?-1:t.text.charCodeAt(t.pos+1)==32?2:1}function P5(t,e,n){if(t.next!=42&&t.next!=45&&t.next!=95)return-1;let i=1;for(let r=t.pos+1;r<t.text.length;r++){let s=t.text.charCodeAt(r);if(s==t.next)i++;else if(!ms(s))return-1}return n&&t.next==45&&mB(t)>-1&&t.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(yB.SetextHeading)>-1||i<3?-1:1}function dB(t,e){for(let n=t.stack.length-1;n>=0;n--)if(t.stack[n].type==e)return!0;return!1}function A5(t,e,n){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||ms(t.text.charCodeAt(t.pos+1)))&&(!n||dB(e,Ce.BulletList)||t.skipSpace(t.pos+2)<t.text.length)?1:-1}function $5(t,e,n){let i=t.pos,r=t.next;for(;r>=48&&r<=57;){i++;if(i==t.text.length)return-1;r=t.text.charCodeAt(i)}return i==t.pos||i>t.pos+9||r!=46&&r!=41||i<t.text.length-1&&!ms(t.text.charCodeAt(i+1))||n&&!dB(e,Ce.OrderedList)&&(t.skipSpace(i+1)==t.text.length||i>t.pos+1||t.next!=49)?-1:i+1-t.pos}function pB(t){if(t.next!=35)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==35;)e++;if(e<t.text.length&&t.text.charCodeAt(e)!=32)return-1;let n=e-t.pos;return n>6?-1:n}function mB(t){if(t.next!=45&&t.next!=61||t.indent>=t.baseIndent+4)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;let n=e;for(;e<t.text.length&&ms(t.text.charCodeAt(e));)e++;return e==t.text.length?n:-1}const J_=/^[ \t]*$/,gB=/-->/,OB=/\?>/,eC=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,gB],[/^\s*<\?/,OB],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,J_],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,J_]];function xB(t,e,n){if(t.next!=60)return-1;let i=t.text.slice(t.pos);for(let r=0,s=eC.length-(n?1:0);r<s;r++)if(eC[r][0].test(i))return r;return-1}function K$(t,e){let n=t.countIndent(e,t.pos,t.indent),i=t.skipSpace(e),r=t.countIndent(i,e,n);return r>=n+5||i==t.text.length?n+1:r}function Ea(t,e,n){let i=t.length-1;i>=0&&t[i].to==e&&t[i].type==Ce.CodeText?t[i].to=n:t.push(Pt(Ce.CodeText,e,n))}const Vg={LinkReference:void 0,IndentedCode(t,e){let n=e.baseIndent+4;if(e.indent<n)return!1;let i=e.findColumn(n),r=t.lineStart+i,s=t.lineStart+e.text.length,o=[],a=[];for(Ea(o,r,s);t.nextLine()&&e.depth>=t.stack.length;)if(e.pos==e.text.length){Ea(a,t.lineStart-1,t.lineStart);for(let l of e.markers)a.push(l)}else{if(e.indent<n)break;{if(a.length){for(let u of a)u.type==Ce.CodeText?Ea(o,u.from,u.to):o.push(u);a=[]}Ea(o,t.lineStart-1,t.lineStart);for(let u of e.markers)o.push(u);s=t.lineStart+e.text.length;let l=t.lineStart+e.findColumn(e.baseIndent+4);l<s&&Ea(o,l,s)}}return a.length&&(a=a.filter(l=>l.type!=Ce.CodeText),a.length&&(e.markers=a.concat(e.markers))),t.addNode(t.buffer.writeElements(o,-r).finish(Ce.CodeBlock,s-r),r),!0},FencedCode(t,e){let n=hB(e);if(n<0)return!1;let i=t.lineStart+e.pos,r=e.next,s=n-e.pos,o=e.skipSpace(n),a=G$(e.text,e.text.length,o),l=[Pt(Ce.CodeMark,i,i+s)];o<a&&l.push(Pt(Ce.CodeInfo,t.lineStart+o,t.lineStart+a));for(let u=!0,c=!0,h=!1;t.nextLine()&&e.depth>=t.stack.length;u=!1){let f=e.pos;if(e.indent-e.baseIndent<4)for(;f<e.text.length&&e.text.charCodeAt(f)==r;)f++;if(f-e.pos>=s&&e.skipSpace(f)==e.text.length){for(let p of e.markers)l.push(p);c&&h&&Ea(l,t.lineStart-1,t.lineStart),l.push(Pt(Ce.CodeMark,t.lineStart+e.pos,t.lineStart+f)),t.nextLine();break}else{h=!0,u||(Ea(l,t.lineStart-1,t.lineStart),c=!1);for(let g of e.markers)l.push(g);let p=t.lineStart+e.basePos,m=t.lineStart+e.text.length;p<m&&(Ea(l,p,m),c=!1)}}return t.addNode(t.buffer.writeElements(l,-i).finish(Ce.FencedCode,t.prevLineEnd()-i),i),!0},Blockquote(t,e){let n=fB(e);return n<0?!1:(t.startContext(Ce.Blockquote,e.pos),t.addNode(Ce.QuoteMark,t.lineStart+e.pos,t.lineStart+e.pos+1),e.moveBase(e.pos+n),null)},HorizontalRule(t,e){if(P5(e,t,!1)<0)return!1;let n=t.lineStart+e.pos;return t.nextLine(),t.addNode(Ce.HorizontalRule,n),!0},BulletList(t,e){let n=A5(e,t,!1);if(n<0)return!1;t.block.type!=Ce.BulletList&&t.startContext(Ce.BulletList,e.basePos,e.next);let i=K$(e,e.pos+1);return t.startContext(Ce.ListItem,e.basePos,i-e.baseIndent),t.addNode(Ce.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+n),e.moveBaseColumn(i),null},OrderedList(t,e){let n=$5(e,t,!1);if(n<0)return!1;t.block.type!=Ce.OrderedList&&t.startContext(Ce.OrderedList,e.basePos,e.text.charCodeAt(e.pos+n-1));let i=K$(e,e.pos+n);return t.startContext(Ce.ListItem,e.basePos,i-e.baseIndent),t.addNode(Ce.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+n),e.moveBaseColumn(i),null},ATXHeading(t,e){let n=pB(e);if(n<0)return!1;let i=e.pos,r=t.lineStart+i,s=G$(e.text,e.text.length,i),o=s;for(;o>i&&e.text.charCodeAt(o-1)==e.next;)o--;(o==s||o==i||!ms(e.text.charCodeAt(o-1)))&&(o=e.text.length);let a=t.buffer.write(Ce.HeaderMark,0,n).writeElements(t.parser.parseInline(e.text.slice(i+n+1,o),r+n+1),-r);o<e.text.length&&a.write(Ce.HeaderMark,o-i,s-i);let l=a.finish(Ce.ATXHeading1-1+n,e.text.length-i);return t.nextLine(),t.addNode(l,r),!0},HTMLBlock(t,e){let n=xB(e,t,!1);if(n<0)return!1;let i=t.lineStart+e.pos,r=eC[n][1],s=[],o=r!=J_;for(;!r.test(e.text)&&t.nextLine();){if(e.depth<t.stack.length){o=!1;break}for(let u of e.markers)s.push(u)}o&&t.nextLine();let a=r==gB?Ce.CommentBlock:r==OB?Ce.ProcessingInstructionBlock:Ce.HTMLBlock,l=t.prevLineEnd();return t.addNode(t.buffer.writeElements(s,-i).finish(a,l-i),i),!0},SetextHeading:void 0};class Hpe{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,n,i){if(this.stage==-1)return!1;let r=i.content+`
|
|
136
|
+
`+n.scrub(),s=this.advance(r);return s>-1&&s<r.length?this.complete(e,i,s):!1}finish(e,n){return(this.stage==2||this.stage==3)&&xd(n.content,this.pos)==n.content.length?this.complete(e,n,n.content.length):!1}complete(e,n,i){return e.addLeafElement(n,Pt(Ce.LinkReference,this.start,this.start+i,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(TB(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(Pt(Ce.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(kB(e,xd(e,this.pos),this.start)))return-1}else if(this.stage==2){let n=xd(e,this.pos),i=0;if(n>this.pos){let r=EB(e,n,this.start);if(r){let s=ub(e,r.to-this.start);s>0&&(this.nextStage(r),i=s)}}return i||(i=ub(e,this.pos)),i>0&&i<e.length?i:-1}else return ub(e,this.pos)}}}function ub(t,e){for(;e<t.length;e++){let n=t.charCodeAt(e);if(n==10)break;if(!ms(n))return-1}return e}class Upe{nextLine(e,n,i){let r=n.depth<e.stack.length?-1:mB(n),s=n.next;if(r<0)return!1;let o=Pt(Ce.HeaderMark,e.lineStart+n.pos,e.lineStart+r);return e.nextLine(),e.addLeafElement(i,Pt(s==61?Ce.SetextHeading1:Ce.SetextHeading2,i.start,e.prevLineEnd(),[...e.parser.parseInline(i.content,i.start),o])),!0}finish(){return!1}}const yB={LinkReference(t,e){return e.content.charCodeAt(0)==91?new Hpe(e):null},SetextHeading(){return new Upe}},qpe=[(t,e)=>pB(e)>=0,(t,e)=>hB(e)>=0,(t,e)=>fB(e)>=0,(t,e)=>A5(e,t,!0)>=0,(t,e)=>$5(e,t,!0)>=0,(t,e)=>P5(e,t,!0)>=0,(t,e)=>xB(e,t,!0)>=0],Ype={text:"",end:0};class Gpe{constructor(e,n,i,r){this.parser=e,this.input=n,this.ranges=r,this.line=new Wpe,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=r[r.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=r[0].from,this.block=UO.create(Ce.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=i.length?new eme(i,n):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let i=0;;){let r=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;i<e.markers.length&&(!r||e.markers[i].from<r.end);){let s=e.markers[i++];this.addNode(s.type,s.from,s.to)}if(!r)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let i of this.parser.blockParsers)if(i){let r=i(this,e);if(r!=!1){if(r==!0)return null;e.forward();continue e}}break}if(e.pos==e.text.length)return this.nextLine()?null:this.finish();let n=new Xpe(this.lineStart+e.pos,e.text.slice(e.pos));for(let i of this.parser.leafBlockParsers)if(i){let r=i(this,n);r&&n.parsers.push(r)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let i of this.parser.endLeafBlock)if(i(this,e,n))break e}for(let i of n.parsers)if(i.nextLine(this,e,n))return null;n.content+=`
|
|
137
|
+
`+e.scrub();for(let i of e.markers)n.marks.push(i)}return this.finishLeaf(n),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let n=this.fragments.takeNodes(this);return n?(this.absoluteLineStart+=n,this.lineStart=PB(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let n=Ype;if(n.end=e,e>=this.to)n.text="";else if(n.text=this.lineChunkAt(e),n.end+=n.text.length,this.ranges.length>1){let i=this.absoluteLineStart,r=this.rangeI;for(;this.ranges[r].to<n.end;){r++;let s=this.ranges[r].from,o=this.lineChunkAt(s);n.end=s+o.length,n.text=n.text.slice(0,this.ranges[r-1].to-i)+o,i=n.end-n.text.length}}return n}readLine(){let{line:e}=this,{text:n,end:i}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=i,e.reset(n);e.depth<this.stack.length;e.depth++){let r=this.stack[e.depth],s=this.parser.skipContextMarkup[r.type];if(!s)throw new Error("Unhandled block context "+Ce[r.type]);let o=this.line.markers.length;if(!s(r,this,e)){this.line.markers.length>o&&(r.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let n=this.input.chunk(e),i;if(this.input.lineChunks)i=n==`
|
|
138
|
+
`?"":n;else{let r=n.indexOf(`
|
|
139
|
+
`);i=r<0?n:n.slice(0,r)}return e+i.length>this.to?i.slice(0,this.to-e):i}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,n,i=0){this.block=UO.create(e,i,this.lineStart+n,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,n,i=0){this.startContext(this.parser.getNodeType(e),n,i)}addNode(e,n,i){typeof e=="number"&&(e=new bt(this.parser.nodeSet.types[e],Sh,Sh,(i??this.prevLineEnd())-n)),this.block.addChild(e,n-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,n){this.addNode(this.buffer.writeElements(nC(n.children,e.marks),-n.from).finish(n.type,n.to-n.from),n.from)}finishContext(){let e=this.stack.pop(),n=this.stack[this.stack.length-1];n.addChild(e.toTree(this.parser.nodeSet),e.from-n.from),this.block=n}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?vB(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let i of e.parsers)if(i.finish(this,e))return;let n=nC(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(n,-e.start).finish(Ce.Paragraph,e.content.length),e.start)}elt(e,n,i,r){return typeof e=="string"?Pt(this.parser.getNodeType(e),n,i,r):new _B(e,n)}get buffer(){return new SB(this.parser.nodeSet)}}function vB(t,e,n,i,r){let s=t[e].to,o=[],a=[],l=n.from+i;function u(c,h){for(;h?c>=s:c>s;){let f=t[e+1].from-s;i+=f,c+=f,e++,s=t[e].to}}for(let c=n.firstChild;c;c=c.nextSibling){u(c.from+i,!0);let h=c.from+i,f,p=r.get(c.tree);p?f=p:c.to+i>s?(f=vB(t,e,c,i,r),u(c.to+i,!1)):f=c.toTree(),o.push(f),a.push(h-l)}return u(n.to+i,!1),new bt(n.type,o,a,n.to+i-l,n.tree?n.tree.propValues:void 0)}class Wx extends Cx{constructor(e,n,i,r,s,o,a,l,u){super(),this.nodeSet=e,this.blockParsers=n,this.leafBlockParsers=i,this.blockNames=r,this.endLeafBlock=s,this.skipContextMarkup=o,this.inlineParsers=a,this.inlineNames=l,this.wrappers=u,this.nodeTypes=Object.create(null);for(let c of e.types)this.nodeTypes[c.name]=c.id}createParse(e,n,i){let r=new Gpe(this,e,n,i);for(let s of this.wrappers)r=s(r,e,n,i);return r}configure(e){let n=tC(e);if(!n)return this;let{nodeSet:i,skipContextMarkup:r}=this,s=this.blockParsers.slice(),o=this.leafBlockParsers.slice(),a=this.blockNames.slice(),l=this.inlineParsers.slice(),u=this.inlineNames.slice(),c=this.endLeafBlock.slice(),h=this.wrappers;if(Qf(n.defineNodes)){r=Object.assign({},r);let f=i.types.slice(),p;for(let m of n.defineNodes){let{name:g,block:x,composite:y,style:S}=typeof m=="string"?{name:m}:m;if(f.some(w=>w.name==g))continue;y&&(r[f.length]=(w,b,E)=>y(b,E,w.value));let _=f.length,k=y?["Block","BlockContext"]:x?_>=Ce.ATXHeading1&&_<=Ce.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;f.push(Xn.define({id:_,name:g,props:k&&[[ot.group,k]]})),S&&(p||(p={}),Array.isArray(S)||S instanceof wr?p[g]=S:Object.assign(p,S))}i=new uf(f),p&&(i=i.extend(ff(p)))}if(Qf(n.props)&&(i=i.extend(...n.props)),Qf(n.remove))for(let f of n.remove){let p=this.blockNames.indexOf(f),m=this.inlineNames.indexOf(f);p>-1&&(s[p]=o[p]=void 0),m>-1&&(l[m]=void 0)}if(Qf(n.parseBlock))for(let f of n.parseBlock){let p=a.indexOf(f.name);if(p>-1)s[p]=f.parse,o[p]=f.leaf;else{let m=f.before?Bg(a,f.before):f.after?Bg(a,f.after)+1:a.length-1;s.splice(m,0,f.parse),o.splice(m,0,f.leaf),a.splice(m,0,f.name)}f.endLeaf&&c.push(f.endLeaf)}if(Qf(n.parseInline))for(let f of n.parseInline){let p=u.indexOf(f.name);if(p>-1)l[p]=f.parse;else{let m=f.before?Bg(u,f.before):f.after?Bg(u,f.after)+1:u.length-1;l.splice(m,0,f.parse),u.splice(m,0,f.name)}}return n.wrap&&(h=h.concat(n.wrap)),new Wx(i,s,o,a,c,r,l,u,h)}getNodeType(e){let n=this.nodeTypes[e];if(n==null)throw new RangeError(`Unknown node type '${e}'`);return n}parseInline(e,n){let i=new I5(this,e,n);e:for(let r=n;r<i.end;){let s=i.char(r);for(let o of this.inlineParsers)if(o){let a=o(i,s,r);if(a>=0){r=a;continue e}}r++}return i.resolveMarkers(0)}}function Qf(t){return t!=null&&t.length>0}function tC(t){if(!Array.isArray(t))return t;if(t.length==0)return null;let e=tC(t[0]);if(t.length==1)return e;let n=tC(t.slice(1));if(!n||!e)return e||n;let i=(o,a)=>(o||Sh).concat(a||Sh),r=e.wrap,s=n.wrap;return{props:i(e.props,n.props),defineNodes:i(e.defineNodes,n.defineNodes),parseBlock:i(e.parseBlock,n.parseBlock),parseInline:i(e.parseInline,n.parseInline),remove:i(e.remove,n.remove),wrap:r?s?(o,a,l,u)=>r(s(o,a,l,u),a,l,u):r:s}}function Bg(t,e){let n=t.indexOf(e);if(n<0)throw new RangeError(`Position specified relative to unknown parser ${e}`);return n}let bB=[Xn.none];for(let t=1,e;e=Ce[t];t++)bB[t]=Xn.define({id:t,name:e,props:t>=Ce.Escape?[]:[[ot.group,t in cB?["Block","BlockContext"]:["Block","LeafBlock"]]],top:e=="Document"});const Sh=[];class SB{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,n,i,r=0){return this.content.push(e,n,i,4+r*4),this}writeElements(e,n=0){for(let i of e)i.writeTo(this,n);return this}finish(e,n){return bt.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:n})}}let Sp=class{constructor(e,n,i,r=Sh){this.type=e,this.from=n,this.to=i,this.children=r}writeTo(e,n){let i=e.content.length;e.writeElements(this.children,n),e.content.push(this.type,this.from+n,this.to+n,e.content.length+4-i)}toTree(e){return new SB(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}};class _B{constructor(e,n){this.tree=e,this.from=n}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return Sh}writeTo(e,n){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+n,this.to+n,-1)}toTree(){return this.tree}}function Pt(t,e,n,i){return new Sp(t,e,n,i)}const CB={resolve:"Emphasis",mark:"EmphasisMark"},wB={resolve:"Emphasis",mark:"EmphasisMark"},zl={},qO={};class br{constructor(e,n,i,r){this.type=e,this.from=n,this.to=i,this.side=r}}const J$="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";let _p=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{_p=new RegExp("[\\p{S}|\\p{P}]","u")}catch{}const cb={Escape(t,e,n){if(e!=92||n==t.end-1)return-1;let i=t.char(n+1);for(let r=0;r<J$.length;r++)if(J$.charCodeAt(r)==i)return t.append(Pt(Ce.Escape,n,n+2));return-1},Entity(t,e,n){if(e!=38)return-1;let i=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(t.slice(n+1,n+31));return i?t.append(Pt(Ce.Entity,n,n+1+i[0].length)):-1},InlineCode(t,e,n){if(e!=96||n&&t.char(n-1)==96)return-1;let i=n+1;for(;i<t.end&&t.char(i)==96;)i++;let r=i-n,s=0;for(;i<t.end;i++)if(t.char(i)==96){if(s++,s==r&&t.char(i+1)!=96)return t.append(Pt(Ce.InlineCode,n,i+1,[Pt(Ce.CodeMark,n,n+r),Pt(Ce.CodeMark,i+1-r,i+1)]))}else s=0;return-1},HTMLTag(t,e,n){if(e!=60||n==t.end-1)return-1;let i=t.slice(n+1,t.end),r=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(i);if(r)return t.append(Pt(Ce.Autolink,n,n+1+r[0].length,[Pt(Ce.LinkMark,n,n+1),Pt(Ce.URL,n+1,n+r[0].length),Pt(Ce.LinkMark,n+r[0].length,n+1+r[0].length)]));let s=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(i);if(s)return t.append(Pt(Ce.Comment,n,n+1+s[0].length));let o=/^\?[^]*?\?>/.exec(i);if(o)return t.append(Pt(Ce.ProcessingInstruction,n,n+1+o[0].length));let a=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(i);return a?t.append(Pt(Ce.HTMLTag,n,n+1+a[0].length)):-1},Emphasis(t,e,n){if(e!=95&&e!=42)return-1;let i=n+1;for(;t.char(i)==e;)i++;let r=t.slice(n-1,n),s=t.slice(i,i+1),o=_p.test(r),a=_p.test(s),l=/\s|^$/.test(r),u=/\s|^$/.test(s),c=!u&&(!a||l||o),h=!l&&(!o||u||a),f=c&&(e==42||!h||o),p=h&&(e==42||!c||a);return t.append(new br(e==95?CB:wB,n,i,(f?1:0)|(p?2:0)))},HardBreak(t,e,n){if(e==92&&t.char(n+1)==10)return t.append(Pt(Ce.HardBreak,n,n+2));if(e==32){let i=n+1;for(;t.char(i)==32;)i++;if(t.char(i)==10&&i>=n+2)return t.append(Pt(Ce.HardBreak,n,i+1))}return-1},Link(t,e,n){return e==91?t.append(new br(zl,n,n+1,1)):-1},Image(t,e,n){return e==33&&t.char(n+1)==91?t.append(new br(qO,n,n+2,1)):-1},LinkEnd(t,e,n){if(e!=93)return-1;for(let i=t.parts.length-1;i>=0;i--){let r=t.parts[i];if(r instanceof br&&(r.type==zl||r.type==qO)){if(!r.side||t.skipSpace(r.to)==n&&!/[(\[]/.test(t.slice(n+1,n+2)))return t.parts[i]=null,-1;let s=t.takeContent(i),o=t.parts[i]=Kpe(t,s,r.type==zl?Ce.Link:Ce.Image,r.from,n+1);if(r.type==zl)for(let a=0;a<i;a++){let l=t.parts[a];l instanceof br&&l.type==zl&&(l.side=0)}return o.to}}return-1}};function Kpe(t,e,n,i,r){let{text:s}=t,o=t.char(r),a=r;if(e.unshift(Pt(Ce.LinkMark,i,i+(n==Ce.Image?2:1))),e.push(Pt(Ce.LinkMark,r-1,r)),o==40){let l=t.skipSpace(r+1),u=kB(s,l-t.offset,t.offset),c;u&&(l=t.skipSpace(u.to),l!=u.to&&(c=EB(s,l-t.offset,t.offset),c&&(l=t.skipSpace(c.to)))),t.char(l)==41&&(e.push(Pt(Ce.LinkMark,r,r+1)),a=l+1,u&&e.push(u),c&&e.push(c),e.push(Pt(Ce.LinkMark,l,a)))}else if(o==91){let l=TB(s,r-t.offset,t.offset,!1);l&&(e.push(l),a=l.to)}return Pt(n,i,a,e)}function kB(t,e,n){if(t.charCodeAt(e)==60){for(let r=e+1;r<t.length;r++){let s=t.charCodeAt(r);if(s==62)return Pt(Ce.URL,e+n,r+1+n);if(s==60||s==10)return!1}return null}else{let r=0,s=e;for(let o=!1;s<t.length;s++){let a=t.charCodeAt(s);if(ms(a))break;if(o)o=!1;else if(a==40)r++;else if(a==41){if(!r)break;r--}else a==92&&(o=!0)}return s>e?Pt(Ce.URL,e+n,s+n):s==t.length?null:!1}}function EB(t,e,n){let i=t.charCodeAt(e);if(i!=39&&i!=34&&i!=40)return!1;let r=i==40?41:i;for(let s=e+1,o=!1;s<t.length;s++){let a=t.charCodeAt(s);if(o)o=!1;else{if(a==r)return Pt(Ce.LinkTitle,e+n,s+1+n);a==92&&(o=!0)}}return null}function TB(t,e,n,i){for(let r=!1,s=e+1,o=Math.min(t.length,s+999);s<o;s++){let a=t.charCodeAt(s);if(r)r=!1;else{if(a==93)return i?!1:Pt(Ce.LinkLabel,e+n,s+1+n);if(i&&!ms(a)&&(i=!1),a==91)return!1;a==92&&(r=!0)}}return null}class I5{constructor(e,n,i){this.parser=e,this.text=n,this.offset=i,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,n){return this.text.slice(e-this.offset,n-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,n,i,r,s){return this.append(new br(e,n,i,(r?1:0)|(s?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let n=this.parts[e];if(n instanceof br&&(n.type==zl||n.type==qO))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let i=e;i<this.parts.length;i++){let r=this.parts[i];if(!(r instanceof br&&r.type.resolve&&r.side&2))continue;let s=r.type==CB||r.type==wB,o=r.to-r.from,a,l=i-1;for(;l>=e;l--){let g=this.parts[l];if(g instanceof br&&g.side&1&&g.type==r.type&&!(s&&(r.side&1||g.side&2)&&(g.to-g.from+o)%3==0&&((g.to-g.from)%3||o%3))){a=g;break}}if(!a)continue;let u=r.type.resolve,c=[],h=a.from,f=r.to;if(s){let g=Math.min(2,a.to-a.from,o);h=a.to-g,f=r.from+g,u=g==1?"Emphasis":"StrongEmphasis"}a.type.mark&&c.push(this.elt(a.type.mark,h,a.to));for(let g=l+1;g<i;g++)this.parts[g]instanceof Sp&&c.push(this.parts[g]),this.parts[g]=null;r.type.mark&&c.push(this.elt(r.type.mark,r.from,f));let p=this.elt(u,h,f,c);this.parts[l]=s&&a.from!=h?new br(a.type,a.from,h,a.side):null,(this.parts[i]=s&&r.to!=f?new br(r.type,f,r.to,r.side):null)?this.parts.splice(i,0,p):this.parts[i]=p}let n=[];for(let i=e;i<this.parts.length;i++){let r=this.parts[i];r instanceof Sp&&n.push(r)}return n}findOpeningDelimiter(e){for(let n=this.parts.length-1;n>=0;n--){let i=this.parts[n];if(i instanceof br&&i.type==e&&i.side&1)return n}return null}takeContent(e){let n=this.resolveMarkers(e);return this.parts.length=e,n}getDelimiterAt(e){let n=this.parts[e];return n instanceof br?n:null}skipSpace(e){return xd(this.text,e-this.offset)+this.offset}elt(e,n,i,r){return typeof e=="string"?Pt(this.parser.getNodeType(e),n,i,r):new _B(e,n)}}I5.linkStart=zl;I5.imageStart=qO;function nC(t,e){if(!e.length)return t;if(!t.length)return e;let n=t.slice(),i=0;for(let r of e){for(;i<n.length&&n[i].to<r.to;)i++;if(i<n.length&&n[i].from<r.from){let s=n[i];s instanceof Sp&&(n[i]=new Sp(s.type,s.from,s.to,nC(s.children,[r])))}else n.splice(i++,0,r)}return n}const Jpe=[Ce.CodeBlock,Ce.ListItem,Ce.OrderedList,Ce.BulletList];let eme=class{constructor(e,n){this.fragments=e,this.input=n,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length&&(this.fragment=e[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,n){for(;this.fragment&&this.fragment.to<=e;)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let s=this.fragment.to;for(;s>0&&this.input.read(s-1,s)!=`
|
|
140
|
+
`;)s--;this.fragmentEnd=s?s-1:0}let i=this.cursor;i||(i=this.cursor=this.fragment.tree.cursor(),i.firstChild());let r=e+this.fragment.offset;for(;i.to<=r;)if(!i.parent())return!1;for(;;){if(i.from>=r)return this.fragment.from<=n;if(!i.childAfter(r))return!1}}matches(e){let n=this.cursor.tree;return n&&n.prop(ot.contextHash)==e}takeNodes(e){let n=this.cursor,i=this.fragment.offset,r=this.fragmentEnd-(this.fragment.openEnd?1:0),s=e.absoluteLineStart,o=s,a=e.block.children.length,l=o,u=a;for(;;){if(n.to-i>r){if(n.type.isAnonymous&&n.firstChild())continue;break}let c=PB(n.from-i,e.ranges);if(n.to-i<=e.ranges[e.rangeI].to)e.addNode(n.tree,c);else{let h=new bt(e.parser.nodeSet.types[Ce.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(h,n.tree),e.addNode(h,c)}if(n.type.is("Block")&&(Jpe.indexOf(n.type.id)<0?(o=n.to-i,a=e.block.children.length):(o=l,a=u),l=n.to-i,u=e.block.children.length),!n.nextSibling())break}for(;e.block.children.length>a;)e.block.children.pop(),e.block.positions.pop();return o-s}};function PB(t,e){let n=t;for(let i=1;i<e.length;i++){let r=e[i-1].to,s=e[i].from;r<t&&(n-=s-r)}return n}const tme=ff({"Blockquote/...":Q.quote,HorizontalRule:Q.contentSeparator,"ATXHeading1/... SetextHeading1/...":Q.heading1,"ATXHeading2/... SetextHeading2/...":Q.heading2,"ATXHeading3/...":Q.heading3,"ATXHeading4/...":Q.heading4,"ATXHeading5/...":Q.heading5,"ATXHeading6/...":Q.heading6,"Comment CommentBlock":Q.comment,Escape:Q.escape,Entity:Q.character,"Emphasis/...":Q.emphasis,"StrongEmphasis/...":Q.strong,"Link/... Image/...":Q.link,"OrderedList/... BulletList/...":Q.list,"BlockQuote/...":Q.quote,"InlineCode CodeText":Q.monospace,"URL Autolink":Q.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":Q.processingInstruction,"CodeInfo LinkLabel":Q.labelName,LinkTitle:Q.string,Paragraph:Q.content}),nme=new Wx(new uf(bB).extend(tme),Object.keys(Vg).map(t=>Vg[t]),Object.keys(Vg).map(t=>yB[t]),Object.keys(Vg),qpe,cB,Object.keys(cb).map(t=>cb[t]),Object.keys(cb),[]);function ime(t,e,n){let i=[];for(let r=t.firstChild,s=e;;r=r.nextSibling){let o=r?r.from:n;if(o>s&&i.push({from:s,to:o}),!r)break;s=r.to}return i}function rme(t){let{codeParser:e,htmlParser:n}=t;return{wrap:gL((r,s)=>{let o=r.type.id;if(e&&(o==Ce.CodeBlock||o==Ce.FencedCode)){let a="";if(o==Ce.FencedCode){let u=r.node.getChild(Ce.CodeInfo);u&&(a=s.read(u.from,u.to))}let l=e(a);if(l)return{parser:l,overlay:u=>u.type.id==Ce.CodeText,bracketed:o==Ce.FencedCode}}else if(n&&(o==Ce.HTMLBlock||o==Ce.HTMLTag||o==Ce.CommentBlock))return{parser:n,overlay:ime(r.node,r.from,r.to)};return null})}}const sme={resolve:"Strikethrough",mark:"StrikethroughMark"},ome={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":Q.strikethrough}},{name:"StrikethroughMark",style:Q.processingInstruction}],parseInline:[{name:"Strikethrough",parse(t,e,n){if(e!=126||t.char(n+1)!=126||t.char(n+2)==126)return-1;let i=t.slice(n-1,n),r=t.slice(n+2,n+3),s=/\s|^$/.test(i),o=/\s|^$/.test(r),a=_p.test(i),l=_p.test(r);return t.addDelimiter(sme,n,n+2,!o&&(!l||s||a),!s&&(!a||o||l))},after:"Emphasis"}]};function yd(t,e,n=0,i,r=0){let s=0,o=!0,a=-1,l=-1,u=!1,c=()=>{i.push(t.elt("TableCell",r+a,r+l,t.parser.parseInline(e.slice(a,l),r+a)))};for(let h=n;h<e.length;h++){let f=e.charCodeAt(h);f==124&&!u?((!o||a>-1)&&s++,o=!1,i&&(a>-1&&c(),i.push(t.elt("TableDelimiter",h+r,h+r+1))),a=l=-1):(u||f!=32&&f!=9)&&(a<0&&(a=h),l=h+1),u=!u&&f==92}return a>-1&&(s++,i&&c()),s}function eI(t,e){for(let n=e;n<t.length;n++){let i=t.charCodeAt(n);if(i==124)return!0;i==92&&n++}return!1}const AB=/^[>\s]*\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class tI{constructor(){this.rows=null}nextLine(e,n,i){if(this.rows==null){this.rows=!1;let r;if((n.next==45||n.next==58||n.next==124)&&AB.test(r=n.text.slice(n.pos))){let s=[];yd(e,i.content,0,s,i.start)==yd(e,r,0)&&(this.rows=[e.elt("TableHeader",i.start,i.start+i.content.length,s),e.elt("TableDelimiter",e.lineStart+n.pos,e.lineStart+n.text.length)])}}else if(this.rows){let r=[];yd(e,n.text,n.pos,r,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+n.pos,e.lineStart+n.text.length,r))}return!1}finish(e,n){return this.rows?(e.addLeafElement(n,e.elt("Table",n.start,n.start+n.content.length,this.rows)),!0):!1}}const ame={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":Q.heading}},"TableRow",{name:"TableCell",style:Q.content},{name:"TableDelimiter",style:Q.processingInstruction}],parseBlock:[{name:"Table",leaf(t,e){return eI(e.content,0)?new tI:null},endLeaf(t,e,n){if(n.parsers.some(r=>r instanceof tI)||!eI(e.text,e.basePos))return!1;let i=t.peekLine();return AB.test(i)&&yd(t,e.text,e.basePos)==yd(t,i,e.basePos)},before:"SetextHeading"}]};class lme{nextLine(){return!1}finish(e,n){return e.addLeafElement(n,e.elt("Task",n.start,n.start+n.content.length,[e.elt("TaskMarker",n.start,n.start+3),...e.parser.parseInline(n.content.slice(3),n.start+3)])),!0}}const ume={defineNodes:[{name:"Task",block:!0,style:Q.list},{name:"TaskMarker",style:Q.atom}],parseBlock:[{name:"TaskList",leaf(t,e){return/^\[[ xX]\][ \t]/.test(e.content)&&t.parentType().name=="ListItem"?new lme:null},after:"SetextHeading"}]},nI=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,iI=/[\w-]+(\.[\w-]+)+(:\d+)?(\/[^\s<]*)?/gy,cme=/[\w-]+\.[\w-]+($|[/:])/,rI=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,sI=/\/[a-zA-Z\d@.]+/gy;function oI(t,e,n,i){let r=0;for(let s=e;s<n;s++)t[s]==i&&r++;return r}function hme(t,e){iI.lastIndex=e;let n=iI.exec(t);if(!n||cme.exec(n[0])[0].indexOf("_")>-1)return-1;let i=e+n[0].length;for(;;){let r=t[i-1],s;if(/[?!.,:*_~]/.test(r)||r==")"&&oI(t,e,i,")")>oI(t,e,i,"("))i--;else if(r==";"&&(s=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(t.slice(e,i))))i=e+s.index;else break}return i}function aI(t,e){rI.lastIndex=e;let n=rI.exec(t);if(!n)return-1;let i=n[0][n[0].length-1];return i=="_"||i=="-"?-1:e+n[0].length-(i=="."?1:0)}const fme={parseInline:[{name:"Autolink",parse(t,e,n){let i=n-t.offset;if(i&&/\w/.test(t.text[i-1]))return-1;nI.lastIndex=i;let r=nI.exec(t.text),s=-1;if(!r)return-1;if(r[1]||r[2]){if(s=hme(t.text,i+r[0].length),s>-1&&t.hasOpenLink){let o=/([^\[\]]|\[[^\]]*\])*/.exec(t.text.slice(i,s));s=i+o[0].length}}else r[3]?s=aI(t.text,i):(s=aI(t.text,i+r[0].length),s>-1&&r[0]=="xmpp:"&&(sI.lastIndex=s,r=sI.exec(t.text),r&&(s=r.index+r[0].length)));return s<0?-1:(t.addElement(t.elt("URL",n,s+t.offset)),s+t.offset)}}]},dme=[ame,ume,ome,fme];function $B(t,e,n){return(i,r,s)=>{if(r!=t||i.char(s+1)==t)return-1;let o=[i.elt(n,s,s+1)];for(let a=s+1;a<i.end;a++){let l=i.char(a);if(l==t)return i.addElement(i.elt(e,s,a+1,o.concat(i.elt(n,a,a+1))));if(l==92&&o.push(i.elt("Escape",a,a+++2)),ms(l))break}return-1}}const pme={defineNodes:[{name:"Superscript",style:Q.special(Q.content)},{name:"SuperscriptMark",style:Q.processingInstruction}],parseInline:[{name:"Superscript",parse:$B(94,"Superscript","SuperscriptMark")}]},mme={defineNodes:[{name:"Subscript",style:Q.special(Q.content)},{name:"SubscriptMark",style:Q.processingInstruction}],parseInline:[{name:"Subscript",parse:$B(126,"Subscript","SubscriptMark")}]},gme={defineNodes:[{name:"Emoji",style:Q.character}],parseInline:[{name:"Emoji",parse(t,e,n){let i;return e!=58||!(i=/^[a-zA-Z_0-9]+:/.exec(t.slice(n+1,t.end)))?-1:t.addElement(t.elt("Emoji",n,n+1+i[0].length))}}]};var lI={};class YO{constructor(e,n,i,r,s,o,a,l,u,c=0,h){this.p=e,this.stack=n,this.state=i,this.reducePos=r,this.pos=s,this.score=o,this.buffer=a,this.bufferBase=l,this.curContext=u,this.lookAhead=c,this.parent=h}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,i=0){let r=e.parser.context;return new YO(e,[],n,i,i,0,[],0,r?new uI(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let i=e>>19,r=e&65535,{parser:s}=this.p,o=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),a=s.dynamicPrecedence(r);if(a&&(this.score+=a),i==0){r<s.minRepeatTerm&&this.reducePos<this.pos&&(this.reducePos=this.pos),this.pushState(s.getGoto(this.state,r,!0),this.reducePos),r<s.minRepeatTerm&&this.storeNode(r,this.reducePos,this.reducePos,o?8:4,!0),this.reduceContext(r,this.reducePos);return}let l=this.stack.length-(i-1)*3-(e&262144?6:0),u=l?this.stack[l-2]:this.p.ranges[0].from;r<s.minRepeatTerm&&u==this.reducePos&&this.reducePos<this.pos&&(this.reducePos=this.pos);let c=this.reducePos-u;c>=2e3&&!(!((n=this.p.parser.nodeSet.types[r])===null||n===void 0)&&n.isAnonymous)&&(u==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=u,this.p.lastBigReductionSize=c));let h=l?this.stack[l-1]:0,f=this.bufferBase+this.buffer.length-h;if(r<s.minRepeatTerm||e&131072){let p=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(r,u,p,f+4,!0)}if(e&262144)this.state=this.stack[l];else{let p=this.stack[l-3];this.state=s.getGoto(p,r,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(r,u)}storeNode(e,n,i,r=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let o=this.buffer.length;if(o>0&&this.buffer[o-4]==0&&this.buffer[o-1]>-1){if(n==i)return;if(this.buffer[o-2]>=n){this.buffer[o-2]=i;return}}}if(!s||this.pos==i)this.buffer.push(e,n,i,r);else{let o=this.buffer.length;if(o>0&&(this.buffer[o-4]!=0||this.buffer[o-1]<0)){let a=!1;for(let l=o;l>0&&this.buffer[l-2]>i;l-=4)if(this.buffer[l-1]>=0){a=!0;break}if(a)for(;o>0&&this.buffer[o-2]>i;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,r>4&&(r-=4)}this.buffer[o]=e,this.buffer[o+1]=n,this.buffer[o+2]=i,this.buffer[o+3]=r}}shift(e,n,i,r){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let s=e,{parser:o}=this.p;this.pos=r;let a=o.stateFlag(s,1);!a&&(r>i||n<=o.maxNode)&&(this.reducePos=r),this.pushState(s,a?i:Math.min(i,this.reducePos)),this.shiftContext(n,i),n<=o.maxNode&&this.buffer.push(n,i,r,4)}else this.pos=r,this.shiftContext(n,i),n<=this.p.parser.maxNode&&this.buffer.push(n,i,r,4)}apply(e,n,i,r){e&65536?this.reduce(e):this.shift(e,n,i,r)}useNode(e,n){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(n,r),this.buffer.push(i,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(n&&e.buffer[n-4]==0&&(n-=4);n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let i=e.buffer.slice(n),r=e.bufferBase+n;for(;e&&r==e.bufferBase;)e=e.parent;return new YO(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,i?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new Ome(this);;){let i=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(i==0)return!1;if((i&65536)==0)return!0;n.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let r=[];for(let s=0,o;s<n.length;s+=2)(o=n[s+1])!=this.state&&this.p.parser.hasAction(o,e)&&r.push(n[s],o);if(this.stack.length<120)for(let s=0;r.length<8&&s<n.length;s+=2){let o=n[s+1];r.some((a,l)=>l&1&&a==o)||r.push(n[s],o)}n=r}let i=[];for(let r=0;r<n.length&&i.length<4;r+=2){let s=n[r+1];if(s==this.state)continue;let o=this.split();o.pushState(s,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(n[r],this.pos),o.reducePos=this.pos,o.score-=200,i.push(o)}return i}forceReduce(){let{parser:e}=this.p,n=e.stateSlot(this.state,5);if((n&65536)==0)return!1;if(!e.validAction(this.state,n)){let i=n>>19,r=n&65535,s=this.stack.length-i*3;if(s<0||e.getGoto(this.stack[s],r,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;n=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],i=(r,s)=>{if(!n.includes(r))return n.push(r),e.allActions(r,o=>{if(!(o&393216))if(o&65536){let a=(o>>19)-s;if(a>1){let l=o&65535,u=this.stack.length-a*3;if(u>=0&&e.getGoto(this.stack[u],l,!1)>=0)return a<<19|65536|l}}else{let a=i(o,s+1);if(a!=null)return a}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=e.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(n)))}reduceContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(n)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let n=new uI(this.curContext.tracker,e);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class uI{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class Ome{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=r}}class GO{constructor(e,n,i){this.stack=e,this.pos=n,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new GO(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new GO(this.stack,this.pos,this.index)}}function Yf(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let i=0,r=0;i<t.length;){let s=0;for(;;){let o=t.charCodeAt(i++),a=!1;if(o==126){s=65535;break}o>=92&&o--,o>=34&&o--;let l=o-32;if(l>=46&&(l-=46,a=!0),s+=l,a)break;s*=46}n?n[r++]=s:n=new e(s)}return n}class O0{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const cI=new O0;class xme{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=cI,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let i=this.range,r=this.rangeIndex,s=this.pos+e;for(;s<i.from;){if(!r)return null;let o=this.ranges[--r];s-=i.from-o.to,i=o}for(;n<0?s>i.to:s>=i.to;){if(r==this.ranges.length-1)return null;let o=this.ranges[++r];s+=o.from-i.to,i=o}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let n of this.ranges)if(n.to>e)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,i,r;if(n>=0&&n<this.chunk.length)i=this.pos+e,r=this.chunk.charCodeAt(n);else{let s=this.resolveOffset(e,1);if(s==null)return-1;if(i=s,i>=this.chunk2Pos&&i<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(i-this.chunk2Pos);else{let o=this.rangeIndex,a=this.range;for(;a.to<=i;)a=this.ranges[++o];this.chunk2=this.input.chunk(this.chunk2Pos=i),i+this.chunk2.length>a.to&&(this.chunk2=this.chunk2.slice(0,a.to-i)),r=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),r}acceptToken(e,n=0){let i=n?this.resolveOffset(n,-1):this.pos;if(i==null||i<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=i}acceptTokenTo(e,n){this.token.value=e,this.token.end=n}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),n=this.pos+e.length;this.chunk=n>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=cI,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,n){if(e>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let i="";for(let r of this.ranges){if(r.from>=n)break;r.to>e&&(i+=this.input.read(Math.max(r.from,e),Math.min(r.to,n)))}return i}}class Uc{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:i}=n.p;IB(this.data,e,n,this.id,i.data,i.tokenPrecTable)}}Uc.prototype.contextual=Uc.prototype.fallback=Uc.prototype.extend=!1;class KO{constructor(e,n,i){this.precTable=n,this.elseToken=i,this.data=typeof e=="string"?Yf(e):e}token(e,n){let i=e.pos,r=0;for(;;){let s=e.next<0,o=e.resolveOffset(1,1);if(IB(this.data,e,n,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||r++,o==null)break;e.reset(o,e.token)}r&&(e.reset(i,e.token),e.acceptToken(this.elseToken,r))}}KO.prototype.contextual=Uc.prototype.fallback=Uc.prototype.extend=!1;class Dr{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function IB(t,e,n,i,r,s){let o=0,a=1<<i,{dialect:l}=n.p.parser;e:for(;(a&t[o])!=0;){let u=t[o+1];for(let p=o+3;p<u;p+=2)if((t[p+1]&a)>0){let m=t[p];if(l.allows(m)&&(e.token.value==-1||e.token.value==m||yme(m,e.token.value,r,s))){e.acceptToken(m);break}}let c=e.next,h=0,f=t[o+2];if(e.next<0&&f>h&&t[u+f*3-3]==65535){o=t[u+f*3-1];continue e}for(;h<f;){let p=h+f>>1,m=u+p+(p<<1),g=t[m],x=t[m+1]||65536;if(c<g)f=p;else if(c>=x)h=p+1;else{o=t[m+2],e.advance();continue e}}break}}function hI(t,e,n){for(let i=e,r;(r=t[i])!=65535;i++)if(r==n)return i-e;return-1}function yme(t,e,n,i){let r=hI(n,i,e);return r<0||hI(n,i,t)<r}const Or=typeof process<"u"&&lI&&/\bparse\b/.test(lI.LOG);let hb=null;function fI(t,e,n){let i=t.cursor(Xt.IncludeAnonymous);for(i.moveTo(e);;)if(!(n<0?i.childBefore(e):i.childAfter(e)))for(;;){if((n<0?i.to<e:i.from>e)&&!i.type.isError)return n<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(t.length,Math.max(i.from+1,e+25));if(n<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return n<0?0:t.length}}class vme{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?fI(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?fI(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let i=this.trees[n],r=this.index[n];if(r==i.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=i.children[r],o=this.start[n]+i.positions[r];if(o>e)return this.nextStart=o,null;if(s instanceof bt){if(o==e){if(o<this.safeFrom)return null;let a=o+s.length;if(a<=this.safeTo){let l=s.prop(ot.lookAhead);if(!l||a+l<this.fragment.to)return s}}this.index[n]++,o+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(o),this.index.push(0))}else this.index[n]++,this.nextStart=o+s.length}}}class bme{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new O0)}getActions(e){let n=0,i=null,{parser:r}=e.p,{tokenizers:s}=r,o=r.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,l=0;for(let u=0;u<s.length;u++){if((1<<u&o)==0)continue;let c=s[u],h=this.tokens[u];if(!(i&&!c.fallback)&&((c.contextual||h.start!=e.pos||h.mask!=o||h.context!=a)&&(this.updateCachedToken(h,c,e),h.mask=o,h.context=a),h.lookAhead>h.end+25&&(l=Math.max(h.lookAhead,l)),h.value!=0)){let f=n;if(h.extended>-1&&(n=this.addActions(e,h.extended,h.end,n)),n=this.addActions(e,h.value,h.end,n),!c.extend&&(i=h,n>f))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!i&&e.pos==this.stream.end&&(i=new O0,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,n=this.addActions(e,i.value,i.end,n)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new O0,{pos:i,p:r}=e;return n.start=i,n.end=Math.min(i+1,r.stream.end),n.value=i==r.stream.end?r.parser.eofTerm:0,n}updateCachedToken(e,n,i){let r=this.stream.clipPos(i.pos);if(n.token(this.stream.reset(r,e),i),e.value>-1){let{parser:s}=i.p;for(let o=0;o<s.specialized.length;o++)if(s.specialized[o]==e.value){let a=s.specializers[o](this.stream.read(e.start,e.end),i);if(a>=0&&i.p.parser.dialect.allows(a>>1)){(a&1)==0?e.value=a>>1:e.extended=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,n,i,r){for(let s=0;s<r;s+=3)if(this.actions[s]==e)return r;return this.actions[r++]=e,this.actions[r++]=n,this.actions[r++]=i,r}addActions(e,n,i,r){let{state:s}=e,{parser:o}=e.p,{data:a}=o;for(let l=0;l<2;l++)for(let u=o.stateSlot(s,l?2:1);;u+=3){if(a[u]==65535)if(a[u+1]==1)u=No(a,u+2);else{r==0&&a[u+1]==2&&(r=this.putAction(No(a,u+2),n,i,r));break}a[u]==n&&(r=this.putAction(No(a,u+1),n,i,r))}return r}}class Sme{constructor(e,n,i,r){this.parser=e,this.input=n,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new xme(n,r),this.tokens=new bme(e,this.stream),this.topTerm=e.top[1];let{from:s}=r[0];this.stacks=[YO.start(this,e.top[0],s)],this.fragments=i.length&&this.stream.end-s>e.bufferLength*4?new vme(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,i=this.stacks=[],r,s;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<e.length;o++){let a=e[o];for(;;){if(this.tokens.mainToken=null,a.pos>n)i.push(a);else{if(this.advanceStack(a,i,e))continue;{r||(r=[],s=[]),r.push(a);let l=this.tokens.getMainToken(a);s.push(l.value,l.end)}}break}}if(!i.length){let o=r&&Cme(r);if(o)return Or&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw Or&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&r){let o=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,s,i);if(o)return Or&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(i.length>o)for(i.sort((a,l)=>l.score-a.score);i.length>o;)i.pop();i.some(a=>a.reducePos>n)&&this.recovering--}else if(i.length>1){e:for(let o=0;o<i.length-1;o++){let a=i[o];for(let l=o+1;l<i.length;l++){let u=i[l];if(a.sameState(u)||a.buffer.length>500&&u.buffer.length>500)if((a.score-u.score||a.buffer.length-u.buffer.length)>0)i.splice(l--,1);else{i.splice(o--,1);continue e}}}i.length>12&&(i.sort((o,a)=>a.score-o.score),i.splice(12,i.length-12))}this.minStackPos=i[0].pos;for(let o=1;o<i.length;o++)i[o].pos<this.minStackPos&&(this.minStackPos=i[o].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,n,i){let r=e.pos,{parser:s}=this,o=Or?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let u=e.curContext&&e.curContext.tracker.strict,c=u?e.curContext.hash:0;for(let h=this.fragments.nodeAt(r);h;){let f=this.parser.nodeSet.types[h.type.id]==h.type?s.getGoto(e.state,h.type.id):-1;if(f>-1&&h.length&&(!u||(h.prop(ot.contextHash)||0)==c))return e.useNode(h,f),Or&&console.log(o+this.stackID(e)+` (via reuse of ${s.getName(h.type.id)})`),!0;if(!(h instanceof bt)||h.children.length==0||h.positions[0]>0)break;let p=h.children[0];if(p instanceof bt&&h.positions[0]==0)h=p;else break}}let a=s.stateSlot(e.state,4);if(a>0)return e.reduce(a),Or&&console.log(o+this.stackID(e)+` (via always-reduce ${s.getName(a&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let u=0;u<l.length;){let c=l[u++],h=l[u++],f=l[u++],p=u==l.length||!i,m=p?e:e.split(),g=this.tokens.mainToken;if(m.apply(c,h,g?g.start:m.pos,f),Or&&console.log(o+this.stackID(m)+` (via ${(c&65536)==0?"shift":`reduce of ${s.getName(c&65535)}`} for ${s.getName(h)} @ ${r}${m==e?"":", split"})`),p)return!0;m.pos>r?n.push(m):i.push(m)}return!1}advanceFully(e,n){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return dI(e,n),!0}}runRecovery(e,n,i){let r=null,s=!1;for(let o=0;o<e.length;o++){let a=e[o],l=n[o<<1],u=n[(o<<1)+1],c=Or?this.stackID(a)+" -> ":"";if(a.deadEnd&&(s||(s=!0,a.restart(),Or&&console.log(c+this.stackID(a)+" (restarted)"),this.advanceFully(a,i))))continue;let h=a.split(),f=c;for(let p=0;p<10&&h.forceReduce()&&(Or&&console.log(f+this.stackID(h)+" (via force-reduce)"),!this.advanceFully(h,i));p++)Or&&(f=this.stackID(h)+" -> ");for(let p of a.recoverByInsert(l))Or&&console.log(c+this.stackID(p)+" (via recover-insert)"),this.advanceFully(p,i);this.stream.end>a.pos?(u==a.pos&&(u++,l=0),a.recoverByDelete(l,u),Or&&console.log(c+this.stackID(a)+` (via recover-delete ${this.parser.getName(l)})`),dI(a,i)):(!r||r.score<h.score)&&(r=h)}return r}stackToTree(e){return e.close(),bt.build({buffer:GO.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let n=(hb||(hb=new WeakMap)).get(e);return n||hb.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}}function dI(t,e){for(let n=0;n<e.length;n++){let i=e[n];if(i.pos==t.pos&&i.sameState(t)){e[n].score<t.score&&(e[n]=t);return}}e.push(t)}class _me{constructor(e,n,i){this.source=e,this.flags=n,this.disabled=i}allows(e){return!this.disabled||this.disabled[e]==0}}const fb=t=>t;class RB{constructor(e){this.start=e.start,this.shift=e.shift||fb,this.reduce=e.reduce||fb,this.reuse=e.reuse||fb,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class _h extends Cx{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let a=0;a<e.repeatNodeCount;a++)n.push("");let i=Object.keys(e.topRules).map(a=>e.topRules[a][1]),r=[];for(let a=0;a<n.length;a++)r.push([]);function s(a,l,u){r[a].push([l,l.deserialize(String(u))])}if(e.nodeProps)for(let a of e.nodeProps){let l=a[0];typeof l=="string"&&(l=ot[l]);for(let u=1;u<a.length;){let c=a[u++];if(c>=0)s(c,l,a[u++]);else{let h=a[u+-c];for(let f=-c;f>0;f--)s(a[u++],l,h);u++}}}this.nodeSet=new uf(n.map((a,l)=>Xn.define({name:l>=this.minRepeatTerm?void 0:a,id:l,props:r[l],top:i.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=hL;let o=Yf(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;a<this.specializerSpecs.length;a++)this.specialized[a]=this.specializerSpecs[a].term;this.specializers=this.specializerSpecs.map(pI),this.states=Yf(e.states,Uint32Array),this.data=Yf(e.stateData),this.goto=Yf(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(a=>typeof a=="number"?new Uc(o,a):a),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,i){let r=new Sme(this,e,n,i);for(let s of this.wrappers)r=s(r,e,n,i);return r}getGoto(e,n,i=!1){let r=this.goto;if(n>=r[0])return-1;for(let s=r[n+1];;){let o=r[s++],a=o&1,l=r[s++];if(a&&i)return l;for(let u=s+(o>>1);s<u;s++)if(r[s]==e)return l;if(a)return-1}}hasAction(e,n){let i=this.data;for(let r=0;r<2;r++)for(let s=this.stateSlot(e,r?2:1),o;;s+=3){if((o=i[s])==65535)if(i[s+1]==1)o=i[s=No(i,s+2)];else{if(i[s+1]==2)return No(i,s+2);break}if(o==n||o==0)return No(i,s+1)}return 0}stateSlot(e,n){return this.states[e*6+n]}stateFlag(e,n){return(this.stateSlot(e,0)&n)>0}validAction(e,n){return!!this.allActions(e,i=>i==n?!0:null)}allActions(e,n){let i=this.stateSlot(e,4),r=i?n(i):void 0;for(let s=this.stateSlot(e,1);r==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=No(this.data,s+2);else break;r=n(No(this.data,s+1))}return r}nextStates(e){let n=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=No(this.data,i+2);else break;if((this.data[i+2]&1)==0){let r=this.data[i+1];n.some((s,o)=>o&1&&s==r)||n.push(this.data[i],r)}}return n}configure(e){let n=Object.assign(Object.create(_h.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=i}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(i=>{let r=e.tokenizers.find(s=>s.from==i);return r?r.to:i})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((i,r)=>{let s=e.specializers.find(a=>a.from==i.external);if(!s)return i;let o=Object.assign(Object.assign({},i),{external:s.to});return n.specializers[r]=pI(o),o})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),i=n.map(()=>!1);if(e)for(let s of e.split(" ")){let o=n.indexOf(s);o>=0&&(i[o]=!0)}let r=null;for(let s=0;s<n.length;s++)if(!i[s])for(let o=this.dialects[n[s]],a;(a=this.data[o++])!=65535;)(r||(r=new Uint8Array(this.maxTerm+1)))[a]=1;return new _me(e,i,r)}static deserialize(e){return new _h(e)}}function No(t,e){return t[e]|t[e+1]<<16}function Cme(t){let e=null;for(let n of t){let i=n.p.stoppedAt;(n.pos==n.p.stream.end||i!=null&&n.pos>i)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}function pI(t){if(t.external){let e=t.extend?1:0;return(n,i)=>t.external(n,i)<<1|e}return t.get}const wme=55,kme=1,Eme=56,Tme=2,Pme=57,Ame=3,mI=4,$me=5,R5=6,MB=7,NB=8,LB=9,DB=10,Ime=11,Rme=12,Mme=13,db=58,Nme=14,Lme=15,gI=59,QB=21,Dme=23,VB=24,Qme=25,iC=27,BB=28,Vme=29,Bme=32,Fme=35,jme=37,Zme=38,zme=0,Xme=1,Wme={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},Hme={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},OI={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function Ume(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}let xI=null,yI=null,vI=0;function rC(t,e){let n=t.pos+e;if(vI==n&&yI==t)return xI;let i=t.peek(e),r="";for(;Ume(i);)r+=String.fromCharCode(i),i=t.peek(++e);return yI=t,vI=n,xI=r?r.toLowerCase():i==qme||i==Yme?void 0:null}const FB=60,JO=62,M5=47,qme=63,Yme=33,Gme=45;function bI(t,e){this.name=t,this.parent=e}const Kme=[R5,DB,MB,NB,LB],Jme=new RB({start:null,shift(t,e,n,i){return Kme.indexOf(e)>-1?new bI(rC(i,1)||"",t):t},reduce(t,e){return e==QB&&t?t.parent:t},reuse(t,e,n,i){let r=e.type.id;return r==R5||r==jme?new bI(rC(i,1)||"",t):t},strict:!1}),ege=new Dr((t,e)=>{if(t.next!=FB){t.next<0&&e.context&&t.acceptToken(db);return}t.advance();let n=t.next==M5;n&&t.advance();let i=rC(t,0);if(i===void 0)return;if(!i)return t.acceptToken(n?Lme:Nme);let r=e.context?e.context.name:null;if(n){if(i==r)return t.acceptToken(Ime);if(r&&Hme[r])return t.acceptToken(db,-2);if(e.dialectEnabled(zme))return t.acceptToken(Rme);for(let s=e.context;s;s=s.parent)if(s.name==i)return;t.acceptToken(Mme)}else{if(i=="script")return t.acceptToken(MB);if(i=="style")return t.acceptToken(NB);if(i=="textarea")return t.acceptToken(LB);if(Wme.hasOwnProperty(i))return t.acceptToken(DB);r&&OI[r]&&OI[r][i]?t.acceptToken(db,-1):t.acceptToken(R5)}},{contextual:!0}),tge=new Dr(t=>{for(let e=0,n=0;;n++){if(t.next<0){n&&t.acceptToken(gI);break}if(t.next==Gme)e++;else if(t.next==JO&&e>=2){n>=3&&t.acceptToken(gI,-2);break}else e=0;t.advance()}});function nge(t){for(;t;t=t.parent)if(t.name=="svg"||t.name=="math")return!0;return!1}const ige=new Dr((t,e)=>{if(t.next==M5&&t.peek(1)==JO){let n=e.dialectEnabled(Xme)||nge(e.context);t.acceptToken(n?$me:mI,2)}else t.next==JO&&t.acceptToken(mI,1)});function N5(t,e,n){let i=2+t.length;return new Dr(r=>{for(let s=0,o=0,a=0;;a++){if(r.next<0){a&&r.acceptToken(e);break}if(s==0&&r.next==FB||s==1&&r.next==M5||s>=2&&s<i&&r.next==t.charCodeAt(s-2))s++,o++;else if(s==i&&r.next==JO){a>o?r.acceptToken(e,-o):r.acceptToken(n,-(o-2));break}else if((r.next==10||r.next==13)&&a){r.acceptToken(e,1);break}else s=o=0;r.advance()}})}const rge=N5("script",wme,kme),sge=N5("style",Eme,Tme),oge=N5("textarea",Pme,Ame),age=ff({"Text RawText IncompleteTag IncompleteCloseTag":Q.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":Q.angleBracket,TagName:Q.tagName,"MismatchedCloseTag/TagName":[Q.tagName,Q.invalid],AttributeName:Q.attributeName,"AttributeValue UnquotedAttributeValue":Q.attributeValue,Is:Q.definitionOperator,"EntityReference CharacterReference":Q.character,Comment:Q.blockComment,ProcessingInst:Q.processingInstruction,DoctypeDecl:Q.documentMeta}),lge=_h.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x1G.xOOO`1G/Z1G/ZO(sQ&rO1G/ROOOb1G/R1G/RO)OQ&rO1G/UOOOd1G/U1G/UO)ZQ&rO1G/XOOO`1G/X1G/XO)fQ&rO1G/ZOOOa-E7]-E7]O)qQ#tO'#CzOOO`1G.w1G.wOOOb-E7^-E7^O)vQ#tO'#C}OOOd-E7_-E7_O){Q#tO'#DQOOO`-E7`-E7`O*QQ#|O,59nOOOp-E7a-E7aOOO`1G/[1G/[OOO`1G/^1G/^OOO`1G/_1G/_O*VQ,UO,59`OOQW-E7Y-E7YOOOa7+$d7+$dOOO`7+$u7+$uOOOb7+$m7+$mOOOd7+$p7+$pOOO`7+$s7+$sO*bQ#|O,59fO*gQ#|O,59iO*lQ#|O,59lOOO`1G/Y1G/YO*qO7[O'#CwO+SOMhO'#CwOOQW1G.z1G.zOOO`1G/Q1G/QOOO`1G/T1G/TOOO`1G/W1G/WOOOO'#D]'#D]O+eO7[O,59cOOQW,59c,59cOOOO'#D^'#D^O+vOMhO,59cOOOO-E7Z-E7ZOOQW1G.}1G.}OOOO-E7[-E7[",stateData:",c~O!_OS~OUSOVPOWQOXROYTO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O|_O!eZO~OgaO~OgbO~OgcO~OgdO~OgeO~O!XfOPmP![mP~O!YiOQpP![pP~O!ZlORsP![sP~OUSOVPOWQOXROYTOZqO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O!eZO~O![rO~P#gO!]sO!fuO~OgvO~OgwO~OS|OT}OiyO~OS!POT}OiyO~OS!ROT}OiyO~OS!TOT}OiyO~OS}OT}OiyO~O!XfOPmX![mX~OP!WO![!XO~O!YiOQpX![pX~OQ!ZO![!XO~O!ZlORsX![sX~OR!]O![!XO~O![!XO~P#gOg!_O~O!]sO!f!aO~OS!bO~OS!cO~Oj!dOShXThXihX~OS!fOT!gOiyO~OS!hOT!gOiyO~OS!iOT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:Jme,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[age],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|caPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bXaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UVaP!dpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pTaPOv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!dpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({WaP!b`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t`)jT!b`Or)esv)ew;'S)e;'S;=`)y<%lO)e`)|P;=`<%l)ea*SP;=`<%l(t!Q*^V!b`!dpOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!Q*vP;=`<%l*V!R*|P;=`<%l&XW+UYlWOX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+PW+wP;=`<%l+P!Z+}P;=`<%l$q!a,]`aP!b`!dp!_^OX&XXY,QYZ,QZ]&X]^,Q^p&Xpq,Qqr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!_-ljiSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q[/ebiSlWOX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+PS0rXiSqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0mS1bP;=`<%l0m[1hP;=`<%l/^!V1vciSaP!b`!dpOq&Xqr1krs&}sv1kvw0mwx(tx!P1k!P!Q&X!Q!^1k!^!_*V!_!a&X!a#s1k#s$f&X$f;'S1k;'S;=`3R<%l?Ah1k?Ah?BY&X?BY?Mn1k?MnO&X!V3UP;=`<%l1k!_3[P;=`<%l-_!Z3hV!ahaP!dpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}!_4WiiSlWd!ROX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst>]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zblWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOb!R!R7tP;=`<%l7S!Z8OYlWb!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{iiSlWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!_:sbiSlWb!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!V<QciSOp7Sqr;{rs7Sst0mtw;{wx7Sx!P;{!P!Q7S!Q!];{!]!^=]!^!a7S!a#s;{#s$f7S$f;'S;{;'S;=`>P<%l?Ah;{?Ah?BY7S?BY?Mn;{?MnO7S!V=dXiSb!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!V>SP;=`<%l;{!_>YP;=`<%l8t!_>dhiSlWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^/^!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!Z@TalWOX@OXZAYZ[@O[^AY^p@Oqr@OrsAYsw@OwxAYx!]@O!]!^Az!^!aAY!a#S@O#S#TAY#T;'S@O;'S;=`Bq<%lO@O!RA]UOpAYq!]AY!]!^Ao!^;'SAY;'S;=`At<%lOAY!RAtOc!R!RAwP;=`<%lAY!ZBRYlWc!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!ZBtP;=`<%l@O!_COhiSlWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^Dj!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!_DsbiSlWc!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VFQbiSOpAYqrE{rsAYswE{wxAYx!PE{!P!QAY!Q!]E{!]!^GY!^!aAY!a#sE{#s$fAY$f;'SE{;'S;=`G|<%l?AhE{?Ah?BYAY?BY?MnE{?MnOAY!VGaXiSc!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!VHPP;=`<%lE{!_HVP;=`<%lBw!ZHcW!cxaP!b`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t!aIYliSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OKQ!O!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!aK_kiSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!`&X!`!aMS!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!TM_XaP!b`!dp!fQOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!aNZ!ZiSgQaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OMz!O!PMz!P!Q$q!Q![Mz![!]Mz!]!^-_!^!_*V!_!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f$}-_$}%OMz%O%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4UMz4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Je-_$Je$JgMz$Jg$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!a!$PP;=`<%lMz!R!$ZY!b`!dpOq*Vqr!$yrs(Vsv*Vwx)ex!a*V!a!b!4t!b;'S*V;'S;=`*s<%lO*V!R!%Q]!b`!dpOr*Vrs(Vsv*Vwx)ex}*V}!O!%y!O!f*V!f!g!']!g#W*V#W#X!0`#X;'S*V;'S;=`*s<%lO*V!R!&QX!b`!dpOr*Vrs(Vsv*Vwx)ex}*V}!O!&m!O;'S*V;'S;=`*s<%lO*V!R!&vV!b`!dp!ePOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!'dX!b`!dpOr*Vrs(Vsv*Vwx)ex!q*V!q!r!(P!r;'S*V;'S;=`*s<%lO*V!R!(WX!b`!dpOr*Vrs(Vsv*Vwx)ex!e*V!e!f!(s!f;'S*V;'S;=`*s<%lO*V!R!(zX!b`!dpOr*Vrs(Vsv*Vwx)ex!v*V!v!w!)g!w;'S*V;'S;=`*s<%lO*V!R!)nX!b`!dpOr*Vrs(Vsv*Vwx)ex!{*V!{!|!*Z!|;'S*V;'S;=`*s<%lO*V!R!*bX!b`!dpOr*Vrs(Vsv*Vwx)ex!r*V!r!s!*}!s;'S*V;'S;=`*s<%lO*V!R!+UX!b`!dpOr*Vrs(Vsv*Vwx)ex!g*V!g!h!+q!h;'S*V;'S;=`*s<%lO*V!R!+xY!b`!dpOr!+qrs!,hsv!+qvw!-Swx!.[x!`!+q!`!a!/j!a;'S!+q;'S;=`!0Y<%lO!+qq!,mV!dpOv!,hvx!-Sx!`!,h!`!a!-q!a;'S!,h;'S;=`!.U<%lO!,hP!-VTO!`!-S!`!a!-f!a;'S!-S;'S;=`!-k<%lO!-SP!-kO|PP!-nP;=`<%l!-Sq!-xS!dp|POv(Vx;'S(V;'S;=`(h<%lO(Vq!.XP;=`<%l!,ha!.aX!b`Or!.[rs!-Ssv!.[vw!-Sw!`!.[!`!a!.|!a;'S!.[;'S;=`!/d<%lO!.[a!/TT!b`|POr)esv)ew;'S)e;'S;=`)y<%lO)ea!/gP;=`<%l!.[!R!/sV!b`!dp|POr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!0]P;=`<%l!+q!R!0gX!b`!dpOr*Vrs(Vsv*Vwx)ex#c*V#c#d!1S#d;'S*V;'S;=`*s<%lO*V!R!1ZX!b`!dpOr*Vrs(Vsv*Vwx)ex#V*V#V#W!1v#W;'S*V;'S;=`*s<%lO*V!R!1}X!b`!dpOr*Vrs(Vsv*Vwx)ex#h*V#h#i!2j#i;'S*V;'S;=`*s<%lO*V!R!2qX!b`!dpOr*Vrs(Vsv*Vwx)ex#m*V#m#n!3^#n;'S*V;'S;=`*s<%lO*V!R!3eX!b`!dpOr*Vrs(Vsv*Vwx)ex#d*V#d#e!4Q#e;'S*V;'S;=`*s<%lO*V!R!4XX!b`!dpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!dpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOyPP!7TP;=`<%l!6Vq!7]V!dpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!dpyPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[rge,sge,oge,ige,ege,tge,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function jB(t,e){let n=Object.create(null);for(let i of t.getChildren(VB)){let r=i.getChild(Qme),s=i.getChild(iC)||i.getChild(BB);r&&(n[e.read(r.from,r.to)]=s?s.type.id==iC?e.read(s.from+1,s.to-1):e.read(s.from,s.to):"")}return n}function SI(t,e){let n=t.getChild(Dme);return n?e.read(n.from,n.to):" "}function pb(t,e,n){let i;for(let r of n)if(!r.attrs||r.attrs(i||(i=jB(t.node.parent.firstChild,e))))return{parser:r.parser,bracketed:!0};return null}function ZB(t=[],e=[]){let n=[],i=[],r=[],s=[];for(let a of t)(a.tag=="script"?n:a.tag=="style"?i:a.tag=="textarea"?r:s).push(a);let o=e.length?Object.create(null):null;for(let a of e)(o[a.name]||(o[a.name]=[])).push(a);return gL((a,l)=>{let u=a.type.id;if(u==Vme)return pb(a,l,n);if(u==Bme)return pb(a,l,i);if(u==Fme)return pb(a,l,r);if(u==QB&&s.length){let c=a.node,h=c.firstChild,f=h&&SI(h,l),p;if(f){for(let m of s)if(m.tag==f&&(!m.attrs||m.attrs(p||(p=jB(h,l))))){let g=c.lastChild,x=g.type.id==Zme?g.from:c.to;if(x>h.to)return{parser:m.parser,overlay:[{from:h.to,to:x}]}}}}if(o&&u==VB){let c=a.node,h;if(h=c.firstChild){let f=o[l.read(h.from,h.to)];if(f)for(let p of f){if(p.tagName&&p.tagName!=SI(c.parent,l))continue;let m=c.lastChild;if(m.type.id==iC){let g=m.from+1,x=m.lastChild,y=m.to-(x&&x.isError?0:1);if(y>g)return{parser:p.parser,overlay:[{from:g,to:y}],bracketed:!0}}else if(m.type.id==BB)return{parser:p.parser,overlay:[{from:m.from,to:m.to}]}}}}return null})}const uge=145,_I=1,cge=146,hge=147,zB=2,fge=148,dge=3,pge=4,XB=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],mge=58,gge=40,WB=95,Oge=91,x0=45,xge=46,yge=35,vge=37,bge=38,Sge=92,_ge=10,Cge=42;function Cp(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function L5(t){return t>=48&&t<=57}function CI(t){return L5(t)||t>=97&&t<=102||t>=65&&t<=70}const HB=(t,e,n)=>(i,r)=>{for(let s=!1,o=0,a=0;;a++){let{next:l}=i;if(Cp(l)||l==x0||l==WB||s&&L5(l))!s&&(l!=x0||a>0)&&(s=!0),o===a&&l==x0&&o++,i.advance();else if(l==Sge&&i.peek(1)!=_ge){if(i.advance(),CI(i.next)){do i.advance();while(CI(i.next));i.next==32&&i.advance()}else i.next>-1&&i.advance();s=!0}else{s&&i.acceptToken(o==2&&r.canShift(zB)?e:l==gge?n:t);break}}},wge=new Dr(HB(cge,zB,hge),{contextual:!0}),kge=new Dr(HB(fge,dge,pge),{contextual:!0}),Ege=new Dr(t=>{if(XB.includes(t.peek(-1))){let{next:e}=t;(Cp(e)||e==WB||e==yge||e==xge||e==Cge||e==Oge||e==mge&&Cp(t.peek(1))||e==x0||e==bge)&&t.acceptToken(uge)}}),Tge=new Dr(t=>{if(!XB.includes(t.peek(-1))){let{next:e}=t;if(e==vge&&(t.advance(),t.acceptToken(_I)),Cp(e)){do t.advance();while(Cp(t.next)||L5(t.next));t.acceptToken(_I)}}}),Pge=ff({"AtKeyword import charset namespace keyframes media supports font-feature-values":Q.definitionKeyword,"from to selector scope MatchFlag":Q.keyword,NamespaceName:Q.namespace,KeyframeName:Q.labelName,KeyframeRangeName:Q.operatorKeyword,TagName:Q.tagName,ClassName:Q.className,PseudoClassName:Q.constant(Q.className),IdName:Q.labelName,"FeatureName PropertyName":Q.propertyName,AttributeName:Q.attributeName,NumberLiteral:Q.number,KeywordQuery:Q.keyword,UnaryQueryOp:Q.operatorKeyword,"CallTag ValueName FontName":Q.atom,VariableName:Q.variableName,Callee:Q.operatorKeyword,Unit:Q.unit,"UniversalSelector NestingSelector":Q.definitionOperator,"MatchOp CompareOp":Q.compareOperator,"ChildOp SiblingOp, LogicOp":Q.logicOperator,BinOp:Q.arithmeticOperator,Important:Q.modifier,Comment:Q.blockComment,ColorLiteral:Q.color,"ParenthesizedContent StringLiteral":Q.string,":":Q.punctuation,"PseudoOp #":Q.derefOperator,"; , |":Q.separator,"( )":Q.paren,"[ ]":Q.squareBracket,"{ }":Q.brace}),Age={__proto__:null,lang:44,"nth-child":44,"nth-last-child":44,"nth-of-type":44,"nth-last-of-type":44,dir:44,"host-context":44,if:90,url:152,"url-prefix":152,domain:152,regexp:152},$ge={__proto__:null,or:104,and:104,not:112,only:112,layer:206},Ige={__proto__:null,selector:118,style:124,layer:202},Rge={__proto__:null,"@import":198,"@media":210,"@charset":214,"@namespace":218,"@keyframes":224,"@supports":236,"@scope":240,"@font-feature-values":246},Mge={__proto__:null,to:243},Nge=_h.deserialize({version:14,states:"MlQYQdOOO#}QdOOP$UO`OOO%OQaO'#CfOOQP'#Ce'#CeO%VQdO'#CgO%[Q`O'#CgO%aQaO'#FnO&XQdO'#CkO&xQaO'#CcO'SQdO'#CnO'_QdO'#EOO'dQdO'#EQO'oQdO'#EXO'oQdO'#E[OOQP'#Fn'#FnO)RQhO'#E}OOQS'#Fm'#FmOOQS'#FQ'#FQQYQdOOO)YQdO'#EbO*iQhO'#EhO)YQdO'#EjO*pQdO'#ElO*{QdO'#EoO)}QhO'#EuO+TQdO'#EwO+`QdO'#EzO+eQaO'#CfO+lQ`O'#E_O+qQ`O'#F{O+|QdO'#F{QOQ`OOP,WO&jO'#CaPOOO)CA])CA]OOQP'#Ci'#CiOOQP,59R,59RO%VQdO,59ROOQP'#Cm'#CmOOQP,59V,59VO&XQdO,59VO,cQdO,59YO'_QdO,5:jO'dQdO,5:lO'oQdO,5:sO'oQdO,5:uO'oQdO,5:vO'oQdO'#FXO,nQ`O,58}O,vQdO'#E^OOQS,58},58}OOQP'#Cq'#CqOOQO'#D|'#D|OOQP,59Y,59YO,}Q`O,59YO-SQ`O,59YOOQP'#EP'#EPOOQP,5:j,5:jO-XQpO'#ERO-dQdO'#ESO-iQ`O'#ESO-nQpO,5:lO.XQaO,5:sO.oQaO,5:vOOQW'#D^'#D^O/nQhO'#DgO0RQhO,5;iO)}QhO'#DeO0`Q`O'#DnO0eQhO'#DxOOQW'#Ft'#FtOOQS,5;i,5;iO0jQ`O'#DhO0oQ`O'#DkOOQS-E9O-E9OOOQ['#Cv'#CvO0tQdO'#CwO1[QdO'#C}O1rQdO'#DQO2YQ!pO'#DSO4fQ!jO,5:|OOQO'#DX'#DXO-SQ`O'#DWO4vQ!nO'#FqO6|Q`O'#DYO7RQ`O'#DyOOQ['#Fq'#FqO7WQhO'#GOO7fQ`O,5;SO7kQ!bO,5;UOOQS'#En'#EnO7sQ`O,5;WO7xQdO,5;WOOQO'#Eq'#EqO8QQ`O,5;ZO8VQhO,5;aO'oQdO'#DjOOQS,5;c,5;cO0jQ`O,5;cO8_QdO,5;cOOQS'#F`'#F`O8gQdO'#E|O7fQ`O,5;fO8oQdO,5:yO9PQdO'#FZO9^Q`O,5<gO9^Q`O,5<gPOOO'#FP'#FPP9iO&jO,58{POOO,58{,58{OOQP1G.m1G.mOOQP1G.q1G.qOOQP1G.t1G.tO,}Q`O1G.tO-SQ`O1G.tOOQP1G0U1G0UO9tQpO1G0WO9|QaO1G0_O:dQaO1G0aO:zQaO1G0bO;bQaO,5;sOOQO-E9V-E9VOOQS1G.i1G.iO;lQ`O,5:xO;qQdO'#D}O;xQdO'#CuOOQO'#EU'#EUOOQO,5:n,5:nO-dQdO,5:nOOQP1G0W1G0WO)YQdO1G0WO<PQ!jO'#D^O<_Q!bO,59yO<gQhO,5:ROOQO'#Fu'#FuO<bQ!bO,59}O<oQhO'#FaO)}QhO,59{O)}QhO'#FaO=gQhO1G1TOOQS1G1T1G1TO=qQhO,5:PO>lQhO'#DoOOQW,5:Y,5:YOOQW,5:d,5:dOOQW,5:S,5:SO>vQhO,5:VO?bQ!fO'#FrOOQS'#Fr'#FrOOQS'#FS'#FSO@rQdO,59cOOQ[,59c,59cOAYQdO,59iOOQ[,59i,59iOApQdO,59lOOQ[,59l,59lOOQ[,59n,59nO)YQdO,59pOBWQhO'#EdOOQW'#Ed'#EdOBuQ`O1G0hO4oQhO1G0hOOQ[,59r,59rO)}QhO'#D[OOQ[,59t,59tOBzQ#tO,5:eOCVQhO'#F]OCdQ`O,5<jOOQS1G0n1G0nOOQS1G0p1G0pOOQS1G0r1G0rOCoQ`O1G0rOCtQdO'#ErOOQS1G0u1G0uOOQS1G0{1G0{ODPQaO,5:UO7fQ`O1G0}OOQS1G0}1G0}O0jQ`O1G0}OOQS-E9^-E9^OOQS1G1Q1G1QODWQ!fO1G0eODnQ`O'#EaOOQO1G0e1G0eOOQO,5;u,5;uODsQdO,5;uOOQO-E9X-E9XOEQQ`O1G2RPOOO-E8}-E8}POOO1G.g1G.gOOQP7+$`7+$`OOQP7+%r7+%rO)YQdO7+%rOOQS1G0d1G0dOE]QaO'#FzOEgQ`O,5:iOElQ!fO'#FROFjQdO'#FpOFtQ`O,59aOOQO1G0Y1G0YOFyQ!bO7+%rO)YQdO1G/eOGUQhO1G/iOOQW1G/m1G/mOOQW1G/g1G/gOGgQhO,5;{OOQW-E9_-E9_OOQS7+&o7+&oOH_QhO'#D^OHmQhO'#FxOHxQ`O'#FxOH}Q`O,5:ZOISQ!bO'#D`O>vQhO'#DmOI_QhO'#DqOIgQhO'#DsOIlQhO'#FwOOQO'#Fw'#FwOItQ!bO'#DwOOQO'#Fy'#FyOOQO'#Fv'#FvOIyQ`O1G/qOOQS-E9Q-E9QOOQ[1G.}1G.}OOQ[1G/T1G/TOOQ[1G/W1G/WOOQ[1G/[1G/[OJOQdO,5;OOOQS7+&S7+&SOJTQ`O7+&SOJYQhO'#D]OJbQ`O,59vO)}QhO,59vOOQ[1G0P1G0POJjQ`O1G0POJoQhO,5;wOOQO-E9Z-E9ZOOQS7+&^7+&^OJ}QbO'#DSOOQO'#Et'#EtOK]Q`O'#EsOOQO'#Es'#EsOKhQ`O'#F^OKpQdO,5;^OOQS,5;^,5;^OOQ[1G/p1G/pOOQS7+&i7+&iO7fQ`O7+&iOK{Q!fO'#FYO)YQdO'#FYOMSQdO7+&POOQO7+&P7+&POOQO,5:{,5:{OOQO1G1a1G1aOMgQ!bO<<I^OMrQdO'#FWOM|Q`O,5<fOOQP1G0T1G0TOOQS-E9P-E9PONUQdO'#FVON`Q`O,5<[OOQ]1G.{1G.{OOQP<<I^<<I^ONhQ`O<<I^ONmQdO7+%POOQO'#D`'#D`ONtQ!bO7+%TON|QhO'#FUO! ZQ`O,5<dO)YQdO,5<dOOQW1G/u1G/uO)YQdO,5:bO! cQ`O,5:XO>vQhO'#DrOOQO,5:],5:]O! hQhO,5:_OGUQhO,5:cOOQW7+%]7+%]OOQO'#Ef'#EfO! pQ`O1G0jOOQS<<In<<InO)YQdO,59wO!!dQhO1G/bOOQ[1G/b1G/bO!!kQ`O1G/bOOQW-E9R-E9ROOQ[7+%k7+%kOOQO,5;_,5;_OCwQdO'#F_OKhQ`O,5;xOOQS,5;x,5;xOOQS-E9[-E9[OOQS1G0x1G0xOOQS<<JT<<JTO!!sQ!fO,5;tOOQS-E9W-E9WOOQO<<Ik<<IkOOQPAN>xAN>xO!#zQ`OAN>xO!$PQaO,5;rOOQO-E9U-E9UO!$ZQdO,5;qOOQO-E9T-E9TOOQW<<Hk<<HkOOQW<<Ho<<HoO!$eQhO<<HoO!$vQhO,5;pO!%RQ`O,5;pOOQO-E9S-E9SO!%WQdO1G2OO!%bQdO1G/|O!%iQhO1G/sO!%qQ`O,5:^O>vQhO'#DuOOQO1G/y1G/yO!%vQ!bO1G/}OJOQdO'#F[O!&OQ`O7+&UOOQW7+&U7+&UO!&WQ!bO1G/cOOQ[7+$|7+$|O!&cQhO7+$|P!&jQ`O'#FTOOQO,5;y,5;yOOQO-E9]-E9]OOQS1G1d1G1dOOQPG24dG24dO!&oQ`OAN>ZO)YQdO1G1[O!&tQ`O7+'jOOQO1G/x1G/xO!&|Q`O,5:aO!$eQhO7+%iOOQO,5;v,5;vOOQO-E9Y-E9YOOQW<<Ip<<IpOOQ[<<Hh<<HhPOQW,5;o,5;oOOQWG23uG23uO!'RQdO7+&vOOQO1G/{1G/{OOQO<<IT<<IT",stateData:"!'f~O$[OS$]QQ~OWVO^_O`WOcYOdYOl`OmZOp[O!|]O#P^O#VdO#]eO#_fO#agO#dhO#jiO#ljO#okO$WRO$cTO~OQmOWVO^_O`WOcYOdYOl`OmZOp[O!|]O#P^O#VdO#]eO#_fO#agO#dhO#jiO#ljO#okO$WlO$cTO~O$U$oP~P!jO$]qO~O`YXcYXdYXmYXpYXsYX!dYX!|YX#PYX$VYX$c[X~OgYX~P$ZO$WsO~O$cuO~O$cuO`$bXc$bXd$bXm$bXp$bXs$bX!d$bX!|$bX#P$bX$V$bXg$bX~O$WvO~O`xOcyOdyOmzOp{O!||O#P!OO$V}O~Os!RO!d!PO~P&^Of!XO$W!TO$X!UO~O$W!YO~OW!^O$W![O$c!]O~OWVO^_O`WOcYOdYOmZOp[O!|]O#P^O$WRO$cTO~OS!fOc!gOd!gOh!cOs!RO!Y!eO!]!jO!`!kO$Y!bO~On!iO~P(dOQ!uOh!nOp!oOs!pOu!xOw!xO}!vO!n!wO$W!mO$X!sO$g!qO~OS!fOc!gOd!gOh!cO!Y!eO!]!jO!`!kO$Y!bO~Os$rP~P)}Ow!}O!n!wO$W!|O~Ow#PO$W#PO~Oh#SOs!RO#m#UO~O$W#WO~Oc#SX~P$ZOc#ZO~On#[O$U$oXr$oX~O$U$oXr$oX~P!jO$^#_O$_#_O$`#aO~Of#fO$W!TO$X!UO~Os!RO!d!PO~Or$oP~P!jOh#pO~Oh#qO~Oo!uX!y!uX$c!wX~O$W#rO~O$c#tO~Oo#uO!y#vO~O`xOcyOdyOmzOp{O~Os!{a!d!{a!|!{a#P!{a$V!{ag!{a~P-vOs#Oa!d#Oa!|#Oa#P#Oa$V#Oag#Oa~P-vOS!fOc!gOd!gOh!cO!Y!eO!]!jO!`!kO~OR#zOu#zOw#zO$Y#wO$g!qO~P/VOn$QO!U#}O!d$OO~P(dOh$SO~O$Y$UO~Oh#SO~Oh$WO~O`$YOc$YOg$]Ol$YOm$YOn$YO~P)YO`$YOc$YOl$YOm$YOn$YOo$_O~P)YO`$YOc$YOl$YOm$YOn$YOr$aO~P)YOP$bOSvXcvXdvXhvXnvXyvX!YvX!]vX!`vX#XvX#ZvX$YvX!WvXQvX`vXgvXlvXmvXpvXsvXuvXwvX}vX!nvX$WvX$XvX$gvXovXrvX!dvX$UvX$qvX!zvX~Oy$cO#X$dO#Z$eOn$rP~P)}Oh#qOS$eXc$eXd$eXn$eXy$eX!Y$eX!]$eX!`$eX#X$eX#Z$eX$Y$eXQ$eX`$eXg$eXl$eXm$eXp$eXs$eXu$eXw$eX}$eX!n$eX$W$eX$X$eX$g$eXo$eXr$eX!d$eX$U$eX$q$eX!z$eX~Oh$iO~Oh$kO~O!U#}O!d$lOs$rXn$rX~Os!RO~On$oOy$cO~On$pO~Ow$qO!n!wO~Os$rO~Os!RO!U#}O~Os!RO#m$xO~O$W#WOs#pX~O$q$|On#Ra$U#Rar#Ra~P)YOn#}X$U#}Xr#}X~P!jOn#[O$U$oar$oa~O$^#_O$_#_O$`%TO~Oo%VO!y%WO~Os!{i!d!{i!|!{i#P!{i$V!{ig!{i~P-vOs!}i!d!}i!|!}i#P!}i$V!}ig!}i~P-vOs#Oi!d#Oi!|#Oi#P#Oi$V#Oig#Oi~P-vOs#{a!d#{a~P&^Or%XO~Og$nP~P'oOg$dP~P)YOc!SXg!QX!U!QX!W!SX~Oc%aO!W%bO~Og%cO!U#}O~O!U#}OS$TXc$TXd$TXh$TXn$TXs$TX!Y$TX!]$TX!`$TX!d$TX$Y$TX~On%gO!d$OO~P(dO!U#}OS!Xac!Xad!Xah!Xan!Xas!Xa!Y!Xa!]!Xa!`!Xa!d!Xa$Y!Xag!Xa~O$Y%hOg$lP~P/VOR#zOS!fOh%mOu#zOw#zO!Y%nO$Y%lO$g!qO~Oy$cOQ$fX`$fXc$fXg$fXh$fXl$fXm$fXn$fXp$fXs$fXu$fXw$fX}$fX!n$fX$W$fX$X$fX$g$fXo$fXr$fX~O`$YOc$YOg%wOl$YOm$YOn$YO~P)YO`$YOc$YOl$YOm$YOn$YOo%xO~P)YO`$YOc$YOl$YOm$YOn$YOr%yO~P)YOh%{OS#WXc#WXd#WXn#WX!Y#WX!]#WX!`#WX$Y#WX~On%|O~Og&ROw&SO!o&SO~Os$PX!d$PXn$PX~P)}O!d$lOs$ran$ra~On&VO~Or&^O$W&XO$g&WO~Og&_O~P&^Oy$cO!d&cO$q$|On#Ri$U#Rir#Ri~P)YO$p&fO~On#}a$U#}ar#}a~P!jOn#[O$U$oir$oi~O!d&iOg$nX~P&^Og&kO~Oy$cOQ#uXg#uXh#uXp#uXs#uXu#uXw#uX}#uX!d#uX!n#uX$W#uX$X#uX$g#uX~O!d&mOg$dX~P)YOg&oO~Oo&pOy$cO!z&qO~OR#zOu#zOw#zO$Y&sO$g!qO~O!U#}OS$Tac$Tad$Tah$Tan$Tas$Ta!Y$Ta!]$Ta!`$Ta!d$Ta$Y$Ta~Oc!SXg!QX!U!QX!d!QX~O!U#}O!d&uOg$lX~Oc&wO~Og&xO~Oc&yOg!jX!W!SX~OS!fOh&{O~O!U&}O~O!U&}Og$kX~O!W'OO~Og'PO~O$W'QO~On'SO~Oc'TO!U#}O~Og'VOn'UO~Og'YO~O!U#}Os$Pa!d$Pan$Pa~OP$bOsvX!dvXgvX~O$g&WOs#gX!d#gX~Os!RO!d'[O~Or'`O$W&XO$g&WO~Oy$cOQ#|Xh#|Xn#|Xp#|Xs#|Xu#|Xw#|X}#|X!d#|X!n#|X$U#|X$W#|X$X#|X$g#|X$q#|Xr#|X~O!d&cO$q$|On#Rq$U#Rqr#Rq~P)YOo'eOy$cO!z'fO~Og#zX!d#zX~P'oO!d&iOg$na~Og#yX!d#yX~P)YO!d&mOg$da~Oo'eO~Og'kO~P)YOg'lO!W'mO~O$Y%hOg#xX!d#xX~P/VO!d&uOg$la~Og'sO~OS!fOh'uO~O`'xOg'zO~OS#wac#wad#wah#wa!Y#wa!]#wa!`#wa$Y#wa~Og'|O~P! xOg'|On'}O~Oy$cOQ#|ah#|an#|ap#|as#|au#|aw#|a}#|a!d#|a!n#|a$U#|a$W#|a$X#|a$g#|a$q#|ar#|a~Oo(SO~Og#za!d#za~P&^Og#ya!d#ya~P)YOR#zOu#zOw#zO$Y&sO$g&WO~O!U#}Og#xa!d#xa~Oc(UO~O!d&uOg$li~P)YOg!ji~P)YOg!ai!U!hi~Og(WO~O!W(YOg!ki~O`'xOg(]O~Oy$cOg!Pin!Pi~Og(^O~P! xOn(_O~Og(`O~O!d&uOg$lq~Og(bO~Og#xq!d#xq~P)YO$[!o$]$g`$gy#P~",goto:"7[$sPPPPP$tP$wP%Q%d%Q%v&YP%QP&`%QPP&fPPP&l&v&vPPPPP&vPP&vP'fP&vP&v(i&vP)X)[)b)b)t)bP)bP)bP)b)bP*a)bP*m*s+cP*m+f*m+i+`+o+o)b+uPP,k,q%Q,w%Q,},}-T-XPP%QP%Q%QP-_.Z.h.o$wP.xP.{P$wP$wP$wP/R$wP/U/X/[/c$wP$wPP$wP/h$wP/k/q0Q0l0z1Q1[1b1h1n1t2O2U2[2b2h2nPPPPPPPPPPP2t2}P3s3v4zP5S5|6c6o6u6o6x6{PP7RRrQ_aOPco!R#[%Pq_OP]^co|}!O!P!R#S#[#p%P&iqSOP]^co|}!O!P!R#S#[#p%P&iqUOP]^co|}!O!P!R#S#[#p%P&iQtTR#buQwWR#cxQ!VYR#dyQ#d!XS$h!t!uR%U#f!Z!xdf!n!o!p#Z#q#v$[$^$`$c${%W%]%a&c&d&m&r&w&y'T'i'q'r(U(a!Y!xdf!n!o!p#Z#q#v$[$^$`$c${%W%]%a&c&d&m&r&w&y'T'i'q'r(U(ab#z!c$W%b%m&{'O'm'u(YU&Z$r&]'[R'Z&Y!Z!tdf!n!o!p#Z#q#v$[$^$`$c${%W%]%a&c&d&m&r&w&y'T'i'q'r(U(aR$j!vQ&P$iR'W&Qq!h`ei!c!d!e!r#}$O$P$S$g$i$l&Q&uQ#x!cQ%j$SW%r$W%m&{'uQ&t%bQ'o&uQ'w'OQ(T'mR(c(YQ#VjQ$V!jQ$v#UR&a$xX%q$W%m&{'up!h`ei!c!d!e!r#}$O$P$S$g$i$l&Q&uW%p$W%m&{'uQ&|%nR'v&}R$T!fR&|%nX%o$W%m&{'uX%s$W%m&{'u!Y!xdf!n!o!p#Z#q#v$[$^$`$c${%W%]%a&c&d&m&r&w&y'T'i'q'r(U(aQ!}gR$q#OQ!WYR#eyQ#d!WR%U#eQ!ZZR#gzQ!_[R#h{T!^[{Q#s!]R%_#tQ!SXQ!i`Q#TjQ#n!QQ$Q!dQ$n!zQ$t#RQ$w#VQ$z#YQ%g$PQ&`$vQ'^&[Q'a&aR(R']SnP!RQ#^oQ%O#[R&g%PZmPo!R#[%PQ$}#ZQ&e${R'd&dR$g!rQ'R%{R(Z'xR#OgR#QhR$s#QS&[$r&]R(P'[V&Y$r&]'[R#YkQ#`qR%S#`QcOSoP!RU!lco%PR%P#[Q%]#q[&l%]&r'i'q'r(aQ&r%aQ'i&mQ'q&wQ'r&yR(a(UQ$[!nQ$^!oQ$`!pV%v$[$^$`Q&Q$iR'X&QQ&v%iS'p&v(VR(V'qQ&n%]R'j&nQ&j%YR'h&jQ!QXR#m!QQ&d${R'c&dQ#]nS%Q#]%RR%R#^Q'y'RR(['yQ$m!yR&U$mQ&]$rR'_&]Q']&[R(Q']Q#XkR$y#XQ$P!dR%f$P_bOPco!R#[%P^XOPco!R#[%PQ!`]Q!a^Q#i|Q#j}Q#k!OQ#l!PQ$u#SQ%Y#pR'g&iR%^#qQ!rdQ!{f[$X!n!o!p$[$^$`Q${#Zh%[#q%]%a&m&r&w&y'i'q'r(U(aQ%`#vQ%z$cS&b${&dQ&h%WQ'b&cR'{'T]$Z!n!o!p$[$^$`Q!d`U!ye!r$gQ#RiQ#y!cS#|!d$PQ$R!eQ%d#}Q%e$OQ%i$SS&O$i&QQ&T$lR'n&uQ#{!cW%r$W%m&{'uQ&t%bQ'w'OQ(T'mR(c(YQ%u$WQ&z%mQ't&{R(X'uX%t$W%m&{'uR%k$SR%Z#pQpPR#o!RQ!zeQ$f!rR%}$g",nodeNames:"⚠ Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NamespacedTagSelector NamespaceName TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector StyleQuery style ParenthesedQuery CallQuery ArgList , UnaryQuery ParenthesedQuery BinaryQuery ParenthesedQuery ParenthesedQuery StyleFeature StyleRange PseudoQuery CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName NamespacedAttribute NamespaceName AttributeName MatchOp MatchFlag ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to FontFeatureStatement font-feature-values FontName AtRule Styles",maxTerm:172,nodeProps:[["isolate",-2,5,39,""],["openedBy",23,"(",31,"[",34,"{"],["closedBy",24,")",32,"]",35,"}"]],propSources:[Pge],skippedNodes:[0,5,127],repeatNodeCount:17,tokenData:"K`~R!bOX%ZX^&R^p%Zpq&Rqr)ers)vst+jtu2Xuv%Zvw3Rwx3dxy5Ryz5dz{5i{|6S|}:u}!O;W!O!P;u!P!Q<^!Q![=V![!]>Q!]!^>|!^!_?_!_!`@Z!`!a@n!a!b%Z!b!cAo!c!k%Z!k!lC|!l!u%Z!u!vC|!v!}%Z!}#OD_#O#P%Z#P#QDp#Q#R2X#R#]%Z#]#^ER#^#g%Z#g#hC|#h#o%Z#o#pIf#p#qIw#q#rJ`#r#sJq#s#y%Z#y#z&R#z$f%Z$f$g&R$g#BY%Z#BY#BZ&R#BZ$IS%Z$IS$I_&R$I_$I|%Z$I|$JO&R$JO$JT%Z$JT$JU&R$JU$KV%Z$KV$KW&R$KW&FU%Z&FU&FV&R&FV;'S%Z;'S;=`KY<%lO%Z`%^SOy%jz;'S%j;'S;=`%{<%lO%j`%oS!o`Oy%jz;'S%j;'S;=`%{<%lO%j`&OP;=`<%l%j~&Wh$[~OX%jX^'r^p%jpq'rqy%jz#y%j#y#z'r#z$f%j$f$g'r$g#BY%j#BY#BZ'r#BZ$IS%j$IS$I_'r$I_$I|%j$I|$JO'r$JO$JT%j$JT$JU'r$JU$KV%j$KV$KW'r$KW&FU%j&FU&FV'r&FV;'S%j;'S;=`%{<%lO%j~'yh$[~!o`OX%jX^'r^p%jpq'rqy%jz#y%j#y#z'r#z$f%j$f$g'r$g#BY%j#BY#BZ'r#BZ$IS%j$IS$I_'r$I_$I|%j$I|$JO'r$JO$JT%j$JT$JU'r$JU$KV%j$KV$KW'r$KW&FU%j&FU&FV'r&FV;'S%j;'S;=`%{<%lO%jj)jS$qYOy%jz;'S%j;'S;=`%{<%lO%j~)yWOY)vZr)vrs*cs#O)v#O#P*h#P;'S)v;'S;=`+d<%lO)v~*hOw~~*kRO;'S)v;'S;=`*t;=`O)v~*wXOY)vZr)vrs*cs#O)v#O#P*h#P;'S)v;'S;=`+d;=`<%l)v<%lO)v~+gP;=`<%l)vj+oYmYOy%jz!Q%j!Q![,_![!c%j!c!i,_!i#T%j#T#Z,_#Z;'S%j;'S;=`%{<%lO%jj,dY!o`Oy%jz!Q%j!Q![-S![!c%j!c!i-S!i#T%j#T#Z-S#Z;'S%j;'S;=`%{<%lO%jj-XY!o`Oy%jz!Q%j!Q![-w![!c%j!c!i-w!i#T%j#T#Z-w#Z;'S%j;'S;=`%{<%lO%jj.OYuY!o`Oy%jz!Q%j!Q![.n![!c%j!c!i.n!i#T%j#T#Z.n#Z;'S%j;'S;=`%{<%lO%jj.uYuY!o`Oy%jz!Q%j!Q![/e![!c%j!c!i/e!i#T%j#T#Z/e#Z;'S%j;'S;=`%{<%lO%jj/jY!o`Oy%jz!Q%j!Q![0Y![!c%j!c!i0Y!i#T%j#T#Z0Y#Z;'S%j;'S;=`%{<%lO%jj0aYuY!o`Oy%jz!Q%j!Q![1P![!c%j!c!i1P!i#T%j#T#Z1P#Z;'S%j;'S;=`%{<%lO%jj1UY!o`Oy%jz!Q%j!Q![1t![!c%j!c!i1t!i#T%j#T#Z1t#Z;'S%j;'S;=`%{<%lO%jj1{SuY!o`Oy%jz;'S%j;'S;=`%{<%lO%jd2[UOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%jd2uS!yS!o`Oy%jz;'S%j;'S;=`%{<%lO%jb3WS^QOy%jz;'S%j;'S;=`%{<%lO%j~3gWOY3dZw3dwx*cx#O3d#O#P4P#P;'S3d;'S;=`4{<%lO3d~4SRO;'S3d;'S;=`4];=`O3d~4`XOY3dZw3dwx*cx#O3d#O#P4P#P;'S3d;'S;=`4{;=`<%l3d<%lO3d~5OP;=`<%l3dj5WShYOy%jz;'S%j;'S;=`%{<%lO%j~5iOg~n5pUWQyWOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%jj6ZWyW#PQOy%jz!O%j!O!P6s!P!Q%j!Q![9x![;'S%j;'S;=`%{<%lO%jj6xU!o`Oy%jz!Q%j!Q![7[![;'S%j;'S;=`%{<%lO%jj7cY!o`$gYOy%jz!Q%j!Q![7[![!g%j!g!h8R!h#X%j#X#Y8R#Y;'S%j;'S;=`%{<%lO%jj8WY!o`Oy%jz{%j{|8v|}%j}!O8v!O!Q%j!Q![9_![;'S%j;'S;=`%{<%lO%jj8{U!o`Oy%jz!Q%j!Q![9_![;'S%j;'S;=`%{<%lO%jj9fU!o`$gYOy%jz!Q%j!Q![9_![;'S%j;'S;=`%{<%lO%jj:P[!o`$gYOy%jz!O%j!O!P7[!P!Q%j!Q![9x![!g%j!g!h8R!h#X%j#X#Y8R#Y;'S%j;'S;=`%{<%lO%jj:zS!dYOy%jz;'S%j;'S;=`%{<%lO%jj;]WyWOy%jz!O%j!O!P6s!P!Q%j!Q![9x![;'S%j;'S;=`%{<%lO%jj;zU`YOy%jz!Q%j!Q![7[![;'S%j;'S;=`%{<%lO%j~<cTyWOy%jz{<r{;'S%j;'S;=`%{<%lO%j~<yS!o`$]~Oy%jz;'S%j;'S;=`%{<%lO%jj=[[$gYOy%jz!O%j!O!P7[!P!Q%j!Q![9x![!g%j!g!h8R!h#X%j#X#Y8R#Y;'S%j;'S;=`%{<%lO%jj>VUcYOy%jz![%j![!]>i!];'S%j;'S;=`%{<%lO%jj>pSdY!o`Oy%jz;'S%j;'S;=`%{<%lO%jj?RSnYOy%jz;'S%j;'S;=`%{<%lO%jh?dU!WWOy%jz!_%j!_!`?v!`;'S%j;'S;=`%{<%lO%jh?}S!WW!o`Oy%jz;'S%j;'S;=`%{<%lO%jl@bS!WW!ySOy%jz;'S%j;'S;=`%{<%lO%jj@uV!|Q!WWOy%jz!_%j!_!`?v!`!aA[!a;'S%j;'S;=`%{<%lO%jbAcS!|Q!o`Oy%jz;'S%j;'S;=`%{<%lO%jjArYOy%jz}%j}!OBb!O!c%j!c!}CP!}#T%j#T#oCP#o;'S%j;'S;=`%{<%lO%jjBgW!o`Oy%jz!c%j!c!}CP!}#T%j#T#oCP#o;'S%j;'S;=`%{<%lO%jjCW[lY!o`Oy%jz}%j}!OCP!O!Q%j!Q![CP![!c%j!c!}CP!}#T%j#T#oCP#o;'S%j;'S;=`%{<%lO%jhDRS!zWOy%jz;'S%j;'S;=`%{<%lO%jjDdSpYOy%jz;'S%j;'S;=`%{<%lO%jnDuSo^Oy%jz;'S%j;'S;=`%{<%lO%jjEWU!zWOy%jz#a%j#a#bEj#b;'S%j;'S;=`%{<%lO%jbEoU!o`Oy%jz#d%j#d#eFR#e;'S%j;'S;=`%{<%lO%jbFWU!o`Oy%jz#c%j#c#dFj#d;'S%j;'S;=`%{<%lO%jbFoU!o`Oy%jz#f%j#f#gGR#g;'S%j;'S;=`%{<%lO%jbGWU!o`Oy%jz#h%j#h#iGj#i;'S%j;'S;=`%{<%lO%jbGoU!o`Oy%jz#T%j#T#UHR#U;'S%j;'S;=`%{<%lO%jbHWU!o`Oy%jz#b%j#b#cHj#c;'S%j;'S;=`%{<%lO%jbHoU!o`Oy%jz#h%j#h#iIR#i;'S%j;'S;=`%{<%lO%jbIYS$pQ!o`Oy%jz;'S%j;'S;=`%{<%lO%jjIkSsYOy%jz;'S%j;'S;=`%{<%lO%jfI|U$cUOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%jjJeSrYOy%jz;'S%j;'S;=`%{<%lO%jfJvU#PQOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%j`K]P;=`<%l%Z",tokenizers:[Ege,Tge,wge,kge,1,2,3,4,new KO("m~RRYZ[z{a~~g~aO$_~~dP!P!Qg~lO$`~~",28,152)],topRules:{StyleSheet:[0,6],Styles:[1,126]},dynamicPrecedences:{94:1},specialized:[{term:147,get:t=>Age[t]||-1},{term:148,get:t=>$ge[t]||-1},{term:4,get:t=>Ige[t]||-1},{term:28,get:t=>Rge[t]||-1},{term:146,get:t=>Mge[t]||-1}],tokenPrec:2405});let mb=null;function gb(){if(!mb&&typeof document=="object"&&document.body){let{style:t}=document.body,e=[],n=new Set;for(let i in t)i!="cssText"&&i!="cssFloat"&&typeof t[i]=="string"&&(/[A-Z]/.test(i)&&(i=i.replace(/[A-Z]/g,r=>"-"+r.toLowerCase())),n.has(i)||(e.push(i),n.add(i)));mb=e.sort().map(i=>({type:"property",label:i,apply:i+": "}))}return mb||[]}const wI=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(t=>({type:"class",label:t})),kI=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(t=>({type:"keyword",label:t})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(t=>({type:"constant",label:t}))),Lge=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(t=>({type:"type",label:t})),Dge=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(t=>({type:"keyword",label:t})),$o=/^(\w[\w-]*|-\w[\w-]*|)$/,Qge=/^-(-[\w-]*)?$/;function Vge(t,e){var n;if((t.name=="("||t.type.isError)&&(t=t.parent||t),t.name!="ArgList")return!1;let i=(n=t.parent)===null||n===void 0?void 0:n.firstChild;return(i==null?void 0:i.name)!="Callee"?!1:e.sliceString(i.from,i.to)=="var"}const EI=new mL,Bge=["Declaration"];function Fge(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function UB(t,e,n){if(e.to-e.from>4096){let i=EI.get(e);if(i)return i;let r=[],s=new Set,o=e.cursor(Xt.IncludeAnonymous);if(o.firstChild())do for(let a of UB(t,o.node,n))s.has(a.label)||(s.add(a.label),r.push(a));while(o.nextSibling());return EI.set(e,r),r}else{let i=[],r=new Set;return e.cursor().iterate(s=>{var o;if(n(s)&&s.matchContext(Bge)&&((o=s.node.nextSibling)===null||o===void 0?void 0:o.name)==":"){let a=t.sliceString(s.from,s.to);r.has(a)||(r.add(a),i.push({label:a,type:"variable"}))}}),i}}const qB=t=>e=>{let{state:n,pos:i}=e,r=sn(n).resolveInner(i,-1),s=r.type.isError&&r.from==r.to-1&&n.doc.sliceString(r.from,r.to)=="-";if(r.name=="PropertyName"||(s||r.name=="TagName")&&/^(Block|Styles)$/.test(r.resolve(r.to).name))return{from:r.from,options:gb(),validFor:$o};if(r.name=="ValueName")return{from:r.from,options:kI,validFor:$o};if(r.name=="PseudoClassName")return{from:r.from,options:wI,validFor:$o};if(t(r)||(e.explicit||s)&&Vge(r,n.doc))return{from:t(r)||s?r.from:i,options:UB(n.doc,Fge(r),t),validFor:Qge};if(r.name=="TagName"){for(let{parent:l}=r;l;l=l.parent)if(l.name=="Block")return{from:r.from,options:gb(),validFor:$o};return{from:r.from,options:Lge,validFor:$o}}if(r.name=="AtKeyword")return{from:r.from,options:Dge,validFor:$o};if(!e.explicit)return null;let o=r.resolve(i),a=o.childBefore(i);return a&&a.name==":"&&o.name=="PseudoClassSelector"?{from:i,options:wI,validFor:$o}:a&&a.name==":"&&o.name=="Declaration"||o.name=="ArgList"?{from:i,options:kI,validFor:$o}:o.name=="Block"||o.name=="Styles"?{from:i,options:gb(),validFor:$o}:null},YB=qB(t=>t.name=="VariableName"),wp=gh.define({name:"css",parser:Nge.configure({props:[df.add({Declaration:d0()}),pf.add({"Block KeyframeList":qD})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function GB(){return new xh(wp,wp.data.of({autocomplete:YB}))}const jge=Object.freeze(Object.defineProperty({__proto__:null,css:GB,cssCompletionSource:YB,cssLanguage:wp,defineCSSCompletionSource:qB},Symbol.toStringTag,{value:"Module"})),Zge=316,zge=317,TI=1,Xge=2,Wge=3,Hge=4,Uge=318,qge=320,Yge=321,Gge=5,Kge=6,Jge=0,sC=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],KB=125,e0e=59,oC=47,t0e=42,n0e=43,i0e=45,r0e=60,s0e=44,o0e=63,a0e=46,l0e=91,u0e=new RB({start:!1,shift(t,e){return e==Gge||e==Kge||e==qge?t:e==Yge},strict:!1}),c0e=new Dr((t,e)=>{let{next:n}=t;(n==KB||n==-1||e.context)&&t.acceptToken(Uge)},{contextual:!0,fallback:!0}),h0e=new Dr((t,e)=>{let{next:n}=t,i;sC.indexOf(n)>-1||n==oC&&((i=t.peek(1))==oC||i==t0e)||n!=KB&&n!=e0e&&n!=-1&&!e.context&&t.acceptToken(Zge)},{contextual:!0}),f0e=new Dr((t,e)=>{t.next==l0e&&!e.context&&t.acceptToken(zge)},{contextual:!0}),d0e=new Dr((t,e)=>{let{next:n}=t;if(n==n0e||n==i0e){if(t.advance(),n==t.next){t.advance();let i=!e.context&&e.canShift(TI);t.acceptToken(i?TI:Xge)}}else n==o0e&&t.peek(1)==a0e&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(Wge))},{contextual:!0});function Ob(t,e){return t>=65&&t<=90||t>=97&&t<=122||t==95||t>=192||!e&&t>=48&&t<=57}const p0e=new Dr((t,e)=>{if(t.next!=r0e||!e.dialectEnabled(Jge)||(t.advance(),t.next==oC))return;let n=0;for(;sC.indexOf(t.next)>-1;)t.advance(),n++;if(Ob(t.next,!0)){for(t.advance(),n++;Ob(t.next,!1);)t.advance(),n++;for(;sC.indexOf(t.next)>-1;)t.advance(),n++;if(t.next==s0e)return;for(let i=0;;i++){if(i==7){if(!Ob(t.next,!0))return;break}if(t.next!="extends".charCodeAt(i))break;t.advance(),n++}}t.acceptToken(Hge,-n)}),m0e=ff({"get set async static":Q.modifier,"for while do if else switch try catch finally return throw break continue default case defer":Q.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":Q.operatorKeyword,"let var const using function class extends":Q.definitionKeyword,"import export from":Q.moduleKeyword,"with debugger new":Q.keyword,TemplateString:Q.special(Q.string),super:Q.atom,BooleanLiteral:Q.bool,this:Q.self,null:Q.null,Star:Q.modifier,VariableName:Q.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":Q.function(Q.variableName),VariableDefinition:Q.definition(Q.variableName),Label:Q.labelName,PropertyName:Q.propertyName,PrivatePropertyName:Q.special(Q.propertyName),"CallExpression/MemberExpression/PropertyName":Q.function(Q.propertyName),"FunctionDeclaration/VariableDefinition":Q.function(Q.definition(Q.variableName)),"ClassDeclaration/VariableDefinition":Q.definition(Q.className),"NewExpression/VariableName":Q.className,PropertyDefinition:Q.definition(Q.propertyName),PrivatePropertyDefinition:Q.definition(Q.special(Q.propertyName)),UpdateOp:Q.updateOperator,"LineComment Hashbang":Q.lineComment,BlockComment:Q.blockComment,Number:Q.number,String:Q.string,Escape:Q.escape,ArithOp:Q.arithmeticOperator,LogicOp:Q.logicOperator,BitOp:Q.bitwiseOperator,CompareOp:Q.compareOperator,RegExp:Q.regexp,Equals:Q.definitionOperator,Arrow:Q.function(Q.punctuation),": Spread":Q.punctuation,"( )":Q.paren,"[ ]":Q.squareBracket,"{ }":Q.brace,"InterpolationStart InterpolationEnd":Q.special(Q.brace),".":Q.derefOperator,", ;":Q.separator,"@":Q.meta,TypeName:Q.typeName,TypeDefinition:Q.definition(Q.typeName),"type enum interface implements namespace module declare":Q.definitionKeyword,"abstract global Privacy readonly override":Q.modifier,"is keyof unique infer asserts":Q.operatorKeyword,JSXAttributeValue:Q.attributeValue,JSXText:Q.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":Q.angleBracket,"JSXIdentifier JSXNameSpacedName":Q.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":Q.attributeName,"JSXBuiltin/JSXIdentifier":Q.standard(Q.tagName)}),g0e={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},O0e={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},x0e={__proto__:null,"<":193},y0e=_h.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JrO6[Q!0MxO'#JsO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO9XQMhO'#F|O9`Q`O'#F{OOQ!0Lf'#Js'#JsOOQ!0Lb'#Jr'#JrO9eQ`O'#GwOOQ['#K_'#K_O9pQ`O'#IYO9uQ!0LrO'#IZOOQ['#J`'#J`OOQ['#I_'#I_Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`O'#GsO:dQMhO'#CoO:rQ`O'#EnO:}Q`O'#EyO;hQMhO'#FeO;xQ`O'#GsOOQO'#K`'#K`O;}Q`O'#K`O<]Q`O'#G{O<]Q`O'#G|O<]Q`O'#HOO9kQ`O'#HRO=SQ`O'#HUO>kQ`O'#CeO>{Q`O'#HcO?TQ`O'#HiO?TQ`O'#HkO`QlO'#HmO?TQ`O'#HoO?TQ`O'#HrO?YQ`O'#HxO?_Q!0LsO'#IOO%[QlO'#IQO?jQ!0LsO'#ISO?uQ!0LsO'#IUO9uQ!0LrO'#IWO@QQ!0MxO'#CiOASQpO'#DlQOQ`OOO%[QlO'#EQOAjQ`O'#ETO:dQMhO'#EnOAuQ`O'#EnOBQQ!bO'#FeOOQ['#Cg'#CgOOQ!0Lb'#Dq'#DqOOQ!0Lb'#Jv'#JvO%[QlO'#JvOOQO'#Jy'#JyOOQO'#Ih'#IhOCQQpO'#EgOOQ!0Lb'#Ef'#EfOOQ!0Lb'#J}'#J}OC|Q!0MSO'#EgODWQpO'#EWOOQO'#Jx'#JxODlQpO'#JyOEyQpO'#EWODWQpO'#EgPFWO&2DjO'#CbPOOO)CD})CD}OOOO'#I`'#I`OFcO#tO,59UOOQ!0Lh,59U,59UOOOO'#Ia'#IaOFqO&jO,59UOGPQ!L^O'#DcOOOO'#Ic'#IcOGWO#@ItO,59{OOQ!0Lf,59{,59{OGfQlO'#IdOGyQ`O'#JtOIxQ!fO'#JtO+}QlO'#JtOJPQ`O,5:ROJgQ`O'#EpOJtQ`O'#KTOKPQ`O'#KSOKPQ`O'#KSOKXQ`O,5;^OK^Q`O'#KROOQ!0Ln,5:^,5:^OKeQlO,5:^OMcQ!0MxO,5:fONSQ`O,5:nONmQ!0LrO'#KQONtQ`O'#KPO9eQ`O'#KPO! YQ`O'#KPO! bQ`O,5;]O! gQ`O'#KPO!#lQ!fO'#JsOOQ!0Lh'#Ci'#CiO%[QlO'#ESO!$[Q!fO,5:sOOQS'#Jz'#JzOOQO-E<j-E<jO9kQ`O,5=_O!$rQ`O,5=_O!$wQlO,5;ZO!&zQMhO'#EkO!(eQ`O,5;ZO!(jQlO'#DyO!(tQpO,5;dO!(|QpO,5;dO%[QlO,5;dOOQ['#FT'#FTOOQ['#FV'#FVO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eOOQ['#FZ'#FZO!)[QlO,5;tOOQ!0Lf,5;y,5;yOOQ!0Lf,5;z,5;zOOQ!0Lf,5;|,5;|O%[QlO'#IpO!+_Q!0LrO,5<iO%[QlO,5;eO!&zQMhO,5;eO!+|QMhO,5;eO!-nQMhO'#E^O%[QlO,5;wOOQ!0Lf,5;{,5;{O!-uQ,UO'#FjO!.rQ,UO'#KXO!.^Q,UO'#KXO!.yQ,UO'#KXOOQO'#KX'#KXO!/_Q,UO,5<SOOOW,5<`,5<`O!/pQlO'#FvOOOW'#Io'#IoO7VO7dO,5<QO!/wQ,UO'#FxOOQ!0Lf,5<Q,5<QO!0hQ$IUO'#CyOOQ!0Lh'#C}'#C}O!0{O#@ItO'#DRO!1iQMjO,5<eO!1pQ`O,5<hO!3YQ(CWO'#GXO!3jQ`O'#GYO!3oQ`O'#GYO!5_Q(CWO'#G^O!6dQpO'#GbOOQO'#Gn'#GnO!,TQMhO'#GmOOQO'#Gp'#GpO!,TQMhO'#GoO!7VQ$IUO'#JlOOQ!0Lh'#Jl'#JlO!7aQ`O'#JkO!7oQ`O'#JjO!7wQ`O'#CuOOQ!0Lh'#C{'#C{O!8YQ`O'#C}OOQ!0Lh'#DV'#DVOOQ!0Lh'#DX'#DXO!8_Q`O,5<eO1SQ`O'#DZO!,TQMhO'#GPO!,TQMhO'#GRO!8gQ`O'#GTO!8lQ`O'#GUO!3oQ`O'#G[O!,TQMhO'#GaO<]Q`O'#JkO!8qQ`O'#EqO!9`Q`O,5<gOOQ!0Lb'#Cr'#CrO!9hQ`O'#ErO!:bQpO'#EsOOQ!0Lb'#KR'#KRO!:iQ!0LrO'#KaO9uQ!0LrO,5=cO`QlO,5>tOOQ['#Jh'#JhOOQ[,5>u,5>uOOQ[-E<]-E<]O!<hQ!0MxO,5:bO!:]QpO,5:`O!?RQ!0MxO,5:jO%[QlO,5:jO!AiQ!0MxO,5:lOOQO,5@z,5@zO!BYQMhO,5=_O!BhQ!0LrO'#JiO9`Q`O'#JiO!ByQ!0LrO,59ZO!CUQpO,59ZO!C^QMhO,59ZO:dQMhO,59ZO!CiQ`O,5;ZO!CqQ`O'#HbO!DVQ`O'#KdO%[QlO,5;}O!:]QpO,5<PO!D_Q`O,5=zO!DdQ`O,5=zO!DiQ`O,5=zO!DwQ`O,5=zO9uQ!0LrO,5=zO<]Q`O,5=jOOQO'#Cy'#CyO!EOQpO,5=gO!EWQMhO,5=hO!EcQ`O,5=jO!EhQ!bO,5=mO!EpQ`O'#K`O?YQ`O'#HWO9kQ`O'#HYO!EuQ`O'#HYO:dQMhO'#H[O!EzQ`O'#H[OOQ[,5=p,5=pO!FPQ`O'#H]O!FbQ`O'#CoO!FgQ`O,59PO!FqQ`O,59PO!HvQlO,59POOQ[,59P,59PO!IWQ!0LrO,59PO%[QlO,59PO!KcQlO'#HeOOQ['#Hf'#HfOOQ['#Hg'#HgO`QlO,5=}O!KyQ`O,5=}O`QlO,5>TO`QlO,5>VO!LOQ`O,5>XO`QlO,5>ZO!LTQ`O,5>^O!LYQlO,5>dOOQ[,5>j,5>jO%[QlO,5>jO9uQ!0LrO,5>lOOQ[,5>n,5>nO#!dQ`O,5>nOOQ[,5>p,5>pO#!dQ`O,5>pOOQ[,5>r,5>rO##QQpO'#D_O%[QlO'#JvO##sQpO'#JvO##}QpO'#DmO#$`QpO'#DmO#&qQlO'#DmO#&xQ`O'#JuO#'QQ`O,5:WO#'VQ`O'#EtO#'eQ`O'#KUO#'mQ`O,5;_O#'rQpO'#DmO#(PQpO'#EVOOQ!0Lf,5:o,5:oO%[QlO,5:oO#(WQ`O,5:oO?YQ`O,5;YO!CUQpO,5;YO!C^QMhO,5;YO:dQMhO,5;YO#(`Q`O,5@bO#(eQ07dO,5:sOOQO-E<f-E<fO#)kQ!0MSO,5;RODWQpO,5:rO#)uQpO,5:rODWQpO,5;RO!ByQ!0LrO,5:rOOQ!0Lb'#Ej'#EjOOQO,5;R,5;RO%[QlO,5;RO#*SQ!0LrO,5;RO#*_Q!0LrO,5;RO!CUQpO,5:rOOQO,5;X,5;XO#*mQ!0LrO,5;RPOOO'#I^'#I^P#+RO&2DjO,58|POOO,58|,58|OOOO-E<^-E<^OOQ!0Lh1G.p1G.pOOOO-E<_-E<_OOOO,59},59}O#+^Q!bO,59}OOOO-E<a-E<aOOQ!0Lf1G/g1G/gO#+cQ!fO,5?OO+}QlO,5?OOOQO,5?U,5?UO#+mQlO'#IdOOQO-E<b-E<bO#+zQ`O,5@`O#,SQ!fO,5@`O#,ZQ`O,5@nOOQ!0Lf1G/m1G/mO%[QlO,5@oO#,cQ`O'#IjOOQO-E<h-E<hO#,ZQ`O,5@nOOQ!0Lb1G0x1G0xOOQ!0Ln1G/x1G/xOOQ!0Ln1G0Y1G0YO%[QlO,5@lO#,wQ!0LrO,5@lO#-YQ!0LrO,5@lO#-aQ`O,5@kO9eQ`O,5@kO#-iQ`O,5@kO#-wQ`O'#ImO#-aQ`O,5@kOOQ!0Lb1G0w1G0wO!(tQpO,5:uO!)PQpO,5:uOOQS,5:w,5:wO#.iQdO,5:wO#.qQMhO1G2yO9kQ`O1G2yOOQ!0Lf1G0u1G0uO#/PQ!0MxO1G0uO#0UQ!0MvO,5;VOOQ!0Lh'#GW'#GWO#0rQ!0MzO'#JlO!$wQlO1G0uO#2}Q!fO'#JwO%[QlO'#JwO#3XQ`O,5:eOOQ!0Lh'#D_'#D_OOQ!0Lf1G1O1G1OO%[QlO1G1OOOQ!0Lf1G1f1G1fO#3^Q`O1G1OO#5rQ!0MxO1G1PO#5yQ!0MxO1G1PO#8aQ!0MxO1G1PO#8hQ!0MxO1G1PO#;OQ!0MxO1G1PO#=fQ!0MxO1G1PO#=mQ!0MxO1G1PO#=tQ!0MxO1G1PO#@[Q!0MxO1G1PO#@cQ!0MxO1G1PO#BpQ?MtO'#CiO#DkQ?MtO1G1`O#DrQ?MtO'#JsO#EVQ!0MxO,5?[OOQ!0Lb-E<n-E<nO#GdQ!0MxO1G1PO#HaQ!0MzO1G1POOQ!0Lf1G1P1G1PO#IdQMjO'#J|O#InQ`O,5:xO#IsQ!0MxO1G1cO#JgQ,UO,5<WO#JoQ,UO,5<XO#JwQ,UO'#FoO#K`Q`O'#FnOOQO'#KY'#KYOOQO'#In'#InO#KeQ,UO1G1nOOQ!0Lf1G1n1G1nOOOW1G1y1G1yO#KvQ?MtO'#JrO#LQQ`O,5<bO!)[QlO,5<bOOOW-E<m-E<mOOQ!0Lf1G1l1G1lO#LVQpO'#KXOOQ!0Lf,5<d,5<dO#L_QpO,5<dO#LdQMhO'#DTOOOO'#Ib'#IbO#LkO#@ItO,59mOOQ!0Lh,59m,59mO%[QlO1G2PO!8lQ`O'#IrO#LvQ`O,5<zOOQ!0Lh,5<w,5<wO!,TQMhO'#IuO#MdQMjO,5=XO!,TQMhO'#IwO#NVQMjO,5=ZO!&zQMhO,5=]OOQO1G2S1G2SO#NaQ!dO'#CrO#NtQ(CWO'#ErO$ |QpO'#GbO$!dQ!dO,5<sO$!kQ`O'#K[O9eQ`O'#K[O$!yQ`O,5<uO$#aQ!dO'#C{O!,TQMhO,5<tO$#kQ`O'#GZO$$PQ`O,5<tO$$UQ!dO'#GWO$$cQ!dO'#K]O$$mQ`O'#K]O!&zQMhO'#K]O$$rQ`O,5<xO$$wQlO'#JvO$%RQpO'#GcO#$`QpO'#GcO$%dQ`O'#GgO!3oQ`O'#GkO$%iQ!0LrO'#ItO$%tQpO,5<|OOQ!0Lp,5<|,5<|O$%{QpO'#GcO$&YQpO'#GdO$&kQpO'#GdO$&pQMjO,5=XO$'QQMjO,5=ZOOQ!0Lh,5=^,5=^O!,TQMhO,5@VO!,TQMhO,5@VO$'bQ`O'#IyO$'vQ`O,5@UO$(OQ`O,59aOOQ!0Lh,59i,59iO$(TQ`O,5@VO$)TQ$IYO,59uOOQ!0Lh'#Jp'#JpO$)vQMjO,5<kO$*iQMjO,5<mO@zQ`O,5<oOOQ!0Lh,5<p,5<pO$*sQ`O,5<vO$*xQMjO,5<{O$+YQ`O'#KPO!$wQlO1G2RO$+_Q`O1G2RO9eQ`O'#KSO9eQ`O'#EtO%[QlO'#EtO9eQ`O'#I{O$+dQ!0LrO,5@{OOQ[1G2}1G2}OOQ[1G4`1G4`OOQ!0Lf1G/|1G/|OOQ!0Lf1G/z1G/zO$-fQ!0MxO1G0UOOQ[1G2y1G2yO!&zQMhO1G2yO%[QlO1G2yO#.tQ`O1G2yO$/jQMhO'#EkOOQ!0Lb,5@T,5@TO$/wQ!0LrO,5@TOOQ[1G.u1G.uO!ByQ!0LrO1G.uO!CUQpO1G.uO!C^QMhO1G.uO$0YQ`O1G0uO$0_Q`O'#CiO$0jQ`O'#KeO$0rQ`O,5=|O$0wQ`O'#KeO$0|Q`O'#KeO$1[Q`O'#JRO$1jQ`O,5AOO$1rQ!fO1G1iOOQ!0Lf1G1k1G1kO9kQ`O1G3fO@zQ`O1G3fO$1yQ`O1G3fO$2OQ`O1G3fO!DiQ`O1G3fO9uQ!0LrO1G3fOOQ[1G3f1G3fO!EcQ`O1G3UO!&zQMhO1G3RO$2TQ`O1G3ROOQ[1G3S1G3SO!&zQMhO1G3SO$2YQ`O1G3SO$2bQpO'#HQOOQ[1G3U1G3UO!6_QpO'#I}O!EhQ!bO1G3XOOQ[1G3X1G3XOOQ[,5=r,5=rO$2jQMhO,5=tO9kQ`O,5=tO$%dQ`O,5=vO9`Q`O,5=vO!CUQpO,5=vO!C^QMhO,5=vO:dQMhO,5=vO$2xQ`O'#KcO$3TQ`O,5=wOOQ[1G.k1G.kO$3YQ!0LrO1G.kO@zQ`O1G.kO$3eQ`O1G.kO9uQ!0LrO1G.kO$5mQ!fO,5AQO$5zQ`O,5AQO9eQ`O,5AQO$6VQlO,5>PO$6^Q`O,5>POOQ[1G3i1G3iO`QlO1G3iOOQ[1G3o1G3oOOQ[1G3q1G3qO?TQ`O1G3sO$6cQlO1G3uO$:gQlO'#HtOOQ[1G3x1G3xO$:tQ`O'#HzO?YQ`O'#H|OOQ[1G4O1G4OO$:|QlO1G4OO9uQ!0LrO1G4UOOQ[1G4W1G4WOOQ!0Lb'#G_'#G_O9uQ!0LrO1G4YO9uQ!0LrO1G4[O$?TQ`O,5@bO!)[QlO,5;`O9eQ`O,5;`O?YQ`O,5:XO!)[QlO,5:XO!CUQpO,5:XO$?YQ?MtO,5:XOOQO,5;`,5;`O$?dQpO'#IeO$?zQ`O,5@aOOQ!0Lf1G/r1G/rO$@SQpO'#IkO$@^Q`O,5@pOOQ!0Lb1G0y1G0yO#$`QpO,5:XOOQO'#Ig'#IgO$@fQpO,5:qOOQ!0Ln,5:q,5:qO#(ZQ`O1G0ZOOQ!0Lf1G0Z1G0ZO%[QlO1G0ZOOQ!0Lf1G0t1G0tO?YQ`O1G0tO!CUQpO1G0tO!C^QMhO1G0tOOQ!0Lb1G5|1G5|O!ByQ!0LrO1G0^OOQO1G0m1G0mO%[QlO1G0mO$@mQ!0LrO1G0mO$@xQ!0LrO1G0mO!CUQpO1G0^ODWQpO1G0^O$AWQ!0LrO1G0mOOQO1G0^1G0^O$AlQ!0MxO1G0mPOOO-E<[-E<[POOO1G.h1G.hOOOO1G/i1G/iO$AvQ!bO,5<iO$BOQ!fO1G4jOOQO1G4p1G4pO%[QlO,5?OO$BYQ`O1G5zO$BbQ`O1G6YO$BjQ!fO1G6ZO9eQ`O,5?UO$BtQ!0MxO1G6WO%[QlO1G6WO$CUQ!0LrO1G6WO$CgQ`O1G6VO$CgQ`O1G6VO9eQ`O1G6VO$CoQ`O,5?XO9eQ`O,5?XOOQO,5?X,5?XO$DTQ`O,5?XO$+YQ`O,5?XOOQO-E<k-E<kOOQS1G0a1G0aOOQS1G0c1G0cO#.lQ`O1G0cOOQ[7+(e7+(eO!&zQMhO7+(eO%[QlO7+(eO$DcQ`O7+(eO$DnQMhO7+(eO$D|Q!0MzO,5=XO$GXQ!0MzO,5=ZO$IdQ!0MzO,5=XO$KuQ!0MzO,5=ZO$NWQ!0MzO,59uO%!]Q!0MzO,5<kO%$hQ!0MzO,5<mO%&sQ!0MzO,5<{OOQ!0Lf7+&a7+&aO%)UQ!0MxO7+&aO%)xQlO'#IfO%*VQ`O,5@cO%*_Q!fO,5@cOOQ!0Lf1G0P1G0PO%*iQ`O7+&jOOQ!0Lf7+&j7+&jO%*nQ?MtO,5:fO%[QlO7+&zO%*xQ?MtO,5:bO%+VQ?MtO,5:jO%+aQ?MtO,5:lO%+kQMhO'#IiO%+uQ`O,5@hOOQ!0Lh1G0d1G0dOOQO1G1r1G1rOOQO1G1s1G1sO%+}Q!jO,5<ZO!)[QlO,5<YOOQO-E<l-E<lOOQ!0Lf7+'Y7+'YOOOW7+'e7+'eOOOW1G1|1G1|O%,YQ`O1G1|OOQ!0Lf1G2O1G2OOOOO,59o,59oO%,_Q!dO,59oOOOO-E<`-E<`OOQ!0Lh1G/X1G/XO%,fQ!0MxO7+'kOOQ!0Lh,5?^,5?^O%-YQMhO1G2fP%-aQ`O'#IrPOQ!0Lh-E<p-E<pO%-}QMjO,5?aOOQ!0Lh-E<s-E<sO%.pQMjO,5?cOOQ!0Lh-E<u-E<uO%.zQ!dO1G2wO%/RQ!dO'#CrO%/iQMhO'#KSO$$wQlO'#JvOOQ!0Lh1G2_1G2_O%/sQ`O'#IqO%0[Q`O,5@vO%0[Q`O,5@vO%0dQ`O,5@vO%0oQ`O,5@vOOQO1G2a1G2aO%0}QMjO1G2`O$+YQ`O'#K[O!,TQMhO1G2`O%1_Q(CWO'#IsO%1lQ`O,5@wO!&zQMhO,5@wO%1tQ!dO,5@wOOQ!0Lh1G2d1G2dO%4UQ!fO'#CiO%4`Q`O,5=POOQ!0Lb,5<},5<}O%4hQpO,5<}OOQ!0Lb,5=O,5=OOCwQ`O,5<}O%4sQpO,5<}OOQ!0Lb,5=R,5=RO$+YQ`O,5=VOOQO,5?`,5?`OOQO-E<r-E<rOOQ!0Lp1G2h1G2hO#$`QpO,5<}O$$wQlO,5=PO%5RQ`O,5=OO%5^QpO,5=OO!,TQMhO'#IuO%6WQMjO1G2sO!,TQMhO'#IwO%6yQMjO1G2uO%7TQMjO1G5qO%7_QMjO1G5qOOQO,5?e,5?eOOQO-E<w-E<wOOQO1G.{1G.{O!,TQMhO1G5qO!,TQMhO1G5qO!:]QpO,59wO%[QlO,59wOOQ!0Lh,5<j,5<jO%7lQ`O1G2ZO!,TQMhO1G2bO%7qQ!0MxO7+'mOOQ!0Lf7+'m7+'mO!$wQlO7+'mO%8eQ`O,5;`OOQ!0Lb,5?g,5?gOOQ!0Lb-E<y-E<yO%8jQ!dO'#K^O#(ZQ`O7+(eO4UQ!fO7+(eO$DfQ`O7+(eO%8tQ!0MvO'#CiO%9XQ!0MvO,5=SO%9lQ`O,5=SO%9tQ`O,5=SOOQ!0Lb1G5o1G5oOOQ[7+$a7+$aO!ByQ!0LrO7+$aO!CUQpO7+$aO!$wQlO7+&aO%9yQ`O'#JQO%:bQ`O,5APOOQO1G3h1G3hO9kQ`O,5APO%:bQ`O,5APO%:jQ`O,5APOOQO,5?m,5?mOOQO-E=P-E=POOQ!0Lf7+'T7+'TO%:oQ`O7+)QO9uQ!0LrO7+)QO9kQ`O7+)QO@zQ`O7+)QO%:tQ`O7+)QOOQ[7+)Q7+)QOOQ[7+(p7+(pO%:yQ!0MvO7+(mO!&zQMhO7+(mO!E^Q`O7+(nOOQ[7+(n7+(nO!&zQMhO7+(nO%;TQ`O'#KbO%;`Q`O,5=lOOQO,5?i,5?iOOQO-E<{-E<{OOQ[7+(s7+(sO%<rQpO'#HZOOQ[1G3`1G3`O!&zQMhO1G3`O%[QlO1G3`O%<yQ`O1G3`O%=UQMhO1G3`O9uQ!0LrO1G3bO$%dQ`O1G3bO9`Q`O1G3bO!CUQpO1G3bO!C^QMhO1G3bO%=dQ`O'#JPO%=xQ`O,5@}O%>QQpO,5@}OOQ!0Lb1G3c1G3cOOQ[7+$V7+$VO@zQ`O7+$VO9uQ!0LrO7+$VO%>]Q`O7+$VO%[QlO1G6lO%[QlO1G6mO%>bQ!0LrO1G6lO%>lQlO1G3kO%>sQ`O1G3kO%>xQlO1G3kOOQ[7+)T7+)TO9uQ!0LrO7+)_O`QlO7+)aOOQ['#Kh'#KhOOQ['#JS'#JSO%?PQlO,5>`OOQ[,5>`,5>`O%[QlO'#HuO%?^Q`O'#HwOOQ[,5>f,5>fO9eQ`O,5>fOOQ[,5>h,5>hOOQ[7+)j7+)jOOQ[7+)p7+)pOOQ[7+)t7+)tOOQ[7+)v7+)vO%?cQpO1G5|O%?}Q?MtO1G0zO%@XQ`O1G0zOOQO1G/s1G/sO%@dQ?MtO1G/sO?YQ`O1G/sO!)[QlO'#DmOOQO,5?P,5?POOQO-E<c-E<cOOQO,5?V,5?VOOQO-E<i-E<iO!CUQpO1G/sOOQO-E<e-E<eOOQ!0Ln1G0]1G0]OOQ!0Lf7+%u7+%uO#(ZQ`O7+%uOOQ!0Lf7+&`7+&`O?YQ`O7+&`O!CUQpO7+&`OOQO7+%x7+%xO$AlQ!0MxO7+&XOOQO7+&X7+&XO%[QlO7+&XO%@nQ!0LrO7+&XO!ByQ!0LrO7+%xO!CUQpO7+%xO%@yQ!0LrO7+&XO%AXQ!0MxO7++rO%[QlO7++rO%AiQ`O7++qO%AiQ`O7++qOOQO1G4s1G4sO9eQ`O1G4sO%AqQ`O1G4sOOQS7+%}7+%}O#(ZQ`O<<LPO4UQ!fO<<LPO%BPQ`O<<LPOOQ[<<LP<<LPO!&zQMhO<<LPO%[QlO<<LPO%BXQ`O<<LPO%BdQ!0MzO,5?aO%DoQ!0MzO,5?cO%FzQ!0MzO1G2`O%I]Q!0MzO1G2sO%KhQ!0MzO1G2uO%MsQ!fO,5?QO%[QlO,5?QOOQO-E<d-E<dO%M}Q`O1G5}OOQ!0Lf<<JU<<JUO%NVQ?MtO1G0uO&!^Q?MtO1G1PO&!eQ?MtO1G1PO&$fQ?MtO1G1PO&$mQ?MtO1G1PO&&nQ?MtO1G1PO&(oQ?MtO1G1PO&(vQ?MtO1G1PO&(}Q?MtO1G1PO&+OQ?MtO1G1PO&+VQ?MtO1G1PO&+^Q!0MxO<<JfO&-UQ?MtO1G1PO&.RQ?MvO1G1PO&/UQ?MvO'#JlO&1[Q?MtO1G1cO&1iQ?MtO1G0UO&1sQMjO,5?TOOQO-E<g-E<gO!)[QlO'#FqOOQO'#KZ'#KZOOQO1G1u1G1uO&1}Q`O1G1tO&2SQ?MtO,5?[OOOW7+'h7+'hOOOO1G/Z1G/ZO&2^Q!dO1G4xOOQ!0Lh7+(Q7+(QP!&zQMhO,5?^O!,TQMhO7+(cO&2eQ`O,5?]O9eQ`O,5?]O$+YQ`O,5?]OOQO-E<o-E<oO&2sQ`O1G6bO&2sQ`O1G6bO&2{Q`O1G6bO&3WQMjO7+'zO&3hQ!dO,5?_O&3rQ`O,5?_O!&zQMhO,5?_OOQO-E<q-E<qO&3wQ!dO1G6cO&4RQ`O1G6cO&4ZQ`O1G2kO!&zQMhO1G2kOOQ!0Lb1G2i1G2iOOQ!0Lb1G2j1G2jO%4hQpO1G2iO!CUQpO1G2iOCwQ`O1G2iOOQ!0Lb1G2q1G2qO&4`QpO1G2iO&4nQ`O1G2kO$+YQ`O1G2jOCwQ`O1G2jO$$wQlO1G2kO&4vQ`O1G2jO&5jQMjO,5?aOOQ!0Lh-E<t-E<tO&6]QMjO,5?cOOQ!0Lh-E<v-E<vO!,TQMhO7++]O&6gQMjO7++]O&6qQMjO7++]OOQ!0Lh1G/c1G/cO&7OQ`O1G/cOOQ!0Lh7+'u7+'uO&7TQMjO7+'|O&7eQ!0MxO<<KXOOQ!0Lf<<KX<<KXO&8XQ`O1G0zO!&zQMhO'#IzO&8^Q`O,5@xO&:`Q!fO<<LPO!&zQMhO1G2nO&:gQ!0LrO1G2nOOQ[<<G{<<G{O!ByQ!0LrO<<G{O&:xQ!0MxO<<I{OOQ!0Lf<<I{<<I{OOQO,5?l,5?lO&;lQ`O,5?lO&;qQ`O,5?lOOQO-E=O-E=OO&<PQ`O1G6kO&<PQ`O1G6kO9kQ`O1G6kO@zQ`O<<LlOOQ[<<Ll<<LlO&<XQ`O<<LlO9uQ!0LrO<<LlO9kQ`O<<LlOOQ[<<LX<<LXO%:yQ!0MvO<<LXOOQ[<<LY<<LYO!E^Q`O<<LYO&<^QpO'#I|O&<iQ`O,5@|O!)[QlO,5@|OOQ[1G3W1G3WOOQO'#JO'#JOO9uQ!0LrO'#JOO&<qQpO,5=uOOQ[,5=u,5=uO&<xQpO'#EgO&=PQpO'#GeO&=UQ`O7+(zO&=ZQ`O7+(zOOQ[7+(z7+(zO!&zQMhO7+(zO%[QlO7+(zO&=cQ`O7+(zOOQ[7+(|7+(|O9uQ!0LrO7+(|O$%dQ`O7+(|O9`Q`O7+(|O!CUQpO7+(|O&=nQ`O,5?kOOQO-E<}-E<}OOQO'#H^'#H^O&=yQ`O1G6iO9uQ!0LrO<<GqOOQ[<<Gq<<GqO@zQ`O<<GqO&>RQ`O7+,WO&>WQ`O7+,XO%[QlO7+,WO%[QlO7+,XOOQ[7+)V7+)VO&>]Q`O7+)VO&>bQlO7+)VO&>iQ`O7+)VOOQ[<<Ly<<LyOOQ[<<L{<<L{OOQ[-E=Q-E=QOOQ[1G3z1G3zO&>nQ`O,5>aOOQ[,5>c,5>cO&>sQ`O1G4QO9eQ`O7+&fO!)[QlO7+&fOOQO7+%_7+%_O&>xQ?MtO1G6ZO?YQ`O7+%_OOQ!0Lf<<Ia<<IaOOQ!0Lf<<Iz<<IzO?YQ`O<<IzOOQO<<Is<<IsO$AlQ!0MxO<<IsO%[QlO<<IsOOQO<<Id<<IdO!ByQ!0LrO<<IdO&?SQ!0LrO<<IsO&?_Q!0MxO<= ^O&?oQ`O<= ]OOQO7+*_7+*_O9eQ`O7+*_OOQ[ANAkANAkO&?wQ!fOANAkO!&zQMhOANAkO#(ZQ`OANAkO4UQ!fOANAkO&@OQ`OANAkO%[QlOANAkO&@WQ!0MzO7+'zO&BiQ!0MzO,5?aO&DtQ!0MzO,5?cO&GPQ!0MzO7+'|O&IbQ!fO1G4lO&IlQ?MtO7+&aO&KpQ?MvO,5=XO&MwQ?MvO,5=ZO&NXQ?MvO,5=XO&NiQ?MvO,5=ZO&NyQ?MvO,59uO'#PQ?MvO,5<kO'%SQ?MvO,5<mO''hQ?MvO,5<{O')^Q?MtO7+'kO')kQ?MtO7+'mO')xQ`O,5<]OOQO7+'`7+'`OOQ!0Lh7+*d7+*dO')}QMjO<<K}OOQO1G4w1G4wO'*UQ`O1G4wO'*aQ`O1G4wO'*oQ`O7++|O'*oQ`O7++|O!&zQMhO1G4yO'*wQ!dO1G4yO'+RQ`O7++}O'+ZQ`O7+(VO'+fQ!dO7+(VOOQ!0Lb7+(T7+(TOOQ!0Lb7+(U7+(UO!CUQpO7+(TOCwQ`O7+(TO'+pQ`O7+(VO!&zQMhO7+(VO$+YQ`O7+(UO'+uQ`O7+(VOCwQ`O7+(UO'+}QMjO<<NwO!,TQMhO<<NwOOQ!0Lh7+$}7+$}O',XQ!dO,5?fOOQO-E<x-E<xO',cQ!0MvO7+(YO!&zQMhO7+(YOOQ[AN=gAN=gO9kQ`O1G5WOOQO1G5W1G5WO',sQ`O1G5WO',xQ`O7+,VO',xQ`O7+,VO9uQ!0LrOANBWO@zQ`OANBWOOQ[ANBWANBWO'-QQ`OANBWOOQ[ANAsANAsOOQ[ANAtANAtO'-VQ`O,5?hOOQO-E<z-E<zO'-bQ?MtO1G6hOOQO,5?j,5?jOOQO-E<|-E<|OOQ[1G3a1G3aO'-lQ`O,5=POOQ[<<Lf<<LfO!&zQMhO<<LfO&=UQ`O<<LfO'-qQ`O<<LfO%[QlO<<LfOOQ[<<Lh<<LhO9uQ!0LrO<<LhO$%dQ`O<<LhO9`Q`O<<LhO'-yQpO1G5VO'.UQ`O7+,TOOQ[AN=]AN=]O9uQ!0LrOAN=]OOQ[<= r<= rOOQ[<= s<= sO'.^Q`O<= rO'.cQ`O<= sOOQ[<<Lq<<LqO'.hQ`O<<LqO'.mQlO<<LqOOQ[1G3{1G3{O?YQ`O7+)lO'.tQ`O<<JQO'/PQ?MtO<<JQOOQO<<Hy<<HyOOQ!0LfAN?fAN?fOOQOAN?_AN?_O$AlQ!0MxOAN?_OOQOAN?OAN?OO%[QlOAN?_OOQO<<My<<MyOOQ[G27VG27VO!&zQMhOG27VO#(ZQ`OG27VO'/ZQ!fOG27VO4UQ!fOG27VO'/bQ`OG27VO'/jQ?MtO<<JfO'/wQ?MvO1G2`O'1mQ?MvO,5?aO'3pQ?MvO,5?cO'5sQ?MvO1G2sO'7vQ?MvO1G2uO'9yQ?MtO<<KXO':WQ?MtO<<I{OOQO1G1w1G1wO!,TQMhOANAiOOQO7+*c7+*cO':eQ`O7+*cO':pQ`O<= hO':xQ!dO7+*eOOQ!0Lb<<Kq<<KqO$+YQ`O<<KqOCwQ`O<<KqO';SQ`O<<KqO!&zQMhO<<KqOOQ!0Lb<<Ko<<KoO!CUQpO<<KoO';_Q!dO<<KqOOQ!0Lb<<Kp<<KpO';iQ`O<<KqO!&zQMhO<<KqO$+YQ`O<<KpO';nQMjOANDcO';xQ!0MvO<<KtOOQO7+*r7+*rO9kQ`O7+*rO'<YQ`O<= qOOQ[G27rG27rO9uQ!0LrOG27rO@zQ`OG27rO!)[QlO1G5SO'<bQ`O7+,SO'<jQ`O1G2kO&=UQ`OANBQOOQ[ANBQANBQO!&zQMhOANBQO'<oQ`OANBQOOQ[ANBSANBSO9uQ!0LrOANBSO$%dQ`OANBSOOQO'#H_'#H_OOQO7+*q7+*qOOQ[G22wG22wOOQ[ANE^ANE^OOQ[ANE_ANE_OOQ[ANB]ANB]O'<wQ`OANB]OOQ[<<MW<<MWO!)[QlOAN?lOOQOG24yG24yO$AlQ!0MxOG24yO#(ZQ`OLD,qOOQ[LD,qLD,qO!&zQMhOLD,qO'<|Q!fOLD,qO'=TQ?MvO7+'zO'>yQ?MvO,5?aO'@|Q?MvO,5?cO'CPQ?MvO7+'|O'DuQMjOG27TOOQO<<M}<<M}OOQ!0LbANA]ANA]O$+YQ`OANA]OCwQ`OANA]O'EVQ!dOANA]OOQ!0LbANAZANAZO'E^Q`OANA]O!&zQMhOANA]O'EiQ!dOANA]OOQ!0LbANA[ANA[OOQO<<N^<<N^OOQ[LD-^LD-^O9uQ!0LrOLD-^O'EsQ?MtO7+*nOOQO'#Gf'#GfOOQ[G27lG27lO&=UQ`OG27lO!&zQMhOG27lOOQ[G27nG27nO9uQ!0LrOG27nOOQ[G27wG27wO'E}Q?MtOG25WOOQOLD*eLD*eOOQ[!$(!]!$(!]O#(ZQ`O!$(!]O!&zQMhO!$(!]O'FXQ!0MzOG27TOOQ!0LbG26wG26wO$+YQ`OG26wO'HjQ`OG26wOCwQ`OG26wO'HuQ!dOG26wO!&zQMhOG26wOOQ[!$(!x!$(!xOOQ[LD-WLD-WO&=UQ`OLD-WOOQ[LD-YLD-YOOQ[!)9Ew!)9EwO#(ZQ`O!)9EwOOQ!0LbLD,cLD,cO$+YQ`OLD,cOCwQ`OLD,cO'H|Q`OLD,cO'IXQ!dOLD,cOOQ[!$(!r!$(!rOOQ[!.K;c!.K;cO'I`Q?MvOG27TOOQ!0Lb!$( }!$( }O$+YQ`O!$( }OCwQ`O!$( }O'KUQ`O!$( }OOQ!0Lb!)9Ei!)9EiO$+YQ`O!)9EiOCwQ`O!)9EiOOQ!0Lb!.K;T!.K;TO$+YQ`O!.K;TOOQ!0Lb!4/0o!4/0oO!)[QlO'#DzO1PQ`O'#EXO'KaQ!fO'#JrO'KhQ!L^O'#DvO'KoQlO'#EOO'KvQ!fO'#CiO'N^Q!fO'#CiO!)[QlO'#EQO'NnQlO,5;ZO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO'#IpO(!qQ`O,5<iO!)[QlO,5;eO(!yQMhO,5;eO($dQMhO,5;eO!)[QlO,5;wO!&zQMhO'#GmO(!yQMhO'#GmO!&zQMhO'#GoO(!yQMhO'#GoO1SQ`O'#DZO1SQ`O'#DZO!&zQMhO'#GPO(!yQMhO'#GPO!&zQMhO'#GRO(!yQMhO'#GRO!&zQMhO'#GaO(!yQMhO'#GaO!)[QlO,5:jO($kQpO'#D_O($uQpO'#JvO!)[QlO,5@oO'NnQlO1G0uO(%PQ?MtO'#CiO!)[QlO1G2PO!&zQMhO'#IuO(!yQMhO'#IuO!&zQMhO'#IwO(!yQMhO'#IwO(%ZQ!dO'#CrO!&zQMhO,5<tO(!yQMhO,5<tO'NnQlO1G2RO!)[QlO7+&zO!&zQMhO1G2`O(!yQMhO1G2`O!&zQMhO'#IuO(!yQMhO'#IuO!&zQMhO'#IwO(!yQMhO'#IwO!&zQMhO1G2bO(!yQMhO1G2bO'NnQlO7+'mO'NnQlO7+&aO!&zQMhOANAiO(!yQMhOANAiO(%nQ`O'#EoO(%sQ`O'#EoO(%{Q`O'#F]O(&QQ`O'#EyO(&VQ`O'#KTO(&bQ`O'#KRO(&mQ`O,5;ZO(&rQMjO,5<eO(&yQ`O'#GYO('OQ`O'#GYO('TQ`O,5<eO(']Q`O,5<gO('eQ`O,5;ZO('mQ?MtO1G1`O('tQ`O,5<tO('yQ`O,5<tO((OQ`O,5<vO((TQ`O,5<vO((YQ`O1G2RO((_Q`O1G0uO((dQMjO<<K}O((kQMjO<<K}O((rQMhO'#F|O9`Q`O'#F{OAuQ`O'#EnO!)[QlO,5;tO!3oQ`O'#GYO!3oQ`O'#GYO!3oQ`O'#G[O!3oQ`O'#G[O!,TQMhO7+(cO!,TQMhO7+(cO%.zQ!dO1G2wO%.zQ!dO1G2wO!&zQMhO,5=]O!&zQMhO,5=]",stateData:"()x~O'|OS'}OSTOS(ORQ~OPYOQYOSfOY!VOaqOdzOeyOl!POpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_XO!iuO!lZO!oYO!pYO!qYO!svO!uwO!xxO!|]O$W|O$niO%h}O%j!QO%l!OO%m!OO%n!OO%q!RO%s!SO%v!TO%w!TO%y!UO&W!WO&^!XO&`!YO&b!ZO&d![O&g!]O&m!^O&s!_O&u!`O&w!aO&y!bO&{!cO(TSO(VTO(YUO(aVO(o[O~OWtO~P`OPYOQYOSfOd!jOe!iOpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_!eO!iuO!lZO!oYO!pYO!qYO!svO!u!gO!x!hO$W!kO$niO(T!dO(VTO(YUO(aVO(o[O~Oa!wOs!nO!S!oO!b!yO!c!vO!d!vO!|<VO#T!pO#U!pO#V!xO#W!pO#X!pO#[!zO#]!zO(U!lO(VTO(YUO(e!mO(o!sO~O(O!{O~OP]XR]X[]Xa]Xj]Xr]X!Q]X!S]X!]]X!l]X!p]X#R]X#S]X#`]X#kfX#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#v]X#x]X#z]X#{]X$Q]X'z]X(a]X(r]X(y]X(z]X~O!g%RX~P(qO_!}O(V#PO(W!}O(X#PO~O_#QO(X#PO(Y#PO(Z#QO~Ox#SO!U#TO(b#TO(c#VO~OPYOQYOSfOd!jOe!iOpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_!eO!iuO!lZO!oYO!pYO!qYO!svO!u!gO!x!hO$W!kO$niO(T<ZO(VTO(YUO(aVO(o[O~O![#ZO!]#WO!Y(hP!Y(vP~P+}O!^#cO~P`OPYOQYOSfOd!jOe!iOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_!eO!iuO!lZO!oYO!pYO!qYO!svO!u!gO!x!hO$W!kO$niO(VTO(YUO(aVO(o[O~Op#mO![#iO!|]O#i#lO#j#iO(T<[O!k(sP~P.iO!l#oO(T#nO~O!x#sO!|]O%h#tO~O#k#uO~O!g#vO#k#uO~OP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!]$_O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO#x$UO#z$WO#{$XO(aVO(r$YO(y#|O(z#}O~Oa(fX'z(fX'w(fX!k(fX!Y(fX!_(fX%i(fX!g(fX~P1qO#S$dO#`$eO$Q$eOP(gXR(gX[(gXj(gXr(gX!Q(gX!S(gX!](gX!l(gX!p(gX#R(gX#n(gX#o(gX#p(gX#q(gX#r(gX#s(gX#t(gX#u(gX#v(gX#x(gX#z(gX#{(gX(a(gX(r(gX(y(gX(z(gX!_(gX%i(gX~Oa(gX'z(gX'w(gX!Y(gX!k(gXv(gX!g(gX~P4UO#`$eO~O$]$hO$_$gO$f$mO~OSfO!_$nO$i$oO$k$qO~Oh%VOj%dOk%dOp%WOr%XOs$tOt$tOz%YO|%ZO!O%]O!S${O!_$|O!i%bO!l$xO#j%cO$W%`O$t%^O$v%_O$y%aO(T$sO(VTO(YUO(a$uO(y$}O(z%POg(^P~Ol%[O~P7eO!l%eO~O!S%hO!_%iO(T%gO~O!g%mO~Oa%nO'z%nO~O!Q%rO~P%[O(U!lO~P%[O%n%vO~P%[Oh%VO!l%eO(T%gO(U!lO~Oe%}O!l%eO(T%gO~Oj$RO~O!_&PO(T%gO(U!lO(VTO(YUO`)WP~O!Q&SO!l&RO%j&VO&T&WO~P;SO!x#sO~O%s&YO!S)SX!_)SX(T)SX~O(T&ZO~Ol!PO!u&`O%j!QO%l!OO%m!OO%n!OO%q!RO%s!SO%v!TO%w!TO~Od&eOe&dO!x&bO%h&cO%{&aO~P<bOd&hOeyOl!PO!_&gO!u&`O!xxO!|]O%h}O%l!OO%m!OO%n!OO%q!RO%s!SO%v!TO%w!TO%y!UO~Ob&kO#`&nO%j&iO(U!lO~P=gO!l&oO!u&sO~O!l#oO~O!_XO~Oa%nO'x&{O'z%nO~Oa%nO'x'OO'z%nO~Oa%nO'x'QO'z%nO~O'w]X!Y]Xv]X!k]X&[]X!_]X%i]X!g]X~P(qO!b'_O!c'WO!d'WO(U!lO(VTO(YUO~Os'UO!S'TO!['XO(e'SO!^(iP!^(xP~P@nOn'bO!_'`O(T%gO~Oe'gO!l%eO(T%gO~O!Q&SO!l&RO~Os!nO!S!oO!|<VO#T!pO#U!pO#W!pO#X!pO(U!lO(VTO(YUO(e!mO(o!sO~O!b'mO!c'lO!d'lO#V!pO#['nO#]'nO~PBYOa%nOh%VO!g#vO!l%eO'z%nO(r'pO~O!p'tO#`'rO~PChOs!nO!S!oO(VTO(YUO(e!mO(o!sO~O!_XOs(mX!S(mX!b(mX!c(mX!d(mX!|(mX#T(mX#U(mX#V(mX#W(mX#X(mX#[(mX#](mX(U(mX(V(mX(Y(mX(e(mX(o(mX~O!c'lO!d'lO(U!lO~PDWO(P'xO(Q'xO(R'zO~O_!}O(V'|O(W!}O(X'|O~O_#QO(X'|O(Y'|O(Z#QO~Ov(OO~P%[Ox#SO!U#TO(b#TO(c(RO~O![(TO!Y'WX!Y'^X!]'WX!]'^X~P+}O!](VO!Y(hX~OP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!](VO!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO#x$UO#z$WO#{$XO(aVO(r$YO(y#|O(z#}O~O!Y(hX~PHRO!Y([O~O!Y(uX!](uX!g(uX!k(uX(r(uX~O#`(uX#k#dX!^(uX~PJUO#`(]O!Y(wX!](wX~O!](^O!Y(vX~O!Y(aO~O#`$eO~PJUO!^(bO~P`OR#zO!Q#yO!S#{O!l#xO(aVOP!na[!naj!nar!na!]!na!p!na#R!na#n!na#o!na#p!na#q!na#r!na#s!na#t!na#u!na#v!na#x!na#z!na#{!na(r!na(y!na(z!na~Oa!na'z!na'w!na!Y!na!k!nav!na!_!na%i!na!g!na~PKlO!k(cO~O!g#vO#`(dO(r'pO!](tXa(tX'z(tX~O!k(tX~PNXO!S%hO!_%iO!|]O#i(iO#j(hO(T%gO~O!](jO!k(sX~O!k(lO~O!S%hO!_%iO#j(hO(T%gO~OP(gXR(gX[(gXj(gXr(gX!Q(gX!S(gX!](gX!l(gX!p(gX#R(gX#n(gX#o(gX#p(gX#q(gX#r(gX#s(gX#t(gX#u(gX#v(gX#x(gX#z(gX#{(gX(a(gX(r(gX(y(gX(z(gX~O!g#vO!k(gX~P! uOR(nO!Q(mO!l#xO#S$dO!|!{a!S!{a~O!x!{a%h!{a!_!{a#i!{a#j!{a(T!{a~P!#vO!x(rO~OPYOQYOSfOd!jOe!iOpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_XO!iuO!lZO!oYO!pYO!qYO!svO!u!gO!x!hO$W!kO$niO(T!dO(VTO(YUO(aVO(o[O~Oh%VOp%WOr%XOs$tOt$tOz%YO|%ZO!O<sO!S${O!_$|O!i>VO!l$xO#j<yO$W%`O$t<uO$v<wO$y%aO(T(vO(VTO(YUO(a$uO(y$}O(z%PO~O#k(xO~O![(zO!k(kP~P%[O(e(|O(o[O~O!S)OO!l#xO(e(|O(o[O~OP<UOQ<UOSfOd>ROe!iOpkOr<UOskOtkOzkO|<UO!O<UO!SWO!WkO!XkO!_!eO!i<XO!lZO!o<UO!p<UO!q<UO!s<YO!u<]O!x!hO$W!kO$n>PO(T)]O(VTO(YUO(aVO(o[O~O!]$_Oa$qa'z$qa'w$qa!k$qa!Y$qa!_$qa%i$qa!g$qa~Ol)dO~P!&zOh%VOp%WOr%XOs$tOt$tOz%YO|%ZO!O%]O!S${O!_$|O!i%bO!l$xO#j%cO$W%`O$t%^O$v%_O$y%aO(T(vO(VTO(YUO(a$uO(y$}O(z%PO~Og(pP~P!,TO!Q)iO!g)hO!_$^X$Z$^X$]$^X$_$^X$f$^X~O!g)hO!_({X$Z({X$]({X$_({X$f({X~O!Q)iO~P!.^O!Q)iO!_({X$Z({X$]({X$_({X$f({X~O!_)kO$Z)oO$])jO$_)jO$f)pO~O![)sO~P!)[O$]$hO$_$gO$f)wO~On$zX!Q$zX#S$zX'y$zX(y$zX(z$zX~OgmXg$zXnmX!]mX#`mX~P!0SOx)yO(b)zO(c)|O~On*VO!Q*OO'y*PO(y$}O(z%PO~Og)}O~P!1WOg*WO~Oh%VOr%XOs$tOt$tOz%YO|%ZO!O<sO!S*YO!_*ZO!i>VO!l$xO#j<yO$W%`O$t<uO$v<wO$y%aO(VTO(YUO(a$uO(y$}O(z%PO~Op*`O}O(T&ZO~O!l+SO~O(T(vO~Op+WO!S%hO![#iO!_%iO!|]O#i#lO#j#iO(T%gO!k(sP~O!g#vO#k+XO~O!S%hOTX'z)TX~OP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO#x$UO#z$WO#{$XO(aVO(r$YO(y#|O(z#}O~Oa!ja!]!ja'z!ja'w!ja!Y!ja!k!jav!ja!_!ja%i!ja!g!ja~P!:tOR#zO!Q#yO!S#{O!l#xO(aVOP!ra[!raj!rar!ra!]!ra!p!ra#R!ra#n!ra#o!ra#p!ra#q!ra#r!ra#s!ra#t!ra#u!ra#v!ra#x!ra#z!ra#{!ra(r!ra(y!ra(z!ra~Oa!ra'z!ra'w!ra!Y!ra!k!rav!ra!_!ra%i!ra!g!ra~P!=[OR#zO!Q#yO!S#{O!l#xO(aVOP!ta[!taj!tar!ta!]!ta!p!ta#R!ta#n!ta#o!ta#p!ta#q!ta#r!ta#s!ta#t!ta#u!ta#v!ta#x!ta#z!ta#{!ta(r!ta(y!ta(z!ta~Oa!ta'z!ta'w!ta!Y!ta!k!tav!ta!_!ta%i!ta!g!ta~P!?rOh%VOn+gO!_'`O%i+fO~O!g+iOa(]X!_(]X'z(]X!](]X~Oa%nO!_XO'z%nO~Oh%VO!l%eO~Oh%VO!l%eO(T%gO~O!g#vO#k(xO~Ob+tO%j+uO(T+qO(VTO(YUO!^)XP~O!]+vO`)WX~O[+zO~O`+{O~O!_&PO(T%gO(U!lO`)WP~O%j,OO~P;SOh%VO#`,SO~Oh%VOn,VO!_$|O~O!_,XO~O!Q,ZO!_XO~O%n%vO~O!x,`O~Oe,eO~Ob,fO(T#nO(VTO(YUO!^)VP~Oe%}O~O%j!QO(T&ZO~P=gO[,kO`,jO~OPYOQYOSfOdzOeyOpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!iuO!lZO!oYO!pYO!qYO!svO!xxO!|]O$niO%h}O(VTO(YUO(aVO(o[O~O!_!eO!u!gO$W!kO(T!dO~P!FyO`,jOa%nO'z%nO~OPYOQYOSfOd!jOe!iOpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_!eO!iuO!lZO!oYO!pYO!qYO!svO!x!hO$W!kO$niO(T!dO(VTO(YUO(aVO(o[O~Oa,pOl!OO!uwO%l!OO%m!OO%n!OO~P!IcO!l&oO~O&^,vO~O!_,xO~O&o,zO&q,{OP&laQ&laS&laY&laa&lad&lae&lal&lap&lar&las&lat&laz&la|&la!O&la!S&la!W&la!X&la!_&la!i&la!l&la!o&la!p&la!q&la!s&la!u&la!x&la!|&la$W&la$n&la%h&la%j&la%l&la%m&la%n&la%q&la%s&la%v&la%w&la%y&la&W&la&^&la&`&la&b&la&d&la&g&la&m&la&s&la&u&la&w&la&y&la&{&la'w&la(T&la(V&la(Y&la(a&la(o&la!^&la&e&lab&la&j&la~O(T-QO~Oh!eX!]!RX!^!RX!g!RX!g!eX!l!eX#`!RX~O!]!eX!^!eX~P#!iO!g-VO#`-UOh(jX!]#hX!^#hX!g(jX!l(jX~O!](jX!^(jX~P##[Oh%VO!g-XO!l%eO!]!aX!^!aX~Os!nO!S!oO(VTO(YUO(e!mO~OP<UOQ<UOSfOd>ROe!iOpkOr<UOskOtkOzkO|<UO!O<UO!SWO!WkO!XkO!_!eO!i<XO!lZO!o<UO!p<UO!q<UO!s<YO!u<]O!x!hO$W!kO$n>PO(VTO(YUO(aVO(o[O~O(T=QO~P#$qO!]-]O!^(iX~O!^-_O~O!g-VO#`-UO!]#hX!^#hX~O!]-`O!^(xX~O!^-bO~O!c-cO!d-cO(U!lO~P#$`O!^-fO~P'_On-iO!_'`O~O!Y-nO~Os!{a!b!{a!c!{a!d!{a#T!{a#U!{a#V!{a#W!{a#X!{a#[!{a#]!{a(U!{a(V!{a(Y!{a(e!{a(o!{a~P!#vO!p-sO#`-qO~PChO!c-uO!d-uO(U!lO~PDWOa%nO#`-qO'z%nO~Oa%nO!g#vO#`-qO'z%nO~Oa%nO!g#vO!p-sO#`-qO'z%nO(r'pO~O(P'xO(Q'xO(R-zO~Ov-{O~O!Y'Wa!]'Wa~P!:tO![.PO!Y'WX!]'WX~P%[O!](VO!Y(ha~O!Y(ha~PHRO!](^O!Y(va~O!S%hO![.TO!_%iO(T%gO!Y'^X!]'^X~O#`.VO!](ta!k(taa(ta'z(ta~O!g#vO~P#,wO!](jO!k(sa~O!S%hO!_%iO#j.ZO(T%gO~Op.`O!S%hO![.]O!_%iO!|]O#i._O#j.]O(T%gO!]'aX!k'aX~OR.dO!l#xO~Oh%VOn.gO!_'`O%i.fO~Oa#ci!]#ci'z#ci'w#ci!Y#ci!k#civ#ci!_#ci%i#ci!g#ci~P!:tOn>]O!Q*OO'y*PO(y$}O(z%PO~O#k#_aa#_a#`#_a'z#_a!]#_a!k#_a!_#_a!Y#_a~P#/sO#k(`XP(`XR(`X[(`Xa(`Xj(`Xr(`X!S(`X!l(`X!p(`X#R(`X#n(`X#o(`X#p(`X#q(`X#r(`X#s(`X#t(`X#u(`X#v(`X#x(`X#z(`X#{(`X'z(`X(a(`X(r(`X!k(`X!Y(`X'w(`Xv(`X!_(`X%i(`X!g(`X~P!6kO!].tO!k(kX~P!:tO!k.wO~O!Y.yO~OP$[OR#zO!Q#yO!S#{O!l#xO!p$[O(aVO[#mia#mij#mir#mi!]#mi#R#mi#o#mi#p#mi#q#mi#r#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#n#mi~P#3cO#n$OO~P#3cOP$[OR#zOr$aO!Q#yO!S#{O!l#xO!p$[O#n$OO#o$PO#p$PO#q$PO(aVO[#mia#mij#mi!]#mi#R#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#r#mi~P#6QO#r$QO~P#6QOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO(aVOa#mi!]#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#v#mi~P#8oOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO(aVO(z#}Oa#mi!]#mi#z#mi#{#mi'z#mi(r#mi(y#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#x$UO~P#;VO#x#mi~P#;VO#v$SO~P#8oOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO#x$UO(aVO(y#|O(z#}Oa#mi!]#mi#{#mi'z#mi(r#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#z#mi~P#={O#z$WO~P#={OP]XR]X[]Xj]Xr]X!Q]X!S]X!l]X!p]X#R]X#S]X#`]X#kfX#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#v]X#x]X#z]X#{]X$Q]X(a]X(r]X(y]X(z]X!]]X!^]X~O$O]X~P#@jOP$[OR#zO[<mOj<bOr<kO!Q#yO!S#{O!l#xO!p$[O#R<bO#n<_O#o<`O#p<`O#q<`O#r<aO#s<bO#t<bO#u<lO#v<cO#x<eO#z<gO#{<hO(aVO(r$YO(y#|O(z#}O~O$O.{O~P#BwO#S$dO#`<nO$Q<nO$O(gX!^(gX~P! uOa'da!]'da'z'da'w'da!k'da!Y'dav'da!_'da%i'da!g'da~P!:tO[#mia#mij#mir#mi!]#mi#R#mi#r#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi'z#mi(r#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~OP$[OR#zO!Q#yO!S#{O!l#xO!p$[O#n$OO#o$PO#p$PO#q$PO(aVO(y#mi(z#mi~P#EyOn>]O!Q*OO'y*PO(y$}O(z%POP#miR#mi!S#mi!l#mi!p#mi#n#mi#o#mi#p#mi#q#mi(a#mi~P#EyO!]/POg(pX~P!1WOg/RO~Oa$Pi!]$Pi'z$Pi'w$Pi!Y$Pi!k$Piv$Pi!_$Pi%i$Pi!g$Pi~P!:tO$]/SO$_/SO~O$]/TO$_/TO~O!g)hO#`/UO!_$cX$Z$cX$]$cX$_$cX$f$cX~O![/VO~O!_)kO$Z/XO$])jO$_)jO$f/YO~O!]<iO!^(fX~P#BwO!^/ZO~O!g)hO$f({X~O$f/]O~Ov/^O~P!&zOx)yO(b)zO(c/aO~O!S/dO~O(y$}On%aa!Q%aa'y%aa(z%aa!]%aa#`%aa~Og%aa$O%aa~P#L{O(z%POn%ca!Q%ca'y%ca(y%ca!]%ca#`%ca~Og%ca$O%ca~P#MnO!]fX!gfX!kfX!k$zX(rfX~P!0SOp%WOPP~P!1uOr*sO!b*qO!c*kO!d*kO!l*bO#[*rO%`*mO(U!lO(VTO(YUO~Os<}O!S/nO![+[O!^*pO(e<|O!^(xP~P$ [O!k/oO~P#/sO!]/pO!g#vO(r'pO!k)OX~O!k/uO~OnoX!QoX'yoX(yoX(zoX~O!g#vO!koX~P$#OOp/wO!S%hO![*^O!_%iO(T%gO!k)OP~O#k/xO~O!Y$zX!]$zX!g%RX~P!0SO!]/yO!Y)PX~P#/sO!g/{O~O!Y/}O~OpkO(T0OO~P.iOh%VOr0TO!g#vO!l%eO(r'pO~O!g+iO~Oa%nO!]0XO'z%nO~O!^0ZO~P!5iO!c0[O!d0[O(U!lO~P#$`Os!nO!S0]O(VTO(YUO(e!mO~O#[0_O~Og%aa!]%aa#`%aa$O%aa~P!1WOg%ca!]%ca#`%ca$O%ca~P!1WOj%dOk%dOl%dO(T&ZOg'mX!]'mX~O!]*yOg(^a~Og0hO~On0jO#`0iOg(_a!](_a~OR0kO!Q0kO!S0lO#S$dOn}a'y}a(y}a(z}a!]}a#`}a~Og}a$O}a~P$(cO!Q*OO'y*POn$sa(y$sa(z$sa!]$sa#`$sa~Og$sa$O$sa~P$)_O!Q*OO'y*POn$ua(y$ua(z$ua!]$ua#`$ua~Og$ua$O$ua~P$*QO#k0oO~Og%Ta!]%Ta#`%Ta$O%Ta~P!1WO!g#vO~O#k0rO~O!]+^Oa)Ta'z)Ta~OR#zO!Q#yO!S#{O!l#xO(aVOP!ri[!rij!rir!ri!]!ri!p!ri#R!ri#n!ri#o!ri#p!ri#q!ri#r!ri#s!ri#t!ri#u!ri#v!ri#x!ri#z!ri#{!ri(r!ri(y!ri(z!ri~Oa!ri'z!ri'w!ri!Y!ri!k!riv!ri!_!ri%i!ri!g!ri~P$+oOh%VOr%XOs$tOt$tOz%YO|%ZO!O<sO!S${O!_$|O!i>VO!l$xO#j<yO$W%`O$t<uO$v<wO$y%aO(VTO(YUO(a$uO(y$}O(z%PO~Op0{O%]0|O(T0zO~P$.VO!g+iOa(]a!_(]a'z(]a!](]a~O#k1SO~O[]X!]fX!^fX~O!]1TO!^)XX~O!^1VO~O[1WO~Ob1YO(T+qO(VTO(YUO~O!_&PO(T%gO`'uX!]'uX~O!]+vO`)Wa~O!k1]O~P!:tO[1`O~O`1aO~O#`1fO~On1iO!_$|O~O(e(|O!^)UP~Oh%VOn1rO!_1oO%i1qO~O[1|O!]1zO!^)VX~O!^1}O~O`2POa%nO'z%nO~O(T#nO(VTO(YUO~O#S$dO#`$eO$Q$eOP(gXR(gX[(gXr(gX!Q(gX!S(gX!](gX!l(gX!p(gX#R(gX#n(gX#o(gX#p(gX#q(gX#r(gX#s(gX#t(gX#u(gX#v(gX#x(gX#z(gX#{(gX(a(gX(r(gX(y(gX(z(gX~Oj2SO&[2TOa(gX~P$3pOj2SO#`$eO&[2TO~Oa2VO~P%[Oa2XO~O&e2[OP&ciQ&ciS&ciY&cia&cid&cie&cil&cip&cir&cis&cit&ciz&ci|&ci!O&ci!S&ci!W&ci!X&ci!_&ci!i&ci!l&ci!o&ci!p&ci!q&ci!s&ci!u&ci!x&ci!|&ci$W&ci$n&ci%h&ci%j&ci%l&ci%m&ci%n&ci%q&ci%s&ci%v&ci%w&ci%y&ci&W&ci&^&ci&`&ci&b&ci&d&ci&g&ci&m&ci&s&ci&u&ci&w&ci&y&ci&{&ci'w&ci(T&ci(V&ci(Y&ci(a&ci(o&ci!^&cib&ci&j&ci~Ob2bO!^2`O&j2aO~P`O!_XO!l2dO~O&q,{OP&liQ&liS&liY&lia&lid&lie&lil&lip&lir&lis&lit&liz&li|&li!O&li!S&li!W&li!X&li!_&li!i&li!l&li!o&li!p&li!q&li!s&li!u&li!x&li!|&li$W&li$n&li%h&li%j&li%l&li%m&li%n&li%q&li%s&li%v&li%w&li%y&li&W&li&^&li&`&li&b&li&d&li&g&li&m&li&s&li&u&li&w&li&y&li&{&li'w&li(T&li(V&li(Y&li(a&li(o&li!^&li&e&lib&li&j&li~O!Y2jO~O!]!aa!^!aa~P#BwOs!nO!S!oO![2pO(e!mO!]'XX!^'XX~P@nO!]-]O!^(ia~O!]'_X!^'_X~P!9|O!]-`O!^(xa~O!^2wO~P'_Oa%nO#`3QO'z%nO~Oa%nO!g#vO#`3QO'z%nO~Oa%nO!g#vO!p3UO#`3QO'z%nO(r'pO~Oa%nO'z%nO~P!:tO!]$_Ov$qa~O!Y'Wi!]'Wi~P!:tO!](VO!Y(hi~O!](^O!Y(vi~O!Y(wi!](wi~P!:tO!](ti!k(tia(ti'z(ti~P!:tO#`3WO!](ti!k(tia(ti'z(ti~O!](jO!k(si~O!S%hO!_%iO!|]O#i3]O#j3[O(T%gO~O!S%hO!_%iO#j3[O(T%gO~On3dO!_'`O%i3cO~Oh%VOn3dO!_'`O%i3cO~O#k%aaP%aaR%aa[%aaa%aaj%aar%aa!S%aa!l%aa!p%aa#R%aa#n%aa#o%aa#p%aa#q%aa#r%aa#s%aa#t%aa#u%aa#v%aa#x%aa#z%aa#{%aa'z%aa(a%aa(r%aa!k%aa!Y%aa'w%aav%aa!_%aa%i%aa!g%aa~P#L{O#k%caP%caR%ca[%caa%caj%car%ca!S%ca!l%ca!p%ca#R%ca#n%ca#o%ca#p%ca#q%ca#r%ca#s%ca#t%ca#u%ca#v%ca#x%ca#z%ca#{%ca'z%ca(a%ca(r%ca!k%ca!Y%ca'w%cav%ca!_%ca%i%ca!g%ca~P#MnO#k%aaP%aaR%aa[%aaa%aaj%aar%aa!S%aa!]%aa!l%aa!p%aa#R%aa#n%aa#o%aa#p%aa#q%aa#r%aa#s%aa#t%aa#u%aa#v%aa#x%aa#z%aa#{%aa'z%aa(a%aa(r%aa!k%aa!Y%aa'w%aa#`%aav%aa!_%aa%i%aa!g%aa~P#/sO#k%caP%caR%ca[%caa%caj%car%ca!S%ca!]%ca!l%ca!p%ca#R%ca#n%ca#o%ca#p%ca#q%ca#r%ca#s%ca#t%ca#u%ca#v%ca#x%ca#z%ca#{%ca'z%ca(a%ca(r%ca!k%ca!Y%ca'w%ca#`%cav%ca!_%ca%i%ca!g%ca~P#/sO#k}aP}a[}aa}aj}ar}a!l}a!p}a#R}a#n}a#o}a#p}a#q}a#r}a#s}a#t}a#u}a#v}a#x}a#z}a#{}a'z}a(a}a(r}a!k}a!Y}a'w}av}a!_}a%i}a!g}a~P$(cO#k$saP$saR$sa[$saa$saj$sar$sa!S$sa!l$sa!p$sa#R$sa#n$sa#o$sa#p$sa#q$sa#r$sa#s$sa#t$sa#u$sa#v$sa#x$sa#z$sa#{$sa'z$sa(a$sa(r$sa!k$sa!Y$sa'w$sav$sa!_$sa%i$sa!g$sa~P$)_O#k$uaP$uaR$ua[$uaa$uaj$uar$ua!S$ua!l$ua!p$ua#R$ua#n$ua#o$ua#p$ua#q$ua#r$ua#s$ua#t$ua#u$ua#v$ua#x$ua#z$ua#{$ua'z$ua(a$ua(r$ua!k$ua!Y$ua'w$uav$ua!_$ua%i$ua!g$ua~P$*QO#k%TaP%TaR%Ta[%Taa%Taj%Tar%Ta!S%Ta!]%Ta!l%Ta!p%Ta#R%Ta#n%Ta#o%Ta#p%Ta#q%Ta#r%Ta#s%Ta#t%Ta#u%Ta#v%Ta#x%Ta#z%Ta#{%Ta'z%Ta(a%Ta(r%Ta!k%Ta!Y%Ta'w%Ta#`%Tav%Ta!_%Ta%i%Ta!g%Ta~P#/sOa#cq!]#cq'z#cq'w#cq!Y#cq!k#cqv#cq!_#cq%i#cq!g#cq~P!:tO![3lO!]'YX!k'YX~P%[O!].tO!k(ka~O!].tO!k(ka~P!:tO!Y3oO~O$O!na!^!na~PKlO$O!ja!]!ja!^!ja~P#BwO$O!ra!^!ra~P!=[O$O!ta!^!ta~P!?rOg']X!]']X~P!,TO!]/POg(pa~OSfO!_4TO$d4UO~O!^4YO~Ov4ZO~P#/sOa$mq!]$mq'z$mq'w$mq!Y$mq!k$mqv$mq!_$mq%i$mq!g$mq~P!:tO!Y4]O~P!&zO!S4^O~O!Q*OO'y*PO(z%POn'ia(y'ia!]'ia#`'ia~Og'ia$O'ia~P%-fO!Q*OO'y*POn'ka(y'ka(z'ka!]'ka#`'ka~Og'ka$O'ka~P%.XO(r$YO~P#/sO!YfX!Y$zX!]fX!]$zX!g%RX#`fX~P!0SOp%WO(T=WO~P!1uOp4bO!S%hO![4aO!_%iO(T%gO!]'eX!k'eX~O!]/pO!k)Oa~O!]/pO!g#vO!k)Oa~O!]/pO!g#vO(r'pO!k)Oa~Og$|i!]$|i#`$|i$O$|i~P!1WO![4jO!Y'gX!]'gX~P!3tO!]/yO!Y)Pa~O!]/yO!Y)Pa~P#/sOP]XR]X[]Xj]Xr]X!Q]X!S]X!Y]X!]]X!l]X!p]X#R]X#S]X#`]X#kfX#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#v]X#x]X#z]X#{]X$Q]X(a]X(r]X(y]X(z]X~Oj%YX!g%YX~P%2OOj4oO!g#vO~Oh%VO!g#vO!l%eO~Oh%VOr4tO!l%eO(r'pO~Or4yO!g#vO(r'pO~Os!nO!S4zO(VTO(YUO(e!mO~O(y$}On%ai!Q%ai'y%ai(z%ai!]%ai#`%ai~Og%ai$O%ai~P%5oO(z%POn%ci!Q%ci'y%ci(y%ci!]%ci#`%ci~Og%ci$O%ci~P%6bOg(_i!](_i~P!1WO#`5QOg(_i!](_i~P!1WO!k5VO~Oa$oq!]$oq'z$oq'w$oq!Y$oq!k$oqv$oq!_$oq%i$oq!g$oq~P!:tO!Y5ZO~O!]5[O!_)QX~P#/sOa$zX!_$zX%^]X'z$zX!]$zX~P!0SO%^5_OaoX!_oX'zoX!]oX~P$#OOp5`O(T#nO~O%^5_O~Ob5fO%j5gO(T+qO(VTO(YUO!]'tX!^'tX~O!]1TO!^)Xa~O[5kO~O`5lO~O[5pO~Oa%nO'z%nO~P#/sO!]5uO#`5wO!^)UX~O!^5xO~Or6OOs!nO!S*iO!b!yO!c!vO!d!vO!|<VO#T!pO#U!pO#V!pO#W!pO#X!pO#[5}O#]!zO(U!lO(VTO(YUO(e!mO(o!sO~O!^5|O~P%;eOn6TO!_1oO%i6SO~Oh%VOn6TO!_1oO%i6SO~Ob6[O(T#nO(VTO(YUO!]'sX!^'sX~O!]1zO!^)Va~O(VTO(YUO(e6^O~O`6bO~Oj6eO&[6fO~PNXO!k6gO~P%[Oa6iO~Oa6iO~P%[Ob2bO!^6nO&j2aO~P`O!g6pO~O!g6rOh(ji!](ji!^(ji!g(ji!l(jir(ji(r(ji~O!]#hi!^#hi~P#BwO#`6sO!]#hi!^#hi~O!]!ai!^!ai~P#BwOa%nO#`6|O'z%nO~Oa%nO!g#vO#`6|O'z%nO~O!](tq!k(tqa(tq'z(tq~P!:tO!](jO!k(sq~O!S%hO!_%iO#j7TO(T%gO~O!_'`O%i7WO~On7[O!_'`O%i7WO~O#k'iaP'iaR'ia['iaa'iaj'iar'ia!S'ia!l'ia!p'ia#R'ia#n'ia#o'ia#p'ia#q'ia#r'ia#s'ia#t'ia#u'ia#v'ia#x'ia#z'ia#{'ia'z'ia(a'ia(r'ia!k'ia!Y'ia'w'iav'ia!_'ia%i'ia!g'ia~P%-fO#k'kaP'kaR'ka['kaa'kaj'kar'ka!S'ka!l'ka!p'ka#R'ka#n'ka#o'ka#p'ka#q'ka#r'ka#s'ka#t'ka#u'ka#v'ka#x'ka#z'ka#{'ka'z'ka(a'ka(r'ka!k'ka!Y'ka'w'kav'ka!_'ka%i'ka!g'ka~P%.XO#k$|iP$|iR$|i[$|ia$|ij$|ir$|i!S$|i!]$|i!l$|i!p$|i#R$|i#n$|i#o$|i#p$|i#q$|i#r$|i#s$|i#t$|i#u$|i#v$|i#x$|i#z$|i#{$|i'z$|i(a$|i(r$|i!k$|i!Y$|i'w$|i#`$|iv$|i!_$|i%i$|i!g$|i~P#/sO#k%aiP%aiR%ai[%aia%aij%air%ai!S%ai!l%ai!p%ai#R%ai#n%ai#o%ai#p%ai#q%ai#r%ai#s%ai#t%ai#u%ai#v%ai#x%ai#z%ai#{%ai'z%ai(a%ai(r%ai!k%ai!Y%ai'w%aiv%ai!_%ai%i%ai!g%ai~P%5oO#k%ciP%ciR%ci[%cia%cij%cir%ci!S%ci!l%ci!p%ci#R%ci#n%ci#o%ci#p%ci#q%ci#r%ci#s%ci#t%ci#u%ci#v%ci#x%ci#z%ci#{%ci'z%ci(a%ci(r%ci!k%ci!Y%ci'w%civ%ci!_%ci%i%ci!g%ci~P%6bO!]'Ya!k'Ya~P!:tO!].tO!k(ki~O$O#ci!]#ci!^#ci~P#BwOP$[OR#zO!Q#yO!S#{O!l#xO!p$[O(aVO[#mij#mir#mi#R#mi#o#mi#p#mi#q#mi#r#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi$O#mi(r#mi(y#mi(z#mi!]#mi!^#mi~O#n#mi~P%NdO#n<_O~P%NdOP$[OR#zOr<kO!Q#yO!S#{O!l#xO!p$[O#n<_O#o<`O#p<`O#q<`O(aVO[#mij#mi#R#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi$O#mi(r#mi(y#mi(z#mi!]#mi!^#mi~O#r#mi~P&!lO#r<aO~P&!lOP$[OR#zO[<mOj<bOr<kO!Q#yO!S#{O!l#xO!p$[O#R<bO#n<_O#o<`O#p<`O#q<`O#r<aO#s<bO#t<bO#u<lO(aVO#x#mi#z#mi#{#mi$O#mi(r#mi(y#mi(z#mi!]#mi!^#mi~O#v#mi~P&$tOP$[OR#zO[<mOj<bOr<kO!Q#yO!S#{O!l#xO!p$[O#R<bO#n<_O#o<`O#p<`O#q<`O#r<aO#s<bO#t<bO#u<lO#v<cO(aVO(z#}O#z#mi#{#mi$O#mi(r#mi(y#mi!]#mi!^#mi~O#x<eO~P&&uO#x#mi~P&&uO#v<cO~P&$tOP$[OR#zO[<mOj<bOr<kO!Q#yO!S#{O!l#xO!p$[O#R<bO#n<_O#o<`O#p<`O#q<`O#r<aO#s<bO#t<bO#u<lO#v<cO#x<eO(aVO(y#|O(z#}O#{#mi$O#mi(r#mi!]#mi!^#mi~O#z#mi~P&)UO#z<gO~P&)UOa#|y!]#|y'z#|y'w#|y!Y#|y!k#|yv#|y!_#|y%i#|y!g#|y~P!:tO[#mij#mir#mi#R#mi#r#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi$O#mi(r#mi!]#mi!^#mi~OP$[OR#zO!Q#yO!S#{O!l#xO!p$[O#n<_O#o<`O#p<`O#q<`O(aVO(y#mi(z#mi~P&,QOn>^O!Q*OO'y*PO(y$}O(z%POP#miR#mi!S#mi!l#mi!p#mi#n#mi#o#mi#p#mi#q#mi(a#mi~P&,QO#S$dOP(`XR(`X[(`Xj(`Xn(`Xr(`X!Q(`X!S(`X!l(`X!p(`X#R(`X#n(`X#o(`X#p(`X#q(`X#r(`X#s(`X#t(`X#u(`X#v(`X#x(`X#z(`X#{(`X$O(`X'y(`X(a(`X(r(`X(y(`X(z(`X!](`X!^(`X~O$O$Pi!]$Pi!^$Pi~P#BwO$O!ri!^!ri~P$+oOg']a!]']a~P!1WO!^7nO~O!]'da!^'da~P#BwO!Y7oO~P#/sO!g#vO(r'pO!]'ea!k'ea~O!]/pO!k)Oi~O!]/pO!g#vO!k)Oi~Og$|q!]$|q#`$|q$O$|q~P!1WO!Y'ga!]'ga~P#/sO!g7vO~O!]/yO!Y)Pi~P#/sO!]/yO!Y)Pi~O!Y7yO~Oh%VOr8OO!l%eO(r'pO~Oj8QO!g#vO~Or8TO!g#vO(r'pO~O!Q*OO'y*PO(z%POn'ja(y'ja!]'ja#`'ja~Og'ja$O'ja~P&5RO!Q*OO'y*POn'la(y'la(z'la!]'la#`'la~Og'la$O'la~P&5tOg(_q!](_q~P!1WO#`8VOg(_q!](_q~P!1WO!Y8WO~Og%Oq!]%Oq#`%Oq$O%Oq~P!1WOa$oy!]$oy'z$oy'w$oy!Y$oy!k$oyv$oy!_$oy%i$oy!g$oy~P!:tO!g6rO~O!]5[O!_)Qa~O!_'`OP$TaR$Ta[$Taj$Tar$Ta!Q$Ta!S$Ta!]$Ta!l$Ta!p$Ta#R$Ta#n$Ta#o$Ta#p$Ta#q$Ta#r$Ta#s$Ta#t$Ta#u$Ta#v$Ta#x$Ta#z$Ta#{$Ta(a$Ta(r$Ta(y$Ta(z$Ta~O%i7WO~P&8fO%^8[Oa%[i!_%[i'z%[i!]%[i~Oa#cy!]#cy'z#cy'w#cy!Y#cy!k#cyv#cy!_#cy%i#cy!g#cy~P!:tO[8^O~Ob8`O(T+qO(VTO(YUO~O!]1TO!^)Xi~O`8dO~O(e(|O!]'pX!^'pX~O!]5uO!^)Ua~O!^8nO~P%;eO(o!sO~P$&YO#[8oO~O!_1oO~O!_1oO%i8qO~On8tO!_1oO%i8qO~O[8yO!]'sa!^'sa~O!]1zO!^)Vi~O!k8}O~O!k9OO~O!k9RO~O!k9RO~P%[Oa9TO~O!g9UO~O!k9VO~O!](wi!^(wi~P#BwOa%nO#`9_O'z%nO~O!](ty!k(tya(ty'z(ty~P!:tO!](jO!k(sy~O%i9bO~P&8fO!_'`O%i9bO~O#k$|qP$|qR$|q[$|qa$|qj$|qr$|q!S$|q!]$|q!l$|q!p$|q#R$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#t$|q#u$|q#v$|q#x$|q#z$|q#{$|q'z$|q(a$|q(r$|q!k$|q!Y$|q'w$|q#`$|qv$|q!_$|q%i$|q!g$|q~P#/sO#k'jaP'jaR'ja['jaa'jaj'jar'ja!S'ja!l'ja!p'ja#R'ja#n'ja#o'ja#p'ja#q'ja#r'ja#s'ja#t'ja#u'ja#v'ja#x'ja#z'ja#{'ja'z'ja(a'ja(r'ja!k'ja!Y'ja'w'jav'ja!_'ja%i'ja!g'ja~P&5RO#k'laP'laR'la['laa'laj'lar'la!S'la!l'la!p'la#R'la#n'la#o'la#p'la#q'la#r'la#s'la#t'la#u'la#v'la#x'la#z'la#{'la'z'la(a'la(r'la!k'la!Y'la'w'lav'la!_'la%i'la!g'la~P&5tO#k%OqP%OqR%Oq[%Oqa%Oqj%Oqr%Oq!S%Oq!]%Oq!l%Oq!p%Oq#R%Oq#n%Oq#o%Oq#p%Oq#q%Oq#r%Oq#s%Oq#t%Oq#u%Oq#v%Oq#x%Oq#z%Oq#{%Oq'z%Oq(a%Oq(r%Oq!k%Oq!Y%Oq'w%Oq#`%Oqv%Oq!_%Oq%i%Oq!g%Oq~P#/sO!]'Yi!k'Yi~P!:tO$O#cq!]#cq!^#cq~P#BwO(y$}OP%aaR%aa[%aaj%aar%aa!S%aa!l%aa!p%aa#R%aa#n%aa#o%aa#p%aa#q%aa#r%aa#s%aa#t%aa#u%aa#v%aa#x%aa#z%aa#{%aa$O%aa(a%aa(r%aa!]%aa!^%aa~On%aa!Q%aa'y%aa(z%aa~P&IyO(z%POP%caR%ca[%caj%car%ca!S%ca!l%ca!p%ca#R%ca#n%ca#o%ca#p%ca#q%ca#r%ca#s%ca#t%ca#u%ca#v%ca#x%ca#z%ca#{%ca$O%ca(a%ca(r%ca!]%ca!^%ca~On%ca!Q%ca'y%ca(y%ca~P&LQOn>^O!Q*OO'y*PO(z%PO~P&IyOn>^O!Q*OO'y*PO(y$}O~P&LQOR0kO!Q0kO!S0lO#S$dOP}a[}aj}an}ar}a!l}a!p}a#R}a#n}a#o}a#p}a#q}a#r}a#s}a#t}a#u}a#v}a#x}a#z}a#{}a$O}a'y}a(a}a(r}a(y}a(z}a!]}a!^}a~O!Q*OO'y*POP$saR$sa[$saj$san$sar$sa!S$sa!l$sa!p$sa#R$sa#n$sa#o$sa#p$sa#q$sa#r$sa#s$sa#t$sa#u$sa#v$sa#x$sa#z$sa#{$sa$O$sa(a$sa(r$sa(y$sa(z$sa!]$sa!^$sa~O!Q*OO'y*POP$uaR$ua[$uaj$uan$uar$ua!S$ua!l$ua!p$ua#R$ua#n$ua#o$ua#p$ua#q$ua#r$ua#s$ua#t$ua#u$ua#v$ua#x$ua#z$ua#{$ua$O$ua(a$ua(r$ua(y$ua(z$ua!]$ua!^$ua~On>^O!Q*OO'y*PO(y$}O(z%PO~OP%TaR%Ta[%Taj%Tar%Ta!S%Ta!l%Ta!p%Ta#R%Ta#n%Ta#o%Ta#p%Ta#q%Ta#r%Ta#s%Ta#t%Ta#u%Ta#v%Ta#x%Ta#z%Ta#{%Ta$O%Ta(a%Ta(r%Ta!]%Ta!^%Ta~P''VO$O$mq!]$mq!^$mq~P#BwO$O$oq!]$oq!^$oq~P#BwO!^9oO~O$O9pO~P!1WO!g#vO!]'ei!k'ei~O!g#vO(r'pO!]'ei!k'ei~O!]/pO!k)Oq~O!Y'gi!]'gi~P#/sO!]/yO!Y)Pq~Or9wO!g#vO(r'pO~O[9yO!Y9xO~P#/sO!Y9xO~Oj:PO!g#vO~Og(_y!](_y~P!1WO!]'na!_'na~P#/sOa%[q!_%[q'z%[q!]%[q~P#/sO[:UO~O!]1TO!^)Xq~O`:YO~O#`:ZO!]'pa!^'pa~O!]5uO!^)Ui~P#BwO!S:]O~O!_1oO%i:`O~O(VTO(YUO(e:eO~O!]1zO!^)Vq~O!k:hO~O!k:iO~O!k:jO~O!k:jO~P%[O#`:mO!]#hy!^#hy~O!]#hy!^#hy~P#BwO%i:rO~P&8fO!_'`O%i:rO~O$O#|y!]#|y!^#|y~P#BwOP$|iR$|i[$|ij$|ir$|i!S$|i!l$|i!p$|i#R$|i#n$|i#o$|i#p$|i#q$|i#r$|i#s$|i#t$|i#u$|i#v$|i#x$|i#z$|i#{$|i$O$|i(a$|i(r$|i!]$|i!^$|i~P''VO!Q*OO'y*PO(z%POP'iaR'ia['iaj'ian'iar'ia!S'ia!l'ia!p'ia#R'ia#n'ia#o'ia#p'ia#q'ia#r'ia#s'ia#t'ia#u'ia#v'ia#x'ia#z'ia#{'ia$O'ia(a'ia(r'ia(y'ia!]'ia!^'ia~O!Q*OO'y*POP'kaR'ka['kaj'kan'kar'ka!S'ka!l'ka!p'ka#R'ka#n'ka#o'ka#p'ka#q'ka#r'ka#s'ka#t'ka#u'ka#v'ka#x'ka#z'ka#{'ka$O'ka(a'ka(r'ka(y'ka(z'ka!]'ka!^'ka~O(y$}OP%aiR%ai[%aij%ain%air%ai!Q%ai!S%ai!l%ai!p%ai#R%ai#n%ai#o%ai#p%ai#q%ai#r%ai#s%ai#t%ai#u%ai#v%ai#x%ai#z%ai#{%ai$O%ai'y%ai(a%ai(r%ai(z%ai!]%ai!^%ai~O(z%POP%ciR%ci[%cij%cin%cir%ci!Q%ci!S%ci!l%ci!p%ci#R%ci#n%ci#o%ci#p%ci#q%ci#r%ci#s%ci#t%ci#u%ci#v%ci#x%ci#z%ci#{%ci$O%ci'y%ci(a%ci(r%ci(y%ci!]%ci!^%ci~O$O$oy!]$oy!^$oy~P#BwO$O#cy!]#cy!^#cy~P#BwO!g#vO!]'eq!k'eq~O!]/pO!k)Oy~O!Y'gq!]'gq~P#/sOr:|O!g#vO(r'pO~O[;QO!Y;PO~P#/sO!Y;PO~Og(_!R!](_!R~P!1WOa%[y!_%[y'z%[y!]%[y~P#/sO!]1TO!^)Xy~O!]5uO!^)Uq~O(T;XO~O!_1oO%i;[O~O!k;_O~O%i;dO~P&8fOP$|qR$|q[$|qj$|qr$|q!S$|q!l$|q!p$|q#R$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#t$|q#u$|q#v$|q#x$|q#z$|q#{$|q$O$|q(a$|q(r$|q!]$|q!^$|q~P''VO!Q*OO'y*PO(z%POP'jaR'ja['jaj'jan'jar'ja!S'ja!l'ja!p'ja#R'ja#n'ja#o'ja#p'ja#q'ja#r'ja#s'ja#t'ja#u'ja#v'ja#x'ja#z'ja#{'ja$O'ja(a'ja(r'ja(y'ja!]'ja!^'ja~O!Q*OO'y*POP'laR'la['laj'lan'lar'la!S'la!l'la!p'la#R'la#n'la#o'la#p'la#q'la#r'la#s'la#t'la#u'la#v'la#x'la#z'la#{'la$O'la(a'la(r'la(y'la(z'la!]'la!^'la~OP%OqR%Oq[%Oqj%Oqr%Oq!S%Oq!l%Oq!p%Oq#R%Oq#n%Oq#o%Oq#p%Oq#q%Oq#r%Oq#s%Oq#t%Oq#u%Oq#v%Oq#x%Oq#z%Oq#{%Oq$O%Oq(a%Oq(r%Oq!]%Oq!^%Oq~P''VOg%e!Z!]%e!Z#`%e!Z$O%e!Z~P!1WO!Y;hO~P#/sOr;iO!g#vO(r'pO~O[;kO!Y;hO~P#/sO!]'pq!^'pq~P#BwO!]#h!Z!^#h!Z~P#BwO#k%e!ZP%e!ZR%e!Z[%e!Za%e!Zj%e!Zr%e!Z!S%e!Z!]%e!Z!l%e!Z!p%e!Z#R%e!Z#n%e!Z#o%e!Z#p%e!Z#q%e!Z#r%e!Z#s%e!Z#t%e!Z#u%e!Z#v%e!Z#x%e!Z#z%e!Z#{%e!Z'z%e!Z(a%e!Z(r%e!Z!k%e!Z!Y%e!Z'w%e!Z#`%e!Zv%e!Z!_%e!Z%i%e!Z!g%e!Z~P#/sOr;tO!g#vO(r'pO~O!Y;uO~P#/sOr;|O!g#vO(r'pO~O!Y;}O~P#/sOP%e!ZR%e!Z[%e!Zj%e!Zr%e!Z!S%e!Z!l%e!Z!p%e!Z#R%e!Z#n%e!Z#o%e!Z#p%e!Z#q%e!Z#r%e!Z#s%e!Z#t%e!Z#u%e!Z#v%e!Z#x%e!Z#z%e!Z#{%e!Z$O%e!Z(a%e!Z(r%e!Z!]%e!Z!^%e!Z~P''VOr<QO!g#vO(r'pO~Ov(fX~P1qO!Q%rO~P!)[O(U!lO~P!)[O!YfX!]fX#`fX~P%2OOP]XR]X[]Xj]Xr]X!Q]X!S]X!]]X!]fX!l]X!p]X#R]X#S]X#`]X#`fX#kfX#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#v]X#x]X#z]X#{]X$Q]X(a]X(r]X(y]X(z]X~O!gfX!k]X!kfX(rfX~P'LTOP<UOQ<UOSfOd>ROe!iOpkOr<UOskOtkOzkO|<UO!O<UO!SWO!WkO!XkO!_XO!i<XO!lZO!o<UO!p<UO!q<UO!s<YO!u<]O!x!hO$W!kO$n>PO(T)]O(VTO(YUO(aVO(o[O~O!]<iO!^$qa~Oh%VOp%WOr%XOs$tOt$tOz%YO|%ZO!O<tO!S${O!_$|O!i>WO!l$xO#j<zO$W%`O$t<vO$v<xO$y%aO(T(vO(VTO(YUO(a$uO(y$}O(z%PO~Ol)dO~P(!yOr!eX(r!eX~P#!iOr(jX(r(jX~P##[O!^]X!^fX~P'LTO!YfX!Y$zX!]fX!]$zX#`fX~P!0SO#k<^O~O!g#vO#k<^O~O#`<nO~Oj<bO~O#`=OO!](wX!^(wX~O#`<nO!](uX!^(uX~O#k=PO~Og=RO~P!1WO#k=XO~O#k=YO~Og=RO(T&ZO~O!g#vO#k=ZO~O!g#vO#k=PO~O$O=[O~P#BwO#k=]O~O#k=^O~O#k=cO~O#k=dO~O#k=eO~O#k=fO~O$O=gO~P!1WO$O=hO~P!1WOl=sO~P7eOk#S#T#U#W#X#[#i#j#u$n$t$v$y%]%^%h%i%j%q%s%v%w%y%{~(OT#o!X'|(U#ps#n#qr!Q'}$]'}(T$_(e~",goto:"$9Y)]PPPPPP)^PP)aP)rP+W/]PPPP6mPP7TPP=QPPP@tPA^PA^PPPA^PCfPA^PA^PA^PCjPCoPD^PIWPPPI[PPPPI[L_PPPLeMVPI[PI[PP! eI[PPPI[PI[P!#lI[P!'S!(X!(bP!)U!)Y!)U!,gPPPPPPP!-W!(XPP!-h!/YP!2iI[I[!2n!5z!:h!:h!>gPPP!>oI[PPPPPPPPP!BOP!C]PPI[!DnPI[PI[I[I[I[I[PI[!FQP!I[P!LbP!Lf!Lp!Lt!LtP!IXP!Lx!LxP#!OP#!SI[PI[#!Y#%_CjA^PA^PA^A^P#&lA^A^#)OA^#+vA^#.SA^A^#.r#1W#1W#1]#1f#1W#1qPP#1WPA^#2ZA^#6YA^A^6mPPP#:_PPP#:x#:xP#:xP#;`#:xPP#;fP#;]P#;]#;y#;]#<e#<k#<n)aP#<q)aP#<z#<z#<zP)aP)aP)aP)aPP)aP#=Q#=TP#=T)aP#=XP#=[P)aP)aP)aP)aP)aP)a)aPP#=b#=h#=s#=y#>P#>V#>]#>k#>q#>{#?R#?]#?c#?s#?y#@k#@}#AT#AZ#Ai#BO#Cs#DR#DY#Et#FS#Gt#HS#HY#H`#Hf#Hp#Hv#H|#IW#Ij#IpPPPPPPPPPPP#IvPPPPPPP#Jk#Mx$ b$ i$ qPPP$']P$'f$*_$0x$0{$1O$1}$2Q$2X$2aP$2g$2jP$3W$3[$4S$5b$5g$5}PP$6S$6Y$6^$6a$6e$6i$7e$7|$8e$8i$8l$8o$8y$8|$9Q$9UR!|RoqOXst!Z#d%m&r&t&u&w,s,x2[2_Y!vQ'`-e1o5{Q%tvQ%|yQ&T|Q&j!VS'W!e-]Q'f!iS'l!r!yU*k$|*Z*oQ+o%}S+|&V&WQ,d&dQ-c'_Q-m'gQ-u'mQ0[*qQ1b,OQ1y,eR<{<Y%SdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+],p,s,x-i-q.P.V.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3l4z6T6e6f6i6|8t9T9_S#q]<V!r)_$Z$n'X)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SU+P%]<s<tQ+t&PQ,f&gQ,m&oQ0x+gQ0}+iQ1Y+uQ2R,kQ3`.gQ5`0|Q5f1TQ6[1zQ7Y3dQ8`5gR9e7['QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>S!S!nQ!r!v!y!z$|'W'_'`'l'm'n*k*o*q*r-]-c-e-u0[0_1o5{5}%[$ti#v$b$c$d$x${%O%Q%^%_%c)y*R*T*V*Y*a*g*w*x+f+i,S,V.f/P/d/m/x/y/{0`0b0i0j0o1f1i1q3c4^4_4j4o5Q5[5_6S7W7v8Q8V8[8q9b9p9y:P:`:r;Q;[;d;k<l<m<o<p<q<r<u<v<w<x<y<z=S=T=U=V=X=Y=]=^=_=`=a=b=c=d=g=h>P>X>Y>]>^Q&X|Q'U!eS'[%i-`Q+t&PQ,P&WQ,f&gQ0n+SQ1Y+uQ1_+{Q2Q,jQ2R,kQ5f1TQ5o1aQ6[1zQ6_1|Q6`2PQ8`5gQ8c5lQ8|6bQ:X8dQ:f8yQ;V:YR<}*ZrnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_R,h&k&z^OPXYstuvwz!Z!`!g!j!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'b'r(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>R>S[#]WZ#W#Z'X(T!b%jm#h#i#l$x%e%h(^(h(i(j*Y*^*b+Z+[+^,o-V.T.Z.[.]._/m/p2d3[3]4a6r7TQ%wxQ%{yW&Q|&V&W,OQ&_!TQ'c!hQ'e!iQ(q#sS+n%|%}Q+r&PQ,_&bQ,c&dS-l'f'gQ.i(rQ1R+oQ1X+uQ1Z+vQ1^+zQ1t,`S1x,d,eQ2|-mQ5e1TQ5i1WQ5n1`Q6Z1yQ8_5gQ8b5kQ8f5pQ:T8^R;T:U!U$zi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y!^%yy!i!u%{%|%}'V'e'f'g'k'u*j+n+o-Y-l-m-t0R0U1R2u2|3T4r4s4v7}9{Q+h%wQ,T&[Q,W&]Q,b&dQ.h(qQ1s,_U1w,c,d,eQ3e.iQ6U1tS6Y1x1yQ8x6Z#f>T#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k<o<q<u<w<y=S=U=X=]=_=a=c=g>]>^o>U<l<m<p<r<v<x<z=T=V=Y=^=`=b=d=hW%Ti%V*y>PS&[!Q&iQ&]!RQ&^!SU*}%[%d=sR,R&Y%]%Si#v$b$c$d$x${%O%Q%^%_%c)y*R*T*V*Y*a*g*w*x+f+i,S,V.f/P/d/m/x/y/{0`0b0i0j0o1f1i1q3c4^4_4j4o5Q5[5_6S7W7v8Q8V8[8q9b9p9y:P:`:r;Q;[;d;k<l<m<o<p<q<r<u<v<w<x<y<z=S=T=U=V=X=Y=]=^=_=`=a=b=c=d=g=h>P>X>Y>]>^T)z$u){V+P%]<s<tW'[!e%i*Z-`S(}#y#zQ+c%rQ+y&SS.b(m(nQ1j,XQ5T0kR8i5u'QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>S$i$^c#Y#e%q%s%u(S(Y(t(y)R)S)T)U)V)W)X)Y)Z)[)^)`)b)g)q+d+x-Z-x-}.S.U.s.v.z.|.}/O/b0p2k2n3O3V3k3p3q3r3s3t3u3v3w3x3y3z3{3|4P4Q4X5X5c6u6{7Q7a7b7k7l8k9X9]9g9m9n:o;W;`<W=vT#TV#U'RkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SQ'Y!eR2q-]!W!nQ!e!r!v!y!z$|'W'_'`'l'm'n*Z*k*o*q*r-]-c-e-u0[0_1o5{5}R1l,ZnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&y!^Q'v!xS(s#u<^Q+l%zQ,]&_Q,^&aQ-j'dQ-w'oS.r(x=PS0q+X=ZQ1P+mQ1n,[Q2c,zQ2e,{Q2m-WQ2z-kQ2}-oS5Y0r=eQ5a1QS5d1S=fQ6t2oQ6x2{Q6}3SQ8]5bQ9Y6vQ9Z6yQ9^7OR:l9V$d$]c#Y#e%s%u(S(Y(t(y)R)S)T)U)V)W)X)Y)Z)[)^)`)b)g)q+d+x-Z-x-}.S.U.s.v.z.}/O/b0p2k2n3O3V3k3p3q3r3s3t3u3v3w3x3y3z3{3|4P4Q4X5X5c6u6{7Q7a7b7k7l8k9X9]9g9m9n:o;W;`<W=vS(o#p'iQ)P#zS+b%q.|S.c(n(pR3^.d'QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SS#q]<VQ&t!XQ&u!YQ&w![Q&x!]R2Z,vQ'a!hQ+e%wQ-h'cS.e(q+hQ2x-gW3b.h.i0w0yQ6w2yW7U3_3a3e5^U9a7V7X7ZU:q9c9d9fS;b:p:sQ;p;cR;x;qU!wQ'`-eT5y1o5{!Q_OXZ`st!V!Z#d#h%e%m&i&k&r&t&u&w(j,s,x.[2[2_]!pQ!r'`-e1o5{T#q]<V%^{OPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_S(}#y#zS.b(m(n!s=l$Z$n'X)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SU$fd)_,mS(p#p'iU*v%R(w4OU0m+O.n7gQ5^0xQ7V3`Q9d7YR:s9em!tQ!r!v!y!z'`'l'm'n-e-u1o5{5}Q't!uS(f#g2US-s'k'wQ/s*]Q0R*jQ3U-vQ4f/tQ4r0TQ4s0UQ4x0^Q7r4`S7}4t4vS8R4y4{Q9r7sQ9v7yQ9{8OQ:Q8TS:{9w9xS;g:|;PS;s;h;iS;{;t;uS<P;|;}R<S<QQ#wbQ's!uS(e#g2US(g#m+WQ+Y%fQ+j%xQ+p&OU-r'k't'wQ.W(fU/r*]*`/wQ0S*jQ0V*lQ1O+kQ1u,aS3R-s-vQ3Z.`S4e/s/tQ4n0PS4q0R0^Q4u0WQ6W1vQ7P3US7q4`4bQ7u4fU7|4r4x4{Q8P4wQ8v6XS9q7r7sQ9u7yQ9}8RQ:O8SQ:c8wQ:y9rS:z9v9xQ;S:QQ;^:dS;f:{;PS;r;g;hS;z;s;uS<O;{;}Q<R<PQ<T<SQ=o=jQ={=tR=|=uV!wQ'`-e%^aOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_S#wz!j!r=i$Z$n'X)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SR=o>R%^bOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_Q%fj!^%xy!i!u%{%|%}'V'e'f'g'k'u*j+n+o-Y-l-m-t0R0U1R2u2|3T4r4s4v7}9{S&Oz!jQ+k%yQ,a&dW1v,b,c,d,eU6X1w1x1yS8w6Y6ZQ:d8x!r=j$Z$n'X)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SQ=t>QR=u>R%QeOPXYstuvw!Z!`!g!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&r&t&u&w&{'T'b'r(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_Y#bWZ#W#Z(T!b%jm#h#i#l$x%e%h(^(h(i(j*Y*^*b+Z+[+^,o-V.T.Z.[.]._/m/p2d3[3]4a6r7TQ,n&o!p=k$Z$n)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SR=n'XU']!e%i*ZR2s-`%SdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+],p,s,x-i-q.P.V.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3l4z6T6e6f6i6|8t9T9_!r)_$Z$n'X)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SQ,m&oQ0x+gQ3`.gQ7Y3dR9e7[!b$Tc#Y%q(S(Y(t(y)Z)[)`)g+x-x-}.S.U.s.v/b0p3O3V3k3{5X5c6{7Q7a9]:o<W!P<d)^)q-Z.|2k2n3p3y3z4P4X6u7b7k7l8k9X9g9m9n;W;`=v!f$Vc#Y%q(S(Y(t(y)W)X)Z)[)`)g+x-x-}.S.U.s.v/b0p3O3V3k3{5X5c6{7Q7a9]:o<W!T<f)^)q-Z.|2k2n3p3v3w3y3z4P4X6u7b7k7l8k9X9g9m9n;W;`=v!^$Zc#Y%q(S(Y(t(y)`)g+x-x-}.S.U.s.v/b0p3O3V3k3{5X5c6{7Q7a9]:o<WQ4_/kz>S)^)q-Z.|2k2n3p4P4X6u7b7k7l8k9X9g9m9n;W;`=vQ>X>ZR>Y>['QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SS$oh$pR4U/U'XgOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/U/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>ST$kf$qQ$ifS)j$l)nR)v$qT$jf$qT)l$l)n'XhOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/U/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>ST$oh$pQ$rhR)u$p%^jOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_!s>Q$Z$n'X)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>S#glOPXZst!Z!`!o#S#d#o#{$n%m&k&n&o&r&t&u&w&{'T'b)O)s*i+]+g,p,s,x-i.g/V/n0]0l1r2S2T2V2X2[2_2a3d4T4z6T6e6f6i7[8t9T!U%Ri$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y#f(w#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k<o<q<u<w<y=S=U=X=]=_=a=c=g>]>^Q+T%aQ/c*Oo4O<l<m<p<r<v<x<z=T=V=Y=^=`=b=d=h!U$yi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>YQ*c$zU*l$|*Z*oQ+U%bQ0W*m#f=q#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k<o<q<u<w<y=S=U=X=]=_=a=c=g>]>^n=r<l<m<p<r<v<x<z=T=V=Y=^=`=b=d=hQ=w>TQ=x>UQ=y>VR=z>W!U%Ri$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y#f(w#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k<o<q<u<w<y=S=U=X=]=_=a=c=g>]>^o4O<l<m<p<r<v<x<z=T=V=Y=^=`=b=d=hnoOXst!Z#d%m&r&t&u&w,s,x2[2_S*f${*YQ-R'OQ-S'QR4i/y%[%Si#v$b$c$d$x${%O%Q%^%_%c)y*R*T*V*Y*a*g*w*x+f+i,S,V.f/P/d/m/x/y/{0`0b0i0j0o1f1i1q3c4^4_4j4o5Q5[5_6S7W7v8Q8V8[8q9b9p9y:P:`:r;Q;[;d;k<l<m<o<p<q<r<u<v<w<x<y<z=S=T=U=V=X=Y=]=^=_=`=a=b=c=d=g=h>P>X>Y>]>^Q,U&]Q1h,WQ5s1gR8h5tV*n$|*Z*oU*n$|*Z*oT5z1o5{S0P*i/nQ4w0]T8S4z:]Q+j%xQ0V*lQ1O+kQ1u,aQ6W1vQ8v6XQ:c8wR;^:d!U%Oi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Yx*R$v)e*S*u+V/v0d0e4R4g5R5S5W7p8U:R:x=p=}>OS0`*t0a#f<o#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k<o<q<u<w<y=S=U=X=]=_=a=c=g>]>^n<p<l<m<p<r<v<x<z=T=V=Y=^=`=b=d=h!d=S(u)c*[*e.j.m.q/_/k/|0v1e3h4[4h4l5r7]7`7w7z8X8Z9t9|:S:};R;e;j;v>Z>[`=T3}7c7f7j9h:t:w;yS=_.l3iT=`7e9k!U%Qi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y|*T$v)e*U*t+V/g/v0d0e4R4g4|5R5S5W7p8U:R:x=p=}>OS0b*u0c#f<q#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k<o<q<u<w<y=S=U=X=]=_=a=c=g>]>^n<r<l<m<p<r<v<x<z=T=V=Y=^=`=b=d=h!h=U(u)c*[*e.k.l.q/_/k/|0v1e3f3h4[4h4l5r7]7^7`7w7z8X8Z9t9|:S:};R;e;j;v>Z>[d=V3}7d7e7j9h9i:t:u:w;yS=a.m3jT=b7f9lrnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_Q&f!UR,p&ornOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_R&f!UQ,Y&^R1d,RsnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_Q1p,_S6R1s1tU8p6P6Q6US:_8r8sS;Y:^:aQ;m;ZR;w;nQ&m!VR,i&iR6_1|R:f8yW&Q|&V&W,OR1Z+vQ&r!WR,s&sR,y&xT2],x2_R,}&yQ,|&yR2f,}Q'y!{R-y'ySsOtQ#dXT%ps#dQ#OTR'{#OQ#RUR'}#RQ){$uR/`){Q#UVR(Q#UQ#XWU(W#X(X.QQ(X#YR.Q(YQ-^'YR2r-^Q.u(yS3m.u3nR3n.vQ-e'`R2v-eY!rQ'`-e1o5{R'j!rQ/Q)eR4S/QU#_W%h*YU(_#_(`.RQ(`#`R.R(ZQ-a']R2t-at`OXst!V!Z#d%m&i&k&r&t&u&w,s,x2[2_S#hZ%eU#r`#h.[R.[(jQ(k#jQ.X(gW.a(k.X3X7RQ3X.YR7R3YQ)n$lR/W)nQ$phR)t$pQ$`cU)a$`-|<jQ-|<WR<j)qQ/q*]W4c/q4d7t9sU4d/r/s/tS7t4e4fR9s7u$e*Q$v(u)c)e*[*e*t*u+Q+R+V.l.m.o.p.q/_/g/i/k/v/|0d0e0v1e3f3g3h3}4R4[4g4h4l4|5O5R5S5W5r7]7^7_7`7e7f7h7i7j7p7w7z8U8X8Z9h9i9j9t9|:R:S:t:u:v:w:x:};R;e;j;v;y=p=}>O>Z>[Q/z*eU4k/z4m7xQ4m/|R7x4lS*o$|*ZR0Y*ox*S$v)e*t*u+V/v0d0e4R4g5R5S5W7p8U:R:x=p=}>O!d.j(u)c*[*e.l.m.q/_/k/|0v1e3h4[4h4l5r7]7`7w7z8X8Z9t9|:S:};R;e;j;v>Z>[U/h*S.j7ca7c3}7e7f7j9h:t:w;yQ0a*tQ3i.lU4}0a3i9kR9k7e|*U$v)e*t*u+V/g/v0d0e4R4g4|5R5S5W7p8U:R:x=p=}>O!h.k(u)c*[*e.l.m.q/_/k/|0v1e3f3h4[4h4l5r7]7^7`7w7z8X8Z9t9|:S:};R;e;j;v>Z>[U/j*U.k7de7d3}7e7f7j9h9i:t:u:w;yQ0c*uQ3j.mU5P0c3j9lR9l7fQ*z%UR0g*zQ5]0vR8Y5]Q+_%kR0u+_Q5v1jS8j5v:[R:[8kQ,[&_R1m,[Q5{1oR8m5{Q1{,fS6]1{8zR8z6_Q1U+rW5h1U5j8a:VQ5j1XQ8a5iR:V8bQ+w&QR1[+wQ2_,xR6m2_YrOXst#dQ&v!ZQ+a%mQ,r&rQ,t&tQ,u&uQ,w&wQ2Y,sS2],x2_R6l2[Q%opQ&z!_Q&}!aQ'P!bQ'R!cQ'q!uQ+`%lQ+l%zQ,Q&XQ,h&mQ-P&|W-p'k's't'wQ-w'oQ0X*nQ1P+mQ1c,PS2O,i,lQ2g-OQ2h-RQ2i-SQ2}-oW3P-r-s-v-xQ5a1QQ5m1_Q5q1eQ6V1uQ6a2QQ6k2ZU6z3O3R3UQ6}3SQ8]5bQ8e5oQ8g5rQ8l5zQ8u6WQ8{6`S9[6{7PQ9^7OQ:W8cQ:b8vQ:g8|Q:n9]Q;U:XQ;]:cQ;a:oQ;l;VR;o;^Q%zyQ'd!iQ'o!uU+m%{%|%}Q-W'VU-k'e'f'gS-o'k'uQ0Q*jS1Q+n+oQ2o-YS2{-l-mQ3S-tS4p0R0UQ5b1RQ6v2uQ6y2|Q7O3TU7{4r4s4vQ9z7}R;O9{S$wi>PR*{%VU%Ui%V>PR0f*yQ$viS(u#v+iS)c$b$cQ)e$dQ*[$xS*e${*YQ*t%OQ*u%QQ+Q%^Q+R%_Q+V%cQ.l<oQ.m<qQ.o<uQ.p<wQ.q<yQ/_)yQ/g*RQ/i*TQ/k*VQ/v*aS/|*g/mQ0d*wQ0e*xl0v+f,V.f1i1q3c6S7W8q9b:`:r;[;dQ1e,SQ3f=SQ3g=UQ3h=XS3}<l<mQ4R/PS4[/d4^Q4g/xQ4h/yQ4l/{Q4|0`Q5O0bQ5R0iQ5S0jQ5W0oQ5r1fQ7]=]Q7^=_Q7_=aQ7`=cQ7e<pQ7f<rQ7h<vQ7i<xQ7j<zQ7p4_Q7w4jQ7z4oQ8U5QQ8X5[Q8Z5_Q9h=YQ9i=TQ9j=VQ9t7vQ9|8QQ:R8VQ:S8[Q:t=^Q:u=`Q:v=bQ:w=dQ:x9pQ:}9yQ;R:PQ;e=gQ;j;QQ;v;kQ;y=hQ=p>PQ=}>XQ>O>YQ>Z>]R>[>^Q+O%]Q.n<sR7g<tnpOXst!Z#d%m&r&t&u&w,s,x2[2_Q!fPS#fZ#oQ&|!`W'h!o*i0]4zQ(P#SQ)Q#{Q)r$nS,l&k&nQ,q&oQ-O&{S-T'T/nQ-g'bQ.x)OQ/[)sQ0s+]Q0y+gQ2W,pQ2y-iQ3a.gQ4W/VQ5U0lQ6Q1rQ6c2SQ6d2TQ6h2VQ6j2XQ6o2aQ7Z3dQ7m4TQ8s6TQ9P6eQ9Q6fQ9S6iQ9f7[Q:a8tR:k9T#[cOPXZst!Z!`!o#d#o#{%m&k&n&o&r&t&u&w&{'T'b)O*i+]+g,p,s,x-i.g/n0]0l1r2S2T2V2X2[2_2a3d4z6T6e6f6i7[8t9TQ#YWQ#eYQ%quQ%svS%uw!gS(S#W(VQ(Y#ZQ(t#uQ(y#xQ)R$OQ)S$PQ)T$QQ)U$RQ)V$SQ)W$TQ)X$UQ)Y$VQ)Z$WQ)[$XQ)^$ZQ)`$_Q)b$aQ)g$eW)q$n)s/V4TQ+d%tQ+x&RS-Z'X2pQ-x'rS-}(T.PQ.S(]Q.U(dQ.s(xQ.v(zQ.z<UQ.|<XQ.}<YQ/O<]Q/b)}Q0p+XQ2k-UQ2n-XQ3O-qQ3V.VQ3k.tQ3p<^Q3q<_Q3r<`Q3s<aQ3t<bQ3u<cQ3v<dQ3w<eQ3x<fQ3y<gQ3z<hQ3{.{Q3|<kQ4P<nQ4Q<{Q4X<iQ5X0rQ5c1SQ6u=OQ6{3QQ7Q3WQ7a3lQ7b=PQ7k=RQ7l=ZQ8k5wQ9X6sQ9]6|Q9g=[Q9m=eQ9n=fQ:o9_Q;W:ZQ;`:mQ<W#SR=v>SR#[WR'Z!el!tQ!r!v!y!z'`'l'm'n-e-u1o5{5}S'V!e-]U*j$|*Z*oS-Y'W'_S0U*k*qQ0^*rQ2u-cQ4v0[R4{0_R({#xQ!fQT-d'`-e]!qQ!r'`-e1o5{Q#p]R'i<VR)f$dY!uQ'`-e1o5{Q'k!rS'u!v!yS'w!z5}S-t'l'mQ-v'nR3T-uT#kZ%eS#jZ%eS%km,oU(g#h#i#lS.Y(h(iQ.^(jQ0t+^Q3Y.ZU3Z.[.]._S7S3[3]R9`7Td#^W#W#Z%h(T(^*Y+Z.T/mr#gZm#h#i#l%e(h(i(j+^.Z.[.]._3[3]7TS*]$x*bQ/t*^Q2U,oQ2l-VQ4`/pQ6q2dQ7s4aQ9W6rT=m'X+[V#aW%h*YU#`W%h*YS(U#W(^U(Z#Z+Z/mS-['X+[T.O(T.TV'^!e%i*ZQ$lfR)x$qT)m$l)nR4V/UT*_$x*bT*h${*YQ0w+fQ1g,VQ3_.fQ5t1iQ6P1qQ7X3cQ8r6SQ9c7WQ:^8qQ:p9bQ;Z:`Q;c:rQ;n;[R;q;dnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&l!VR,h&itmOXst!U!V!Z#d%m&i&r&t&u&w,s,x2[2_R,o&oT%lm,oR1k,XR,g&gQ&U|S+}&V&WR1^,OR+s&PT&p!W&sT&q!W&sT2^,x2_",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:u0e,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[m0e],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$i&j(Z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(Z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$i&j(WpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(WpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Wp(Z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$i&j(Wp(Z!b'|0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(X#S$i&j'}0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$i&j(Wp(Z!b'}0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$i&j!p),Q(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#v(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#v(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(V':f$i&j(Z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$i&j(Z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$i&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$d`$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$d``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$d`$i&j(Z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(Z!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$d`(Z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$i&j(Wp(Z!bOY%ZYZ&cZq%Zqr<Srs&}st%ZtuCruw%Zwx(rx!^%Z!^!_*g!_!c%Z!c!}Cr!}#O%Z#O#P&c#P#R%Z#R#SCr#S#T%Z#T#oCr#o#p*g#p$g%Z$g;'SCr;'S;=`El<%lOCr(r<__WS$i&j(Wp(Z!bOY<SYZ&cZr<Srs=^sw<Swx@nx!^<S!^!_Bm!_#O<S#O#P>`#P#o<S#o#pBm#p;'S<S;'S;=`Cl<%lO<S(Q=g]WS$i&j(Z!bOY=^YZ&cZw=^wx>`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$i&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(Z!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$i&j(WpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(WpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Wp(Z!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l<S%9[C}i$i&j(o%1l(Wp(Z!bOY%ZYZ&cZr%Zrs&}st%ZtuCruw%Zwx(rx!Q%Z!Q![Cr![!^%Z!^!_*g!_!c%Z!c!}Cr!}#O%Z#O#P&c#P#R%Z#R#SCr#S#T%Z#T#oCr#o#p*g#p$g%Z$g;'SCr;'S;=`El<%lOCr%9[EoP;=`<%lCr07[FRk$i&j(Wp(Z!b$]#t(T,2j(e$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr+dHRk$i&j(Wp(Z!b$]#tOY%ZYZ&cZr%Zrs&}st%ZtuGvuw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Gv![!^%Z!^!_*g!_!c%Z!c!}Gv!}#O%Z#O#P&c#P#R%Z#R#SGv#S#T%Z#T#oGv#o#p*g#p$g%Z$g;'SGv;'S;=`Iv<%lOGv+dIyP;=`<%lGv07[JPP;=`<%lEr(KWJ_`$i&j(Wp(Z!b#p(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KWKl_$i&j$Q(Ch(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z,#xLva(z+JY$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sv%ZvwM{wx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KWNW`$i&j#z(Ch(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At! c_(Y';W$i&j(WpOY!!bYZ!#hZr!!brs!#hsw!!bwx!$xx!^!!b!^!_!%z!_#O!!b#O#P!#h#P#o!!b#o#p!%z#p;'S!!b;'S;=`!'c<%lO!!b'l!!i_$i&j(WpOY!!bYZ!#hZr!!brs!#hsw!!bwx!$xx!^!!b!^!_!%z!_#O!!b#O#P!#h#P#o!!b#o#p!%z#p;'S!!b;'S;=`!'c<%lO!!b&z!#mX$i&jOw!#hwx6cx!^!#h!^!_!$Y!_#o!#h#o#p!$Y#p;'S!#h;'S;=`!$r<%lO!#h`!$]TOw!$Ywx7]x;'S!$Y;'S;=`!$l<%lO!$Y`!$oP;=`<%l!$Y&z!$uP;=`<%l!#h'l!%R]$d`$i&j(WpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(r!Q!&PZ(WpOY!%zYZ!$YZr!%zrs!$Ysw!%zwx!&rx#O!%z#O#P!$Y#P;'S!%z;'S;=`!']<%lO!%z!Q!&yU$d`(WpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)r!Q!'`P;=`<%l!%z'l!'fP;=`<%l!!b/5|!'t_!l/.^$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#&U!)O_!k!Lf$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z-!n!*[b$i&j(Wp(Z!b(U%&f#q(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rxz%Zz{!+d{!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW!+o`$i&j(Wp(Z!b#n(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z+;x!,|`$i&j(Wp(Z!br+4YOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z,$U!.Z_!]+Jf$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[!/ec$i&j(Wp(Z!b!Q.2^OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!0p!P!Q%Z!Q![!3Y![!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#%|!0ya$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!2O!P!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#%|!2Z_![!L^$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!3eg$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!3Y![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S!3Y#S#X%Z#X#Y!4|#Y#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!5Vg$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx{%Z{|!6n|}%Z}!O!6n!O!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!6wc$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!8_c$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[!9uf$i&j(Wp(Z!b#o(ChOY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcxz!;Zz{#-}{!P!;Z!P!Q#/d!Q!^!;Z!^!_#(i!_!`#7S!`!a#8i!a!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z?O!;fb$i&j(Wp(Z!b!X7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z>^!<w`$i&j(Z!b!X7`OY!<nYZ&cZw!<nwx!=yx!P!<n!P!Q!Eq!Q!^!<n!^!_!Gr!_!}!<n!}#O!KS#O#P!Dy#P#o!<n#o#p!Gr#p;'S!<n;'S;=`!L]<%lO!<n<z!>Q^$i&j!X7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y<z!?Td$i&j!X7`O!^&c!_#W&c#W#X!>|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!X7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!X7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c<z!C][$i&jOY!CWYZ&cZ!^!CW!^!_!Ar!_#O!CW#O#P!DR#P#Q!=y#Q#o!CW#o#p!Ar#p;'S!CW;'S;=`!Ds<%lO!CW<z!DWX$i&jOY!CWYZ&cZ!^!CW!^!_!Ar!_#o!CW#o#p!Ar#p;'S!CW;'S;=`!Ds<%lO!CW<z!DvP;=`<%l!CW<z!EOX$i&jOY!=yYZ&cZ!^!=y!^!_!@c!_#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y<z!EnP;=`<%l!=y>^!Ezl$i&j(Z!b!X7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(Z!b!X7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(Z!b!X7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(Z!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$i&j(Z!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!<n#Q#o!KS#o#p!JU#p;'S!KS;'S;=`!LV<%lO!KS>^!LYP;=`<%l!KS>^!L`P;=`<%l!<n=l!Ll`$i&j(Wp!X7`OY!LcYZ&cZr!Lcrs!=ys!P!Lc!P!Q!Mn!Q!^!Lc!^!_# o!_!}!Lc!}#O#%P#O#P!Dy#P#o!Lc#o#p# o#p;'S!Lc;'S;=`#&Y<%lO!Lc=l!Mwl$i&j(Wp!X7`OY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#W(r#W#X!Mn#X#Z(r#Z#[!Mn#[#](r#]#^!Mn#^#a(r#a#b!Mn#b#g(r#g#h!Mn#h#i(r#i#j!Mn#j#k!Mn#k#m(r#m#n!Mn#n#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(r8Q# vZ(Wp!X7`OY# oZr# ors!@cs!P# o!P!Q#!i!Q!}# o!}#O#$R#O#P!Bq#P;'S# o;'S;=`#$y<%lO# o8Q#!pe(Wp!X7`OY)rZr)rs#O)r#P#W)r#W#X#!i#X#Z)r#Z#[#!i#[#])r#]#^#!i#^#a)r#a#b#!i#b#g)r#g#h#!i#h#i)r#i#j#!i#j#k#!i#k#m)r#m#n#!i#n;'S)r;'S;=`*Z<%lO)r8Q#$WX(WpOY#$RZr#$Rrs!Ars#O#$R#O#P!B[#P#Q# o#Q;'S#$R;'S;=`#$s<%lO#$R8Q#$vP;=`<%l#$R8Q#$|P;=`<%l# o=l#%W^$i&j(WpOY#%PYZ&cZr#%Prs!CWs!^#%P!^!_#$R!_#O#%P#O#P!DR#P#Q!Lc#Q#o#%P#o#p#$R#p;'S#%P;'S;=`#&S<%lO#%P=l#&VP;=`<%l#%P=l#&]P;=`<%l!Lc?O#&kn$i&j(Wp(Z!b!X7`OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#W%Z#W#X#&`#X#Z%Z#Z#[#&`#[#]%Z#]#^#&`#^#a%Z#a#b#&`#b#g%Z#g#h#&`#h#i%Z#i#j#&`#j#k#&`#k#m%Z#m#n#&`#n#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z9d#(r](Wp(Z!b!X7`OY#(iZr#(irs!Grsw#(iwx# ox!P#(i!P!Q#)k!Q!}#(i!}#O#+`#O#P!Bq#P;'S#(i;'S;=`#,`<%lO#(i9d#)th(Wp(Z!b!X7`OY*gZr*grs'}sw*gwx)rx#O*g#P#W*g#W#X#)k#X#Z*g#Z#[#)k#[#]*g#]#^#)k#^#a*g#a#b#)k#b#g*g#g#h#)k#h#i*g#i#j#)k#j#k#)k#k#m*g#m#n#)k#n;'S*g;'S;=`+Z<%lO*g9d#+gZ(Wp(Z!bOY#+`Zr#+`rs!JUsw#+`wx#$Rx#O#+`#O#P!B[#P#Q#(i#Q;'S#+`;'S;=`#,Y<%lO#+`9d#,]P;=`<%l#+`9d#,cP;=`<%l#(i?O#,o`$i&j(Wp(Z!bOY#,fYZ&cZr#,frs!KSsw#,fwx#%Px!^#,f!^!_#+`!_#O#,f#O#P!DR#P#Q!;Z#Q#o#,f#o#p#+`#p;'S#,f;'S;=`#-q<%lO#,f?O#-tP;=`<%l#,f?O#-zP;=`<%l!;Z07[#.[b$i&j(Wp(Z!b(O0/l!X7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z07[#/o_$i&j(Wp(Z!bT0/lOY#/dYZ&cZr#/drs#0nsw#/dwx#4Ox!^#/d!^!_#5}!_#O#/d#O#P#1p#P#o#/d#o#p#5}#p;'S#/d;'S;=`#6|<%lO#/d06j#0w]$i&j(Z!bT0/lOY#0nYZ&cZw#0nwx#1px!^#0n!^!_#3R!_#O#0n#O#P#1p#P#o#0n#o#p#3R#p;'S#0n;'S;=`#3x<%lO#0n05W#1wX$i&jT0/lOY#1pYZ&cZ!^#1p!^!_#2d!_#o#1p#o#p#2d#p;'S#1p;'S;=`#2{<%lO#1p0/l#2iST0/lOY#2dZ;'S#2d;'S;=`#2u<%lO#2d0/l#2xP;=`<%l#2d05W#3OP;=`<%l#1p01O#3YW(Z!bT0/lOY#3RZw#3Rwx#2dx#O#3R#O#P#2d#P;'S#3R;'S;=`#3r<%lO#3R01O#3uP;=`<%l#3R06j#3{P;=`<%l#0n05x#4X]$i&j(WpT0/lOY#4OYZ&cZr#4Ors#1ps!^#4O!^!_#5Q!_#O#4O#O#P#1p#P#o#4O#o#p#5Q#p;'S#4O;'S;=`#5w<%lO#4O00^#5XW(WpT0/lOY#5QZr#5Qrs#2ds#O#5Q#O#P#2d#P;'S#5Q;'S;=`#5q<%lO#5Q00^#5tP;=`<%l#5Q05x#5zP;=`<%l#4O01p#6WY(Wp(Z!bT0/lOY#5}Zr#5}rs#3Rsw#5}wx#5Qx#O#5}#O#P#2d#P;'S#5};'S;=`#6v<%lO#5}01p#6yP;=`<%l#5}07[#7PP;=`<%l#/d)3h#7ab$i&j$Q(Ch(Wp(Z!b!X7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;ZAt#8vb$Z#t$i&j(Wp(Z!b!X7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z'Ad#:Zp$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!3Y!P!Q%Z!Q![#<_![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S#<_#S#U%Z#U#V#?i#V#X%Z#X#Y!4|#Y#b%Z#b#c#>_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#<jk$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!3Y!P!Q%Z!Q![#<_![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S#<_#S#X%Z#X#Y!4|#Y#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!g$b$i&j$O)Lv(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#R-<U(Wp(Z!b$n7`OY*gZr*grs'}sw*gwx)rx!P*g!P!Q#MO!Q!^*g!^!_#Mt!_!`$ f!`#O*g#P;'S*g;'S;=`+Z<%lO*g(n#MXX$k&j(Wp(Z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g(El#M}Z#r(Ch(Wp(Z!bOY*gZr*grs'}sw*gwx)rx!_*g!_!`#Np!`#O*g#P;'S*g;'S;=`+Z<%lO*g(El#NyX$Q(Ch(Wp(Z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g(El$ oX#s(Ch(Wp(Z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g*)x$!ga#`*!Y$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`!a$#l!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(K[$#w_#k(Cl$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x$%Vag!*r#s(Ch$f#|$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`$&[!`!a$'f!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$&g_#s(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$'qa#r(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`!a$(v!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$)R`#r(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(Kd$*`a(r(Ct$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!a%Z!a!b$+e!b#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$+p`$i&j#{(Ch(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`$,}_!|$Ip$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f$.X_!S0,v$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(n$/]Z$i&jO!^$0O!^!_$0f!_#i$0O#i#j$0k#j#l$0O#l#m$2^#m#o$0O#o#p$0f#p;'S$0O;'S;=`$4i<%lO$0O(n$0VT_#S$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#S$0kO_#S(n$0p[$i&jO!Q&c!Q![$1f![!^&c!_!c&c!c!i$1f!i#T&c#T#Z$1f#Z#o&c#o#p$3|#p;'S&c;'S;=`&w<%lO&c(n$1kZ$i&jO!Q&c!Q![$2^![!^&c!_!c&c!c!i$2^!i#T&c#T#Z$2^#Z#o&c#p;'S&c;'S;=`&w<%lO&c(n$2cZ$i&jO!Q&c!Q![$3U![!^&c!_!c&c!c!i$3U!i#T&c#T#Z$3U#Z#o&c#p;'S&c;'S;=`&w<%lO&c(n$3ZZ$i&jO!Q&c!Q![$0O![!^&c!_!c&c!c!i$0O!i#T&c#T#Z$0O#Z#o&c#p;'S&c;'S;=`&w<%lO&c#S$4PR!Q![$4Y!c!i$4Y#T#Z$4Y#S$4]S!Q![$4Y!c!i$4Y#T#Z$4Y#q#r$0f(n$4lP;=`<%l$0O#1[$4z_!Y#)l$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$6U`#x(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z+;p$7c_$i&j(Wp(Z!b(a+4QOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$8qk$i&j(Wp(Z!b(T,2j$_#t(e$I[OY%ZYZ&cZr%Zrs&}st%Ztu$8buw%Zwx(rx}%Z}!O$:f!O!Q%Z!Q![$8b![!^%Z!^!_*g!_!c%Z!c!}$8b!}#O%Z#O#P&c#P#R%Z#R#S$8b#S#T%Z#T#o$8b#o#p*g#p$g%Z$g;'S$8b;'S;=`$<l<%lO$8b+d$:qk$i&j(Wp(Z!b$_#tOY%ZYZ&cZr%Zrs&}st%Ztu$:fuw%Zwx(rx}%Z}!O$:f!O!Q%Z!Q![$:f![!^%Z!^!_*g!_!c%Z!c!}$:f!}#O%Z#O#P&c#P#R%Z#R#S$:f#S#T%Z#T#o$:f#o#p*g#p$g%Z$g;'S$:f;'S;=`$<f<%lO$:f+d$<iP;=`<%l$:f07[$<oP;=`<%l$8b#Jf$<{X!_#Hb(Wp(Z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g,#x$=sa(y+JY$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p#q$+e#q;'S%Z;'S;=`+a<%lO%Z)>v$?V_!^(CdvBr$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!q7`$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$i&j(Wp(Z!b'|0/l$]#t(T,2j(e$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$i&j(Wp(Z!b'}0/l$]#t(T,2j(e$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[h0e,f0e,d0e,p0e,2,3,4,5,6,7,8,9,10,11,12,13,14,c0e,new KO("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new KO("j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~",25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:t=>g0e[t]||-1},{term:343,get:t=>O0e[t]||-1},{term:95,get:t=>x0e[t]||-1}],tokenPrec:15201}),D5=[Ki("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Ki("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Ki("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Ki("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Ki("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Ki(`try {
|
|
141
|
+
\${}
|
|
142
|
+
} catch (\${error}) {
|
|
143
|
+
\${}
|
|
144
|
+
}`,{label:"try",detail:"/ catch block",type:"keyword"}),Ki("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Ki(`if (\${}) {
|
|
145
|
+
\${}
|
|
146
|
+
} else {
|
|
147
|
+
\${}
|
|
148
|
+
}`,{label:"if",detail:"/ else block",type:"keyword"}),Ki(`class \${name} {
|
|
149
|
+
constructor(\${params}) {
|
|
150
|
+
\${}
|
|
151
|
+
}
|
|
152
|
+
}`,{label:"class",detail:"definition",type:"keyword"}),Ki('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Ki('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],JB=D5.concat([Ki("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Ki("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Ki("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),PI=new mL,eF=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Vf(t){return(e,n)=>{let i=e.node.getChild("VariableDefinition");return i&&n(i,t),!0}}const v0e=["FunctionDeclaration"],b0e={FunctionDeclaration:Vf("function"),ClassDeclaration:Vf("class"),ClassExpression:()=>!0,EnumDeclaration:Vf("constant"),TypeAliasDeclaration:Vf("type"),NamespaceDeclaration:Vf("namespace"),VariableDefinition(t,e){t.matchContext(v0e)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function tF(t,e){let n=PI.get(e);if(n)return n;let i=[],r=!0;function s(o,a){let l=t.sliceString(o.from,o.to);i.push({label:l,type:a})}return e.cursor(Xt.IncludeAnonymous).iterate(o=>{if(r)r=!1;else if(o.name){let a=b0e[o.name];if(a&&a(o,s)||eF.has(o.name))return!1}else if(o.to-o.from>8192){for(let a of tF(t,o.node))i.push(a);return!1}}),PI.set(e,i),i}const e1=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,Q5=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function nF(t){let e=sn(t.state).resolveInner(t.pos,-1);if(Q5.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&e1.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let i=[];for(let r=e;r;r=r.parent)eF.has(r.name)&&(i=i.concat(tF(t.state.doc,r)));return{options:i,from:n?e.from:t.pos,validFor:e1}}function xb(t,e,n){var i;let r=[];for(;;){let s=e.firstChild,o;if((s==null?void 0:s.name)=="VariableName")return r.push(t(s)),{path:r.reverse(),name:n};if((s==null?void 0:s.name)=="MemberExpression"&&((i=o=s.lastChild)===null||i===void 0?void 0:i.name)=="PropertyName")r.push(t(o)),e=s;else return null}}function iF(t){let e=i=>t.state.doc.sliceString(i.from,i.to),n=sn(t.state).resolveInner(t.pos,-1);return n.name=="PropertyName"?xb(e,n.parent,e(n)):(n.name=="."||n.name=="?.")&&n.parent.name=="MemberExpression"?xb(e,n.parent,""):Q5.indexOf(n.name)>-1?null:n.name=="VariableName"||n.to-n.from<20&&e1.test(e(n))?{path:[],name:e(n)}:n.name=="MemberExpression"?xb(e,n,""):t.explicit?{path:[],name:""}:null}function S0e(t,e){let n=t,i=[],r=new Set;for(let s=0;;s++){for(let a of(Object.getOwnPropertyNames||Object.keys)(t)){if(!/^[a-zA-Z_$\xaa-\uffdc][\w$\xaa-\uffdc]*$/.test(a)||r.has(a))continue;r.add(a);let l;try{l=n[a]}catch{continue}i.push({label:a,type:typeof l=="function"?/^[A-Z]/.test(a)?"class":e?"function":"method":e?"variable":"property",boost:-s})}let o=Object.getPrototypeOf(t);if(!o)return i;t=o}}function _0e(t){let e=new Map;return n=>{let i=iF(n);if(!i)return null;let r=t;for(let o of i.path)if(r=r[o],!r)return null;let s=e.get(r);return s||e.set(r,s=S0e(r,!i.path.length)),{from:n.pos-i.name.length,options:s,validFor:e1}}}const ss=gh.define({name:"javascript",parser:y0e.configure({props:[df.add({IfStatement:d0({except:/^\s*({|else\b)/}),TryStatement:d0({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:Dle,SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),i=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:i?1:2)*t.unit},Block:Lle({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":d0({except:/^\s*{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),pf.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":qD,BlockComment(t){return{from:t.from+2,to:t.to-2}},JSXElement(t){let e=t.firstChild;if(!e||e.name=="JSXSelfClosingTag")return null;let n=t.lastChild;return{from:e.to,to:n.type.isError?t.to:n.from}},"JSXSelfClosingTag JSXOpenTag"(t){var e;let n=(e=t.firstChild)===null||e===void 0?void 0:e.nextSibling,i=t.lastChild;return!n||n.type.isError?null:{from:n.to,to:i.type.isError?t.to:i.from}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),rF={test:t=>/^JSX/.test(t.name),facet:$x({commentTokens:{block:{open:"{/*",close:"*/}"}}})},V5=ss.configure({dialect:"ts"},"typescript"),B5=ss.configure({dialect:"jsx",props:[Tk.add(t=>t.isTop?[rF]:void 0)]}),F5=ss.configure({dialect:"jsx ts",props:[Tk.add(t=>t.isTop?[rF]:void 0)]},"typescript");let sF=t=>({label:t,type:"keyword"});const oF="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(sF),C0e=oF.concat(["declare","implements","private","protected","public"].map(sF));function aF(t={}){let e=t.jsx?t.typescript?F5:B5:t.typescript?V5:ss,n=t.typescript?JB.concat(C0e):D5.concat(oF);return new xh(e,[ss.data.of({autocomplete:mhe(Q5,rV(n))}),ss.data.of({autocomplete:nF}),t.jsx?lF:[]])}function w0e(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function AI(t,e,n=t.length){for(let i=e==null?void 0:e.firstChild;i;i=i.nextSibling)if(i.name=="JSXIdentifier"||i.name=="JSXBuiltin"||i.name=="JSXNamespacedName"||i.name=="JSXMemberExpression")return t.sliceString(i.from,Math.min(i.to,n));return""}const k0e=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),lF=Se.inputHandler.of((t,e,n,i,r)=>{if((k0e?t.composing:t.compositionStarted)||t.state.readOnly||e!=n||i!=">"&&i!="/"||!ss.isActiveAt(t.state,e,-1))return!1;let s=r(),{state:o}=s,a=o.changeByRange(l=>{var u;let{head:c}=l,h=sn(o).resolveInner(c-1,-1),f;if(h.name=="JSXStartTag"&&(h=h.parent),!(o.doc.sliceString(c-1,c)!=i||h.name=="JSXAttributeValue"&&h.to>c)){if(i==">"&&h.name=="JSXFragmentTag")return{range:l,changes:{from:c,insert:"</>"}};if(i=="/"&&h.name=="JSXStartCloseTag"){let p=h.parent,m=p.parent;if(m&&p.from==c-2&&((f=AI(o.doc,m.firstChild,c))||((u=m.firstChild)===null||u===void 0?void 0:u.name)=="JSXFragmentTag")){let g=`${f}>`;return{range:fe.cursor(c+g.length,-1),changes:{from:c,insert:g}}}}else if(i==">"){let p=w0e(h);if(p&&p.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(c,c+2))&&(f=AI(o.doc,p,c)))return{range:l,changes:{from:c,insert:`</${f}>`}}}}return{range:l}});return a.changes.empty?!1:(t.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function E0e(t,e){return e||(e={parserOptions:{ecmaVersion:2019,sourceType:"module"},env:{browser:!0,node:!0,es6:!0,es2015:!0,es2017:!0,es2020:!0},rules:{}},t.getRules().forEach((n,i)=>{var r;!((r=n.meta.docs)===null||r===void 0)&&r.recommended&&(e.rules[i]=2)})),n=>{let{state:i}=n,r=[];for(let{from:s,to:o}of ss.findRegions(i)){let a=i.doc.lineAt(s),l={line:a.number-1,col:s-a.from,pos:s};for(let u of t.verify(i.sliceDoc(s,o),e))r.push(T0e(u,i.doc,l))}return r}}function $I(t,e,n,i){return n.line(t+i.line).from+e+(t==1?i.col-1:-1)}function T0e(t,e,n){let i=$I(t.line,t.column,e,n),r={from:i,to:t.endLine!=null&&t.endColumn!=1?$I(t.endLine,t.endColumn,e,n):i,message:t.message,source:t.ruleId?"eslint:"+t.ruleId:"eslint",severity:t.severity==1?"warning":"error"};if(t.fix){let{range:s,text:o}=t.fix,a=s[0]+n.pos-i,l=s[1]+n.pos-i;r.actions=[{name:"fix",apply(u,c){u.dispatch({changes:{from:c+a,to:c+l,insert:o},scrollIntoView:!0})}}]}return r}const Fg=Object.freeze(Object.defineProperty({__proto__:null,autoCloseTags:lF,completionPath:iF,esLint:E0e,javascript:aF,javascriptLanguage:ss,jsxLanguage:B5,localCompletionSource:nF,scopeCompletionSource:_0e,snippets:D5,tsxLanguage:F5,typescriptLanguage:V5,typescriptSnippets:JB},Symbol.toStringTag,{value:"Module"})),Bf=["_blank","_self","_top","_parent"],yb=["ascii","utf-8","utf-16","latin1","latin1"],vb=["get","post","put","delete"],bb=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],xr=["true","false"],Ye={},P0e={a:{attrs:{href:null,ping:null,type:null,media:null,target:Bf,hreflang:null}},abbr:Ye,address:Ye,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:Ye,aside:Ye,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:Ye,base:{attrs:{href:null,target:Bf}},bdi:Ye,bdo:Ye,blockquote:{attrs:{cite:null}},body:Ye,br:Ye,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:bb,formmethod:vb,formnovalidate:["novalidate"],formtarget:Bf,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:Ye,center:Ye,cite:Ye,code:Ye,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:Ye,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:Ye,div:Ye,dl:Ye,dt:Ye,em:Ye,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:Ye,figure:Ye,footer:Ye,form:{attrs:{action:null,name:null,"accept-charset":yb,autocomplete:["on","off"],enctype:bb,method:vb,novalidate:["novalidate"],target:Bf}},h1:Ye,h2:Ye,h3:Ye,h4:Ye,h5:Ye,h6:Ye,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:Ye,hgroup:Ye,hr:Ye,html:{attrs:{manifest:null}},i:Ye,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:bb,formmethod:vb,formnovalidate:["novalidate"],formtarget:Bf,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:Ye,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:Ye,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:Ye,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:yb,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:Ye,noscript:Ye,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:Ye,param:{attrs:{name:null,value:null}},pre:Ye,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Ye,rt:Ye,ruby:Ye,samp:Ye,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:yb}},section:Ye,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:Ye,source:{attrs:{src:null,type:null,media:null}},span:Ye,strong:Ye,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:Ye,summary:Ye,sup:Ye,table:Ye,tbody:Ye,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:Ye,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:Ye,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:Ye,time:{attrs:{datetime:null}},title:Ye,tr:Ye,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:Ye,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:Ye},uF={accesskey:null,class:null,contenteditable:xr,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:xr,autocorrect:xr,autocapitalize:xr,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":xr,"aria-autocomplete":["inline","list","both","none"],"aria-busy":xr,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":xr,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":xr,"aria-hidden":xr,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":xr,"aria-multiselectable":xr,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":xr,"aria-relevant":null,"aria-required":xr,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},cF="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(t=>"on"+t);for(let t of cF)uF[t]=null;class kp{constructor(e,n){this.tags={...P0e,...e},this.globalAttrs={...uF,...n},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}kp.default=new kp;function Ch(t,e,n=t.length){if(!e)return"";let i=e.firstChild,r=i&&i.getChild("TagName");return r?t.sliceString(r.from,Math.min(r.to,n)):""}function wh(t,e=!1){for(;t;t=t.parent)if(t.name=="Element")if(e)e=!1;else return t;return null}function hF(t,e,n){let i=n.tags[Ch(t,wh(e))];return(i==null?void 0:i.children)||n.allTags}function j5(t,e){let n=[];for(let i=wh(e);i&&!i.type.isTop;i=wh(i.parent)){let r=Ch(t,i);if(r&&i.lastChild.name=="CloseTag")break;r&&n.indexOf(r)<0&&(e.name=="EndTag"||e.from>=i.firstChild.to)&&n.push(r)}return n}const fF=/^[:\-\.\w\u00b7-\uffff]*$/;function II(t,e,n,i,r){let s=/\s*>/.test(t.sliceDoc(r,r+5))?"":">",o=wh(n,n.name=="StartTag"||n.name=="TagName");return{from:i,to:r,options:hF(t.doc,o,e).map(a=>({label:a,type:"type"})).concat(j5(t.doc,n).map((a,l)=>({label:"/"+a,apply:"/"+a+s,type:"type",boost:99-l}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function RI(t,e,n,i){let r=/\s*>/.test(t.sliceDoc(i,i+5))?"":">";return{from:n,to:i,options:j5(t.doc,e).map((s,o)=>({label:s,apply:s+r,type:"type",boost:99-o})),validFor:fF}}function A0e(t,e,n,i){let r=[],s=0;for(let o of hF(t.doc,n,e))r.push({label:"<"+o,type:"type"});for(let o of j5(t.doc,n))r.push({label:"</"+o+">",type:"type",boost:99-s++});return{from:i,to:i,options:r,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function $0e(t,e,n,i,r){let s=wh(n),o=s?e.tags[Ch(t.doc,s)]:null,a=o&&o.attrs?Object.keys(o.attrs):[],l=o&&o.globalAttrs===!1?a:a.length?a.concat(e.globalAttrNames):e.globalAttrNames;return{from:i,to:r,options:l.map(u=>({label:u,type:"property"})),validFor:fF}}function I0e(t,e,n,i,r){var s;let o=(s=n.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),a=[],l;if(o){let u=t.sliceDoc(o.from,o.to),c=e.globalAttrs[u];if(!c){let h=wh(n),f=h?e.tags[Ch(t.doc,h)]:null;c=(f==null?void 0:f.attrs)&&f.attrs[u]}if(c){let h=t.sliceDoc(i,r).toLowerCase(),f='"',p='"';/^['"]/.test(h)?(l=h[0]=='"'?/^[^"]*$/:/^[^']*$/,f="",p=t.sliceDoc(r,r+1)==h[0]?"":h[0],h=h.slice(1),i++):l=/^[^\s<>='"]*$/;for(let m of c)a.push({label:m,apply:f+m+p,type:"constant"})}}return{from:i,to:r,options:a,validFor:l}}function dF(t,e){let{state:n,pos:i}=e,r=sn(n).resolveInner(i,-1),s=r.resolve(i);for(let o=i,a;s==r&&(a=r.childBefore(o));){let l=a.lastChild;if(!l||!l.type.isError||l.from<l.to)break;s=r=a,o=l.from}return r.name=="TagName"?r.parent&&/CloseTag$/.test(r.parent.name)?RI(n,r,r.from,i):II(n,t,r,r.from,i):r.name=="StartTag"||r.name=="IncompleteTag"?II(n,t,r,i,i):r.name=="StartCloseTag"||r.name=="IncompleteCloseTag"?RI(n,r,i,i):r.name=="OpenTag"||r.name=="SelfClosingTag"||r.name=="AttributeName"?$0e(n,t,r,r.name=="AttributeName"?r.from:i,i):r.name=="Is"||r.name=="AttributeValue"||r.name=="UnquotedAttributeValue"?I0e(n,t,r,r.name=="Is"?i:r.from,i):e.explicit&&(s.name=="Element"||s.name=="Text"||s.name=="Document")?A0e(n,t,r,i):null}function pF(t){return dF(kp.default,t)}function mF(t){let{extraTags:e,extraGlobalAttributes:n}=t,i=n||e?new kp(e,n):kp.default;return r=>dF(i,r)}const R0e=ss.parser.configure({top:"SingleExpression"}),gF=[{tag:"script",attrs:t=>t.type=="text/typescript"||t.lang=="ts",parser:V5.parser},{tag:"script",attrs:t=>t.type=="text/babel"||t.type=="text/jsx",parser:B5.parser},{tag:"script",attrs:t=>t.type=="text/typescript-jsx",parser:F5.parser},{tag:"script",attrs(t){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type)},parser:R0e},{tag:"script",attrs(t){return!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type)},parser:ss.parser},{tag:"style",attrs(t){return(!t.lang||t.lang=="css")&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type))},parser:wp.parser}],OF=[{name:"style",parser:wp.parser.configure({top:"Styles"})}].concat(cF.map(t=>({name:t,parser:ss.parser}))),xF=gh.define({name:"html",parser:lge.configure({props:[df.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag"(t){return t.column(t.node.from)+t.unit},Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].length<t.node.to)return t.continue();let e=null,n;for(let i=t.node;;){let r=i.lastChild;if(!r||r.name!="Element"||r.to!=i.to)break;e=i=r}return e&&!((n=e.lastChild)&&(n.name=="CloseTag"||n.name=="SelfClosingTag"))?t.lineIndent(e.from)+t.unit:null}}),pf.add({Element(t){let e=t.firstChild,n=t.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:n.name=="CloseTag"?n.from:t.to}}}),lQ.add({"OpenTag CloseTag":t=>t.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),vd=xF.configure({wrap:ZB(gF,OF)});function yF(t={}){let e="",n;t.matchClosingTags===!1&&(e="noMatch"),t.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(n=ZB((t.nestedLanguages||[]).concat(gF),(t.nestedAttributes||[]).concat(OF)));let i=n?xF.configure({wrap:n,dialect:e}):e?vd.configure({dialect:e}):vd;return new xh(i,[vd.data.of({autocomplete:mF(t)}),t.autoCloseTags!==!1?vF:[],aF().support,GB().support])}const MI=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),vF=Se.inputHandler.of((t,e,n,i,r)=>{if(t.composing||t.state.readOnly||e!=n||i!=">"&&i!="/"||!vd.isActiveAt(t.state,e,-1))return!1;let s=r(),{state:o}=s,a=o.changeByRange(l=>{var u,c,h;let f=o.doc.sliceString(l.from-1,l.to)==i,{head:p}=l,m=sn(o).resolveInner(p,-1),g;if(f&&i==">"&&m.name=="EndTag"){let x=m.parent;if(((c=(u=x.parent)===null||u===void 0?void 0:u.lastChild)===null||c===void 0?void 0:c.name)!="CloseTag"&&(g=Ch(o.doc,x.parent,p))&&!MI.has(g)){let y=p+(o.doc.sliceString(p,p+1)===">"?1:0),S=`</${g}>`;return{range:l,changes:{from:p,to:y,insert:S}}}}else if(f&&i=="/"&&m.name=="IncompleteCloseTag"){let x=m.parent;if(m.from==p-2&&((h=x.lastChild)===null||h===void 0?void 0:h.name)!="CloseTag"&&(g=Ch(o.doc,x,p))&&!MI.has(g)){let y=p+(o.doc.sliceString(p,p+1)===">"?1:0),S=`${g}>`;return{range:fe.cursor(p+S.length,-1),changes:{from:p,to:y,insert:S}}}}return{range:l}});return a.changes.empty?!1:(t.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),M0e=Object.freeze(Object.defineProperty({__proto__:null,autoCloseTags:vF,html:yF,htmlCompletionSource:pF,htmlCompletionSourceWith:mF,htmlLanguage:vd},Symbol.toStringTag,{value:"Module"})),bF=$x({commentTokens:{block:{open:"<!--",close:"-->"}}}),SF=new ot,_F=nme.configure({props:[pf.add(t=>!t.is("Block")||t.is("Document")||aC(t)!=null||N0e(t)?void 0:(e,n)=>({from:n.doc.lineAt(e.from).to,to:e.to})),SF.add(aC),df.add({Document:()=>null}),Fa.add({Document:bF})]});function aC(t){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(t.name);return e?+e[1]:void 0}function N0e(t){return t.name=="OrderedList"||t.name=="BulletList"}function L0e(t,e){let n=t;for(;;){let i=n.nextSibling,r;if(!i||(r=aC(i.type))!=null&&r<=e)break;n=i}return n.to}const D0e=UD.of((t,e,n)=>{for(let i=sn(t).resolveInner(n,-1);i&&!(i.from<e);i=i.parent){let r=i.type.prop(SF);if(r==null)continue;let s=L0e(i,r);if(s>n)return{from:n,to:s}}return null});function Z5(t){return new Er(bF,t,[],"markdown")}const CF=Z5(_F),Q0e=_F.configure([dme,mme,pme,gme,{props:[pf.add({Table:(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}]),Ep=Z5(Q0e);function V0e(t,e){return n=>{if(n&&t){let i=null;if(n=/\S*/.exec(n)[0],typeof t=="function"?i=t(n):i=oe.matchLanguageName(t,n,!0),i instanceof oe)return i.support?i.support.language.parser:Au.getSkippingParser(i.load());if(i)return i.parser}return e?e.parser:null}}class Sb{constructor(e,n,i,r,s,o,a){this.node=e,this.from=n,this.to=i,this.spaceBefore=r,this.spaceAfter=s,this.type=o,this.item=a}blank(e,n=!0){let i=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;i.length<e;)i+=" ";return i}else{for(let r=this.to-this.from-i.length-this.spaceAfter.length;r>0;r--)i+=" ";return i+(n?this.spaceAfter:"")}}marker(e,n){let i=this.node.name=="OrderedList"?String(+kF(this.item,e)[2]+n):"";return this.spaceBefore+i+this.type+this.spaceAfter}}function wF(t,e){let n=[],i=[];for(let r=t;r;r=r.parent){if(r.name=="FencedCode")return i;(r.name=="ListItem"||r.name=="Blockquote")&&n.push(r)}for(let r=n.length-1;r>=0;r--){let s=n[r],o,a=e.lineAt(s.from),l=s.from-a.from;if(s.name=="Blockquote"&&(o=/^ *>( ?)/.exec(a.text.slice(l))))i.push(new Sb(s,l,l+o[0].length,"",o[1],">",null));else if(s.name=="ListItem"&&s.parent.name=="OrderedList"&&(o=/^( *)\d+([.)])( *)/.exec(a.text.slice(l)))){let u=o[3],c=o[0].length;u.length>=4&&(u=u.slice(0,u.length-4),c-=4),i.push(new Sb(s.parent,l,l+c,o[1],u,o[2],s))}else if(s.name=="ListItem"&&s.parent.name=="BulletList"&&(o=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(a.text.slice(l)))){let u=o[4],c=o[0].length;u.length>4&&(u=u.slice(0,u.length-4),c-=4);let h=o[2];o[3]&&(h+=o[3].replace(/[xX]/," ")),i.push(new Sb(s.parent,l,l+c,o[1],u,h,s))}}return i}function kF(t,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(t.from,t.from+10))}function _b(t,e,n,i=0){for(let r=-1,s=t;;){if(s.name=="ListItem"){let a=kF(s,e),l=+a[2];if(r>=0){if(l!=r+1)return;n.push({from:s.from+a[1].length,to:s.from+a[0].length,insert:String(r+2+i)})}r=l}let o=s.nextSibling;if(!o)break;s=o}}function z5(t,e){let n=/^[ \t]*/.exec(t)[0].length;if(!n||e.facet(bm)!=" ")return t;let i=Ns(t,4,n),r="";for(let s=i;s>0;)s>=4?(r+=" ",s-=4):(r+=" ",s--);return r+t.slice(n)}const EF=(t={})=>({state:e,dispatch:n})=>{let i=sn(e),{doc:r}=e,s=null,o=e.changeByRange(a=>{if(!a.empty||!Ep.isActiveAt(e,a.from,-1)&&!Ep.isActiveAt(e,a.from,1))return s={range:a};let l=a.from,u=r.lineAt(l),c=wF(i.resolveInner(l,-1),r);for(;c.length&&c[c.length-1].from>l-u.from;)c.pop();if(!c.length)return s={range:a};let h=c[c.length-1];if(h.to-h.spaceAfter.length>l-u.from)return s={range:a};let f=l>=h.to-h.spaceAfter.length&&!/\S/.test(u.text.slice(h.to));if(h.item&&f){let y=h.node.firstChild,S=h.node.getChild("ListItem","ListItem");if(y.to>=l||S&&S.to<l||u.from>0&&!/[^\s>]/.test(r.lineAt(u.from-1).text)||t.nonTightLists===!1){let _=c.length>1?c[c.length-2]:null,k,w="";_&&_.item?(k=u.from+_.from,w=_.marker(r,1)):k=u.from+(_?_.to:0);let b=[{from:k,to:l,insert:w}];return h.node.name=="OrderedList"&&_b(h.item,r,b,-2),_&&_.node.name=="OrderedList"&&_b(_.item,r,b),{range:fe.cursor(k+w.length),changes:b}}else{let _=LI(c,e,u);return{range:fe.cursor(l+_.length+1),changes:{from:u.from,insert:_+e.lineBreak}}}}if(h.node.name=="Blockquote"&&f&&u.from){let y=r.lineAt(u.from-1),S=/>\s*$/.exec(y.text);if(S&&S.index==h.from){let _=e.changes([{from:y.from+S.index,to:y.to},{from:u.from+h.from,to:u.to}]);return{range:a.map(_),changes:_}}}let p=[];h.node.name=="OrderedList"&&_b(h.item,r,p);let m=h.item&&h.item.from<u.from,g="";if(!m||/^[\s\d.)\-+*>]*/.exec(u.text)[0].length>=h.to)for(let y=0,S=c.length-1;y<=S;y++)g+=y==S&&!m?c[y].marker(r,1):c[y].blank(y<S?Ns(u.text,4,c[y+1].from)-g.length:null);let x=l;for(;x>u.from&&/\s/.test(u.text.charAt(x-u.from-1));)x--;return g=z5(g,e),B0e(h.node,e.doc)&&(g=LI(c,e,u)+e.lineBreak+g),p.push({from:x,to:l,insert:e.lineBreak+g}),{range:fe.cursor(x+g.length+1),changes:p}});return s?!1:(n(e.update(o,{scrollIntoView:!0,userEvent:"input"})),!0)},TF=EF();function NI(t){return t.name=="QuoteMark"||t.name=="ListMark"}function B0e(t,e){if(t.name!="OrderedList"&&t.name!="BulletList")return!1;let n=t.firstChild,i=t.getChild("ListItem","ListItem");if(!i)return!1;let r=e.lineAt(n.to),s=e.lineAt(i.from),o=/^[\s>]*$/.test(r.text);return r.number+(o?0:1)<s.number}function LI(t,e,n){let i="";for(let r=0,s=t.length-2;r<=s;r++)i+=t[r].blank(r<s?Ns(n.text,4,t[r+1].from)-i.length:null,r<s);return z5(i,e)}function F0e(t,e){let n=t.resolveInner(e,-1),i=e;NI(n)&&(i=n.from,n=n.parent);for(let r;r=n.childBefore(i);)if(NI(r))i=r.from;else if(r.name=="OrderedList"||r.name=="BulletList")n=r.lastChild,i=n.to;else break;return n}const PF=({state:t,dispatch:e})=>{let n=sn(t),i=null,r=t.changeByRange(s=>{let o=s.from,{doc:a}=t;if(s.empty&&Ep.isActiveAt(t,s.from)){let l=a.lineAt(o),u=wF(F0e(n,o),a);if(u.length){let c=u[u.length-1],h=c.to-c.spaceAfter.length+(c.spaceAfter?1:0);if(o-l.from>h&&!/\S/.test(l.text.slice(h,o-l.from)))return{range:fe.cursor(l.from+h),changes:{from:l.from+h,to:o}};if(o-l.from==h&&(c.item&&l.from<=c.item.from||/^[\s>]*$/.test(l.text.slice(0,c.to)))){let f=l.from+c.from;if(c.item&&c.node.from<c.item.from&&/\S/.test(l.text.slice(c.from,c.to))){let p=c.blank(Ns(l.text,4,c.to)-Ns(l.text,4,c.from));return f==l.from&&(p=z5(p,t)),{range:fe.cursor(f+p.length),changes:{from:f,to:l.from+c.to,insert:p}}}if(f<o)return{range:fe.cursor(f),changes:{from:f,to:o}}}}}return i={range:s}});return i?!1:(e(t.update(r,{scrollIntoView:!0,userEvent:"delete"})),!0)},AF=[{key:"Enter",run:TF},{key:"Backspace",run:PF}],$F=yF({matchClosingTags:!1});function IF(t={}){let{codeLanguages:e,defaultCodeLanguage:n,addKeymap:i=!0,base:{parser:r}=CF,completeHTMLTags:s=!0,pasteURLAsLink:o=!0,htmlTagLanguage:a=$F}=t;if(!(r instanceof Wx))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let l=t.extensions?[t.extensions]:[],u=[a.support,D0e],c;o&&u.push(RF),n instanceof xh?(u.push(n.support),c=n.language):n&&(c=n);let h=e||c?V0e(e,c):void 0;l.push(rme({codeParser:h,htmlParser:a.language.parser})),i&&u.push(js.high(hf.of(AF)));let f=Z5(r.configure(l));return s&&u.push(f.data.of({autocomplete:j0e})),new xh(f,u)}function j0e(t){let{state:e,pos:n}=t,i=/<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(n-25,n));if(!i)return null;let r=sn(e).resolveInner(n,-1);for(;r&&!r.type.isTop;){if(r.name=="CodeBlock"||r.name=="FencedCode"||r.name=="ProcessingInstructionBlock"||r.name=="CommentBlock"||r.name=="Link"||r.name=="Image")return null;r=r.parent}return{from:n-i[0].length,to:n,options:Z0e(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}let Cb=null;function Z0e(){if(Cb)return Cb;let t=pF(new Zk(mt.create({extensions:$F}),0,!0));return Cb=t?t.options:[]}const z0e=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,RF=Se.domEventHandlers({paste:(t,e)=>{var n;let{main:i}=e.state.selection;if(i.empty)return!1;let r=(n=t.clipboardData)===null||n===void 0?void 0:n.getData("text/plain");if(!r||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(r)||(/^www\./.test(r)&&(r="https://"+r),!Ep.isActiveAt(e.state,i.from,1)))return!1;let s=sn(e.state),o=!1;return s.iterate({from:i.from,to:i.to,enter:a=>{(a.from>i.from||z0e.test(a.name))&&(o=!0)},leave:a=>{a.to<i.to&&(o=!0)}}),o?!1:(e.dispatch({changes:[{from:i.from,insert:"["},{from:i.to,insert:`](${r})`}],userEvent:"input.paste",scrollIntoView:!0}),!0)}}),X0e=Object.freeze(Object.defineProperty({__proto__:null,commonmarkLanguage:CF,deleteMarkupBackward:PF,insertNewlineContinueMarkup:TF,insertNewlineContinueMarkupCommand:EF,markdown:IF,markdownKeymap:AF,markdownLanguage:Ep,pasteURLAsLink:RF},Symbol.toStringTag,{value:"Module"})),lC=[yV,UQ,IF(),Ek(),Se.lineWrapping],W0e=()=>{const[t,e,n]=Ft(Rs,zn,Hx),i=Tt(al),r=Tt(ah),s=C.useRef(null),o=C.useCallback(a=>{var l;if(a!==null){const u=[...n,...lC,Se.updateListener.of(({state:c})=>{i(c.doc.toString())}),Se.focusChangeEffect.of((c,h)=>(h||r(new FocusEvent("blur")),null))];e&&u.push(mt.readOnly.of(!0)),a.innerHTML="",s.current=new Se({parent:a,state:mt.create({doc:t,extensions:u})})}else(l=s.current)==null||l.destroy(),s.current=null},[t,e,i,n,r]);return C.createElement("div",{ref:o,className:"cm-sourceView mdxeditor-source-editor"})};function DI(t,e){t!==void 0&&t.dispatch({changes:{from:0,to:t.state.doc.length,insert:e}})}const H0e=()=>{const t=Ol(),[e,n,i,r]=Ft(Rs,Tp,zn,X5),s=Tt(al),o=C.useRef(null),a=C.useRef(null),l=Bt(Hx),u=Tt(ah);return C.useEffect(()=>t.sub(Tp,c=>{var h;DI((h=a.current)==null?void 0:h.a,c)}),[t]),C.useEffect(()=>t.sub(Rs,c=>{var h;DI((h=a.current)==null?void 0:h.b,c)}),[t]),C.useEffect(()=>{const c=i||r,h=c?{renderRevertControl:void 0,revertControls:void 0}:{renderRevertControl:()=>{const f=document.createElement("button");return f.classList.add("cm-merge-revert"),f.appendChild(document.createTextNode("⮕")),f},revertControls:"a-to-b"};return a.current=new zpe({...h,parent:o.current,orientation:"a-b",gutter:!0,a:{doc:n,extensions:[...l,...lC,mt.readOnly.of(!0)]},b:{doc:e,extensions:[...l,...lC,mt.readOnly.of(c),Se.updateListener.of(({state:f})=>{const p=f.doc.toString();s(p)}),Se.focusChangeEffect.of((f,p)=>(p||u(new FocusEvent("blur")),null))]}}),()=>{var f;(f=a.current)==null||f.destroy(),a.current=null}},[s,l]),C.createElement("div",{ref:o,className:"mdxeditor-diff-editor"})},U0e=({children:t})=>{const[e,n]=Ft(oh,go);return C.createElement("div",{className:"mdxeditor-diff-source-wrapper"},e?C.createElement("div",{className:te.markdownParseError},C.createElement("p",null,e.error,"."),C.createElement("p",null,"You can fix the errors in source mode and switch to rich text mode when you are ready.")):null,C.createElement("div",{className:"mdxeditor-rich-text-editor",style:{display:n==="rich-text"&&e==null?"block":"none"}},t),n==="diff"?C.createElement(H0e,null):null,n==="source"?C.createElement(W0e,null):null)},Tp=Ee(""),Hx=Ee([]),X5=Ee(!1),q0e=Vn({update:(t,e)=>{t.pub(Tp,(e==null?void 0:e.diffMarkdown)??"")},init(t,e){t.pubIn({[Tp]:(e==null?void 0:e.diffMarkdown)??"",[Hx]:(e==null?void 0:e.codeMirrorExtensions)??[],[T8]:U0e,[X5]:(e==null?void 0:e.readOnlyDiff)??!1,[go]:(e==null?void 0:e.viewMode)??"rich-text"})}});function Y0e(t,e){let n=t;for(let i=Rt(t,e);i&&(LF(i.origin)||Ja(i.origin));i=i.getAdjacentCaret())n=i.origin;return n}function G0e(t){return Y0e(t,"previous")}function MF(t,e){for(const n of t.childNodes)if(Je(n)&&n.tagName===e||MF(n,e))return!0;return!1}const Gf="data-language",Ff="data-highlight-language",jg="data-theme";class Am extends $i{constructor(n,i){super(i);se(this,"__language");se(this,"__theme");se(this,"__isSyntaxHighlightSupported");this.__language=n||void 0,this.__isSyntaxHighlightSupported=!1,this.__theme=void 0}static getType(){return"code"}static clone(n){return new Am(n.__language,n.__key)}afterCloneFrom(n){super.afterCloneFrom(n),this.__language=n.__language,this.__theme=n.__theme,this.__isSyntaxHighlightSupported=n.__isSyntaxHighlightSupported}createDOM(n){const i=rn().createElement("code");as(i,n.theme.code),i.setAttribute("spellcheck","false");const r=this.getLanguage();r&&(i.setAttribute(Gf,r),this.getIsSyntaxHighlightSupported()&&i.setAttribute(Ff,r));const s=this.getTheme();s&&i.setAttribute(jg,s);const o=this.getStyle();return o&&tu(i.style,o),i}updateDOM(n,i,r){const s=this.__language,o=n.__language;s?s!==o&&i.setAttribute(Gf,s):o&&i.removeAttribute(Gf);const a=this.__isSyntaxHighlightSupported;n.__isSyntaxHighlightSupported&&o?a&&s?s!==o&&i.setAttribute(Ff,s):i.removeAttribute(Ff):a&&s&&i.setAttribute(Ff,s);const l=this.__theme,u=n.__theme;l?l!==u&&i.setAttribute(jg,l):u&&i.removeAttribute(jg);const c=this.__style,h=n.__style;return c!==h&&tu(i.style,c,h),!1}exportDOM(n){const i=rn().createElement("pre");as(i,n._config.theme.code),i.setAttribute("spellcheck","false");const r=this.getLanguage();r&&(i.setAttribute(Gf,r),this.getIsSyntaxHighlightSupported()&&i.setAttribute(Ff,r));const s=this.getTheme();s&&i.setAttribute(jg,s);const o=this.getStyle();return o&&tu(i.style,o),{element:i}}static importDOM(){return{code:n=>n.textContent!=null&&(/\r?\n/.test(n.textContent)||MF(n,"BR"))?{conversion:QI,priority:1}:null,div:()=>({conversion:K0e,priority:1}),pre:()=>({conversion:QI,priority:0}),table:n=>wb(n)?{conversion:J0e,priority:3}:null,td:n=>{const i=n,r=i.closest("table");return i.classList.contains("js-file-line")||r&&wb(r)?{conversion:VI,priority:3}:null},tr:n=>{const i=n.closest("table");return i&&wb(i)?{conversion:VI,priority:3}:null}}}static importJSON(n){return Zi().updateFromJSON(n)}updateFromJSON(n){return super.updateFromJSON(n).setLanguage(n.language).setTheme(n.theme)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),theme:this.getTheme()}}insertNewAfter(n,i=!0){if(!Fu(hn(),"@lexical/code")){const a=eOe(n);if(a)return a}const{anchor:r,focus:s}=n,o=(r.isBefore(s)?r:s).getNode();if(le(o)){let a=G0e(o);const l=[];for(;;)if(Ja(a))l.push(Qh()),a=a.getNextSibling();else{if(!LF(a))break;{let g=0;const x=a.getTextContent(),y=a.getTextContentSize();for(;g<y&&x[g]===" ";)g++;if(g!==0&&l.push(NF(" ".repeat(g))),g!==y)break;a=a.getNextSibling()}}const u=o.splitText(r.offset)[0],c=r.offset===0?0:1,h=u.getIndexWithinParent()+c,f=o.getParentOrThrow(),p=[Xi(),...l];f.splice(h,0,p);const m=l[l.length-1];m?m.select():r.offset===0?u.selectPrevious():u.getNextSibling().selectNext(0,0)}if(Pp(o)){const{offset:a}=n.anchor;o.splice(a,0,[Xi()]),o.select(a+1,a+1)}return null}canIndent(){return!1}collapseAtStart(){const n=ut();return this.getChildren().forEach(i=>n.append(i)),this.replace(n),!0}setLanguage(n){const i=this.getWritable();return i.__language=n||void 0,i}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(n){const i=this.getWritable();return i.__isSyntaxHighlightSupported=n,i}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(n){const i=this.getWritable();return i.__theme=n||void 0,i}getTheme(){return this.getLatest().__theme}}function Zi(t,e){return lw(Am).setLanguage(t).setTheme(e)}function Pp(t){return t instanceof Am}function QI(t){return{node:Zi(t.getAttribute(Gf))}}function K0e(t){const e=t,n=BI(e);return n||(function(i){let r=i.parentElement;for(;r!==null;){if(BI(r))return!0;r=r.parentElement}return!1})(e)?{node:n?Zi():null}:{node:null}}function J0e(){return{node:Zi()}}function VI(){return{node:null}}function BI(t){return t.style.fontFamily.match("monospace")!==null}function wb(t){return t.classList.contains("js-file-line-container")}function eOe(t){const{anchor:e}=t;if(t.isCollapsed()&&e.type==="element"){const n=e.getNode();if(Pp(n)){const i=n.getChildrenSize();if(i>=2&&e.offset===i){const r=n.getLastChild();if(Gn(r)&&Gn(r.getPreviousSibling())){const s=ut();return n.splice(i-2,2,[]).insertAfter(s,!1),s.select(),s}}}}return null}class Ux extends Rr{constructor(n="",i,r){super(n,r);se(this,"__highlightType");this.__highlightType=i}static getType(){return"code-highlight"}static clone(n){return new Ux(n.__text,n.__highlightType||void 0,n.__key)}afterCloneFrom(n){super.afterCloneFrom(n),this.__highlightType=n.__highlightType}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(n){const i=this.getWritable();return i.__highlightType=n||void 0,i}canHaveFormat(){return!1}createDOM(n){const i=super.createDOM(n),r=kb(n.theme,this.__highlightType);return as(i,r),i}updateDOM(n,i,r){const s=super.updateDOM(n,i,r),o=kb(r.theme,n.__highlightType),a=kb(r.theme,this.__highlightType);return o!==a&&(o&&qp(i,o),a&&as(i,a)),s}static importJSON(n){return NF().updateFromJSON(n)}updateFromJSON(n){return super.updateFromJSON(n).setHighlightType(n.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(n){return this}isParentRequired(){return!0}createParentElementNode(){return Zi()}}function kb(t,e){return e&&t&&t.codeHighlight&&t.codeHighlight[e]}function NF(t="",e){return Ui(new Ux(t,e))}function LF(t){return t instanceof Ux}const DF="data-language";function QF(t){return t.style.fontFamily.match("monospace")!==null}function uC(t){let e=t.parentElement;for(;e!==null;){if(QF(e))return!0;e=e.parentElement}return!1}const tOe=RR([{$import:(t,e)=>t.$importChildren(e),match:hi.tag("tr","td"),name:"@lexical/code/github-code-table/unwrap"}]),nOe={$import:(t,e)=>[Zi(e.getAttribute(DF)).splice(0,0,t.$importChildren(e))],match:hi.tag("pre"),name:"@lexical/code/pre"},iOe={$import:(t,e,n)=>{const i=e.textContent||"";return/\r?\n/.test(i)||e.querySelector("br")!==null?[Zi(e.getAttribute(DF)).splice(0,0,t.$importChildren(e))]:n()},match:hi.tag("code"),name:"@lexical/code/code-multiline"};function Zg(t){if(!Je(t))return!1;const e=t.style.fontFamily,n=t.style.whiteSpace;return typeof e=="string"&&/monospace/i.test(e)&&typeof n=="string"&&n.startsWith("pre")}function rOe(t){let e=!1;const n=[];let i="",r=!1;const s=()=>{r&&(n.push(i),i="",r=!1)};for(const o of Array.from(t.childNodes))if(Je(o))o.tagName==="DIV"?(s(),n.push(o.textContent||""),e=!0):o.tagName==="BR"?(s(),n.push(""),e=!0):(i+=o.textContent||"",r=!0);else if(Hi(o)){const a=o.textContent||"";a.length>0&&(i+=a,r=!0)}return s(),e?n:null}hi.tag("div"),hi.tag("div","br");const sOe={$import:(t,e,n)=>QF(e)?[Zi().splice(0,0,t.$importChildren(e))]:uC(e)?t.$importChildren(e):n(),match:hi.tag("div"),name:"@lexical/code/div"};hi.tag("table").classAll("js-file-line-container"),hi.tag("td").classAll("js-file-line");function cC(t,e){const n={};for(const i of t){const r=e(i);r&&(n[r]?n[r].push(i):n[r]=[i])}return n}function oOe(t){const e=cC(t,n=>n.type);return{element:e.element||[],multilineElement:e["multiline-element"]||[],textFormat:e["text-format"]||[],textMatch:e["text-match"]||[]}}const FI=/[!-/:-@[-`{-~\s]/;function jI(t){return t.replace(/\\([!-/:-@[-`{-~])/g,"$1").replace(/&#(\d+);/g,(e,n)=>String.fromCodePoint(Number(n)))}const aOe=/^(\s*)(\d{1,})\.\s/,lOe=/^(\s*)[-*+]\s/,uOe=/^(\s*)(?:[-*+]\s)?\s?(\[(\s|x)?\])\s/i,cOe=/^(#{1,6})\s/,hOe=/^>\s/,fOe=/^([ \t]*`{3,})([\w-]+)?[ \t]?/,dOe=/^[ \t]*`{3,}$/,Kf=$h("mdListMarker",{parse:t=>typeof t=="string"&&/^[-*+]$/.test(t)?t:"-",resetOnCopyNode:!0}),ZI=$h("mdCodeFence",{parse:t=>typeof t=="string"&&/^`{3,}$/.test(t)?t:"```",resetOnCopyNode:!0}),pOe=$h("mdHardLineBreak",{parse:t=>typeof t=="string"&&/^(\\| {2,})$/.test(t)?t:"",resetOnCopyNode:!0});function mOe(t){if(t.endsWith("\\"))return[t.slice(0,-1),"\\"];const e=t.match(/^(.*?\S)( {2,})$/);return e?[e[1],e[2]]:null}function gOe(t){const e=t.getChildren(),n=e.length-1,i=e[n];if(!le(i))return null;const r=i.getTextContent(),s=mOe(r);if(s!==null){const[o,a]=s;return i.setTextContent(o),a}return/^ {2,}$/.test(r)&&(function(o,a){for(let l=a-1;l>=0;l--){if(Gn(o[l]))return!1;if(/\S/.test(o[l].getTextContent()))return!0}return!1})(e,n)?(i.setTextContent(""),r):null}function OOe(t){const e=Xi(),n=gOe(t);return n!==null&&Kl(e,pOe,n),e}const VF=t=>(e,n,i,r)=>{const s=t(i);s.append(...n),e.replace(s),r||s.select(0,0)},W5=t=>(e,n,i,r)=>{const s=e.getPreviousSibling(),o=e.getNextSibling(),a=ls(t==="check"?i[3]==="x":void 0),l=i[0].trim()[0],u=t!=="bullet"&&t!=="check"||l!==Kf.parse(l)?void 0:l;if(Ke(o)&&o.getListType()===t){u&&Kl(o,Kf,u);const h=o.getFirstChild();h!==null?h.insertBefore(a):o.append(a),t==="number"&&o.setStart(Number(i[2])),e.remove()}else if(Ke(s)&&s.getListType()===t)u&&Kl(s,Kf,u),s.append(a),e.remove();else{const h=rs(t,t==="number"?Number(i[2]):void 0);u&&Kl(h,Kf,u),h.append(a),e.replace(h)}a.append(...n),r||a.select(0,0);const c=(function(h){const f=h.match(/\t/g),p=h.match(/ /g);let m=0;return f&&(m+=f.length),p&&(m+=Math.floor(p.length/4)),m})(i[1]);c&&a.setIndent(c)},qx=(t,e,n,i)=>{const r=[],s=t.getChildren();let o=0;for(const a of s)if(it(a)){if(a.getChildrenSize()===1){const p=a.getFirstChild();if(Ke(p)){const m=qx(p,e,n+1,i);m&&r.push(m);continue}}if(i&&!a.getChildren().some(p=>p.isSelected(i)))continue;const l=" ".repeat(4*n),u=t.getListType(),c=uu(t,Kf),h=u==="number"?`${t.getStart()+o}. `:u==="check"?`${c} [${a.getChecked()?"x":" "}] `:c+" ";let f=e(a);u!=="number"&&(f=f.replace(/^(\s{0,3}\d+)(\.\s)/,"$1\\$2")),r.push(l+h+f),o++}return r.join(`
|
|
153
|
+
`)},xOe={dependencies:[Yp],export:(t,e)=>{if(!L1(t))return null;const n=Number(t.getTag().slice(1));return"#".repeat(n)+" "+e(t)},regExp:cOe,replace:VF(t=>{const e="h"+t[1].length;return Ps(e)}),triggerOnEnter:!0,type:"element"},BF={dependencies:[N1],export:(t,e)=>{if(!dS(t))return null;const n=e(t).split(`
|
|
154
|
+
`),i=[];for(const r of n)i.push("> "+r);return i.join(`
|
|
155
|
+
`)},regExp:hOe,replace:(t,e,n,i)=>{if(i){const s=t.getPreviousSibling();if(dS(s))return s.splice(s.getChildrenSize(),0,[OOe(s),...e]),void t.remove()}const r=zu();r.append(...e),t.replace(r),i||r.select(0,0)},triggerOnEnter:!0,type:"element"},bd={dependencies:[Am],export:t=>{if(!Pp(t))return null;const e=t.getTextContent();let n=uu(t,ZI);if(e.indexOf(n)>-1){const i=e.match(/`{3,}/g);if(i){const r=Math.max(...i.map(s=>s.length));n="`".repeat(r+1)}}return n+(t.getLanguage()||"")+(e?`
|
|
156
|
+
`+e:"")+`
|
|
157
|
+
`+n},handleImportAfterStartMatch:({lines:t,rootNode:e,startLineIndex:n,startMatch:i})=>{const r=i[1],s=r.trim().length,o=t[n],a=i.index+r.length,l=o.slice(a),u=new RegExp(`\`{${s},}$`);if(u.test(l)){const p=l.match(u),m=l.slice(0,l.lastIndexOf(p[0])),g=[...i];return g[2]="",bd.replace(e,null,g,p,[m],!0),[!0,n]}const c=new RegExp(`^[ \\t]*\`{${s},}$`);for(let p=n+1;p<t.length;p++){const m=t[p];if(c.test(m)){const g=m.match(c),x=t.slice(n+1,p),y=o.slice(i[0].length);return y.length>0&&x.unshift(y),bd.replace(e,null,i,g,x,!0),[!0,p]}}const h=t.slice(n+1),f=o.slice(i[0].length);return f.length>0&&h.unshift(f),bd.replace(e,null,i,null,h,!0),[!0,t.length-1]},regExpEnd:{optional:!0,regExp:dOe},regExpStart:fOe,replace:(t,e,n,i,r,s)=>{let o,a;const l=n[1]?n[1].trim():"```",u=n[2]||void 0;if(!e&&r){if(r.length===1)i?(o=Zi(u),a=r[0]):(o=Zi(u),a=r[0].startsWith(" ")?r[0].slice(1):r[0]);else{for(o=Zi(u),r.length>0&&(r[0].trim().length===0?r.shift():r[0].startsWith(" ")&&(r[0]=r[0].slice(1)));r.length>0&&!r[r.length-1].length;)r.pop();a=r.join(`
|
|
158
|
+
`)}Kl(o,ZI,l);const c=Vt(a);o.append(c),t.append(o)}else e&&VF(c=>Zi(c?c[2]:void 0))(t,e,n,s)},type:"multiline-element"},H5={dependencies:[xa,Oa],export:(t,e,n)=>Ke(t)?qx(t,e,0,n):null,regExp:lOe,replace:W5("bullet"),triggerOnEnter:!0,type:"element"},FF={dependencies:[xa,Oa],export:(t,e,n)=>Ke(t)?qx(t,e,0,n):null,regExp:uOe,replace:W5("check"),triggerOnEnter:!0,type:"element"},U5={dependencies:[xa,Oa],export:(t,e,n)=>Ke(t)?qx(t,e,0,n):null,regExp:aOe,replace:W5("number"),triggerOnEnter:!0,type:"element"},jF={format:["code"],tag:"`",type:"text-format"},yOe={format:["highlight"],tag:"==",type:"text-format"},ZF={format:["bold","italic"],tag:"***",type:"text-format"},zF={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},XF={format:["bold"],tag:"**",type:"text-format"},WF={format:["bold"],intraword:!1,tag:"__",type:"text-format"},vOe={format:["strikethrough"],tag:"~~",type:"text-format"},HF={format:["italic"],tag:"*",type:"text-format"},UF={format:["italic"],intraword:!1,tag:"_",type:"text-format"},qF={dependencies:[So],export:(t,e,n)=>{if(!ni(t)||Bi(t))return null;const i=e(t);let r=t.getTitle();return r!=null&&(r=r.replace(/([\\"])/g,"\\$1")),r?`[${i}](${t.getURL()} "${r}")`:`[${i}](${t.getURL()})`},importRegExp:/(?:\[(.+?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[([^[\]]*(?:\[[^[\]]*\][^[\]]*)*)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(t,e)=>{if(Lt(t,ni))return;const[,n,i,r]=e,s=i!=null?jI(i):void 0,o=r!=null?jI(r):void 0,a=oa(s,{title:o}),l=n.split("[").length-1,u=n.split("]").length-1;let c=n,h="";if(l<u)return;if(l>u){const p=n.split("[");h="["+p[0],c=p.slice(1).join("[")}const f=Vt(c);return f.setFormat(t.getFormat()),a.append(f),t.replace(a),h&&a.insertBefore(Vt(h)),f},trigger:")",type:"text-match"},bOe=[xOe,BF,H5,U5],SOe=[bd],_Oe=[jF,ZF,zF,XF,WF,yOe,HF,UF,vOe],COe=[qF],YF=[...bOe,...SOe,..._Oe,...COe];function zI(t){return le(t)&&!t.hasFormat("code")}function wOe(t,...e){const n=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",t);for(const r of e)i.append("v",r);throw n.search=i.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function XI(t,e,n,i,r){const s=t.getParent();if(!It(s)||t.getFirstChild()!==e)return!1;const o=e.getTextContent();if(!r&&o[n-1]!==" ")return!1;for(const{regExp:a,replace:l}of i){const u=o.match(a),c=r||u&&u[0].endsWith(" ")?n:n-1;if(u&&u[0].length===c){const h=e.getNextSiblings(),[f,p]=e.splitText(n);if(l(t,p?[p,...h]:h,u,!1)!==!1)return f.remove(),!0}}return!1}function WI(t,e,n,i,r){const s=t.getParent();if(!It(s)||t.getFirstChild()!==e)return!1;const o=e.getTextContent();if(!r&&o[n-1]!==" ")return!1;for(const{regExpStart:a,replace:l,regExpEnd:u}of i){if(u&&!("optional"in u)||u&&"optional"in u&&!u.optional)continue;const c=o.match(a);if(c){const h=r||c[0].endsWith(" ")?n:n-1;if(c[0].length!==h)continue;const f=e.getNextSiblings(),[p,m]=e.splitText(n);if(l(t,m?[m,...f]:f,c,null,null,!1)!==!1)return p.remove(),!0}}return!1}function kOe(t,e){let n=0;const i=t.getTextContent();for(let r=0;r<e;r++)i[r]==="`"&&n++;return n%2!=0}function HI(t,e,n){const i=n.length;for(let r=e;r>=i;r--){const s=r-i;if(GF(t,s,n,0,i)&&t[s+i]!==" ")return s}return-1}function GF(t,e,n,i,r){for(let s=0;s<r;s++)if(t[e+s]!==n[i+s])return!1;return!0}function EOe(t,e=YF){const n=oOe(e),i=n.element.filter(l=>l.triggerOnEnter),r=cC(n.textFormat,({tag:l})=>l[l.length-1]),s=cC(n.textMatch,({trigger:l})=>l),o=new Set([" "]);for(const l of n.textFormat)o.add(l.tag.slice(-1));for(const l of n.textMatch)l.trigger!==void 0&&o.add(l.trigger);for(const l of e){const u=l.type;if(u==="element"||u==="text-match"||u==="multiline-element"){const c=l.dependencies;for(const h of c)t.hasNode(h)||wOe(173,h.getType())}}const a=(l,u,c)=>!!XI(l,u,c,n.element)||!!WI(l,u,c,n.multilineElement)||!!(function(h,f,p){let m=h.getTextContent();const g=p[m[f-1]];if(g==null)return!1;f<m.length&&(m=m.slice(0,f));for(const x of g){if(!x.replace||!x.regExp)continue;const y=m.match(x.regExp);if(y===null)continue;const S=y.index||0,_=S+y[0].length;let k;return S===0?[k]=h.splitText(_):[,k]=h.splitText(S,_),k.selectNext(0,0),x.replace(k,y),!0}return!1})(u,c,s)||!!(function(h,f,p){const m=h.getTextContent(),g=f-1,x=m[g],y=p[x];if(!y)return!1;for(const S of y){const{tag:_}=S,k=_.length,w=g-k+1;if(k>1&&!GF(m,w,_,0,k)||m[w-1]===" ")continue;const b=m[g+1];if(S.intraword===!1&&b&&!FI.test(b))continue;const E=h;let P=E,$=HI(m,w,_),B=P;for(;$<0&&(B=B.getPreviousSibling())&&!Gn(B);)if(le(B)){if(B.hasFormat("code"))continue;const ye=B.getTextContent();P=B,$=HI(ye,ye.length,_)}if($<0||P===E&&$+k===w)continue;const X=P.getTextContent();if($>0&&X[$-1]===x)continue;const j=X[$-1];if(S.intraword===!1&&j&&!FI.test(j)||!S.format.includes("code")&&kOe(P,$))continue;const Z=E.getTextContent(),G=Z.slice(0,w)+Z.slice(g+1);E.setTextContent(G);const z=P===E?G:X;P.setTextContent(z.slice(0,$)+z.slice($+k));const J=me(),ue=Lu();yn(ue);const Le=g-k*(P===E?2:1)+1;ue.anchor.set(P.__key,$,"text"),ue.focus.set(E.__key,Le,"text");for(const ye of S.format)ue.formatText(ye,ei[ye]);ue.anchor.set(ue.focus.key,ue.focus.offset,ue.focus.type);for(const ye of S.format)ue.hasFormat(ye)&&ue.toggleFormat(ye);return ae(J)&&(ue.format=J.format),!0}return!1})(u,c,r);return wn(t.registerUpdateListener(({tags:l,dirtyLeaves:u,editorState:c,prevEditorState:h})=>{if(l.has(DC)||l.has(Xa)||t.isComposing())return;const f=l.has(Jc),p=c.read(me),m=h.read(me);if(!ae(m)||!ae(p)||!p.isCollapsed()||p.is(m)&&!f)return;const g=p.anchor.key,x=p.anchor.offset,y=c._nodeMap.get(g);if(le(y)&&u.has(g)&&(f||x===1||!(x>m.anchor.offset+1))){if(f){const S=c.read(()=>y.getTextContent())[x-1];if(!o.has(S))return}t.update(()=>{if(!zI(y))return;const S=y.getParent();S===null||Pp(S)||a(S,y,p.anchor.offset)&&Is(O1)})}}),t.registerCommand(Ka,l=>{if(l!==null&&l.shiftKey)return!1;const u=me();if(!ae(u)||!u.isCollapsed())return!1;const c=u.anchor.offset,h=u.anchor.getNode();if(!le(h)||!zI(h))return!1;const f=h.getParent();return f===null||Pp(f)?!1:c===h.getTextContent().length&&!(!WI(f,h,c,n.multilineElement,!0)&&!XI(f,h,c,i,!0))&&(l!==null&&l.preventDefault(),!0)},Gt))}const TOe=[{dependencies:[ju],export:t=>yR(t)?"***":null,regExp:/^(---|\*\*\*|___)\s?$/,replace:(t,e,n,i)=>{const r=R1();i||t.getNextSibling()!=null?t.replace(r):t.insertBefore(r),r.selectNext()},triggerOnEnter:!0,type:"element"},...YF];function Eb({transformers:t=TOe}){const[e]=qi();return R.useEffect(()=>EOe(e,t),[e,t]),null}const POe=Vn({init(t){const e=t.getValue(U1),n=e.includes("headings")?t.getValue(lh):[],i=ROe(e,n),r=i.filter(s=>!IOe.has(s));t.pubIn({[_l]:()=>C.createElement(Eb,{transformers:i}),[W1]:()=>C.createElement(Eb,{transformers:i}),[Bw]:()=>C.createElement(Eb,{transformers:r})})}}),AOe=t=>(e,n,i)=>{const r=t(i);r.append(...n),e.replace(r),r.select(0,0)},$Oe={dependencies:[Gh],export:t=>yR(t)?"***":null,regExp:/^(---|\*\*\*|___)\s?$/,replace:(t,e,n,i)=>{const r=nm();i||t.getNextSibling()!=null?t.replace(r):t.insertBefore(r),r.selectNext()},type:"element"},IOe=new Set([U5,H5,FF]);function ROe(t,e){const n=[ZF,zF,XF,WF,jF,HF,UF];if(t.includes("headings")){const i=Math.min(...e),r=Math.max(...e),s=new RegExp(`^(#{${i},${r}})\\s`),o={dependencies:[Yp],export:(a,l)=>{if(!L1(a))return null;const u=Number(a.getTag().slice(1));return"#".repeat(u)+" "+l(a)},regExp:s,replace:AOe(a=>{const l=`h${a[1].length}`;return Ps(l)}),type:"element"};n.push(o)}if(t.includes("thematicBreak")&&n.push($Oe),t.includes("quote")&&n.push(BF),t.includes("link")&&n.push(qF),t.includes("lists")&&n.push(U5,H5,FF),t.includes("codeblock")){const i={...bd,dependencies:[ec],replace:(r,s,o)=>{const a=lf({code:"",language:o[1]??"",meta:""});r.selectPrevious(),r.replace(a),setTimeout(()=>{a.select()},80)}};n.push(i)}return n}const kh={allText:"",nodeIndex:[],offsetIndex:[]},$m=Ee(""),Im=Ee([]),jo=Ee(0),Ap=Ee(kh),$p=Ee(!1),q5=Ee("",t=>{t.link(q5,t.pipe($m,t.transformer(yC(250))))}),Yl=Ee(null,t=>t.sub(z1,e=>{var n;t.pub(Yl,((n=e==null?void 0:e.current)==null?void 0:n.parentElement)??null)})),Y5="MdxSearch",t1="MdxFocusSearch",G5=Ee(kh,t=>{t.link(G5,t.pipe(Ap,t.transformer(yC(250))))}),Lo=Ee(null),n1=Ee([]);function*KF(t,e){if(!e)return;let n;try{n=new RegExp(e,"gi")}catch{return}let i;for(;(i=n.exec(t))!==null;){if(i[0].length===0){n.lastIndex===i.index&&n.lastIndex++;continue}yield[i.index,i.index+i[0].length-1]}}function*MOe(t,{allText:e,offsetIndex:n,nodeIndex:i}){for(const[r,s]of KF(e,t)){const o=n[r],a=n[s],l=i[r],u=i[s],h=((l==null?void 0:l.ownerDocument)??document).createRange();if(l===void 0||u===void 0||o===void 0||a===void 0)throw new Error("Invalid range: startNode, endNode, startOffset, or endOffset is undefined.");h.setStart(l,o),h.setEnd(u,a+1),yield h}}function NOe(t){let e="";const n=[];for(const i of pt().getAllTextNodes()){const r=i.getTextContent();let s=0;for(;s<r.length;){const o=r.codePointAt(s);if(o===void 0)break;const a=String.fromCodePoint(o),l=a.normalize("NFKD"),u=l===a;for(let c=0;c<l.length;c++){const h=u?s+c:s,f=u?h+1:s+a.length;n.push({key:i.getKey(),startOffset:h,endOffset:f}),e+=l[c]??""}s+=a.length}}return{editor:t,text:e,units:n}}function LOe(t,e){const n=[];for(const[i,r]of KF(t.text,e)){const s=t.units[i],o=t.units[r];!s||!o||n.push({editor:t.editor,start:{key:s.key,offset:s.startOffset},end:{key:o.key,offset:o.endOffset}})}return n}function DOe(t,e){const n=[],i=[],r=new Map,s=[];let o=!0;return t.editor.getEditorState().read(()=>{for(const a of t.units){let l=r.get(a.key);if(!l){const u=st(a.key);if(!le(u)){o=!1;break}const c=VT(t.editor,u,0,u,u.getTextContentSize());if(!c||c.startContainer!==c.endContainer){o=!1;break}l=c.startContainer,r.set(a.key,l)}n.push(l),i.push(a.startOffset)}for(const a of e){const l=st(a.start.key),u=st(a.end.key);if(!le(l)||!le(u))continue;const c=VT(t.editor,l,a.start.offset,u,a.end.offset);c&&s.push({match:a,range:c})}}),{index:o?{allText:t.text,nodeIndex:n,offsetIndex:i}:kh,projectedMatches:s}}function Yx(){return typeof CSS<"u"&&typeof CSS.highlights<"u"&&typeof Highlight<"u"}const JF=t=>{Yx()&&(CSS.highlights.delete(t1),t&&CSS.highlights.set(t1,new Highlight(t)))},QOe=t=>{Yx()&&CSS.highlights.set(Y5,new Highlight(...t))},VOe=()=>{Yx()&&(CSS.highlights.delete(Y5),CSS.highlights.delete(t1))},BOe=(t,e,n)=>{const i=(n==null?void 0:n.ignoreIfInView)??!0,r=(n==null?void 0:n.behavior)??"smooth",[s]=t.getClientRects();if(!e){console.warn("No content-editable element found for scrolling.");return}if(!s){console.warn("No client rect found for the range, cannot scroll.");return}const o=e.getBoundingClientRect(),a=s.top-o.top,l=s.bottom-o.top;if(i){const c=a+e.scrollTop,h=l+e.scrollTop,f=e.scrollTop,p=f+e.clientHeight;if(c>=f&&h<=p)return}const u=a+e.scrollTop-s.height;e.scrollTo({top:u,behavior:r})};function FOe(t,e){return(t==null?void 0:t.editor)===e.editor&&t.start.key===e.start.key&&t.start.offset===e.start.offset}function yc(t){t.pubIn({[n1]:[],[Im]:[],[jo]:0}),VOe()}function Xl(t,e,n){if(t.getValue(Lo)!==e)return;let i;e.getEditorState().read(()=>{i=NOe(e)});const r=t.getValue($p),s=t.getValue($m),o=r?LOe(i,s):[],{index:a,projectedMatches:l}=DOe(i,o);if(r?t.pub(Ap,a):t.pub(G5,a),!r||!s||l.length===0){yc(t);return}const u=l.map(({match:p})=>p),c=l.map(({range:p})=>p),h=t.getValue(jo);let f=Math.min(Math.max(h,1),c.length);n&&FOe(u[n.cursor-1],n.match)&&(f=n.cursor%c.length+1),t.pubIn({[n1]:u,[Im]:c,[jo]:f}),QOe(c),JF(c[f-1])}function UI(t){const e=st(t.start.key),n=st(t.end.key);return!le(e)||!le(n)||t.start.offset<0||t.start.offset>e.getTextContentSize()||t.end.offset<0||t.end.offset>n.getTextContentSize()?null:{startNode:e,endNode:n}}function qI(t,e,n,i){e.length===0||e.some(r=>r.editor!==t)||t.update(()=>{if(!e.some(r=>UI(r)===null))for(let r=e.length-1;r>=0;r--){const s=e[r];if(!s)continue;const o=UI(s);if(!o)throw new Error("Search match became stale during replacement.");if(o.startNode.is(o.endNode)){const l=o.startNode.spliceText(s.start.offset,s.end.offset-s.start.offset,n,!0);l.getTextContentSize()===0&&l.remove();continue}const a=Lu();a.anchor.set(o.startNode.getKey(),s.start.offset,"text"),a.focus.set(o.endNode.getKey(),s.end.offset,"text"),a.insertText(n)}},{tag:O1,onUpdate:i})}function YI(t,e){var n;const i=t.getValue(Zd);Tq(e,i)&&((n=i.current)==null?void 0:n.editor)!==e&&(i.current&&i.undoStack.push(i.current),i.current={editor:e,editorState:e.getEditorState()})}function jOe(){const t=Ol(),e=Bt(Im),n=Bt(jo),i=Bt($m),r=n>0?e.at(n-1)??null:null,s=Bt(Yl),[o,a]=s6($p),l=()=>{a(!0)},u=()=>{a(!1)},c=()=>{a(!o)},h=(y,S)=>{const _=typeof y=="number"?e[y-1]:y;if(!_)throw new Error("Error scrolling to range, range does not exist");BOe(_,s??void 0,S)},f=y=>{(y??"")!==i&&t.pub(jo,0),t.pub(q5,y??"")},p=()=>{if(!e.length)return;const y=n%e.length+1;h(y),t.pub(jo,y)},m=()=>{if(!e.length)return;const y=n<=1?e.length:n-1;h(y),t.pub(jo,y)},g=(y,S)=>{const _=t.getValue(Lo),w=t.getValue(n1)[n-1];!_||!w||(YI(t,_),qI(_,[w],y,()=>{Xl(t,_,{cursor:n,match:w}),S==null||S()}))},x=(y,S)=>{const _=t.getValue(Lo),k=t.getValue(n1);!_||k.length===0||(YI(t,_),qI(_,k,y,()=>{Xl(t,_),S==null||S()}))};return{next:p,prev:m,total:e.length,cursor:n,setSearch:f,search:i,currentRange:r,isSearchOpen:o,setIsSearchOpen:a,openSearch:l,closeSearch:u,toggleSearch:c,ranges:e,scrollToRangeOrIndex:h,replace:g,replaceAll:x}}const ZOe=Vn({init(t){Yx()||console.warn("CSS.highlights is not supported in this browser. Search highlighting will be unavailable."),t.sub(jo,e=>{t.getValue($p)&&JF(t.getValue(Im)[e-1])}),t.sub($m,()=>{const e=t.getValue(Lo);e&&Xl(t,e)}),t.sub($p,e=>{if(!e){yc(t);return}const n=t.getValue(Lo);n&&Xl(t,n)}),t.pub(_u,e=>{var n;t.pubIn({[Lo]:e,[Ap]:kh,[Yl]:((n=e.getRootElement())==null?void 0:n.parentElement)??null}),yc(t),Xl(t,e);const i=e.registerUpdateListener(({dirtyElements:s,dirtyLeaves:o})=>{(s.size>0||o.size>0)&&Xl(t,e)}),r=e.registerRootListener(s=>{if(!s){t.getValue(Lo)===e&&(t.pubIn({[Ap]:kh,[Yl]:null}),yc(t));return}t.pub(Yl,s.parentElement),Xl(t,e)});return()=>{i(),r(),t.getValue(Lo)===e&&(t.pub(Lo,null),yc(t))}}),t.sub(tn,e=>{e||(t.pub(Yl,null),yc(t))})}}),ej=()=>{const t=Tt(zd),e=Bt(Fw),n=Bt(U1),i=n.includes("quote"),r=n.includes("headings"),s=Ht();if(!i&&!r)return null;const o=[{label:s("toolbar.blockTypes.paragraph","Paragraph"),value:"paragraph"}];if(i&&o.push({label:s("toolbar.blockTypes.quote","Quote"),value:"quote"}),r){const a=Bt(lh);o.push(...a.map(l=>({label:s("toolbar.blockTypes.heading","Heading {{level}}",{level:l}),value:`h${l}`})))}return C.createElement(Pm,{value:e,onChange:a=>{switch(a){case"quote":t(()=>zu());break;case"paragraph":t(()=>ut());break;case"":break;default:if(a.startsWith("h"))t(()=>Ps(a));else throw new Error(`Unknown block type: ${a}`)}},triggerTitle:s("toolbar.blockTypeSelect.selectBlockTypeTooltip","Select block type"),placeholder:s("toolbar.blockTypeSelect.placeholder","Block type"),items:o})},qc=({format:t,addTitle:e,removeTitle:n,icon:i,formatName:r})=>{const[s,o]=Ft(Kp,fn),a=Tt(Jp),l=(s&t)!==0;return C.createElement(C5,{title:l?n:e,on:l,onValueChange:()=>{a(r)}},o(i))},tj=({options:t})=>{const e=Ht(),n=typeof t>"u";return C.createElement("div",{className:te.toolbarGroupOfGroups},n||t.includes("Bold")?C.createElement(qc,{format:Ic,addTitle:e("toolbar.bold","Bold"),removeTitle:e("toolbar.removeBold","Remove bold"),icon:"format_bold",formatName:"bold"}):null,n||t.includes("Italic")?C.createElement(qc,{format:Rc,addTitle:e("toolbar.italic","Italic"),removeTitle:e("toolbar.removeItalic","Remove italic"),icon:"format_italic",formatName:"italic"}):null,n||t.includes("Underline")?C.createElement(qc,{format:Nc,addTitle:e("toolbar.underline","Underline"),removeTitle:e("toolbar.removeUnderline","Remove underline"),icon:"format_underlined",formatName:"underline"}):null)},nj=({options:t})=>{const e=Ht(),n=typeof t>"u";return C.createElement("div",{className:te.toolbarGroupOfGroups},n||t.includes("Strikethrough")?C.createElement(qc,{format:Mc,addTitle:e("toolbar.strikethrough","Strikethrough"),removeTitle:e("toolbar.removeStrikethrough","Remove strikethrough"),icon:"strikeThrough",formatName:"strikethrough"}):null,n||t.includes("Sup")?C.createElement(qc,{format:Dc,addTitle:e("toolbar.superscript","Superscript"),removeTitle:e("toolbar.removeSuperscript","Remove superscript"),icon:"superscript",formatName:"superscript"}):null,n||t.includes("Sub")?C.createElement(qc,{format:Lc,addTitle:e("toolbar.subscript","Subscript"),removeTitle:e("toolbar.removeSubscript","Remove subscript"),icon:"subscript",formatName:"subscript"}):null)};function K5(t){return{note:t("admonitions.note","Note"),tip:t("admonitions.tip","Tip"),danger:t("admonitions.danger","Danger"),info:t("admonitions.info","Info"),caution:t("admonitions.caution","Caution")}}const ij=()=>{const[t,e]=Ft(Hu,mr),n=t.rootNode,i=Ht(),r=K5(i);return C.createElement(Pm,{value:n.getMdastNode().name,onChange:s=>{e==null||e.update(()=>{n.setMdastNode({...n.getMdastNode(),name:s}),setTimeout(()=>{e.update(()=>{n.getLatest().select()})},80)})},triggerTitle:i("admonitions.changeType","Select admonition type"),placeholder:i("admonitions.placeholder","Admonition type"),items:Zx.map(s=>({label:r[s],value:s}))})},rj=()=>{const[t,e,n]=Ft(Hu,tn,bp),i=sk(t.rootNode)?t.rootNode:null,r=Ht();if(!i)return null;const s=i.getLanguage(),{value:o,items:a}=a5(n,s);return C.createElement("div",{className:te.selectWithLabel},C.createElement("label",null,r("codeBlock.language","Code block language")),C.createElement(Pm,{value:o||su,onChange:l=>{e==null||e.update(()=>{i.setLanguage(l===su?"":l),setTimeout(()=>{e.update(()=>{i.getLatest().select()})})})},triggerTitle:r("codeBlock.selectLanguage","Select code block language"),placeholder:r("codeBlock.language","Code block language"),items:a}))},sj=()=>{const[t,e]=Ft(Kp,fn),n=Tt(Jp),i=Ht(),r=(t&Gp)!==0,s=r?i("toolbar.removeInlineCode","Remove code format"):i("toolbar.inlineCode","Inline code format");return C.createElement(Xx,{items:[{title:s,contents:e("code"),active:r,onChange:n.bind(null,"code")}]})},oj=()=>{const[t,e]=Ft(Kp,fn),n=Tt(Jp),i=Ht(),r=(t&Qc)!==0,s=r?i("toolbar.removeHighlight","Remove highlight"):i("toolbar.highlight","Highlight");return C.createElement(Xx,{items:[{title:s,contents:e("format_highlight"),active:r,onChange:n.bind(null,"highlight")}]})},aj=()=>{const t=Tt(zx),e=Bt(fn),n=Ht();return C.createElement(nc,{"aria-label":n("toolbar.link","Create link"),title:n("toolbar.link","Create link"),onClick:i=>{t()}},e("link"))},lj=({children:t,SourceToolbar:e,options:n=["rich-text","diff","source"]})=>{const[i,r]=Ft(go,fn),s=Tt(go),o=Ht(),a=[];return n.includes("rich-text")&&a.push({title:o("toolbar.richText","Rich text"),contents:r("rich_text"),value:"rich-text"}),n.includes("diff")&&a.push({title:o("toolbar.diffMode","Diff mode"),contents:r("difference"),value:"diff"}),n.includes("source")&&a.push({title:o("toolbar.source","Source mode"),contents:r("markdown"),value:"source"}),C.createElement(C.Fragment,null,i==="rich-text"?t:i==="diff"?C.createElement("span",{className:te.toolbarTitleMode},o("toolbar.diffMode","Diff mode")):e??C.createElement("span",{className:te.toolbarTitleMode},o("toolbar.source","Source mode")),C.createElement("div",{className:te.diffSourceToggleWrapper},C.createElement(w5,{className:te.diffSourceToggle,ggClassName:te.ggDiffSourceToggle,value:i,items:a,onChange:l=>{s(l===""?"rich-text":l)}})))},uj=()=>{const t=Tt(f5),e=Bt(fn),n=Ht(),i=C.useMemo(()=>{const r=K5(n);return Zx.map(s=>({value:s,label:r[s]}))},[n]);return C.createElement(qV,{title:n("toolbar.admonition","Insert Admonition"),onChoose:r=>{t({type:"containerDirective",name:r})},items:i},e("admonition"))},cj=()=>{const t=Tt(_x),e=Bt(fn),n=Ht();return C.createElement(nc,{title:n("toolbar.codeBlock","Insert Code Block"),onClick:()=>{t({})}},e("frame_source"))},hj=()=>{const t=Tt(U2),[e,n]=Ft(Y2,fn),i=Ht();return C.createElement(nc,{title:e?i("toolbar.editFrontmatter","Edit frontmatter"):i("toolbar.insertFrontmatter","Insert frontmatter"),className:yt({[te.activeToolbarButton]:e}),onClick:()=>{t()}},n("frontmatter"))},fj=C.forwardRef((t,e)=>{const n=Tt(B2),[i,r]=Ft(zn,fn),s=Ht();return C.createElement(Uo,{"aria-label":s("toolbar.image","Insert image"),className:te.toolbarButton,ref:e,disabled:i,onClick:()=>{n()}},C.createElement(Pl,{title:s("toolbar.image","Insert image")},r("add_photo")))}),dj=()=>{const t=Bt(fn),e=Tt(d2),n=Ht(),i=Bt(H1);return C.createElement(nc,{title:n("toolbar.table","Insert Table"),onClick:()=>{e({rows:3,columns:3})},...i?{"aria-disabled":!0,"data-disabled":!0,disabled:!0}:{}},t("table"))},pj=()=>{const t=Tt(Uw),e=Bt(fn),n=Ht();return C.createElement(nc,{title:n("toolbar.thematicBreak","Insert thematic break"),onClick:()=>{t()}},e("horizontal_rule"))},zOe={bullet:"format_list_bulleted",number:"format_list_numbered",check:"format_list_checked"},mj=({options:t=["bullet","number","check"]})=>{const[e,n,i]=Ft(iO,fn,H1),r=Tt(Yw),s=Ht(),o={bullet:s("toolbar.bulletedList","Bulleted list"),number:s("toolbar.numberedList","Numbered list"),check:s("toolbar.checkList","Check list")},a=t.map(l=>({value:l,title:o[l],contents:n(zOe[l])}));return C.createElement(w5,{value:e||"",items:a,onChange:r,disabled:i})},gj=()=>{const[t,e]=Ft(fn,tn),[n,i]=C.useState(!1),[r,s]=C.useState(!1),o=Ht();return C.useEffect(()=>{if(e)return wn(e.registerCommand(Na,a=>(i(a),!1),cr),e.registerCommand(Ma,a=>(s(a),!1),cr))},[e]),C.createElement(Xx,{items:[{title:o("toolbar.undo","Undo {{shortcut}}",{shortcut:Xd?"⌘Z":"Ctrl+Z"}),disabled:!n,contents:t("undo"),active:!1,onChange:()=>e==null?void 0:e.dispatchCommand(Mp,void 0)},{title:o("toolbar.redo","Redo {{shortcut}}",{shortcut:Xd?"⌘Y":"Ctrl+Y"}),disabled:!r,contents:t("redo"),active:!1,onChange:()=>e==null?void 0:e.dispatchCommand(Np,void 0)}]})};function GI(t){const e=t==null?void 0:t.rootNode;return(e==null?void 0:e.getType())!=="directive"?!1:["note","tip","danger","info","caution"].includes(e.getMdastNode().name)}const XOe=()=>C.createElement(lj,null,C.createElement(p0,{options:[{when:t=>(t==null?void 0:t.editorType)==="codeblock",contents:()=>C.createElement(rj,null)},{fallback:()=>C.createElement(C.Fragment,null,C.createElement(gj,null),C.createElement(Gs,null),C.createElement(tj,null),C.createElement(sj,null),C.createElement(oj,null),C.createElement(Gs,null),C.createElement(nj,null),C.createElement(Gs,null),C.createElement(mj,null),C.createElement(Gs,null),C.createElement(p0,{options:[{when:GI,contents:()=>C.createElement(ij,null)},{fallback:()=>C.createElement(ej,null)}]}),C.createElement(Gs,null),C.createElement(aj,null),C.createElement(fj,null),C.createElement(Gs,null),C.createElement(dj,null),C.createElement(pj,null),C.createElement(Gs,null),C.createElement(cj,null),C.createElement(p0,{options:[{when:t=>!GI(t),contents:()=>C.createElement(C.Fragment,null,C.createElement(Gs,null),C.createElement(uj,null))}]}),C.createElement(Gs,null),C.createElement(hj,null))}]})),KI=20,WOe=C.forwardRef(({autocompleteSuggestions:t=[],submitButtonTitle:e,dialogInputPlaceholder:n,onSubmit:i,tooltipTitle:r,buttonContent:s},o)=>{const[a,l]=Ft(Vs,zn),[u,c]=C.useState(!1),h=C.useCallback(f=>{i(f),c(!1)},[i]);return C.createElement(m2,{open:u,onOpenChange:c},C.createElement(Jee,{asChild:!0},C.createElement(Uo,{"aria-label":r,className:te.toolbarButton,ref:o,disabled:l},C.createElement(Pl,{title:r},s))),C.createElement(g2,{container:a==null?void 0:a.current},C.createElement(O2,{className:te.dialogOverlay}),C.createElement(x2,{className:te.dialogContent},C.createElement(HOe,{submitButtonTitle:e,autocompleteSuggestions:t,onSubmitCallback:h,dialogInputPlaceholder:n}))))}),HOe=({autocompleteSuggestions:t,onSubmitCallback:e,dialogInputPlaceholder:n,submitButtonTitle:i})=>{const[r,s]=C.useState(t.slice(0,KI)),o=Bt(fn),a=Ht(),l=t.length>0,{isOpen:u,getToggleButtonProps:c,getMenuProps:h,getInputProps:f,highlightedIndex:p,getItemProps:m,selectedItem:g}=Q2({initialInputValue:"",onInputValueChange({inputValue:w}){w=(w==null?void 0:w.toLowerCase())??"";const b=[];for(const E of t)if(E.toLowerCase().includes(w)&&(b.push(E),b.length>=KI))break;s(b)},items:r,itemToString(w){return w??""}}),x=C.useCallback(w=>{var b;w.key==="Escape"?(b=w.target.form)==null||b.reset():w.key==="Enter"&&(!u||r.length===0)&&(w.preventDefault(),e(w.target.value))},[u,r,e]),y=f(),S={...y,onKeyDown:w=>{x(w),y.onKeyDown(w)}},_=w=>{w.preventDefault(),w.stopPropagation(),e(S.value)},k=u&&r.length>0;return C.createElement("form",{onSubmit:_,className:yt(te.dialogForm)},C.createElement("div",{className:te.linkDialogInputContainer},C.createElement("div",{"data-visible-dropdown":k,className:te.linkDialogInputWrapper},C.createElement("input",{placeholder:n,className:te.linkDialogInput,...S,autoFocus:!0,size:30,"data-editor-dialog":!0}),l&&C.createElement("button",{"aria-label":"toggle menu",type:"button",...c()},o("arrow_drop_down"))),C.createElement("div",{className:te.downshiftAutocompleteContainer},C.createElement("ul",{...h(),"data-visible":k},r.map((w,b)=>C.createElement("li",{"data-selected":g===w,"data-highlighted":p===b,key:`${w}${b}`,...m({item:w,index:b})},w))))),C.createElement("button",{type:"submit",title:i,"aria-label":i,className:yt(te.actionButton,te.primaryActionButton)},o("check")),C.createElement(y2,{"aria-label":a("dialog.close","Close dialog"),className:te.actionButton},o("close")))},UOe={editorMap:new Map,registerEditor:(t,e)=>{}},J5=R.createContext(UOe),qOe=({children:t})=>{const[e,n]=C.useState(new Map);R.useEffect(()=>()=>{n(new Map)},[]);const i=R.useCallback((s,o)=>{n(a=>new Map(a).set(s,o))},[]),r=R.useMemo(()=>({editorMap:e,registerEditor:i}),[e,i]);return C.createElement(J5.Provider,{value:r},t)},YOe=({realm:t,editorId:e})=>{const{registerEditor:n}=C.useContext(J5);return R.useEffect(()=>{n(e,t)},[t,e,n]),null},GOe=Vn({init:(t,e)=>{e!=null&&e.editorId&&t.pub(_l,()=>C.createElement(YOe,{realm:t,editorId:e.editorId}))}});function KOe(t){return C.useContext(J5).editorMap.get(t)}function JOe(t,e){return t.replace("hsl","hsla").replace(")",`, ${e})`)}const j1e=Object.freeze(Object.defineProperty({__proto__:null,$convertPreElement:uL,$convertTableElement:h7,$createCodeBlockNode:lf,$createDirectiveNode:jx,$createFrontmatterNode:fm,$createGenericHTMLNode:Cw,$createImageNode:wl,$createTableNode:ox,$isCodeBlockNode:sk,$isDirectiveNode:WV,$isFrontmatterNode:Ya,$isGenericHTMLNode:m8,$isImageNode:Yd,$isTableNode:c7,ADMONITION_TYPES:Zx,ALL_HEADING_LEVELS:nO,Action:Ds,AdmonitionDirectiveDescriptor:mpe,Appender:_i,BlockTypeSelect:ej,BoldItalicUnderlineToggles:tj,Button:UV,ButtonOrDropdownButton:qV,ButtonWithTooltip:nc,CAN_USE_DOM:Hw,COMMON_STATE_CONFIG_EXTENSIONS:wde,Cell:Ee,ChangeAdmonitionType:ij,ChangeCodeMirrorLanguage:rj,CodeBlockNode:ec,CodeMirrorEditor:zV,CodeToggle:sj,ConditionalContents:p0,CreateLink:aj,DEFAULT_FORMAT:IU,DerivedCell:jZ,DialogButton:WOe,DiffSourceToggleWrapper:lj,DirectiveNode:xf,EMPTY_VALUE:su,EmptyTextNodeIndex:kh,FrontmatterNode:rf,GenericDirectiveEditor:gpe,GenericHTMLNode:Wh,GenericJsxEditor:rL,HighlightToggle:oj,INSERT_IMAGE_COMMAND:Gd,IS_APPLE:Xd,IS_BOLD:Ic,IS_CODE:Gp,IS_HIGHLIGHT:Qc,IS_ITALIC:Rc,IS_STRIKETHROUGH:Mc,IS_SUBSCRIPT:Lc,IS_SUPERSCRIPT:Dc,IS_UNDERLINE:Nc,ImageNode:nf,InsertAdmonition:uj,InsertCodeBlock:cj,InsertFrontmatter:hj,InsertImage:fj,InsertTable:dj,InsertThematicBreak:pj,KitchenSinkToolbar:XOe,ListsToggle:mj,MDXEditor:QG,MDX_FOCUS_SEARCH_NAME:t1,MDX_SEARCH_NAME:Y5,MarkdownParseError:H0,MultipleChoiceToggleGroup:Xx,NESTED_EDITOR_UPDATED_COMMAND:il,NestedEditorsContext:vx,NestedLexicalEditor:Sx,PropertyPopover:rk,Realm:gC,RealmContext:s1,RealmProvider:GZ,RealmWithPlugins:o6,RemoteMDXEditorRealmProvider:qOe,Root:HV,Select:Pm,SelectButtonTrigger:ZV,SelectContent:o5,SelectItem:s5,SelectTrigger:jV,Separator:Gs,Signal:kn,SingleChoiceToggleGroup:w5,SingleToggleGroup:Spe,StrikeThroughSupSubToggles:nj,TYPE_NAME:OS,TableNode:Gu,ToggleSingleGroupWithItem:C5,ToolbarToggleItem:_5,TooltipWrap:Pl,UndoRedo:gj,UnrecognizedMarkdownConstructError:U0,activeEditor$:tn,activeEditorSubscriptions$:$w,activePlugins$:U1,addActivePlugin$:Uu,addBottomAreaChild$:E8,addComposerChild$:_l,addEditorWrapper$:T8,addExportVisitor$:Lr,addImportVisitor$:hr,addLexicalNode$:Nr,addMdastExtension$:ol,addNestedEditorChild$:W1,addSyntaxExtension$:sl,addTableCellEditorChild$:Bw,addToMarkdownExtension$:Wu,addTopAreaChild$:k8,admonitionLabelsMap:K5,allowSetImageDimensions$:ch,allowedHeadingLevels$:lh,always:CU,appendCodeBlockEditorDescriptor$:cL,applyBlockType$:Pq,applyFormat$:Jp,applyLinkChanges$:ype,applyListType$:Yw,autoFocus$:xS,bottomAreaChildren$:Lw,call:p8,cancelLinkEdit$:m5,changeWith:UZ,closeImageDialog$:j2,cmExtensions$:Hx,codeBlockEditorDescriptors$:Xu,codeBlockLanguages$:bp,codeBlockPlugin:qre,codeMirrorAutoLoadLanguageSupport$:XO,codeMirrorExtensions$:zO,codeMirrorPlugin:kde,combine:qZ,compose:yU,composerChildren$:Mw,contentEditableClassName$:Y0,contentEditableRef$:z1,contentEditableWrapperElement$:C8,controlOrMeta:M8,convertSelectionToNode$:zd,corePlugin:P8,createActiveEditorSubscription$:_u,createRootEditorSubscription$:qh,currentBlockType$:Fw,currentFormat$:Kp,currentListType$:iO,currentSelection$:bu,curry1to0:SU,curry2to1:bU,debounceTime:yC,debouncedIndexer$:G5,defaultCodeBlockLanguage$:rl,defaultComparator:Pb,defaultSvgIcons:A8,delayWithMicrotask:ez,diffMarkdown$:Tp,diffSourcePlugin:q0e,directiveDescriptors$:Su,directivesPlugin:ppe,disableAutoLink$:g7,disableImageResize$:cO,disableImageSettingsButton$:Z2,editImageToolbarComponent$:dO,editorInFocus$:Hu,editorInTable$:H1,editorRootElementRef$:Vs,editorSearchCursor$:jo,editorSearchRanges$:Im,editorSearchScrollableContent$:Yl,editorSearchTerm$:$m,editorSearchTermDebounced$:q5,editorSearchTextNodeIndex$:Ap,editorWrapperElementRef$:S8,editorWrappers$:Dw,exportLexicalTreeToMdast:D1,exportMarkdownFromLexical:Q1,exportVisitors$:Hh,filter:Th,fromWithinEditorRead:wG,frontmatterDialogOpen$:Kd,frontmatterPlugin:cie,getCodeBlockLanguageSelectData:a5,getSelectedNode:$8,getSelectionAsMarkdown:I8,getSelectionRectangle:Ww,getStateAsMarkdown:PG,getValue:YZ,handlePromise:nz,hasFrontmatter$:Y2,headingsPlugin:ZG,historyState$:Zd,htmlTags:_w,iconComponentFor$:fn,imageAutocompleteSuggestions$:uO,imageDialogState$:qa,imagePlaceholder$:fO,imagePlugin:Ine,imagePreviewHandler$:hO,imageUploadHandler$:Fo,importMarkdownToLexical:f8,importMdastTreeToLexical:V1,importVisitors$:em,inFocus$:sh,initialMarkdown$:Ew,initialMarkdownNormalize$:Fd,insertCodeBlock$:_x,insertCodeMirror$:XV,insertDecoratorNode$:Yh,insertDirective$:f5,insertFrontmatter$:U2,insertImage$:eN,insertJsx$:oL,insertMarkdown$:Aw,insertTable$:d2,insertThematicBreak$:Uw,isMdastHTMLNode:Sw,isMdastJsxNode:sL,isPartOftheEditorUI:sx,joinProc:wU,jsxComponentDescriptors$:ia,jsxIsAvailable$:Uh,jsxPlugin:jre,lexical:zX,lexicalTheme:ww,lexicalTheme$:tO,link:ZZ,linkAutocompleteSuggestions$:x5,linkDialogPlugin:vpe,linkDialogState$:Vi,linkPlugin:Wee,listsPlugin:fK,makeHslTransparent:JOe,map:As,mapTo:OC,markdown$:Rs,markdownErrorSignal$:J0,markdownProcessingError$:oh,markdownShortcutPlugin:POe,markdownSourceEditorValue$:al,maxLengthPlugin:pie,mdastExtensions$:Pw,muteChange$:eO,nestedEditorChildren$:Qw,noop:Ua,normalizeCodeBlockLanguages:ZO,onBlur$:ah,onClickLinkCallback$:y5,onNext:tz,onReadOnlyClickLinkCallback$:v5,onWindowChange$:d5,once:KZ,openEditImageDialog$:F2,openLinkEditDialog$:zx,openNewImageDialog$:B2,parseImageDimension:wu,pipe:HZ,placeholder$:K0,prop:_U,pub:zZ,pubIn:WZ,quotePlugin:die,rangeSearchScan:MOe,readOnly$:zn,readOnlyDiff$:X5,realmPlugin:Vn,remoteRealmPlugin:GOe,removeFrontmatter$:q2,removeLink$:O5,rootEditor$:mr,rootEditorSubscriptions$:Iw,saveImage$:z2,scan:xC,searchOpen$:$p,searchPlugin:ZOe,setMarkdown$:X1,showLinkTitleField$:b5,spellCheck$:G0,sub:XZ,switchFromPreviewToLinkEdit$:g5,syntaxExtensions$:Tw,tableCellEditorChildren$:Vw,tablePlugin:Eee,tap:d8,thematicBreakPlugin:qG,throttleTime:JZ,thrush:vU,toMarkdownExtensions$:Z1,toMarkdownOptions$:jd,toolbarClassName$:g0,toolbarContents$:m0,toolbarPlugin:_pe,topAreaChildren$:Nw,translation$:jw,updateLink$:p5,useCell:s6,useCellValue:Bt,useCellValues:Ft,useCodeBlockEditorContext:xO,useEditorSearch:jOe,useLexicalNodeRemove:nL,useMdastNodeUpdater:bx,useNestedEditorContext:mm,usePublisher:Tt,useRealm:Ol,useRemoteMDXEditorRealm:KOe,useTranslation:Ht,usedLexicalNodes$:tm,uuidv4:a7,viewMode$:go,voidEmitter:ep,withLatestFrom:On},Symbol.toStringTag,{value:"Module"}));export{RB as C,Dr as E,Xt as I,gh as L,mL as N,xh as a,mhe as b,d0 as c,rV as d,_h as e,pf as f,sn as g,Se as h,df as i,fe as j,yF as k,Lle as l,KO as m,qB as n,qD as o,gL as p,ss as q,Dle as r,ff as s,Q as t,Ki as u,lQ as v,j1e as w};
|
|
159
|
+
//# sourceMappingURL=index-DaKPQ2hN.js.map
|