You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
163 KiB
9 lines
163 KiB
2 years ago
|
var In=Object.create;var Lt=Object.defineProperty,Hn=Object.defineProperties,Fn=Object.getOwnPropertyDescriptor,Wn=Object.getOwnPropertyDescriptors,zn=Object.getOwnPropertyNames,Mi=Object.getOwnPropertySymbols,qn=Object.getPrototypeOf,Di=Object.prototype.hasOwnProperty,Kn=Object.prototype.propertyIsEnumerable;var Oi=(n,t,e)=>t in n?Lt(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Se=(n,t)=>{for(var e in t||(t={}))Di.call(t,e)&&Oi(n,e,t[e]);if(Mi)for(var e of Mi(t))Kn.call(t,e)&&Oi(n,e,t[e]);return n},ke=(n,t)=>Hn(n,Wn(t)),Ti=n=>Lt(n,"__esModule",{value:!0});var $n=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports),jn=(n,t)=>{Ti(n);for(var e in t)Lt(n,e,{get:t[e],enumerable:!0})},Gn=(n,t,e)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of zn(t))!Di.call(n,i)&&i!=="default"&&Lt(n,i,{get:()=>t[i],enumerable:!(e=Fn(t,i))||e.enumerable});return n},Ri=n=>Gn(Ti(Lt(n!=null?In(qn(n)):{},"default",n&&n.__esModule&&"default"in n?{get:()=>n.default,enumerable:!0}:{value:n,enumerable:!0})),n);var Ce=(n,t,e)=>new Promise((i,s)=>{var r=h=>{try{l(e.next(h))}catch(a){s(a)}},o=h=>{try{l(e.throw(h))}catch(a){s(a)}},l=h=>h.done?i(h.value):Promise.resolve(h.value).then(r,o);l((e=e.apply(n,t)).next())});var Ei=$n(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});require("obsidian");var Un=n=>{var t;return n?(t=n.plugins.plugins.dataview)===null||t===void 0?void 0:t.api:window.DataviewAPI},Jn=n=>n.plugins.enabledPlugins.has("dataview");Zt.getAPI=Un;Zt.isPluginEnabled=Jn});jn(exports,{default:()=>Ci});var Nn=Ri(Ei()),Et=Ri(require("obsidian"));var x=class{constructor(){}lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,e,i){let s=[];return this.decompose(0,t,s,2),i.length&&i.decompose(0,i.length,s,1|2),this.decompose(e,this.length,s,1),G.from(s,this.length-(e-t)+i.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,e=this.length){let i=[];return this.decompose(t,e,i,0),G.from(i,e-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let e=this.scanIdentical(t,1),i=this.length-this.scanIdentical(t,-1),s=new yt(this),r=new yt(t);for(let o=e,l=e;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(l+=s.value.length,s.done||l>=i)return!0}}iter(t=1){return new yt(this,t)}iterRange(t,e=this.length){return new Ae(this,t,e)}iterLines(t,e){let i;if(t==null)i=this.iter();else{e==null&&(e=this.lines+1);let s=this.line(t).from;i=this.iterRange(s,Math.max(s,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new Me(i)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}static of(t){if(t.length==0)throw new RangeError("A document must have at least one line");return t.length==1&&!t[0]?x.empty:t.length<=32?new D(t):G.from(D.split(t,[]))}},D=class extends x{constructor(t,e=Xn(t)){super();this.text=t,this.length=e}get lines(){return this.text.length}get children(){return null}lineInner(t,e,i,s){for(let r=0;;r++){let o=this.text[r],l=s+o.length;if((e?i:l)>=t)return new Bi(s,l,i,o);s=l+1,i++}}decompose(t,e,i,s){let r=t<=0&&e>=this.length?this:new D(Li(this.text,t,e),Math.min(e,this.length)-Math.max(0,t));if(s&1){let o=i.pop(),l=Qt(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new D(l,o.length+r.length));else{let h=l.length>>1;i.push(new D(l.slice(0,h)),new D(l.slice(h)))}}else i.push(r)}replace(t,e,i){if(!(i instanceof D))return super.replace(t,e,i);let s=Qt(this.text,Qt(i.text,Li(this.text,0,t)),e),r=this.length+i.length-(e-t);return s.length<=32?new D(s,r):G.from(D.split(s,[]),r)}sliceString(t,e=this.length,i=`
|
||
|
`){let s="";for(let r=0,o=0;r<=e&&o<this.text.length;o++){let l=this.text[o],h=r+l.length;r>t&&o&&(s+=i),t<h&&e>r&&(s+=l.slice(Math.max(0,t-r),e-r)),r=h+1}return s}flatten(t){for(let e of this.text)t.push(e)}scanIdentical(){return 0}static split(t,e){let i=[],s=-1;for(let r of t)i.push(r),s+=r.length+1,i.length==32&&(e.push(new D(i,s)),i=[],s=-1);return s>-1&&e.push(new D(i,s)),e}},G=class extends x{constructor(t,e){super();this.children=t,this.length=e,this.lines=0;for(let i of t)this.lines+=i.lines}lineInner(t,e,i,s){for(let r=0;;r++){let o=this.children[r],l=s+o.length,h=i+o.lines-1;if((e?h:l)>=t)return o.lineInner(t,e,i,s);s=l+1,i=h+1}}decompose(t,e,i,s){for(let r=0,o=0;o<=e&&r<this.children.length;r++){let l=this.children[r],h=o+l.length;if(t<=h&&e>=o){let a=s&((o<=t?1:0)|(h>=e?2:0));o>=t&&h<=e&&!a?i.push(l):l.decompose(t-o,e-o,i,a)}o=h+1}}replace(t,e,i){if(i.lines<this.lines)for(let s=0,r=0;s<this.children.length;s++){let o=this.children[s],l=r+o.length;if(t>=r&&e<=l){let h=o.replace(t-r,e-r,i),a=this.lines-o.lines+h.lines;if(h.lines<a>>5-1&&h.lines>a>>5+1){let c=this.children.slice();return c[s]=h,new G(c,this.length-(e-t)+i.length)}return super.replace(r,l,h)}r=l+1}return super.replace(t,e,i)}sliceString(t,e=this.length,i=`
|
||
|
`){let s="";for(let r=0,o=0;r<this.children.length&&o<=e;r++){let l=this.children[r],h=o+l.length;o>t&&r&&(s+=i),t<h&&e>o&&(s+=l.sliceString(t-o,e-o,i)),o=h+1}return s}flatten(t){for(let e of this.children)e.flatten(t)}scanIdentical(t,e){if(!(t instanceof G))return 0;let i=0,[s,r,o,l]=e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;s+=e,r+=e){if(s==o||r==l)return i;let h=this.children[s],a=t.children[r];if(h!=a)return i+h.scanIdentical(a,e);i+=h.length+1}}static from(t,e=t.reduce((i,s)=>i+s.length+1,-1)){let i=0;for(let u of t)i+=u.lines;if(i<32){let u=[];for(let p of t)p.flatten(u);return new D(u,e)}let s=Math.max(32,i>>5),r=s<<1,o=s>>1,l=[],h=0,a=-1,c=[];function f(u){let p;if(u.lines>r&&u instanceof G)for(let g of u.children)f(g);else u.lines>o&&(h>o||!h)?(d(),l.push(u)):u instanceof D&&h&&(p=c[c.length-1])instanceof D&&u.lines+p.lines<=32?(h+=u.lines,a+=u.length+1,c[c.length-1]=new D(p.text.concat(u.text),p.length+1+u.length)):(h+u.lines>s&&d(),h+=u.lines,a+=u.length+1,c.push(u))}function d(){h!=0&&(l.push(c.length==1?c[0]:G.from(c,a)),a=-1,h=c.length=0)}for(let u of t)f(u);return d(),l.length==1?l[0]:new G(l,e)}};x.empty=new D([""],0);function Xn(n){let t=-1;for(let e of n)t+=e.length+1;return t}function Qt(n,t,e=0,i=1e9){for(let s=0,r=0,o=!0;r<n.length&&s<=i;r++){let l=n[r],h=s+l.length;h>=e&&(h>i&&(l=l.slice(0,i-s)),s<e&&(l=l.slice(e-s)),o?(t[t.length-1]+=l,o=!1):t.push(l)),s=h+1}return t}function Li(n,t,e){return Qt(n,[""],t,e)}var yt=class{constructor(t,e=1){this.dir=e,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[t],this.offsets=[e>0?1:(t instanceof D?t.text.length:t.children.length)<<1]}nextInner(t,e){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,s=this.nodes[i],r=this.offsets[i],o=r>>1,l=s instanceof D?s.text.length:s.children.length;if(o==(e>0?l:0)){if(i==0)return this.done=!0,this.value="",this;e>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(e>0?0:1)){if(this.offsets[i]+=e,t==0)return this.lineBreak=!0,this.value=`
|
||
|
`,this;t--}else if(s instanceof D){let h=s.text[o+(e<0?-1:0)];if(this.offsets[i]+=e,h.length>Math.max(0,t))return this.value=t==0?h:e>0?h.slice(t):h.slice(0,h.length-t),this;t-=h.length}else{let h=s.children[o+(e<0?-1:0)];t>h.length?(t-=h.length,this.offsets[i]+=e):(e<0&&this.offsets[i]--,this.nodes.push(h),this.offsets.push(e>0?1:(h instanceof D?h.text.length:h.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}},Ae=class{constructor(t,e,i){this.value="",this.done=!1,this.cursor=new yt(t,e>i?-1:1),this.pos=e>i?t.length:0,this.from=Math.min(e,i),this.to=Math.max(e,i)}nextInner(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);let i=e<0?this.pos-this.from:this.to-this.pos;t>i&&(t=i),i-=t;let{value:s}=this.cursor.next(t);return this.pos+=(s.length+t)*e,this.value=s.length<=i?s:e<0?s.slice(s.length-i):s.slice(0,i),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}},Me=class{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:e,lineBreak:i,value:s}=this.inner.next(t);return e?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}};typeof Symbol!="undefined"&&(x.prototype[Symbol.iterator]=function(){return this.iter()},yt.prototype[Symbol.iterator]=Ae.prototype[Symbol.iterator]=Me.prototype[Symbol.iterator]=function(){return this});var Bi=class{constructor(t,e,i,s){this.from=t,this.to=e,this.number=i,this.text=s}get length(){return this.to-this.from}},wt="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(n=>n?parseInt(n,36):1);for(let n=1;n<wt.length;n++)wt[n]+=wt[n-1];function Yn(n){for(let t=1;t<wt.length;t+=2)if(wt[t]>n)return wt[t-1]<=n;return!1}function Pi(n){return n>=127462&&n<=127487}var Vi=8205;function Q(n,t,e=!0,i=!0){return(e?Ni:Zn)(n,t,i)}function Ni(n,t,e){if(t==n.length)return t;t&&Ii(n.charCodeAt(t))&&Hi(n.charCodeAt(t-1))&&t--;let i=_t(n,t);for(t+=De(i);t<n.length;){let s=_t(n,t);if(i==Vi||s==Vi||e&&Yn(s))t+=De(s),i=s;else if(Pi(s)){let r=0,o=t-2;for(;o>=0&&Pi(_t(n,o));)r++,o-=2;if(r%2==0)break;t+=2}else break}return t}function Zn(n,t,e){for(;t>0;){let i=Ni(n,t-2,e);if(i<t)return i;t--}return 0}function Ii(n){return n>=56320&&n<57344}function Hi(n){return n>=55296&&n<56320}function _t(n,t){let e=n.charCodeAt(t);if(!Hi(e)||t+1==n.length)return e;let i=n.charCodeAt(t+1);return Ii(i)?(e-55296<<10)+(i-56320)+65536:e}function De(n){return n<65536?1:2}var Oe=/\r\n?|\n/,K=function
|
||
|
`}get readOnly(){return this.facet(Yi)}phrase(t,...e){for(let i of this.facet(S.phrases))if(Object.prototype.hasOwnProperty.call(i,t)){t=i[t];break}return e.length&&(t=t.replace(/\$(\$|\d*)/g,(i,s)=>{if(s=="$")return"$";let r=+(s||1);return!r||r>e.length?i:e[r-1]})),t}languageDataAt(t,e,i=-1){let s=[];for(let r of this.facet($i))for(let o of r(this,e,i))Object.prototype.hasOwnProperty.call(o,t)&&s.push(o[t]);return s}charCategorizer(t){return or(this.languageDataAt("wordChars",t).join(""))}wordAt(t){let{text:e,from:i,length:s}=this.doc.lineAt(t),r=this.charCategorizer(t),o=t-i,l=t-i;for(;o>0;){let h=Q(e,o,!1);if(r(e.slice(h,o))!=X.Word)break;o=h}for(;l<s;){let h=Q(e,l);if(r(e.slice(l,h))!=X.Word)break;l=h}return o==l?null:w.range(o+i,l+i)}};S.allowMultipleSelections=ji;S.tabSize=v.define({combine:n=>n.length?n[0]:4});S.lineSeparator=Gi;S.readOnly=Yi;S.phrases=v.define({compare(n,t){let e=Object.keys(n),i=Object.keys(t);return e.length==i.length&&e.every(s=>n[s]==t[s])}});S.languageData=$i;S.changeFilter=Ui;S.transactionFilter=Ji;S.transactionExtender=Xi;Vt.reconfigure=E.define();var ot=class{eq(t){return this==t}range(t,e=t){return kt.create(t,e,this)}};ot.prototype.startSide=ot.prototype.endSide=0;ot.prototype.point=!1;ot.prototype.mapMode=K.TrackDel;var kt=class{constructor(t,e,i){this.from=t,this.to=e,this.value=i}static create(t,e,i){return new kt(t,e,i)}};function Ie(n,t){return n.from-t.from||n.value.startSide-t.value.startSide}var ie=class{constructor(t,e,i,s){this.from=t,this.to=e,this.value=i,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(t,e,i,s=0){let r=i?this.to:this.from;for(let o=s,l=r.length;;){if(o==l)return o;let h=o+l>>1,a=r[h]-t||(i?this.value[h].endSide:this.value[h].startSide)-e;if(h==o)return a>=0?o:l;a>=0?l=h:o=h+1}}between(t,e,i,s){for(let r=this.findIndex(e,-1e9,!0),o=this.findIndex(i,1e9,!1,r);r<o;r++)if(s(this.from[r]+t,this.to[r]+t,this.value[r])===!1)return!1}map(t,e){let i=[],s=[],r=[],o=-1,l=-1;for(let h=0;h<this.value.length;h++){let a=this.value[h],c=this.from[h]+t,f=this.to[h]+t,d,u;if(c==f){let p=e.mapPos(c,a.startSide,a.mapMode);if(p==null||(d=u=p,a.startSide!=a.endSide&&(u=e.mapPos(c,a.endSide),u<d)))continue}else if(d=e.mapPos(c,a.startSide),u=e.mapPos(f,a.endSide),d>u||d==u&&a.startSide>0&&a.endSide<=0)continue;(u-d||a.endSide-a.startSide)<0||(o<0&&(o=d),a.point&&(l=Math.max(l,u-d)),i.push(a),s.push(d-o),r.push(u-o))}return{mapped:i.length?new ie(s,r,i,l):null,pos:o}}},O=class{constructor(t,e,i,s){this.chunkPos=t,this.chunk=e,this.nextLayer=i,this.maxPoint=s}static create(t,e,i,s){return new O(t,e,i,s)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let e of this.chunk)t+=e.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:e=[],sort:i=!1,filterFrom:s=0,filterTo:r=this.length}=t,o=t.filter;if(e.length==0&&!o)return this;if(i&&(e=e.slice().sort(Ie)),this.isEmpty)return e.length?O.of(e):this;let l=new He(this,null,-1).goto(0),h=0,a=[],c=new Ct;for(;l.value||h<e.length;)if(h<e.length&&(l.from-e[h].from||l.startSide-e[h].value.startSide)>=0){let f=e[h++];c.addInner(f.from,f.to,f.value)||a.push(f)}else l.rangeIndex==1&&l.chunkIndex<this.chunk.length&&(h==e.length||this.chunkEnd(l.chunkIndex)<e[h].from)&&(!o||s>this.chunkEnd(l.chunkIndex)||r<this.chunkPos[l.chunkIndex])&&c.addChunk(this.chunkPos[l.chunkIndex],this.chunk[l.chunkIndex])?l.nextChunk():((!o||s>l.to||r<l.from||o(l.from,l.to,l.value))&&(c.addInner(l.from,l.to,l.value)||a.push(kt.create(l.from,l.to,l.value))),l.next());return c.finishInner(this.nextLayer.isEmpty&&!a.length?O.empty:this.nextLayer.update({add:a,filter:o,filterFrom:s,filterTo:r}))}map(t){if(t.empty||this.isEmpty)return this;let e=[],i=[],s=-1;for(let o=0;o<this.chunk.length;o++){let l=this.chunkPos[o],h=this.chunk[o],a=t.touchesRange(l,l+h.length);if(a===!1)s=Math.max(s,h.maxPoint),e.push(h),i.push(t.mapPos(l));else if(a===!0){let{mapped:c,pos:f}=h.map(l,t);c&&(s=Math.max(s,c.m
|
||
|
`)}static newName(){let t=os[rs]||1;return os[rs]=t+1,ze+t.toString(36)}static mount(t,e){(t[qe]||new ls(t)).mount(Array.isArray(e)?e:[e])}},re=null,ls=class{constructor(t){if(!t.head&&t.adoptedStyleSheets&&typeof CSSStyleSheet!="undefined"){if(re)return t.adoptedStyleSheets=[re.sheet].concat(t.adoptedStyleSheets),t[qe]=re;this.sheet=new CSSStyleSheet,t.adoptedStyleSheets=[this.sheet].concat(t.adoptedStyleSheets),re=this}else{this.styleTag=(t.ownerDocument||t).createElement("style");let e=t.head||t;e.insertBefore(this.styleTag,e.firstChild)}this.modules=[],t[qe]=this}mount(t){let e=this.sheet,i=0,s=0;for(let r=0;r<t.length;r++){let o=t[r],l=this.modules.indexOf(o);if(l<s&&l>-1&&(this.modules.splice(l,1),s--,l=-1),l==-1){if(this.modules.splice(s++,0,o),e)for(let h=0;h<o.rules.length;h++)e.insertRule(o.rules[h],i++)}else{for(;s<l;)i+=this.modules[s++].rules.length;i+=o.rules.length,s++}}if(!e){let r="";for(let o=0;o<this.modules.length;o++)r+=this.modules[o].getRules()+`
|
||
|
`;this.styleTag.textContent=r}}};var ut={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"},oe={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},hs=typeof navigator!="undefined"&&/Chrome\/(\d+)/.exec(navigator.userAgent),go=typeof navigator!="undefined"&&/Apple Computer/.test(navigator.vendor),hr=typeof navigator!="undefined"&&/Gecko\/\d+/.test(navigator.userAgent),as=typeof navigator!="undefined"&&/Mac/.test(navigator.platform),mo=typeof navigator!="undefined"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),yo=hs&&(as||+hs[1]<57)||hr&&as;for(R=0;R<10;R++)ut[48+R]=ut[96+R]=String(R);var R;for(R=1;R<=24;R++)ut[R+111]="F"+R;var R;for(R=65;R<=90;R++)ut[R]=String.fromCharCode(R+32),oe[R]=String.fromCharCode(R);var R;for(le in ut)oe.hasOwnProperty(le)||(oe[le]=ut[le]);var le;function he(n){let t;return n.nodeType==11?t=n.getSelection?n:n.ownerDocument:t=n,t.getSelection()}function Dt(n,t){return t?n==t||n.contains(t.nodeType!=1?t.parentNode:t):!1}function ar(){let n=document.activeElement;for(;n&&n.shadowRoot;)n=n.shadowRoot.activeElement;return n}function Ke(n,t){if(!t.anchorNode)return!1;try{return Dt(n,t.anchorNode)}catch(e){return!1}}function Ht(n){return n.nodeType==3?Tt(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function ae(n,t,e,i){return e?cs(n,t,e,i,-1)||cs(n,t,e,i,1):!1}function $e(n){for(var t=0;;t++)if(n=n.previousSibling,!n)return t}function cs(n,t,e,i,s){for(;;){if(n==e&&t==i)return!0;if(t==(s<0?0:ce(n))){if(n.nodeName=="DIV")return!1;let r=n.parentNode;if(!r||r.nodeType!=1)return!1;t=$e(n)+(s<0?0:1),n=r}else if(n.nodeType==1){if(n=n.childNodes[t+(s<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;t=s<0?ce(n):0}else return!1}}function ce(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}var fs={left:0,right:0,top:0,bottom:0};function fe(n,t){let e=t?n.left:n.right;return{left:e,right:e,top:n.top,bottom:n.bottom}}function cr(n){return{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function fr(n,t,e,i,s,r,o,l){let h=n.ownerDocument,a=h.defaultView;for(let c=n;c;)if(c.nodeType==1){let f,d=c==h.body;if(d)f=cr(a);else{if(c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.parentNode;continue}let g=c.getBoundingClientRect();f={left:g.left,right:g.left+c.clientWidth,top:g.top,bottom:g.top+c.clientHeight}}let u=0,p=0;if(s=="nearest")t.top<f.top?(p=-(f.top-t.top+o),e>0&&t.bottom>f.bottom+p&&(p=t.bottom-f.bottom+p+o)):t.bottom>f.bottom&&(p=t.bottom-f.bottom+o,e<0&&t.top-p<f.top&&(p=-(f.top+p-t.top+o)));else{let g=t.bottom-t.top,m=f.bottom-f.top;p=(s=="center"&&g<=m?t.top+g/2-m/2:s=="start"||s=="center"&&e<0?t.top-o:t.bottom-m+o)-f.top}if(i=="nearest"?t.left<f.left?(u=-(f.left-t.left+r),e>0&&t.right>f.right+u&&(u=t.right-f.right+u+r)):t.right>f.right&&(u=t.right-f.right+r,e<0&&t.left<f.left+u&&(u=-(f.left+u-t.left+r))):u=(i=="center"?t.left+(t.right-t.left)/2-(f.right-f.left)/2:i=="start"==l?t.left-r:t.right-(f.right-f.left)+r)-f.left,u||p)if(d)a.scrollBy(u,p);else{if(p){let g=c.scrollTop;c.scrollTop+=p,p=c.scrollTop-g}if(u){let g=c.scrollLeft;c.scrollLeft+=u,u=c.scrollLeft-g}t={left:t.left-u,top:t.top-p,right:t.right-u,bottom:t.bottom-p}}if(d)break;c=c.assignedSlot||c.parentNode,i=s="nearest"}else if(c.nodeType==11)c=c.host;else break}var us=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(t){return this.anchorNode==t.anchorNode
|
||
|
`,s=n.state.doc.line(s.number+(e?1:-1)),r=n.bidiSpans(s),a=w.cursor(e?s.from:s.to)}if(h){if(!h(c))return l}else{if(!i)return a;h=i(c)}l=a}}function Vr(n,t,e){let i=n.state.charCategorizer(t),s=i(e);return r=>{let o=i(r);return s==X.Space&&(s=o),s==o}}function Nr(n,t,e,i){let s=t.head,r=e?1:-1;if(s==(e?n.state.doc.length:0))return w.cursor(s,t.assoc);let o=t.goalColumn,l,h=n.contentDOM.getBoundingClientRect(),a=n.coordsAtPos(s),c=n.documentTop;if(a)o==null&&(o=a.left-h.left),l=r<0?a.top:a.bottom;else{let u=n.viewState.lineBlockAt(s);o==null&&(o=Math.min(h.right-h.left,n.defaultCharacterWidth*(s-u.from))),l=(r<0?u.top:u.bottom)+c}let f=h.left+o,d=i??n.defaultLineHeight>>1;for(let u=0;;u+=10){let p=l+(d+u)*r,g=Zs(n,{x:f,y:p},!1,r);if(p<h.top||p>h.bottom||(r<0?g<s:g>s))return w.cursor(g,t.assoc,void 0,o)}}function pi(n,t,e){let i=n.state.facet(Hs).map(s=>s(n));for(;;){let s=!1;for(let r of i)r.between(e.from-1,e.from+1,(o,l,h)=>{e.from>o&&e.from<l&&(e=t.from>e.from?w.cursor(o,1):w.cursor(l,-1),s=!0)});if(!s)return e}}var tn=class{constructor(t){this.lastKeyCode=0,this.lastKeyTime=0,this.chromeScrollHack=-1,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.rapidCompositionStart=!1,this.mouseSelection=null;for(let e in I){let i=I[e];t.contentDOM.addEventListener(e,s=>{!nn(t,s)||this.ignoreDuringComposition(s)||e=="keydown"&&this.keydown(t,s)||(this.mustFlushObserver(s)&&t.observer.forceFlush(),this.runCustomHandlers(e,t,s)?s.preventDefault():i(t,s))}),this.registeredEvents.push(e)}y.chrome&&y.chrome_version>=102&&t.scrollDOM.addEventListener("wheel",()=>{this.chromeScrollHack<0?t.contentDOM.style.pointerEvents="none":window.clearTimeout(this.chromeScrollHack),this.chromeScrollHack=setTimeout(()=>{this.chromeScrollHack=-1,t.contentDOM.style.pointerEvents=""},100)},{passive:!0}),this.notifiedFocused=t.hasFocus,y.safari&&t.contentDOM.addEventListener("input",()=>null)}setSelectionOrigin(t){this.lastSelectionOrigin=t,this.lastSelectionTime=Date.now()}ensureHandlers(t,e){var i;let s;this.customHandlers=[];for(let r of e)if(s=(i=r.update(t).spec)===null||i===void 0?void 0:i.domEventHandlers){this.customHandlers.push({plugin:r.value,handlers:s});for(let o in s)this.registeredEvents.indexOf(o)<0&&o!="scroll"&&(this.registeredEvents.push(o),t.contentDOM.addEventListener(o,l=>{!nn(t,l)||this.runCustomHandlers(o,t,l)&&l.preventDefault()}))}}runCustomHandlers(t,e,i){for(let s of this.customHandlers){let r=s.handlers[t];if(r)try{if(r.call(s.plugin,i,e)||i.defaultPrevented)return!0}catch(o){pt(e.state,o)}}return!1}runScrollHandlers(t,e){for(let i of this.customHandlers){let s=i.handlers.scroll;if(s)try{s.call(i.plugin,e,t)}catch(r){pt(t.state,r)}}}keydown(t,e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&Date.now()<this.lastEscPress+2e3)return!0;if(y.android&&y.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return t.observer.delayAndroidKey(e.key,e.keyCode),!0;let i;return y.ios&&(i=en.find(s=>s.keyCode==e.keyCode))&&!(e.ctrlKey||e.altKey||e.metaKey)&&!e.synthetic?(this.pendingIOSKey=i,setTimeout(()=>this.flushIOSKey(t),250),!0):!1}flushIOSKey(t){let e=this.pendingIOSKey;return e?(this.pendingIOSKey=void 0,Ft(t.contentDOM,e.key,e.keyCode)):!1}ignoreDuringComposition(t){return/^key/.test(t.type)?this.composing>0?!0:y.safari&&Date.now()-this.compositionEndedAt<100?(this.compositionEndedAt=0,!0):!1:!1}mustFlushObserver(t){return t.type=="keydown"&&t.keyCode!=229||t.type=="compositionend"&&!y.ios}startMouseSelection(t){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=t}update(t){this.mouseSelection&&this.mouseSelection.update(t),t.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}},en=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagr
|