/*!
Copyright (c) 2026 Lenovo SSG BASD. All rights reserved.
@license Proprietary

This software is the confidential and proprietary property of Lenovo SSG BASD.
You shall not disclose such Confidential Information and shall use it only in
accordance with the terms of the license agreement.

--- Build Info ---
Version: 1.1.1
Build Time: 2026/2/26 17:21:00
Build Commit: 81e556ed827e2f043668506dae6fae8dbb9ef395
*/
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../core/dist/index.js"),t=require("../../../prosemirror-state/dist/index.js");var o=e.Node.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{},nextNodeType:"paragraph"}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:t}){return["hr",e.mergeAttributes(this.options.HTMLAttributes,t)]},markdownTokenName:"hr",parseMarkdown:(e,t)=>t.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:o,state:n})=>{if(!e.canInsertNode(n,n.schema.nodes[this.name]))return!1;const{selection:r}=n,{$to:s}=r,i=o();return e.isNodeSelection(r)?i.insertContentAt(s.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({state:e,tr:o,dispatch:n})=>{if(n){const{$to:n}=o.selection,r=n.end();if(n.nodeAfter)n.nodeAfter.isTextblock?o.setSelection(t.TextSelection.create(o.doc,n.pos+1)):n.nodeAfter.isBlock?o.setSelection(t.NodeSelection.create(o.doc,n.pos)):o.setSelection(t.TextSelection.create(o.doc,n.pos));else{const s=e.schema.nodes[this.options.nextNodeType]||n.parent.type.contentMatch.defaultType,i=null==s?void 0:s.create();i&&(o.insert(r,i),o.setSelection(t.TextSelection.create(o.doc,r+1)))}o.scrollIntoView()}return!0}).run()}}},addInputRules(){return[e.nodeInputRule({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}});exports.HorizontalRule=o;