PageSourceSearch

https://teachquill.com/_next/static/chunks/vendor-tiptap-1810fed29cd196cf.js

js teachquill.com collected 2026-10-06 16:45:58 UTC 78,152 bytes, 10 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8628],{8624:(t,e,n)=>{n.d(e,{Q1:()=>a,xJ:()=>o});var r=n(76908),i=(t,e=0)=>{let n=[];return!t.children.length||e>20||Array.from(t.children).forEach(t=>{"SPAN"===t.tagName?n.push(t):t.children.length&&n.push(...i(t,e+1))}),n},o=r.CU.create({name:"textStyle",priority:101,addOptions:()=>({HTMLAttributes:{},mergeNestedSpanStyles:!0}),parseHTML(){return[{tag:"span",consuming:!1,getAttrs:t=>!!t.hasAttribute("style")&&(this.options.mergeNestedSpanStyles&&(t=>{if(!t.children.length)return;let e=i(t);e&&e.forEach(t=>{var e,n;let r=t.getAttribute("style"),i=null==(n=null==(e=t.parentElement)?void 0:e.closest("span"))?void 0:n.getAttribute("style");t.setAttribute("style",`${i};${r}`)})})(t),{})}]},renderHTML({HTMLAttributes:t}){return["span",(0,r.KV)(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleTextStyle:t=>({commands:e})=>e.toggleMark(this.name,t),removeEmptyTextStyle:()=>({tr:t})=>{let{selection:e}=t;return t.doc.nodesBetween(e.from,e.to,(e,n)=>{if(e.isTextblock)return!0;e.marks.filter(t=>t.type===this.type).some(t=>Object.values(t.attrs).some(t=>!!t))||t.removeMark(n,n+e.nodeSize,this.type)}),!0}}}}),s=r.YY.create({name:"backgroundColor",addOptions:()=>({types:["textStyle"]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{backgroundColor:{default:null,parseHTML:t=>{var e;let n=t.getAttribute("style");if(n){let t=n.split(";").map(t=>t.trim()).filter(Boolean);for(let e=t.length-1;e>=0;e-=1){let n=t[e].split(":");if(n.length>=2){let t=n[0].trim().toLowerCase(),e=n.slice(1).join(":").trim();if("background-color"===t)return e.replace(/['"]+/g,"")}}}return null==(e=t.style.backgroundColor)?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.backgroundColor?{style:`background-color: ${t.backgroundColor}`}:{}}}}]},addCommands:()=>({setBackgroundColor:t=>({chain:e})=>e().setMark("textStyle",{backgroundColor:t}).run(),unsetBackgroundColor:()=>({chain:t})=>t().setMark("textStyle",{backgroundColor:null}).removeEmptyTextStyle().run()})}),a=r.YY.create({name:"color",addOptions:()=>({types:["textStyle"]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;let n=t.getAttribute("style");if(n){let t=n.split(";").map(t=>t.trim()).filter(Boolean);for(let e=t.length-1;e>=0;e-=1){let n=t[e].split(":");if(n.length>=2){let t=n[0].trim().toLowerCase(),e=n.slice(1).join(":").trim();if("color"===t)return e.replace(/['"]+/g,"")}}}return null==(e=t.style.color)?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands:()=>({setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()})}),l=r.YY.create({name:"fontFamily",addOptions:()=>({types:["textStyle"]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:t=>t.style.fontFamily,renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands:()=>({setFontFamily:t=>({chain:e})=>e().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()})}),d=r.YY.create({name:"fontSize",addOptions:()=>({types:["textStyle"]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:t=>t.style.fontSize,renderHTML:t=>t.fontSize?{style:`font-size: ${t.fontSize}`}:{}}}}]},addCommands:()=>({setFontSize:t=>({chain:e})=>e().setMark("textStyle",{fontSize:t}).run(),unsetFontSize:()=>({chain:t})=>t().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()})}),h=r.YY.create({name:"lineHeight",addOptions:()=>({types:["textStyle"]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:t=>t.style.lineHeight,renderHTML:t=>t.lineHeight?{style:`line-height: ${t.lineHeight}`}:{}}}}]},addCommands:()=>({setLineHeight:t=>({chain:e})=>e().setMark("textStyle",{lineHeight:t}).run(),unsetLineHeight:()=>({chain:t})=>t().setMark("textStyle",{lineHeight:null}).removeEmptyTextStyle().run()})});r.YY.create({name:"textStyleKit",addExtensions(){let t=[];return!1!==this.options.backgroundColor&&t.push(s.configure(this.options.backgroundColor)),!1!==this.options.color&&t.push(a.configure(this.options.color)),!1!==this.options.fontFamily&&t.pu
1sh(l.configure(this.options.fontFamily)),!1!==this.options.fontSize&&t.push(d.configure(this.options.fontSize)),!1!==this.options.lineHeight&&t.push(h.configure(this.options.lineHeight)),!1!==this.options.textStyle&&t.push(o.configure(this.options.textStyle)),t}})},19148:(t,e,n)=>{n.d(e,{A:()=>r});var r=n(76908).YY.create({name:"textAlign",addOptions:()=>({types:[],alignments:["left","center","right","justify"],defaultAlignment:null}),addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{let e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>!!this.options.alignments.includes(t)&&this.options.types.map(n=>e.updateAttributes(n,{textAlign:t})).some(t=>t),unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).some(t=>t),toggleTextAlign:t=>({editor:e,commands:n})=>!!this.options.alignments.includes(t)&&(e.isActive({textAlign:t})?n.unsetTextAlign():n.setTextAlign(t))}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}})},22984:(t,e,n)=>{n.d(e,{n:()=>r.nA});var r=n(64864)},37149:(t,e,n)=>{n.d(e,{Ay:()=>u,N_:()=>p});var r=n(76908),i=n(38406),o=n(51876),s="[\0- \xa0 ᠎ -\u2029  ]",a=new RegExp(s),l=RegExp(`${s}$`),d=RegExp(s,"g");function h(t,e){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(t=>{let e="string"==typeof t?t:t.scheme;e&&n.push(e)}),!t||t.replace(d,"").match(RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var p=r.CU.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if("string"==typeof t)return void(0,i.ZV)(t);(0,i.ZV)(t.scheme,t.optionalSlashes)})},onDestroy(){(0,i.cL)()},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!h(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>{let e=/^[a-z][a-z0-9+.-]*:\/\//i.test(t),n=/^[a-z][a-z0-9+.-]*:/i.test(t);if(e||n&&!t.includes("@"))return!0;let r=(t.includes("@")?t.split("@").pop():t).split(/[/?#:]/)[0];return!/^\d{1,3}(\.\d{1,3}){3}$/.test(r)&&!!/\./.test(r)}}),addAttributes(){return{href:{default:null,parseHTML:t=>t.getAttribute("href")},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{let e=t.getAttribute("href");return!!e&&!!this.options.isAllowedUri(e,{defaultValidate:t=>!!h(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:t=>!!h(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",(0,r.KV)(this.options.HTMLAttributes,t),0]:["a",(0,r.KV)(this.options.HTMLAttributes,{...t,href:""}),0]},markdownTokenName:"link",parseMarkdown:(t,e)=>e.applyMark("link",e.parseInline(t.tokens||[]),{href:t.href,title:t.title||null}),renderMarkdown:(t,e)=>{var n;let r=(null==(n=t.attrs)?void 0:n.href)||"",i=e.renderChildren(t);return`[${i}](${r})`},addCommands(){return{setLink:t=>({chain:e})=>{let{href:n}=t;return!!this.options.isAllowedUri(n,{defaultValidate:t=>!!h(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&e().setMark(this.name,t).setMeta("preventAutolink",!0).run()},toggleLink:t=>({chain:e})=>{let{href:n}=t||{};return(!n||!!this.options.isAllowedUri(n,{defaultValidate:t=>!!h(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))&&e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[(0,r.Zc)({find:t=>{let e=[];
1if(t){let{protocols:n,defaultProtocol:r}=this.options,o=(0,i.I6)(t).filter(t=>t.isLink&&this.options.isAllowedUri(t.value,{defaultValidate:t=>!!h(t,n),protocols:n,defaultProtocol:r}));o.length&&o.forEach(t=>{this.options.shouldAutoLink(t.value)&&e.push({text:t.value,data:{href:t.href},index:t.start})})}return e},type:this.type,getAttributes:t=>{var e;return{href:null==(e=t.data)?void 0:e.href}}})]},addProseMirrorPlugins(){var t,e,n;let s=[],{protocols:d,defaultProtocol:p}=this.options;return this.options.autolink&&s.push((t={type:this.type,defaultProtocol:this.options.defaultProtocol,validate:t=>this.options.isAllowedUri(t,{defaultValidate:t=>!!h(t,d),protocols:d,defaultProtocol:p}),shouldAutoLink:this.options.shouldAutoLink},new o.k_({key:new o.hs("autolink"),appendTransaction:(e,n,o)=>{let s=e.some(t=>t.docChanged)&&!n.doc.eq(o.doc),d=e.some(t=>t.getMeta("preventAutolink"));if(!s||d)return;let{tr:h}=o,p=(0,r.T7)(n.doc,[...e]);if((0,r.FF)(p).forEach(({newRange:e})=>{let n,s,d=(0,r.Nx)(o.doc,e,t=>t.isTextblock);if(d.length>1)n=d[0],s=o.doc.textBetween(n.pos,n.pos+n.node.nodeSize,void 0," ");else if(d.length){let t=o.doc.textBetween(e.from,e.to," "," ");if(!l.test(t))return;n=d[0],s=o.doc.textBetween(n.pos,e.to,void 0," ")}if(n&&s){let e=s.split(a).filter(Boolean);if(e.length<=0)return!1;let l=e[e.length-1],d=n.pos+s.lastIndexOf(l);if(!l)return!1;let p=(0,i.qw)(l).map(e=>e.toObject(t.defaultProtocol));if(!(1===p.length?p[0].isLink:3===p.length&&!!p[1].isLink&&["()","[]"].includes(p[0].value+p[2].value)))return!1;p.filter(t=>t.isLink).map(t=>({...t,from:d+t.start+1,to:d+t.end+1})).filter(t=>!o.schema.marks.code||!o.doc.rangeHasMark(t.from,t.to,o.schema.marks.code)).filter(e=>t.validate(e.value)).filter(e=>t.shouldAutoLink(e.value)).forEach(e=>{(0,r.hO)(e.from,e.to,o.doc).some(e=>e.mark.type===t.type)||h.addMark(e.from,e.to,t.type.create({href:e.href}))})}}),h.steps.length)return h}}))),s.push((e={type:this.type,editor:this.editor,openOnClick:"whenNotEditable"===this.options.openOnClick||this.options.openOnClick,enableClickSelection:this.options.enableClickSelection},new o.k_({key:new o.hs("handleClickLink"),props:{handleClick:(t,n,i)=>{var o,s;if(0!==i.button||!t.editable)return!1;let a=!1;if(e.enableClickSelection&&(a=e.editor.commands.extendMarkRange(e.type.name)),e.openOnClick){let n=null;if(i.target instanceof HTMLAnchorElement)n=i.target;else{let t=i.target,e=[];for(;"DIV"!==t.nodeName;)e.push(t),t=t.parentNode;n=e.find(t=>"A"===t.nodeName)}if(!n)return a;let l=(0,r.gu)(t.state,e.type.name),d=null!=(o=null==n?void 0:n.href)?o:l.href,h=null!=(s=null==n?void 0:n.target)?s:l.target;n&&d&&(window.open(d,h),a=!0)}return a}}}))),this.options.linkOnPaste&&s.push((n={editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink},new o.k_({key:new o.hs("handlePasteLink"),props:{handlePaste:(t,e,r)=>{let{shouldAutoLink:o}=n,{state:s}=t,{selection:a}=s,{empty:l}=a;if(l)return!1;let d="";r.content.forEach(t=>{d+=t.textContent});let h=(0,i.I6)(d,{defaultProtocol:n.defaultProtocol}).find(t=>t.isLink&&t.value===d);return!!d&&!!h&&(void 0===o||!!o(h.value))&&n.editor.commands.setMark(n.type,{href:h.href})}}}))),s}}),u=p},37915:(t,e,n)=>{n.d(e,{JU:()=>c,Or:()=>p,QO:()=>d,lb:()=>m,vR:()=>h});var r=n(76908),i=n(51876),o=n(19264),s=n(32806),a=n(65145),l=n(60823);r.YY.create({name:"characterCount",addOptions:()=>({limit:null,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(t=>""!==t).length}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=t=>{let e=(null==t?void 0:t.node)||this.editor.state.doc;if("textSize"===((null==t?void 0:t.mode)||this.options.mode)){let t=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(t)}return e.nodeSize},this.storage.words=t=>{let e=(null==t?void 0:t.node)||this.editor.state.doc,n=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let t=!1;return[new i.k_({key:new i.hs("characterCount"),appendTransaction:(e,n,r)=>{if(t)return;let i=this.options.limit;if(null==i||0===i){t=!0;return}let o=this.storage.characters({node:r.doc});if(o>i){console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);let e=r.tr.deleteRange(0,o-i);return t=!0,e}t=!0},filterTransaction:(t,e)=>{let n=this.options.limit;if(!t.docChanged||0===n||null==n)return!0;let r=this.storage.characters({node:e.doc}),i=this.storage.characters({node:t.doc});if(i<=n||r>n&&i>n&&i<=r)return!0;
1if(r>n&&i>n&&i>r||!t.getMeta("paste"))return!1;let o=t.selection.$head.pos;return t.deleteRange(o-(i-n),o),!(this.storage.characters({node:t.doc})>n)}})]}});var d=r.YY.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[(0,o.A)(this.options)]}});r.YY.create({name:"focus",addOptions:()=>({className:"has-focus",mode:"all"}),addProseMirrorPlugins(){return[new i.k_({key:new i.hs("focus"),props:{decorations:({doc:t,selection:e})=>{let{isEditable:n,isFocused:r}=this.editor,{anchor:i}=e,o=[];if(!n||!r)return s.zF.create(t,[]);let a=0;"deepest"===this.options.mode&&t.descendants((t,e)=>{if(!t.isText){if(!(i>=e&&i<=e+t.nodeSize-1))return!1;a+=1}});let l=0;return t.descendants((t,e)=>!t.isText&&!!(i>=e&&i<=e+t.nodeSize-1)&&((l+=1,"deepest"===this.options.mode&&a-l>0||"shallowest"===this.options.mode&&l>1)?"deepest"===this.options.mode:void o.push(s.NZ.node(e,e+t.nodeSize,{class:this.options.className})))),s.zF.create(t,o)}}})]}});var h=r.YY.create({name:"gapCursor",addProseMirrorPlugins:()=>[(0,a.z)()],extendNodeSchema(t){var e;let n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:null!=(e=(0,r.gk)((0,r.iI)(t,"allowGapCursor",n)))?e:null}}}),p=r.YY.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){return[new i.k_({key:new i.hs("placeholder"),props:{decorations:({doc:t,selection:e})=>{let n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=e,o=[];if(!n)return null;let a=this.editor.isEmpty;return t.descendants((t,e)=>{let n=i>=e&&i<=e+t.nodeSize,l=!t.isLeaf&&(0,r.Op)(t);if((n||!this.options.showOnlyCurrent)&&l){let r=[this.options.emptyNodeClass];a&&r.push(this.options.emptyEditorClass);let i=s.NZ.node(e,e+t.nodeSize,{class:r.join(" "),"data-placeholder":"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:t,pos:e,hasAnchor:n}):this.options.placeholder});o.push(i)}return this.options.includeChildren}),s.zF.create(t,o)}}})]}});function u({types:t,node:e}){return e&&Array.isArray(t)&&t.includes(e.type)||(null==e?void 0:e.type)===t}r.YY.create({name:"selection",addOptions:()=>({className:"selection"}),addProseMirrorPlugins(){let{editor:t,options:e}=this;return[new i.k_({key:new i.hs("selection"),props:{decorations:n=>n.selection.empty||t.isFocused||!t.isEditable||(0,r.BQ)(n.selection)||t.view.dragging?null:s.zF.create(n.doc,[s.NZ.inline(n.selection.from,n.selection.to,{class:e.className})])}})]}});var c=r.YY.create({name:"trailingNode",addOptions:()=>({node:void 0,notAfter:[]}),addProseMirrorPlugins(){var t;let e=new i.hs(this.name),n=this.options.node||(null==(t=this.editor.schema.topNodeType.contentMatch.defaultType)?void 0:t.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,t])=>t).filter(t=>(this.options.notAfter||[]).concat(n).includes(t.name));return[new i.k_({key:e,appendTransaction:(t,r,i)=>{let{doc:o,tr:s,schema:a}=i,l=e.getState(i),d=o.content.size,h=a.nodes[n];if(l)return s.insert(d,h.create())},state:{init:(t,e)=>!u({node:e.tr.doc.lastChild,types:r}),apply:(t,e)=>!t.docChanged||t.getMeta("__uniqueIDTransaction")?e:!u({node:t.doc.lastChild,types:r})}})]}}),m=r.YY.create({name:"undoRedo",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:t,dispatch:e})=>(0,l.tN)(t,e),redo:()=>({state:t,dispatch:e})=>(0,l.ZS)(t,e)}),addProseMirrorPlugins(){return[(0,l.b6)(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}})},46098:(t,e,n)=>{n.d(e,{$Z:()=>c,VR:()=>M,gu:()=>L,hG:()=>k});var r=n(12115),i=n(47650),o=n(14806),s=n(95155),a=n(76908),l=n(70428),d=n(8828),h=({contentComponent:t})=>{let e=(0,o.useSyncExternalStore)(t.subscribe,t.getSnapshot,t.getServerSnapshot);return(0,s.jsx)(s.Fragment,{children:Object.values(e)})},p=class extends r.Component{constructor(t){var e;super(t),this.editorContentRef=r.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!(null==(e=t.editor)?void 0:e.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var t;let e=this.props.editor;if(e&&!e.isDestroyed&&(null==(t=e.view.dom)?void 0:t.parentNode)){if(e.contentComponent)return;let t=this.editorContentRef.current;t.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:t}),e.contentComponent=function(){let t=new Set,e={};return{subscribe:e=>(t.add(e),()=>{t.delete(e)}),getSnapshot:()=>e,getServerSnapshot:()=>e,setRenderer(n,r){e={...e,[n]:i.createPortal(r.reactElement,r.element,n)},t.forEach(t=>t())},removeRenderer(n){let r={...e};delete r[n],e=r,t.forEach(t=>t())}}}(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=e.contentComponent.subscribe(()=>{this.setState(t=>t.hasContentComponentInitialized?t:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),e.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var t;let e=this.props.editor;if(e){this.initialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),e.contentComponent=null;try{if(!(null==(t=e.view.dom)?void 0:t.parentNode))return;let n=document.createElement("div");n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n})}catch{}}}render(){let{editor:t,innerRef:e,...n}=this.props;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{ref:((...t)=>e=>{t.forEach(t=>{"function"==typeof t?t(e):t&&(t.current=e)})})(e,this.editorContentRef),...n}),(null==t?void 0:t.contentComponent)&&(0,s.jsx)(h,{contentComponent:t.contentComponent})]})}},u=(0,r.forwardRef)((t,e)=>{let n=r.useMemo(()=>Math.floor(0xffffffff*Math.random()).toString(),[t.editor]);return r.createElement(p,{key:n,innerRef:e,...t})}),c=r.memo(u),m="undefined"!=typeof window?r.useLayoutEffect:r.useEffect,f=class{constructor(t){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=t,this.lastSnapshot={editor:t,transactionNumber:0}
1,this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber||(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber}),this.lastSnapshot}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}watch(t){if(this.editor=t,this.editor){let t=()=>{this.transactionNumber+=1,this.subscribers.forEach(t=>t())},e=this.editor;return e.on("transaction",t),()=>{e.off("transaction",t)}}}},g="undefined"==typeof window,y=g||!!("undefined"!=typeof window&&window.next),b=class t{constructor(t){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=t,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(t){this.editor=t,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(t=>t())}getInitialEditor(){if(void 0===this.options.current.immediatelyRender)return g||y?null:this.createEditor();return this.options.current.immediatelyRender,this.options.current.immediatelyRender?this.createEditor():null}createEditor(){let t={...this.options.current,onBeforeCreate:(...t)=>{var e,n;return null==(n=(e=this.options.current).onBeforeCreate)?void 0:n.call(e,...t)},onBlur:(...t)=>{var e,n;return null==(n=(e=this.options.current).onBlur)?void 0:n.call(e,...t)},onCreate:(...t)=>{var e,n;return null==(n=(e=this.options.current).onCreate)?void 0:n.call(e,...t)},onDestroy:(...t)=>{var e,n;return null==(n=(e=this.options.current).onDestroy)?void 0:n.call(e,...t)},onFocus:(...t)=>{var e,n;return null==(n=(e=this.options.current).onFocus)?void 0:n.call(e,...t)},onSelectionUpdate:(...t)=>{var e,n;return null==(n=(e=this.options.current).onSelectionUpdate)?void 0:n.call(e,...t)},onTransaction:(...t)=>{var e,n;return null==(n=(e=this.options.current).onTransaction)?void 0:n.call(e,...t)}
1,onUpdate:(...t)=>{var e,n;return null==(n=(e=this.options.current).onUpdate)?void 0:n.call(e,...t)},onContentError:(...t)=>{var e,n;return null==(n=(e=this.options.current).onContentError)?void 0:n.call(e,...t)},onDrop:(...t)=>{var e,n;return null==(n=(e=this.options.current).onDrop)?void 0:n.call(e,...t)},onPaste:(...t)=>{var e,n;return null==(n=(e=this.options.current).onPaste)?void 0:n.call(e,...t)},onDelete:(...t)=>{var e,n;return null==(n=(e=this.options.current).onDelete)?void 0:n.call(e,...t)}};return new a.KE(t)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(t){return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)}}static compareOptions(t,e){return Object.keys(t).every(n=>!!["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(n)||("extensions"===n&&t.extensions&&e.extensions?t.extensions.length===e.extensions.length&&t.extensions.every((t,n)=>{var r;return t===(null==(r=e.extensions)?void 0:r[n])}):t[n]===e[n]))}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&0===e.length?t.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(e),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(t){if(this.editor&&!this.editor.isDestroyed){if(null===this.previousDeps){this.previousDeps=t;return}if(this.previousDeps.length===t.length&&this.previousDeps.every((e,n)=>e===t[n]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=t}scheduleDestroy(){let t=this.instanceId,e=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===t){e&&e.setOptions(this.options.current);return}e&&!e.isDestroyed&&(e.destroy(),this.instanceId===t&&this.setEditor(null))},1)}};function k(t={},e=[]){let n=(0,r.useRef)(t);n.current=t;let[i]=(0,r.useState)(()=>new b(n)),s=(0,o.useSyncExternalStore)(i.subscribe,i.getEditor,i.getServerSnapshot);return(0,r.useDebugValue)(s),(0,r.useEffect)(i.onRender(e)),!function(t){var e;let[n]=(0,r.useState)(()=>new f(t.editor)),i=(0,d.useSyncExternalStoreWithSelector)(n.subscribe,n.getSnapshot,n.getServerSnapshot,t.selector,null!=(e=t.equalityFn)?e:l.bD);m(()=>n.watch(t.editor),[t.editor,n]),(0,r.useDebugValue)(i)}({editor:s,selector:({transactionNumber:e})=>!1===t.shouldRerenderOnTransaction||void 0===t.shouldRerenderOnTransaction?null:t.immediatelyRender&&0===e?0:e+1}),s}(0,r.createContext)({editor:null}).Consumer;var v=(0,r.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),M=r.forwardRef((t,e)=>{let{onDragStart:n}=(0,r.useContext)(v),i=t.as||"div";return(0,s.jsx)(i,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})});function w(t){return!!("function"==typeof t&&t.prototype&&t.prototype.isReactComponent)}function C(t){return!!("object"==typeof t&&t.$$typeof&&("Symbol(react.forward_ref)"===t.$$typeof.toString()||"react.forward_ref"===t.$$typeof.description))}var T=class{constructor(t,{editor:e,props:n={},as:r="div",className:o=""}){this.ref=null,this.destroyed=!1,this.id=Math.floor(0xffffffff*Math.random()).toString(),this.component=t,this.editor=e,this.props=n,this.element=document.createElement(r),this.element.classList.add("react-renderer"),o&&this.element.classList.add(...o.split(" ")),this.editor.isInitialized?(0,i.flushSync)(()=>{this.render()}):queueMicrotask(()=>{this.destroyed||this.render()})}render(){var t;if(this.destroyed)return;let e=this.component,n=this.props,i=this.editor,o=function(){try{if(r.version)return parseInt(r.version.split(".")[0],10)>=19}catch{}return!1}(),a=function(t){if(w(t)||C(t))return!0;if("object"==typeof t&&t.$$typeof&&("Symbol(react.memo)"===t.$$typeof.toString()||"react.memo"===t.$$typeof.description)){let e=t.type;if(e)return w(e)||C(e)}return!1}(e),l={...n};l.ref&&!(o||a)&&delete l.ref,!l.ref&&(o||a)&&(l.ref=t=>{this.ref=t}),this.reactElement=(0,s.jsx)(e,{...l}),null==(t=null==i?void 0:i.contentComponent)||t.setRenderer(this.id,this)}updateProps(t={}){this.destroyed||(this.props={...this.props,...t},this.render())}destroy(){var t;this.destroyed=!0;let e=this.editor;null==(t=null==e?void 0:e.contentComponent)||t.removeRenderer(this.id
1);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(t){Object.keys(t).forEach(e=>{this.element.setAttribute(e,t[e])})}};r.createContext({markViewContentRef:()=>{}}),a.Db;var A=class extends a.Yv{constructor(t,e,n){if(super(t,e,n),this.selectionRafId=null,!this.node.isLeaf){this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.dataset.nodeViewWrapper="",this.contentDOMElement.style.whiteSpace="inherit";let t=this.dom.querySelector("[data-node-view-content]");if(!t)return;t.appendChild(this.contentDOMElement)}}mount(){let t={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extension,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(t={})=>this.updateAttributes(t),deleteNode:()=>this.deleteNode(),ref:(0,r.createRef)()};if(!this.component.displayName){let t;this.component.displayName=(t=this.extension.name).charAt(0).toUpperCase()+t.substring(1)}let e={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:t=>{t&&this.contentDOMElement&&t.firstChild!==this.contentDOMElement&&(t.hasAttribute("data-node-view-wrapper")&&t.removeAttribute("data-node-view-wrapper"),t.appendChild(this.contentDOMElement))}},n=this.component,i=(0,r.memo)(t=>(0,s.jsx)(v.Provider,{value:e,children:(0,r.createElement)(n,t)}));i.displayName="ReactNodeView";let o=this.node.isInline?"span":"div";this.options.as&&(o=this.options.as);let{className:a=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new T(i,{editor:this.editor,props:t,as:o,className:`node-${this.node.type.name} ${a}`.trim()}),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.updateElementAttributes()}get dom(){var t;if(this.renderer.element.firstElementChild&&!(null==(t=this.renderer.element.firstElementChild)?void 0:t.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null),this.selectionRafId=requestAnimationFrame(()=>{this.selectionRafId=null;let{from:t,to:e}=this.editor.state.selection,n=this.getPos();if("number"==typeof n)if(t<=n&&e>=n+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}})}update(t,e,n){let r=t=>{this.renderer.updateProps(t),"function"==typeof this.options.attrs&&this.updateElementAttributes()};if(t.type!==this.node.type)return!1;if("function"==typeof this.options.update){let i=this.node,o=this.decorations,s=this.innerDecorations;return this.node=t,this.decorations=e,this.innerDecorations=n,this.options.update({oldNode:i,oldDecorations:o,newNode:t,newDecorations:e,oldInnerDecorations:s,innerDecorations:n,updateProps:()=>r({node:t,decorations:e,innerDecorations:n})})}return t===this.node&&this.decorations===e&&this.innerDecorations===n||(this.node=t,this.decorations=e,this.innerDecorations=n,r({node:t,decorations:e,innerDecorations:n}),!0)}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.contentDOMElement=null,this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null)}updateElementAttributes(){if(this.options.attrs){let t={};if("function"==typeof this.options.attrs){let e=this.editor.extensionManager.attributes,n=(0,a.zU)(this.node,e);t=this.options.attrs({node:this.node,HTMLAttributes:n}
1)}else t=this.options.attrs;this.renderer.updateAttributes(t)}}};function L(t,e){return n=>n.editor.contentComponent?new A(t,n,e):{}}},50758:(t,e,n)=>{n.d(e,{A:()=>ts});var r=n(76908),i=(t,e)=>{if("slot"===t)return 0;if(t instanceof Function)return t(e);let{children:n,...r}=null!=e?e:{};if("svg"===t)throw Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[t,r,n]},o=/^\s*>\s$/,s=r.bP.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:t}){return i("blockquote",{...(0,r.KV)(this.options.HTMLAttributes,t),children:i("slot",{})})},parseMarkdown:(t,e)=>e.createNode("blockquote",void 0,e.parseChildren(t.tokens||[])),renderMarkdown:(t,e)=>{if(!t.content)return"";let n=[];return t.content.forEach(t=>{let r=e.renderChildren([t]).split("\n").map(t=>""===t.trim()?">":`> ${t}`);n.push(r.join("\n"))}),n.join(`
2>
3`)},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}}
3,addInputRules(){return[(0,r.tG)({find:o,type:this.type})]}}),a=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,l=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,d=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,h=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,p=r.CU.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>"normal"!==t.style.fontWeight&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return i("strong",{...(0,r.KV)(this.options.HTMLAttributes,t),children:i("slot",{})})},markdownTokenName:"strong",parseMarkdown:(t,e)=>e.applyMark("bold",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`**${e.renderChildren(t)}**`,addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}}
3,addInputRules(){return[(0,r.OX)({find:a,type:this.type}),(0,r.OX)({find:d,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:l,type:this.type}),(0,r.Zc)({find:h,type:this.type})]}}),u=/(^|[^`])`([^`]+)`(?!`)$/,c=/(^|[^`])`([^`]+)`(?!`)/g,m=r.CU.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:t}){return["code",(0,r.KV)(this.options.HTMLAttributes,t),0]},markdownTokenName:"codespan",parseMarkdown:(t,e)=>e.applyMark("code",[{type:"text",text:t.text||""}]),renderMarkdown:(t,e)=>t.content?`\`${e.renderChildren(t.content)}\``:"",addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[(0,r.OX)({find:u,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:c,type:this.type})]}}),f=n(51876),g=/^```([a-z]+)?[\s\n]$/,y=/^~~~([a-z]+)?[\s\n]$/,b=r.bP.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:4,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;let{languageClassPrefix:n}=this.options;if(!n)return null;let r=[...(null==(e=t.firstElementChild)?void 0:e.classList)||[]].filter(t=>t.startsWith(n)).map(t=>t.replace(n,""))[0];return r||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:t,HTMLAttributes:e}){return["pre",(0,r.KV)(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(t,e)=>{var n;return(null==(n=t.raw)?void 0:n.startsWith("```"))===!1&&"indented"!==t.codeBlockStyle?[]:e.createNode("codeBlock",{language:t.lang||null},t.text?[e.createTextNode(t.text)]:[])},renderMarkdown:(t,e)=>{var n;let r=(null==(n=t.attrs)?void 0:n.language)||"";return t.content?[`\`\`\`${r}`,e.renderChildren(t.content),"```"].join("\n"):`\`\`\`${r}
4
5\`\`\``},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:t,$anchor:e}=this.editor.state.selection,n=1===e.pos;return!!t&&e.parent.type.name===this.name&&(!!n||!e.parent.textContent.length)&&this.editor.commands.clearNodes()},Tab:({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;let n=null!=(e=this.options.tabSize)?e:4,{state:r}=t,{selection:i}=r,{$from:o,empty:s}=i;if(o.parent.type!==this.type)return!1;let a=" ".repeat(n);return s?t.commands.insertContent(a):t.commands.command(({tr:t})=>{let{from:e,to:n}=i,o=r.doc.textBetween(e,n,"\n","\n").split("\n").map(t=>a+t).join("\n");return t.replaceWith(e,n,r.schema.text(o)),!0})},"Shift-Tab":({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;let n=null!=(e=this.options.tabSize)?e:4,{state:r}=t,{selection:i}=r,{$from:o,empty:s}=i;return o.parent.type===this.type&&(s?t.commands.command(({tr:t})=>{var e;let{pos:i}=o,s=o.start(),a=o.end(),l=r.doc.textBetween(s,a,"\n","\n").split("\n"),d=0,h=0,p=i-s;for(let t=0;t<l.length;t+=1){if(h+l[t].length>=p){d=t;break}h+=l[t].length+1}let u=Math.min(((null==(e=l[d].match(/^ */))?void 0:e[0])||"").length,n);if(0===u)return!0;let c=s;for(let t=0;t<d;t+=1)c+=l[t].length+1;return t.delete(c,c+u),i-c<=u&&t.setSelection(f.U3.create(t.doc,c)),!0}):t.commands.command(({tr:t})=>{let{from:e,to:o}=i,s=r.doc.textBetween(e,o,"\n","\n").split("\n").map(t=>{var e;let r=Math.min(((null==(e=t.match(/^ */))?void 0:e[0])||"").length,n);return t.slice(r)}).join("\n");return t.replaceWith(e,o,r.schema.text(s)),!0}))},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:e}=t,{selection:n}=e,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;let o=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith("\n\n");return!!o&&!!s&&t.chain().command(({tr:t})=>(t.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;let{state:e}=t,{selection:n,doc:r}=e,{$from:i,empty:o}=n;if(!o||i.parent.type!==this.type||i.parentOffset!==i.parent.nodeSize-2)return!1;let s=i.after();return void 0!==s&&(r.nodeAt(s)?t.commands.command(({tr:t})=>
5(t.setSelection(f.LN.near(r.resolve(s))),!0)):t.commands.exitCode())}}},addInputRules(){return[(0,r.JJ)({find:g,type:this.type,getAttributes:t=>({language:t[1]})}),(0,r.JJ)({find:y,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new f.k_({key:new f.hs("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;let n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,o=null==i?void 0:i.mode;if(!n||!o)return!1;let{tr:s,schema:a}=t.state,l=a.text(n.replace(/\r\n?/g,"\n"));return s.replaceSelectionWith(this.type.create({language:o},l)),s.selection.$from.parent.type!==this.type&&s.setSelection(f.U3.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),t.dispatch(s),!0}}})]}}),k=r.bP.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,"\n\n"):""}),v=r.bP.create({name:"hardBreak",markdownTokenName:"br",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:t}){return["br",(0,r.KV)(this.options.HTMLAttributes,t)]},renderText:()=>"\n",renderMarkdown:()=>`  
6`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{let{selection:t,storedMarks:i}=n;if(t.$from.parent.type.spec.isolating)return!1;let{keepMarks:o}=this.options,{splittableMarks:s}=r.extensionManager,a=i||t.$to.parentOffset&&t.$from.marks();return e().insertContent({type:this.name}).command(({tr:t,dispatch:e})=>{if(e&&a&&o){let e=a.filter(t=>s.includes(t.type.name));t.ensureMarks(e)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),M=r.bP.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){let n=this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0];return[`h${n}`,(0,r.KV)(this.options.HTMLAttributes,e),0]},parseMarkdown:(t,e)=>e.createNode("heading",{level:t.depth||1},e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>{var n;let r=(null==(n=t.attrs)?void 0:n.level)?parseInt(t.attrs.level,10):1,i="#".repeat(r);return t.content?`${i} ${e.renderChildren(t.content)}`:""},addCommands(){return{setHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.setNode(this.name,t),toggleHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,...{[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}}),{})},addInputRules(){return this.options.levels.map(t=>(0,r.JJ)({find:RegExp(`^(#{${Math.min(...this.options.levels)},${t}}
6)\\s$`),type:this.type,getAttributes:{level:t}}))}}),w=r.bP.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{},nextNodeType:"paragraph"}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:t}){return["hr",(0,r.KV)(this.options.HTMLAttributes,t)]},markdownTokenName:"hr",parseMarkdown:(t,e)=>e.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!(0,r.AB)(e,e.schema.nodes[this.name]))return!1;let{selection:n}=e,{$to:i}=n,o=t();return(0,r.BQ)(n)?o.insertContentAt(i.pos,{type:this.name}):o.insertContent({type:this.name}),o.command(({state:t,tr:e,dispatch:n})=>{if(n){let{$to:n}=e.selection,r=n.end();if(n.nodeAfter)n.nodeAfter.isTextblock?e.setSelection(f.U3.create(e.doc,n.pos+1)):n.nodeAfter.isBlock?e.setSelection(f.nh.create(e.doc,n.pos)):e.setSelection(f.U3.create(e.doc,n.pos));else{let i=t.schema.nodes[this.options.nextNodeType]||n.parent.type.contentMatch.defaultType,o=null==i?void 0:i.create();o&&(e.insert(r,o),e.setSelection(f.U3.create(e.doc,r+1)))}e.scrollIntoView()}return!0}).run()}}},addInputRules(){return[(0,r.Ce)({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.t
6ype})]}}),C=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,T=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,A=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,L=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,x=r.CU.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>"normal"!==t.style.fontStyle&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",(0,r.KV)(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(t,e)=>e.applyMark("italic",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`*${e.renderChildren(t)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[(0,r.OX)({find:C,type:this.t
6ype}),(0,r.OX)({find:A,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:T,type:this.type}),(0,r.Zc)({find:L,type:this.type})]}}),S=n(37149),E=Object.defineProperty,H="textStyle",I=/^\s*([-+*])\s$/,N=r.bP.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:t}){return["ul",(0,r.KV)(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>"list"!==t.type||t.ordered?[]:{type:"bulletList",content:t.items?e.parseChildren(t.items):[]},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,"\n"):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes("listItem",this.editor.getAttributes(H)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}}
6,addInputRules(){let t=(0,r.tG)({find:I,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=(0,r.tG)({find:I,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(H),editor:this.editor})),[t]}}),O=r.bP.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:t}){return["li",(0,r.KV)(this.options.HTMLAttributes,t),0]},markdownTokenName:"list_item",parseMarkdown:(t,e)=>{if("list_item"!==t.type)return[];let n=[];if(t.tokens&&t.tokens.length>0)if(t.tokens.some(t=>"paragraph"===t.type))n=e.parseChildren(t.tokens);else{let r=t.tokens[0];if(r&&"text"===r.type&&r.tokens&&r.tokens.length>0){if(n=[{type:"paragraph",content:e.parseInline(r.tokens)}],t.tokens.length>1){let r=t.tokens.slice(1),i=e.parseChildren(r);n.push(...i)}}else n=e.parseChildren(t.tokens)}return 0===n.length&&(n=[{type:"paragraph",content:[]}]),{type:"listItem",content:n}},renderMarkdown:(t,e,n)=>(0,r.kj)(t,e,t=>"bulletList"===t.parentType?"- ":"orderedList"===t.parentType?`${t.index+1}. `:"- ",n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}});((t,e)=>{for(var n in e)E(t,n,{get:e[n],enumerable:!0})})({},{findListItemPos:()=>R,getNextListDepth:()=>P,handleBackspace:()=>B,handleDelete:()=>V,hasListBefore:()=>$,hasListItemAfter:()=>K,hasListItemBefore:()=>D,listItemHasSubList:()=>z,nextListIsDeeper:()=>_,nextListIsHigher:()=>j});var R=(t,e)=>{let{$from:n}=e.selection,i=(0,r.Pg)(t,e.schema),o=n.depth,s=n.pos,a=null;for(;o>0&&null===a;)n.node(o).type===i?a=o:(o-=1,s-=1);return null===a?null:{$pos:e.doc.resolve(s),depth:a}},P=(t,e)=>{let n=R(t,e);if(!n)return!1;let[,i]=(0,r.fl)(e,t,n.$pos.pos+4);return i},$=(t,e,n)=>{let{$anchor:r}=t.selection,i=Math.max(0,r.pos-2),o=t.doc.resolve(i).node();return!!o&&!!n.includes(o.type.name)},D=(t,e)=>{var n;let{$anchor:r}=e.selection,i=e.doc.resolve(r.pos-2);return 0!==i.index()&&(null==(n=i.nodeBefore)?void 0:n.type.name)===t},z=(t,e,n)=>{if(!n)return!1;let i=(0,r.Pg)(t,e.schema),o=!1;return n.descendants(t=>{t.type===i&&(o=!0)}),o},B=(t,e,n)=>{if(t.commands.undoInputRule())return!0;if(t.state.selection.from!==t.state.selection.to)return!1;if(!(0,r.rU)(t.state,e)&&$(t.state,e,n)){let{$anchor:n}=t.state.selection,r=t.state.doc.resolve(n.before()-1),i=[];r.node().descendants((t,n)=>{t.type.name===e&&i.push({node:t,pos:n})});let o=i.at(-1);if(!o)return!1;let s=t.state.doc.resolve(r.start()+o.pos+1);return t.chain().cut({from:n.start()-1,to:n.end()+1},s.end()).joinForward().run()}if(!(0,r.rU)(t.state,e)||!(0,r.J_)(t.state))return!1;let i=R(e,t.state);if(!i)return!1;let o=t.state.doc.resolve(i.$pos.pos-2).node(i.depth),s=z(e,t.state,o);return D(e,t.state)&&!s?t.commands.joinItemBackward():t.chain().liftListItem(e).run()},_=(t,e)=>{let n=P(t,e),r=R(t,e);return!!r&&!!n&&n>r.depth},j=(t,e)=>{let n=P(t,e),r=R(t,e);return!!r&&!!n&&n<r.depth},V=(t,e)=>{if(!(0,r.rU)(t.state,e)||!(0,r.QN)(t.state,e))return!1;let{selection:n}=t.state,{$from:i,$to:o}=n;return!(!n.empty&&i.sameParent(o))&&(_(e,t.state)?t.chain().focus(t.state.selection.from+4).lift(e).joinBackward().run():j(e,t.state)?t.chain().joinForward().joinBackward().run():t.commands.joinItemForward())},K=(t,e)=>{var n;let{$anchor:r}=e.selection,i=e.doc.resolve(r.pos-r.parentOffset-2);return i.index()!==i.parent.childCount-1&&(null==(n=i.nodeAfter)?void 0:n.type.name)===t},U=r.YY.create({name:"listKeymap",addOptions:()=>({listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}),addKeyboardShortcuts(){return{Delete:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{void 0!==t.state.schema.nodes[n]&&V(t,n)&&(e=!0)}),e},"Mod-Delete":({editor:t})=>{let e=!1;
6return this.options.listTypes.forEach(({itemName:n})=>{void 0!==t.state.schema.nodes[n]&&V(t,n)&&(e=!0)}),e},Backspace:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{void 0!==t.state.schema.nodes[n]&&B(t,n,r)&&(e=!0)}),e},"Mod-Backspace":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{void 0!==t.state.schema.nodes[n]&&B(t,n,r)&&(e=!0)}),e}}}}),Y=/^(\s*)(\d+)\.\s+(.*)$/,F=/^\s/,W="textStyle",G=/^(\d+)\.\s$/,q=r.bP.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>t.getAttribute("type")}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:t}){let{start:e,...n}=t;return 1===e?["ol",(0,r.KV)(this.options.HTMLAttributes,n),0]:["ol",(0,r.KV)(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>{if("list"!==t.type||!t.ordered)return[];let n=t.start||1,r=t.items?function(t,e){return t.map(t=>{if("list_item"!==t.type)return e.parseChildren([t])[0];let n=[];return t.tokens&&t.tokens.length>0&&t.tokens.forEach(t=>{if("paragraph"===t.type||"list"===t.type||"blockquote"===t.type||"code"===t.type)n.push(...e.parseChildren([t]));else if("text"===t.type&&t.tokens){let r=e.parseChildren([t]);n.push({type:"paragraph",content:r})}else{let r=e.parseChildren([t]);r.length>0&&n.push(...r)}}),{type:"listItem",content:n}})}(t.items,e):[];return 1!==n?{type:"orderedList",attrs:{start:n},content:r}:{type:"orderedList",content:r}},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,"\n"):"",markdownTokenizer:{name:"orderedList",level:"block",start:t=>{let e=t.match(/^(\s*)(\d+)\.\s+/),n=null==e?void 0:e.index;return void 0!==n?n:-1},tokenize:(t,e,n)=>{var r;let i=t.split("\n"),[o,s]=function(t){let e=[],n=0,r=0;for(;n<t.length;){let i=t[n],o=i.match(Y);if(!o)break;let[,s,a,l]=o,d=s.length,h=l,p=n+1,u=[i];for(;p<t.length;){let e=t[p];if(e.match(Y))break;if(""===e.trim())u.push(e),h+="\n",p+=1;else if(e.match(F))u.push(e),h+=`
7${e.slice(d+2)}`,p+=1;else break}e.push({indent:d,number:parseInt(a,10),content:h.trim(),raw:u.join("\n")}),r=p,n=p}return[e,r]}(i);if(0===o.length)return;let a=function t(e,n,r){var i;let o=[],s=0;for(;s<e.length;){let a=e[s];if(a.indent===n){let l=a.content.split("\n"),d=(null==(i=l[0])?void 0:i.trim())||"",h=[];d&&h.push({type:"paragraph",raw:d,tokens:r.inlineTokens(d)});let p=l.slice(1).join("\n").trim();if(p){let t=r.blockTokens(p);h.push(...t)}let u=s+1,c=[];for(;u<e.length&&e[u].indent>n;)c.push(e[u]),u+=1;if(c.length>0){let e=Math.min(...c.map(t=>t.indent)),n=t(c,e,r);h.push({type:"list",ordered:!0,start:c[0].number,items:n,raw:c.map(t=>t.raw).join("\n")})}o.push({type:"list_item",raw:a.raw,tokens:h}),s=u}else s+=1}return o}(o,0,n);if(0!==a.length)return{type:"list",ordered:!0,start:(null==(r=o[0])?void 0:r.number)||1,items:a,raw:i.slice(0,s).join("\n")}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes("listItem",this.editor.getAttributes(W)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=(0,r.tG)({find:G,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,e)=>e.childCount+e.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=(0,r.tG)({find:G,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(W)}),joinPredicate:(t,e)=>e.childCount+e.attrs.start===+t[1],editor:this.editor})),[t]}}),Z=/^\s*(\[([( |x])?\])\s$/,J=r.bP.create({name:"taskItem",addOptions:()=>({nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}),content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes:()=>({checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{let e=t.getAttribute("data-checked");return""===e||"true"===e},renderHTML:t=>({"data-checked":t.checked})}}),parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",(0,r.KV)(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(t,e)=>{let n=[];if(t.tokens&&t.tokens.length>0?n.push(e.createNode("paragraph",{},e.parseInline(t.tokens))):t.text?n.push(e.createNode("paragraph",{},[e.createNode("text",{text:t.text})])):n.push(e.createNode("paragraph",{},[])),t.nestedTokens&&t.nestedTokens.length>0){let r=e.parseChildren(t.nestedTokens);n.push(...r)}return e.createNode("taskItem",{checked:t.checked||!1},n)},renderMarkdown:(t,e)=>{var n;let i=(null==(n=t.attrs)?void 0:n.checked)?"x":" ",o=`- [${i}] `;return(0,r.kj)(t,e,o)},addKeyboardShortcuts(){let t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:i})=>{let o=document.createElement("li"),s=document.createElement("label"),a=document.createElement("span"),l=document.createElement("input"),d=document.createElement("div"),h=t=>{var e,n;l.ariaLabel=(null==(n=null==(e=this.options.a11y)?void 0:e.checkboxLabel)?void 0:n.call(e,t,l.checked))||`Task item checkbox for ${t.textContent||"empty task item"}`};h(t),s.contentEditable="false",l.type="checkbox",l.addEventListener("mousedown",t=>t.preventDefault()),l.addEventListener("change",e=>
7{if(!i.isEditable&&!this.options.onReadOnlyChecked){l.checked=!l.checked;return}let{checked:r}=e.target;i.isEditable&&"function"==typeof n&&i.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:t})=>{let e=n();if("number"!=typeof e)return!1;let i=t.doc.nodeAt(e);return t.setNodeMarkup(e,void 0,{...null==i?void 0:i.attrs,checked:r}),!0}).run(),i.isEditable||!this.options.onReadOnlyChecked||this.options.onReadOnlyChecked(t,r)||(l.checked=!l.checked)}),Object.entries(this.options.HTMLAttributes).forEach(([t,e])=>{o.setAttribute(t,e)}),o.dataset.checked=t.attrs.checked,l.checked=t.attrs.checked,s.append(l,a),o.append(s,d),Object.entries(e).forEach(([t,e])=>{o.setAttribute(t,e)});let p=new Set(Object.keys(e));return{dom:o,contentDOM:d,update:t=>{if(t.type!==this.type)return!1;o.dataset.checked=t.attrs.checked,l.checked=t.attrs.checked,h(t);let e=i.extensionManager.attributes,n=(0,r.zU)(t,e),s=new Set(Object.keys(n)),a=this.options.HTMLAttributes;return p.forEach(t=>{s.has(t)||(t in a?o.setAttribute(t,a[t]):o.removeAttribute(t))}),Object.entries(n).forEach(([t,e])=>{null==e?t in a?o.setAttribute(t,a[t]):o.removeAttribute(t):o.setAttribute(t,e)}),p=s,!0}}}}
7,addInputRules(){return[(0,r.tG)({find:Z,type:this.type,getAttributes:t=>({checked:"x"===t[t.length-1]})})]}}),X=r.bP.create({name:"taskList",addOptions:()=>({itemTypeName:"taskItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",(0,r.KV)(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},parseMarkdown:(t,e)=>e.createNode("taskList",{},e.parseChildren(t.items||[])),renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,"\n"):"",markdownTokenizer:{name:"taskList",level:"block",start(t){var e;let n=null==(e=t.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))?void 0:e.index;return void 0!==n?n:-1},tokenize(t,e,n){let i=t=>{let e=(0,r.Dd)(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:t=>({indentLevel:t[1].length,mainContent:t[4],checked:"x"===t[3].toLowerCase()}),createToken:(t,e)=>({type:"taskItem",raw:"",mainContent:t.mainContent,indentLevel:t.indentLevel,checked:t.checked,text:t.mainContent,tokens:n.inlineTokens(t.mainContent),nestedTokens:e}),customNestedParser:i},n);return e?[{type:"taskList",raw:e.raw,items:e.items}]:n.blockTokens(t)},o=(0,r.Dd)(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:t=>({indentLevel:t[1].length,mainContent:t[4],checked:"x"===t[3].toLowerCase()}),createToken:(t,e)=>({type:"taskItem",raw:"",mainContent:t.mainContent,indentLevel:t.indentLevel,checked:t.checked,text:t.mainContent,tokens:n.inlineTokens(t.mainContent),nestedTokens:e}),customNestedParser:i},n);if(o)return{type:"taskList",raw:o.raw,items:o.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});r.YY.create({name:"listKit",addExtensions(){let t=[];return!1!==this.options.bulletList&&t.push(N.configure(this.options.bulletList)),!1!==this.options.listItem&&t.push(O.configure(this.options.listItem)),!1!==this.options.listKeymap&&t.push(U.configure(this.options.listKeymap)),!1!==this.options.orderedList&&t.push(q.configure(this.options.orderedList)),!1!==this.options.taskItem&&t.push(J.configure(this.options.taskItem)),!1!==this.options.taskList&&t.push(X.configure(this.options.taskList)),t}});var Q=r.bP.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:t}){return["p",(0,r.KV)(this.options.HTMLAttributes,t),0]},parseMarkdown:(t,e)=>{let n=t.tokens||[];return 1===n.length&&"image"===n[0].type?e.parseChildren([n[0]]):e.createNode("paragraph",void 0,e.parseInline(n))},renderMarkdown:(t,e)=>t&&Array.isArray(t.content)?e.renderChildren(t.content):"",addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),tt=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,te=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,tn=r.CU.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>!!t.includes("line-through")&&{}}],renderHTML({HTMLAttributes:t}){return["s",(0,r.KV)(this.options.HTMLAttributes,t),0]},markdownTokenName:"del",parseMarkdown:(t,e)=>e.applyMark("strike",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`~~${e.renderChildren(t)}~~`,addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[(0,r.OX)({find:tt,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:te,type:this.type})]}}),tr=r.bP.create({name:"text",group:"inline",parseMarkdown:t=>({type:"text",text:t.text||""}),renderMarkdown:t=>t.text||""}),ti=r.CU.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>!!t.includes("underline")&&{}}],renderHTML({HTMLAttributes:t}){return["u",(0,r.KV)(this.options.HTMLAttributes,t),0]},parseMarkdown(t,e){return e.applyMark(this.name||"underline",e.parseInline(t.tokens||[]))},renderMarkdown:(t,e)=>`++${e.renderChildren(t)}++`,markdownTokenizer:{name:"underline",level:"inline",start:t=>t.indexOf("++"),tokenize(t,e,n){let r=/^(\+\+)([\s\S]+?)(\+\+)/.exec(t);if(!r)return;let i=r[2].trim();return{type:"underline",raw:r[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),to=n(37915),ts=r.YY.create({name:"starterKit",addExtensions(){var t,e,n,r;let i=[];return!1!==this.options.bold&&i.push(p.configure(this.options.bold)),!1!==this.options.blockquote&&i.push(s.configure(this.options.blockquote)),!1!==this.options.bulletList&&i.push(N.configure(this.options.bulletList)),!1!==this.options.code&&i.push(m.configure(this.options.code)),!1!==this.options.codeBlock&&i.push(b.configure(this.options.codeBlock)),!1!==this.options.document&&i.push(k.configure(this.options.document)),!1!==this.options.dropcursor&&i.push(to.QO.configure(this.options.dropcursor)),!1!==this.options.gapcursor&&i.push(to.vR.configure(this.options.gapcursor)),!1!==this.options.hardBreak&&i.push(v.configure(this.options.hardBreak)),!1!==this.options.heading&&i.push(M.configure(this.options.heading)),!1!==this.options.undoRedo&&i.push(to.lb.configure(this.options.undoRedo)),!1!==this.options.horizontalRule&&i.push(w.configure(this.options.horizontalRule)),!1!==this.options.italic&&i.push(x.configure(this.options.italic)),!1!==this.options.listItem&&i.push(O.configure(this.options.listItem)),!1!==this.options.listKeymap&&i.push(U.configure(null==(t=this.options)?void 0:t.listKeymap)),!1!==this.options.link&&i.push(S.N_.configure(null==(e=this.options)?void 0:e.link)),!1!==this.options.orderedList&&i.push(q.configure(this.options.orderedList)),!1!==this.options.paragraph&&i.push(Q.configure(this.options.paragraph)),!1!==this.options.strike&&i.push(tn.configure(this.options.strike)),!1!==this.options.text&&i.push(tr.configure(this.options.text)),!1!==this.options.underline&&i.push(ti.configure(null==(n=this.options)?void 0:n.underline)),!1!==this.options.trailingNode&&i.push(to.JU.configure(null==(r=this.options)?void 0:r.trailingNode)),i}})},63660:(t,e,n)=>{n.d(e,{Ay:()=>o});var r=n(76908),i=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,o=r.bP.create({name:"image",addOptions:()=>({inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes:()=>({src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}),parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:t}){return["img",(0,r.KV)(this.options.HTMLAttributes,t)]},parseMarkdown:(t,e)=>e.createNode("image",{src:t.href,title:t.title,alt:t.text}),renderMarkdown:t=>{var e,n,r,i,o,s;let a=null!=(n=null==(e=t.attrs)?void 0:e.src)?n:"",l=null!=(i=null==(r=t.attrs)?void 0:r.alt)?i:"",d=null!=(s=null==(o=t.attrs)?void 0:o.title)?s:"";return d?`![${l}](${a} "${d}")`:`![${l}](${a})`}
7,addNodeView(){if(!this.options.resize||!this.options.resize.enabled||"undefined"==typeof document)return null;let{directions:t,minWidth:e,minHeight:n,alwaysPreserveAspectRatio:i}=this.options.resize;return({node:o,getPos:s,HTMLAttributes:a,editor:l})=>{let d=document.createElement("img");Object.entries(a).forEach(([t,e])=>{if(null!=e)switch(t){case"width":case"height":break;default:d.setAttribute(t,e)}}),d.src=a.src;let h=new r.Nz({element:d,editor:l,node:o,getPos:s,onResize:(t,e)=>{d.style.width=`${t}px`,d.style.height=`${e}px`},onCommit:(t,e)=>{let n=s();void 0!==n&&this.editor.chain().setNodeSelection(n).updateAttributes(this.name,{width:t,height:e}).run()},onUpdate:(t,e,n)=>t.type===o.type,options:{directions:t,min:{width:e,height:n},preserveAspectRatio:!0===i}}),p=h.dom;return p.style.visibility="hidden",p.style.pointerEvents="none",d.onload=()=>{p.style.visibility="",p.style.pointerEvents=""},h}},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[(0,r.Ce)({find:i,type:this.t
7ype,getAttributes:t=>{let[,,e,n,r]=t;return{src:n,alt:e,title:r}}})]}})},64864:(t,e,n)=>{n.d(e,{XI:()=>y,nA:()=>l,A0:()=>d,Hj:()=>h});var r=n(76908),i=n(51876),o=n(61946);function s(t){return"left"===t||"right"===t||"center"===t?t:null}function a(){return{default:null,parseHTML:t=>(function(t){let e=(t.style.textAlign||"").trim().toLowerCase(),n=(t.getAttribute("align")||"").trim().toLowerCase();return s(e||n)})(t),renderHTML:t=>t.align?{style:`text-align: ${t.align}`}:{}}}var l=r.bP.create({name:"tableCell",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{var e,n;let r=t.getAttribute("colwidth"),i=r?r.split(",").map(t=>parseInt(t,10)):null;if(!i){let r=null==(e=t.closest("table"))?void 0:e.querySelectorAll("colgroup > col"),i=Array.from((null==(n=t.parentElement)?void 0:n.children)||[]).indexOf(t);if(i&&i>-1&&r&&r[i]){let t=r[i].getAttribute("width");return t?[parseInt(t,10)]:null}}return i}},align:a()}),tableRole:"cell",isolating:!0,parseHTML:()=>[{tag:"td"}],renderHTML({HTMLAttributes:t}){return["td",(0,r.KV)(this.options.HTMLAttributes,t),0]}}),d=r.bP.create({name:"tableHeader",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{let e=t.getAttribute("colwidth");return e?e.split(",").map(t=>parseInt(t,10)):null}},align:a()}),tableRole:"header_cell",isolating:!0,parseHTML:()=>[{tag:"th"}],renderHTML({HTMLAttributes:t}){return["th",(0,r.KV)(this.options.HTMLAttributes,t),0]}}),h=r.bP.create({name:"tableRow",addOptions:()=>({HTMLAttributes:{}}),content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML:()=>[{tag:"tr"}],renderHTML({HTMLAttributes:t}){return["tr",(0,r.KV)(this.options.HTMLAttributes,t),0]}});function p(t,e){return e?["width",`${Math.max(e,t)}px`]:["min-width",`${t}px`]}function u(t,e,n,r,i,o){var s;let a=0,l=!0,d=e.firstChild,h=t.firstChild;if(null!==h)for(let t=0,n=0;t<h.childCount;t+=1){let{colspan:s,colwidth:u}=h.child(t).attrs;for(let t=0;t<s;t+=1,n+=1){let s=i===n?o:u&&u[t],h=s?`${s}px`:"";if(a+=s||r,s||(l=!1),d){if(d.style.width!==h){let[t,e]=p(r,s);d.style.setProperty(t,e)}d=d.nextSibling}else{let t=document.createElement("col"),[n,i]=p(r,s);t.style.setProperty(n,i),e.appendChild(t)}}}for(;d;){let t=d.nextSibling;null==(s=d.parentNode)||s.removeChild(d),d=t}let u=t.attrs.style&&"string"==typeof t.attrs.style&&/\bwidth\s*:/i.test(t.attrs.style);l&&!u?(n.style.width=`${a}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${a}px`)}var c=class{constructor(t,e){this.node=t,this.cellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),t.attrs.style&&(this.table.style.cssText=t.attrs.style),this.colgroup=this.table.appendChild(document.createElement("colgroup")),u(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type===this.node.type&&(this.node=t,u(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){let e=t.target,n=this.dom.contains(e),r=this.contentDOM.contains(e);return!!n&&!r&&("attributes"===t.type||"childList"===t.type||"characterData"===t.type)}};function m(t,e){return e?t.createChecked(null,e):t.createAndFill()}var f=({editor:t})=>{let{selection:e}=t.state;if(!(e instanceof o.rn))return!1;let n=0,i=(0,r.eL)(e.ranges[0].$from,t=>"table"===t.type.name);return null==i||i.node.descendants(t=>{if("table"===t.type.name)return!1;["tableCell","tableHeader"].includes(t.type.name)&&(n+=1)}),n===e.ranges.length&&(t.commands.deleteTable(),!0)},g=function(t,e,n={}){var r;let i=null!=(r=n.cellLineSeparator)?r:"\x1f";if(!t||!t.content||0===t.content.length)return"";let o=[];t.content.forEach(t=>{let n=[];t.content&&t.content.forEach(t=>{var r;let o=((t.content&&Array.isArray(t.content)&&t.content.length>1?t.content.map(t=>e.renderChildren(t)).join(i):t.content?e.renderChildren(t.content):"")||"").replace(/\s+/g," ").trim(),a="tableHeader"===t.type,l=s(null==(r=t.attrs)?void 0:r.align);n.push({text:o,isHeader:a,align:l})}),o.push(n)});let a=o.reduce((t,e)=>Math.max(t,e.length),0);if(0===a)return"";let l=Array(a).fill(0);o.forEach(t=>{var e;
7for(let n=0;n<a;n+=1){let r=((null==(e=t[n])?void 0:e.text)||"").length;r>l[n]&&(l[n]=r),l[n]<3&&(l[n]=3)}});let d=(t,e)=>t+" ".repeat(Math.max(0,e-t.length)),h=o[0],p=h.some(t=>t.isHeader),u=Array(a).fill(null);o.forEach(t=>{var e;for(let n=0;n<a;n+=1)!u[n]&&(null==(e=t[n])?void 0:e.align)&&(u[n]=t[n].align)});let c="\n",m=Array(a).fill(0).map((t,e)=>p&&h[e]&&h[e].text||"");return c+=`| ${m.map((t,e)=>d(t,l[e])).join(" | ")} |
8| ${l.map((t,e)=>{let n=Math.max(3,t),r=u[e];return"left"===r?`:${"-".repeat(n)}`:"right"===r?`${"-".repeat(n)}:`:"center"===r?`:${"-".repeat(n)}:`:"-".repeat(n)}).join(" | ")} |
9`,(p?o.slice(1):o).forEach(t=>{c+=`| ${Array(a).fill(0).map((e,n)=>d(t[n]&&t[n].text||"",l[n])).join(" | ")} |
10`}),c},y=r.bP.create({name:"table",addOptions:()=>({HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:c,lastColumnResizable:!0,allowTableNodeSelection:!1}),content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML:()=>[{tag:"table"}],renderHTML({node:t,HTMLAttributes:e}){let{colgroup:n,tableWidth:i,tableMinWidth:o}=function(t,e,n,r){let i=0,o=!0,s=[],a=t.firstChild;if(!a)return{};for(let t=0,n=0;t<a.childCount;t+=1){let{colspan:r,colwidth:l}=a.child(t).attrs;for(let t=0;t<r;t+=1,n+=1){let r=void 0===n?void 0:l&&l[t];i+=r||e,r||(o=!1);let[a,d]=p(e,r);s.push(["col",{style:`${a}: ${d}`}])}}return{colgroup:["colgroup",{},...s],tableWidth:o?`${i}px`:"",tableMinWidth:o?"":`${i}px`}}(t,this.options.cellMinWidth),s=e.style,a=["table",(0,r.KV)(this.options.HTMLAttributes,e,{style:s||(i?`width: ${i}`:`min-width: ${o}`)}),n,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},a]:a},parseMarkdown:(t,e)=>{let n=[],r=Array.isArray(t.align)?t.align:[];if(t.header){let i=[];t.header.forEach((t,n)=>{var o;let a=s(null!=(o=r[n])?o:t.align);i.push(e.createNode("tableHeader",a?{align:a}:{},[{type:"paragraph",content:e.parseInline(t.tokens)}]))}),n.push(e.createNode("tableRow",{},i))}return t.rows&&t.rows.forEach(t=>{let i=[];t.forEach((t,n)=>{var o;let a=s(null!=(o=r[n])?o:t.align);i.push(e.createNode("tableCell",a?{align:a}:{},[{type:"paragraph",content:e.parseInline(t.tokens)}]))}),n.push(e.createNode("tableRow",{},i))}),e.createNode("table",void 0,n)},renderMarkdown:(t,e)=>g(t,e),addCommands:()=>({insertTable:({rows:t=3,cols:e=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:s})=>{let a=function(t,e,n,r,i){let o=function(t){if(t.cached.tableNodeTypes)return t.cached.tableNodeTypes;let e={};return Object.keys(t.nodes).forEach(n=>{let r=t.nodes[n];r.spec.tableRole&&(e[r.spec.tableRole]=r)}),t.cached.tableNodeTypes=e,e}(t),s=[],a=[];for(let t=0;t<n;t+=1){let t=m(o.cell,void 0);if(t&&a.push(t),r){let t=m(o.header_cell,void 0);t&&s.push(t)}}let l=[];for(let t=0;t<e;t+=1)l.push(o.row.createChecked(null,r&&0===t?s:a));return o.table.createChecked(null,l)}(s.schema,t,e,n);if(o){let t=r.selection.from+1;r.replaceSelectionWith(a).scrollIntoView().setSelection(i.U3.near(r.doc.resolve(t)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>(0,o.RC)(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>(0,o.GU)(t,e),deleteColumn:()=>({state:t,dispatch:e})=>(0,o.gR)(t,e),addRowBefore:()=>({state:t,dispatch:e})=>(0,o.JD)(t,e),addRowAfter:()=>({state:t,dispatch:e})=>(0,o.gC)(t,e),deleteRow:()=>({state:t,dispatch:e})=>(0,o.aR)(t,e),deleteTable:()=>({state:t,dispatch:e})=>(0,o.kG)(t,e),mergeCells:()=>({state:t,dispatch:e})=>(0,o.w7)(t,e),splitCell:()=>({state:t,dispatch:e})=>(0,o.L0)(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>(0,o.iS)("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>(0,o.iS)("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>(0,o._G)(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>!!(0,o.w7)(t,e)||(0,o.L0)(t,e),setCellAttribute:(t,e)=>({state:n,dispatch:r})=>(0,o.i4)(t,e)(n,r),goToNextCell:()=>({state:t,dispatch:e})=>(0,o.D8)(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>(0,o.D8)(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&(0,o.rP)(t),!0),setCellSelection:t=>({tr:e,dispatch:n})=>{if(n){let n=o.rn.create(e.doc,t.anchorCell,t.headCell);e.setSelection(n)}return!0}}),addKeyboardShortcuts(){return{Tab:()=>!!this.editor.commands.goToNextCell()||!!this.editor.can().addRowAfter()&&this.editor.chain().addRowAfter().goToNextCell().run(),"
10Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:f,"Mod-Backspace":f,Delete:f,"Mod-Delete":f}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[(0,o.AL)({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],(0,o.LF)({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){let e={name:t.name,options:t.options,storage:t.storage};return{tableRole:(0,r.gk)((0,r.iI)(t,"tableRole",e))}}});r.YY.create({name:"tableKit",addExtensions(){let t=[];return!1!==this.options.table&&t.push(y.configure(this.options.table)),!1!==this.options.tableCell&&t.push(l.configure(this.options.tableCell)),!1!==this.options.tableHeader&&t.push(d.configure(this.options.tableHeader)),!1!==this.options.tableRow&&t.push(h.configure(this.options.tableRow)),t}})},77004:(t,e,n)=>{n.d(e,{A:()=>r});var r=n(37915).Or},78336:(t,e,n)=>{n.d(e,{H:()=>r.Hj});var r=n(64864)},79371:(t,e,n)=>{n.d(e,{A:()=>r.A0});var r=n(64864)},84066:(t,e,n)=>{n.d(e,{A:()=>s});var r=function(){};r.prototype.append=function(t){return t.length?(t=r.from(t),!this.length&&t||t.length<200&&this.leafAppend(t)||this.length<200&&t.leafPrepend(this)||this.appendInner(t)):this},r.prototype.prepend=function(t){return t.length?r.from(t).append(this):this},r.prototype.appendInner=function(t){return new o(this,t)},r.prototype.slice=function(t,e){return(void 0===t&&(t=0),void 0===e&&(e=this.length),t>=e)?r.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},r.prototype.get=function(t){if(!(t<0)&&!(t>=this.length))return this.getInner(t)},r.prototype.forEach=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length),e<=n?this.forEachInner(t,e,n,0):this.forEachInvertedInner(t,e,n,0)},r.prototype.map=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length);var r=[];return this.forEach(function(e,n){return r.push(t(e,n))},e,n),r},r.from=function(t){return t instanceof r?t:t&&t.length?new i(t):r.empty};var i=function(t){function e(e){t.call(this),this.values=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(t,n){return 0==t&&n==this.length?this:new e(this.values.slice(t,n))},e.prototype.getInner=function(t){return this.values[t]},e.prototype.forEachInner=function(t,e,n,r){for(var i=e;i<n;i++)if(!1===t(this.values[i],r+i))return!1},e.prototype.forEachInvertedInner=function(t,e,n,r){for(var i=e-1;i>=n;i--)if(!1===t(this.values[i],r+i))return!1},e.prototype.leafAppend=function(t){if(this.length+t.length<=200)return new e(this.values.concat(t.flatten()))},e.prototype.leafPrepend=function(t){if(this.length+t.length<=200)return new e(t.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(r);r.empty=new i([]);var o=function(t){function e(e,n){t.call(this),this.left=e,this.right=n,this.length=e.length+n.length,this.depth=Math.max(e.depth,n.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(t){return t<this.left.length?this.left.get(t):this.right.get(t-this.left.length)},e.prototype.forEachInner=function(t,e,n,r){var i=this.left.length;if(e<i&&!1===this.left.forEachInner(t,e,Math.min(n,i),r)||n>i&&!1===this.right.forEachInner(t,Math.max(e-i,0),Math.min(this.length,n)-i,r+i))return!1},e.prototype.forEachInvertedInner=function(t,e,n,r){var i=this.left.length;if(e>i&&!1===this.right.forEachInvertedInner(t,e-i,Math.max(n,i)-i,r+i)||n<i&&!1===this.left.forEachInvertedInner(t,Math.min(e,i),n,r))return!1},e.prototype.sliceInner=function(t,e){if(0==t&&e==this.length)return this;var n=this.left.length;return e<=n?this.left.slice(t,e):t>=n?this.right.slice(t-n,e-n):this.left.slice(t,n).append(this.right.slice(0,e-n))},e.prototype.leafAppend=function(t){var n=this.right.leafAppend(t);if(n)return new e(this.left,n)},e.prototype.leafPrepend=function(t){var n=this.left.leafPrepend(t);if(n)return new e(n,this.right)},e.prototype.appendInner=function(t){return this.left.depth>=Math.max(this.right.depth,t.depth)+1?new e(this.left,new e(this.right,t)):new e(this,t)},e}(r);let s=r}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.