PageSourceSearch

https://rephonic.com/_next/static/chunks/520c8229-dc52ce2bb1159660.js

js rephonic.com collected 2026-10-02 02:21:32 UTC 74,191 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1509],{5865:function(t,e,n){n.d(e,{ML:function(){return Ke},hj:function(){return De},vc:function(){return je},NB:function(){return un},nU:function(){return Tt},XP:function(){return xt},Ov:function(){return Xe},b5:function(){return Mt},ar:function(){return Lt},_4:function(){return Ut},u9:function(){return qt},QC:function(){return Jt},Nl:function(){return St},IH:function(){return j},tI:function(){return Yt},NY:function(){return Kt},jo:function(){return x},J1:function(){return Vt},Q:function(){return Ht},Is:function(){return Ft},rI:function(){return Xt},Sz:function(){return te},Ig:function(){return ot},bR:function(){return re},EG:function(){return oe},Cf:function(){return Qe},K9:function(){return pn},P1:function(){return jt},x2:function(){return Ze},NI:function(){return cn},pr:function(){return se},wm:function(){return ln},S0:function(){return Ge}});var r=n(16560),o=n(25804),s=n(2376),i=n(12806),a=n(53833),c=n(84348),l=n(82696),d=Object.defineProperty,u=(t,e)=>{for(var n in e)d(t,n,{get:e[n],enumerable:!0})};function p(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:o}=n,{storedMarks:s}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return s},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,s=n.storedMarks,n}}}var h=class{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:n}=this,{view:r}=e,{tr:o}=n,s=this.buildProps(o);return Object.fromEntries(Object.entries(t).map((([t,e])=>[t,(...t)=>{const n=e(...t)(s);return o.getMeta("preventDispatch")||this.hasCustomState||r.dispatch(o),n}])))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:n,editor:r,state:o}=this,{view:s}=r,i=[],a=!!t,c=t||o.tr,l={...Object.fromEntries(Object.entries(n).map((([t,n])=>[t,(...t)=>{const r=this.buildProps(c,e),o=n(...t)(r);return i.push(o),l}]))),run:()=>(a||!e||c.getMeta("preventDispatch")||this.hasCustomState||s.dispatch(c),i.every((t=>!0===t)))};return l}createCan(t){const{rawCommands:e,state:n}=this,r=t||n.tr,o=this.buildProps(r,false);return{...Object.fromEntries(Object.entries(e).map((([t,e])=>[t,(...t)=>e(...t)({...o,dispatch:void 0})]))),chain:()=>this.createChain(r,false)}}buildProps(t,e=!0){const{rawCommands:n,editor:r,state:o}=this,{view:s}=r,i={tr:t,editor:r,view:s,state:p({state:o,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t,e),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(n).map((([t,e])=>[t,(...t)=>e(...t)(i)])))}};return i}},m={};u(m,{blur:()=>f,clearContent:()=>g,clearNodes:()=>v,command:()=>y,createParagraphNear:()=>b,cut:()=>k,deleteCurrentNode:()=>w,deleteNode:()=>M,deleteRange:()=>E,deleteSelection:()=>S,enter:()=>$,exitCode:()=>C,extendMarkRange:()=>N,first:()=>B,focus:()=>_,forEach:()=>H,insertContent:()=>F,insertContentAt:()=>J,joinBackward:()=>Q,joinDown:()=>K,joinForward:()=>Z,joinItemBackward:()=>G,joinItemForward:()=>X,joinTextblockBackward:()=>tt,joinTextblockForward:()=>et,joinUp:()=>Y,keyboardShortcut:()=>rt,lift:()=>st,liftEmptyBlock:()=>it,liftListItem:()=>at,newlineInCode:()=>ct,resetAttributes:()=>ut,scrollIntoView:()=>pt,selectAll:()=>ht,selectNodeBackward:()=>mt,selectNodeForward:()=>ft,selectParentNode:()=>gt,selectTextblockEnd:()=>vt,selectTextblockStart:()=>yt,setContent:()=>kt,setMark:()=>ie,setMeta:()=>ae,setNode:()=>ce,setNodeSelection:()=>le,setTextSelection:()=>de,sinkListItem:()=>ue,splitBlock:()=>he,splitListItem:()=>me,toggleList:()=>ve,toggleMark:()=>ye,toggleNode:()=>be,toggleWrap:()=>ke,undoInputRule:()=>we,unsetAllMarks:()=>xe,unsetMark:()=>Me,updateAttributes:()=>Ee,wrapIn:()=>Se,wrapInList:()=>$e});var f=()=>({editor:t,view:e})=>(requestAnimationFrame((()=>{var n;t.isDestroyed||(e.dom.blur(),null==(n=null==window?void 0:window.getSelection())||n.removeAllRanges())})),!0),g=(t=!0)=>({commands:e})=>e.setContent("",{emitUpdate:t}),v=()=>({state:t,tr:e,dispatch:n})=>{const{selection:o}=e,{ranges:s}=o;return!n||(s.forEach((({$from:n,$to:o})=>{t.doc.nodesBetween(n.pos,o.pos,((t,n)=>{if(t.type.isText)return;const{doc:o,mapping:s}=e,i=o.resolve(s.map(n)),a=o.resolve(s.map(n+t.nodeSize)),c=i.blockRange(a);if(!c)return;const l=(0,r.k9)(c);if(t.type.isTextblock){const{defaultType:t}=i.parent.contentMatchAt(i.index());e.setNodeMarkup(c.start,t)}(l||0===l)&&e.lift(c,l)}))})),!0)},y=t=>e=>t(e),b=()=>({state:t,dispatch:e})=>(0,o.mD)(t,e),k=(t,e)=>({editor:n,tr:r})=>{const{state:o}=n,i=o.doc.slice(t.from,t.to);r.deleteRange(t.from,t.to);const a=r.mapping.map(e);return r.insert(a,i.content),r.setSelection(new s.Bs(r.doc.resolve(Math.max(a-1,0)))),!0},w=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const o=t.selection.$anchor;for(let s=o.depth;s>0;s-=1){if(o.node(s).type===r.type){if(e){const e=o.before(s),n=o.after(s);t.delete(e,n).scrollIntoView()}return!0}}return!1};function x(t,e){if("string"===typeof t){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);
1return e.nodes[t]}return t}var M=t=>({tr:e,state:n,dispatch:r})=>{const o=x(t,n.schema),s=e.selection.$anchor;for(let t=s.depth;t>0;t-=1){if(s.node(t).type===o){if(r){const n=s.before(t),r=s.after(t);e.delete(n,r).scrollIntoView()}return!0}}return!1},E=t=>({tr:e,dispatch:n})=>{const{from:r,to:o}=t;return n&&e.delete(r,o),!0},S=()=>({state:t,dispatch:e})=>(0,o.NE)(t,e),$=()=>({commands:t})=>t.keyboardShortcut("Enter"),C=()=>({state:t,dispatch:e})=>(0,o.uo)(t,e);function O(t){return"[object RegExp]"===Object.prototype.toString.call(t)}function T(t,e,n={strict:!0}){const r=Object.keys(e);return!r.length||r.every((r=>n.strict?e[r]===t[r]:O(e[r])?e[r].test(t[r]):e[r]===t[r]))}function A(t,e,n={}){return t.find((t=>t.type===e&&T(Object.fromEntries(Object.keys(n).map((e=>[e,t.attrs[e]]))),n)))}function P(t,e,n={}){return!!A(t,e,n)}function j(t,e,n){var r;if(!t||!e)return;let o=t.parent.childAfter(t.parentOffset);if(o.node&&o.node.marks.some((t=>t.type===e))||(o=t.parent.childBefore(t.parentOffset)),!o.node||!o.node.marks.some((t=>t.type===e)))return;n=n||(null==(r=o.node.marks[0])?void 0:r.attrs);if(!A([...o.node.marks],e,n))return;let s=o.index,i=t.start()+o.offset,a=s+1,c=i+o.node.nodeSize;for(;s>0&&P([...t.parent.child(s-1).marks],e,n);)s-=1,i-=t.parent.child(s).nodeSize;for(;a<t.parent.childCount&&P([...t.parent.child(a).marks],e,n);)c+=t.parent.child(a).nodeSize,a+=1;return{from:i,to:c}}function I(t,e){if("string"===typeof t){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}var N=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const i=I(t,r.schema),{doc:a,selection:c}=n,{$from:l,from:d,to:u}=c;if(o){const t=j(l,i,e);if(t&&t.from<=d&&t.to>=u){const e=s.Bs.create(a,t.from,t.to);n.setSelection(e)}}return!0},B=t=>e=>{const n="function"===typeof t?t(e):t;for(let t=0;t<n.length;t+=1)if(n[t](e))return!0;return!1};function R(t){return t instanceof s.Bs}function z(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function D(t,e=null){if(!e)return null;const n=s.Y1.atStart(t),r=s.Y1.atEnd(t);if("start"===e||!0===e)return n;if("end"===e)return r;const o=n.from,i=r.to;return"all"===e?s.Bs.create(t,z(0,o,i),z(t.content.size,o,i)):s.Bs.create(t,z(e,o,i),z(e,o,i))}function V(){return"Android"===navigator.platform||/android/i.test(navigator.userAgent)}function L(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}var _=(t=null,e={})=>({editor:n,view:r,tr:o,dispatch:s})=>{e={scrollIntoView:!0,...e};const i=()=>{(L()||V())&&r.dom.focus(),requestAnimationFrame((()=>{n.isDestroyed||(r.focus(),(null==e?void 0:e.scrollIntoView)&&n.commands.scrollIntoView())}))};if(r.hasFocus()&&null===t||!1===t)return!0;if(s&&null===t&&!R(n.state.selection))return i(),!0;const a=D(o.doc,t)||n.state.selection,c=n.state.selection.eq(a);return s&&(c||o.setSelection(a),c&&o.storedMarks&&o.setStoredMarks(o.storedMarks),i()),!0},H=(t,e)=>n=>t.every(((t,r)=>e(t,{...n,index:r}))),F=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),U=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const r=e[n];3===r.nodeType&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?t.removeChild(r):1===r.nodeType&&U(r)}return t};function q(t){if("undefined"===typeof window)throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");const e=`<body>${t}</body>`,n=(new window.DOMParser).parseFromString(e,"text/html").body;return U(n)}function W(t,e,n){if(t instanceof i.NB||t instanceof i.HY)return t;n={slice:!0,parseOptions:{},...n};const r="string"===typeof t;if("object"===typeof t&&null!==t)try{if(Array.isArray(t)&&t.length>0)return i.HY.fromArray(t.map((t=>e.nodeFromJSON(t))));const r=e.nodeFromJSON(t);return n.errorOnInvalidContent&&r.check(),r}catch(o){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:o});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",o),W("",e,n)}if(r){if(n.errorOnInvalidContent){let r=!1,o="";const s=new i.V_({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:t=>(r=!0,o="string"===typeof t?t:t.outerHTML,null)}]}})});
1if(n.slice?i.aw.fromSchema(s).parseSlice(q(t),n.parseOptions):i.aw.fromSchema(s).parse(q(t),n.parseOptions),n.errorOnInvalidContent&&r)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${o}`)})}const r=i.aw.fromSchema(e);return n.slice?r.parseSlice(q(t),n.parseOptions).content:r.parse(q(t),n.parseOptions)}return W("",e,n)}var J=(t,e,n)=>({tr:o,dispatch:a,editor:c})=>{var l;if(a){let a;const u=t=>{c.emit("contentError",{editor:c,error:t,disableCollaboration:()=>{"collaboration"in c.storage&&"object"===typeof c.storage.collaboration&&c.storage.collaboration&&(c.storage.collaboration.isDisabled=!0)}})},p={preserveWhitespace:"full",...(n={parseOptions:c.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n}).parseOptions};if(!n.errorOnInvalidContent&&!c.options.enableContentCheck&&c.options.emitContentError)try{W(e,c.schema,{parseOptions:p,errorOnInvalidContent:!0})}catch(d){u(d)}try{a=W(e,c.schema,{parseOptions:p,errorOnInvalidContent:null!=(l=n.errorOnInvalidContent)?l:c.options.enableContentCheck})}catch(d){return u(d),!1}let{from:h,to:m}="number"===typeof t?{from:t,to:t}:{from:t.from,to:t.to},f=!0,g=!0;if(("type"in a?[a]:a).forEach((t=>{t.check(),f=!!f&&(t.isText&&0===t.marks.length),g=!!g&&t.isBlock})),h===m&&g){const{parent:t}=o.doc.resolve(h);t.isTextblock&&!t.type.spec.code&&!t.childCount&&(h-=1,m+=1)}let v;if(f){if(Array.isArray(e))v=e.map((t=>t.text||"")).join("");else if(e instanceof i.HY){let t="";e.forEach((e=>{e.text&&(t+=e.text)})),v=t}else v="object"===typeof e&&e&&e.text?e.text:e;o.insertText(v,h,m)}else{v=a;const t=o.doc.resolve(h),e=t.node(),n=0===t.parentOffset,r=e.isText||e.isTextblock,s=e.content.size>0;n&&r&&s&&(h=Math.max(0,h-1)),o.replaceWith(h,m,v)}n.updateSelection&&function(t,e,n){const o=t.steps.length-1;if(o<e)return;const i=t.steps[o];if(!(i instanceof r.Pu||i instanceof r.FC))return;const a=t.mapping.maps[o];let c=0;a.forEach(((t,e,n,r)=>{0===c&&(c=r)})),t.setSelection(s.Y1.near(t.doc.resolve(c),n))}(o,o.steps.length-1,-1),n.applyInputRules&&o.setMeta("applyInputRules",{from:h,text:v}),n.applyPasteRules&&o.setMeta("applyPasteRules",{from:h,text:v})}return!0},Y=()=>({state:t,dispatch:e})=>(0,o.MI)(t,e),K=()=>({state:t,dispatch:e})=>(0,o.Ig)(t,e),Q=()=>({state:t,dispatch:e})=>(0,o.al)(t,e),Z=()=>({state:t,dispatch:e})=>(0,o.Y_)(t,e),G=()=>({state:t,dispatch:e,tr:n})=>{try{const o=(0,r.GJ)(t.doc,t.selection.$from.pos,-1);return null!==o&&void 0!==o&&(n.join(o,2),e&&e(n),!0)}catch{return!1}},X=()=>({state:t,dispatch:e,tr:n})=>{try{const o=(0,r.GJ)(t.doc,t.selection.$from.pos,1);return null!==o&&void 0!==o&&(n.join(o,2),e&&e(n),!0)}catch{return!1}},tt=()=>({state:t,dispatch:e})=>(0,o.rr)(t,e),et=()=>({state:t,dispatch:e})=>(0,o.cR)(t,e);function nt(){return"undefined"!==typeof navigator&&/Mac/.test(navigator.platform)}var rt=t=>({editor:e,view:n,tr:r,dispatch:o})=>{const s=function(t){const e=t.split(/-(?!$)/);let n,r,o,s,i=e[e.length-1];"Space"===i&&(i=" ");for(let a=0;a<e.length-1;a+=1){const t=e[a];if(/^(cmd|meta|m)$/i.test(t))s=!0;else if(/^a(lt)?$/i.test(t))n=!0;else if(/^(c|ctrl|control)$/i.test(t))r=!0;else if(/^s(hift)?$/i.test(t))o=!0;else{if(!/^mod$/i.test(t))throw new Error(`Unrecognized modifier name: ${t}`);L()||nt()?s=!0:r=!0}}return n&&(i=`Alt-${i}`),r&&(i=`Ctrl-${i}`),s&&(i=`Meta-${i}`),o&&(i=`Shift-${i}`),i}(t).split(/-(?!$)/),i=s.find((t=>!["Alt","Ctrl","Meta","Shift"].includes(t))),a=new KeyboardEvent("keydown",{key:"Space"===i?" ":i,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0}),c=e.captureTransaction((()=>{n.someProp("handleKeyDown",(t=>t(n,a)))}));return null==c||c.steps.forEach((t=>{const e=t.map(r.mapping);e&&o&&r.maybeStep(e)})),!0};function ot(t,e,n={}){const{from:r,to:o,empty:s}=t.selection,i=e?x(e,t.schema):null,a=[];t.doc.nodesBetween(r,o,((t,e)=>{if(t.isText)return;const n=Math.max(r,e),s=Math.min(o,e+t.nodeSize);a.push({node:t,from:n,to:s})}));const c=o-r,l=a.filter((t=>!i||i.name===t.node.type.name)).filter((t=>T(t.node.attrs,n,{strict:!1})));if(s)return!!l.length;return l.reduce(((t,e)=>t+e.to-e.from),0)>=c}var st=(t,e={})=>({state:n,dispatch:r})=>!!ot(n,x(t,n.schema),e)&&(0,o.xb)(n,r),it=()=>({state:t,dispatch:e})=>(0,o.X0)(t,e),at=t=>({state:e,dispatch:n})=>{const r=x(t,e.schema);return(0,a.IB)(r)(e,n)},ct=()=>({state:t,dispatch:e})=>(0,o.QK)(t,e);
1function lt(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function dt(t,e){const n="string"===typeof e?[e]:e;return Object.keys(t).reduce(((e,r)=>(n.includes(r)||(e[r]=t[r]),e)),{})}var ut=(t,e)=>({tr:n,state:r,dispatch:o})=>{let s=null,i=null;const a=lt("string"===typeof t?t:t.name,r.schema);return!!a&&("node"===a&&(s=x(t,r.schema)),"mark"===a&&(i=I(t,r.schema)),o&&n.selection.ranges.forEach((t=>{r.doc.nodesBetween(t.$from.pos,t.$to.pos,((t,r)=>{s&&s===t.type&&n.setNodeMarkup(r,void 0,dt(t.attrs,e)),i&&t.marks.length&&t.marks.forEach((o=>{i===o.type&&n.addMark(r,r+t.nodeSize,i.create(dt(o.attrs,e)))}))}))})),!0)},pt=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),ht=()=>({tr:t,dispatch:e})=>{if(e){const e=new s.C1(t.doc);t.setSelection(e)}return!0},mt=()=>({state:t,dispatch:e})=>(0,o._M)(t,e),ft=()=>({state:t,dispatch:e})=>(0,o.o)(t,e),gt=()=>({state:t,dispatch:e})=>(0,o.N0)(t,e),vt=()=>({state:t,dispatch:e})=>(0,o.nw)(t,e),yt=()=>({state:t,dispatch:e})=>(0,o.U9)(t,e);function bt(t,e,n={},r={}){return W(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var kt=(t,{errorOnInvalidContent:e,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:o,tr:s,dispatch:i,commands:a})=>{const{doc:c}=s;if("full"!==r.preserveWhitespace){const a=bt(t,o.schema,r,{errorOnInvalidContent:null!=e?e:o.options.enableContentCheck});return i&&s.replaceWith(0,c.content.size,a).setMeta("preventUpdate",!n),!0}return i&&s.setMeta("preventUpdate",!n),a.insertContentAt({from:0,to:c.content.size},t,{parseOptions:r,errorOnInvalidContent:null!=e?e:o.options.enableContentCheck})};function wt(t,e){const n=I(e,t.schema),{from:r,to:o,empty:s}=t.selection,i=[];s?(t.storedMarks&&i.push(...t.storedMarks),i.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,o,(t=>{i.push(...t.marks)}));const a=i.find((t=>t.type.name===n.name));return a?{...a.attrs}:{}}function xt(t,e){const n=new r.wx(t);return e.forEach((t=>{t.steps.forEach((t=>{n.step(t)}))})),n}function Mt(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,((t,e)=>{n(t)&&r.push({node:t,pos:e})})),r}function Et(t){return e=>function(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}(e.$from,t)}function St(t,e,n){if(void 0===t.config[e]&&t.parent)return St(t.parent,e,n);if("function"===typeof t.config[e]){return t.config[e].bind({...n,parent:t.parent?St(t.parent,e,n):null})}return t.config[e]}function $t(t){return t.map((t=>{const e=St(t,"addExtensions",{name:t.name,options:t.options,storage:t.storage});return e?[t,...$t(e())]:t})).flat(10)}function Ct(t,e){const n=i.PW.fromSchema(e).serializeFragment(t),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(n),r.innerHTML}function Ot(t){return"function"===typeof t}function Tt(t,e,...n){return Ot(t)?e?t.bind(e)(...n):t(...n):t}function At(t){return{baseExtensions:t.filter((t=>"extension"===t.type)),nodeExtensions:t.filter((t=>"node"===t.type)),markExtensions:t.filter((t=>"mark"===t.type))}}function Pt(t){const e=[],{nodeExtensions:n,markExtensions:r}=At(t),o=[...n,...r],s={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return t.forEach((t=>{const n=St(t,"addGlobalAttributes",{name:t.name,options:t.options,storage:t.storage,extensions:o});if(!n)return;n().forEach((t=>{t.types.forEach((n=>{Object.entries(t.attributes).forEach((([t,r])=>{e.push({type:n,name:t,attribute:{...s,...r}})}))}))}))})),o.forEach((t=>{const n={name:t.name,options:t.options,storage:t.storage},r=St(t,"addAttributes",n);if(!r)return;const o=r();Object.entries(o).forEach((([n,r])=>{const o={...s,...r};"function"===typeof(null==o?void 0:o.default)&&(o.default=o.default()),(null==o?void 0:o.isRequired)&&void 0===(null==o?void 0:o.default)&&delete o.default,e.push({type:t.name,name:n,attribute:o})}))})),e}function jt(...t){return t.filter((t=>!!t)).reduce(((t,e)=>{const n={...t};return Object.entries(e).forEach((([t,e])=>{if(n[t])if("class"===t){const r=e?String(e).split(" "):[],o=n[t]?n[t].split(" "):[],s=r.filter((t=>!o.includes(t)));n[t]=[...o,...s].join(" ")}else if("style"===t){const r=e?e.split(";").map((t=>
1t.trim())).filter(Boolean):[],o=n[t]?n[t].split(";").map((t=>t.trim())).filter(Boolean):[],s=new Map;o.forEach((t=>{const[e,n]=t.split(":").map((t=>t.trim()));s.set(e,n)})),r.forEach((t=>{const[e,n]=t.split(":").map((t=>t.trim()));s.set(e,n)})),n[t]=Array.from(s.entries()).map((([t,e])=>`${t}: ${e}`)).join("; ")}else n[t]=e;else n[t]=e})),n}),{})}function It(t,e){return e.filter((e=>e.type===t.type.name)).filter((t=>t.attribute.rendered)).map((e=>e.attribute.renderHTML?e.attribute.renderHTML(t.attrs)||{}:{[e.name]:t.attrs[e.name]})).reduce(((t,e)=>jt(t,e)),{})}function Nt(t,e){return"style"in t?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(!1===r)return!1;const o=e.reduce(((t,e)=>{const r=e.attribute.parseHTML?e.attribute.parseHTML(n):function(t){return"string"!==typeof t?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):"true"===t||"false"!==t&&t}(n.getAttribute(e.name));return null===r||void 0===r?t:{...t,[e.name]:r}}),{});return{...r,...o}}}}function Bt(t){return Object.fromEntries(Object.entries(t).filter((([t,e])=>("attrs"!==t||!function(t={}){return 0===Object.keys(t).length&&t.constructor===Object}(e))&&(null!==e&&void 0!==e))))}function Rt(t,e){var n;const r=Pt(t),{nodeExtensions:o,markExtensions:s}=At(t),a=null==(n=o.find((t=>St(t,"topNode"))))?void 0:n.name,c=Object.fromEntries(o.map((n=>{const o=r.filter((t=>t.type===n.name)),s={name:n.name,options:n.options,storage:n.storage,editor:e},i=Bt({...t.reduce(((t,e)=>{const r=St(e,"extendNodeSchema",s);return{...t,...r?r(n):{}}}),{}),content:Tt(St(n,"content",s)),marks:Tt(St(n,"marks",s)),group:Tt(St(n,"group",s)),inline:Tt(St(n,"inline",s)),atom:Tt(St(n,"atom",s)),selectable:Tt(St(n,"selectable",s)),draggable:Tt(St(n,"draggable",s)),code:Tt(St(n,"code",s)),whitespace:Tt(St(n,"whitespace",s)),linebreakReplacement:Tt(St(n,"linebreakReplacement",s)),defining:Tt(St(n,"defining",s)),isolating:Tt(St(n,"isolating",s)),attrs:Object.fromEntries(o.map((t=>{var e,n;return[t.name,{default:null==(e=null==t?void 0:t.attribute)?void 0:e.default,validate:null==(n=null==t?void 0:t.attribute)?void 0:n.validate}]})))}),a=Tt(St(n,"parseHTML",s));a&&(i.parseDOM=a.map((t=>Nt(t,o))));const c=St(n,"renderHTML",s);c&&(i.toDOM=t=>c({node:t,HTMLAttributes:It(t,o)}));const l=St(n,"renderText",s);return l&&(i.toText=l),[n.name,i]}))),l=Object.fromEntries(s.map((n=>{const o=r.filter((t=>t.type===n.name)),s={name:n.name,options:n.options,storage:n.storage,editor:e},i=Bt({...t.reduce(((t,e)=>{const r=St(e,"extendMarkSchema",s);return{...t,...r?r(n):{}}}),{}),inclusive:Tt(St(n,"inclusive",s)),excludes:Tt(St(n,"excludes",s)),group:Tt(St(n,"group",s)),spanning:Tt(St(n,"spanning",s)),code:Tt(St(n,"code",s)),attrs:Object.fromEntries(o.map((t=>{var e,n;return[t.name,{default:null==(e=null==t?void 0:t.attribute)?void 0:e.default,validate:null==(n=null==t?void 0:t.attribute)?void 0:n.validate}]})))}),a=Tt(St(n,"parseHTML",s));a&&(i.parseDOM=a.map((t=>Nt(t,o))));const c=St(n,"renderHTML",s);return c&&(i.toDOM=t=>c({mark:t,HTMLAttributes:It(t,o)})),[n.name,i]})));return new i.V_({topNode:a,nodes:c,marks:l})}function zt(t){return t.sort(((t,e)=>{const n=St(t,"priority")||100,r=St(e,"priority")||100;return n>r?-1:n<r?1:0}))}function Dt(t){const e=zt($t(t)),n=function(t){const e=t.filter(((e,n)=>t.indexOf(e)!==n));return Array.from(new Set(e))}(e.map((t=>t.name)));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map((t=>`'${t}'`)).join(", ")}]. This can lead to issues.`),e}function Vt(t,e){return Rt(Dt(t),e)}function Lt(t,e){const n=Vt(e);return Ct(i.NB.fromJSON(n,t).content,n)}function _t(t,e,n){const{from:r,to:o}=e,{blockSeparator:s="\n\n",textSerializers:i={}}=n||{};let a="";return t.nodesBetween(r,o,((t,n,c,l)=>{var d;t.isBlock&&n>r&&(a+=s);const u=null==i?void 0:i[t.type.name];if(u)return c&&(a+=u({node:t,pos:n,parent:c,index:l,range:e})),!1;t.isText&&(a+=null==(d=null==t?void 0:t.text)?void 0:d.slice(Math.max(r,n)-n,o-n))})),a}function Ht(t,e){return _t(t,{from:0,to:t.content.size},e)}function Ft(t){return Object.fromEntries(Object.entries(t.nodes).filter((([,t])=>t.spec.toText)).map((([t,e])=>[t,e.spec.toText])))}
1function Ut(t,e,n){const{blockSeparator:r="\n\n",textSerializers:o={}}=n||{},s=Vt(e);return Ht(i.NB.fromJSON(s,t),{blockSeparator:r,textSerializers:{...Ft(s),...o}})}function qt(t,e){const n=lt("string"===typeof e?e:e.name,t.schema);return"node"===n?function(t,e){const n=x(e,t.schema),{from:r,to:o}=t.selection,s=[];t.doc.nodesBetween(r,o,(t=>{s.push(t)}));const i=s.reverse().find((t=>t.type.name===n.name));return i?{...i.attrs}:{}}(t,e):"mark"===n?wt(t,e):{}}function Wt(t){const e=function(t,e=JSON.stringify){const n={};return t.filter((t=>{const r=e(t);return!Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=!0)}))}(t);return 1===e.length?e:e.filter(((t,n)=>!e.filter(((t,e)=>e!==n)).some((e=>t.oldRange.from>=e.oldRange.from&&t.oldRange.to<=e.oldRange.to&&t.newRange.from>=e.newRange.from&&t.newRange.to<=e.newRange.to))))}function Jt(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach(((t,o)=>{const s=[];if(t.ranges.length)t.forEach(((t,e)=>{s.push({from:t,to:e})}));else{const{from:t,to:e}=n[o];if(void 0===t||void 0===e)return;s.push({from:t,to:e})}s.forEach((({from:t,to:n})=>{const s=e.slice(o).map(t,-1),i=e.slice(o).map(n),a=e.invert().map(s,-1),c=e.invert().map(i);r.push({oldRange:{from:a,to:c},newRange:{from:s,to:i}})}))})),Wt(r)}function Yt(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach((e=>{const o=j(n.resolve(t),e.type);o&&r.push({mark:e,...o})})):n.nodesBetween(t,e,((t,e)=>{t&&void 0!==(null==t?void 0:t.nodeSize)&&r.push(...t.marks.map((n=>({from:e,to:e+t.nodeSize,mark:n}))))})),r}var Kt=(t,e,n,r=20)=>{const o=t.doc.resolve(n);let s=r,i=null;for(;s>0&&null===i;){const t=o.node(s);(null==t?void 0:t.type.name)===e?i=t:s-=1}return[i,s]};function Qt(t,e){return e.nodes[t]||e.marks[t]||null}function Zt(t,e,n){return Object.fromEntries(Object.entries(n).filter((([n])=>{const r=t.find((t=>t.type===e&&t.name===n));return!!r&&r.attribute.keepOnSplit})))}function Gt(t,e,n={}){const{empty:r,ranges:o}=t.selection,s=e?I(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter((t=>!s||s.name===t.type.name)).find((t=>T(t.attrs,n,{strict:!1})));let i=0;const a=[];if(o.forEach((({$from:e,$to:n})=>{const r=e.pos,o=n.pos;t.doc.nodesBetween(r,o,((t,e)=>{if(!t.isText&&!t.marks.length)return;const n=Math.max(r,e),s=Math.min(o,e+t.nodeSize);i+=s-n,a.push(...t.marks.map((t=>({mark:t,from:n,to:s}))))}))})),0===i)return!1;const c=a.filter((t=>!s||s.name===t.mark.type.name)).filter((t=>T(t.mark.attrs,n,{strict:!1}))).reduce(((t,e)=>t+e.to-e.from),0),l=a.filter((t=>!s||t.mark.type!==s&&t.mark.type.excludes(s))).reduce(((t,e)=>t+e.to-e.from),0);return(c>0?c+l:c)>=i}var Xt=(t,e)=>{const{$from:n,$to:r,$anchor:o}=t.selection;if(e){const n=Et((t=>t.type.name===e))(t.selection);if(!n)return!1;const r=t.doc.resolve(n.pos+1);return o.pos+1===r.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},te=t=>{const{$from:e,$to:n}=t.selection;return!(e.parentOffset>0||e.pos!==n.pos)};function ee(t,e){return Array.isArray(e)?e.some((e=>("string"===typeof e?e:e.name)===t.name)):e}function ne(t,e){const{nodeExtensions:n}=At(e),r=n.find((e=>e.name===t));if(!r)return!1;const o=Tt(St(r,"group",{name:r.name,options:r.options,storage:r.storage}));return"string"===typeof o&&o.split(" ").includes("list")}function re(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if("hardBreak"===t.type.name)return!0;if(t.isText)return/^\s*$/m.test(null!=(r=t.text)?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(0===t.content.childCount)return!0;if(e){let r=!0;return t.content.forEach((t=>{!1!==r&&(re(t,{ignoreWhitespace:n,checkChildren:e})||(r=!1))})),r}return!1}function oe(t){return t instanceof s.qv}function se(t,e,n){const r=t.state.doc.content.size,o=z(e,0,r),s=z(n,0,r),i=t.coordsAtPos(o),a=t.coordsAtPos(s,-1),c=Math.min(i.top,a.top),l=Math.max(i.bottom,a.bottom),d=Math.min(i.left,a.left),u=Math.max(i.right,a.right),p={top:c,bottom:l,left:d,right:u,width:u-d,height:l-c,x:d,y:c};return{...p,toJSON:()=>p}}var ie=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const{selection:s}=n,{empty:i,ranges:a}=s,c=I(t,r.schema);if(o)if(i){const t=wt(r,c);n.addStoredMark(c.create({...t,...e}))}else a.forEach((t=>{const o=t.$from.pos,s=t.$to.pos;r.doc.nodesBetween(o,s,((t,r)=>{const i=Math.max(r,o),a=Math.min(r+t.nodeSize,s);t.marks.find((t=>t.type===c))?t.marks.forEach((t=>{c===t.type&&n.addMark(i,a,c.create({...t.attrs,...e}))})):n.addMark(i,a,c.create(e))}))}));return function(t,e,n){var r;const{selection:o}=e;let s=null;if(R(o)&&(s=o.$cursor),s){const e=null!=(r=t.storedMarks)?r:s.marks();return s.parent.type.allowsMarkType(n)&&(!!n.isInSet(e)||!e.some((t=>t.type.excludes(n))))}const{ranges:i}=o;return i.some((({$from:e,$to:r})=>{let o=0===e.depth&&t.doc.inlineContent&&t.doc.type.allowsMarkType(n);return t.doc.nodesBetween(e.pos,r.pos,((t,e,r)=>{if(o)return!1;if(t.isInline){const e=!r||r.type.allowsMarkType(n),s=!!n.isInSet(t.marks)||!t.marks.some((t=>t.type.excludes(n)));o=e&&s}return!o})),o}))}(r,n,c)},ae=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),ce=(t,e={})=>({state:n,dispatch:r,chain:s})=>{const i=x(t,n.schema);let a;return n.selection.$anchor.sameParent(n.selection.$head)&&(a=n.selection.$anchor.parent.attrs),i.isTextblock?s().command((({commands:t})=>!!(0,o.uJ)(i,{...a,...e})(n)||t.clearNodes())).command((({state:t})=>(0,o.uJ)(i,{...a,...e})(t,r))).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},le=t=>({tr:e,dispatch:n})=>{if(n){const{doc:n}=e,r=z(t,0,n.content.size),o=s.qv.create(n,r);e.setSelection(o)}return!0},de=t=>({tr:e,dispatch:n})=>{if(n){const{doc:n}=e,{from:r,to:o}="number"===typeof t?{from:t,to:t}:t,i=s.Bs.atStart(n).from,a=s.Bs.atEnd(n).to,c=z(r,i,a),l=z(o,i,a),d=s.Bs.create(n,c,l);e.setSelection(d)}return!0},ue=t=>({state:e,dispatch:n})=>{const r=x(t,e.schema);return(0,a.bw)(r)(e,n)};function pe(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter((t=>null==e?void 0:e.includes(t.type.name)));t.tr.ensureMarks(r)}}var he=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:o,editor:i})=>{const{selection:a,doc:c}=e,{$from:l,$to:d}=a,u=Zt(i.extensionManager.attributes,l.node().type.name,l.node().attrs);if(a instanceof s.qv&&a.node.isBlock)return!(!l.parentOffset||!(0,r.Ax)(c,l.pos))&&(o&&(t&&pe(n,i.extensionManager.splittableMarks),e.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;const p=d.parentOffset===d.parent.content.size,h=0===l.depth?void 0:function(t){for(let e=0;e<t.edgeCount;e+=1){const{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}(l.node(-1).contentMatchAt(l.indexAfter(-1)));let m=p&&h?[{type:h,attrs:u}]:void 0,f=(0,r.Ax)(e.doc,e.mapping.map(l.pos),1,m);if(m||f||!(0,r.Ax)(e.doc,e.mapping.map(l.pos),1,h?[{type:h}]:void 0)||(f=!0,m=h?[{type:h,attrs:u}]:void 0),o){if(f&&(a instanceof s.Bs&&e.deleteSelection(),e.split(e.mapping.map(l.pos),1,m),h&&!p&&!l.parentOffset&&l.parent.type!==h)){const t=e.mapping.map(l.before()),n=e.doc.resolve(t);l.node(-1).canReplaceWith(n.index(),n.index()+1,h)&&e.setNodeMarkup(e.mapping.map(l.before()),h)}t&&pe(n,i.extensionManager.splittableMarks),e.scrollIntoView()}return f},me=(t,e={})=>({tr:n,state:o,dispatch:a,editor:c})=>{var l;const d=x(t,o.schema),{$from:u,$to:p}=o.selection,h=o.selection.node;
1if(h&&h.isBlock||u.depth<2||!u.sameParent(p))return!1;const m=u.node(-1);if(m.type!==d)return!1;const f=c.extensionManager.attributes;if(0===u.parent.content.size&&u.node(-1).childCount===u.indexAfter(-1)){if(2===u.depth||u.node(-3).type!==d||u.index(-2)!==u.node(-2).childCount-1)return!1;if(a){let t=i.HY.empty;const r=u.index(-1)?1:u.index(-2)?2:3;for(let e=u.depth-r;e>=u.depth-3;e-=1)t=i.HY.from(u.node(e).copy(t));const o=u.indexAfter(-1)<u.node(-2).childCount?1:u.indexAfter(-2)<u.node(-3).childCount?2:3,a={...Zt(f,u.node().type.name,u.node().attrs),...e},c=(null==(l=d.contentMatch.defaultType)?void 0:l.createAndFill(a))||void 0;t=t.append(i.HY.from(d.createAndFill(null,c)||void 0));const p=u.before(u.depth-(r-1));n.replace(p,u.after(-o),new i.p2(t,4-r,0));let h=-1;n.doc.nodesBetween(p,n.doc.content.size,((t,e)=>{if(h>-1)return!1;t.isTextblock&&0===t.content.size&&(h=e+1)})),h>-1&&n.setSelection(s.Bs.near(n.doc.resolve(h))),n.scrollIntoView()}return!0}const g=p.pos===u.end()?m.contentMatchAt(0).defaultType:null,v={...Zt(f,m.type.name,m.attrs),...e},y={...Zt(f,u.node().type.name,u.node().attrs),...e};n.delete(u.pos,p.pos);const b=g?[{type:d,attrs:v},{type:g,attrs:y}]:[{type:d,attrs:v}];if(!(0,r.Ax)(n.doc,u.pos,2))return!1;if(a){const{selection:t,storedMarks:e}=o,{splittableMarks:r}=c.extensionManager,s=e||t.$to.parentOffset&&t.$from.marks();if(n.split(u.pos,2,b).scrollIntoView(),!s||!a)return!0;const i=s.filter((t=>r.includes(t.type.name)));n.ensureMarks(i)}return!0},fe=(t,e)=>{const n=Et((t=>t.type===e))(t.selection);if(!n)return!0;const o=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(void 0===o)return!0;const s=t.doc.nodeAt(o);return n.node.type!==(null==s?void 0:s.type)||!(0,r.Mn)(t.doc,n.pos)||(t.join(n.pos),!0)},ge=(t,e)=>{const n=Et((t=>t.type===e))(t.selection);if(!n)return!0;const o=t.doc.resolve(n.start).after(n.depth);if(void 0===o)return!0;const s=t.doc.nodeAt(o);return n.node.type!==(null==s?void 0:s.type)||!(0,r.Mn)(t.doc,o)||(t.join(o),!0)},ve=(t,e,n,r={})=>({editor:o,tr:s,state:i,dispatch:a,chain:c,commands:l,can:d})=>{const{extensions:u,splittableMarks:p}=o.extensionManager,h=x(t,i.schema),m=x(e,i.schema),{selection:f,storedMarks:g}=i,{$from:v,$to:y}=f,b=v.blockRange(y),k=g||f.$to.parentOffset&&f.$from.marks();if(!b)return!1;const w=Et((t=>ne(t.type.name,u)))(f);if(b.depth>=1&&w&&b.depth-w.depth<=1){if(w.node.type===h)return l.liftListItem(m);if(ne(w.node.type.name,u)&&h.validContent(w.node.content)&&a)return c().command((()=>(s.setNodeMarkup(w.pos,h),!0))).command((()=>fe(s,h))).command((()=>ge(s,h))).run()}return n&&k&&a?c().command((()=>{const t=d().wrapInList(h,r),e=k.filter((t=>p.includes(t.type.name)));return s.ensureMarks(e),!!t||l.clearNodes()})).wrapInList(h,r).command((()=>fe(s,h))).command((()=>ge(s,h))).run():c().command((()=>!!d().wrapInList(h,r)||l.clearNodes())).wrapInList(h,r).command((()=>fe(s,h))).command((()=>ge(s,h))).run()},ye=(t,e={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:s=!1}=n,i=I(t,r.schema);return Gt(r,i,e)?o.unsetMark(i,{extendEmptyMarkRange:s}):o.setMark(i,e)},be=(t,e,n={})=>({state:r,commands:o})=>{const s=x(t,r.schema),i=x(e,r.schema),a=ot(r,s,n);let c;return r.selection.$anchor.sameParent(r.selection.$head)&&(c=r.selection.$anchor.parent.attrs),a?o.setNode(i,c):o.setNode(s,{...c,...n})},ke=(t,e={})=>({state:n,commands:r})=>{const o=x(t,n.schema);return ot(n,o,e)?r.lift(o):r.wrapIn(o,e)},we=()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const o=n[r];let s;if(o.spec.isInputRules&&(s=o.getState(t))){if(e){const e=t.tr,n=s.transform;for(let t=n.steps.length-1;t>=0;t-=1)e.step(n.steps[t].invert(n.docs[t]));if(s.text){const n=e.doc.resolve(s.from).marks();e.replaceWith(s.from,s.to,t.schema.text(s.text,n))}else e.delete(s.from,s.to)}return!0}}return!1},xe=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:r,ranges:o}=n;return r||e&&o.forEach((e=>{t.removeMark(e.$from.pos,e.$to.pos)})),!0},Me=(t,e={})=>({tr:n,state:r,dispatch:o})=>{var s;const{extendEmptyMarkRange:i=!1}=e,{selection:a}=n,c=I(t,r.schema),{$from:l,empty:d,ranges:u}=a;if(!o)return!0;
1if(d&&i){let{from:t,to:e}=a;const r=null==(s=l.marks().find((t=>t.type===c)))?void 0:s.attrs,o=j(l,c,r);o&&(t=o.from,e=o.to),n.removeMark(t,e,c)}else u.forEach((t=>{n.removeMark(t.$from.pos,t.$to.pos,c)}));return n.removeStoredMark(c),!0},Ee=(t,e={})=>({tr:n,state:r,dispatch:o})=>{let s=null,i=null;const a=lt("string"===typeof t?t:t.name,r.schema);return!!a&&("node"===a&&(s=x(t,r.schema)),"mark"===a&&(i=I(t,r.schema)),o&&n.selection.ranges.forEach((t=>{const o=t.$from.pos,a=t.$to.pos;let c,l,d,u;n.selection.empty?r.doc.nodesBetween(o,a,((t,e)=>{s&&s===t.type&&(d=Math.max(e,o),u=Math.min(e+t.nodeSize,a),c=e,l=t)})):r.doc.nodesBetween(o,a,((t,r)=>{r<o&&s&&s===t.type&&(d=Math.max(r,o),u=Math.min(r+t.nodeSize,a),c=r,l=t),r>=o&&r<=a&&(s&&s===t.type&&n.setNodeMarkup(r,void 0,{...t.attrs,...e}),i&&t.marks.length&&t.marks.forEach((s=>{if(i===s.type){const c=Math.max(r,o),l=Math.min(r+t.nodeSize,a);n.addMark(c,l,i.create({...s.attrs,...e}))}})))})),l&&(void 0!==c&&n.setNodeMarkup(c,void 0,{...l.attrs,...e}),i&&l.marks.length&&l.marks.forEach((t=>{i===t.type&&n.addMark(d,u,i.create({...t.attrs,...e}))})))})),!0)},Se=(t,e={})=>({state:n,dispatch:r})=>{const s=x(t,n.schema);return(0,o.ym)(s,e)(n,r)},$e=(t,e={})=>({state:n,dispatch:r})=>{const o=x(t,n.schema);return(0,a.KI)(o,e)(n,r)},Ce=class{constructor(t){var e;this.find=t.find,this.handler=t.handler,this.undoable=null==(e=t.undoable)||e}};function Oe(t){var e;const{editor:n,from:r,to:o,text:s,rules:i,plugin:a}=t,{view:c}=n;if(c.composing)return!1;const l=c.state.doc.resolve(r);if(l.parent.type.spec.code||(null==(e=l.nodeBefore||l.nodeAfter)?void 0:e.marks.find((t=>t.type.spec.code))))return!1;let d=!1;const u=((t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,((t,e,o,s)=>{var i,a;const c=(null==(a=(i=t.type.spec).toText)?void 0:a.call(i,{node:t,pos:e,parent:o,index:s}))||t.textContent||"%leaf%";n+=t.isAtom&&!t.isText?c:c.slice(0,Math.max(0,r-e))})),n})(l)+s;return i.forEach((t=>{if(d)return;const e=((t,e)=>{if(O(e))return e.exec(t);const n=e(t);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=t,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r})(u,t.find);if(!e)return;const i=c.state.tr,l=p({state:c.state,transaction:i}),m={from:r-(e[0].length-s.length),to:o},{commands:f,chain:g,can:v}=new h({editor:n,state:l});null!==t.handler({state:l,range:m,match:e,commands:f,chain:g,can:v})&&i.steps.length&&(t.undoable&&i.setMeta(a,{transform:i,from:r,to:o,text:s}),c.dispatch(i),d=!0)})),d}function Te(t){return"Object"===function(t){return Object.prototype.toString.call(t).slice(8,-1)}(t)&&(t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype)}function Ae(t,e){const n={...t};return Te(t)&&Te(e)&&Object.keys(e).forEach((r=>{Te(e[r])&&Te(t[r])?n[r]=Ae(t[r],e[r]):n[r]=e[r]})),n}var Pe=class{constructor(t={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...t},this.name=this.config.name}get options(){return{...Tt(St(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...Tt(St(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(t={}){const e=this.extend({...this.config,addOptions:()=>Ae(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){const e=new this.constructor({...this.config,...t});return e.parent=this,this.child=e,e.name="name"in t?t.name:e.parent.name,e}},je=class t extends Pe{constructor(){super(...arguments),this.type="mark"}static create(e={}){const n="function"===typeof e?e():e;return new t(n)}static handleExit({editor:t,mark:e}){const{tr:n}=t.state,r=t.state.selection.$from;if(r.pos===r.end()){const o=r.marks();if(!!!o.find((t=>(null==t?void 0:t.type.name)===e.name)))return!1;const s=o.find((t=>(null==t?void 0:t.type.name)===e.name));return s&&n.removeStoredMark(s),n.insertText(" ",r.pos),t.view.dispatch(n),!0}return!1}configure(t){return super.configure(t)}extend(t){const e="function"===typeof t?t():t;return super.extend(e)}};var Ie=class{constructor(t){this.find=t.find,this.handler=t.handler}};function Ne(t){const{editor:e,state:n,from:r,to:o,rule:s,pasteEvent:i,dropEvent:a}=t,{commands:c,chain:l,can:d}=new h({editor:e,state:n}),u=[];n.doc.nodesBetween(r,o,((t,e)=>{var p,h,m,f,g;if((null==(h=null==(p=t.type)?void 0:p.spec)?void 0:h.code)||!(t.isText||t.isTextblock||t.isInline))return;const v=null!=(g=null!=(f=null==(m=t.content)?void 0:m.size)?f:t.no
1deSize)?g:0,y=Math.max(r,e),b=Math.min(o,e+v);if(y>=b)return;((t,e,n)=>{if(O(e))return[...t.matchAll(e)];const r=e(t,n);return r?r.map((e=>{const n=[e.text];return n.index=e.index,n.input=t,n.data=e.data,e.replaceWith&&(e.text.includes(e.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),n.push(e.replaceWith)),n})):[]})(t.isText?t.text||"":t.textBetween(y-e,b-e,void 0,"\ufffc"),s.find,i).forEach((t=>{if(void 0===t.index)return;const e=y+t.index+1,r=e+t[0].length,o={from:n.tr.mapping.map(e),to:n.tr.mapping.map(r)},p=s.handler({state:n,range:o,match:t,commands:c,chain:l,can:d,pasteEvent:i,dropEvent:a});u.push(p)}))}));return u.every((t=>null!==t))}var Be=null;function Re(t){const{editor:e,rules:n}=t;let r,o=null,a=!1,c=!1,l="undefined"!==typeof ClipboardEvent?new ClipboardEvent("paste"):null;try{r="undefined"!==typeof DragEvent?new DragEvent("drop"):null}catch{r=null}const d=({state:t,from:n,to:o,rule:s,pasteEvt:i})=>{const a=t.tr,c=p({state:t,transaction:a});if(Ne({editor:e,state:c,from:Math.max(n-1,0),to:o.b-1,rule:s,pasteEvent:i,dropEvent:r})&&a.steps.length){try{r="undefined"!==typeof DragEvent?new DragEvent("drop"):null}catch{r=null}return l="undefined"!==typeof ClipboardEvent?new ClipboardEvent("paste"):null,a}};return n.map((t=>new s.Sy({view(t){const n=n=>{var r;o=(null==(r=t.dom.parentElement)?void 0:r.contains(n.target))?t.dom.parentElement:null,o&&(Be=e)},r=()=>{Be&&(Be=null)};return window.addEventListener("dragstart",n),window.addEventListener("dragend",r),{destroy(){window.removeEventListener("dragstart",n),window.removeEventListener("dragend",r)}}},props:{handleDOMEvents:{drop:(t,e)=>{if(c=o===t.dom.parentElement,r=e,!c){const t=Be;(null==t?void 0:t.isEditable)&&setTimeout((()=>{const e=t.state.selection;e&&t.commands.deleteRange({from:e.from,to:e.to})}),10)}return!1},paste:(t,e)=>{var n;const r=null==(n=e.clipboardData)?void 0:n.getData("text/html");return l=e,a=!!(null==r?void 0:r.includes("data-pm-slice")),!1}}},appendTransaction:(e,n,r)=>{const o=e[0],s="paste"===o.getMeta("uiEvent")&&!a,u="drop"===o.getMeta("uiEvent")&&!c,p=o.getMeta("applyPasteRules"),h=!!p;if(!s&&!u&&!h)return;if(h){let{text:e}=p;e="string"===typeof e?e:Ct(i.HY.from(e),r.schema);const{from:n}=p,o=n+e.length,s=(t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return null==(e=n.clipboardData)||e.setData("text/html",t),n})(e);return d({rule:t,state:r,from:n,to:{b:o},pasteEvt:s})}const m=n.doc.content.findDiffStart(r.doc.content),f=n.doc.content.findDiffEnd(r.doc.content);return"number"===typeof m&&f&&m!==f.b?d({rule:t,state:r,from:m,to:f,pasteEvt:l}):void 0}})))}var ze=class{constructor(t,e){this.splittableMarks=[],this.editor=e,this.baseExtensions=t,this.extensions=Dt(t),this.schema=Rt(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce(((t,e)=>{const n=St(e,"addCommands",{name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:Qt(e.name,this.schema)});return n?{...t,...n()}:t}),{})}get plugins(){const{editor:t}=this;return zt([...this.extensions].reverse()).flatMap((e=>{const n={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:t,type:Qt(e.name,this.schema)},r=[],o=St(e,"addKeyboardShortcuts",n);let a={};if("mark"===e.type&&St(e,"exitable",n)&&(a.ArrowRight=()=>je.handleExit({editor:t,mark:e})),o){const e=Object.fromEntries(Object.entries(o()).map((([e,n])=>[e,()=>n({editor:t})])));a={...a,...e}}const c=(0,l.h)(a);r.push(c);const d=St(e,"addInputRules",n);if(ee(e,t.options.enableInputRules)&&d){const e=d();if(e&&e.length){const n=function(t){const{editor:e,rules:n}=t,r=new s.Sy({state:{init:()=>null,apply(t,o,s){const a=t.getMeta(r);if(a)return a;const c=t.getMeta("applyInputRules");return!!c&&setTimeout((()=>{let{text:t}=c;t="string"===typeof t?t:Ct(i.HY.from(t),s.schema);const{from:o}=c,a=o+t.length;Oe({editor:e,from:o,to:a,text:t,rules:n,plugin:r})})),t.selectionSet||t.docChanged?null:o}},props:{handleTextInput:(t,o,s,i)=>Oe({editor:e,from:o,to:s,text:i,rules:n,plugin:r}),handleDOMEvents:{compositionend:t=>(setTimeout((()=>
1{const{$cursor:o}=t.state.selection;o&&Oe({editor:e,from:o.pos,to:o.pos,text:"",rules:n,plugin:r})})),!1)},handleKeyDown(t,o){if("Enter"!==o.key)return!1;const{$cursor:s}=t.state.selection;return!!s&&Oe({editor:e,from:s.pos,to:s.pos,text:"\n",rules:n,plugin:r})}},isInputRules:!0});return r}({editor:t,rules:e}),o=Array.isArray(n)?n:[n];r.push(...o)}}const u=St(e,"addPasteRules",n);if(ee(e,t.options.enablePasteRules)&&u){const e=u();if(e&&e.length){const n=Re({editor:t,rules:e});r.push(...n)}}const p=St(e,"addProseMirrorPlugins",n);if(p){const t=p();r.push(...t)}return r}))}get attributes(){return Pt(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=At(this.extensions);return Object.fromEntries(e.filter((t=>!!St(t,"addNodeView"))).map((e=>{const n=this.attributes.filter((t=>t.type===e.name)),r={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:t,type:x(e.name,this.schema)},o=St(e,"addNodeView",r);if(!o)return[];return[e.name,(r,s,i,a,c)=>{const l=It(r,n);return o()({node:r,view:s,getPos:i,decorations:a,innerDecorations:c,editor:t,extension:e,HTMLAttributes:l})}]})))}get markViews(){const{editor:t}=this,{markExtensions:e}=At(this.extensions);return Object.fromEntries(e.filter((t=>!!St(t,"addMarkView"))).map((e=>{const n=this.attributes.filter((t=>t.type===e.name)),r={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:t,type:I(e.name,this.schema)},o=St(e,"addMarkView",r);if(!o)return[];return[e.name,(r,s,i)=>{const a=It(r,n);return o()({mark:r,view:s,inline:i,editor:t,extension:e,HTMLAttributes:a,updateAttributes:e=>{dn(r,t,e)}})}]})))}setupExtensions(){const t=this.extensions;this.editor.extensionStorage=Object.fromEntries(t.map((t=>[t.name,t.storage]))),t.forEach((t=>{var e;const n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:Qt(t.name,this.schema)};if("mark"===t.type){(null==(e=Tt(St(t,"keepOnSplit",n)))||e)&&this.splittableMarks.push(t.name)}const r=St(t,"onBeforeCreate",n),o=St(t,"onCreate",n),s=St(t,"onUpdate",n),i=St(t,"onSelectionUpdate",n),a=St(t,"onTransaction",n),c=St(t,"onFocus",n),l=St(t,"onBlur",n),d=St(t,"onDestroy",n);r&&this.editor.on("beforeCreate",r),o&&this.editor.on("create",o),s&&this.editor.on("update",s),i&&this.editor.on("selectionUpdate",i),a&&this.editor.on("transaction",a),c&&this.editor.on("focus",c),l&&this.editor.on("blur",l),d&&this.editor.on("destroy",d)}))}};ze.resolve=Dt,ze.sort=zt,ze.flatten=$t;u({},{ClipboardTextSerializer:()=>Ve,Commands:()=>Le,Delete:()=>_e,Drop:()=>He,Editable:()=>Fe,FocusEvents:()=>qe,Keymap:()=>We,Paste:()=>Je,Tabindex:()=>Ye,focusEventsPluginKey:()=>Ue});var De=class t extends Pe{constructor(){super(...arguments),this.type="extension"}static create(e={}){const n="function"===typeof e?e():e;return new t(n)}configure(t){return super.configure(t)}extend(t){const e="function"===typeof t?t():t;return super.extend(e)}},Ve=De.create({name:"clipboardTextSerializer",addOptions:()=>({blockSeparator:void 0}),addProseMirrorPlugins(){return[new s.Sy({key:new s.H$("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:o}=e,{ranges:s}=o,i=Math.min(...s.map((t=>t.$from.pos))),a=Math.max(...s.map((t=>t.$to.pos))),c=Ft(n);return _t(r,{from:i,to:a},{...void 0!==this.options.blockSeparator?{blockSeparator:this.options.blockSeparator}:{},textSerializers:c})}}})]}}),Le=De.create({name:"commands",addCommands:()=>({...m})}),_e=De.create({name:"delete",onUpdate({transaction:t,appendedTransactions:e}){var n,o,s;const i=()=>{var n,o,s,i;if(null!=(i=null==(s=null==(o=null==(n=this.editor.options.coreExtensionOptions)?void 0:n.delete)?void 0:o.filterTransaction)?void 0:s.call(o,t))?i:t.getMeta("y-sync$"))return;const a=xt(t.before,[t,...e]);Jt(a).forEach((e=>{a.mapping.mapResult(e.oldRange.from).deletedAfter&&a.mapping.mapResult(e.oldRange.to).deletedBefore&&a.before.nodesBetween(e.oldRange.from,e.oldRange.to,((n,r)=>{const o=r+n.nodeSize-2,s=e.oldRange.from<=r&&o<=e.oldRange.to;this.editor.emit("delete",{type:"node",node:n,from:r,to:o,newFrom:a.mapping.map(r),newTo:a.mapping.map(o),deletedRange:e.oldRange,newRange:e.newRange,partial:!s,editor:this.editor,transaction:t,combinedTransform:a})}))}));const c=a.mapping;a.steps.forEach(((e,n)=>{var o,s;if(e instanceof r.xu){const r=c.slice(n).map(e.from,-1),i=c.slice(n).map(e.to),l=c.invert().map(r,-1),d=c.invert().map(i),u=null==(o=a.doc.nodeAt(r-1))?void 0:o.marks.some((t=>t.eq(e.mark))),p=null==(s=a.doc.nodeAt(i))?void 0:s.marks.some((t=>t.eq(e.mark)));this.editor.emit("delete",{type:"mark",mark:e.mark,from:e.from,to:e.to,deletedRange:{from:l,to:d},newRange:{from:r,to:i},partial:Boolean(p||u),editor:this.editor,transaction:t,combinedTransform:a})}}))};null==(s=null==(o=null==(n=this.editor.options.coreExtensionOptions)?void 0:n.delete)?void 0:o.async)||s?setTimeout(i,0):i()}}),He=De.create({name:"drop",addProseMirrorPlugins(){return[new s.Sy({key:new s.H$("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>
1{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),Fe=De.create({name:"editable",addProseMirrorPlugins(){return[new s.Sy({key:new s.H$("editable"),props:{editable:()=>this.editor.options.editable}})]}}),Ue=new s.H$("focusEvents"),qe=De.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new s.Sy({key:Ue,props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),We=De.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first((({commands:t})=>[()=>t.undoInputRule(),()=>t.command((({tr:e})=>{const{selection:n,doc:r}=e,{empty:o,$anchor:i}=n,{pos:a,parent:c}=i,l=i.parent.isTextblock&&a>0?e.doc.resolve(a-1):i,d=l.parent.type.spec.isolating,u=i.pos-i.parentOffset,p=d&&1===l.parent.childCount?u===i.pos:s.Y1.atStart(r).from===a;return!(!o||!c.type.isTextblock||c.textContent.length||!p||p&&"paragraph"===i.parent.type.name)&&t.clearNodes()})),()=>t.deleteSelection(),()=>t.joinBackward(),()=>t.selectNodeBackward()])),e=()=>this.editor.commands.first((({commands:t})=>[()=>t.deleteSelection(),()=>t.deleteCurrentNode(),()=>t.joinForward(),()=>t.selectNodeForward()])),n={Enter:()=>this.editor.commands.first((({commands:t})=>[()=>t.newlineInCode(),()=>t.createParagraphNear(),()=>t.liftEmptyBlock(),()=>t.splitBlock()])),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},r={...n},o={...n,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return L()||nt()?o:r},addProseMirrorPlugins(){return[new s.Sy({key:new s.H$("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some((t=>t.getMeta("composition"))))return;const r=t.some((t=>t.docChanged))&&!e.doc.eq(n.doc),o=t.some((t=>t.getMeta("preventClearDocument")));if(!r||o)return;const{empty:i,from:a,to:c}=e.selection,l=s.Y1.atStart(e.doc).from,d=s.Y1.atEnd(e.doc).to;if(i||!(a===l&&c===d))return;if(!re(n.doc))return;const u=n.tr,m=p({state:n,transaction:u}),{commands:f}=new h({editor:this.editor,state:m});return f.clearNodes(),u.steps.length?u:void 0}})]}}),Je=De.create({name:"paste",addProseMirrorPlugins(){return[new s.Sy({key:new s.H$("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),Ye=De.create({name:"tabindex",addProseMirrorPlugins(){return[new s.Sy({key:new s.H$("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});var Ke=class extends class{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const n=this.callbacks[t];return n&&n.forEach((t=>t.apply(this,e))),this}off(t,e){const n=this.callbacks[t];return n&&(e?this.callbacks[t]=n.filter((t=>t!==e)):delete this.callbacks[t]),this}once(t,e){const n=(...r)=>{this.off(t,n),e.apply(this,r)};return this.on(t,n)}removeAllListeners(){this.callbacks={}}}{constructor(t={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:"undefined"!==typeof document?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:t})=>{throw t},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit
1("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",(({event:t,slice:e,moved:n})=>this.options.onDrop(t,e,n))),this.on("paste",(({event:t,slice:e})=>this.options.onPaste(t,e))),this.on("delete",this.options.onDelete);const e=this.createDoc(),n=D(e,this.options.autofocus);this.editorState=s.yy.create({doc:e,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}mount(t){if("undefined"===typeof document)throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(t),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout((()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)}),0)}unmount(){if(this.editorView){const t=this.editorView.dom;(null==t?void 0:t.editor)&&delete t.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{"function"===typeof this.css.remove?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(t){console.warn("Failed to remove CSS element:",t)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&"undefined"!==typeof document&&(this.css=function(t,e,n){const r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(null!==r)return r;const o=document.createElement("style");return e&&o.setAttribute("nonce",e),o.setAttribute("data-tiptap-style"+(n?`-${n}`:""),""),o.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(o),o}('.ProseMirror {\n  position: relative;\n}\n\n.ProseMirror {\n  word-wrap: break-word;\n  white-space: pre-wrap;\n  white-space: break-spaces;\n  -webkit-font-variant-ligatures: none;\n  font-variant-ligatures: none;\n  font-feature-settings: "liga" 0; /* the above doesn\'t seem to work in Edge */\n}\n\n.ProseMirror [contenteditable="false"] {\n  white-space: normal;\n}\n\n.ProseMirror [contenteditable="false"] [contenteditable="true"] {\n  white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n  white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n  display: inline !important;\n  border: none !important;\n  margin: 0 !important;\n  width: 0 !important;\n  height: 0 !important;\n}\n\n.ProseMirror-gapcursor {\n  display: none;\n  pointer-events: none;\n  position: absolute;\n  margin: 0;\n}
1\n\n.ProseMirror-gapcursor:after {\n  content: "";\n  display: block;\n  position: absolute;\n  top: -2px;\n  width: 20px;\n  border-top: 1px solid black;\n  animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n  to {\n    visibility: hidden;\n  }\n}\n\n.ProseMirror-hideselection *::selection {\n  background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n  background: transparent;\n}\n\n.ProseMirror-hideselection * {\n  caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n  display: block;\n}',this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},this.editorView&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,e=!0){this.setOptions({editable:t}),e&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:t=>{this.editorState=t},dispatch:t=>{this.dispatchTransaction(t)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(t,e)=>{if(this.editorView)return this.editorView[e];if("state"===e)return this.editorState;if(e in t)return Reflect.get(t,e);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${e}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(t,e){const n=Ot(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(t){if(this.isDestroyed)return;const e=this.state.plugins;let n=e;if([].concat(t).forEach((t=>{const e="string"===typeof t?`${t}$`:t.key;n=n.filter((t=>!t.key.startsWith(e)))})),e.length===n.length)return;const r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var t,e;const n=[...this.options.enableCoreExtensions?[Fe,Ve.configure({blockSeparator:null==(e=null==(t=this.options.coreExtensionOptions)?void 0:t.clipboardTextSerializer)?void 0:e.blockSeparator}),Le,qe,We,Ye,He,Je,_e].filter((t=>"object"!==typeof this.options.enableCoreExtensions||!1!==this.options.enableCoreExtensions[t.name])):[],...this.options.extensions].filter((t=>["extension","node","mark"].includes(null==t?void 0:t.type)));this.extensionManager=new ze(n,this)}createCommandManager(){this.commandManager=new h({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let t;try{t=bt(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(e){if(!(e instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(e.message))throw e;this.emit("contentError",{editor:this,error:e,disableCollaboration:()=>{"collaboration"in this.storage&&"object"===typeof this.storage.collaboration&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter((t=>"collaboration"!==t.name)),this.createExtensionManager()}}),t=bt(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return t}createView(t){var e;this.editorView=new c.tk(t,{...this.options.editorProps,attributes:{role:"textbox",...null==(e=this.options.editorProps)?void 0:e.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});const n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.prependClass(),this.injectCSS();this.view.dom.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction)return this.capturedTransaction?void t.steps.forEach((t=>{var e;return null==(e=this.capturedTransaction)?void 0:e.step(t)})):void(this.capturedTransaction=t);const{state:e,transactions:n}=this.state.applyTransaction(t),r=!this.state.selection.eq(e.selection),o=n.includes(t),s=this.state;
1if(this.emit("beforeTransaction",{editor:this,transaction:t,nextState:e}),!o)return;this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t,appendedTransactions:n.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:t});const i=n.findLast((t=>t.getMeta("focus")||t.getMeta("blur"))),a=null==i?void 0:i.getMeta("focus"),c=null==i?void 0:i.getMeta("blur");a&&this.emit("focus",{editor:this,event:a.event,transaction:i}),c&&this.emit("blur",{editor:this,event:c.event,transaction:i}),t.getMeta("preventUpdate")||!n.some((t=>t.docChanged))||s.doc.eq(e.doc)||this.emit("update",{editor:this,transaction:t,appendedTransactions:n.slice(1)})}getAttributes(t){return qt(this.state,t)}isActive(t,e){const n="string"===typeof t?t:null,r="string"===typeof t?e:t;return function(t,e,n={}){if(!e)return ot(t,null,n)||Gt(t,null,n);const r=lt(e,t.schema);return"node"===r?ot(t,e,n):"mark"===r&&Gt(t,e,n)}(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Ct(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:e="\n\n",textSerializers:n={}}=t||{};return Ht(this.state.doc,{blockSeparator:e,textSerializers:{...Ft(this.schema),...n}})}get isEmpty(){return re(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var t,e;return null==(e=null==(t=this.editorView)?void 0:t.isDestroyed)||e}$node(t,e){var n;return(null==(n=this.$doc)?void 0:n.querySelector(t,e))||null}$nodes(t,e){var n;return(null==(n=this.$doc)?void 0:n.querySelectorAll(t,e))||null}$pos(t){const e=this.state.doc.resolve(t);return new class t{constructor(t,e,n=!1,r=null){this.currentNode=null,this.actualDepth=null,this.isBlock=n,this.resolvedPos=t,this.editor=e,this.currentNode=r}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return null!=(t=this.actualDepth)?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let e=this.from,n=this.to;if(this.isBlock){if(0===this.content.size)return void console.error(`You can\u2019t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);e=this.from+1,n=this.to-1}this.editor.commands.insertContentAt({from:e,to:n},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(0===this.depth)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(e);return new t(n,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new t(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new t(e,this.editor)}get children(){const e=[];return this.node.content.forEach(((n,r)=>{const o=n.isBlock&&!n.isTextblock,s=n.isAtom&&!n.isText,i=this.pos+r+(s?0:1);if(i<0||i>this.resolvedPos.doc.nodeSize-2)return;const a=this.resolvedPos.doc.resolve(i);if(!o&&a.depth<=this.depth)return;const c=new t(a,this.editor,o,o?n:null);o&&(c.actualDepth=this.depth+1),e.push(new t(a,this.editor,o,o?n:null))})),e}get firstChild(){return this.children[0]||null}get lastChild(){const t=this.children;return t[t.length-1]||null}closest(t,e={}){let n=null,r=this.parent;for(;r&&!n;){if(r.node.type.name===t)if(Object.keys(e).length>0){const t=r.node.attrs,n=Object.keys(e);for(let r=0;r<n.length;r+=1){const o=n[r];if(t[o]!==e[o])break}}else n=r;r=r.parent}return n}querySelector(t,e={}){return this.querySelectorAll(t,e,!0)[0]||null}querySelectorAll(t,e={},n=!1){let r=[];if(!this.children||0===this.children.length)return r;const o=Object.keys(e);
1return this.children.forEach((s=>{n&&r.length>0||(s.node.type.name===t&&o.every((t=>e[t]===s.node.attrs[t]))&&r.push(s),n&&r.length>0||(r=r.concat(s.querySelectorAll(t,e,n))))})),r}setAttribute(t){const{tr:e}=this.editor.state;e.setNodeMarkup(this.from,void 0,{...this.node.attrs,...t}),this.editor.view.dispatch(e)}}(e,this)}get $doc(){return this.$pos(0)}};function Qe(t){return new Ce({find:t.find,handler:({state:e,range:n,match:r})=>{const o=Tt(t.getAttributes,void 0,r);if(!1===o||null===o)return null;const{tr:s}=e,i=r[r.length-1],a=r[0];if(i){const r=a.search(/\S/),c=n.from+a.indexOf(i),l=c+i.length;if(Yt(n.from,n.to,e.doc).filter((e=>e.mark.type.excluded.find((n=>n===t.type&&n!==e.mark.type)))).filter((t=>t.to>c)).length)return null;l<n.to&&s.delete(l,n.to),c>n.from&&s.delete(n.from+r,c);const d=n.from+r+i.length;s.addMark(n.from+r,d,t.type.create(o||{})),s.removeStoredMark(t.type)}},undoable:t.undoable})}function Ze(t){return new Ce({find:t.find,handler:({state:e,range:n,match:r})=>{const o=Tt(t.getAttributes,void 0,r)||{},{tr:s}=e,i=n.from;let a=n.to;const c=t.type.create(o);if(r[1]){let t=i+r[0].lastIndexOf(r[1]);t>a?t=a:a=t+r[1].length;const e=r[0][r[0].length-1];s.insertText(e,i+r[0].length-1),s.replaceWith(t,a,c)}else if(r[0]){const e=t.type.isInline?i:i-1;s.insert(e,t.type.create(o)).delete(s.mapping.map(i),s.mapping.map(a))}s.scrollIntoView()},undoable:t.undoable})}function Ge(t){return new Ce({find:t.find,handler:({state:e,range:n,match:o,chain:s})=>{const i=Tt(t.getAttributes,void 0,o)||{},a=e.tr.delete(n.from,n.to),c=a.doc.resolve(n.from).blockRange(),l=c&&(0,r.nd)(c,t.type,i);if(!l)return null;if(a.wrap(c,l),t.keepMarks&&t.editor){const{selection:n,storedMarks:r}=e,{splittableMarks:o}=t.editor.extensionManager,s=r||n.$to.parentOffset&&n.$from.marks();if(s){const t=s.filter((t=>o.includes(t.type.name)));a.ensureMarks(t)}}if(t.keepAttributes){const e="bulletList"===t.type.name||"orderedList"===t.type.name?"listItem":"taskList";s().updateAttributes(e,i).run()}const d=a.doc.resolve(n.from-1).nodeBefore;d&&d.type===t.type&&(0,r.Mn)(a.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(o,d))&&a.join(n.from-1)},undoable:t.undoable})}function Xe(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function tn(t){if(!(null==t?void 0:t.trim()))return{};const e={},n=[],r=t.replace(/["']([^"']*)["']/g,(t=>(n.push(t),`__QUOTED_${n.length-1}__`))),o=r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(o){const t=o.map((t=>t.trim().slice(1)));e.class=t.join(" ")}const s=r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);s&&(e.id=s[1]);Array.from(r.matchAll(/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g)).forEach((([,t,r])=>{var o;const s=parseInt((null==(o=r.match(/__QUOTED_(\d+)__/))?void 0:o[1])||"0",10),i=n[s];i&&(e[t]=i.slice(1,-1))}));const i=r.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();if(i){i.split(/\s+/).filter(Boolean).forEach((t=>
1{t.match(/^[a-zA-Z][\w-]*$/)&&(e[t]=!0)}))}return e}function en(t){if(!t||0===Object.keys(t).length)return"";const e=[];if(t.class){String(t.class).split(/\s+/).filter(Boolean).forEach((t=>e.push(`.${t}`)))}return t.id&&e.push(`#${t.id}`),Object.entries(t).forEach((([t,n])=>{"class"!==t&&"id"!==t&&(!0===n?e.push(t):!1!==n&&null!=n&&e.push(`${t}="${String(n)}"`))})),e.join(" ")}function nn(t){const{nodeName:e,name:n,parseAttributes:r=tn,serializeAttributes:o=en,defaultAttributes:s={},requiredAttributes:i=[],allowedAttributes:a}=t,c=n||e;return{parseMarkdown:(t,n)=>{const r={...s,...t.attributes};return n.createNode(e,r,[])},markdownTokenizer:{name:e,level:"block",start(t){var e;const n=new RegExp(`^:::${c}(?:\\s|$)`,"m"),r=null==(e=t.match(n))?void 0:e.index;return void 0!==r?r:-1},tokenize(t,n,o){const s=new RegExp(`^:::${c}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),a=t.match(s);if(!a)return;const l=a[1]||"",d=r(l);return i.find((t=>!(t in d)))?void 0:{type:e,raw:a[0],attributes:d}}},renderMarkdown:t=>{const e=(t=>{if(!a)return t;const e={};return a.forEach((n=>{n in t&&(e[n]=t[n])})),e})(t.attrs||{}),n=o(e);return`:::${c}${n?` {${n}}`:""} :::`}}}function rn(t){const{nodeName:e,name:n,getContent:r,parseAttributes:o=tn,serializeAttributes:s=en,defaultAttributes:i={},content:a="block",allowedAttributes:c}=t,l=n||e;return{parseMarkdown:(t,n)=>{let o;if(r){const e=r(t);o="string"===typeof e?[{type:"text",text:e}]:e}else o="block"===a?n.parseChildren(t.tokens||[]):n.parseInline(t.tokens||[]);const s={...i,...t.attributes};return n.createNode(e,s,o)},markdownTokenizer:{name:e,level:"block",start(t){var e;const n=new RegExp(`^:::${l}`,"m"),r=null==(e=t.match(n))?void 0:e.index;return void 0!==r?r:-1},tokenize(t,n,r){var s;const i=new RegExp(`^:::${l}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),c=t.match(i);if(!c)return;const[d,u=""]=c,p=o(u);let h=1;const m=d.length;let f="";const g=/^:::([\w-]*)(\s.*)?/gm,v=t.slice(m);for(g.lastIndex=0;;){const n=g.exec(v);if(null===n)break;const o=n.index,i=n[1];if(!(null==(s=n[2])?void 0:s.endsWith(":::")))if(i)h+=1;else if(h-=1,0===h){const s=v.slice(0,o);f=s.trim();const i=t.slice(0,m+o+n[0].length);let c=[];if(f)if("block"===a)for(c=r.blockTokens(s),c.forEach((t=>{!t.text||t.tokens&&0!==t.tokens.length||(t.tokens=r.inlineTokens(t.text))}));c.length>0;){const t=c[c.length-1];if("paragraph"!==t.type||t.text&&""!==t.text.trim())break;c.pop()}else c=r.inlineTokens(f);return{type:e,raw:i,attributes:p,content:f,tokens:c}}}}},renderMarkdown:(t,e)=>{const n=(t=>{if(!c)return t;const e={};return c.forEach((n=>{n in t&&(e[n]=t[n])})),e})(t.attrs||{}),r=s(n),o=r?` {${r}}`:"",i=e.renderChildren(t.content||[],"\n\n");return`:::${l}${o}\n\n${i}\n\n:::`}}}function on(t){if(!t.trim())return{};const e={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g;let r=n.exec(t);for(;null!==r;){const[,o,s,i]=r;e[o]=s||i,r=n.exec(t)}return e}function sn(t){return Object.entries(t).filter((([,t])=>void 0!==t&&null!==t)).map((([t,e])=>`${t}="${e}"`)).join(" ")}function an(t){const{nodeName:e,name:n,getContent:r,parseAttributes:o=on,serializeAttributes:s=sn,defaultAttributes:i={},selfClosing:a=!1,allowedAttributes:c}=t,l=n||e,d=l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(t,n)=>{const o={...i,...t.attributes};if(a)return n.createNode(e,o);const s=r?r(t):t.content||"";return s?n.createNode(e,o,[n.createTextNode(s)]):n.createNode(e,o,[])},markdownTokenizer:{name:e,level:"inline",start(t){const e=a?new RegExp(`\\[${d}\\s*[^\\]]*\\]`):new RegExp(`\\[${d}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${d}\\]`),n=t.match(e),r=null==n?void 0:n.index;return void 0!==r?r:-1},tokenize(t,n,r){const s=a?new RegExp(`^\\[${d}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${d}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${d}\\]`),i=t.match(s);if(!i)return;let c="",l="";if(a){const[,t]=i;l=t}else{const[,t,e]=i;l=t,c=e||""}const u=o(l.trim());return{type:e,raw:i[0],content:c.trim(),attributes:u}}},renderMarkdown:t=>{let e="";r?e=r(t):t.content&&t.content.length>0&&(e=t.content.filter((t=>"text"===t.type)).map((t=>t.text)).join(""));const n=(t=>{if(!c)return t;const e={};return c.forEach((n=>{n in t&&(e[n]=t[n])})),e})(t.attrs||{}),o=s(n),i=o?` ${o}`:"";return a?`[${l}${i}]`:`[${l}${i}]${e}[/${l}]`}}}function cn(t,e,n){var r,o,s,i;const a=t.split("\n"),c=[];let l="",d=0;const u=e.baseIndentSize||2;for(;d<a.length;){const t=a[d],p=t.match(e.itemPattern);if(!p){if(c.length>0)break;if(""===t.trim()){d+=1;continue}return}const h=e.extractItemData(p),{indentLevel:m,mainContent:f}=h;l=`${l}${t}\n`;const g=[f];for(d+=1;d<a.length;){const t=a[d];if(""===t.trim()){const e=a.slice(d+1).findIndex((t=>""!==t.trim()));if(-1===e)break;if(((null==(o=null==(r=a[d+1+e].match(/^(\s*)/))?void 0:r[1])?void 0:o.length)||0)>m){g.push(t),l=`${l}${t}\n`,d+=1;continue}break}if(!(((null==(i=null==(s=t.match(/^(\s*)/))?void 0:s[1])?void 0:i.length)||0)>m))break;g.push(t),l=`${l}${t}\n`,d+=1}let v;const y=g.slice(1);if(y.length>0){const t=y.map((t=>t.slice(m+u))).join("\n");t.trim()&&(v=e.customNestedParser?e.customNestedParser(t):n.blockTokens(t))}const b=e.createToken(h,v);c.push(b)}if(0!==c.length)return{items:c,raw:l.trim()}}function ln(t,e,n,r){if(!t||!Array.isArray(t.content))return"";const o="function"===typeof n?n(r):n,[s,...i]=t.content,a=[`${o}${e.renderChildren([s])}`];return i&&i.length>
10&&i.forEach((t=>{const n=e.renderChildren([t]);if(n){const t=n.split("\n").map((t=>t?e.indent(t):"")).join("\n");a.push(t)}})),a.join("\n")}function dn(t,e,n={}){const{state:r}=e,{doc:o,tr:s}=r,i=t;o.descendants(((e,r)=>{const o=s.mapping.map(r),a=s.mapping.map(r)+e.nodeSize;let c=null;if(e.marks.forEach((t=>{if(t!==i)return!1;c=t})),!c)return;let l=!1;if(Object.keys(n).forEach((t=>{n[t]!==c.attrs[t]&&(l=!0)})),l){const e=t.type.create({...t.attrs,...n});s.removeMark(o,a,t.type),s.addMark(o,a,e)}})),s.docChanged&&e.view.dispatch(s)}u({},{createAtomBlockMarkdownSpec:()=>nn,createBlockMarkdownSpec:()=>rn,createInlineMarkdownSpec:()=>an,parseAttributes:()=>tn,parseIndentedBlocks:()=>cn,renderNestedMarkdownContent:()=>ln,serializeAttributes:()=>en});var un=class t extends Pe{constructor(){super(...arguments),this.type="node"}static create(e={}){const n="function"===typeof e?e():e;return new t(n)}configure(t){return super.configure(t)}extend(t){const e="function"===typeof t?t():t;return super.extend(e)}};function pn(t){return new Ie({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:o})=>{const s=Tt(t.getAttributes,void 0,r,o);if(!1===s||null===s)return null;const{tr:i}=e,a=r[r.length-1],c=r[0];let l=n.to;if(a){const r=c.search(/\S/),o=n.from+c.indexOf(a),d=o+a.length;if(Yt(n.from,n.to,e.doc).filter((e=>e.mark.type.excluded.find((n=>n===t.type&&n!==e.mark.type)))).filter((t=>t.to>o)).length)return null;d<n.to&&i.delete(d,n.to),o>n.from&&i.delete(n.from+r,o),l=n.from+r+a.length,i.addMark(n.from+r,l,t.type.create(s||{})),i.removeStoredMark(t.type)}}})}}}]);

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.