diff --git a/public/build/assets/app-d6423cac.js b/public/build/assets/app-04c0bce6.js similarity index 97% rename from public/build/assets/app-d6423cac.js rename to public/build/assets/app-04c0bce6.js index 9cb3c569..18ee6da9 100644 --- a/public/build/assets/app-d6423cac.js +++ b/public/build/assets/app-04c0bce6.js @@ -48,7 +48,7 @@ Copyright © 2024 37signals LLC —— Suppress this warning by adding a "data-turbo-suppress-warning" attribute to: %s - `,i.outerHTML);i=i.parentElement}})();window.Turbo={...ck,StreamActions:nd};ed();const uk=Object.freeze(Object.defineProperty({__proto__:null,FetchEnctype:Ii,FetchMethod:Ot,FetchRequest:Cr,FetchResponse:sl,FrameElement:Vt,FrameLoadingStyle:hn,FrameRenderer:hl,PageRenderer:dl,PageSnapshot:Xt,StreamActions:nd,StreamElement:Oa,StreamSourceElement:Ym,cache:km,clearCache:Mm,config:nt,connectStreamSource:td,disconnectStreamSource:id,fetch:Kh,fetchEnctypeFromString:sm,fetchMethodFromString:al,isSafe:ol,navigator:Am,registerAdapter:Cm,renderStreamMessage:Tm,session:Je,setConfirmMethod:Pm,setFormMode:Rm,setProgressBarDelay:Lm,start:ed,visit:Em},Symbol.toStringTag,{value:"Module"}));window.Turbo=uk;pg.plugin(CS);window.Alpine=pg;window.$http=rS.create({headers:{Accept:"application/json","Content-Type":"application/json","X-Requested-With":"XMLHttpRequest","X-Root-Request":"true"}});window.$cookie=new ES("__root_");document.addEventListener("relation-frame-loaded",i=>{window.location.href!==i.detail.url&&window.history.replaceState(window.history.state,document.title,i.detail.url)});function dt(i){this.content=i}dt.prototype={constructor:dt,find:function(i){for(var e=0;e>1}};dt.from=function(i){if(i instanceof dt)return i;var e=[];if(i)for(var t in i)e.push(t,i[t]);return new dt(e)};function Vm(i,e,t){for(let r=0;;r++){if(r==i.childCount||r==e.childCount)return i.childCount==e.childCount?null:t;let a=i.child(r),l=e.child(r);if(a==l){t+=a.nodeSize;continue}if(!a.sameMarkup(l))return t;if(a.isText&&a.text!=l.text){for(let h=0;a.text[h]==l.text[h];h++)t++;return t}if(a.content.size||l.content.size){let h=Vm(a.content,l.content,t+1);if(h!=null)return h}t+=a.nodeSize}}function jm(i,e,t,r){for(let a=i.childCount,l=e.childCount;;){if(a==0||l==0)return a==l?null:{a:t,b:r};let h=i.child(--a),p=e.child(--l),x=h.nodeSize;if(h==p){t-=x,r-=x;continue}if(!h.sameMarkup(p))return{a:t,b:r};if(h.isText&&h.text!=p.text){let w=0,C=Math.min(h.text.length,p.text.length);for(;we&&r(x,a+p,l||null,h)!==!1&&x.content.size){let C=p+1;x.nodesBetween(Math.max(0,e-C),Math.min(x.content.size,t-C),r,a+C)}p=w}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,a){let l="",h=!0;return this.nodesBetween(e,t,(p,x)=>{let w=p.isText?p.text.slice(Math.max(e,x)-x,t-x):p.isLeaf?a?typeof a=="function"?a(p):a:p.type.spec.leafText?p.type.spec.leafText(p):"":"";p.isBlock&&(p.isLeaf&&w||p.isTextblock)&&r&&(h?h=!1:l+=r),l+=w},0),l}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,a=this.content.slice(),l=0;for(t.isText&&t.sameMarkup(r)&&(a[a.length-1]=t.withText(t.text+r.text),l=1);le)for(let l=0,h=0;he&&((ht)&&(p.isText?p=p.cut(Math.max(0,e-h),Math.min(p.text.length,t-h)):p=p.cut(Math.max(0,e-h-1),Math.min(p.content.size,t-h-1))),r.push(p),a+=p.nodeSize),h=x}return new ae(r,a)}cutByIndex(e,t){return e==t?ae.empty:e==0&&t==this.content.length?this:new ae(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let a=this.content.slice(),l=this.size+t.nodeSize-r.nodeSize;return a[e]=t,new ae(a,l)}addToStart(e){return new ae([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new ae(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;tthis.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,a=0;;r++){let l=this.child(r),h=a+l.nodeSize;if(h>=e)return h==e||t>0?Gs(r+1,h):Gs(r,a);a=h}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return ae.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new ae(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return ae.empty;let t,r=0;for(let a=0;athis.type.rank&&(t||(t=e.slice(0,a)),t.push(this),r=!0),t&&t.push(l)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;tr.type.rank-a.type.rank),t}};Xe.none=[];class Na extends Error{}class ue{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=qm(this.content,e+this.openStart,t);return r&&new ue(r,this.openStart,this.openEnd)}removeBetween(e,t){return new ue(Gm(this.content,e+this.openStart,t+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,t){if(!t)return ue.empty;let r=t.openStart||0,a=t.openEnd||0;if(typeof r!="number"||typeof a!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ue(ae.fromJSON(e,t.content),r,a)}static maxOpen(e,t=!0){let r=0,a=0;for(let l=e.firstChild;l&&!l.isLeaf&&(t||!l.type.spec.isolating);l=l.firstChild)r++;for(let l=e.lastChild;l&&!l.isLeaf&&(t||!l.type.spec.isolating);l=l.lastChild)a++;return new ue(e,r,a)}}ue.empty=new ue(ae.empty,0,0);function Gm(i,e,t){let{index:r,offset:a}=i.findIndex(e),l=i.maybeChild(r),{index:h,offset:p}=i.findIndex(t);if(a==e||l.isText){if(p!=t&&!i.child(h).isText)throw new RangeError("Removing non-flat range");return i.cut(0,e).append(i.cut(t))}if(r!=h)throw new RangeError("Removing non-flat range");return i.replaceChild(r,l.copy(Gm(l.content,e-a-1,t-a-1)))}function qm(i,e,t,r){let{index:a,offset:l}=i.findIndex(e),h=i.maybeChild(a);if(l==e||h.isText)return r&&!r.canReplace(a,a,t)?null:i.cut(0,e).append(t).append(i.cut(e));let p=qm(h.content,e-l-1,t);return p&&i.replaceChild(a,h.copy(p))}function fk(i,e,t){if(t.openStart>i.depth)throw new Na("Inserted content deeper than insertion position");if(i.depth-t.openStart!=e.depth-t.openEnd)throw new Na("Inconsistent open depths");return Um(i,e,t,0)}function Um(i,e,t,r){let a=i.index(r),l=i.node(r);if(a==e.index(r)&&r=0&&i.isText&&i.sameMarkup(e[t])?e[t]=i.withText(e[t].text+i.text):e.push(i)}function Yr(i,e,t,r){let a=(e||i).node(t),l=0,h=e?e.index(t):a.childCount;i&&(l=i.index(t),i.depth>t?l++:i.textOffset&&(kn(i.nodeAfter,r),l++));for(let p=l;pa&&Vc(i,e,a+1),h=r.depth>a&&Vc(t,r,a+1),p=[];return Yr(null,i,a,p),l&&h&&e.index(a)==t.index(a)?($m(l,h),kn(An(l,Km(i,e,t,r,a+1)),p)):(l&&kn(An(l,Da(i,e,a+1)),p),Yr(e,t,a,p),h&&kn(An(h,Da(t,r,a+1)),p)),Yr(r,null,a,p),new ae(p)}function Da(i,e,t){let r=[];if(Yr(null,i,t,r),i.depth>t){let a=Vc(i,e,t+1);kn(An(a,Da(i,e,t+1)),r)}return Yr(e,null,t,r),new ae(r)}function pk(i,e){let t=e.depth-i.openStart,a=e.node(t).copy(i.content);for(let l=t-1;l>=0;l--)a=e.node(l).copy(ae.from(a));return{start:a.resolveNoCache(i.openStart+t),end:a.resolveNoCache(a.content.size-i.openEnd-t)}}class es{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],a=e.child(t);return r?e.child(t).cut(r):a}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],a=t==0?0:this.path[t*3-1]+1;for(let l=0;l0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Fa(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],a=0,l=t;for(let h=e;;){let{index:p,offset:x}=h.content.findIndex(l),w=l-x;if(r.push(h,p,a+x),!w||(h=h.child(p),h.isText))break;l=w-1,a+=x+1}return new es(t,r,l)}static resolveCached(e,t){let r=Du.get(e);if(r)for(let l=0;le&&this.nodesBetween(e,t,l=>(r.isInSet(l.marks)&&(a=!0),!a)),a}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Jm(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=ae.empty,a=0,l=r.childCount){let h=this.contentMatchAt(e).matchFragment(r,a,l),p=h&&h.matchFragment(this.content,t);if(!p||!p.validEnd)return!1;for(let x=a;xt.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let a=ae.fromJSON(e,t.content),l=e.nodeType(t.type).create(t.attrs,a,r);return l.type.checkAttrs(l.attrs),l}};Cn.prototype.text=void 0;class za extends Cn{constructor(e,t,r,a){if(super(e,t,null,a),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Jm(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new za(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new za(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Jm(i,e){for(let t=i.length-1;t>=0;t--)e=i[t].type.name+"("+e+")";return e}class On{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new xk(e,t);if(r.next==null)return On.empty;let a=Zm(r);r.next&&r.err("Unexpected trailing text");let l=Ck(Ak(a));return Ek(l,r),l}matchType(e){for(let t=0;tw.createAndFill()));for(let w=0;w=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let a=0;a{let l=a+(r.validEnd?"*":" ")+" ";for(let h=0;h"+e.indexOf(r.next[h].next);return l}).join(` + `,i.outerHTML);i=i.parentElement}})();window.Turbo={...ck,StreamActions:nd};ed();const uk=Object.freeze(Object.defineProperty({__proto__:null,FetchEnctype:Ii,FetchMethod:Ot,FetchRequest:Cr,FetchResponse:sl,FrameElement:Vt,FrameLoadingStyle:hn,FrameRenderer:hl,PageRenderer:dl,PageSnapshot:Xt,StreamActions:nd,StreamElement:Oa,StreamSourceElement:Ym,cache:km,clearCache:Mm,config:nt,connectStreamSource:td,disconnectStreamSource:id,fetch:Kh,fetchEnctypeFromString:sm,fetchMethodFromString:al,isSafe:ol,navigator:Am,registerAdapter:Cm,renderStreamMessage:Tm,session:Je,setConfirmMethod:Pm,setFormMode:Rm,setProgressBarDelay:Lm,start:ed,visit:Em},Symbol.toStringTag,{value:"Module"}));window.Turbo=uk;pg.plugin(CS);window.Alpine=pg;window.$http=rS.create({headers:{Accept:"application/json","Content-Type":"application/json","X-Requested-With":"XMLHttpRequest","X-Root-Request":"true"}});window.$cookie=new ES("__root_");document.addEventListener("relation-frame-loaded",i=>{window.location.href!==i.detail.url&&window.history.replaceState(window.history.state,document.title,i.detail.url)});document.addEventListener("turbo:frame-missing",i=>{i.preventDefault()});function dt(i){this.content=i}dt.prototype={constructor:dt,find:function(i){for(var e=0;e>1}};dt.from=function(i){if(i instanceof dt)return i;var e=[];if(i)for(var t in i)e.push(t,i[t]);return new dt(e)};function Vm(i,e,t){for(let r=0;;r++){if(r==i.childCount||r==e.childCount)return i.childCount==e.childCount?null:t;let a=i.child(r),l=e.child(r);if(a==l){t+=a.nodeSize;continue}if(!a.sameMarkup(l))return t;if(a.isText&&a.text!=l.text){for(let h=0;a.text[h]==l.text[h];h++)t++;return t}if(a.content.size||l.content.size){let h=Vm(a.content,l.content,t+1);if(h!=null)return h}t+=a.nodeSize}}function jm(i,e,t,r){for(let a=i.childCount,l=e.childCount;;){if(a==0||l==0)return a==l?null:{a:t,b:r};let h=i.child(--a),p=e.child(--l),x=h.nodeSize;if(h==p){t-=x,r-=x;continue}if(!h.sameMarkup(p))return{a:t,b:r};if(h.isText&&h.text!=p.text){let w=0,C=Math.min(h.text.length,p.text.length);for(;we&&r(x,a+p,l||null,h)!==!1&&x.content.size){let C=p+1;x.nodesBetween(Math.max(0,e-C),Math.min(x.content.size,t-C),r,a+C)}p=w}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,a){let l="",h=!0;return this.nodesBetween(e,t,(p,x)=>{let w=p.isText?p.text.slice(Math.max(e,x)-x,t-x):p.isLeaf?a?typeof a=="function"?a(p):a:p.type.spec.leafText?p.type.spec.leafText(p):"":"";p.isBlock&&(p.isLeaf&&w||p.isTextblock)&&r&&(h?h=!1:l+=r),l+=w},0),l}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,a=this.content.slice(),l=0;for(t.isText&&t.sameMarkup(r)&&(a[a.length-1]=t.withText(t.text+r.text),l=1);le)for(let l=0,h=0;he&&((ht)&&(p.isText?p=p.cut(Math.max(0,e-h),Math.min(p.text.length,t-h)):p=p.cut(Math.max(0,e-h-1),Math.min(p.content.size,t-h-1))),r.push(p),a+=p.nodeSize),h=x}return new ae(r,a)}cutByIndex(e,t){return e==t?ae.empty:e==0&&t==this.content.length?this:new ae(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let a=this.content.slice(),l=this.size+t.nodeSize-r.nodeSize;return a[e]=t,new ae(a,l)}addToStart(e){return new ae([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new ae(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;tthis.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,a=0;;r++){let l=this.child(r),h=a+l.nodeSize;if(h>=e)return h==e||t>0?Gs(r+1,h):Gs(r,a);a=h}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return ae.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new ae(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return ae.empty;let t,r=0;for(let a=0;athis.type.rank&&(t||(t=e.slice(0,a)),t.push(this),r=!0),t&&t.push(l)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;tr.type.rank-a.type.rank),t}};Xe.none=[];class Na extends Error{}class ue{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=qm(this.content,e+this.openStart,t);return r&&new ue(r,this.openStart,this.openEnd)}removeBetween(e,t){return new ue(Gm(this.content,e+this.openStart,t+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,t){if(!t)return ue.empty;let r=t.openStart||0,a=t.openEnd||0;if(typeof r!="number"||typeof a!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ue(ae.fromJSON(e,t.content),r,a)}static maxOpen(e,t=!0){let r=0,a=0;for(let l=e.firstChild;l&&!l.isLeaf&&(t||!l.type.spec.isolating);l=l.firstChild)r++;for(let l=e.lastChild;l&&!l.isLeaf&&(t||!l.type.spec.isolating);l=l.lastChild)a++;return new ue(e,r,a)}}ue.empty=new ue(ae.empty,0,0);function Gm(i,e,t){let{index:r,offset:a}=i.findIndex(e),l=i.maybeChild(r),{index:h,offset:p}=i.findIndex(t);if(a==e||l.isText){if(p!=t&&!i.child(h).isText)throw new RangeError("Removing non-flat range");return i.cut(0,e).append(i.cut(t))}if(r!=h)throw new RangeError("Removing non-flat range");return i.replaceChild(r,l.copy(Gm(l.content,e-a-1,t-a-1)))}function qm(i,e,t,r){let{index:a,offset:l}=i.findIndex(e),h=i.maybeChild(a);if(l==e||h.isText)return r&&!r.canReplace(a,a,t)?null:i.cut(0,e).append(t).append(i.cut(e));let p=qm(h.content,e-l-1,t);return p&&i.replaceChild(a,h.copy(p))}function fk(i,e,t){if(t.openStart>i.depth)throw new Na("Inserted content deeper than insertion position");if(i.depth-t.openStart!=e.depth-t.openEnd)throw new Na("Inconsistent open depths");return Um(i,e,t,0)}function Um(i,e,t,r){let a=i.index(r),l=i.node(r);if(a==e.index(r)&&r=0&&i.isText&&i.sameMarkup(e[t])?e[t]=i.withText(e[t].text+i.text):e.push(i)}function Yr(i,e,t,r){let a=(e||i).node(t),l=0,h=e?e.index(t):a.childCount;i&&(l=i.index(t),i.depth>t?l++:i.textOffset&&(kn(i.nodeAfter,r),l++));for(let p=l;pa&&Vc(i,e,a+1),h=r.depth>a&&Vc(t,r,a+1),p=[];return Yr(null,i,a,p),l&&h&&e.index(a)==t.index(a)?($m(l,h),kn(An(l,Km(i,e,t,r,a+1)),p)):(l&&kn(An(l,Da(i,e,a+1)),p),Yr(e,t,a,p),h&&kn(An(h,Da(t,r,a+1)),p)),Yr(r,null,a,p),new ae(p)}function Da(i,e,t){let r=[];if(Yr(null,i,t,r),i.depth>t){let a=Vc(i,e,t+1);kn(An(a,Da(i,e,t+1)),r)}return Yr(e,null,t,r),new ae(r)}function pk(i,e){let t=e.depth-i.openStart,a=e.node(t).copy(i.content);for(let l=t-1;l>=0;l--)a=e.node(l).copy(ae.from(a));return{start:a.resolveNoCache(i.openStart+t),end:a.resolveNoCache(a.content.size-i.openEnd-t)}}class es{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],a=e.child(t);return r?e.child(t).cut(r):a}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],a=t==0?0:this.path[t*3-1]+1;for(let l=0;l0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Fa(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],a=0,l=t;for(let h=e;;){let{index:p,offset:x}=h.content.findIndex(l),w=l-x;if(r.push(h,p,a+x),!w||(h=h.child(p),h.isText))break;l=w-1,a+=x+1}return new es(t,r,l)}static resolveCached(e,t){let r=Du.get(e);if(r)for(let l=0;le&&this.nodesBetween(e,t,l=>(r.isInSet(l.marks)&&(a=!0),!a)),a}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Jm(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=ae.empty,a=0,l=r.childCount){let h=this.contentMatchAt(e).matchFragment(r,a,l),p=h&&h.matchFragment(this.content,t);if(!p||!p.validEnd)return!1;for(let x=a;xt.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let a=ae.fromJSON(e,t.content),l=e.nodeType(t.type).create(t.attrs,a,r);return l.type.checkAttrs(l.attrs),l}};Cn.prototype.text=void 0;class za extends Cn{constructor(e,t,r,a){if(super(e,t,null,a),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Jm(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new za(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new za(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Jm(i,e){for(let t=i.length-1;t>=0;t--)e=i[t].type.name+"("+e+")";return e}class On{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new xk(e,t);if(r.next==null)return On.empty;let a=Zm(r);r.next&&r.err("Unexpected trailing text");let l=Ck(Ak(a));return Ek(l,r),l}matchType(e){for(let t=0;tw.createAndFill()));for(let w=0;w=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let a=0;a{let l=a+(r.validEnd?"*":" ")+" ";for(let h=0;h"+e.indexOf(r.next[h].next);return l}).join(` `)}}On.empty=new On(!0);class xk{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function Zm(i){let e=[];do e.push(yk(i));while(i.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function yk(i){let e=[];do e.push(vk(i));while(i.next&&i.next!=")"&&i.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function vk(i){let e=kk(i);for(;;)if(i.eat("+"))e={type:"plus",expr:e};else if(i.eat("*"))e={type:"star",expr:e};else if(i.eat("?"))e={type:"opt",expr:e};else if(i.eat("{"))e=wk(i,e);else break;return e}function Fu(i){/\D/.test(i.next)&&i.err("Expected number, got '"+i.next+"'");let e=Number(i.next);return i.pos++,e}function wk(i,e){let t=Fu(i),r=t;return i.eat(",")&&(i.next!="}"?r=Fu(i):r=-1),i.eat("}")||i.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function Sk(i,e){let t=i.nodeTypes,r=t[e];if(r)return[r];let a=[];for(let l in t){let h=t[l];h.isInGroup(e)&&a.push(h)}return a.length==0&&i.err("No node type or group '"+e+"' found"),a}function kk(i){if(i.eat("(")){let e=Zm(i);return i.eat(")")||i.err("Missing closing paren"),e}else if(/\W/.test(i.next))i.err("Unexpected token '"+i.next+"'");else{let e=Sk(i,i.next).map(t=>(i.inline==null?i.inline=t.isInline:i.inline!=t.isInline&&i.err("Mixing inline and block content"),{type:"name",value:t}));return i.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function Ak(i){let e=[[]];return a(l(i,0),t()),e;function t(){return e.push([])-1}function r(h,p,x){let w={term:x,to:p};return e[h].push(w),w}function a(h,p){h.forEach(x=>x.to=p)}function l(h,p){if(h.type=="choice")return h.exprs.reduce((x,w)=>x.concat(l(w,p)),[]);if(h.type=="seq")for(let x=0;;x++){let w=l(h.exprs[x],p);if(x==h.exprs.length-1)return w;a(w,p=t())}else if(h.type=="star"){let x=t();return r(p,x),a(l(h.expr,x),x),[r(x)]}else if(h.type=="plus"){let x=t();return a(l(h.expr,p),x),a(l(h.expr,x),x),[r(x)]}else{if(h.type=="opt")return[r(p)].concat(l(h.expr,p));if(h.type=="range"){let x=p;for(let w=0;w{i[h].forEach(({term:p,to:x})=>{if(!p)return;let w;for(let C=0;C{w||a.push([p,w=[]]),w.indexOf(C)==-1&&w.push(C)})})});let l=e[r.join(",")]=new On(r.indexOf(i.length-1)>-1);for(let h=0;h-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:tb(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Cn(this,this.computeAttrs(e),ae.from(t),Xe.setFrom(r))}createChecked(e=null,t,r){return t=ae.from(t),this.checkContent(t),new Cn(this,this.computeAttrs(e),t,Xe.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=ae.from(t),t.size){let h=this.contentMatch.fillBefore(t);if(!h)return null;t=h.append(t)}let a=this.contentMatch.matchFragment(t),l=a&&a.fillBefore(ae.empty,!0);return l?new Cn(this,e,t.append(l),Xe.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;tr[l]=new rb(l,t,h));let a=t.spec.topNode||"doc";if(!r[a])throw new RangeError("Schema is missing its top node type ('"+a+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let l in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function Tk(i,e,t){let r=t.split("|");return a=>{let l=a===null?"null":typeof a;if(r.indexOf(l)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${i}, got ${l}`)}}class Mk{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?Tk(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class ul{constructor(e,t,r,a){this.name=e,this.rank=t,this.schema=r,this.spec=a,this.attrs=nb(e,a.attrs),this.excluded=null;let l=eb(this.attrs);this.instance=l?new Xe(this,l):null}create(e=null){return!e&&this.instance?this.instance:new Xe(this,tb(this.attrs,e))}static compile(e,t){let r=Object.create(null),a=0;return e.forEach((l,h)=>r[l]=new ul(l,a++,t,h)),r}removeFromSet(e){for(var t=0;t-1}}class sb{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let a in e)t[a]=e[a];t.nodes=dt.from(e.nodes),t.marks=dt.from(e.marks||{}),this.nodes=Bu.compile(this.spec.nodes,this),this.marks=ul.compile(this.spec.marks,this);let r=Object.create(null);for(let a in this.nodes){if(a in this.marks)throw new RangeError(a+" can not be both a node and a mark");let l=this.nodes[a],h=l.spec.content||"",p=l.spec.marks;if(l.contentMatch=r[h]||(r[h]=On.parse(h,this.nodes)),l.inlineContent=l.contentMatch.inlineContent,l.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!l.isInline||!l.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=l}l.markSet=p=="_"?null:p?Hu(this,p.split(" ")):p==""||!l.inlineContent?[]:null}for(let a in this.marks){let l=this.marks[a],h=l.spec.excludes;l.excluded=h==null?[l]:h==""?[]:Hu(this,h.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,a){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Bu){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,r,a)}text(e,t){let r=this.nodes.text;return new za(r,r.defaultAttrs,e,Xe.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return Cn.fromJSON(this,e)}markFromJSON(e){return Xe.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function Hu(i,e){let t=[];for(let r=0;r-1)&&t.push(h=x)}if(!h)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function Lk(i){return i.tag!=null}function Pk(i){return i.style!=null}let Vr=class Gc{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(a=>{if(Lk(a))this.tags.push(a);else if(Pk(a)){let l=/[^=]*/.exec(a.style)[0];r.indexOf(l)<0&&r.push(l),this.styles.push(a)}}),this.normalizeLists=!this.tags.some(a=>{if(!/^(ul|ol)\b/.test(a.tag)||!a.node)return!1;let l=e.nodes[a.node];return l.contentMatch.matchType(l)})}parse(e,t={}){let r=new Wu(this,t,!1);return r.addAll(e,Xe.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new Wu(this,t,!0);return r.addAll(e,Xe.none,t.from,t.to),ue.maxOpen(r.finish())}matchTag(e,t,r){for(let a=r?this.tags.indexOf(r)+1:0;ae.length&&(p.charCodeAt(e.length)!=61||p.slice(e.length+1)!=t))){if(h.getAttrs){let x=h.getAttrs(t);if(x===!1)continue;h.attrs=x||void 0}return h}}}static schemaRules(e){let t=[];function r(a){let l=a.priority==null?50:a.priority,h=0;for(;h{r(h=Xu(h)),h.mark||h.ignore||h.clearMark||(h.mark=a)})}for(let a in e.nodes){let l=e.nodes[a].spec.parseDOM;l&&l.forEach(h=>{r(h=Xu(h)),h.node||h.ignore||h.mark||(h.node=a)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Gc(e,Gc.schemaRules(e)))}};const ab={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Rk={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},ob={ol:!0,ul:!0},Ba=1,Ha=2,jr=4;function _u(i,e,t){return e!=null?(e?Ba:0)|(e==="full"?Ha:0):i&&i.whitespace=="pre"?Ba|Ha:t&~jr}class qs{constructor(e,t,r,a,l,h){this.type=e,this.attrs=t,this.marks=r,this.solid=a,this.options=h,this.content=[],this.activeMarks=Xe.none,this.match=l||(h&jr?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(ae.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,a;return(a=r.findWrapping(e.type))?(this.match=r,a):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Ba)){let r=this.content[this.content.length-1],a;if(r&&r.isText&&(a=/[ \t\r\n\u000c]+$/.exec(r.text))){let l=r;r.text.length==a[0].length?this.content.pop():this.content[this.content.length-1]=l.withText(l.text.slice(0,l.text.length-a[0].length))}}let t=ae.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(ae.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!ab.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Wu{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0;let a=t.topNode,l,h=_u(null,t.preserveWhitespace,0)|(r?jr:0);a?l=new qs(a.type,a.attrs,Xe.none,!0,t.topMatch||a.type.contentMatch,h):r?l=new qs(null,null,Xe.none,!0,null,h):l=new qs(e.schema.topNodeType,null,Xe.none,!0,null,h),this.nodes=[l],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,a=this.top;if(a.options&Ha||a.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(a.options&Ba)a.options&Ha?r=r.replace(/\r\n?/g,` `):r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let l=a.content[a.content.length-1],h=e.previousSibling;(!l||h&&h.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),t),this.findInText(e)}else this.findInside(e)}addElement(e,t,r){let a=e.nodeName.toLowerCase(),l;ob.hasOwnProperty(a)&&this.parser.normalizeLists&&Ok(e);let h=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,r));if(h?h.ignore:Rk.hasOwnProperty(a))this.findInside(e),this.ignoreFallback(e,t);else if(!h||h.skip||h.closeParent){h&&h.closeParent?this.open=Math.max(0,this.open-1):h&&h.skip.nodeType&&(e=h.skip);let p,x=this.top,w=this.needsBlock;if(ab.hasOwnProperty(a))x.content.length&&x.content[0].isInline&&this.open&&(this.open--,x=this.top),p=!0,x.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);return}let C=h&&h.skip?t:this.readStyles(e,t);C&&this.addAll(e,C),p&&this.sync(x),this.needsBlock=w}else{let p=this.readStyles(e,t);p&&this.addElementByRule(e,h,p,h.consuming===!1?l:void 0)}}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(` `),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t)}readStyles(e,t){let r=e.style;if(r&&r.length)for(let a=0;a!x.clearMark(w)):t=t.concat(this.parser.schema.marks[x.mark].create(x.attrs)),x.consuming===!1)p=x;else break}}return t}addElementByRule(e,t,r,a){let l,h;if(t.node)if(h=this.parser.schema.nodes[t.node],h.isLeaf)this.insertNode(h.create(t.attrs),r)||this.leafFallback(e,r);else{let x=this.enter(h,t.attrs||null,r,t.preserveWhitespace);x&&(l=!0,r=x)}else{let x=this.parser.schema.marks[t.mark];r=r.concat(x.create(t.attrs))}let p=this.top;if(h&&h.isLeaf)this.findInside(e);else if(a)this.addElement(e,r,a);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(x=>this.insertNode(x,r));else{let x=e;typeof t.contentElement=="string"?x=e.querySelector(t.contentElement):typeof t.contentElement=="function"?x=t.contentElement(e):t.contentElement&&(x=t.contentElement),this.findAround(e,x,!0),this.addAll(x,r),this.findAround(e,x,!1)}l&&this.sync(p)&&this.open--}addAll(e,t,r,a){let l=r||0;for(let h=r?e.childNodes[r]:e.firstChild,p=a==null?null:e.childNodes[a];h!=p;h=h.nextSibling,++l)this.findAtPoint(e,l),this.addDOM(h,t);this.findAtPoint(e,l)}findPlace(e,t){let r,a;for(let l=this.open;l>=0;l--){let h=this.nodes[l],p=h.findWrapping(e);if(p&&(!r||r.length>p.length)&&(r=p,a=h,!p.length)||h.solid)break}if(!r)return null;this.sync(a);for(let l=0;l(h.type?h.type.allowsMarkType(w.type):Yu(w.type,e))?(x=w.addToSet(x),!1):!0),this.nodes.push(new qs(e,t,x,a,null,p)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let a=r.length-1;a>=0;a--)e+=r[a].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,a=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),l=-(r?r.depth+1:0)+(a?0:1),h=(p,x)=>{for(;p>=0;p--){let w=t[p];if(w==""){if(p==t.length-1||p==0)continue;for(;x>=l;x--)if(h(p-1,x))return!0;return!1}else{let C=x>0||x==0&&a?this.nodes[x].type:r&&x>=l?r.node(x-l).type:null;if(!C||C.name!=w&&!C.isInGroup(w))return!1;x--}}return!0};return h(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}}function Ok(i){for(let e=i.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&ob.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function Ik(i,e){return(i.matches||i.msMatchesSelector||i.webkitMatchesSelector||i.mozMatchesSelector).call(i,e)}function Xu(i){let e={};for(let t in i)e[t]=i[t];return e}function Yu(i,e){let t=e.schema.nodes;for(let r in t){let a=t[r];if(!a.allowsMarkType(i))continue;let l=[],h=p=>{l.push(p);for(let x=0;x{if(l.length||h.marks.length){let p=0,x=0;for(;p=0;a--){let l=this.serializeMark(e.marks[a],e.isInline,t);l&&((l.contentDOM||l.dom).appendChild(r),r=l.dom)}return r}serializeMark(e,t,r={}){let a=this.marks[e.type.name];return a&&fa(jl(r),a(e,t),null,e.attrs)}static renderSpec(e,t,r=null,a){return fa(e,t,r,a)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Bn(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Vu(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return Vu(e.marks)}}function Vu(i){let e={};for(let t in i){let r=i[t].spec.toDOM;r&&(e[t]=r)}return e}function jl(i){return i.document||window.document}const ju=new WeakMap;function Nk(i){let e=ju.get(i);return e===void 0&&ju.set(i,e=Dk(i)),e}function Dk(i){let e=null;function t(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let a=0;a-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let h=a.indexOf(" ");h>0&&(t=a.slice(0,h),a=a.slice(h+1));let p,x=t?i.createElementNS(t,a):i.createElement(a),w=e[1],C=1;if(w&&typeof w=="object"&&w.nodeType==null&&!Array.isArray(w)){C=2;for(let M in w)if(w[M]!=null){let O=M.indexOf(" ");O>0?x.setAttributeNS(M.slice(0,O),M.slice(O+1),w[M]):x.setAttribute(M,w[M])}}for(let M=C;MC)throw new RangeError("Content hole must be the only child of its parent node");return{dom:x,contentDOM:x}}else{let{dom:H,contentDOM:P}=fa(i,O,t,r);if(x.appendChild(H),P){if(p)throw new RangeError("Multiple content holes");p=P}}}return{dom:x,contentDOM:p}}const lb=65535,cb=Math.pow(2,16);function Fk(i,e){return i+e*cb}function Gu(i){return i&lb}function zk(i){return(i-(i&lb))/cb}const hb=1,db=2,pa=4,ub=8;class qc{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&ub)>0}get deletedBefore(){return(this.delInfo&(hb|pa))>0}get deletedAfter(){return(this.delInfo&(db|pa))>0}get deletedAcross(){return(this.delInfo&pa)>0}}class It{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&It.empty)return It.empty}recover(e){let t=0,r=Gu(e);if(!this.inverted)for(let a=0;ae)break;let w=this.ranges[p+l],C=this.ranges[p+h],M=x+w;if(e<=M){let O=w?e==x?-1:e==M?1:t:t,H=x+a+(O<0?0:C);if(r)return H;let P=e==(t<0?x:M)?null:Fk(p/3,e-x),Y=e==x?db:e==M?hb:pa;return(t<0?e!=x:e!=M)&&(Y|=ub),new qc(H,Y,P)}a+=C-w}return r?e+a:new qc(e+a,0,null)}touches(e,t){let r=0,a=Gu(t),l=this.inverted?2:1,h=this.inverted?1:2;for(let p=0;pe)break;let w=this.ranges[p+l],C=x+w;if(e<=C&&p==a*3)return!0;r+=this.ranges[p+h]-w}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let a=0,l=0;a=0;t--){let a=e.getMirror(t);this.appendMap(e.maps[t].invert(),a!=null&&a>t?r-a-1:void 0)}}invert(){let e=new er;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;rl&&x!h.isAtom||!p.type.allowsMarkType(this.mark.type)?h:h.mark(this.mark.addToSet(h.marks)),a),t.openStart,t.openEnd);return et.fromReplace(e,this.from,this.to,l)}invert(){return new li(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Wi(t.pos,r.pos,this.mark)}merge(e){return e instanceof Wi&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Wi(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,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Wi(t.from,t.to,e.markFromJSON(t.mark))}}wt.jsonID("addMark",Wi);class li extends wt{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new ue(rd(t.content,a=>a.mark(this.mark.removeFromSet(a.marks)),e),t.openStart,t.openEnd);return et.fromReplace(e,this.from,this.to,r)}invert(){return new Wi(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new li(t.pos,r.pos,this.mark)}merge(e){return e instanceof li&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new li(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,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new li(t.from,t.to,e.markFromJSON(t.mark))}}wt.jsonID("removeMark",li);class Xi extends wt{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return et.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return et.fromReplace(e,this.pos,this.pos+1,new ue(ae.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let a=0;ar.pos?null:new lt(t.pos,r.pos,a,l,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,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new lt(t.from,t.to,t.gapFrom,t.gapTo,ue.fromJSON(e,t.slice),t.insert,!!t.structure)}}wt.jsonID("replaceAround",lt);function Uc(i,e,t){let r=i.resolve(e),a=t-e,l=r.depth;for(;a>0&&l>0&&r.indexAfter(l)==r.node(l).childCount;)l--,a--;if(a>0){let h=r.node(l).maybeChild(r.indexAfter(l));for(;a>0;){if(!h||h.isLeaf)return!0;h=h.firstChild,a--}}return!1}function Bk(i,e,t,r){let a=[],l=[],h,p;i.doc.nodesBetween(e,t,(x,w,C)=>{if(!x.isInline)return;let M=x.marks;if(!r.isInSet(M)&&C.type.allowsMarkType(r.type)){let O=Math.max(w,e),H=Math.min(w+x.nodeSize,t),P=r.addToSet(M);for(let Y=0;Yi.step(x)),l.forEach(x=>i.step(x))}function Hk(i,e,t,r){let a=[],l=0;i.doc.nodesBetween(e,t,(h,p)=>{if(!h.isInline)return;l++;let x=null;if(r instanceof ul){let w=h.marks,C;for(;C=r.isInSet(w);)(x||(x=[])).push(C),w=C.removeFromSet(w)}else r?r.isInSet(h.marks)&&(x=[r]):x=h.marks;if(x&&x.length){let w=Math.min(p+h.nodeSize,t);for(let C=0;Ci.step(new li(h.from,h.to,h.style)))}function sd(i,e,t,r=t.contentMatch,a=!0){let l=i.doc.nodeAt(e),h=[],p=e+1;for(let x=0;x=0;x--)i.step(h[x])}function _k(i,e,t){return(e==0||i.canReplace(e,i.childCount))&&(t==i.childCount||i.canReplace(0,t))}function Er(i){let t=i.parent.content.cutByIndex(i.startIndex,i.endIndex);for(let r=i.depth;;--r){let a=i.$from.node(r),l=i.$from.index(r),h=i.$to.indexAfter(r);if(rt;P--)Y||r.index(P)>0?(Y=!0,C=ae.from(r.node(P).copy(C)),M++):x--;let O=ae.empty,H=0;for(let P=l,Y=!1;P>t;P--)Y||a.after(P+1)=0;h--){if(r.size){let p=t[h].type.contentMatch.matchFragment(r);if(!p||!p.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=ae.from(t[h].type.create(t[h].attrs,r))}let a=e.start,l=e.end;i.step(new lt(a,l,a,l,new ue(r,0,0),t.length,!0))}function jk(i,e,t,r,a){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let l=i.steps.length;i.doc.nodesBetween(e,t,(h,p)=>{let x=typeof a=="function"?a(h):a;if(h.isTextblock&&!h.hasMarkup(r,x)&&Gk(i.doc,i.mapping.slice(l).map(p),r)){let w=null;if(r.schema.linebreakReplacement){let H=r.whitespace=="pre",P=!!r.contentMatch.matchType(r.schema.linebreakReplacement);H&&!P?w=!1:!H&&P&&(w=!0)}w===!1&&pb(i,h,p,l),sd(i,i.mapping.slice(l).map(p,1),r,void 0,w===null);let C=i.mapping.slice(l),M=C.map(p,1),O=C.map(p+h.nodeSize,1);return i.step(new lt(M,O,M+1,O-1,new ue(ae.from(r.create(x,null,h.marks)),0,0),1,!0)),w===!0&&fb(i,h,p,l),!1}})}function fb(i,e,t,r){e.forEach((a,l)=>{if(a.isText){let h,p=/\r?\n|\r/g;for(;h=p.exec(a.text);){let x=i.mapping.slice(r).map(t+1+l+h.index);i.replaceWith(x,x+1,e.type.schema.linebreakReplacement.create())}}})}function pb(i,e,t,r){e.forEach((a,l)=>{if(a.type==a.type.schema.linebreakReplacement){let h=i.mapping.slice(r).map(t+1+l);i.replaceWith(h,h+1,e.type.schema.text(` diff --git a/public/build/assets/app-971c9d81.js b/public/build/assets/app-971c9d81.js new file mode 100644 index 00000000..d9b2643b --- /dev/null +++ b/public/build/assets/app-971c9d81.js @@ -0,0 +1 @@ +import{a as f}from"./app-04c0bce6.js";export{f as default}; diff --git a/public/build/assets/app-d054c80f.js b/public/build/assets/app-d054c80f.js deleted file mode 100644 index 519f8cf7..00000000 --- a/public/build/assets/app-d054c80f.js +++ /dev/null @@ -1 +0,0 @@ -import{a as f}from"./app-d6423cac.js";export{f as default}; diff --git a/public/build/assets/chart-10255d84.js b/public/build/assets/chart-10255d84.js new file mode 100644 index 00000000..8d235e9e --- /dev/null +++ b/public/build/assets/chart-10255d84.js @@ -0,0 +1 @@ +import"./app-04c0bce6.js"; diff --git a/public/build/assets/chart-698b42bc.js b/public/build/assets/chart-698b42bc.js deleted file mode 100644 index ce34c258..00000000 --- a/public/build/assets/chart-698b42bc.js +++ /dev/null @@ -1 +0,0 @@ -import"./app-d6423cac.js"; diff --git a/public/build/assets/dropdown-10255d84.js b/public/build/assets/dropdown-10255d84.js new file mode 100644 index 00000000..8d235e9e --- /dev/null +++ b/public/build/assets/dropdown-10255d84.js @@ -0,0 +1 @@ +import"./app-04c0bce6.js"; diff --git a/public/build/assets/dropdown-698b42bc.js b/public/build/assets/dropdown-698b42bc.js deleted file mode 100644 index ce34c258..00000000 --- a/public/build/assets/dropdown-698b42bc.js +++ /dev/null @@ -1 +0,0 @@ -import"./app-d6423cac.js"; diff --git a/public/build/assets/editor-10255d84.js b/public/build/assets/editor-10255d84.js new file mode 100644 index 00000000..8d235e9e --- /dev/null +++ b/public/build/assets/editor-10255d84.js @@ -0,0 +1 @@ +import"./app-04c0bce6.js"; diff --git a/public/build/assets/editor-698b42bc.js b/public/build/assets/editor-698b42bc.js deleted file mode 100644 index ce34c258..00000000 --- a/public/build/assets/editor-698b42bc.js +++ /dev/null @@ -1 +0,0 @@ -import"./app-d6423cac.js"; diff --git a/public/build/assets/media-manager-10255d84.js b/public/build/assets/media-manager-10255d84.js new file mode 100644 index 00000000..8d235e9e --- /dev/null +++ b/public/build/assets/media-manager-10255d84.js @@ -0,0 +1 @@ +import"./app-04c0bce6.js"; diff --git a/public/build/assets/media-manager-698b42bc.js b/public/build/assets/media-manager-698b42bc.js deleted file mode 100644 index ce34c258..00000000 --- a/public/build/assets/media-manager-698b42bc.js +++ /dev/null @@ -1 +0,0 @@ -import"./app-d6423cac.js"; diff --git a/public/build/assets/repeater-10255d84.js b/public/build/assets/repeater-10255d84.js new file mode 100644 index 00000000..8d235e9e --- /dev/null +++ b/public/build/assets/repeater-10255d84.js @@ -0,0 +1 @@ +import"./app-04c0bce6.js"; diff --git a/public/build/assets/repeater-698b42bc.js b/public/build/assets/repeater-698b42bc.js deleted file mode 100644 index ce34c258..00000000 --- a/public/build/assets/repeater-698b42bc.js +++ /dev/null @@ -1 +0,0 @@ -import"./app-d6423cac.js"; diff --git a/public/build/assets/table-10255d84.js b/public/build/assets/table-10255d84.js new file mode 100644 index 00000000..8d235e9e --- /dev/null +++ b/public/build/assets/table-10255d84.js @@ -0,0 +1 @@ +import"./app-04c0bce6.js"; diff --git a/public/build/assets/table-698b42bc.js b/public/build/assets/table-698b42bc.js deleted file mode 100644 index ce34c258..00000000 --- a/public/build/assets/table-698b42bc.js +++ /dev/null @@ -1 +0,0 @@ -import"./app-d6423cac.js"; diff --git a/public/build/manifest.json b/public/build/manifest.json index 386aca89..2260ade2 100644 --- a/public/build/manifest.json +++ b/public/build/manifest.json @@ -7,12 +7,12 @@ "css": [ "assets/app-99097d46.css" ], - "file": "assets/app-d6423cac.js", + "file": "assets/app-04c0bce6.js", "isEntry": true, "src": "resources/js/app.js" }, "resources/js/chart.js": { - "file": "assets/chart-698b42bc.js", + "file": "assets/chart-10255d84.js", "imports": [ "resources/js/app.js" ], @@ -20,7 +20,7 @@ "src": "resources/js/chart.js" }, "resources/js/dropdown.js": { - "file": "assets/dropdown-698b42bc.js", + "file": "assets/dropdown-10255d84.js", "imports": [ "resources/js/app.js" ], @@ -28,7 +28,7 @@ "src": "resources/js/dropdown.js" }, "resources/js/editor.js": { - "file": "assets/editor-698b42bc.js", + "file": "assets/editor-10255d84.js", "imports": [ "resources/js/app.js" ], @@ -36,7 +36,7 @@ "src": "resources/js/editor.js" }, "resources/js/media-manager.js": { - "file": "assets/media-manager-698b42bc.js", + "file": "assets/media-manager-10255d84.js", "imports": [ "resources/js/app.js" ], @@ -44,7 +44,7 @@ "src": "resources/js/media-manager.js" }, "resources/js/repeater.js": { - "file": "assets/repeater-698b42bc.js", + "file": "assets/repeater-10255d84.js", "imports": [ "resources/js/app.js" ], @@ -52,7 +52,7 @@ "src": "resources/js/repeater.js" }, "resources/js/table.js": { - "file": "assets/table-698b42bc.js", + "file": "assets/table-10255d84.js", "imports": [ "resources/js/app.js" ], @@ -60,7 +60,7 @@ "src": "resources/js/table.js" }, "resources/sass/app.scss": { - "file": "assets/app-d054c80f.js", + "file": "assets/app-971c9d81.js", "imports": [ "resources/js/app.js" ], diff --git a/resources/js/app.js b/resources/js/app.js index 6ddcbb22..976398d0 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -32,3 +32,8 @@ document.addEventListener('relation-frame-loaded', (event) => { window.history.replaceState(window.history.state, document.title, event.detail.url); } }); + +// Handle the turbo:frame-missing +document.addEventListener('turbo:frame-missing', (event) => { + event.preventDefault(); +}); diff --git a/resources/views/resources/show.blade.php b/resources/views/resources/show.blade.php index 4e296728..6718e5a8 100644 --- a/resources/views/resources/show.blade.php +++ b/resources/views/resources/show.blade.php @@ -58,7 +58,11 @@

{{ $relation['label'] }}

- {{ __('Loading') }}... +
+ + {{ __('Loading') }}... + +
diff --git a/src/RootServiceProvider.php b/src/RootServiceProvider.php index 176e0093..aad888b8 100644 --- a/src/RootServiceProvider.php +++ b/src/RootServiceProvider.php @@ -219,13 +219,13 @@ protected function registerViews(): void */ protected function registerExceptions(): void { - $this->app->make(ExceptionHandler::class)->renderable( - static function (SaveFormDataException $exception): RedirectResponse { - return Redirect::back() - ->withInput() - ->with('alerts.form-save', Alert::error($exception->getMessage())); - } - ); + $exceptions = $this->app->make(ExceptionHandler::class); + + $exceptions->renderable(static function (SaveFormDataException $exception): RedirectResponse { + return Redirect::back() + ->withInput() + ->with('alerts.form-save', Alert::error($exception->getMessage())); + }); } /**