PageSourceSearch

https://voispark.com/_next/static/chunks/editor-93ce8b3906a9679e.js

js voispark.com collected 2026-10-05 18:38:53 UTC 40,570 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6008],{2996:(e,t,n)=>{n.d(t,{A:()=>r});var i=n(52874),r=i.bP.create({name:"hardBreak",markdownTokenName:"br",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:e}){return["br",(0,i.KV)(this.options.HTMLAttributes,e)]},renderText:()=>"\n",renderMarkdown:()=>`  
2`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:i})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:e,storedMarks:r}=n;if(e.$from.parent.type.spec.isolating)return!1;let{keepMarks:o}=this.options,{splittableMarks:s}=i.extensionManager,a=r||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command(({tr:e,dispatch:t})=>{if(t&&a&&o){let t=a.filter(e=>s.includes(e.type.name));e.ensureMarks(t)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}})},28763:(e,t,n)=>{n.d(t,{Or:()=>d,lb:()=>c});var i=n(52874),r=n(83291),o=n(47978),s=n(49673),a=n(87979),l=n(27225);i.YY.create({name:"characterCount",addOptions:()=>({limit:null,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(e=>""!==e).length}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=e=>{let t=(null==e?void 0:e.node)||this.editor.state.doc;if("textSize"===((null==e?void 0:e.mode)||this.options.mode)){let e=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(e)}return t.nodeSize},this.storage.words=e=>{let t=(null==e?void 0:e.node)||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new r.k_({key:new r.hs("characterCount"),appendTransaction:(t,n,i)=>{if(e)return;let r=this.options.limit;if(null==r||0===r){e=!0;return}let o=this.storage.characters({node:i.doc});if(o>r){console.warn(`[CharacterCount] Initial content exceeded limit of ${r} characters. Content was automatically trimmed.`);let t=i.tr.deleteRange(0,o-r);return e=!0,t}e=!0},filterTransaction:(e,t)=>{let n=this.options.limit;if(!e.docChanged||0===n||null==n)return!0;let i=this.storage.characters({node:t.doc}),r=this.storage.characters({node:e.doc});if(r<=n||i>n&&r>n&&r<=i)return!0;if(i>n&&r>n&&r>i||!e.getMeta("paste"))return!1;let o=e.selection.$head.pos;return e.deleteRange(o-(r-n),o),!(this.storage.characters({node:e.doc})>n)}})]}}),i.YY.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[(0,o.A)(this.options)]}}),i.YY.create({name:"focus",addOptions:()=>({className:"has-focus",mode:"all"}),addProseMirrorPlugins(){return[new r.k_({key:new r.hs("focus"),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:i}=this.editor,{anchor:r}=t,o=[];if(!n||!i)return s.zF.create(e,[]);let a=0;"deepest"===this.options.mode&&e.descendants((e,t)=>{if(!e.isText){if(!(r>=t&&r<=t+e.nodeSize-1))return!1;a+=1}});let l=0;return e.descendants((e,t)=>!e.isText&&!!(r>=t&&r<=t+e.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(t,t+e.nodeSize,{class:this.options.className})))),s.zF.create(e,o)}}})]}}),i.YY.create({name:"gapCursor",addProseMirrorPlugins:()=>[(0,a.z)()],extendNodeSchema(e){var t;let n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:null!=(t=(0,i.gk)((0,i.iI)(e,"allowGapCursor",n)))?t:null}}});var d=i.YY.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){return[new r.k_({key:new r.hs("placeholder"),props:{decorations:({doc:e,selection:t})=>{let n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=t,o=[];if(!n)return null;let a=this.editor.isEmpty;return e.descendants((e,t)=>{let n=r>=t&&r<=t+e.nodeSize,l=!e.isLeaf&&(0,i.Op)(e);if((n||!this.options.showOnlyCurrent)&&l){let i=[this.options.emptyNodeClass];a&&i.push(this.options.emptyEditorClass);let r=s.NZ.node(t,t+e.nodeSize,{class:i.join(" "),"data-placeholder":"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:e,pos:t,hasAnchor:n}):this.options.placeholder});o.push(r)}return this.options.includeChildren}),s.zF.create(e,o)}}})]}});function h({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||(null==t?void 0:t.type)===e}i.YY.create({name:"selection",addOptions:()=>({className:"selection"}),addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new r.k_({key:new r.hs("selection"),props:{decorations:n=>n.selection.empty||e.isFocused||!e.isEditable||(0,i.BQ)(n.selection)||e.view.dragging?null:s.zF.create(n.doc,[s.NZ.inline(n.selection.from,n.selection.to,{class:t.className})])}})]}}),i.YY.create({name:"trailingNode",addOptions:()=>({node:void 0,notAfter:[]}),addProseMirrorPlugins(){var e;let t=new r.hs(this.name),n=this.options.node||(null==(e=this.editor.schema.topNodeType.contentMatch.defaultType)?void 0:e.name)||"paragraph",i=Object.entries(this.editor.schema.nodes).map(([,e])=>e).filter(e=>(this.options.notAfter||[]).concat(n).includes(e.name));return[new r.k_({key:t,appendTransaction:(e,i,r)=>{let{doc:o,tr:s,schema:a}=r,l=t.getState(r),d=o.content.size,h=a.nodes[n];if(l)return s.insert(d,h.create())},state:{init:(e,t)=>
2!h({node:t.tr.doc.lastChild,types:i}),apply:(e,t)=>!e.docChanged||e.getMeta("__uniqueIDTransaction")?t:!h({node:e.doc.lastChild,types:i})}})]}});var c=i.YY.create({name:"undoRedo",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>(0,l.tN)(e,t),redo:()=>({state:e,dispatch:t})=>(0,l.ZS)(e,t)}),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()}}})},37022:(e,t,n)=>{n.d(t,{A:()=>i});var i=n(28763).Or},54236:(e,t,n)=>{n.d(t,{A:()=>i});var i=n(52874).bP.create({name:"text",group:"inline",parseMarkdown:e=>({type:"text",text:e.text||""}),renderMarkdown:e=>e.text||""})},61015:(e,t,n)=>{n.d(t,{Ay:()=>ed});var i=n(52874),r=n(83291),o=n(64391);n(67583);var s=n(86508),a=n(93336),l=n(53307),d=n(75794),h=n(41767),c=n(12618),p=n(83725),u=n(34063),m=n(17896),f=n(74300),g=n(87817),y=n(2141),b=n(5429),w=n(35831);let v=new r.hs("y-sync"),S=new r.hs("y-undo");new r.hs("yjs-cursor");let C=e=>{for(let t=6;t<e.length;t++)e[t%6]=e[t%6]^e[t];return e.slice(0,6)},_=e=>w.nk(C(b.b(w.T0(e)))),M=(e,t)=>void 0===t?!e.deleted:t.sv.has(e.id.client)&&t.sv.get(e.id.client)>e.id.clock&&!o.X(t.ds,e.id),k=[{light:"#ecd44433",dark:"#ecd444"}],E=(e,t,n)=>{if(!e.has(n)){if(e.size<t.length){let n=h.vt();e.forEach(e=>n.add(e)),t=t.filter(e=>!n.has(e))}e.set(n,u.yL(t))}return e.get(n)},O=(e,{colors:t=k,colorMapping:n=new Map,permanentUserData:i=null,onFirstRender:o=()=>{},mapping:s}={})=>{let a=!1,l=new T(e,s),d=new r.k_({props:{editable:e=>{let t=v.getState(e);return null==t.snapshot&&null==t.prevSnapshot}},key:v,state:{init:(r,o)=>({type:e,doc:e.doc,binding:l,snapshot:null,prevSnapshot:null,isChangeOrigin:!1,isUndoRedoOperation:!1,addToHistory:!0,colors:t,colorMapping:n,permanentUserData:i}),apply:(e,t)=>{let n=e.getMeta(v);if(void 0!==n)for(let e in t=Object.assign({},t),n)t[e]=n[e];return t.addToHistory=!1!==e.getMeta("addToHistory"),t.isChangeOrigin=void 0!==n&&!!n.isChangeOrigin,t.isUndoRedoOperation=void 0!==n&&!!n.isChangeOrigin&&!!n.isUndoRedoOperation,null!==l.prosemirrorView&&void 0!==n&&(null!=n.snapshot||null!=n.prevSnapshot)&&g.wR(0,()=>{null!=l.prosemirrorView&&(null==n.restore?l._renderSnapshot(n.snapshot,n.prevSnapshot,t):(l._renderSnapshot(n.snapshot,n.snapshot,t),delete t.restore,delete t.snapshot,delete t.prevSnapshot,l.mux(()=>{l._prosemirrorChanged(l.prosemirrorView.state.doc)})))}),t}},view:e=>(l.initView(e),null==s&&l._forceRerender(),o(),{update:()=>{let t=d.getState(e.state);if(null==t.snapshot&&null==t.prevSnapshot&&(a||null!==e.state.doc.content.findDiffStart(e.state.doc.type.createAndFill().content))){if(a=!0,!1===t.addToHistory&&!t.isChangeOrigin){let t=S.getState(e.state),n=t&&t.undoManager;n&&n.stopCapturing()}l.mux(()=>{t.doc.transact(n=>{n.meta.set("addToHistory",t.addToHistory),l._prosemirrorChanged(e.state.doc)},v)})}},destroy:()=>{l.destroy()}})});return d},x=(e,t,n)=>{if(null!==t&&null!==t.anchor&&null!==t.head)if("all"===t.type)e.setSelection(new r.i5(e.doc));else if("node"===t.type){let i=et(n.doc,n.type,t.anchor,n.mapping);e.setSelection(D(e,i))}else{let i=et(n.doc,n.type,t.anchor,n.mapping),o=et(n.doc,n.type,t.head,n.mapping);null!==i&&null!==o&&e.setSelection(r.U3.between(e.doc.resolve(i),e.doc.resolve(o)))}},D=(e,t)=>{let n=e.doc.resolve(t);return n.nodeAfter?r.nh.create(e.doc,t):r.U3.near(n)},A=(e,t)=>({type:t.selection.jsonID,anchor:X(t.selection.anchor,e.type,e.mapping),head:X(t.selection.head,e.type,e.mapping)});class T{constructor(e,t=new Map){this.type=e,this.prosemirrorView=null,this.mux=(0,s.i)(),this.mapping=t,this.isOMark=new Map,this._observeFunction=this._typeChanged.bind(this),this.doc=e.doc,this.beforeTransactionSelection=null,this.beforeAllTransactions=()=>{null===this.beforeTransactionSelection&&null!=this.prosemirrorView&&(this.beforeTransactionSelection=A(this,this.prosemirrorView.state))},this.afterAllTransactions=()=>{this.beforeTransactionSelection=null},this._domSelectionInView=null}get _tr(){return this.prosemirrorView.state.tr.setMeta("addToHistory",!1)}_isLocalCursorInView(){return!!this.prosemirrorView.hasFocus()&&(m.Bd&&null===this._domSelectionInView&&
2(g.wR(0,()=>{this._domSelectionInView=null}),this._domSelectionInView=this._isDomSelectionInView()),this._domSelectionInView)}_isDomSelectionInView(){let e=this.prosemirrorView._root.getSelection();if(null==e||null==e.anchorNode)return!1;let t=this.prosemirrorView._root.createRange();t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset),0===t.getClientRects().length&&t.startContainer&&t.collapsed&&t.selectNodeContents(t.startContainer);let n=t.getBoundingClientRect(),i=f.H9.documentElement;return n.bottom>=0&&n.right>=0&&n.left<=(window.innerWidth||i.clientWidth||0)&&n.top<=(window.innerHeight||i.clientHeight||0)}renderSnapshot(e,t){t||(t=o.$p(o.cU(),new Map)),this.prosemirrorView.dispatch(this._tr.setMeta(v,{snapshot:e,prevSnapshot:t}))}unrenderSnapshot(){this.mapping.clear(),this.mux(()=>{let e=this.type.toArray().map(e=>N(e,this.prosemirrorView.state.schema,this)).filter(e=>null!==e),t=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new a.Ji(a.FK.from(e),0,0));t.setMeta(v,{snapshot:null,prevSnapshot:null}),this.prosemirrorView.dispatch(t)})}_forceRerender(){this.mapping.clear(),this.mux(()=>{let e=null!==this.beforeTransactionSelection?null:this.prosemirrorView.state.selection,t=this.type.toArray().map(e=>N(e,this.prosemirrorView.state.schema,this)).filter(e=>null!==e),n=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new a.Ji(a.FK.from(t),0,0));if(e){let t=l.jk(l.T9(e.anchor,0),n.doc.content.size),i=l.jk(l.T9(e.head,0),n.doc.content.size);n.setSelection(r.U3.create(n.doc,t,i))}this.prosemirrorView.dispatch(n.setMeta(v,{isChangeOrigin:!0,binding:this}))})}_renderSnapshot(e,t,n){let i=this.doc,r=this.type;if(e||(e=o.P9(this.doc)),e instanceof Uint8Array||t instanceof Uint8Array)if(e instanceof Uint8Array&&t instanceof Uint8Array||p.Mq(),i=new o.JA({gc:!1}),o.Qs(i,t),t=o.P9(i),o.Qs(i,e),e=o.P9(i),null===r._item){let e=Array.from(this.doc.share.keys()).find(e=>this.doc.share.get(e)===this.type);r=i.getXmlFragment(e)}else{let e=i.store.clients.get(r._item.id.client)??[],t=o.A$(e,r._item.id.clock);r=e[t].content.type}this.mapping.clear(),this.mux(()=>{i.transact(i=>{let s=n.permanentUserData;s&&s.dss.forEach(e=>{o.O_(i,e,e=>{})});let l=(e,t)=>{let i="added"===e?s.getUserByClientId(t.client):s.getUserByDeletedId(t);return{user:i,type:e,color:E(n.colorMapping,n.colors,i)}},d=o.br(r,new o.Fm(t.ds,e.sv)).map(n=>!n._item.deleted||M(n._item,e)||M(n._item,t)?N(n,this.prosemirrorView.state.schema,{mapping:new Map,isOMark:new Map},e,t,l):null).filter(e=>null!==e),h=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new a.Ji(a.FK.from(d),0,0));this.prosemirrorView.dispatch(h.setMeta(v,{isChangeOrigin:!0}))},v)})}_typeChanged(e,t){if(null==this.prosemirrorView)return;let n=v.getState(this.prosemirrorView.state);if(0===e.length||null!=n.snapshot||null!=n.prevSnapshot)return void this.renderSnapshot(n.snapshot,n.prevSnapshot);this.mux(()=>{let e=(e,t)=>this.mapping.delete(t);o.O_(t,t.deleteSet,e=>{if(e.constructor===o.q7){let t=e.content.type;t&&this.mapping.delete(t)}}),t.changed.forEach(e),t.changedParentTypes.forEach(e);let n=this.type.toArray().map(e=>R(e,this.prosemirrorView.state.schema,this)).filter(e=>null!==e),i=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new a.Ji(a.FK.from(n),0,0));x(i,this.beforeTransactionSelection,this),i=i.setMeta(v,{isChangeOrigin:!0,isUndoRedoOperation:t.origin instanceof o.ad}),null!==this.beforeTransactionSelection&&this._isLocalCursorInView()&&i.scrollIntoView(),this.prosemirrorView.dispatch(i)})}_prosemirrorChanged(e){this.doc.transact(()=>{J(this.doc,this.type,e,this),this.beforeTransactionSelection=A(this,this.prosemirrorView.state)},v)}initView(e){null!=this.prosemirrorView&&this.destroy(),this.prosemirrorView=e,this.doc.on("beforeAllTransactions",this.beforeAllTransactions),this.doc.on("afterAllTransactions",this.afterAllTransactions),this.type.observeDeep(this._observeFunction)}destroy(){null!=this.prosemirrorView&&(this.prosemirrorView=null,this.type.unobserveDeep(this._observeFunction),this.doc.off("beforeAllTransactions",this.beforeAllTransactions),this.doc.off("afterAllTransactions",this.afterAllTransactions))}}let R=(e,t,n,i,r,s)=>{let a=n.mapping.get(e);if(void 0===a)if(e instanceof o.WF)return N(e,t,n,i,r,s);else throw p.bD();return a},N=(e,t,n,i,r,s)=>{let a=[],l=e=>{if(e instanceof o.WF){let o=R(e,t,n,i,r,s);null!==o&&a.push(o)}else{let l=e._item.right?.content?.type;l instanceof o.EY&&!l._item.deleted&&l._item.id.client===l.doc.clientID&&(e.applyDelta([{retain:e.length},...l.toDelta()]),l.doc.transact(e=>{l._item.delete(e)}));let d=V(e,t,n,i,r,s);
2null!==d&&d.forEach(e=>{null!==e&&a.push(e)})}};void 0===i||void 0===r?e.toArray().forEach(l):o.br(e,new o.Fm(r.ds,i.sv)).forEach(l);try{let o=e.getAttributes(i);void 0!==i&&(M(e._item,i)?M(e._item,r)||(o.ychange=s?s("added",e._item.id):{type:"added"}):o.ychange=s?s("removed",e._item.id):{type:"removed"});let l=t.node(e.nodeName,o,a);return n.mapping.set(e,l),l}catch(t){return e.doc.transact(t=>{e._item.delete(t)},v),n.mapping.delete(e),null}},V=(e,t,n,i,r,o)=>{let s=[],a=e.toDelta(i,r,o);try{for(let e=0;e<a.length;e++){let n=a[e];s.push(t.text(n.insert,q(n.attributes,t)))}}catch(t){return e.doc.transact(t=>{e._item.delete(t)},v),null}return s},P=(e,t)=>{let n=new o.ZQ,i=e.map(e=>({insert:e.text,attributes:K(e.marks,t)}));return n.applyDelta(i),t.mapping.set(n,e),n},I=(e,t)=>{let n=new o.WF(e.type.name);for(let t in e.attrs){let i=e.attrs[t];null!==i&&"ychange"!==t&&n.setAttribute(t,i)}return n.insert(0,j(e).map(e=>F(e,t))),t.mapping.set(n,e),n},F=(e,t)=>e instanceof Array?P(e,t):I(e,t),z=e=>"object"==typeof e&&null!==e,U=(e,t)=>{let n=Object.keys(e).filter(t=>null!==e[t]),i=n.length===Object.keys(t).filter(e=>null!==t[e]).length;for(let r=0;r<n.length&&i;r++){let o=n[r],s=e[o],a=t[o];i="ychange"===o||s===a||z(s)&&z(a)&&U(s,a)}return i},j=e=>{let t=e.content.content,n=[];for(let e=0;e<t.length;e++){let i=t[e];if(i.isText){let i=[];for(let n=t[e];e<t.length&&n.isText;n=t[++e])i.push(n);e--,n.push(i)}else n.push(i)}return n},H=(e,t)=>{let n=e.toDelta();return n.length===t.length&&n.every((e,n)=>e.insert===t[n].text&&d.HP(e.attributes||{}).length===t[n].marks.length&&d.Si(e.attributes,(e,i)=>{let r=Z(i),o=t[n].marks;return!!o.find(e=>e.type.name===r)&&U(e,o.find(e=>e.type.name===r)?.attrs)}))},$=(e,t)=>{if(e instanceof o.WF&&!(t instanceof Array)&&G(e,t)){let n=j(t);return e._length===n.length&&U(e.getAttributes(),t.attrs)&&e.toArray().every((e,t)=>$(e,n[t]))}return e instanceof o.ZQ&&t instanceof Array&&H(e,t)},B=(e,t)=>e===t||e instanceof Array&&t instanceof Array&&e.length===t.length&&e.every((e,n)=>t[n]===e),L=(e,t,n)=>{let i=e.toArray(),r=j(t),o=r.length,s=i.length,a=l.jk(s,o),d=0,h=0,c=!1;for(;d<a;d++){let e=i[d],t=r[d];if(B(n.mapping.get(e),t))c=!0;else if(!$(e,t))break}for(;d+h<a;h++){let e=i[s-h-1],t=r[o-h-1];if(B(n.mapping.get(e),t))c=!0;else if(!$(e,t))break}return{equalityFactor:d+h,foundMappedChild:c}},Y=e=>{let t="",n=e._start,i={};for(;null!==n;)!n.deleted&&(n.countable&&n.content instanceof o.DU?t+=n.content.str:n.content instanceof o.v1&&(i[n.content.key]=null)),n=n.right;return{str:t,nAttrs:i}},W=(e,t,n)=>{n.mapping.set(e,t);let{nAttrs:i,str:r}=Y(e),o=t.map(e=>({insert:e.text,attributes:Object.assign({},i,K(e.marks,n))})),{insert:s,remove:a,index:l}=(0,c.Sq)(r,o.map(e=>e.insert).join(""));e.delete(l,a),e.insert(l,s),e.applyDelta(o.map(e=>({retain:e.insert.length,attributes:e.attributes})))},Q=/(.*)(--[a-zA-Z0-9+/=]{8})$/,Z=e=>Q.exec(e)?.[1]??e,q=(e,t)=>{let n=[];for(let i in e)n.push(t.mark(Z(i),e[i]));return n},K=(e,t)=>{let n={};return e.forEach(e=>{"ychange"!==e.type.name&&(n[y._4(t.isOMark,e.type,()=>!e.type.excludes(e.type))?`${e.type.name}--${_(e.toJSON())}`:e.type.name]=e.attrs)}),n},J=(e,t,n,i)=>{if(t instanceof o.WF&&t.nodeName!==n.type.name)throw Error("node name mismatch!");if(i.mapping.set(t,n),t instanceof o.WF){let e=t.getAttributes(),i=n.attrs;for(let n in i)null!==i[n]?e[n]!==i[n]&&"ychange"!==n&&t.setAttribute(n,i[n]):t.removeAttribute(n);for(let n in e)void 0===i[n]&&t.removeAttribute(n)}let r=j(n),s=r.length,a=t.toArray(),d=a.length,h=l.jk(s,d),c=0,p=0;for(;c<h;c++){let e=a[c],t=r[c];if(!B(i.mapping.get(e),t))if($(e,t))i.mapping.set(e,t);else break}for(;p+c+1<h;p++){let e=a[d-p-1],t=r[s-p-1];if(!B(i.mapping.get(e),t))if($(e,t))i.mapping.set(e,t);else break}e.transact(()=>{for(;d-c-p>0&&s-c-p>0;){let n=a[c],l=r[c],h=a[d-p-1],u=r[s-p-1];if(n instanceof o.ZQ&&l instanceof Array)H(n,l)||W(n,l,i),c+=1;else{let r=n instanceof o.WF&&G(n,l),s=h instanceof o.WF&&G(h,u);if(r&&s){let e=L(n,l,i),t=L(h,u,i);e.foundMappedChild&&!t.foundMappedChild?s=!1:!e.foundMappedChild&&t.foundMappedChild||e.equalityFactor<t.equalityFactor?r=!1:s=!1}r?(J(e,n,l,i),c+=1):s?(J(e,h,u,i),p+=1):(i.mapping.delete(t.get(c)),t.delete(c,1),t.insert(c,[F(l,i)]),c+=1)}}let n=d-c-p;if(1===d&&0===s&&a[0]instanceof o.ZQ?(i.mapping.delete(a[0]),a[0].delete(0,a[0].length)):n>
20&&(t.slice(c,c+n).forEach(e=>i.mapping.delete(e)),t.delete(c,n)),c+p<s){let e=[];for(let t=c;t<s-p;t++)e.push(F(r[t],i));t.insert(c,e)}},v)},G=(e,t)=>!(t instanceof Array)&&e.nodeName===t.type.name,X=(e,t,n)=>{if(0===e)return o.SF(t,0,-1);let i=null===t._first?null:t._first.content.type;for(;null!==i&&t!==i;){if(i instanceof o.ZQ){if(i._length>=e)return o.SF(i,e,-1);if(e-=i._length,null!==i._item&&null!==i._item.next)i=i._item.next.content.type;else{do i=null===i._item?null:i._item.parent,e--;while(i!==t&&null!==i&&null!==i._item&&null===i._item.next);null!==i&&i!==t&&(i=null===i._item?null:i._item.next.content.type)}}else{let r=(n.get(i)||{nodeSize:0}).nodeSize;if(null!==i._first&&e<r)i=i._first.content.type,e--;else{if(1===e&&0===i._length&&r>1)return new o.QQ(null===i._item?null:i._item.id,null===i._item?o.xC(i):null,null);if(e-=r,null!==i._item&&null!==i._item.next)i=i._item.next.content.type;else{if(0===e)return i=null===i._item?i:i._item.parent,new o.QQ(null===i._item?null:i._item.id,null===i._item?o.xC(i):null,null);do i=i._item.parent,e--;while(i!==t&&null===i._item.next);i!==t&&(i=i._item.next.content.type)}}}if(null===i)throw p.Mq();if(0===e&&i.constructor!==o.ZQ&&i!==t)return ee(i._item.parent,i._item)}return o.SF(t,t._length,-1)},ee=(e,t)=>{let n=null,i=null;return null===e._item?i=o.xC(e):n=o.eg(e._item.id.client,e._item.id.clock),new o.QQ(n,i,t.id)},et=(e,t,n,i)=>{let r=o.IT(n,e);if(null===r||r.type!==t&&!o.Mp(t,r.type._item))return null;let s=r.type,a=0;if(s.constructor===o.ZQ)a=r.index;else if(null===s._item||!s._item.deleted){let e=s._first,t=0;for(;t<s._length&&t<r.index&&null!==e;){if(!e.deleted){let n=e.content.type;t++,n instanceof o.ZQ?a+=n._length:a+=i.get(n).nodeSize}e=e.right}a+=1}for(;s!==t&&null!==s._item;){let e=s._item.parent;if(null===e._item||!e._item.deleted){a+=1;let t=e._first;for(;null!==t;){let e=t.content.type;if(e===s)break;t.deleted||(e instanceof o.ZQ?a+=e._length:a+=i.get(e).nodeSize),t=t.right}}s=e}return a-1},en=e=>{let t=S.getState(e).undoManager;if(null!=t)return t.undo(),!0},ei=e=>{let t=S.getState(e).undoManager;if(null!=t)return t.redo(),!0},er=new Set(["paragraph"]),eo=(e,t)=>!(e instanceof o.q7)||!(e.content instanceof o.cM)||!(e.content.type instanceof o.EY||e.content.type instanceof o.WF&&t.has(e.content.type.nodeName))||0===e.content.type._length,es=({protectedNodes:e=er,trackedOrigins:t=[],undoManager:n=null}={})=>new r.k_({key:S,state:{init:(i,r)=>{let s=v.getState(r),a=n||new o.ad(s.type,{trackedOrigins:new Set([v].concat(t)),deleteFilter:t=>eo(t,e),captureTransaction:e=>!1!==e.meta.get("addToHistory")});return{undoManager:a,prevSel:null,hasUndoOps:a.undoStack.length>0,hasRedoOps:a.redoStack.length>0}},apply:(e,t,n,i)=>{let r=v.getState(i).binding,o=t.undoManager,s=o.undoStack.length>0,a=o.redoStack.length>0;return r?{undoManager:o,prevSel:A(r,n),hasUndoOps:s,hasRedoOps:a}:s!==t.hasUndoOps||a!==t.hasRedoOps?Object.assign({},t,{hasUndoOps:o.undoStack.length>0,hasRedoOps:o.redoStack.length>0}):t}},view:e=>{let t=v.getState(e.state),n=S.getState(e.state).undoManager;return n.on("stack-item-added",({stackItem:n})=>{let i=t.binding;i&&n.meta.set(i,S.getState(e.state).prevSel)}),n.on("stack-item-popped",({stackItem:e})=>{let n=t.binding;n&&(n.beforeTransactionSelection=e.meta.get(n)||n.beforeTransactionSelection)}),{destroy:()=>{n.destroy()}}}});function ea(e,t){let n=v.getState(e);return X(t,n.type,n.binding.mapping)}var el=class e extends i.e4{constructor(e,t){super(e),this.yRelativePosition=t}static fromJSON(t){return new e(t.position,t.yRelativePosition)}toJSON(){return{position:this.position,yRelativePosition:this.yRelativePosition}}},ed=i.YY.create({name:"collaboration",priority:1e3,addOptions:()=>({document:null,field:"default",fragment:null,provider:null}),addStorage:()=>({isDisabled:!1}),onCreate(){this.editor.extensionManager.extensions.find(e=>"undoRedo"===e.name)&&console.warn('[tiptap warn]: "@tiptap/extension-collaboration" comes with its own history support and is not compatible with "@tiptap/extension-undo-redo".')}
2,onBeforeCreate(){this.editor.utils.getUpdatedPosition=(e,t)=>(function(e,t,n){let r=e instanceof el?e.yRelativePosition:null;if(t.getMeta(v)&&r)return{position:new el(function(e,t){let n=v.getState(e);return et(n.doc,n.type,t,n.binding.mapping)||0}(n,r),r),mapResult:null};let o=(0,i.tW)(e,t),s=o.position.position;return{position:new el(s,null!=r?r:ea(n,s)),mapResult:o.mapResult}})(e,t,this.editor.state),this.editor.utils.createMappablePosition=e=>(function(e,t){let n=ea(t,e);return new el(e,n)})(e,this.editor.state)},addCommands:()=>({undo:()=>({tr:e,state:t,dispatch:n})=>(e.setMeta("preventDispatch",!0),0!==S.getState(t).undoManager.undoStack.length&&(!n||en(t))),redo:()=>({tr:e,state:t,dispatch:n})=>(e.setMeta("preventDispatch",!0),0!==S.getState(t).undoManager.redoStack.length&&(!n||ei(t)))}),addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo()}},addProseMirrorPlugins(){var e;let t=this.options.fragment?this.options.fragment:this.options.document.getXmlFragment(this.options.field),n=es(this.options.yUndoOptions),i=n.spec.view;n.spec.view=e=>{let{undoManager:t}=S.getState(e.state);t.restore&&(t.restore(),t.restore=()=>{});let n=i?i(e):void 0;return{destroy:()=>{let e=t.trackedOrigins.has(t),i=t._observers;t.restore=()=>{e&&t.trackedOrigins.add(t),t.doc.on("afterTransaction",t.afterTransactionHandler),t._observers=i},(null==n?void 0:n.destroy)&&n.destroy()}}};let s=O(t,{...this.options.ySyncOptions,onFirstRender:this.options.onFirstRender});return this.editor.options.enableContentCheck&&(null==(e=t.doc)||e.on("beforeTransaction",()=>{try{let e=function(e){let t=e.toArray(),n=e=>{let t;if(e instanceof o.ZQ)t=e.toDelta().map(e=>{let t={type:"text",text:e.insert};return e.attributes&&(t.marks=Object.keys(e.attributes).map(t=>{let n=e.attributes[t],i={type:Z(t)};return Object.keys(n)&&(i.attrs=n),i})),t});else if(e instanceof o.WF){t={type:e.nodeName};let i=e.getAttributes();Object.keys(i).length&&(t.attrs=i);let r=e.toArray();r.length&&(t.content=r.map(n).flat())}else p.Mq();return t};return{type:"doc",content:t.map(n)}}(t);if(0===e.content.length)return;this.editor.schema.nodeFromJSON(e).check()}catch(e){return this.editor.emit("contentError",{error:e,editor:this.editor,disableCollaboration:()=>{var e;null==(e=t.doc)||e.destroy(),this.storage.isDisabled=!0}}),!1}})),[s,n,this.editor.options.enableContentCheck&&new r.k_({key:new r.hs("filterInvalidContent"),filterTransaction:()=>{var e;return!1!==this.storage.isDisabled&&(null==(e=t.doc)||e.destroy()),!0}})].filter(Boolean)}})},72237:(e,t,n)=>{n.d(t,{$Z:()=>m,$p:()=>_,VR:()=>M,gu:()=>A,hG:()=>v});var i=n(6992),r=n(62881),o=n(13791),s=n(25404),a=n(52874),l=n(29858),d=n(97161),h=(...e)=>t=>{e.forEach(e=>{"function"==typeof e?e(t):e&&(e.current=t)})},c=({contentComponent:e})=>{let t=(0,o.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,s.jsx)(s.Fragment,{children:Object.values(t)})},p=class extends i.Component{constructor(e){var t;super(e),this.editorContentRef=i.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!(null==(t=e.editor)?void 0:t.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var e;let t=this.props.editor;if(t&&!t.isDestroyed&&(null==(e=t.view.dom)?void 0:e.parentNode)){if(t.contentComponent)return;let e=this.editorContentRef.current;e.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:e}),t.contentComponent=function(){let e=new Set,t={};return{subscribe:t=>(e.add(t),()=>{e.delete(t)}),getSnapshot:()=>t,getServerSnapshot:()=>t,setRenderer(n,i){t={...t,[n]:r.createPortal(i.reactElement,i.element,n)},e.forEach(e=>e())},removeRenderer(n){let i={...t};delete i[n],t=i,e.forEach(e=>e())}}}(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=t.contentComponent.subscribe(()=>{this.setState(e=>e.hasContentComponentInitialized?e:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),t.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var e;let t=this.props.editor;if(t){this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),t.contentComponent=null;try{if(!(null==(e=t.view.dom)?void 0:e.parentNode))return;let n=document.createElement("div");n.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:n})}catch{}}}render(){let{editor:e,innerRef:t,...n}=this.props;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{ref:h(t,this.editorContentRef),...n}),(null==e?void 0:e.contentComponent)&&(0,s.jsx)(c,{contentComponent:e.contentComponent})]})}},u=(0,i.forwardRef)((e,t)=>{let n=i.useMemo(()=>Math.floor(0xffffffff*Math.random()).toString(),[e.editor]);return i.createElement(p,{key:n,innerRef:t,...e})}),m=i.memo(u),f="undefined"!=typeof window?i.useLayoutEffect:i.useEffect,g=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0}
2,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(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){let e=()=>{this.transactionNumber+=1,this.subscribers.forEach(e=>e())},t=this.editor;return t.on("transaction",e),()=>{t.off("transaction",e)}}}},y="undefined"==typeof window,b=y||!!("undefined"!=typeof window&&window.next),w=class e{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(e=>e())}getInitialEditor(){if(void 0===this.options.current.immediatelyRender)return y||b?null:this.createEditor();return this.options.current.immediatelyRender,this.options.current.immediatelyRender?this.createEditor():null}createEditor(){let e={...this.options.current,onBeforeCreate:(...e)=>{var t,n;return null==(n=(t=this.options.current).onBeforeCreate)?void 0:n.call(t,...e)},onBlur:(...e)=>{var t,n;return null==(n=(t=this.options.current).onBlur)?void 0:n.call(t,...e)},onCreate:(...e)=>{var t,n;return null==(n=(t=this.options.current).onCreate)?void 0:n.call(t,...e)},onDestroy:(...e)=>{var t,n;return null==(n=(t=this.options.current).onDestroy)?void 0:n.call(t,...e)},onFocus:(...e)=>{var t,n;return null==(n=(t=this.options.current).onFocus)?void 0:n.call(t,...e)},onSelectionUpdate:(...e)=>{var t,n;return null==(n=(t=this.options.current).onSelectionUpdate)?void 0:n.call(t,...e)},onTransaction:(...e)=>{var t,n;return null==(n=(t=this.options.current).onTransaction)?void 0:n.call(t,...e)},onUpdate:(...e)=>{var t,n;return null==(n=(t=this.options.current).onUpdate)?void 0:n.call(t,...e)},onContentError:(...e)=>{var t,n;return null==(n=(t=this.options.current).onContentError)?void 0:n.call(t,...e)},onDrop:(...e)=>{var t,n;return null==(n=(t=this.options.current).onDrop)?void 0:n.call(t,...e)},onPaste:(...e)=>{var t,n;return null==(n=(t=this.options.current).onPaste)?void 0:n.call(t,...e)},onDelete:(...e)=>{var t,n;return null==(n=(t=this.options.current).onDelete)?void 0:n.call(t,...e)}};return new a.KE(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,t){return Object.keys(e).every(n=>!!["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(n)||("extensions"===n&&e.extensions&&t.extensions?e.extensions.length===t.extensions.length&&e.extensions.every((e,n)=>{var i;return e===(null==(i=t.extensions)?void 0:i[n])}):e[n]===t[n]))}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&0===t.length?e.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(null===this.previousDeps){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((t,n)=>t===e[n]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){let e=this.instanceId,t=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){t&&t.setOptions(this.options.current);return}t&&!t.isDestroyed&&(t.destroy(),this.instanceId===e&&this.setEditor(null))}
2,1)}};function v(e={},t=[]){let n=(0,i.useRef)(e);n.current=e;let[r]=(0,i.useState)(()=>new w(n)),s=(0,o.useSyncExternalStore)(r.subscribe,r.getEditor,r.getServerSnapshot);return(0,i.useDebugValue)(s),(0,i.useEffect)(r.onRender(t)),!function(e){var t;let[n]=(0,i.useState)(()=>new g(e.editor)),r=(0,d.useSyncExternalStoreWithSelector)(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,null!=(t=e.equalityFn)?t:l.bD);f(()=>n.watch(e.editor),[e.editor,n]),(0,i.useDebugValue)(r)}({editor:s,selector:({transactionNumber:t})=>!1===e.shouldRerenderOnTransaction||void 0===e.shouldRerenderOnTransaction?null:e.immediatelyRender&&0===t?0:t+1}),s}var S=((0,i.createContext)({editor:null}).Consumer,(0,i.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}})),C=()=>(0,i.useContext)(S);function _({as:e="div",...t}){let{nodeViewContentRef:n,nodeViewContentChildren:i}=C();return(0,s.jsx)(e,{...t,ref:n,"data-node-view-content":"",style:{whiteSpace:"pre-wrap",...t.style},children:i})}var M=i.forwardRef((e,t)=>{let{onDragStart:n}=C(),i=e.as||"div";return(0,s.jsx)(i,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});function k(e){return!!("function"==typeof e&&e.prototype&&e.prototype.isReactComponent)}function E(e){return!!("object"==typeof e&&e.$$typeof&&("Symbol(react.forward_ref)"===e.$$typeof.toString()||"react.forward_ref"===e.$$typeof.description))}var O=class{constructor(e,{editor:t,props:n={},as:i="div",className:o=""}){this.ref=null,this.id=Math.floor(0xffffffff*Math.random()).toString(),this.component=e,this.editor=t,this.props=n,this.element=document.createElement(i),this.element.classList.add("react-renderer"),o&&this.element.classList.add(...o.split(" ")),this.editor.isInitialized?(0,r.flushSync)(()=>{this.render()}):queueMicrotask(()=>{this.render()})}render(){var e;let t=this.component,n=this.props,r=this.editor,o=function(){try{if(i.version)return parseInt(i.version.split(".")[0],10)>=19}catch{}return!1}(),a=function(e){if(k(e)||E(e))return!0;if("object"==typeof e&&e.$$typeof&&("Symbol(react.memo)"===e.$$typeof.toString()||"react.memo"===e.$$typeof.description)){let t=e.type;if(t)return k(t)||E(t)}return!1}(t),l={...n};l.ref&&!(o||a)&&delete l.ref,!l.ref&&(o||a)&&(l.ref=e=>{this.ref=e}),this.reactElement=(0,s.jsx)(t,{...l}),null==(e=null==r?void 0:r.contentComponent)||e.setRenderer(this.id,this)}updateProps(e={}){this.props={...this.props,...e},this.render()}destroy(){var e;let t=this.editor;null==(e=null==t?void 0:t.contentComponent)||e.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(e){Object.keys(e).forEach(t=>{this.element.setAttribute(t,e[t])})}},x=i.createContext({markViewContentRef:()=>{}}),D=(a.Db,class extends a.Yv{constructor(e,t,n){if(super(e,t,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 e=this.dom.querySelector("[data-node-view-content]");if(!e)return;e.appendChild(this.contentDOMElement)}}mount(){let e={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:(e={})=>this.updateAttributes(e),deleteNode:()=>this.deleteNode(),ref:(0,i.createRef)()};if(!this.component.displayName){let e;this.component.displayName=(e=this.extension.name).charAt(0).toUpperCase()+e.substring(1)}let t={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:e=>{e&&this.contentDOMElement&&e.firstChild!==this.contentDOMElement&&(e.hasAttribute("data-node-view-wrapper")&&e.removeAttribute("data-node-view-wrapper"),e.appendChild(this.contentDOMElement))}},n=this.component,r=(0,i.memo)(e=>(0,s.jsx)(S.Provider,{value:t,children:(0,i.createElement)(n,e)}));r.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 O(r,{editor:this.editor,props:e,as:o,className:`node-${this.node.type.n
2ame} ${a}`.trim()}),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.updateElementAttributes()}get dom(){var e;if(this.renderer.element.firstElementChild&&!(null==(e=this.renderer.element.firstElementChild)?void 0:e.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:e,to:t}=this.editor.state.selection,n=this.getPos();if("number"==typeof n)if(e<=n&&t>=n+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}})}update(e,t,n){let i=e=>{this.renderer.updateProps(e),"function"==typeof this.options.attrs&&this.updateElementAttributes()};if(e.type!==this.node.type)return!1;if("function"==typeof this.options.update){let r=this.node,o=this.decorations,s=this.innerDecorations;return this.node=e,this.decorations=t,this.innerDecorations=n,this.options.update({oldNode:r,oldDecorations:o,newNode:e,newDecorations:t,oldInnerDecorations:s,innerDecorations:n,updateProps:()=>i({node:e,decorations:t,innerDecorations:n})})}return e===this.node&&this.decorations===t&&this.innerDecorations===n||(this.node=e,this.decorations=t,this.innerDecorations=n,i({node:e,decorations:t,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 e={};if("function"==typeof this.options.attrs){let t=this.editor.extensionManager.attributes,n=(0,a.zU)(this.node,t);e=this.options.attrs({node:this.node,HTMLAttributes:n})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}});function A(e,t){return n=>n.editor.contentComponent?new D(e,n,t):{}}},77086:(e,t,n)=>{n.d(t,{A:()=>i});var i=n(28763).lb},82120:(e,t,n)=>{n.d(t,{A:()=>r,y:()=>i});var i=n(52874).bP.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n\n"):""}),r=i},99680:(e,t,n)=>{n.d(t,{A:()=>r});var i=n(52874),r=i.bP.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",(0,i.KV)(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];return 1===n.length&&"image"===n[0].type?t.parseChildren([n[0]]):t.createNode("paragraph",void 0,t.parseInline(n))},renderMarkdown:(e,t)=>e&&Array.isArray(e.content)?t.renderChildren(e.content):"",addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}})}}]);

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.