vendor: 5,043 bytes, line 1
1import{N as P,w as he,m as A,M as ke,a as re,b as fe,P as z,c as _,T as te,t as Gt,S as Oe,n as Jr,d as Kr,i as Qn,e as un,f as Wr,g as Gr,h as Vr,j as qr,k as Xr,E as B,r as Yn,l as Vt,o as Qr,p as Yr,F as qt,q as Zr,s as Zn,u as es,v as Ln,x as ts,y as ns,z as er,D as Pe,A as xt,B as rs,C as ss,G as is,H as os,I as Cn}from"./index-DQXydRxi.js";var Ze=(t,e)=>{if(t==="slot")return 0;if(t instanceof Function)return t(e);const{children:n,...r}=e??{};if(t==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[t,r,n]};function tr(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let s=t.child(r),i=e.child(r);if(s==i){n+=s.nodeSize;continue}if(!s.sameMarkup(i))return n;if(s.isText&&s.text!=i.text){for(let o=0;s.text[o]==i.text[o];o++)n++;return n}if(s.content.size||i.content.size){let o=tr(s.content,i.content,n+1);if(o!=null)return o}n+=s.nodeSize}}function nr(t,e,n,r){for(let s=t.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:n,b:r};let o=t.child(--s),a=e.child(--i),l=o.nodeSize;if(o==a){n-=l,r-=l;continue}if(!o.sameMarkup(a))return{a:n,b:r};if(o.isText&&o.text!=a.text){let c=0,d=Math.min(o.text.length,a.text.length);for(;c<d&&o.text[o.text.length-c-1]==a.text[a.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(o.content.size||a.content.size){let c=nr(o.content,a.content,n-1,r-1);if(c)return c}n-=l,r-=l}}var G=class M{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,s=0,i){for(let o=0,a=0;a<n;o++){let l=this.content[o],c=a+l.nodeSize;if(c>e&&r(l,s+a,i||null,o)!==!1&&l.content.size){let d=a+1;l.nodesBetween(Math.max(0,e-d),Math.min(l.content.size,n-d),r,s+d)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,s){let i="",o=!0;return this.nodesBetween(e,n,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,n-l):a.isLeaf?s?typeof s=="function"?s(a):s:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(o?o=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,s=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(s[s.length-1]=n.withText(n.text+r.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new M(s,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],s=0;if(n>e)for(let i=0,o=0;o<n;i++){let a=this.content[i],l=o+a.nodeSize;l>e&&((o<e||l>n)&&(a.isText?a=a.cut(Math.max(0,e-o),Math.min(a.text.length,n-o)):a=a.cut(Math.max(0,e-o-1),Math.min(a.content.size,n-o-1))),r.push(a),s+=a.nodeSize),o=l}return new M(r,s)}cutByIndex(e,n){return e==n?M.empty:e==0&&n==this.content.length?this:new M(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let s=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return s[e]=n,new M(s,i)}addToStart(e){return new M([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new M(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let s=this.content[n];e(s,r,n),r+=s.nodeSize}}findDiffStart(e,n=0){return tr(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return nr(this,e,n,r)}findIndex(e){if(e==0)return _e(0,e);if(e==this.size)return _e(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let s=this.child(n),i=r+s.nodeSize;if(i>=e)return i==e?_e(n+1,i):_e(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return M.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return M.fromArray(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return M.empty;let n,r=0;for(let s=0;s<e.length;s++){let i=e[s];r+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(n||(n=e.slice(0,s)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new M(n||e,r)}static from(e){if(!e)return M.empty;if(e instanceof M)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new M([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};G.empty=new G([],0);var Pt={index:0,offset:0};function _e(t,e){return Pt.index=t,Pt.offset=e,Pt}
vendor: 18,062 bytes, line 1
1var as=class extends Error{},E=class ce{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=sr(this.content,e+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new ce(r,this.openStart,this.openEnd)}removeBetween(e,n){return new ce(rr(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return ce.empty;let r=n.openStart||0,s=n.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ce(G.fromJSON(e,n.content),r,s)}static maxOpen(e,n=!0){let r=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)s++;return new ce(e,r,s)}};E.empty=new E(G.empty,0,0);function rr(t,e,n){let{index:r,offset:s}=t.findIndex(e),i=t.maybeChild(r),{index:o,offset:a}=t.findIndex(n);if(s==e||i.isText){if(a!=n&&!t.child(o).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=o)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy(rr(i.content,e-s-1,n-s-1)))}function sr(t,e,n,r,s,i){let{index:o,offset:a}=t.findIndex(e),l=t.maybeChild(o);if(a==e||l.isText)return i&&r<=0&&s<=0&&!i.canReplace(o,o,n)?null:t.cut(0,e).append(n).append(t.cut(e));let c=sr(l.content,e-a-1,n,o==0?r-1:0,o==t.childCount-1?s-1:0,l);return c&&t.replaceChild(o,l.copy(c))}var ir=65535,or=Math.pow(2,16);function ls(t,e){return t+e*or}function xn(t){return t&ir}function cs(t){return(t-(t&ir))/or}var ar=1,lr=2,Ge=4,cr=8,Mn=class{constructor(t,e,n){this.pos=t,this.delInfo=e,this.recover=n}get deleted(){return(this.delInfo&cr)>0}get deletedBefore(){return(this.delInfo&(ar|Ge))>0}get deletedAfter(){return(this.delInfo&(lr|Ge))>0}get deletedAcross(){return(this.delInfo&Ge)>0}},se=class ue{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&ue.empty)return ue.empty}recover(e){let n=0,r=xn(e);if(!this.inverted)for(let s=0;s<r;s++)n+=this.ranges[s*3+2]-this.ranges[s*3+1];return this.ranges[r*3]+n+cs(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let s=0,i=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?s:0);if(l>e)break;let c=this.ranges[a+i],d=this.ranges[a+o],u=l+c;if(e<=u){let p=c?e==l?-1:e==u?1:n:n,h=l+s+(p<0?0:d);if(r)return h;let m=e==(n<0?l:u)?null:ls(a/3,e-l),g=e==l?lr:e==u?ar:Ge;return(n<0?e!=l:e!=u)&&(g|=cr),new Mn(h,g,m)}s+=d-c}return r?e+s:new Mn(e+s,0,null)}touches(e,n){let r=0,s=xn(n),i=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let c=this.ranges[a+i],d=l+c;if(e<=d&&a==s*3)return!0;r+=this.ranges[a+o]-c}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let s=0,i=0;s<this.ranges.length;s+=3){let o=this.ranges[s],a=o-(this.inverted?i:0),l=o+(this.inverted?0:i),c=this.ranges[s+n],d=this.ranges[s+r];e(a,a+c,l,l+d),i+=d-c}}invert(){return new ue(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?ue.empty:new ue(e<0?[0,-e,0]:[0,0,e])}};se.empty=new se([]);var Ht=Object.create(null),x=class{getMap(){return se.empty}merge(t){return null}static fromJSON(t,e){if(!e||!e.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=Ht[e.stepType];if(!n)throw new RangeError(`No step type ${e.stepType} defined`);return n.fromJSON(t,e)}static jsonID(t,e){if(t in Ht)throw new RangeError("Duplicate use of step JSON ID "+t);return Ht[t]=e,e.prototype.jsonID=t,e}},I=class ve{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new ve(e,null)}static fail(e){return new ve(null,e)}static fromReplace(e,n,r,s){try{return ve.ok(e.replace(n,r,s))}catch(i){if(i instanceof as)return ve.fail(i.message);throw i}}};function dn(t,e,n){let r=[];for(let s=0;s<t.childCount;s++){let i=t.child(s);i.content.size&&(i=i.copy(dn(i.content,e,i))),i.isInline&&(i=e(i,n,s)),r.push(i)}return G.fromArray(r)}var ur=class we extends x{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),s=r.node(r.sharedDepth(this.to)),i=new E(dn(n.content,(o,a)=>!o.isAtom||!a.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),s),n.openStart,n.openEnd);return I.fromReplace(e,this.from,this.to,i)}invert(){return new dr(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new we(n.pos,r.pos,this.mark)}merge(e){return e instanceof we&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new we(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new we(n.from,n.to,e.markFromJSON(n.mark))}};x.jsonID("addMark",ur);var dr=class be extends x{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new E(dn(n.content,s=>s.mark(this.mark.removeFromSet(s.marks)),e),n.openStart,n.openEnd);return I.fromReplace(e,this.from,this.to,r)}invert(){return new ur(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new be(n.pos,r.pos,this.mark)}merge(e){return e instanceof be&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new be(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new be(n.from,n.to,e.markFromJSON(n.mark))}};x.jsonID("removeMark",dr);var pr=class Se extends x{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return I.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return I.fromReplace(e,this.pos,this.pos+1,new E(G.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let s=0;s<n.marks.length;s++)if(!n.marks[s].isInSet(r))return new Se(this.pos,n.marks[s]);return new Se(this.pos,this.mark)}}return new hr(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Se(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Se(n.pos,e.markFromJSON(n.mark))}};x.jsonID("addNodeMark",pr);var hr=class Xt extends x{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return I.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return I.fromReplace(e,this.pos,this.pos+1,new E(G.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new pr(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Xt(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Xt(n.pos,e.markFromJSON(n.mark))}};x.jsonID("removeNodeMark",hr);var pn=class q extends x{constructor(e,n,r,s=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=s}apply(e){return this.structure&&Qt(e,this.from,this.to)?I.fail("Structure replace would overwrite content"):I.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new se([this.from,this.to-this.from,this.slice.size])}invert(e){return new q(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.to,-1),r=this.from==this.to&&q.MAP_BIAS<0?n:e.mapResult(this.from,1);return r.deletedAcross&&n.deletedAcross?null:new q(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof q)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?E.empty:new E(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new q(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?E.empty:new E(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new q(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new q(n.from,n.to,E.fromJSON(e,n.slice),!!n.structure)}};pn.MAP_BIAS=1;x.jsonID("replace",pn);var fr=class Ve extends x{constructor(e,n,r,s,i,o,a=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=s,this.slice=i,this.insert=o,this.structure=a}apply(e){if(this.structure&&(Qt(e,this.from,this.gapFrom)||Qt(e,this.gapTo,this.to)))return I.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return I.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?I.fromReplace(e,this.from,this.to,r):I.fail("Content does not fit in gap")}getMap(){return new se([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new Ve(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),s=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||s<n.pos||i>r.pos?null:new Ve(n.pos,r.pos,s,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Ve(n.from,n.to,n.gapFrom,n.gapTo,E.fromJSON(e,n.slice),n.insert,!!n.structure)}};x.jsonID("replaceAround",fr);function Qt(t,e,n){let r=t.resolve(e),s=n-e,i=r.depth;for(;s>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,s--;if(s>0){let o=r.node(i).maybeChild(r.indexAfter(i));for(;s>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,s--}}return!1}var us=class qe extends x{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return I.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let s=n.type.create(r,null,n.marks);return I.fromReplace(e,this.pos,this.pos+1,new E(G.from(s),0,n.isLeaf?0:1))}getMap(){return se.empty}invert(e){return new qe(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new qe(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new qe(n.pos,n.attr,n.value)}};x.jsonID("attr",us);var ds=class Yt extends x{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let s in e.attrs)n[s]=e.attrs[s];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return I.ok(r)}getMap(){return se.empty}invert(e){return new Yt(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Yt(n.attr,n.value)}};x.jsonID("docAttr",ds);var He=class extends Error{};He=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};He.prototype=Object.create(Error.prototype);He.prototype.constructor=He;He.prototype.name="TransformError";var Dt=Object.create(null),L=class{constructor(t,e,n){this.$anchor=t,this.$head=e,this.ranges=n||[new ps(t.min(e),t.max(e))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let e=0;e<t.length;e++)if(t[e].$from.pos!=t[e].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,e=E.empty){let n=e.content.lastChild,r=null;for(let o=0;o<e.openEnd;o++)r=n,n=n.lastChild;let s=t.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){let{$from:a,$to:l}=i[o],c=t.mapping.slice(s);t.replaceRange(c.map(a.pos),c.map(l.pos),o?E.empty:e),o==0&&Nn(t,s,(n?n.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(t,e){let n=t.steps.length,r=this.ranges;for(let s=0;s<r.length;s++){let{$from:i,$to:o}=r[s],a=t.mapping.slice(n),l=a.map(i.pos),c=a.map(o.pos);s?t.deleteRange(l,c):(t.replaceRangeWith(l,c,e),Nn(t,n,e.isInline?-1:1))}}static findFrom(t,e,n=!1){let r=t.parent.inlineContent?new me(t):de(t.node(0),t.parent,t.pos,t.index(),e,n);if(r)return r;for(let s=t.depth-1;s>=0;s--){let i=e<0?de(t.node(0),t.node(s),t.before(s+1),t.index(s),e,n):de(t.node(0),t.node(s),t.after(s+1),t.index(s)+1,e,n);if(i)return i}return null}static near(t,e=1){return this.findFrom(t,e)||this.findFrom(t,-e)||new Le(t.node(0))}static atStart(t){return de(t,t,0,0,1)||new Le(t)}static atEnd(t){return de(t,t,t.content.size,t.childCount,-1)||new Le(t)}static fromJSON(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=Dt[e.type];if(!n)throw new RangeError(`No selection type ${e.type} defined`);return n.fromJSON(t,e)}static jsonID(t,e){if(t in Dt)throw new RangeError("Duplicate use of selection JSON ID "+t);return Dt[t]=e,e.prototype.jsonID=t,e}getBookmark(){return me.between(this.$anchor,this.$head).getBookmark()}};L.prototype.visible=!0;var ps=class{constructor(t,e){this.$from=t,this.$to=e}},In=!1;function Rn(t){!In&&!t.parent.inlineContent&&(In=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}var me=class Te extends L{constructor(e,n=e){Rn(e),Rn(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return L.near(r);let s=e.resolve(n.map(this.anchor));return new Te(s.parent.inlineContent?s:r,r)}replace(e,n=E.empty){if(super.replace(e,n),n==E.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof Te&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new mr(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Te(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let s=e.resolve(n);return new this(s,r==n?s:e.resolve(r))}static between(e,n,r){let s=e.pos-n.pos;if((!r||s)&&(r=s>=0?1:-1),!n.parent.inlineContent){let i=L.findFrom(n,r,!0)||L.findFrom(n,-r,!0);if(i)n=i.$head;else return L.near(n,r)}return e.parent.inlineContent||(s==0?e=n:(e=(L.findFrom(e,-r,!0)||L.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=s<0&&(e=n))),new Te(e,n)}};L.jsonID("text",me);var mr=class gr{constructor(e,n){this.anchor=e,this.head=n}map(e){return new gr(e.map(this.anchor),e.map(this.head))}resolve(e){return me.between(e.resolve(this.anchor),e.resolve(this.head))}},ge=class Ee extends L{constructor(e){let n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);super(e,r),this.node=n}map(e,n){let{deleted:r,pos:s}=n.mapResult(this.anchor),i=e.resolve(s);return r?L.near(i):new Ee(i)}content(){return new E(G.from(this.node),0,0)}eq(e){return e instanceof Ee&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new hs(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Ee(e.resolve(n.anchor))}static create(e,n){return new Ee(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}};ge.prototype.visible=!1;L.jsonID("node",ge);var hs=class kr{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new mr(r,r):new kr(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&ge.isSelectable(r)?new ge(n):L.near(n)}},Le=class Xe extends L{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}
1replace(e,n=E.empty){if(n==E.empty){e.delete(0,e.doc.content.size);let r=L.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new Xe(e)}map(e){return new Xe(e)}eq(e){return e instanceof Xe}getBookmark(){return fs}};L.jsonID("all",Le);var fs={map(){return this},resolve(t){return new Le(t)}};function de(t,e,n,r,s,i=!1){if(e.inlineContent)return me.create(t,n);for(let o=r-(s>0?0:1);s>0?o<e.childCount:o>=0;o+=s){let a=e.child(o);if(a.isAtom){if(!i&&ge.isSelectable(a))return ge.create(t,n-(s<0?a.nodeSize:0))}else{let l=de(t,a,n+s,s<0?a.childCount:0,s,i);if(l)return l}n+=a.nodeSize*s}return null}function Nn(t,e,n){let r=t.steps.length-1;if(r<e)return;let s=t.steps[r];if(!(s instanceof pn||s instanceof fr))return;let i=t.mapping.maps[r],o;i.forEach((a,l,c,d)=>{o==null&&(o=d)}),t.setSelection(L.near(t.doc.resolve(o),n))}function On(t,e){return!e||!t?t:t.bind(e)}var $e=class{constructor(t,e,n){this.name=t,this.init=On(e.init,n),this.apply=On(e.apply,n)}};new $e("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new $e("selection",{init(t,e){return t.selection||L.atStart(e.doc)},apply(t){return t.selection}}),new $e("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new $e("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}});var ms=(t,e)=>{var n;const{state:r,view:s}=t,{selection:i}=r;if(!i.empty)return!1;const{$from:o}=i;if(o.parentOffset!==0)return!1;const a=o.depth-1,l=o.node(a),c=o.index(a);if(c===0)return!1;if(l.type===e)return t.commands.lift(e.name);const d=l.child(c-1);if(d.type!==e||!((n=d.lastChild)!=null&&n.isTextblock))return!1;const u=o.before(),h=u-1-1,{tr:m}=r;return m.delete(u,o.after()).insert(h,o.parent.content),m.setSelection(me.create(m.doc,h)),s.dispatch(m.scrollIntoView()),!0},gs=/^\s*>\s$/,ks=P.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return Ze("blockquote",{...A(this.options.HTMLAttributes,t),children:Ze("slot",{})})},parseMarkdown:(t,e)=>{var n;const r=(n=e.parseBlockChildren)!=null?n:e.parseChildren;return e.createNode("blockquote",void 0,r(t.tokens||[]))},renderMarkdown:(t,e)=>{if(!t.content)return"";const n=">",r=[];return t.content.forEach((s,i)=>{var o,a;const d=((a=(o=e.renderChild)==null?void 0:o.call(e,s,i))!=null?a:e.renderChildren([s])).split(` 2`).map(u=>u.trim()===""?n:`${n} ${u}`);r.push(d.join(` 3`))}),r.join(` 4${n} 5`)},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote(),Backspace:()=>ms(this.editor,this.type)}}
vendor: 2,308 bytes, line 5
5,addInputRules(){return[he({find:gs,type:this.type})]}}),ys=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,vs=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,ws=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,bs=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,Ss=ke.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return Ze("strong",{...A(this.options.HTMLAttributes,t),children:Ze("slot",{})})},markdownTokenName:"strong",parseMarkdown:(t,e)=>e.applyMark("bold",e.parseInline(t.tokens||[])),markdownOptions:{htmlReopen:{open:"<strong>",close:"</strong>"}},renderMarkdown:(t,e)=>`**${e.renderChildren(t)}**`,addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[fe({find:ys,type:this.type}),fe({find:ws,type:this.type})]},addPasteRules(){return[re({find:vs,type:this.type}),re({find:bs,type:this.type})]}}),Ts=t=>{const e=/`([^`]+)`(?!`)$/.exec(t);return!e||e.index>0&&t[e.index-1]==="`"?null:{index:e.index,text:e[0],replaceWith:e[1]}},Es=t=>{const e=/`([^`]+)`(?!`)/g,n=[];let r;for(;(r=e.exec(t))!==null;)r.index>0&&t[r.index-1]==="`"||n.push({index:r.index,text:r[0],replaceWith:r[1]});return n},As=ke.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",A(this.options.HTMLAttributes,t),0]},markdownTokenName:"codespan",parseMarkdown:(t,e)=>e.applyMark("code",[{type:"text",text:t.text||""}]),renderMarkdown:(t,e)=>t.content?`\`${e.renderChildren(t.content)}\``:"",addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}}
vendor: 6,971 bytes, lines 5-26
5,addInputRules(){return[fe({find:Ts,type:this.type})]},addPasteRules(){return[re({find:Es,type:this.type})]}}),zt=4,Ls=/^```([a-z]+)?[\s\n]$/,Cs=/^~~~([a-z]+)?[\s\n]$/,xs=P.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:zt,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options;if(!n)return null;const i=[...((e=t.firstElementChild)==null?void 0:e.classList)||[]].filter(o=>o.startsWith(n)).map(o=>o.replace(n,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",A(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(t,e)=>{var n,r;return((n=t.raw)==null?void 0:n.startsWith("```"))===!1&&((r=t.raw)==null?void 0:r.startsWith("~~~"))===!1&&t.codeBlockStyle!=="indented"?[]:e.createNode("codeBlock",{language:t.lang||null},t.text?[e.createTextNode(t.text)]:[])},renderMarkdown:(t,e)=>{var n;let r="";const s=((n=t.attrs)==null?void 0:n.language)||"";return t.content?r=[`\`\`\`${s}`,e.renderChildren(t.content),"```"].join(` 6`):r=`\`\`\`${s} 7 8\`\`\``,r},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=e.pos===1;return!t||e.parent.type.name!==this.name?!1:n||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:zt,{state:r}=t,{selection:s}=r,{$from:i,empty:o}=s;if(i.parent.type!==this.type)return!1;const a=" ".repeat(n);return o?t.commands.insertContent(a):t.commands.command(({tr:l})=>{const{from:c,to:d}=s,h=r.doc.textBetween(c,d,` 9`,` 10`).split(` 11`).map(m=>a+m).join(` 12`);return l.replaceWith(c,d,r.schema.text(h)),!0})},"Shift-Tab":({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:zt,{state:r}=t,{selection:s}=r,{$from:i,empty:o}=s;return i.parent.type!==this.type?!1:o?t.commands.command(({tr:a})=>{var l;const{pos:c}=i,d=i.start(),u=i.end(),h=r.doc.textBetween(d,u,` 13`,` 14`).split(` 15`);let m=0,g=0;const k=c-d;for(let O=0;O<h.length;O+=1){if(g+h[O].length>=k){m=O;break}g+=h[O].length+1}const N=((l=h[m].match(/^ */))==null?void 0:l[0])||"",ie=Math.min(N.length,n);if(ie===0)return!0;let b=d;for(let O=0;O<m;O+=1)b+=h[O].length+1;return a.delete(b,b+ie),c-b<=ie&&a.setSelection(te.create(a.doc,b)),!0}):t.commands.command(({tr:a})=>{const{from:l,to:c}=s,p=r.doc.textBetween(l,c,` 16`,` 17`).split(` 18`).map(h=>{var m;const g=((m=h.match(/^ */))==null?void 0:m[0])||"",k=Math.min(g.length,n);return h.slice(k)}).join(` 19`);return a.replaceWith(l,c,r.schema.text(p)),!0})},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:s}=n;if(!s||r.parent.type!==this.type)return!1;const i=r.parentOffset===r.parent.nodeSize-2,o=r.parent.textContent.endsWith(` 20 21`);return!i||!o?!1:t.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:s,empty:i}=n;if(!i||s.parent.type!==this.type||!(s.parentOffset===s.parent.nodeSize-2))return!1;const a=s.after();return a===void 0?!1:r.nodeAt(a)?t.commands.command(({tr:c})=>(c.setSelection(Oe.near(r.resolve(a))),!0)):t.commands.exitCode()}}},addInputRules(){return[Gt({find:Ls,type:this.type,getAttributes:t=>({language:t[1]})}),Gt({find:Cs,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new z({key:new _("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),s=r?JSON.parse(r):void 0,i=s==null?void 0:s.mode;if(!n||!i)return!1;const{tr:o,schema:a}=t.state,l=a.text(n.replace(/\r\n?/g,` 22`));return o.replaceSelectionWith(this.type.create({language:i},l)),o.selection.$from.parent.type!==this.type&&o.setSelection(te.near(o.doc.resolve(Math.max(0,o.selection.from-2)))),o.setMeta("paste",!0),t.dispatch(o),!0}}})]}}),Ms=P.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,` 23 24`):""}),Is=P.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",A(this.options.HTMLAttributes,t)]},renderText(){return` 25`},renderMarkdown:()=>` 26`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:s,storedMarks:i}=n;if(s.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:a}=r.extensionManager,l=i||s.$to.parentOffset&&s.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:d})=>{if(d&&l&&o){const u=l.filter(p=>a.includes(p.type.name));c.ensureMarks(u)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Rs=P.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,A(this.options.HTMLAttributes,e),0]},parseMarkdown:(t,e)=>e.createNode("heading",{level:t.depth||1},e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>{var n;const r=(n=t.attrs)!=null&&n.level?parseInt(t.attrs.level,10):1,s="#".repeat(r);return t.content?`${s} ${e.renderChildren(t.content)}`:""},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>Gt({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}}
26)\\s$`),type:this.type,getAttributes:{level:t}}))}}),Ns=P.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",A(this.options.HTMLAttributes,t)]},markdownTokenName:"hr",parseMarkdown:(t,e)=>e.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!Kr(e,e.schema.nodes[this.name]))return!1;const{selection:n}=e,{$to:r}=n,s=t();return Qn(n)?s.insertContentAt(r.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({state:i,tr:o,dispatch:a})=>{if(a){const{$to:l}=o.selection,c=l.end();if(l.nodeAfter)l.nodeAfter.isTextblock?o.setSelection(te.create(o.doc,l.pos+1)):l.nodeAfter.isBlock?o.setSelection(un.create(o.doc,l.pos)):o.setSelection(te.create(o.doc,l.pos));else{const d=i.schema.nodes[this.options.nextNodeType]||l.parent.type.contentMatch.defaultType,u=d==null?void 0:d.create();u&&(o.insert(c,u),o.setSelection(te.create(o.doc,c+1)))}o.scrollIntoView()}return!0}).run()}}},addInputRules(){return[Jr({find:/^(?:---|â-|___\s|\*\*\*\s)$/,type:this.t
vendor: 1,045 bytes, line 26
26ype})]}}),Os=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,Ps=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,Hs=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,Ds=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,zs=ke.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",A(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(t,e)=>e.applyMark("italic",e.parseInline(t.tokens||[])),markdownOptions:{htmlReopen:{open:"<em>",close:"</em>"}},renderMarkdown:(t,e)=>`*${e.renderChildren(t)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}}
26,addInputRules(){return[fe({find:Os,type:this.type}),fe({find:Hs,type:this.type})]},addPasteRules(){return[re({find:Ps,type:this.type}),re({find:Ds,type:this.type})]}});const Bs="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yac
26hts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Fs="ελ1Ï 2бг1ел3деÑи4еÑ2каÑолик6ом3мкд2он1Ñква6онлайн5Ñг3ÑÑÑ2Ñ2ÑайÑ3Ñб3ÑкÑ3Òаз3Õ°Õ¡Õµ3×שר××5×§××3Ø§Ø¨ÙØ¸Ø¨Ù5را٠ÙÙ5ÙØ§Ø±Ø¯Ù4Ø¨ØØ±ÙÙ5جزائر5Ø³Ø¹ÙØ¯ÙØ©6عÙÙØ§Ù5٠غرب5٠ارات5ÛØ±Ø§Ù5بارت2زار4ÙØªÙ3ھارت5تÙÙØ³4Ø³ÙØ¯Ø§Ù3Ø±ÙØ©5Ø´Ø¨ÙØ©4عراÙ2ب2٠اÙ4ÙÙØ³Ø·ÙÙ6ÙØ·Ø±3ÙØ§Ø«ÙÙÙÙ6ÙÙ 3٠صر2ÙÙØ³Ùا5ÙØ±ÙتاÙÙØ§7ÙØ¹4Ù٠راÙ5پاکستاÙ7ÚØ§Ø±Øª4à¤à¥à¤®3नà¥à¤3à¤à¤¾à¤°à¤¤0मà¥3à¥à¤¤5सà¤à¤à¤ न5বাà¦à¦²à¦¾5à¦à¦¾à¦°à¦¤2ৰত4à¨à¨¾à¨°à¨¤4àªàª¾àª°àª¤4à¬à¬¾à¬°à¬¤4à®à®¨à¯à®¤à®¿à®¯à®¾6லà®à¯à®à¯6à®à®¿à®à¯à®à®ªà¯à®ªà¯à®°à¯11à°à°¾à°°à°¤à±5à²à²¾à²°à²¤4à´à´¾à´°à´¤à´5à¶½à¶à¶à·4à¸à¸à¸¡3à¹à¸à¸¢3ລາວ3áá2ã¿ããª3ã¢ãã¾ã³4ã¯ã©ã¦ã4ã°ã¼ã°ã«4ã³ã 2ã¹ãã¢3ã»ã¼ã«3ãã¡ãã·ã§ã³6ãã¤ã³ã4ä¸ç2ä¸ä¿¡1å½1å1æç½3äºé©¬é3ä¼ä¸2ä½å±±2ä¿¡æ¯2å¥åº·2å «å¦2å ¬å¸1ç2å°æ¹¾1ç£2åå1åº1æ 2åé0大é åº5å¨çº¿2大æ¿2天主æ3娱ä¹2å®¶é»2广ä¸2å¾®å2æ å2æç±ä½ 3ææº2æè2æ¿å¡1åº2æ°å å¡2é»2æ¶å°2æ¸ç±2æºæ2淡马é¡3游æ2æ¾³é2ç¹ç2ç§»å¨2ç»ç»æºæ4ç½å1åº1ç«1ç»2èé2è°·æ2è´ç©2é販2éå¢2é»è¨çç§4é£å©æµ¦3é£å2é¤å 2馿 ¼éæ3港2ë·ë·1ì»´2ì¼ì±2íêµ2",Zt="numeric",en="ascii",tn="alpha",Ce="asciinumeric",Ae="alphanumeric",nn="domain",yr="emoji",_s="scheme",$s="slashscheme",Bt="whitespace";function Us(t,e){return t in e||(e[t]=[]),e[t]}function Z(t,e,n){e[Zt]&&(e[Ce]=!0,e[Ae]=!0),e[en]&&(e[Ce]=!0,e[tn]=!0),e[Ce]&&(e[Ae]=!0),e[tn]&&(e[Ae]=!0),e[Ae]&&(e[nn]=!0),e[yr]&&(e[nn]=!0);for(const r in e){const s=Us(r,n);s.indexOf(t)<0&&s.push(t)}}function js(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function R(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}R.groups={};R.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let r=0;r<e.jr.length;r++){const s=e.jr[r][0],i=e.jr[r][1];if(i&&s.test(t))return i}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let s=0;s<t.length;s++)this.tt(t[s],e,n,r)},tr(t,e,n,r){r=r||R.groups;let s;return e&&e.j?s=e:(s=new R(e),n&&r&&Z(e,n,r)),this.jr.push([t,s]),s},ts(t,e,n,r){let s=this;const i=t.length;if(!i)return s;for(let o=0;o<i-1;o++)s=s.tt(t[o]);return s.tt(t[i-1],e,n,r)},tt(t,e,n,r){r=r||R.groups;const s=this;if(e&&e.j)return s.j[t]=e,e;const i=e;let o,a=s.go(t);if(a?(o=new R,Object.assign(o.j,a.j),o.jr.push.apply(o.jr,a.jr),o.jd=a.jd,o.t=a.t):o=new R,i){if(r)if(o.t&&typeof o.t=="string"){const l=Object.assign(js(o.t,r),n);Z(i,l,r)}else n&&Z(i,n,r);o.t=i}return s.j[t]=o,o}};const v=(t,e,n,r,s)=>t.ta(e,n,r,s),S=(t,e,n,r,s)=>t.tr(e,n,r,s),Pn=(t,e,n,r,s)=>t.ts(e,n,r,s),f=(t,e,n,r,s)=>t.tt(e,n,r,s),W="WORD",rn="UWORD",vr="ASCIINUMERICAL",wr="ALPHANUMERICAL",De="LOCALHOST",sn="TLD",on="UTLD",Qe="SCHEME",pe="SLASH_SCHEME",hn="NUM",an="WS",fn="NL",xe="OPENBRACE",Me="CLOSEBRACE",et="OPENBRACKET",tt="CLOSEBRACKET",nt="OPENPAREN",rt="CLOSEPAREN",st="OPENANGLEBRACKET",it="CLOSEANGLEBRACKET",ot="FULLWIDTHLEFTPAREN",at="FULLWIDTHRIGHTPAREN",lt="LEFTCORNERBRACKET",ct="RIGHTCORNERBRACKET",ut="LEFTWHITECORNERBRACKET",dt="RIGHTWHITECORNERBRACKET",pt="FULLWIDTHLESSTHAN",ht="FULLWIDTHGREATERTHAN",ft="AMPERSAND",mt="APOSTROPHE",gt="ASTERISK",X="AT",kt="BACKSLASH",yt="BACKTICK",vt="CARET",ee="COLON",mn="COMMA",wt="DOLLAR",$="DOT",bt="EQUALS",gn="EXCLAMATION",D="HYPHEN",Ie="PERCENT",St="PIPE",Tt="PLUS",Et="POUND",Re="QUERY",kn="QUOTE",br="FULLWIDTHMIDDLEDOT",yn="SEMI",U="SLASH",Ne="TILDE",At="UNDERSCORE",Sr="EMOJI",Lt="SYM";var Tr=Object.freeze({__proto__:null,ALPHANUMERICAL:wr,AMPERSAND:ft,APOSTROPHE:mt,ASCIINUMERICAL:vr,ASTERISK:gt,AT:X,BACKSLASH:kt,BACKTICK:yt,CARET:vt,CLOSEANGLEBRACKET:it,CLOSEBRACE:Me,CLOSEBRACKET:tt,CLOSEPAREN:rt,COLON:ee,COMMA:mn,DOLLAR:wt,DOT:$,EMOJI:Sr,EQUALS:bt,EXCLAMATION:gn,FULLWIDTHGREATERTHAN:ht,FULLWIDTHLEFTPAREN:ot,FULLWIDTHLESSTHAN:pt,FULLWIDTHMIDDLEDOT:br,FULLWIDTHRIGHTPAREN:at,HYPHEN:D,LEFTCORNERBRACKET:lt,LEFTWHITECORNERBRACKET:ut,LOCALHOST:De,NL:fn,NUM:hn,OPENANGLEBRACKET:st,OPENBRACE:xe,OPENBRACKET:et,OPENPAREN:nt,PERCENT:Ie,PIPE:St,PLUS:Tt,POUND:Et,QUERY:Re,QUOTE:kn,RIGHTCORNERBRACKET:ct,RIGHTWHITECORNERBRACKET:dt,SCHEME:Qe,SEMI:yn,SLASH:U,SLASH_SCHEME:pe,SYM:Lt,TILDE:Ne,TLD:sn,UNDERSCORE:At,UTLD:on,UWORD:rn,WORD:W,WS:an});const J=/[a-z]/,ye=new RegExp("\\p{L}","u"),Ft=new RegExp("\\p{Emoji}","u"),K=/\d/,_t=/\s/,Hn="\r",$t=` 27`,Js="ï¸",Ks="â",Ut="";let Ue=null,je=null;function Ws(t=[]){const e={};R.groups=e;const n=new R;Ue==null&&(Ue=Dn(Bs)),je==null&&(je=Dn(Fs)),f(n,"'",mt),f(n,"{",xe),f(n,"}",Me),f(n,"[",et),f(n,"]",tt),f(n,"(",nt),f(n,")",rt),f(n,"<",st),f(n,">",it),f(n,"ï¼",ot),f(n,"ï¼",at),f(n,"ã",lt),f(n,"ã",ct),f(n,"ã",ut),f(n,"ã",dt),f(n,"ï¼",pt),f(n,"ï¼",ht),f(n,"&",ft),f(n,"*",gt),f(n,"@",X),f(n,"`",yt),f(n,"^",vt),f(n,":",ee),f(n,",",mn),f(n,"$",wt),f(n,".",$),f(n,"=",bt),f(n,"!",gn),f(n,"-",D),f(n,"%",Ie),f(n,"|",St),f(n,"+",Tt),f(n,"#",Et),f(n,"?",Re),f(n,'"',kn),f(n,"/",U),f(n,";",yn),f(n,"~",Ne),f(n,"_",At),f(n,"\\",kt),f(n,"ã»",br);const r=S(n,K,hn,{[Zt]:!0});S(r,K,r);const s=S(r,J,vr,{[Ce]:!0}),i=S(r,ye,wr,{[Ae]:!0}),o=S(n,J,W,{[en]:!0});S(o,K,s),S(o,J,o),S(s,K,s),S(s,J,s);const a=S(n,ye,rn,{[tn]:!0});S(a,J),S(a,K,i),S(a,ye,a),S(i,K,i),S(i,J),S(i,ye,i);const l=f(n,$t,fn,{[Bt]:!0}),c=f(n,Hn,an,{[Bt]:!0}),d=S(n,_t,an,{[Bt]:!0});f(n,Ut,d),f(c,$t,l),f(c,Ut,d),S(c,_t,d),f(d,Hn),f(d,$t),S(d,_t,d),f(d,Ut,d);const u=S(n,Ft,Sr,{[yr]:!0});f(u,"#"),S(u,Ft,u),f(u,Js,u);const p=f(u,Ks);f(p,"#"),S(p,Ft,u);const h=[[J,o],[K,s]],m=[[J,null],[ye,a],[K,i]];for(let g=0;g<Ue.length;g++)V(n,Ue[g],sn,W,h);for(let g=0;g<je.length;g++)V(n,je[g],on,rn,m);Z(sn,{tld:!0,ascii:!0},e),Z(on,{utld:!0,alpha:!0},e),V(n,"file",Qe,W,h),V(n,"mailto",Qe,W,h),V(n,"http",pe,W,h),V(n,"https",pe,W,h),V(n,"ftp",pe,W,h),V(n,"ftps",pe,W,h),Z(Qe,{scheme:!0,ascii:!0},e),Z(pe,{slashscheme:!0,ascii:!0},e),t=t.sort((g,k)=>g[0]>k[0]?1:-1);for(let g=0;g<t.length;g++){const k=t[g][0],N=t[g][1]?{[_s]:!0}:{[$s]:!0};k.indexOf("-")>=0?N[nn]=!0:J.test(k)?K.test(k)?N[Ce]=!0:N[en]=!0:N[Zt]=!0,Pn(n,k,k,N)}return Pn(n,"localhost",De,{ascii:!0}),n.jd=new R(Lt),{start:n,tokens:Object.assign({groups:e},Tr)}}function Er(t,e){const n=Gs(e.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,s=[];let i=0,o=0;for(;o<r;){let a=t,l=null,c=0,d=null,u=-1,p=-1;for(;o<r&&(l=a.go(n[o]));)a=l,a.accepts()?(u=0,p=0,d=a):u>=0&&(u+=n[o].length,p++),c+=n[o].length,i+=n[o].length,o++;i-=u,o-=p,c-=u,s.push({t:d.t,v:e.slice(i-c,i),s:i-c,e:i})}return s}function Gs(t){const e=[],n=t.length;let r=0;for(;r<n;){let s=t.charCodeAt(r),i,o=s<55296||s>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?t[r]:t.slice(r,r+2);e.push(o),r+=o.length}return e}function V(t,e,n,r,s){let i;const o=e.length;for(let a=0;a<o-1;a++){const l=e[a];t.j[l]?i=t.j[l]:(i=new R(r),i.jr=s.slice(),t.j[l]=i),t=i}return i=new R(n),i.jr=s.slice(),t.j[e[o-1]]=i,i}function Dn(t){const e=[],n=[];let r=0,s="0123456789";for(;r<t.length;){let i=0;for(;s.indexOf(t[r+i])>=0;)i++;if(i>0){e.push(n.join(""));for(let o=parseInt(t.substring(r,r+i),10);o>0;o--)n.pop();r+=i}else n.push(t[r]),r++}return e}const ze={defaultProtocol:"http",events:null,format:zn,formatHref:zn,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function vn(t,e=null){let n=Object.assign({},ze);t&&(n=Object.assign(n,t instanceof vn?t.o:t));const r=n.ignoreTags,s=[];for(let i=0;i<r.length;i++)s.push(r[i].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=s}vn.prototype={o:ze,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const r=e!=null;let s=this.o[t];return s&&(typeof s=="object"?(s=n.t in s?s[n.t]:ze[t],typeof s=="function"&&r&&(s=s(e,n))):typeof s=="function"&&r&&(s=s(e,n.t,n)),s)},getObj(t,e,n){let r=this.o[t];return typeof r=="function"&&e!=null&&(r=r(e,n.t,n)),r},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function zn(t){return t}function Ar(t,e){this.t="token",this.v=t,this.tk=e}Ar.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"â¦":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=ze.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),s=t.get("tagName",n,e),i=this.toFormattedString(t),o={},a=t.get("className",n,e),l=t.get("target",n,e),c=t.get("rel",n,e),d=t.getObj("attributes",n,e),u=t.getObj("events",n,e);return o.href=r,a&&(o.class=a),l&&(o.target=l),c&&(o.rel=c),d&&Object.assign(o,d),{tagName:s,attributes:o,content:i,eventListeners:u}}};
vendor: 4,111 bytes, lines 27-30
27function Mt(t,e){class n extends Ar{constructor(s,i){super(s,i),this.t=t}}for(const r in e)n.prototype[r]=e[r];return n.t=t,n}const Vs=Mt("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Bn=Mt("text"),qs=Mt("nl"),Je=Mt("url",{isLink:!0,toHref(t=ze.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==De&&t[1].t===ee}}),H=t=>new R(t);function Xs({groups:t}){const e=t.domain.concat([ft,gt,X,kt,yt,vt,wt,bt,D,hn,Ie,St,Tt,Et,U,Lt,Ne,At]),n=[mt,ee,mn,$,gn,Ie,Re,kn,yn,st,it,xe,Me,tt,et,nt,rt,ot,at,lt,ct,ut,dt,pt,ht],r=[ft,mt,gt,kt,yt,vt,wt,bt,D,xe,Me,Ie,St,Tt,Et,Re,U,Lt,Ne,At],s=H(),i=f(s,Ne);v(i,r,i),v(i,t.domain,i);const o=H(),a=H(),l=H();v(s,t.domain,o),v(s,t.scheme,a),v(s,t.slashscheme,l),v(o,r,i),v(o,t.domain,o);const c=f(o,X);f(i,X,c),f(a,X,c),f(l,X,c);const d=f(i,$);v(d,r,i),v(d,t.domain,i);const u=H();v(c,t.domain,u),v(u,t.domain,u);const p=f(u,$);v(p,t.domain,u);const h=H(Vs);v(p,t.tld,h),v(p,t.utld,h),f(c,De,h);const m=f(u,D);f(m,D,m),v(m,t.domain,u),v(h,t.domain,u),f(h,$,p),f(h,D,m);const g=f(o,D),k=f(o,$);f(g,D,g),v(g,t.domain,o),v(k,r,i),v(k,t.domain,o);const y=H(Je);v(k,t.tld,y),v(k,t.utld,y),v(y,t.domain,o),v(y,r,i),f(y,$,k),f(y,D,g),f(y,X,c);const N=f(y,ee),ie=H(Je);v(N,t.numeric,ie);const b=H(Je),oe=H();v(b,e,b),v(b,n,oe),v(oe,e,b),v(oe,n,oe),f(y,U,b),f(ie,U,b);const O=f(a,ee),Ur=f(l,ee),jr=f(Ur,U),Rt=f(jr,U);v(a,t.domain,o),f(a,$,k),f(a,D,g),v(l,t.domain,o),f(l,$,k),f(l,D,g),v(O,t.domain,b),f(O,U,b),f(O,Re,b),v(Rt,t.domain,b),v(Rt,e,b),f(Rt,U,b);const En=[[xe,Me],[et,tt],[nt,rt],[st,it],[ot,at],[lt,ct],[ut,dt],[pt,ht]];for(let Nt=0;Nt<En.length;Nt++){const[An,Ot]=En[Nt],Fe=f(b,An);f(oe,An,Fe);const ae=H(Je);v(Fe,e,ae);const le=H();v(Fe,n,le),f(Fe,Ot,b),v(ae,e,ae),v(ae,n,le),v(le,e,ae),v(le,n,le),f(ae,Ot,b),f(le,Ot,b)}return f(s,De,y),f(s,fn,qs),{start:s,tokens:Tr}}function Qs(t,e,n){let r=n.length,s=0,i=[],o=[];for(;s<r;){let a=t,l=null,c=null,d=0,u=null,p=-1;for(;s<r&&!(l=a.go(n[s].t));)o.push(n[s++]);for(;s<r&&(c=l||a.go(n[s].t));)l=null,a=c,a.accepts()?(p=0,u=a):p>=0&&p++,s++,d++;if(p<0)s-=d,s<r&&(o.push(n[s]),s++);else{o.length>0&&(i.push(jt(Bn,e,o)),o=[]),s-=p,d-=p;const h=u.t,m=n.slice(s-d,s);i.push(jt(h,e,m))}}return o.length>0&&i.push(jt(Bn,e,o)),i}function jt(t,e,n){const r=n[0].s,s=n[n.length-1].e,i=e.slice(r,s);return new t(i,n)}const Ys=typeof console<"u"&&console&&console.warn||(()=>{}),Zs="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",w={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function ei(){return R.groups={},w.scanner=null,w.parser=null,w.tokenQueue=[],w.pluginQueue=[],w.customSchemes=[],w.initialized=!1,w}function Fn(t,e=!1){if(w.initialized&&Ys(`linkifyjs: already initialized - will not register custom scheme "${t}" ${Zs}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format. 281. Must only contain digits, lowercase ASCII letters or "-" 292. Cannot start or end with "-" 303. "-" cannot repeat`);w.customSchemes.push([t,e])}function ti(){w.scanner=Ws(w.customSchemes);for(let t=0;t<w.tokenQueue.length;t++)w.tokenQueue[t][1]({scanner:w.scanner});w.parser=Xs(w.scanner.tokens);for(let t=0;t<w.pluginQueue.length;t++)w.pluginQueue[t][1]({scanner:w.scanner,parser:w.parser});return w.initialized=!0,w}function wn(t){return w.initialized||ti(),Qs(w.parser.start,t,Er(w.scanner.start,t))}wn.scan=Er;function Lr(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const r=new vn(n),s=wn(t),i=[];for(let o=0;o<s.length;o++){const a=s[o];a.isLink&&(!e||a.t===e)&&r.check(a)&&i.push(a.toFormattedObject(r))}return i}var bn="[\0- Â áá â-\u2029âã]",ni=new RegExp(bn),ri=new RegExp(`${bn}$`),si=new RegExp(bn,"g");function ii(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function oi(t){return new z({key:new _("autolink"),appendTransaction:(e,n,r)=>{const s=e.some(c=>
30c.docChanged)&&!n.doc.eq(r.doc),i=e.some(c=>c.getMeta("preventAutolink"));if(!s||i)return;const{tr:o}=r,a=Wr(n.doc,[...e]);if(Gr(a).forEach(({newRange:c})=>{const d=Vr(r.doc,c,h=>h.isTextblock);let u,p;if(d.length>1)u=d[0],p=r.doc.textBetween(u.pos,u.pos+u.node.nodeSize,void 0," ");else if(d.length){const h=r.doc.textBetween(c.from,c.to," "," ");if(!ri.test(h))return;u=d[0],p=r.doc.textBetween(u.pos,c.to,void 0," ")}if(u&&p){const h=p.split(ni).filter(Boolean);if(h.length<=0)return!1;const m=h[h.length-1],g=u.pos+p.lastIndexOf(m);if(!m)return!1;const k=wn(m).map(y=>y.toObject(t.defaultProtocol));if(!ii(k))return!1;k.filter(y=>y.isLink).map(y=>({...y,from:g+y.start+1,to:g+y.end+1})).filter(y=>r.schema.marks.code?!r.doc.rangeHasMark(y.from,y.to,r.schema.marks.code):!0).filter(y=>t.validate(y.value)).filter(y=>t.shouldAutoLink(y.value)).forEach(y=>{qr(y.from,y.to,r.doc).some(N=>N.mark.type===t.type)||o.addMark(y.from,y.to,t.type.create({href:y.href}))})}}),!!o.steps.length)return o}})}function ai(t){return new z({key:new _("handleClickLink"),props:{handleClick:(e,n,r)=>{var s,i;if(r.button!==0||!e.editable)return!1;let o=null;if(r.target instanceof HTMLAnchorElement)o=r.target;else{const l=r.target;if(!l)return!1;const c=t.editor.view.dom;o=l.closest("a"),o&&!c.contains(o)&&(o=null)}if(!o)return!1;let a=!1;if(t.enableClickSelection&&(a=t.editor.commands.extendMarkRange(t.type.name)),t.openOnClick){const l=Xr(e.state,t.type.name),c=(s=o.href)!=null?s:l.href,d=(i=o.target)!=null?i:l.target;c&&(window.open(c,d),a=!0)}return a}}})}function li(t){return new z({key:new _("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{shouldAutoLink:s}=t,{state:i}=e,{selection:o}=i,{empty:a}=o;if(a)return!1;let l="";r.content.forEach(d=>{l+=d.textContent});const c=Lr(l,{defaultProtocol:t.defaultProtocol}).find(d=>d.isLink&&d.value===l);return!l||!c||s!==void 0&&!s(c.value)?!1:t.editor.commands.setMark(t.type,{href:c.href})}}})}function Y(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const s=typeof r=="string"?r:r.scheme;s&&n.push(s)}),!t||t.replace(si,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var ci=ke.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){Fn(t);return}Fn(t.scheme,t.optionalSlashes)})},onDestroy(){ei()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!Y(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>{const e=/^[a-z][a-z0-9+.-]*:\/\//i.test(t),n=/^[a-z][a-z0-9+.-]*:/i.test(t);if(e||n&&!t.includes("@"))return!0;const s=(t.includes("@")?t.split("@").pop():t).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(s)||!/\./.test(s))}}},addAttributes(){return{href:{default:null,parseHTML(t){return t.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!Y(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!Y(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",A(this.options.HTMLAttributes,t),0]:["a",A(this.options.HTMLAttributes,{...t,href:""}),0]},markdownTokenName:"link",parseMarkdown:(t,e)=>e.applyMark("link",e.parseInline(t.tokens||[]),{href:t.href,title:t.title||null}),renderMarkdown:(t,e)=>{var n,r,s,i;const o=(r=(n=t.attrs)==null?void 0:n.href)!=null?r:"",a=(i=(s=t.attrs)==null?void 0:s.title)!=null?i:"",l=e.renderChildren(t);return a?`[${l}](${o} "${a}")`:`[${l}](${o})`},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!Y(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e})=>{const{href:n}=t||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!Y(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[re({find:t=>{const e=[];
vendor: 2,154 bytes, lines 30-31
30if(t){const{protocols:n,defaultProtocol:r}=this.options,s=Lr(t).filter(i=>i.isLink&&this.options.isAllowedUri(i.value,{defaultValidate:o=>!!Y(o,n),protocols:n,defaultProtocol:r}));s.length&&s.forEach(i=>{this.options.shouldAutoLink(i.value)&&e.push({text:i.value,data:{href:i.href},index:i.start})})}return e},type:this.type,getAttributes:t=>{var e;return{href:(e=t.data)==null?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(oi({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:s=>!!Y(s,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),t.push(ai({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&t.push(li({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),t}}),ui=Object.defineProperty,di=(t,e)=>{for(var n in e)ui(t,n,{get:e[n],enumerable:!0})},pi="listItem",_n="textStyle",$n=/^\s*([-+*])\s$/,Cr=P.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",A(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>t.type!=="list"||t.ordered?[]:{type:"bulletList",content:t.items?e.parseChildren(t.items):[]},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,` 31`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(pi,this.editor.getAttributes(_n)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}}
31,addInputRules(){let t=he({find:$n,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=he({find:$n,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(_n),editor:this.editor})),[t]}}),hi=(t,e,n)=>{const{selection:r}=t;if(!r.empty)return null;const{$from:s}=r;if(!s.parent.isTextblock||s.parentOffset!==s.parent.content.size)return null;let i=-1;for(let h=s.depth;h>0;h-=1)if(s.node(h).type.name===e){i=h;break}if(i<0)return null;const o=s.node(i),a=s.index(i);if(a+1>=o.childCount)return null;const l=o.child(a+1);if(!n.includes(l.type.name))return null;const c=t.schema.nodes[e];let d=!1;if(l.forEach(h=>{h.type===c&&h.childCount>1&&(d=!0)}),!d)return null;const u=t.doc.resolve(s.after()).nodeAfter;if(!u||!n.includes(u.type.name))return null;const p=[];return u.forEach(h=>{p.push(h)}),p.length===0?null:{listItemDepth:i,nestedList:u,nestedListPos:s.after(),insertPos:s.after(i),items:p}},fi=(t,e,n,r)=>{const s=hi(t,n,r);if(!s)return!1;const{selection:i}=t,{nestedList:o,nestedListPos:a,insertPos:l,items:c}=s,d=t.tr;d.delete(a,a+o.nodeSize);const u=d.mapping.map(l);return d.insert(u,qt.from(c)),d.setSelection(i.map(d.doc,d.mapping)),e&&e(d),!0},mi=(t,e,n)=>fi(t.state,t.view.dispatch,e,n),xr=(t,e)=>B.create({name:`${t}BranchingDeleteKeymap`,priority:101,addKeyboardShortcuts(){const n=()=>mi(this.editor,t,e);return{Delete:n,"Mod-Delete":n}}});function gi(t){var e,n;const r=(e=t.tokens)==null?void 0:e[0];return!!(t.text&&((n=t.tokens)==null?void 0:n.length)===1&&(r==null?void 0:r.type)==="list"&&r.ordered&&r.raw===t.text)}function ki(t,e){return e.tokenizeInline?e.parseInline(e.tokenizeInline(t)):e.parseInline([{type:"text",raw:t,text:t}])}var Mr=P.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",A(this.options.HTMLAttributes,t),0]},markdownTokenName:"list_item",parseMarkdown:(t,e)=>{var n;if(t.type!=="list_item")return[];const r=(n=e.parseBlockChildren)!=null?n:e.parseChildren;let s=[];if(t.tokens&&t.tokens.length>0){if(gi(t))return{type:"listItem",content:[{type:"paragraph",content:ki(t.text||"",e)}]};if(t.tokens.some(o=>o.type==="paragraph"))s=r(t.tokens);else{const o=t.tokens[0];if(o&&o.type==="text"&&o.tokens&&o.tokens.length>0){if(s=[{type:"paragraph",content:e.parseInline(o.tokens)}],t.tokens.length>1){const l=t.tokens.slice(1),c=r(l);s.push(...c)}}else s=r(t.tokens)}}return s.length===0&&(s=[{type:"paragraph",content:[]}]),{type:"listItem",content:s}},renderMarkdown:(t,e,n)=>Yn(t,e,r=>{var s,i;return r.parentType==="bulletList"?"- ":r.parentType==="orderedList"?`${(((i=(s=r.meta)==null?void 0:s.parentAttrs)==null?void 0:i.start)||1)+r.index}. `:"- "},n),addExtensions(){return[xr(this.name,[this.options.bulletListTypeName,this.options.orderedListTypeName])]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),yi={};di(yi,{findListItemPos:()=>It,getNextListDepth:()=>Sn,handleBackspace:()=>ln,handleDelete:()=>cn,hasListBefore:()=>Ir,hasListItemAfter:()=>vi,hasListItemBefore:()=>wi,listItemHasSubList:()=>bi,nextListIsDeeper:()=>Rr,nextListIsHigher:()=>Nr});var It=(t,e)=>{const{$from:n}=e.selection,r=Zn(t,e.schema);let s=null,i=n.depth,o=n.pos,a=null;for(;i>0&&a===null;)s=n.node(i),s.type===r?a=i:(i-=1,o-=1);return a===null?null:{$pos:e.doc.resolve(o),depth:a}},Sn=(t,e)=>{const n=It(t,e);if(!n)return!1;const[,r]=Zr(e,t,n.$pos.pos+4);return r},Ir=(t,e,n)=>{const{$anchor:r}=t.selection,s=Math.max(0,r.pos-2),i=t.doc.resolve(s).node();return!(!i||!n.includes(i.type.name))},ln=(t,e,n)=>{if(t.commands.undoInputRule())return!0;if(t.state.selection.from!==t.state.selection.to)return!1;if(!Vt(t.state,e)&&Ir(t.state,e,n)){const{$anchor:r}=t.state.selection,s=t.state.doc.resolve(r.before()-1),i=[];s.node().descendants((l,c)=>{l.type.name===e&&i.push({node:l,pos:c})});const o=i.at(-1);if(!o)return!1;const a=t.state.doc.resolve(s.start()+o.pos+1);return t.chain().cut({from:r.start()-1,to:r.end()+1},a.end()).joinForward().run()}return!Vt(t.state,e)||!Qr(t.state)?!1:t.chain().liftListItem(e).run()},Rr=(t,e)=>{const n=Sn(t,e),r=It(t,e);return!r||!n?!1:n>r.depth},Nr=(t,e)=>{const n=Sn(t,e),r=It(t,e);return!r||!n?!1:n<r.depth},cn=(t,e)=>{if(!Vt(t.state,e)||!Yr(t.state,e))return!1;const{selection:n}=t.state,{$from:r,$to:s}=n;return!n.empty&&r.sameParent(s)?!1:Rr(e,t.state)?t.chain().focus(t.state.selection.from+4).lift(e).joinBackward().run():Nr(e,t.state)?t.chain().joinForward().joinBackward().run():t.commands.joinItemForward()},vi=(t,e)=>{var n;const{$anchor:r}=e.selection,s=e.doc.resolve(r.pos-r.parentOffset-2);return!(s.index()===s.parent.childCount-1||((n=s.nodeAfter)==null?void 0:n.type.name)!==t)},wi=(t,e)=>{var n;const{$anchor:r}=e.selection,s=e.doc.resolve(r.pos-2);return!(s.index()===0||((n=s.nodeBefore)==null?void 0:n.type.name)!==t)},bi=(t,e,n)=>{if(!n)return!1;const r=Zn(t,e.schema);let s=!1;return n.descendants(i=>{i.type===r&&(s=!0)}),s},Or=B.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:t})=>{let e=!1;
31return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&cn(t,n)&&(e=!0)}),e},"Mod-Delete":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&cn(t,n)&&(e=!0)}),e},Backspace:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&ln(t,n,r)&&(e=!0)}),e},"Mod-Backspace":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&ln(t,n,r)&&(e=!0)}),e}}}}),Un=/^(\s*)(\d+)\.\s+(.*)$/,Si=/^\s/;function Ti(t){const e=t.trimStart();return/^[-+*]\s+/.test(e)||/^\d+\.\s+/.test(e)||/^>\s?/.test(e)||/^```/.test(e)||/^~~~/.test(e)}function Ei(t){const e=[],n=[];let r=!1;return t.forEach(s=>{if(r){n.push(s);return}if(s.trim()===""){r=!0,n.push(s);return}if(e.length>0&&Ti(s)){r=!0,n.push(s);return}e.push(s)}),{paragraphLines:e,blockLines:n}}function Ai(t){const e=[];let n=0,r=0;for(;n<t.length;){const s=t[n],i=s.match(Un);if(!i)break;const[,o,a,l]=i,c=o.length,d=[l];let u=n+1;const p=[s];let h=!1;for(;u<t.length;){const m=t[u];if(m.match(Un))break;if(m.trim()==="")p.push(m),d.push(""),h=!0,u+=1;else if(m.match(Si))p.push(m),d.push(m.slice(c+2)),u+=1;else{if(h)break;p.push(m),d.push(m),u+=1}}e.push({indent:c,number:parseInt(a,10),content:d.join(` 32`).trim(),contentLines:d,raw:p.join(` 33`)}),r=u,n=u}return[e,r]}function Pr(t,e,n){const r=[];let s=0;for(;s<t.length;){const i=t[s];if(i.indent===e){const{paragraphLines:o,blockLines:a}=Ei(i.contentLines),l=o.join(` 34`).trim(),c=[];l&&c.push({type:"paragraph",raw:l,tokens:n.inlineTokens(l)});const d=a.join(` 35`).trim();if(d){const h=n.blockTokens(d);c.push(...h)}let u=s+1;const p=[];for(;u<t.length&&t[u].indent>e;)p.push(t[u]),u+=1;if(p.length>0){const h=Math.min(...p.map(g=>g.indent)),m=Pr(p,h,n);c.push({type:"list",ordered:!0,start:p[0].number,items:m,raw:p.map(g=>g.raw).join(` 36`)})}r.push({type:"list_item",raw:i.raw,tokens:c}),s=u}else s+=1}return r}function Li(t,e){return t.map(n=>{if(n.type!=="list_item")return e.parseChildren([n])[0];const r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(s=>{if(s.type==="paragraph"||s.type==="list"||s.type==="blockquote"||s.type==="code")r.push(...e.parseChildren([s]));else if(s.type==="text"&&s.tokens){const i=e.parseChildren([s]);r.push({type:"paragraph",content:i})}else{const i=e.parseChildren([s]);i.length>0&&r.push(...i)}}),{type:"listItem",content:r}})}var Ci="listItem",jn="textStyle",Jn=/^(\d+)\.\s$/,Hr=P.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",A(this.options.HTMLAttributes,n),0]:["ol",A(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>{if(t.type!=="list"||!t.ordered)return[];const n=t.start||1,r=t.items?Li(t.items,e):[];return n!==1?{type:"orderedList",attrs:{start:n},content:r}:{type:"orderedList",content:r}},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,` 37`):"",markdownTokenizer:{name:"orderedList",level:"block",start:t=>{const e=t.match(/^(\s*)(\d+)\.\s+/),n=e==null?void 0:e.index;return n!==void 0?n:-1},tokenize:(t,e,n)=>{var r;const s=t.split(` 38`),[i,o]=Ai(s);if(i.length===0)return;const a=Pr(i,0,n);return a.length===0?void 0:{type:"list",ordered:!0,start:((r=i[0])==null?void 0:r.number)||1,items:a,raw:s.slice(0,o).join(` 39`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Ci,this.editor.getAttributes(jn)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}}
39,addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=he({find:Jn,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=he({find:Jn,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(jn)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),xi=/^\s*(\[([( |x])?\])\s$/,Mi=P.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",A(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(t,e)=>{const n=[];if(t.tokens&&t.tokens.length>0?n.push(e.createNode("paragraph",{},e.parseInline(t.tokens))):t.text?n.push(e.createNode("paragraph",{},[e.createNode("text",{text:t.text})])):n.push(e.createNode("paragraph",{},[])),t.nestedTokens&&t.nestedTokens.length>0){const r=e.parseChildren(t.nestedTokens);n.push(...r)}return e.createNode("taskItem",{checked:t.checked||!1},n)},renderMarkdown:(t,e)=>{var n;const s=`- [${(n=t.attrs)!=null&&n.checked?"x":" "}] `;return Yn(t,e,s)},addExtensions(){return this.options.nested?[xr(this.name,[this.options.taskListTypeName])]:[]},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{const s=document.createElement("li"),i=document.createElement("label"),o=document.createElement("span"),a=document.createElement("input"),l=document.createElement("div"),c=u=>{var p,h;a.ariaLabel=((h=(p=this.options.a11y)==null?void 0:p.checkboxLabel)==null?void 0:h.call(p,u,a.checked))||`Task item checkbox for ${u.textContent||"empty task item"}`};c(t),i.contentEditable="false",a.type="checkbox",a.addEventListener("mousedown",u=>u.preventDefault()),a.addEventListener("change",u=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){a.checked=!a.checked;return}const{checked:p}=u.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:h})=>{const m=n();if(typeof m!="number")return!1;const g=h.doc.nodeAt(m);return h.setNodeMarkup(m,void 0,{...g==null?void 0:g.attrs,checked:p}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,p)||(a.checked=!a.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([u,p])=>{s.setAttribute(u,p)}),s.dataset.checked=t.attrs.checked,a.checked=t.attrs.checked,i.append(a,o),s.append(i,l),Object.entries(e).forEach(([u,p])=>{s.setAttribute(u,p)});let d=new Set(Object.keys(e));return{dom:s,contentDOM:l,update:u=>{if(u.type!==this.type)return!1;s.dataset.checked=u.attrs.checked,a.checked=u.attrs.checked,c(u);const p=r.extensionManager.attributes,h=es(u,p),m=new Set(Object.keys(h)),g=this.options.HTMLAttributes;return d.forEach(k=>{m.has(k)||(k in g?s.setAttribute(k,g[k]):s.removeAttribute(k))}),Object.entries(h).forEach(([k,y])=>{y==null?k in g?s.setAttribute(k,g[k]):s.removeAttribute(k):s.setAttribute(k,y)}),d=m,!0}}}}
39,addInputRules(){return[he({find:xi,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),Ii=P.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",A(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},parseMarkdown:(t,e)=>e.createNode("taskList",{},e.parseChildren(t.items||[])),renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,` 40`):"",markdownTokenizer:{name:"taskList",level:"block",start(t){var e;const n=(e=t.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:e.index;return n!==void 0?n:-1},tokenize(t,e,n){const r=i=>{const o=Ln(i,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:a=>({indentLevel:a[1].length,mainContent:a[4],checked:a[3].toLowerCase()==="x"}),createToken:(a,l)=>({type:"taskItem",raw:"",mainContent:a.mainContent,indentLevel:a.indentLevel,checked:a.checked,text:a.mainContent,tokens:n.inlineTokens(a.mainContent),nestedTokens:l}),customNestedParser:r},n);return o?[{type:"taskList",raw:o.raw,items:o.items}]:n.blockTokens(i)},s=Ln(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:i=>({indentLevel:i[1].length,mainContent:i[4],checked:i[3].toLowerCase()==="x"}),createToken:(i,o)=>({type:"taskItem",raw:"",mainContent:i.mainContent,indentLevel:i.indentLevel,checked:i.checked,text:i.mainContent,tokens:n.inlineTokens(i.mainContent),nestedTokens:o}),customNestedParser:r},n);if(s)return{type:"taskList",raw:s.raw,items:s.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});B.create({name:"listKit",addExtensions(){const t=[];return this.options.bulletList!==!1&&t.push(Cr.configure(this.options.bulletList)),this.options.listItem!==!1&&t.push(Mr.configure(this.options.listItem)),this.options.listKeymap!==!1&&t.push(Or.configure(this.options.listKeymap)),this.options.orderedList!==!1&&t.push(Hr.configure(this.options.orderedList)),this.options.taskItem!==!1&&t.push(Mi.configure(this.options.taskItem)),this.options.taskList!==!1&&t.push(Ii.configure(this.options.taskList)),t}});var Ke=" ",Jt="Â ",Ri=P.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",A(this.options.HTMLAttributes,t),0]},parseMarkdown:(t,e)=>{const n=t.tokens||[];if(n.length===1&&n[0].type==="image")return e.parseChildren([n[0]]);const r=e.parseInline(n);return n.length===1&&n[0].type==="text"&&(n[0].raw===Ke||n[0].text===Ke||n[0].raw===Jt||n[0].text===Jt)&&r.length===1&&r[0].type==="text"&&(r[0].text===Ke||r[0].text===Jt)?e.createNode("paragraph",void 0,[]):e.createNode("paragraph",void 0,r)},renderMarkdown:(t,e,n)=>{var r,s;if(!t)return"";const i=Array.isArray(t.content)?t.content:[];if(i.length===0){const o=Array.isArray((r=n==null?void 0:n.previousNode)==null?void 0:r.content)?n.previousNode.content:[];return((s=n==null?void 0:n.previousNode)==null?void 0:s.type)==="paragraph"&&o.length===0?Ke:""}return e.renderChildren(i)},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Ni=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Oi=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,Pi=ke.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",A(this.options.HTMLAttributes,t),0]},markdownTokenName:"del",parseMarkdown:(t,e)=>e.applyMark("strike",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`~~${e.renderChildren(t)}~~`,addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}}
vendor: 5,095 bytes, line 40
40,addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[fe({find:Ni,type:this.type})]},addPasteRules(){return[re({find:Oi,type:this.type})]}}),Hi=P.create({name:"text",group:"inline",parseMarkdown:t=>({type:"text",text:t.text||""}),renderMarkdown:t=>t.text||""}),Di=ke.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",A(this.options.HTMLAttributes,t),0]},parseMarkdown(t,e){return e.applyMark(this.name||"underline",e.parseInline(t.tokens||[]))},renderMarkdown(t,e){return`++${e.renderChildren(t)}++`},markdownTokenizer:{name:"underline",level:"inline",start(t){return t.indexOf("++")},tokenize(t,e,n){const s=/^(\+\+)([\s\S]+?)(\+\+)/.exec(t);if(!s)return;const i=s[2].trim();return{type:"underline",raw:s[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function zi(t={}){return new z({view(e){return new Bi(e,t)}})}class Bi{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(s=>{let i=o=>{this[s](o)};return e.dom.addEventListener(s,i),{name:s,handler:i}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r,s=this.editorView.dom,i=s.getBoundingClientRect(),o=i.width/s.offsetWidth,a=i.height/s.offsetHeight;if(n){let u=e.nodeBefore,p=e.nodeAfter;if(u||p){let h=this.editorView.nodeDOM(this.cursorPos-(u?u.nodeSize:0));if(h){let m=h.getBoundingClientRect(),g=u?m.bottom:m.top;u&&p&&(g=(g+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let k=this.width/2*a;r={left:m.left,right:m.right,top:g-k,bottom:g+k}}}}if(!r){let u=this.editorView.coordsAtPos(this.cursorPos),p=this.width/2*o;r={left:u.left-p,right:u.left+p,top:u.top,bottom:u.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let c,d;if(!l||l==document.body&&getComputedStyle(l).position=="static")c=-pageXOffset,d=-pageYOffset;else{let u=l.getBoundingClientRect(),p=u.width/l.offsetWidth,h=u.height/l.offsetHeight;c=u.left-l.scrollLeft*p,d=u.top-l.scrollTop*h}this.element.style.left=(r.left-c)/o+"px",this.element.style.top=(r.top-d)/a+"px",this.element.style.width=(r.right-r.left)/o+"px",this.element.style.height=(r.bottom-r.top)/a+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),s=r&&r.type.spec.disableDropCursor,i=typeof s=="function"?s(this.editorView,n,e):s;if(n&&!i){let o=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=ts(this.editorView.state.doc,o,this.editorView.dragging.slice);a!=null&&(o=a)}this.setCursor(o),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class T extends Oe{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return T.valid(r)?new T(r):Oe.near(r)}content(){return er.empty}eq(e){return e instanceof T&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new T(e.resolve(n.pos))}getBookmark(){return new Tn(this.anchor)}static valid(e){let n=e.parent;if(n.inlineContent||!Fi(e)||!_i(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let s=n.contentMatchAt(e.index()).defaultType;return s&&s.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&T.valid(e))return e;let s=e.pos,i=null;for(let o=e.depth;;o--){let a=e.node(o);if(n>
vendor: 10,555 bytes, line 40
400?e.indexAfter(o)<a.childCount:e.index(o)>0){i=a.child(n>0?e.indexAfter(o):e.index(o)-1);break}else if(o==0)return null;s+=n;let l=e.doc.resolve(s);if(T.valid(l))return l}for(;;){let o=n>0?i.firstChild:i.lastChild;if(!o){if(i.isAtom&&!i.isText&&!un.isSelectable(i)){e=e.doc.resolve(s+i.nodeSize*n),r=!1;continue e}break}i=o,s+=n;let a=e.doc.resolve(s);if(T.valid(a))return a}return null}}}T.prototype.visible=!1;T.findFrom=T.findGapCursorFrom;Oe.jsonID("gapcursor",T);class Tn{constructor(e){this.pos=e}map(e){return new Tn(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return T.valid(n)?new T(n):Oe.near(n)}}function Dr(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor}function Fi(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let s=r.child(n-1);;s=s.lastChild){if(s.childCount==0&&!s.inlineContent||Dr(s.type))return!0;if(s.inlineContent)return!1}}return!0}function _i(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let s=r.child(n);;s=s.firstChild){if(s.childCount==0&&!s.inlineContent||Dr(s.type))return!0;if(s.inlineContent)return!1}}return!0}function $i(){return new z({props:{decorations:Ki,createSelectionBetween(t,e,n){return e.pos==n.pos&&T.valid(n)?new T(n):null},handleClick:ji,handleKeyDown:Ui,handleDOMEvents:{beforeinput:Ji}}})}const Ui=ns({ArrowLeft:We("horiz",-1),ArrowRight:We("horiz",1),ArrowUp:We("vert",-1),ArrowDown:We("vert",1)});function We(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,s,i){let o=r.selection,a=e>0?o.$to:o.$from,l=o.empty;if(o instanceof te){if(!i.endOfTextblock(n)||a.depth==0)return!1;l=!1,a=r.doc.resolve(e>0?a.after():a.before())}let c=T.findGapCursorFrom(a,e,l);return c?(s&&s(r.tr.setSelection(new T(c))),!0):!1}}function ji(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!T.valid(r))return!1;let s=t.posAtCoords({left:n.clientX,top:n.clientY});return s&&s.inside>-1&&un.isSelectable(t.state.doc.nodeAt(s.inside))?!1:(t.dispatch(t.state.tr.setSelection(new T(r))),!0)}function Ji(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof T))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let s=qt.empty;for(let o=r.length-1;o>=0;o--)s=qt.from(r[o].createAndFill(null,s));let i=t.state.tr.replace(n.pos,n.pos,new er(s,0,0));return i.setSelection(te.near(i.doc.resolve(n.pos+1))),t.dispatch(i),!1}function Ki(t){if(!(t.selection instanceof T))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",Pe.create(t.doc,[xt.widget(t.selection.head,e,{key:"gapcursor"})])}var Ct=200,C=function(){};C.prototype.append=function(e){return e.length?(e=C.from(e),!this.length&&e||e.length<Ct&&this.leafAppend(e)||this.length<Ct&&e.leafPrepend(this)||this.appendInner(e)):this};C.prototype.prepend=function(e){return e.length?C.from(e).append(this):this};C.prototype.appendInner=function(e){return new Wi(this,e)};C.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?C.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};C.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};C.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};C.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var s=[];return this.forEach(function(i,o){return s.push(e(i,o))},n,r),s};C.from=function(e){return e instanceof C?e:e&&e.length?new zr(e):C.empty};var zr=function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(s,i){return s==0&&i==this.length?this:new e(this.values.slice(s,i))},e.prototype.getInner=function(s){return this.values[s]},e.prototype.forEachInner=function(s,i,o,a){for(var l=i;l<o;l++)if(s(this.values[l],a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(s,i,o,a){for(var l=i-1;l>=o;l--)if(s(this.values[l],a+l)===!1)return!1},e.prototype.leafAppend=function(s){if(this.length+s.length<=Ct)return new e(this.values.concat(s.flatten()))},e.prototype.leafPrepend=function(s){if(this.length+s.length<=Ct)return new e(s.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(C);C.empty=new zr([]);var Wi=function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,s,i,o){var a=this.left.length;if(s<a&&this.left.forEachInner(r,s,Math.min(i,a),o)===!1||i>a&&this.right.forEachInner(r,Math.max(s-a,0),Math.min(this.length,i)-a,o+a)===!1)return!1},e.prototype.forEachInvertedInner=function(r,s,i,o){var a=this.left.length;if(s>a&&this.right.forEachInvertedInner(r,s-a,Math.max(i,a)-a,o+a)===!1||i<a&&this.left.forEachInvertedInner(r,Math.min(s,a),i,o)===!1)return!1},e.prototype.sliceInner=function(r,s){if(r==0&&s==this.length)return this;var i=this.left.length;return s<=i?this.left.slice(r,s):r>=i?this.right.slice(r-i,s-i):this.left.slice(r,i).append(this.right.slice(0,s-i))},e.prototype.leafAppend=function(r){var s=this.right.leafAppend(r);if(s)return new e(this.left,s)},e.prototype.leafPrepend=function(r){var s=this.left.leafPrepend(r);if(s)return new e(s,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(C);const Gi=500;class F{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let s,i;n&&(s=this.remapping(r,this.items.length),i=s.maps.length);let o=e.tr,a,l,c=[],d=[];return this.items.forEach((u,p)=>{if(!u.step){s||(s=this.remapping(r,p+1),i=s.maps.length),i--,d.push(u);return}if(s){d.push(new j(u.map));let h=u.step.map(s.slice(i)),m;h&&o.maybeStep(h).doc&&(m=o.mapping.maps[o.mapping.maps.length-1],c.push(new j(m,void 0,void 0,c.length+d.length))),i--,m&&s.appendMap(m,i)}else o.maybeStep(u.step);if(u.selection)return a=s?u.selection.map(s.slice(i)):u.selection,l=new F(this.items.slice(0,r).append(d.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:o,selection:a}}addTransform(e,n,r,s){let i=[],o=this.eventCount,a=this.items,l=!s&&a.length?a.get(a.length-1):null;for(let d=0;d<e.steps.length;d++){let u=e.steps[d].invert(e.docs[d]),p=new j(e.mapping.maps[d],u,n),h;(h=l&&l.merge(p))&&(p=h,d?i.pop():a=a.slice(0,a.length-1)),i.push(p),n&&(o++,n=void 0),s||(l=p)}let c=o-r.depth;return c>qi&&(a=Vi(a,c),o-=c),new F(a.append(i),o)}remapping(e,n){let r=new rs;return this.items.forEach((s,i)=>{let o=s.mirrorOffset!=null&&i-s.mirrorOffset>=e?r.maps.length-s.mirrorOffset:void 0;r.appendMap(s.map,o)},e,n),r}addMaps(e){return this.eventCount==0?this:new F(this.items.append(e.map(n=>new j(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],s=Math.max(0,this.items.length-n),i=e.mapping,o=e.steps.length,a=this.eventCount;this.items.forEach(p=>{p.selection&&a--},s);let l=n;this.items.forEach(p=>{let h=i.getMirror(--l);if(h==null)return;o=Math.min(o,h);let m=i.maps[h];if(p.step){let g=e.steps[h].invert(e.docs[h]),k=p.selection&&p.selection.map(i.slice(l+1,h));k&&a++,r.push(new j(m,g,k))}else r.push(new j(m))},s);let c=[];for(let p=n;p<o;p++)c.push(new j(i.maps[p]));let d=this.items.slice(0,s).append(c).append(r),u=new F(d,a);return u.emptyItemCount()>Gi&&(u=u.compress(this.items.length-r.length)),u}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,s=[],i=0;return this.items.forEach((o,a)=>{if(a>=e)s.push(o),o.selection&&i++;else if(o.step){let l=o.step.map(n.slice(r)),c=l&&l.getMap();if(r--,c&&n.appendMap(c,r),l){let d=o.selection&&o.selection.map(n.slice(r));d&&i++;let u=new j(c.invert(),l,d),p,h=s.length-1;(p=s.length&&s[h].merge(u))?s[h]=p:s.push(u)}}else o.map&&r--},this.items.length,0),new F(C.from(s.reverse()),i)}}F.empty=new F(C.empty,0);function Vi(t,e){let n;return t.forEach((r,s)=>{if(r.selection&&e--==0)return n=s,!1}),t.slice(n)}class j{constructor(e,n,r,s){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=s}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new j(n.getMap().invert(),n,this.selection)}}}class Q{constructor(e,n,r,s,i){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=s,this.prevComposition=i}}const qi=20;function Xi(t,e,n,r){let s=n.getMeta(ne),i;if(s)return s.historyState;n.getMeta(Zi)&&(t=new Q(t.done,t.undone,null,0,-1));let o=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(o&&o.getMeta(ne))return o.getMeta(ne).redo?new Q(t.done.addTransform(n,void 0,r,Ye(e)),t.undone,Kn(n.mapping.maps),t.prevTime,t.prevComposition):new Q(t.done,t.undone.addTransform(n,void 0,r,Ye(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=t.prevTime==0||!o&&t.prevComposition!=a&&(t.prevTime<(n.time||0)-r.newGroupDelay||!Qi(n,t.prevRanges)),c=o?Kt(t.prevRanges,n.mapping):Kn(n.mapping.maps);return new Q(t.done.addTransform(n,l?e.selection.getBookmark():void 0,r,Ye(e)),F.empty,c,n.time,a??t.prevComposition)}else return(i=n.getMeta("rebased"))?new Q(t.done.rebased(n,i),t.undone.rebased(n,i),Kt(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new Q(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),Kt(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function Qi(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,s)=>{for(let i=0;i<e.length;i+=2)r<=e[i+1]&&s>=e[i]&&(n=!0)}),n}function Kn(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;
40n--)t[n].forEach((r,s,i,o)=>e.push(i,o));return e}function Kt(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let s=e.map(t[r],1),i=e.map(t[r+1],-1);s<=i&&n.push(s,i)}return n}function Yi(t,e,n){let r=Ye(e),s=ne.get(e).spec.config,i=(n?t.undone:t.done).popEvent(e,r);if(!i)return null;let o=i.selection.resolve(i.transform.doc),a=(n?t.done:t.undone).addTransform(i.transform,e.selection.getBookmark(),s,r),l=new Q(n?a:i.remaining,n?i.remaining:a,null,0,-1);return i.transform.setSelection(o).setMeta(ne,{redo:n,historyState:l})}let Wt=!1,Wn=null;function Ye(t){let e=t.plugins;if(Wn!=e){Wt=!1,Wn=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){Wt=!0;break}}return Wt}const ne=new _("history"),Zi=new _("closeHistory");function eo(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new z({key:ne,state:{init(){return new Q(F.empty,F.empty,null,0,-1)},apply(e,n,r){return Xi(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,s=r=="historyUndo"?Fr:r=="historyRedo"?_r:null;return!s||!e.editable?!1:(n.preventDefault(),s(e.state,e.dispatch))}}}})}function Br(t,e){return(n,r)=>{let s=ne.getState(n);if(!s||(t?s.undone:s.done).eventCount==0)return!1;if(r){let i=Yi(s,n,t);i&&r(e?i.scrollIntoView():i)}return!0}}const Fr=Br(!1,!0),_r=Br(!0,!0);B.create({name:"characterCount",addOptions(){return{limit:null,autoTrim:!0,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc;if(((t==null?void 0:t.mode)||this.options.mode)==="textSize"){const r=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(r)}return e.nodeSize},this.storage.words=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc,n=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let t=!1;return[new z({key:new _("characterCount"),appendTransaction:(e,n,r)=>{if(t)return;const s=this.options.limit,i=this.options.autoTrim;if(s==null||s===0||i===!1){t=!0;return}const o=this.storage.characters({node:r.doc});if(o>s){const a=o-s,l=0,c=a;console.warn(`[CharacterCount] Initial content exceeded limit of ${s} characters. Content was automatically trimmed.`);const d=r.tr.deleteRange(l,c);return t=!0,d}t=!0},filterTransaction:(e,n)=>{const r=this.options.limit;if(!e.docChanged||r===0||r===null||r===void 0)return!0;const s=this.storage.characters({node:n.doc}),i=this.storage.characters({node:e.doc});if(i<=r||s>r&&i>r&&i<=s)return!0;if(s>r&&i>r&&i>s||!e.getMeta("paste"))return!1;const a=e.selection.$head.pos,l=i-r,c=a-l,d=a;return e.deleteRange(c,d),!(this.storage.characters({node:e.doc})>r)}})]}});var to=B.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[zi(this.options)]}});B.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new z({key:new _("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:s}=e,i=[];if(!n||!r)return Pe.create(t,[]);let o=0;this.options.mode==="deepest"&&t.descendants((l,c)=>{if(l.isText)return;if(!(s>=c&&s<=c+l.nodeSize-1))return!1;o+=1});let a=0;return t.descendants((l,c)=>{if(l.isText||!(s>=c&&s<=c+l.nodeSize-1))return!1;if(a+=1,this.options.mode==="deepest"&&o-a>0||this.options.mode==="shallowest"&&a>1)return this.options.mode==="deepest";i.push(xt.node(c,c+l.nodeSize,{class:this.options.className}))}),Pe.create(t,i)}}})]}});var no=B.create({name:"gapCursor",addProseMirrorPlugins(){return[$i()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=ss(is(t,"allowGapCursor",n)))!=null?e:null}}}),$r="placeholder",Be=new _("tiptap__placeholder"),Gn=200;function Vn(t){const{editor:e,placeholder:n,dataAttribute:r,pos:s,node:i,isEmptyDoc:o,hasAnchor:a,classes:{emptyNode:l,emptyEditor:c}}=t,d=[l];return o&&d.push(c),xt.node(s,s+i.nodeSize,{class:d.join(" "),[r]:typeof n=="function"?n({editor:e,node:i,pos:s,hasAnchor:a}):n})}function qn(t,e){return typeof t=="function"?t(e):t}function ro({editor:t,options:e,dataAttribute:n,doc:r,selection:s}){var i,o;if(!(t.isEditable||!e.showOnlyWhenEditable))return null;const{anchor:l}=s,c=[],d=t.isEmpty;if(e.showOnlyCurrent&&!e.includeChildren){const p=r.resolve(l),h=p.depth>0?p.node(1):p.nodeAfter,m=p.depth>
400?p.before(1):l;if(h&&h.type.isTextblock&&Cn(h)){const g=l>=m&&l<=m+h.nodeSize;c.push(Vn({editor:t,isEmptyDoc:d,dataAttribute:n,hasAnchor:g,placeholder:e.placeholder,classes:{emptyEditor:e.emptyEditorClass,emptyNode:qn(e.emptyNodeClass,{editor:t,node:h,pos:m,hasAnchor:g})},node:h,pos:m}))}}else{const p=Be.getState(t.state),h=(i=p==null?void 0:p.topPos)!=null?i:0,m=(o=p==null?void 0:p.bottomPos)!=null?o:r.content.size;r.nodesBetween(h,m,(g,k)=>{const y=l>=k&&l<=k+g.nodeSize,N=!g.isLeaf&&Cn(g);return g.type.isTextblock&&(y||!e.showOnlyCurrent)&&N&&c.push(Vn({editor:t,isEmptyDoc:d,dataAttribute:n,hasAnchor:y,placeholder:e.placeholder,classes:{emptyEditor:e.emptyEditorClass,emptyNode:qn(e.emptyNodeClass,{editor:t,node:g,pos:k,hasAnchor:y})},node:g,pos:k})),e.includeChildren})}return Pe.create(r,c)}function so(t){return t.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}function io(t){const e=getComputedStyle(t),n=`${e.overflow} ${e.overflowY} ${e.overflowX}`;return/auto|scroll|overlay/.test(n)}function oo(t){let e=t;for(;e;){if(io(e))return e;const n=e.parentElement;if(!n){const r=e.getRootNode();if(r instanceof ShadowRoot){e=r.host;continue}return window}e=n}return window}function ao(t){return t===window?{top:0,bottom:window.innerHeight}:t.getBoundingClientRect()}function lo({doc:t,view:e,scrollContainer:n}){const r=e.dom.getBoundingClientRect(),s=n?ao(n):{top:0,bottom:window.innerHeight},i=Math.max(r.top,s.top)-Gn,o=Math.min(r.bottom,s.bottom)+Gn;if(i>=o)return{top:0,bottom:t.content.size};const l=getComputedStyle(e.dom).direction==="rtl"?Math.max(r.right-2,r.left+2):r.left+2,c=e.posAtCoords({left:l,top:i+2}),d=e.posAtCoords({left:l,top:o-2});return{top:c?c.pos:0,bottom:d?d.pos:t.content.size}}var co={init(){return{topPos:null,bottomPos:null}},apply(t,e){const n=t.getMeta(Be);return n!=null&&n.positions?{topPos:n.positions.top,bottomPos:n.positions.bottom}:t.docChanged?{topPos:e.topPos!==null?t.mapping.map(e.topPos):null,bottomPos:e.bottomPos!==null?t.mapping.map(e.bottomPos):null}:e}};function uo(t){const e=oo(t.dom),n=()=>{const a=lo({view:t,doc:t.state.doc,scrollContainer:e}),l=Be.getState(t.state);if((l==null?void 0:l.topPos)===a.top&&(l==null?void 0:l.bottomPos)===a.bottom)return;const c=t.state.tr.setMeta(Be,{positions:a});t.dispatch(c)};let r=null,s=0;const i=150,o=()=>{r===null&&(r=requestAnimationFrame(()=>{r=null;const a=performance.now();a-s>=i?(s=a,n()):o()}))};return e.addEventListener("scroll",o,{passive:!0}),n(),{update(a,l){t.state.doc.content.size!==l.doc.content.size&&o()},destroy:()=>{r!==null&&cancelAnimationFrame(r),e.removeEventListener("scroll",o)}}}function po({editor:t,options:e}){const n=e.dataAttribute?`data-${so(e.dataAttribute)}`:`data-${$r}`;return new z({key:Be,state:co,view:uo,props:{decorations:({doc:r,selection:s})=>ro({editor:t,options:e,dataAttribute:n,doc:r,selection:s})}})}B.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:$r,placeholder:"Write something â¦",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[po({editor:this.editor,options:this.options})]}});var ho=`.ProseMirror:not(.ProseMirror-focused) *::selection { 41 background: transparent; 42} 43 44.ProseMirror:not(.ProseMirror-focused) *::-moz-selection { 45 background: transparent; 46}`;B.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:t,options:e}=this;return t.options.injectCSS&&typeof document<"u"&&os(ho,t.options.injectNonce,"selection"),[new z({key:new _("selection"),props:{decorations(n){return n.selection.empty||t.isFocused||!t.isEditable||Qn(n.selection)||t.view.dragging?null:Pe.create(n.doc,[xt.inline(n.selection.from,n.selection.to,{class:e.className})])}}})]}});var fo="skipTrailingNode";function Xn({types:t,node:e}){return e&&Array.isArray(t)&&t.includes(e.type)||(e==null?void 0:e.type)===t}var mo=B.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var t;const e=new _(this.name),n=this.options.node||((t=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:t.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,s])=>s).filter(s=>(this.options.notAfter||[]).concat(n).includes(s.name));return[new z({key:e,appendTransaction:(s,i,o)=>{const{doc:a,tr:l,schema:c}=o,d=e.getState(o),u=a.content.size,p=c.nodes[n];if(!s.some(h=>h.getMeta(fo))&&d)return l.insert(u,p.create())},state:{init:(s,i)=>{const o=i.tr.doc.lastChild;return!Xn({node:o,types:r})},apply:(s,i)=>{if(!s.docChanged||s.getMeta("__uniqueIDTransaction"))return i;const o=s.doc.lastChild;return!Xn({node:o,types:r})}}})]}}),go=B.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>Fr(t,e),redo:()=>({state:t,dispatch:e})=>_r(t,e)}},addProseMirrorPlugins(){return[eo(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()}}}),ko=B.create({name:"starterKit",addExtensions(){var t,e,n,r;const s=[];return this.options.bold!==!1&&s.push(Ss.configure(this.options.bold)),this.options.blockquote!==!1&&s.push(ks.configure(this.options.blockquote)),this.options.bulletList!==!1&&s.push(Cr.configure(this.options.bulletList)),this.options.code!==!1&&s.push(As.configure(this.options.code)),this.options.codeBlock!==!1&&s.push(xs.configure(this.options.codeBlock)),this.options.document!==!1&&s.push(Ms.configure(this.options.document)),this.options.dropcursor!==!1&&s.push(to.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&s.push(no.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&s.push(Is.configure(this.options.hardBreak)),this.options.heading!==!1&&s.push(Rs.configure(this.options.heading)),this.options.undoRedo!==!1&&s.push(go.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&s.push(Ns.configure(this.options.horizontalRule)),this.options.italic!==!1&&s.push(zs.configure(this.options.italic)),this.options.listItem!==!1&&s.push(Mr.configure(this.options.listItem)),this.options.listKeymap!==!1&&s.push(Or.configure((t=this.options)==null?void 0:t.listKeymap)),this.options.link!==!1&&s.push(ci.
46configure((e=this.options)==null?void 0:e.link)),this.options.orderedList!==!1&&s.push(Hr.configure(this.options.orderedList)),this.options.paragraph!==!1&&s.push(Ri.configure(this.options.paragraph)),this.options.strike!==!1&&s.push(Pi.configure(this.options.strike)),this.options.text!==!1&&s.push(Hi.configure(this.options.text)),this.options.underline!==!1&&s.push(Di.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&s.push(mo.configure((r=this.options)==null?void 0:r.trailingNode)),s}}),vo=ko;export{ko as StarterKit,vo as default};
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.