1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[97077],{7221:(e,t,n)=>{n.d(t,{Ay:()=>p});var r=n(2193);let i={x:0,y:0,width:0,height:0,unit:"px"},s=(e,t,n)=>Math.min(Math.max(e,t),n),o=(e,t)=>e===t||e.width===t.width&&e.height===t.height&&e.x===t.x&&e.y===t.y&&e.unit===t.unit;function a(e,t,n){return"%"===e.unit?{...i,...e,unit:"%"}:{unit:"%",x:e.x?e.x/t*100:0,y:e.y?e.y/n*100:0,width:e.width?e.width/t*100:0,height:e.height?e.height/n*100:0}}function l(e,t,n){return e.unit?"px"===e.unit?{...i,...e,unit:"px"}:{unit:"px",x:e.x?e.x*t/100:0,y:e.y?e.y*n/100:0,width:e.width?e.width*t/100:0,height:e.height?e.height*n/100:0}:{...i,...e,unit:"px"}}function h(e,t,n,r,i,s=0,o=0,a=r,l=i){let d={...e},c=Math.min(s,r),u=Math.min(o,i),p=Math.min(a,r),f=Math.min(l,i);t&&(t>1?(u=(c=o?o*t:c)/t,p=a*t):(c=(u=s?s/t:u)*t,f=l/t)),d.y<0&&(d.height=Math.max(d.height+d.y,u),d.y=0),d.x<0&&(d.width=Math.max(d.width+d.x,c),d.x=0);let m=r-(d.x+d.width);m<0&&(d.x=Math.min(d.x,r-c),d.width+=m);let g=i-(d.y+d.height);if(g<0&&(d.y=Math.min(d.y,i-u),d.height+=g),d.width<c&&(("sw"===n||"nw"==n)&&(d.x-=c-d.width),d.width=c),d.height<u&&(("nw"===n||"ne"==n)&&(d.y-=u-d.height),d.height=u),d.width>p&&(("sw"===n||"nw"==n)&&(d.x-=p-d.width),d.width=p),d.height>f&&(("nw"===n||"ne"==n)&&(d.y-=f-d.height),d.height=f),t){let e=d.width/d.height;if(e<t){let e=Math.max(d.width/t,u);("nw"===n||"ne"==n)&&(d.y-=e-d.height),d.height=e}else if(e>t){let e=Math.max(d.height*t,c);("sw"===n||"nw"==n)&&(d.x-=e-d.width),d.width=e}}return d}let d={capture:!0,passive:!1},c=0,u=class e extends r.PureComponent{constructor(){super(...arguments),this.docMoveBound=!1,this.mouseDownOnCrop=!1,this.dragStarted=!1,this.evData={startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0},this.componentRef=(0,r.createRef)(),this.mediaRef=(0,r.createRef)(),this.initChangeCalled=!1,this.instanceId=`rc-${c++}`,this.state={cropIsActive:!1,newCropIsBeingDrawn:!1},this.onCropPointerDown=e=>{let{crop:t,disabled:n}=this.props,r=this.getBox();if(!t)return;let i=l(t,r.width,r.height);if(n)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let s=e.target.dataset.ord,o=e.clientX,a=e.clientY,h=i.x,d=i.y;if(s){let t=e.clientX-r.x,n=e.clientY-r.y,l=0,c=0;"ne"===s||"e"==s?(l=t-(i.x+i.width),c=n-i.y,h=i.x,d=i.y+i.height):"se"===s||"s"===s?(l=t-(i.x+i.width),c=n-(i.y+i.height),h=i.x,d=i.y):"sw"===s||"w"==s?(l=t-i.x,c=n-(i.y+i.height),h=i.x+i.width,d=i.y):("nw"===s||"n"==s)&&(l=t-i.x,c=n-i.y,h=i.x+i.width,d=i.y+i.height),o=h+r.x+l,a=d+r.y+c}this.evData={startClientX:o,startClientY:a,startCropX:h,startCropY:d,clientX:e.clientX,clientY:e.clientY,isResize:!!s,ord:s},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})},this.onComponentPointerDown=e=>{let{crop:t,disabled:n,locked:r,keepSelection:i,onChange:s}=this.props,o=this.getBox();if(n||r||i&&t)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let h=e.clientX-o.x,d=e.clientY-o.y,c={unit:"px",x:h,y:d,width:0,height:0};this.evData={startClientX:e.clientX,startClientY:e.clientY,startCropX:h,startCropY:d,clientX:e.clientX,clientY:e.clientY,isResize:!0},this.mouseDownOnCrop=!0,s(l(c,o.width,o.height),a(c,o.width,o.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})},this.onDocPointerMove=e=>{let t,{crop:n,disabled:r,onChange:i,onDragStart:s}=this.props,h=this.getBox();if(r||!n||!this.mouseDownOnCrop)return;e.cancelable&&e.preventDefault(),this.dragStarted||(this.dragStarted=!0,s&&s(e));let{evData:d}=this;d.clientX=e.clientX,d.clientY=e.clientY,o(n,t=d.isResize?this.resizeCrop():this.dragCrop())||i(l(t,h.width,h.height),a(t,h.width,h.height))},this.onComponentKeyDown=t=>{let{crop:n,disabled:r,onChange:i,onComplete:o}=this.props;if(r)return;let h=t.key,d=!1;if(!n)return;let c=this.getBox(),u=this.makePixelCrop(c),p=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep;if("ArrowLeft"===h?(u.x-=p,d=!0):"ArrowRight"===h?(u.x+=p,d=!0):"ArrowUp"===h?(u.y-=p,d=!0):"ArrowDown"===h&&
1(u.y+=p,d=!0),d){t.cancelable&&t.preventDefault(),u.x=s(u.x,0,c.width-u.width),u.y=s(u.y,0,c.height-u.height);let e=l(u,c.width,c.height),n=a(u,c.width,c.height);i(e,n),o&&o(e,n)}},this.onHandlerKeyDown=(t,n)=>{var r,i;let s,{aspect:d=0,crop:c,disabled:u,minWidth:p=0,minHeight:f=0,maxWidth:m,maxHeight:g,onChange:y,onComplete:k}=this.props,w=this.getBox();if(u||!c||"ArrowUp"!==t.key&&"ArrowDown"!==t.key&&"ArrowLeft"!==t.key&&"ArrowRight"!==t.key)return;t.stopPropagation(),t.preventDefault();let v=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep,b=h((r=l(c,w.width,w.height),i=t.key,s={...r},"ArrowLeft"===i?"nw"===n?(s.x-=v,s.y-=v,s.width+=v,s.height+=v):"w"===n?(s.x-=v,s.width+=v):"sw"===n?(s.x-=v,s.width+=v,s.height+=v):"ne"===n?(s.y+=v,s.width-=v,s.height-=v):"e"===n?s.width-=v:"se"===n&&(s.width-=v,s.height-=v):"ArrowRight"===i&&("nw"===n?(s.x+=v,s.y+=v,s.width-=v,s.height-=v):"w"===n?(s.x+=v,s.width-=v):"sw"===n?(s.x+=v,s.width-=v,s.height-=v):"ne"===n?(s.y-=v,s.width+=v,s.height+=v):"e"===n?s.width+=v:"se"===n&&(s.width+=v,s.height+=v)),"ArrowUp"===i?"nw"===n?(s.x-=v,s.y-=v,s.width+=v,s.height+=v):"n"===n?(s.y-=v,s.height+=v):"ne"===n?(s.y-=v,s.width+=v,s.height+=v):"sw"===n?(s.x+=v,s.width-=v,s.height-=v):"s"===n?s.height-=v:"se"===n&&(s.width-=v,s.height-=v):"ArrowDown"===i&&("nw"===n?(s.x+=v,s.y+=v,s.width-=v,s.height-=v):"n"===n?(s.y+=v,s.height-=v):"ne"===n?(s.y+=v,s.width-=v,s.height-=v):"sw"===n?(s.x-=v,s.width+=v,s.height+=v):"s"===n?s.height+=v:"se"===n&&(s.width+=v,s.height+=v)),s),d,n,w.width,w.height,p,f,m,g);if(!o(c,b)){let e=a(b,w.width,w.height);y(b,e),k&&k(b,e)}},this.onDocPointerDone=e=>{let{crop:t,disabled:n,onComplete:r,onDragEnd:i}=this.props,s=this.getBox();this.unbindDocMove(),!(n||!t)&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,i&&i(e),r&&r(l(t,s.width,s.height),a(t,s.width,s.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))},this.onDragFocus=()=>{var e;null==(e=this.componentRef.current)||e.scrollTo(0,0)}}get document(){return document}getBox(){let e=this.mediaRef.current;if(!e)return{x:0,y:0,width:0,height:0};let{x:t,y:n,width:r,height:i}=e.getBoundingClientRect();return{x:t,y:n,width:r,height:i}}componentDidUpdate(e){let{crop:t,onComplete:n}=this.props;if(n&&!e.crop&&t){let{width:e,height:r}=this.getBox();e&&r&&n(l(t,e,r),a(t,e,r))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}bindDocMove(){this.docMoveBound||(this.document.addEventListener("pointermove",this.onDocPointerMove,d),this.document.addEventListener("pointerup",this.onDocPointerDone,d),this.document.addEventListener("pointercancel",this.onDocPointerDone,d),this.docMoveBound=!0)}unbindDocMove(){this.docMoveBound&&(this.document.removeEventListener("pointermove",this.onDocPointerMove,d),this.document.removeEventListener("pointerup",this.onDocPointerDone,d),this.document.removeEventListener("pointercancel",this.onDocPointerDone,d),this.docMoveBound=!1)}getCropStyle(){let{crop:e}=this.props;if(e)return{top:`${e.y}${e.unit}`,left:`${e.x}${e.unit}`,width:`${e.width}${e.unit}`,height:`${e.height}${e.unit}`}}dragCrop(){let{evData:e}=this,t=this.getBox(),n=this.makePixelCrop(t),r=e.clientX-e.startClientX,i=e.clientY-e.startClientY;return n.x=s(e.startCropX+r,0,t.width-n.width),n.y=s(e.startCropY+i,0,t.height-n.height),n}getPointRegion(e,t,n,r){let i,{evData:s}=this,o=s.clientX-e.x,a=s.clientY-e.y;return i=r&&t?"nw"===t||"n"===t||"ne"===t:a<s.startCropY,(n&&t?"nw"===t||"w"===t||"sw"===t:o<s.startCropX)?i?"nw":"sw":i?"ne":"se"}resolveMinDimensions(e,t,n=0,r=0){let i=Math.min(n,e.width),s=Math.min(r,e.height);return t&&(i||s)?t>1?i?[i,i/t]:[s*t,s]:s?[s*t,s]:[i,i/t]:[i,s]}resizeCrop(){let{evData:t}=this,{aspect:n=0,maxWidth:r,maxHeight:i}=this.props,o=this.getBox(),[a,l]=this.resolveMinDimensions(o,n,this.props.minWidth,this.props.minHeight),d=this.makePixelCrop(o),c=this.getPointRegion(o,t.ord,a,l),u=t.ord||c,p=t.clientX-t.startClientX,f=t.clientY-t.startClientY;(a&&"nw"===u||"w"===u||"sw"===u)&&(p=Math.min(p,-a)),(l&&"nw"===u||"n"===u||"ne"===u)&&(f=Math.min(f,-l));let m={unit:"px",x:0,y:0,width:0,height:0};"ne"===c?(m.x=t.startCropX,m.width=p,n?m.height=m.width/n:m.height=Math.abs(f),m.y=t.startCropY-m.height):"se"===c?(m.x=t.startCropX,m.y=t.startCropY,m.width=p,n?m.height=m.width/n:m.height=f):"sw"===c?(m.x=t.startCropX+p,m.y=t.startCropY,m.width=Math.abs(p),n?m.height=m.width/n:m.height=f):"nw"===c&&(m.x=t.startCropX+p,m.width=Math.abs(p),n?(m.height=m.width/n,m.y=t.startCropY-m.height):(m.height=Math.abs(f),m.y=t.startCropY+f));let g=h(m,n,c,o.width,o.height,a,l,r,i);return n||e.xyOrds.indexOf(u)>-1?d=g:e.xOrds.indexOf(u)>-1?(d.x=g.x,d.width=g.width):e.yOrds.indexOf(u)>-1&&(d.y=g.y,d.height=g.height),d.x=s(d.x,0,o.width-d.width),d.y=s(d.y,0,o.height-d.height),d}renderCropSelection(){let{ariaLabels:t=e.defaultProps.ariaLabels,disabled:n,locked:i,renderSelectionAddon:s,ruleOfThirds:o,crop:a}=this.props,l=this.getCropStyle();if(a)return r.createElement("div",{style:l,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":t.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!n&&!i&&r.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},r.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),r.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),r.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),r.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),r.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw",tabIndex:0,"aria-label":t.nwDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"nw"),role:"button"}),r.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n",tabIndex:0,"aria-label":t.nDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"n"),role:"button"}),r.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne",tabIndex:0,"aria-label":t.neDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"ne"),role:"button"}),r.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e",tabIndex:0,"aria-label":t.eDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"e"),role:"button"}),r.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se",tabIndex:0,"aria-label":t.seDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"se"),role:"button"}),r.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s",tabIndex:0,"aria-label":t.sDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"s"),role:"button"}),r.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw",tabIndex:0,"aria-label":t.swDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"sw"),role:"button"}),r.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w",tabIndex:0,"aria-label":t.wDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"w"),role:"button"})),s&&r.createElement("div",{className:"ReactCrop__selection-addon",onPointerDown:e=>e.stopPropagation()},s(this.state)),o&&r.createElement(r.Fragment,null,r.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),r.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(e){return l({...i,...this.props.crop||{}},e.width,e.height)}render(){let{aspect:e,children:t,circularCrop:n,className:i,crop:s,disabled:o,locked:a,style:l,ruleOfThirds:h}=this.props,{cropIsActive:d,newCropIsBeingDrawn:c}=this.state,u=s?this.renderCropSelection():null,p=((...e)=>e.filter(e=>e&&"string"==typeof e).join(" "))("ReactCrop",i,d&&"ReactCrop--active",o&&"ReactCrop--disabled",a&&"ReactCrop--locked",c&&"ReactCrop--new-crop",s&&e&&"ReactCrop--fixed-aspect",s&&n&&"ReactCrop--circular-crop",s&&h&&"ReactCrop--rule-of-thirds",!this.dragStarted&&s&&!s.width&&!s.height&&"ReactCrop--invisible-crop",n&&"ReactCrop--no-animate");return r.createElement("div",{ref:this.componentRef,className:p,style:l},r.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},t),s?r.createElement("svg",{className:"ReactCrop__crop-mask",width:"100%",height:"100%"},r.createElement("defs",null,r.createElement("mask",{id:`hole-${this.instanceId}`},r.createElement("rect",{width:"100%",height:"100%",fill:"white"}),n?r.createElement("ellipse",{cx:`${s.x+s.width/2}${s.unit}`,cy:`${s.y+s.height/2}${s.unit}`,rx:`${s.width/2}${s.unit}`,ry:`${s.height/2}${s.unit}`,fill:"black"}):r.createElement("rect",{x:`${s.x}${s.unit}`,y:`${s.y}${s.unit}`,width:`${s.width}${s.unit}`,height:`${s.height}${s.unit}`,fill:"black"}))),r.createElement("rect",{fill:"black",fillOpacity:.5,width:"100%",height:"100%",mask:`url(#hole-${this.instanceId})`})):void 0,u)}};u.xOrds=["e","w"],u.yOrds=["n","s"],u.xyOrds=["nw","ne","se","sw"],u.nudgeStep=1,u.nudgeStepMedium=10,u.nudgeStepLarge=100,u.defaultProps={ariaLabels:{cropArea:"Use the arrow keys to move the crop selection area",nwDragHandle:"Use the arrow keys to move the north west drag handle to change the crop selection area",nDragHandle:"Use the up and down arrow keys to move the north drag handle to change the crop selection area",neDragHandle:"Use the arrow keys to move the north east drag handle to change the crop selection area",eDragHandle:"Use the up and down arrow keys to move the east drag handle to change the crop selection area",seDragHandle:"Use the arrow keys to move the south east drag handle to change the crop selection area",sDragHandle:"Use the up and down arrow keys to move the south drag handle to change the crop selection area",swDragHandle:"Use the arrow keys to move the south west drag handle to change the crop selection area",wDragHandle:"Use the up and down arrow keys to move the west drag handle to change the crop selection area"}};let p=u}
1,22272:(e,t,n)=>{n.d(t,{$f:()=>R,G2:()=>w,I$:()=>S,Im:()=>I,Qv:()=>l,Sd:()=>y,Z1:()=>M,_G:()=>d,_e:()=>p,bh:()=>v,eB:()=>h,eT:()=>g,ec:()=>L,hy:()=>E,iz:()=>A,pC:()=>x,yY:()=>b,y_:()=>N});var r=n(75419),i=n(66935),s=n(73292);let o=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function a(e,t){let{$cursor:n}=e.selection;return n&&(t?t.endOfTextblock("backward",e):!(n.parentOffset>0))?n:null}let l=(e,t,n)=>{let o=a(e,n);if(!o)return!1;let l=f(o);if(!l){let n=o.blockRange(),i=n&&(0,r.jP)(n);return null!=i&&(t&&t(e.tr.lift(n,i).scrollIntoView()),!0)}let h=l.nodeBefore;if(T(e,l,t,-1))return!0;if(0==o.parent.content.size&&(u(h,"end")||s.nh.isSelectable(h)))for(let n=o.depth;;n--){let a=(0,r.$L)(e.doc,o.before(n),o.after(n),i.Ji.empty);if(a&&a.slice.size<a.to-a.from){if(t){let n=e.tr.step(a);n.setSelection(u(h,"end")?s.LN.findFrom(n.doc.resolve(n.mapping.map(l.pos,-1)),-1):s.nh.create(n.doc,l.pos-h.nodeSize)),t(n.scrollIntoView())}return!0}if(1==n||o.node(n-1).childCount>1)break}return!!h.isAtom&&l.depth==o.depth-1&&(t&&t(e.tr.delete(l.pos-h.nodeSize,l.pos).scrollIntoView()),!0)},h=(e,t,n)=>{let r=a(e,n);if(!r)return!1;let i=f(r);return!!i&&c(e,i,t)},d=(e,t,n)=>{let r=m(e,n);if(!r)return!1;let i=k(r);return!!i&&c(e,i,t)};function c(e,t,n){let o=t.nodeBefore,a=t.pos-1;for(;!o.isTextblock;a--){if(o.type.spec.isolating)return!1;let e=o.lastChild;if(!e)return!1;o=e}let l=t.nodeAfter,h=t.pos+1;for(;!l.isTextblock;h++){if(l.type.spec.isolating)return!1;let e=l.firstChild;if(!e)return!1;l=e}let d=(0,r.$L)(e.doc,a,h,i.Ji.empty);if(!d||d.from!=a||d instanceof r.Ln&&d.slice.size>=h-a)return!1;if(n){let t=e.tr.step(d);t.setSelection(s.U3.create(t.doc,a)),n(t.scrollIntoView())}return!0}function u(e,t,n=!1){for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)break}return!1}let p=(e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;o=f(r)}let a=o&&o.nodeBefore;return!!a&&!!s.nh.isSelectable(a)&&(t&&t(e.tr.setSelection(s.nh.create(e.doc,o.pos-a.nodeSize)).scrollIntoView()),!0)};function f(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function m(e,t){let{$cursor:n}=e.selection;return n&&(t?t.endOfTextblock("forward",e):!(n.parentOffset<n.parent.content.size))?n:null}let g=(e,t,n)=>{let o=m(e,n);if(!o)return!1;let a=k(o);if(!a)return!1;let l=a.nodeAfter;if(T(e,a,t,1))return!0;if(0==o.parent.content.size&&(u(l,"start")||s.nh.isSelectable(l))){let n=(0,r.$L)(e.doc,o.before(),o.after(),i.Ji.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(u(l,"start")?s.LN.findFrom(r.doc.resolve(r.mapping.map(a.pos)),1):s.nh.create(r.doc,r.mapping.map(a.pos))),t(r.scrollIntoView())}return!0}}return!!l.isAtom&&a.depth==o.depth-1&&(t&&t(e.tr.delete(a.pos,a.pos+l.nodeSize).scrollIntoView()),!0)},y=(e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;o=k(r)}let a=o&&o.nodeAfter;return!!a&&!!s.nh.isSelectable(a)&&(t&&t(e.tr.setSelection(s.nh.create(e.doc,o.pos)).scrollIntoView()),!0)};function k(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}let w=(e,t)=>{let n=e.selection,i=n instanceof s.nh,o;if(i){if(n.node.isTextblock||!(0,r.n9)(e.doc,n.from))return!1;o=n.from}else if(null==(o=(0,r.N0)(e.doc,n.from,-1)))return!1;if(t){let n=e.tr.join(o);i&&n.setSelection(s.nh.create(n.doc,o-e.doc.resolve(o).nodeBefore.nodeSize)),t(n.scrollIntoView())}return!0},v=(e,t)=>
1{let n=e.selection,i;if(n instanceof s.nh){if(n.node.isTextblock||!(0,r.n9)(e.doc,n.to))return!1;i=n.to}else if(null==(i=(0,r.N0)(e.doc,n.to,1)))return!1;return t&&t(e.tr.join(i).scrollIntoView()),!0},b=(e,t)=>{let{$from:n,$to:i}=e.selection,s=n.blockRange(i),o=s&&(0,r.jP)(s);return null!=o&&(t&&t(e.tr.lift(s,o).scrollIntoView()),!0)},x=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!!n.parent.type.spec.code&&!!n.sameParent(r)&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)};function C(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}let S=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),a=C(i.contentMatchAt(o));if(!a||!i.canReplaceWith(o,o,a))return!1;if(t){let r=n.after(),i=e.tr.replaceWith(r,r,a.createAndFill());i.setSelection(s.LN.near(i.doc.resolve(r),1)),t(i.scrollIntoView())}return!0},M=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof s.i5||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=C(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let n=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,a=e.tr.insert(n,o.createAndFill());a.setSelection(s.U3.create(a.doc,n+1)),t(a.scrollIntoView())}return!0},A=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if((0,r.zy)(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let i=n.blockRange(),s=i&&(0,r.jP)(i);return null!=s&&(t&&t(e.tr.lift(i,s).scrollIntoView()),!0)},E=(e,t)=>{let{$from:n,to:r}=e.selection,i,o=n.sharedDepth(r);return 0!=o&&(i=n.before(o),t&&t(e.tr.setSelection(s.nh.create(e.doc,i))),!0)};function T(e,t,n,o){let a,l,h,d=t.nodeBefore,c=t.nodeAfter,p,f,m=d.type.spec.isolating||c.type.spec.isolating;if(!m&&(a=t.nodeBefore,l=t.nodeAfter,h=t.index(),a&&l&&a.type.compatibleContent(l.type)&&(!a.content.size&&t.parent.canReplace(h-1,h)?(n&&n(e.tr.delete(t.pos-a.nodeSize,t.pos).scrollIntoView()),!0):!!t.parent.canReplace(h,h+1)&&!!(l.isTextblock||(0,r.n9)(e.doc,t.pos))&&(n&&n(e.tr.join(t.pos).scrollIntoView()),!0))))return!0;let g=!m&&t.parent.canReplace(t.index(),t.index()+1);if(g&&(p=(f=d.contentMatchAt(d.childCount)).findWrapping(c.type))&&f.matchType(p[0]||c.type).validEnd){if(n){let s=t.pos+c.nodeSize,o=i.FK.empty;for(let e=p.length-1;e>=0;e--)o=i.FK.from(p[e].create(null,o));o=i.FK.from(d.copy(o));let a=e.tr.step(new r.Wg(t.pos-1,s,t.pos,s,new i.Ji(o,1,0),p.length,!0)),l=a.doc.resolve(s+2*p.length);l.nodeAfter&&l.nodeAfter.type==d.type&&(0,r.n9)(a.doc,l.pos)&&a.join(l.pos),n(a.scrollIntoView())}return!0}let y=c.type.spec.isolating||o>0&&m?null:s.LN.findFrom(t,1),k=y&&y.$from.blockRange(y.$to),w=k&&(0,r.jP)(k);if(null!=w&&w>=t.depth)return n&&n(e.tr.lift(k,w).scrollIntoView()),!0;if(g&&u(c,"start",!0)&&u(d,"end")){let s=d,o=[];for(;o.push(s),!s.isTextblock;)s=s.lastChild;let a=c,l=1;for(;!a.isTextblock;a=a.firstChild)l++;if(s.canReplace(s.childCount,s.childCount,a.content)){if(n){let s=i.FK.empty;for(let e=o.length-1;e>=0;e--)s=i.FK.from(o[e].copy(s));n(e.tr.step(new r.Wg(t.pos-o.length,t.pos+c.nodeSize,t.pos+l,t.pos+c.nodeSize-l,new i.Ji(s,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function O(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return!!i.node(o).isTextblock&&(n&&n(t.tr.setSelection(s.U3.create(t.doc,e<0?i.start(o):i.end(o)))),!0)}}let R=O(-1),L=O(1);function I(e,t=null){return function(n,i){let{$from:s,$to:o}=n.selection,a=s.blockRange(o),l=a&&(0,r.oM)(a,e,t);return!!l&&(i&&i(n.tr.wrap(a,l).scrollIntoView()),!0)}}function N(e,t=null){return function(n,r){let i=!1;for(let r=0;r<n.selection.ranges.length&&!i;r++){let{$from:{pos:s},$to:{pos:o}}=n.selection.ranges[r];n.doc.nodesBetween(s,o,(r,s)=>{if(i)return!1;if(!(!r.isTextblock||r.hasMarkup(e,t)))if(r.type==e)i=!0;else{let t=n.doc.resolve(s),r=t.index();i=t.parent.canReplaceWith(r,r+1,e)}})}if(!i)return!1;if(r){let i=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:s},$to:{pos:o}}=n.selection.ranges[r];i.setBlockType(s,o,e,t)}r(i.scrollIntoView())}return!0}}function D(...e){return function(t,n,r){for(let i=0;i<e.length;i++)if(e[i](t,n,r))return!0;return!1}}let z=D(o,l,p),P=D(o,g,y),$={Enter:D(x,M,A,(e,t)=>{let{$from:n,$to:i}=e.selection;if(e.selection instanceof s.nh&&e.selection.node.isBlock)return!!n.parentOffset&&!!(0,r.zy)(e.doc,n.pos)&&(t&&t(e.tr.split(n.pos).scrollIntoView()),!0);if(!n.depth)return!1;let o=[],a,l,h=!1,d=!1;for(let e=n.depth;;e--){if(n.node(e).isBlock){let t;h=n.end(e)==n.pos+(n.depth-e),d=n.start(e)==n.pos-(n.depth-e),l=C(n.node(e-1).contentMatchAt(n.indexAfter(e-1)));o.unshift(t||(h&&l?{type:l}:null)),a=e;break}if(1==e)return!1;o.unshift(null)}let c=e.tr;(e.selection instanceof s.U3||e.selection instanceof s.i5)&&c.deleteSelection();let u=c.mapping.map(n.pos),p=(0,r.zy)(c.doc,u,o.length,o);if(p||(o[0]=l?{type:l}:null,p=(0,r.zy)(c.doc,u,o.length,o)),!p)return!1;if(c.split(u,o.length,o),!h&&d&&n.node(a).type!=l){let e=c.mapping.map(n.before(a)),t=c.doc.resolve(e);l&&n.node(a-1).canReplaceWith(t.index(),t.index()+1,l)&&c.setNodeMarkup(c.mapping.map(n.before(a)),l)}return t&&t(c.scrollIntoView()),!0}),"Mod-Enter":S,Backspace:z,"Mod-Backspace":z,"Shift-Backspace":z,Delete:P,"Mod-Delete":P,"Mod-a":(e,t)=>
1(t&&t(e.tr.setSelection(new s.i5(e.doc))),!0)},j={"Ctrl-h":$.Backspace,"Alt-Backspace":$["Mod-Backspace"],"Ctrl-d":$.Delete,"Ctrl-Alt-Backspace":$["Mod-Delete"],"Alt-Delete":$["Mod-Delete"],"Alt-d":$["Mod-Delete"],"Ctrl-a":R,"Ctrl-e":L};for(let e in $)j[e]=$[e];"u">typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"u">typeof os&&os.platform&&os.platform()},24482:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(61133).A)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]])},31051:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(61133).A)("gallery-horizontal-end",[["path",{d:"M2 7v10",key:"a2pl2d"}],["path",{d:"M6 5v14",key:"1kq3d7"}],["rect",{width:"12",height:"18",x:"10",y:"3",rx:"2",key:"13i7bc"}]])},32633:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(61133).A)("image-off",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]])},43658:(e,t,n)=>{n.d(t,{$B:()=>a,Sd:()=>s,T2:()=>o});var r=n(75419),i=n(66935);function s(e,t=null){return function(n,s){let{$from:o,$to:a}=n.selection,l=o.blockRange(a);if(!l)return!1;let h=s?n.tr:null;return!!function(e,t,n,s=null){let o=!1,a=t,l=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&0==t.startIndex){if(0==t.$from.index(t.depth-1))return!1;let e=l.resolve(t.start-2);a=new i.u$(e,e,t.depth),t.endIndex<t.parent.childCount&&(t=new i.u$(t.$from,l.resolve(t.$to.end(t.depth)),t.depth)),o=!0}let h=(0,r.oM)(a,n,s,t);return!!h&&(e&&function(e,t,n,s,o){let a=i.FK.empty;for(let e=n.length-1;e>=0;e--)a=i.FK.from(n[e].type.create(n[e].attrs,a));e.step(new r.Wg(t.start-2*!!s,t.end,t.start,t.end,new i.Ji(a,0,0),n.length,!0));let l=0;for(let e=0;e<n.length;e++)n[e].type==o&&(l=e+1);let h=n.length-l,d=t.start+n.length-2*!!s,c=t.parent;for(let n=t.startIndex,i=t.endIndex,s=!0;n<i;n++,s=!1)!s&&(0,r.zy)(e.doc,d,h)&&(e.split(d,h),d+=2*h),d+=c.child(n).nodeSize}(e,t,h,o,n),!0)}(h,l,e,t)&&(s&&s(h.scrollIntoView()),!0)}}function o(e){return function(t,n){let{$from:s,$to:o}=t.selection,a=s.blockRange(o,t=>t.childCount>0&&t.firstChild.type==e);return!!a&&(!n||(s.node(a.depth-1).type==e?function(e,t,n,s){let o=e.tr,a=s.end,l=s.$to.end(s.depth);a<l&&(o.step(new r.Wg(a-1,l,a,l,new i.Ji(i.FK.from(n.create(null,s.parent.copy())),1,0),1,!0)),s=new i.u$(o.doc.resolve(s.$from.pos),o.doc.resolve(l),s.depth));let h=(0,r.jP)(s);if(null==h)return!1;o.lift(s,h);let d=o.doc.resolve(o.mapping.map(a,-1)-1);return(0,r.n9)(o.doc,d.pos)&&d.nodeBefore.type==d.nodeAfter.type&&o.join(d.pos),t(o.scrollIntoView()),!0}(t,n,e,a):function(e,t,n){let s=e.tr,o=n.parent;for(let e=n.end,t=n.endIndex-1,r=n.startIndex;t>r;t--)e-=o.child(t).nodeSize,s.delete(e-1,e+1);let a=s.doc.resolve(n.start),l=a.nodeAfter;if(s.mapping.map(n.end)!=n.start+a.nodeAfter.nodeSize)return!1;let h=0==n.startIndex,d=n.endIndex==o.childCount,c=a.node(-1),u=a.index(-1);if(!c.canReplace(u+ +!h,u+1,l.content.append(d?i.FK.empty:i.FK.from(o))))return!1;let p=a.pos,f=p+l.nodeSize;return s.step(new r.Wg(p-!!h,f+ +!!d,p+1,f-1,new i.Ji((h?i.FK.empty:i.FK.from(o.copy(i.FK.empty))).append(d?i.FK.empty:i.FK.from(o.copy(i.FK.empty))),+!h,+!d),+!h)),t(s.scrollIntoView()),!0}(t,n,a)))}}function a(e){return function(t,n){let{$from:s,$to:o}=t.selection,a=s.blockRange(o,t=>t.childCount>0&&t.firstChild.type==e);if(!a)return!1;let l=a.startIndex;if(0==l)return!1;let h=a.parent,d=h.child(l-1);if(d.type!=e)return!1;if(n){let s=d.lastChild&&d.lastChild.type==h.type,o=i.FK.from(s?e.create():null),l=new i.Ji(i.FK.from(e.create(null,i.FK.from(h.type.create(null,o)))),s?3:1,0),c=a.start,u=a.end;n(t.tr.step(new r.Wg(c-(s?3:1),u,c,u,l,1,!0)).scrollIntoView())}return!0}}},46477:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(61133).A)("list-filter",[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]])},46687:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(61133).A)("tags",[["path",{d:"M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z",key:"16rjxf"}],["path",{d:"M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193",key:"178nd4"}],["circle",{cx:"10.5",cy:"6.5",r:".5",fill:"currentColor",key:"12ikhr"}]])},47626:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(61133).A)("crop",[["path",{d:"M6 2v14a2 2 0 0 0 2 2h14",key:"ron5a4"}],["path",{d:"M18 22V8a2 2 0 0 0-2-2H2",key:"7s9ehn"}]])},50242:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(61133).A)("arrow-left-right",[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]])},52537:(e,t,n)=>{n.d(t,{$Z:()=>H,VR:()=>X,gu:()=>et,hG:()=>W});var r=n(2193),i=n(61396),s=n(48130),o=n(47477),a=n(56856);let{getOwnPropertyNames:l,getOwnPropertySymbols:h}=Object,{hasOwnProperty:d}=Object.prototype;function c(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function u(e){return function(t,n,r){if(!t||!n||"object"!=typeof t||"object"!=typeof n)return e(t,n,r);let{cache:i}
1=r,s=i.get(t),o=i.get(n);if(s&&o)return s===n&&o===t;i.set(t,n),i.set(n,t);let a=e(t,n,r);return i.delete(t),i.delete(n),a}}function p(e){return l(e).concat(h(e))}let f=Object.hasOwn||((e,t)=>d.call(e,t));function m(e,t){return e===t||!e&&!t&&e!=e&&t!=t}let{getOwnPropertyDescriptor:g,keys:y}=Object;function k(e,t){return e.byteLength===t.byteLength&&R(new Uint8Array(e),new Uint8Array(t))}function w(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function v(e,t){return e.byteLength===t.byteLength&&R(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function b(e,t){return m(e.getTime(),t.getTime())}function x(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function C(e,t){return e===t}function S(e,t,n){let r,i,s=e.size;if(s!==t.size)return!1;if(!s)return!0;let o=Array(s),a=e.entries(),l=0;for(;(r=a.next())&&!r.done;){let s=t.entries(),a=!1,h=0;for(;(i=s.next())&&!i.done;){if(o[h]){h++;continue}let s=r.value,d=i.value;if(n.equals(s[0],d[0],l,h,e,t,n)&&n.equals(s[1],d[1],s[0],d[0],e,t,n)){a=o[h]=!0;break}h++}if(!a)return!1;l++}return!0}function M(e,t,n){let r=y(e),i=r.length;if(y(t).length!==i)return!1;for(;i-- >0;)if(!I(e,t,n,r[i]))return!1;return!0}function A(e,t,n){let r,i,s,o=p(e),a=o.length;if(p(t).length!==a)return!1;for(;a-- >0;)if(!I(e,t,n,r=o[a])||(i=g(e,r),s=g(t,r),(i||s)&&(!i||!s||i.configurable!==s.configurable||i.enumerable!==s.enumerable||i.writable!==s.writable)))return!1;return!0}function E(e,t){return m(e.valueOf(),t.valueOf())}function T(e,t){return e.source===t.source&&e.flags===t.flags}function O(e,t,n){let r,i,s=e.size;if(s!==t.size)return!1;if(!s)return!0;let o=Array(s),a=e.values();for(;(r=a.next())&&!r.done;){let s=t.values(),a=!1,l=0;for(;(i=s.next())&&!i.done;){if(!o[l]&&n.equals(r.value,i.value,r.value,i.value,e,t,n)){a=o[l]=!0;break}l++}if(!a)return!1}return!0}function R(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function L(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function I(e,t,n,r){return("_owner"===r||"__o"===r||"__v"===r)&&(!!e.$$typeof||!!t.$$typeof)||f(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}let N={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},D=Object.prototype.toString,z=P();function P(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,s=function({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:s,areMapsEqual:o,areNumbersEqual:a,areObjectsEqual:l,arePrimitiveWrappersEqual:h,areRegExpsEqual:d,areSetsEqual:c,areTypedArraysEqual:u,areUrlsEqual:p,unknownTagComparators:f}){return function(m,g,y){if(m===g)return!0;if(null==m||null==g)return!1;let k=typeof m;if(k!==typeof g)return!1;if("object"!==k)return"number"===k?a(m,g,y):"function"===k&&s(m,g,y);let w=m.constructor;if(w!==g.constructor)return!1;if(w===Object)return l(m,g,y);if(Array.isArray(m))return t(m,g,y);if(w===Date)return r(m,g,y);if(w===RegExp)return d(m,g,y);if(w===Map)return o(m,g,y);if(w===Set)return c(m,g,y);let v=D.call(m);if("[object Date]"===v)return r(m,g,y);if("[object RegExp]"===v)return d(m,g,y);if("[object Map]"===v)return o(m,g,y);if("[object Set]"===v)return c(m,g,y);if("[object Object]"===v)return"function"!=typeof m.then&&"function"!=typeof g.then&&l(m,g,y);if("[object URL]"===v)return p(m,g,y);if("[object Error]"===v)return i(m,g,y);if("[object Arguments]"===v)return l(m,g,y);if(N[v])return u(m,g,y);if("[object ArrayBuffer]"===v)return e(m,g,y);if("[object DataView]"===v)return n(m,g,y);if("[object Boolean]"===v||"[object Number]"===v||"[object String]"===v)return h(m,g,y);if(f){let e=f[v];if(!e){let t=null!=m?m[Symbol.toStringTag]:void 0;t&&(e=f[t])}if(e)return e(m,g,y)}return!1}}(function({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:k,areArraysEqual:n?A:w,areDataViewsEqual:v,areDatesEqual:b,areErrorsEqual:x,areFunctionsEqual:C,areMapsEqual:n?c(S,A):S,areNumbersEqual:m,areObjectsEqual:n?A:M,arePrimitiveWrappersEqual:E,areRegExpsEqual:T,areSetsEqual:n?c(O,A):O,areTypedArraysEqual:n?c(R,A):R,areUrlsEqual:L,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let e=u(r.areArraysEqual),t=u(r.areMapsEqual),n=u(r.areObjectsEqual),i=u(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:i})}return r}(e)),o=n?n(s):function(e,t,n,r,i,o,a){return s(e,t,a)};return function({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(s,o){let{cache:a=e?new WeakMap:void 0,meta:l}=n();return t(s,o,{cache:a,equals:r,meta:l,strict:i})};
1if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};let s={cache:void 0,equals:r,meta:void 0,strict:i};return function(e,n){return t(e,n,s)}}({circular:t,comparator:s,createState:r,equals:o,strict:i})}P({strict:!0}),P({circular:!0}),P({circular:!0,strict:!0}),P({createInternalComparator:()=>m}),P({strict:!0,createInternalComparator:()=>m}),P({circular:!0,createInternalComparator:()=>m}),P({circular:!0,createInternalComparator:()=>m,strict:!0});var $=n(35776),j=({contentComponent:e})=>{let t=(0,s.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,o.jsx)(o.Fragment,{children:Object.values(t)})},B=class extends r.Component{constructor(e){super(e),this.editorContentRef=r.createRef()}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var e;let t=this.props.editor;if(t&&!t.isDestroyed&&(null==(e=t.view.dom)?void 0:e.parentNode)){let e,n,r,s;if(t.contentComponent)return;let o=this.editorContentRef.current;o.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:o}),e=new Set,n={},r=!1,s=()=>{!r&&e.size&&(r=!0,queueMicrotask(()=>{r=!1,e.forEach(e=>e())}))},t.contentComponent={subscribe:t=>(e.add(t),()=>{e.delete(t)}),getSnapshot:()=>n,getServerSnapshot:()=>n,setRenderer(e,t){n={...n,[e]:i.createPortal(t.reactElement,t.element,e)},s()},removeRenderer(e){let t={...n};delete t[e],n=t,s()}},t.createNodeViews(),t.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){var e;let t=this.props.editor;if(t){t.isEditorContentInitialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),t.contentComponent=null;try{if(!(null==(e=t.view.dom)?void 0:e.parentNode))return;let n=document.createElement("div");n.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:n})}catch{}}}render(){let{editor:e,innerRef:t,...n}=this.props;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{ref:((...e)=>t=>{e.forEach(e=>{"function"==typeof e?e(t):e&&(e.current=t)})})(t,this.editorContentRef),...n}),(null==e?void 0:e.contentComponent)&&(0,o.jsx)(j,{contentComponent:e.contentComponent})]})}},F=(0,r.forwardRef)((e,t)=>{let n=r.useMemo(()=>Math.floor(0xffffffff*Math.random()).toString(),[e.editor]);return r.createElement(B,{key:n,innerRef:t,...e})}),H=r.memo(F),K="u">typeof window?r.useLayoutEffect:r.useEffect,_=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber||(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber}),this.lastSnapshot}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){let e,t=t=>{((null==t?void 0:t.transaction)===void 0||t.transaction!==e)&&(e=null==t?void 0:t.transaction,this.transactionNumber+=1,this.subscribers.forEach(e=>e()))},n=this.editor;return n.on("transaction",t),n.on("update",t),()=>{n.off("transaction",t),n.off("update",t)}}}},J="u"<typeof window,U=J||!!("u">typeof window&&window.next),V=class e{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(e
1=>e())}getInitialEditor(){let e=this.options.current.immediatelyRender,t=null==e||e;return J?t=!1:U&&void 0===e&&(t=!1),t?this.createEditor():null}createEditor(){let e={...this.options.current,onBeforeCreate:(...e)=>{var t,n;return null==(n=(t=this.options.current).onBeforeCreate)?void 0:n.call(t,...e)},onBlur:(...e)=>{var t,n;return null==(n=(t=this.options.current).onBlur)?void 0:n.call(t,...e)},onCreate:(...e)=>{var t,n;return null==(n=(t=this.options.current).onCreate)?void 0:n.call(t,...e)},onDestroy:(...e)=>{var t,n;return null==(n=(t=this.options.current).onDestroy)?void 0:n.call(t,...e)},onFocus:(...e)=>{var t,n;return null==(n=(t=this.options.current).onFocus)?void 0:n.call(t,...e)},onSelectionUpdate:(...e)=>{var t,n;return null==(n=(t=this.options.current).onSelectionUpdate)?void 0:n.call(t,...e)},onTransaction:(...e)=>{var t,n;return null==(n=(t=this.options.current).onTransaction)?void 0:n.call(t,...e)},onUpdate:(...e)=>{var t,n;return null==(n=(t=this.options.current).onUpdate)?void 0:n.call(t,...e)},onContentError:(...e)=>{var t,n;return null==(n=(t=this.options.current).onContentError)?void 0:n.call(t,...e)},onDrop:(...e)=>{var t,n;return null==(n=(t=this.options.current).onDrop)?void 0:n.call(t,...e)},onPaste:(...e)=>{var t,n;return null==(n=(t=this.options.current).onPaste)?void 0:n.call(t,...e)},onDelete:(...e)=>{var t,n;return null==(n=(t=this.options.current).onDelete)?void 0:n.call(t,...e)},onMount:(...e)=>{var t,n;return null==(n=(t=this.options.current).onMount)?void 0:n.call(t,...e)},onUnmount:(...e)=>{var t,n;return null==(n=(t=this.options.current).onUnmount)?void 0:n.call(t,...e)}};return new a.KE(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,t){return Object.keys(e).every(n=>!!["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(n)||("extensions"===n&&e.extensions&&t.extensions?e.extensions.length===t.extensions.length&&e.extensions.every((e,n)=>{var r;return e===(null==(r=t.extensions)?void 0:r[n])}):e[n]===t[n]))}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&0===t.length?e.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(null===this.previousDeps){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((t,n)=>t===e[n]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){let e=this.instanceId,t=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){t&&t.setOptions(this.options.current);return}t&&!t.isDestroyed&&(t.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function W(e={},t=[]){let n=(0,r.useRef)(e);n.current=e;let[i]=(0,r.useState)(()=>new V(n)),o=(0,s.useSyncExternalStore)(i.subscribe,i.getEditor,i.getServerSnapshot);return(0,r.useDebugValue)(o),(0,r.useEffect)(i.onRender(t)),!function(e){var t;let[n]=(0,r.useState)(()=>new _(e.editor)),i=(0,$.useSyncExternalStoreWithSelector)(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,null!=(t=e.equalityFn)?t:z);K(()=>n.watch(e.editor),[e.editor,n]),(0,r.useDebugValue)(i)}({editor:o,selector:({transactionNumber:t})=>!1===e.shouldRerenderOnTransaction||void 0===e.shouldRerenderOnTransaction?null:e.immediatelyRender&&0===t?0:t+1}),o}var q=(0,r.createContext)({editor:null});q.Consumer;var Y=(0,r.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),X=r.forwardRef((e,t)=>{let{onDragStart:n}=(0,r.useContext)(Y),i=e.as||"div";return(0,o.jsx)(i,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});function G(e){return!!("function"==typeof e&&e.prototype&&e.prototype.isReactComponent)}function Z(e){return!!("object"==typeof e&&e.$$typeof&&("Symbol(react.forward_ref)"===e.$$typeof.toString()||"react.forward_ref"===e.$$typeof.description))}var Q=class{constructor(e,{editor:t,props:n={},as:r="div",className:s=""}){this.ref=null,this.destroyed=!1,this.id=Math.floor(0xffffffff*Math.random()).toString(),this.component=e,this.editor=t,this.props=n,this.element=document.createElement(r),this.element.classList.add("react-renderer"),s&&this.element.classList.add(...s.split(" ")),this.editor.isEditorContentInitialized?(0,i.flushSync)(()=>{this.render()}):queueMicrotask(()=>{this.destroyed||this.render()})}render(){var e;if(this.destroyed)return;let t=this.component,n=this.props,i=this.editor,s=function(){try{if(r.version)return parseInt(r.version.split(".")[0],10)>=19}catch{}return!1}(),a=function(e){if(G(e)||Z(e))return!0;
1if("object"==typeof e&&e.$$typeof&&("Symbol(react.memo)"===e.$$typeof.toString()||"react.memo"===e.$$typeof.description)){let t=e.type;if(t)return G(t)||Z(t)}return!1}(t),l={...n};l.ref&&!(s||a)&&delete l.ref,!l.ref&&(s||a)&&(l.ref=e=>{this.ref=e}),this.reactElement=(0,o.jsx)(t,{...l}),null==(e=null==i?void 0:i.contentComponent)||e.setRenderer(this.id,this)}updateProps(e={}){if(this.destroyed)return;let t=!1,n=Object.keys(e);for(let r=0;r<n.length;r+=1){let i=n[r];if(e[i]!==this.props[i]){t=!0;break}}t&&(this.props={...this.props,...e},this.render())}destroy(){var e;this.destroyed=!0;let t=this.editor;null==(e=null==t?void 0:t.contentComponent)||e.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(e){Object.keys(e).forEach(t=>{this.element.setAttribute(t,e[t])})}};a.Db;var ee=class extends a.Yv{constructor(e,t,n){if(super(e,t,n),this.selectionRafId=null,this.handlePositionUpdate=()=>{let e=this.getPos();"number"==typeof e&&e!==this.currentPos&&(this.currentPos=e,this.renderer.updateProps({getPos:()=>this.getPos()}),"function"==typeof this.options.attrs&&this.updateElementAttributes())},this.cachedExtensionWithSyncedStorage=null,!this.node.isLeaf){this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.dataset.nodeViewWrapper="",this.contentDOMElement.style.whiteSpace="inherit";const e=this.dom.querySelector("[data-node-view-content]");e?e.appendChild(this.contentDOMElement):this.dom.appendChild(this.contentDOMElement)}this.options.trackNodeViewPosition&&this.editor.on("update",this.handlePositionUpdate)}get extensionWithSyncedStorage(){if(!this.cachedExtensionWithSyncedStorage){let e=this.editor,t=this.extension;this.cachedExtensionWithSyncedStorage=new Proxy(t,{get(n,r,i){var s;return"storage"===r?null!=(s=e.storage[t.name])?s:{}:Reflect.get(n,r,i)}})}return this.cachedExtensionWithSyncedStorage}mount(){let e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extensionWithSyncedStorage,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(e={})=>this.updateAttributes(e),deleteNode:()=>this.deleteNode(),ref:(0,r.createRef)()};if(!this.component.displayName){let e;this.component.displayName=(e=this.extension.name).charAt(0).toUpperCase()+e.substring(1)}let t={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:e=>{e&&this.contentDOMElement&&e.firstChild!==this.contentDOMElement&&(e.hasAttribute("data-node-view-wrapper")&&e.removeAttribute("data-node-view-wrapper"),e.appendChild(this.contentDOMElement))}},n=this.component,i=(0,r.memo)(e=>(0,o.jsx)(Y.Provider,{value:t,children:(0,r.createElement)(n,e)}));i.displayName="ReactNodeView";let s=this.node.isInline?"span":"div";this.options.as&&(s=this.options.as);let{className:a=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new Q(i,{editor:this.editor,props:e,as:s,className:`node-${this.node.type.name} ${a}`.trim()}),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.updateElementAttributes(),this.currentPos=this.getPos()}get dom(){var e;if(this.renderer.element.firstElementChild&&!(null==(e=this.renderer.element.firstElementChild)?void 0:e.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null),this.selectionRafId=requestAnimationFrame(()=>{this.selectionRafId=null;let e=this.currentPos;if("number"==typeof e)if((0,a.FA)({selection:this.editor.state.selection,pos:e,nodeSize:this.node.nodeSize,selectedOnTextSelection:this.options.selectedOnTextSelection})){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}})}update(e,t,n){let r=e=>{this.renderer.updateProps(e),"function"==typeof this.options.attrs&&this.updateElementAttributes()};if(e.type!==this.node.type)return!1;if("function"==typeof this.options.update){let i=this.node,s=this.decorations,o=this.innerDecorations;return this.node=e,this.decorations=t,this.innerDecorations=n,this.currentPos=this.getPos(),this.options.update({oldNode:i,oldDecorations:s,newNode:e,newDecorations:t,oldInnerDecorations:o,innerDecorations:n,updateProps:()=>r({node:e,decorations:t,innerDecorations:n,extension:this.extensionWithSyncedStorage})})}if(e===this.node)return this.node=e,this.decorations=t,this.innerDecorations=n,!0;let i=this.getPos();this.node=e,this.decorations=t,this.innerDecorations=n,this.currentPos=i;let s={node:e,decorations:t,innerDecorations:n,extension:this.extensionWithSyncedStorage};return this.options.trackNodeViewPosition&&(s.getPos=()=>this.getPos()),r(s),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.options.trackNodeViewPosition&&this.editor.off("update",this.handlePositionUpdate),this.contentDOMElement=null,this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null)}updateElementAttributes(){if(this.options.attrs){let e={};if("function"==typeof this.options.attrs){let t=this.editor.extensionManager.attributes,n=(0,a.zU)(this.node,t);e=this.options.attrs({node:this.node,HTMLAttributes:n}
1)}else e=this.options.attrs;this.renderer.updateAttributes(e)}}};function et(e,t){return n=>n.editor.contentComponent?new ee(e,n,t):{}}var en=(0,r.createContext)({get editor(){throw Error("useTiptap must be used within a <Tiptap> provider")}});function er({children:e,...t}){let n="editor"in t?t.editor:t.instance;if(!n)throw Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");let i=(0,r.useMemo)(()=>({editor:n}),[n]),s=(0,r.useMemo)(()=>({editor:n}),[n]);return(0,o.jsx)(q.Provider,{value:s,children:(0,o.jsx)(en.Provider,{value:i,children:e})})}function ei({...e}){let{editor:t}=(0,r.useContext)(en);return(0,o.jsx)(H,{editor:t,...e})}en.displayName="TiptapContext",er.displayName="Tiptap",ei.displayName="Tiptap.Content",Object.assign(er,{Content:ei})},53141:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(61133).A)("shuffle",[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]])},57137:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(61133).A)("scaling",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M14 15H9v-5",key:"pi4jk9"}],["path",{d:"M16 3h5v5",key:"1806ms"}],["path",{d:"M21 3 9 15",key:"15kdhq"}]])},57718:(e,t,n)=>{n.d(t,{P:()=>p});var r=n(56856),i=n(66935),s=n(73292),o=n(72554),a=n(30644);function l(e){var t;let{char:n,allowSpaces:i,allowToIncludeChar:s,allowedPrefixes:o,startOfLine:a,$position:l}=e,h=i&&!s,d=(0,r.GG)(n),c=RegExp(`\\s${d}$`),u=a?"^":"",p=s?"":d,f=h?RegExp(`${u}${d}.*?(?=\\s${p}|$)`,"gm"):RegExp(`${u}(?:^)?${d}[^\\s${p}]*`,"gm"),m=(null==(t=l.nodeBefore)?void 0:t.isText)&&l.nodeBefore.text;if(!m)return null;let g=l.pos-m.length,y=Array.from(m.matchAll(f)).pop();if(!y||void 0===y.input||void 0===y.index)return null;let k=y.input.slice(Math.max(0,y.index-1),y.index),w=RegExp(`^[${null==o?void 0:o.join("")}\0]?$`).test(k);if(null!==o&&!w)return null;let v=g+y.index,b=v+y[0].length;return(h&&c.test(m.slice(b-1,b+1))&&(y[0]+=" ",b+=1),v<l.pos&&b>=l.pos)?{range:{from:v,to:b},query:y[0].slice(n.length),text:y[0]}:null}var h=new s.hs("suggestion");function d({pluginKey:e=h,editor:t,char:n="@",allowSpaces:r=!1,allowToIncludeChar:i=!1,allowedPrefixes:c=[" "],startOfLine:u=!1,decorationTag:p="span",decorationClass:f="suggestion",decorationContent:m="",decorationEmptyClass:g="is-empty",command:y=()=>null,items:k=()=>[],minQueryLength:w=0,debounce:v=0,initialItems:b,placement:x="bottom-start",offset:C={},container:S,flip:M=!0,floatingUi:A,dismissOnOutsideClick:E=!0,render:T=()=>({}),allow:O=()=>!0,findSuggestionMatch:R=l,shouldShow:L,shouldResetDismissed:I}){let N=null==T?void 0:T(),D=r&&!i,z=(n,r)=>(function(e,t,n,r){if(!n)return()=>{let t=e.state.selection.$anchor.pos,{top:n,right:r,bottom:i,left:s}=e.view.coordsAtPos(t);try{return new DOMRect(s,n,r-s,i-n)}catch{return null}};return()=>{let n=r.getState(e.state),i=null==n?void 0:n.decorationId,s=t.dom.querySelector(`[data-decoration-id="${i}"]`);return(null==s?void 0:s.getBoundingClientRect())||null}})(t,n,r,e),P=t=>(function({view:e,pluginKeyRef:t}){let n=e.state.tr.setMeta(t,{exit:!0});e.dispatch(n)})({view:t,pluginKeyRef:e});return new s.k_({key:e,view:()=>(function({editor:e,pluginKey:t,items:n,renderer:r,minQueryLength:i,debounce:s,initialItems:o,placement:l,offset:h,container:d,flip:c,floatingUi:u,dismissOnOutsideClick:p,command:f,clientRectFor:m,dispatchExit:g}){let y,k=function({editor:e,items:t}){let n=null,r=null,i=null,s=()=>{null==n||n.abort(),null!==r&&(clearTimeout(r),r=null),null==i||i(),i=null,n=null},o=async(o,a)=>{s();let l=n=new AbortController;if(a>0&&await new Promise(e=>{i=e,r=setTimeout(()=>{r=null;let e=i;i=null,null==e||e()},a)}),n!==l||l.signal.aborted)return{status:"aborted"};try{let r=await t({editor:e,query:o,signal:l.signal});if(n!==l||l.signal.aborted)return{status:"aborted"};return{status:"resolved",items:r}}catch{if(n!==l||l.signal.aborted)return{status:"aborted"};return{status:"error"}}};return{abort:s,fetch:o}}({editor:e,items:n}),w=function({placement:e,offset:t,flip:n,floatingUi:r}){var i,s,o,l;let h=[(0,a.cY)({mainAxis:null!=(i=t.mainAxis)?i:4,crossAxis:null!=(s=t.crossAxis)?s:0})];return n&&h.push((0,a.UU)()),(null==(o=null==r?void 0:r.middleware)?void 0:o.length)&&h.push(...r.middleware),{placement:e,strategy:null!=(l=null==r?void 0:r.strategy)?l:"absolute",middleware:h}}({placement:l,offset:h,flip:c,floatingUi:u});function v(e,t){var n,i,s;switch(e){case"started":null==(n=null==r?void 0:r.onStart)||n.call(r,t);break;case"updated":null==(i=null==r?void 0:r.onUpdate)||i.call(r,t);break;case"stopped":null==(s=null==r?void 0:r.onExit)||s.call(r,t)}}return{update:async(n,u)=>{var b,x,C,S;let M=t.getState(u),A=t.getState(n.state);if(!M||!A)return;let E=null,T=M.query!==A.query,O=M.text!==A.text,R=M.range.from!==A.range.from||M.range.to!==A.range.to;if(!M.active&&A.active)E="started";else if(M.active&&!A.active)E="stopped";else{if(!A.active||!T&&!O&&!R)return;E="updated"}let L="stopped"===E?M:A,I=n.dom.querySelector(`[data-decoration-id="${L.decorationId}"]`),N=m(n,I),D=0===i||!!L.query&&L.query.length>=i,z=("started"===E||"updated"===E)&&D;if(y={editor:e,range:L.range,query:L.query||"",text:L.text||"",items:null!=o?o:[],command:t=>f({editor:e,range:L.range,props:t}),decorationNode:I,clientRect:N,loading:z,placement:l,offset:{mainAxis:null!=(b=h.mainAxis)?b:4,crossAxis:null!=(x=h.crossAxis)?x:0},container:d,flip:c,floatingUi:w,mount:function({getReferenceRect:e,contextElement:t,config:n,container:r,dismissOnOutsideClick:i,dismiss:s}){return(o,l={})=>{let h,d={getBoundingClientRect:()=>{var t;return null!=(t=e())?t:new DOMRect},contextElement:t},c=!1,u=!o.isConnected;u&&(function(e){if(e instanceof HTMLElement)return e;if("string"==typeof e)try{let t=document.querySelector(e);
1if(t)return t}catch{}return document.body})(r).appendChild(o),l.onPosition||(o.style.visibility="hidden",o.style.width="max-content");let p=(0,a.ll)(d,o,()=>{(0,a.rD)(d,o,{placement:n.placement,strategy:n.strategy,middleware:n.middleware}).then(({x:e,y:t,placement:n,strategy:r})=>{l.onPosition?l.onPosition({x:e,y:t,placement:n,strategy:r}):(Object.assign(o.style,{position:r,left:`${e}px`,top:`${t}px`}),c||(c=!0,o.style.visibility=""))})},l.autoUpdate);return i&&(h=e=>{let n=e.target;!(n instanceof Node)||o.contains(n)||t.contains(n)||s()},document.addEventListener("pointerdown",h,!0)),()=>{p(),h&&document.removeEventListener("pointerdown",h,!0),u&&o.remove()}}}({getReferenceRect:N,contextElement:n.dom,config:w,container:d,dismissOnOutsideClick:p,dismiss:()=>g(e.view)})},"started"===E&&(null==(C=null==r?void 0:r.onBeforeStart)||C.call(r,y)),"updated"===E&&(null==(S=null==r?void 0:r.onBeforeUpdate)||S.call(r,y)),"started"===E&&v(E,y),"started"===E||"updated"===E)if(z){v(E="updated",y={...y,items:null!=o?o:[],loading:!0});let e=await k.fetch(L.query||"",s);if("aborted"===e.status)return;let r=t.getState(n.state);if(!(null==r?void 0:r.active))return void k.abort();y="resolved"===e.status?{...y,items:e.items,loading:!1}:{...y,loading:!1}}else k.abort(),y={...y,items:null!=o?o:[],loading:!1};if("stopped"===E){k.abort(),v(E,y),y=void 0;return}"updated"===E&&v(E,y)},destroy:()=>{var e;k.abort(),y&&(null==(e=null==r?void 0:r.onExit)||e.call(r,y))}}})({editor:t,pluginKey:e,items:k,renderer:N,minQueryLength:w,debounce:v,initialItems:b,placement:x,offset:C,container:S,flip:M,floatingUi:A,dismissOnOutsideClick:E,command:y,clientRectFor:z,dispatchExit:P}),state:function({editor:e,char:t,effectiveAllowSpaces:n,allowToIncludeChar:r,allowedPrefixes:i,startOfLine:s,findSuggestionMatch:o,allow:a,shouldShow:l,shouldKeepDismissed:h,pluginKey:d}){return{init:()=>({active:!1,range:{from:0,to:0},query:null,text:null,composing:!1,dismissedRange:null}),apply(c,u,p,f){let{isEditable:m}=e,{composing:g}=e.view,{selection:y}=c,{empty:k,from:w}=y,v={...u},b=c.getMeta(d);if(b&&b.exit)return v.active=!1,v.decorationId=null,v.range={from:0,to:0},v.query=null,v.text=null,v.dismissedRange=u.active?{...u.range}:u.dismissedRange,v;if(v.composing=g,c.docChanged&&null!==v.dismissedRange&&(v.dismissedRange={from:c.mapping.map(v.dismissedRange.from),to:c.mapping.map(v.dismissedRange.to)}),m&&(k||e.view.composing)){(w<u.range.from||w>u.range.to)&&!g&&!u.composing&&(v.active=!1);let d=o({char:t,allowSpaces:n,allowToIncludeChar:r,allowedPrefixes:i,startOfLine:s,$position:y.$from}),p=`id_${Math.floor(0xffffffff*Math.random())}`;d&&a({editor:e,state:f,range:d.range,isActive:u.active})&&(!l||l({editor:e,range:d.range,query:d.query,text:d.text,transaction:c}))?(null===v.dismissedRange||h({match:d,dismissedRange:v.dismissedRange,state:f,transaction:c})||(v.dismissedRange=null),null===v.dismissedRange?(v.active=!0,v.decorationId=u.decorationId||p,v.range=d.range,v.query=d.query,v.text=d.text):v.active=!1):(d||(v.dismissedRange=null),v.active=!1)}else v.active=!1;return v.active||(v.decorationId=null,v.range={from:0,to:0},v.query=null,v.text=null),v}}}({editor:t,char:n,effectiveAllowSpaces:D,allowToIncludeChar:i,allowedPrefixes:c,startOfLine:u,findSuggestionMatch:R,allow:O,shouldShow:L,shouldKeepDismissed:function(e){return function({match:e,dismissedRange:t,state:n,transaction:r,editor:i,shouldResetDismissed:s,effectiveAllowSpaces:o}){return(null==s?!void 0:!s({editor:i,state:n,range:t,match:e,transaction:r,allowSpaces:o}))&&(o?e.range.from===t.from:e.range.from===t.from&&!(r.docChanged&&r.steps.some(e=>{let t=e.slice;if(!(null==t?void 0:t.content))return!1;let n=t.content.textBetween(0,t.content.size,"\n");return/\s/.test(n)})))}({...e,editor:t,shouldResetDismissed:I,effectiveAllowSpaces:D})},pluginKey:e}),props:function({pluginKey:e,decorationTag:t,decorationClass:n,decorationContent:r,decorationEmptyClass:i,renderer:s,dispatchExit:a}){return{handleKeyDown(t,n){var r,i;let o=e.getState(t.state);return!!o.active&&("Escape"===n.key||"Esc"===n.key?(null==(r=null==s?void 0:s.onKeyDown)||r.call(s,{view:t,event:n,range:o.range}),a(t),!0):(null==(i=null==s?void 0:s.onKeyDown)?void 0:i.call(s,{view:t,event:n,range:o.range}))||!1)},decorations(s){let{active:a,range:l,decorationId:h,query:d}=e.getState(s);if(!a)return null;
1let c=!(null==d?void 0:d.length),u=[n];return c&&u.push(i),o.zF.create(s.doc,[o.NZ.inline(l.from,l.to,{nodeName:t,class:u.join(" "),"data-decoration-id":h||void 0,"data-decoration-content":r})])}}}({pluginKey:e,decorationTag:p,decorationClass:f,decorationContent:m,decorationEmptyClass:g,renderer:N,dispatchExit:P})})}function c(e){return(e.options.suggestions.length?e.options.suggestions:[e.options.suggestion]).map(t=>(function({editor:e,overrideSuggestionOptions:t,extensionName:n,char:r="@"}){return{editor:e,char:r,pluginKey:new s.hs,command:({editor:e,range:t,props:i})=>{var s,o,a;let l=e.view.state.selection.$to.nodeAfter;(null==(s=null==l?void 0:l.text)?void 0:s.startsWith(" "))&&(t.to+=1),e.chain().focus().insertContentAt(t,[{type:n,attrs:{...i,mentionSuggestionChar:r}},{type:"text",text:" "}]).run(),null==(a=null==(o=e.view.dom.ownerDocument.defaultView)?void 0:o.getSelection())||a.collapseToEnd()},allow:({state:e,range:t})=>{let r=e.doc.resolve(t.from),i=e.schema.nodes[n];return!!r.parent.type.contentMatch.matchType(i)},...t}})({editor:e.editor,overrideSuggestionOptions:t,extensionName:e.name,char:t.char}))}function u(e,t){let n=c(e),r=n.find(e=>e.char===t);return r||(n.length?n[0]:null)}var p=r.bP.create({name:"mention",priority:101,addOptions:()=>({HTMLAttributes:{},renderText({node:e,suggestion:t}){var n,r;return`${null!=(n=null==t?void 0:t.char)?n:"@"}${null!=(r=e.attrs.label)?r:e.attrs.id}`},deleteTriggerWithBackspace:!1,renderHTML({options:e,node:t,suggestion:n}){var i,s;return["span",(0,r.KV)(this.HTMLAttributes,e.HTMLAttributes),`${null!=(i=null==n?void 0:n.char)?i:"@"}${null!=(s=t.attrs.label)?s:t.attrs.id}`]},suggestions:[],suggestion:{}}),group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes:()=>({id:{default:null,parseHTML:e=>e.getAttribute("data-id"),renderHTML:e=>e.id?{"data-id":e.id}:{}},label:{default:null,parseHTML:e=>e.getAttribute("data-label"),renderHTML:e=>e.label?{"data-label":e.label}:{}},mentionSuggestionChar:{default:"@",parseHTML:e=>e.getAttribute("data-mention-suggestion-char"),renderHTML:e=>({"data-mention-suggestion-char":e.mentionSuggestionChar})}}),parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:e,HTMLAttributes:t}){let n=u(this,e.attrs.mentionSuggestionChar);if(void 0!==this.options.renderLabel)return console.warn("renderLabel is deprecated use renderText and renderHTML instead"),["span",(0,r.KV)({"data-type":this.name},this.options.HTMLAttributes,t),this.options.renderLabel({options:this.options,node:e,suggestion:n})];let i={...this.options};i.HTMLAttributes=(0,r.KV)({"data-type":this.name},this.options.HTMLAttributes,t);let s=this.options.renderHTML({options:i,node:e,suggestion:n});return"string"==typeof s?["span",(0,r.KV)({"data-type":this.name},this.options.HTMLAttributes,t),s]:s},...(0,r.ur)({nodeName:"mention",name:"@",selfClosing:!0,allowedAttributes:["id","label",{name:"mentionSuggestionChar",skipIfDefault:"@"}],parseAttributes:e=>{let t={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g,r=n.exec(e);for(;null!==r;){let[,i,s,o]=r,a=null!=s?s:o;t["char"===i?"mentionSuggestionChar":i]=a,r=n.exec(e)}return t},serializeAttributes:e=>Object.entries(e).filter(([,e])=>null!=e).map(([e,t])=>`${"mentionSuggestionChar"===e?"char":e}="${t}"`).join(" ")}),renderText({node:e}){let t={options:this.options,node:e,suggestion:u(this,e.attrs.mentionSuggestionChar)};return void 0!==this.options.renderLabel?(console.warn("renderLabel is deprecated use renderText and renderHTML instead"),this.options.renderLabel(t)):this.options.renderText(t)},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:e,state:t})=>{let n=!1,{selection:r}=t,{empty:s,anchor:o}=r;if(!s)return!1;let a=new i.bP,l=0;return t.doc.nodesBetween(o-1,o,(e,t)=>{if(e.type.name===this.name)return n=!0,a=e,l=t,!1}),n&&e.insertText(this.options.deleteTriggerWithBackspace?"":a.attrs.mentionSuggestionChar,l,l+a.nodeSize),n})}},addProseMirrorPlugins(){return c(this).map(d)}})},57791:(e,t,n)=>{n.d(t,{Ay:()=>d});var r=n(2193),i=n(48130),s=n(67357);let o=r.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}),a={dedupe:!0};s.qv.defineProperty(s.BE,"defaultValue",{value:s.sb});let l=(0,s.qm)((e,t,n)=>{let{cache:l,compare:h,suspense:d,fallbackData:c,revalidateOnMount:u,revalidateIfStale:p,refreshInterval:f,refreshWhenHidden:m,refreshWhenOffline:g,keepPreviousData:y}=n,[k,w,v,b]=s.bZ.get(l),[x,C]=(0,s.lK)(e),S=(0,r.useRef)(!1),M=(0,r.useRef)(!1),A=(0,r.useRef)(x),E=(0,r.useRef)(t),T=(0,r.useRef)(n),O=()=>T.current.isVisible()&&T.current.isOnline(),[R,L,I,N]=(0,s.r9)(l,x),D=(0,r.useRef)({}).current,z=(0,s.b0)(c)?n.fallback[x]:c,P=(e,t)=>
1{for(let n in D)if("data"===n){if(!h(e[n],t[n])&&(!(0,s.b0)(e[n])||!h(U,t[n])))return!1}else if(t[n]!==e[n])return!1;return!0},$=(0,r.useMemo)(()=>{let e=!!x&&!!t&&((0,s.b0)(u)?!T.current.isPaused()&&!d&&(!!(0,s.b0)(p)||p):u),n=t=>{let n=(0,s.rL)(t);return(delete n._k,e)?{isValidating:!0,isLoading:!0,...n}:n},r=R(),i=N(),o=n(r),a=r===i?o:n(i),l=o;return[()=>{let e=n(R());return P(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},()=>a]},[l,x]),j=(0,i.useSyncExternalStore)((0,r.useCallback)(e=>I(x,(t,n)=>{P(n,t)||e()}),[l,x]),$[0],$[1]),B=!S.current,F=k[x]&&k[x].length>0,H=j.data,K=(0,s.b0)(H)?z:H,_=j.error,J=(0,r.useRef)(K),U=y?(0,s.b0)(H)?J.current:H:K,V=(!F||!!(0,s.b0)(_))&&(B&&!(0,s.b0)(u)?u:!T.current.isPaused()&&(d?!(0,s.b0)(K)&&p:(0,s.b0)(K)||p)),W=!!(x&&t&&B&&V),q=(0,s.b0)(j.isValidating)?W:j.isValidating,Y=(0,s.b0)(j.isLoading)?W:j.isLoading,X=(0,r.useCallback)(async e=>{let t,r,i=E.current;if(!x||!i||M.current||T.current.isPaused())return!1;let o=!0,a=e||{},l=!v[x]||!a.dedupe,d=()=>s.dO?!M.current&&x===A.current&&S.current:x===A.current,c={isValidating:!1,isLoading:!1},u=()=>{L(c)},p=()=>{let e=v[x];e&&e[1]===r&&delete v[x]},f={isValidating:!0};(0,s.b0)(R().data)&&(f.isLoading=!0);try{if(l&&(L(f),n.loadingTimeout&&(0,s.b0)(R().data)&&setTimeout(()=>{o&&d()&&T.current.onLoadingSlow(x,n)},n.loadingTimeout),v[x]=[i(C),(0,s.lg)()]),[t,r]=v[x],t=await t,l&&setTimeout(p,n.dedupingInterval),!v[x]||v[x][1]!==r)return l&&d()&&T.current.onDiscarded(x),!1;c.error=s.ZH;let e=w[x];if(!(0,s.b0)(e)&&(r<=e[0]||r<=e[1]||0===e[1]))return u(),l&&d()&&T.current.onDiscarded(x),!1;let a=R().data;c.data=h(a,t)?a:t,l&&d()&&T.current.onSuccess(t,x,n)}catch(n){p();let e=T.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(c.error=n,l&&d()&&(e.onError(n,x,e),(!0===t||(0,s.Tn)(t)&&t(n))&&(!T.current.revalidateOnFocus||!T.current.revalidateOnReconnect||O())&&e.onErrorRetry(n,x,e,e=>{let t=k[x];t&&t[0]&&t[0](s.bu.ERROR_REVALIDATE_EVENT,e)},{retryCount:(a.retryCount||0)+1,dedupe:!0})))}return o=!1,u(),!0},[x,l]),G=(0,r.useCallback)((...e)=>(0,s.mF)(l,A.current,...e),[]);if((0,s.Es)(()=>{E.current=t,T.current=n,(0,s.b0)(H)||(J.current=H)}),(0,s.Es)(()=>{if(!x)return;let e=X.bind(s.ZH,a),t=0,n=(0,s.aw)(x,k,(n,r={})=>{if(n==s.bu.FOCUS_EVENT){let n=Date.now();T.current.revalidateOnFocus&&n>t&&O()&&(t=n+T.current.focusThrottleInterval,e())}else if(n==s.bu.RECONNECT_EVENT)T.current.revalidateOnReconnect&&O()&&e();else if(n==s.bu.MUTATE_EVENT)return X();else if(n==s.bu.ERROR_REVALIDATE_EVENT)return X(r)});return M.current=!1,A.current=x,S.current=!0,L({_k:C}),V&&((0,s.b0)(K)||s.X3?e():(0,s.mf)(e)),()=>{M.current=!0,n()}},[x]),(0,s.Es)(()=>{let e;function t(){let t=(0,s.Tn)(f)?f(R().data):f;t&&-1!==e&&(e=setTimeout(n,t))}function n(){!R().error&&(m||T.current.isVisible())&&(g||T.current.isOnline())?X(a).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[f,m,g,x]),(0,r.useDebugValue)(U),d&&(0,s.b0)(K)&&x){if(!s.dO&&s.X3)throw Error("Fallback data is required when using suspense in SSR.");E.current=t,T.current=n,M.current=!1;let e=b[x];if((0,s.b0)(e)||o(G(e)),(0,s.b0)(_)){let e=X(a);(0,s.b0)(U)||(e.status="fulfilled",e.value=!0),o(e)}else throw _}return{mutate:G,get data(){return D.data=!0,U},get error(){return D.error=!0,_},get isValidating(){return D.isValidating=!0,q},get isLoading(){return D.isLoading=!0,Y}}}),h=Promise.resolve(),d=(0,s.Ht)(l,e=>(t,n,o)=>{let a,l=(0,r.useRef)(!1),{cache:d,initialSize:c=1,revalidateAll:u=!1,persistSize:p=!1,revalidateFirstPage:f=!0,revalidateOnMount:m=!1,parallel:g=!1}=o,[,,,y]=s.bZ.get(s.PP);try{(a=(0,s.lK)(t?t(0,null):null)[0])&&(a=s.q9+a)}catch(e){}let[k,w,v]=(0,s.r9)(d,a),b=(0,r.useCallback)(()=>(0,s.b0)(k()._l)?c:k()._l,[d,a,c]);(0,i.useSyncExternalStore)((0,r.useCallback)(e=>a?v(a,()=>{e()}):()=>{},[d,a]),b,b);let x=(0,r.useCallback)(()=>{let e=k()._l;return(0,s.b0)(e)?c:e},[a,c]),C=(0,r.useRef)(x());(0,s.Es)(()=>{if(!l.current){l.current=!0;return}a&&w({_l:p?C.current:x()})},[a,d]);let S=m&&!l.current,M=e(a,async e=>{let r=k()._i,i=k()._r;w({_r:s.ZH});let a=[],l=x(),[h]=(0,s.r9)(d,e),c=h().data,p=[],m=null;for(let e=0;e<l;++e){let[l,h]=(0,s.lK)(t(e,g?null:m));if(!l)break;let[k,w]=(0,s.r9)(d,l),v=k().data,b=u||r||(0,s.b0)(v)||f&&!e&&!(0,s.b0)(c)||S||c&&!(0,s.b0)(c[e])&&!o.compare(c[e],v);if(n&&("function"==typeof i?i(v,h):b)){let t=async()=>
1{if(l in y){let e=y[l];delete y[l],v=await e}else v=await n(h);w({data:v,_k:h}),a[e]=v};g?p.push(t):await t()}else a[e]=v;g||(m=v)}return g&&await Promise.all(p.map(e=>e())),w({_i:s.ZH}),a},o),A=(0,r.useCallback)(function(e,t){let n="boolean"==typeof t?{revalidate:t}:t||{},r=!1!==n.revalidate;return a?(r&&((0,s.b0)(e)?w({_i:!0,_r:n.revalidate}):w({_i:!1,_r:n.revalidate})),arguments.length?M.mutate(e,{...n,revalidate:r}):M.mutate()):h},[a,d]),E=(0,r.useCallback)(e=>{let n;if(!a)return h;let[,r]=(0,s.r9)(d,a);if((0,s.Tn)(e)?n=e(x()):"number"==typeof e&&(n=e),"number"!=typeof n)return h;r({_l:n}),C.current=n;let i=[],[o]=(0,s.r9)(d,a),l=null;for(let e=0;e<n;++e){let[n]=(0,s.lK)(t(e,l)),[r]=(0,s.r9)(d,n),a=n?r().data:s.ZH;if((0,s.b0)(a))return A(o().data);i.push(a),l=a}return A(i)},[a,d,A,x]);return{size:x(),setSize:E,mutate:A,get data(){return M.data},get error(){return M.error},get isValidating(){return M.isValidating},get isLoading(){return M.isLoading}}})},62940:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(61133).A)("clock-3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]])},64647:(e,t,n)=>{n.d(t,{K:()=>f,w:()=>p});for(var r={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:"'"},i={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},s="u">typeof navigator&&/Mac/.test(navigator.platform),o="u">typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),a=0;a<10;a++)r[48+a]=r[96+a]=String(a);for(var a=1;a<=24;a++)r[a+111]="F"+a;for(var a=65;a<=90;a++)r[a]=String.fromCharCode(a+32),i[a]=String.fromCharCode(a);for(var l in r)i.hasOwnProperty(l)||(i[l]=r[l]);var h=n(73292);let d="u">typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),c="u">typeof navigator&&/Win/.test(navigator.platform);function u(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function p(e){return new h.k_({props:{handleKeyDown:f(e)}})}function f(e){let t=function(e){let t=Object.create(null);for(let n in e)t[function(e){let t,n,r,i,s=e.split(/-(?!$)/),o=s[s.length-1];"Space"==o&&(o=" ");for(let e=0;e<s.length-1;e++){let o=s[e];if(/^(cmd|meta|m)$/i.test(o))i=!0;else if(/^a(lt)?$/i.test(o))t=!0;else if(/^(c|ctrl|control)$/i.test(o))n=!0;else if(/^s(hift)?$/i.test(o))r=!0;else if(/^mod$/i.test(o))d?i=!0:n=!0;else throw Error("Unrecognized modifier name: "+o)}return t&&(o="Alt-"+o),n&&(o="Ctrl-"+o),i&&(o="Meta-"+o),r&&(o="Shift-"+o),o}(n)]=e[n];return t}(e);return function(e,n){var a;let l=("Esc"==(a=!(s&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||o&&n.shiftKey&&n.key&&1==n.key.length||"Unidentified"==n.key)&&n.key||(n.shiftKey?i:r)[n.keyCode]||n.key||"Unidentified")&&(a="Escape"),"Del"==a&&(a="Delete"),"Left"==a&&(a="ArrowLeft"),"Up"==a&&(a="ArrowUp"),"Right"==a&&(a="ArrowRight"),"Down"==a&&(a="ArrowDown"),a),h,d=t[u(l,n)];if(d&&d(e.state,e.dispatch,e))return!0;if(1==l.length&&" "!=l){if(n.shiftKey){let r=t[u(l,n,!1)];if(r&&r(e.state,e.dispatch,e))return!0}if((n.altKey||n.metaKey||n.ctrlKey)&&!(c&&n.ctrlKey&&n.altKey)&&(h=r[n.keyCode])&&h!=l){let r=t[u(h,n)];if(r&&r(e.state,e.dispatch,e))return!0}}return!1}}},66935:(e,t,n)=>{function r(e){this.content=e}function i(e){return e>=56320&&e<57344}function s(e){return e>=55296&&e<56320}n.d(t,{S4:()=>K,ZF:()=>G,FK:()=>o,CU:()=>d,sX:()=>B,bP:()=>M,u$:()=>C,vI:()=>c,Sj:()=>F,Ji:()=>u}),r.prototype={constructor:r,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return -1},get:function(e){var t=this.find(e);return -1==t?void 0:this.content[t+1]},update:function(e,t,n){var i=n&&n!=e?this.remove(n):this,s=i.find(e),o=i.content.slice();return -1==s?o.push(n||e,t):(o[s+1]=t,n&&(o[s]=n)),new r(o)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new r(n)},addToStart:function(e,t){return new r([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new r(n)},addBefore:function(e,t,n){var i=this.remove(t),s=i.content.slice(),o=i.find(e);return s.splice(-1==o?s.length:o,0,t,n),new r(s)}
vendor: 5,223 bytes, line 1
1,forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=r.from(e)).size?new r(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=r.from(e)).size?new r(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=r.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},r.from=function(e){if(e instanceof r)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new r(t)};class o{constructor(e,t){if(this.content=e,this.size=t||0,null==t)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,i){for(let s=0,o=0;o<t;s++){let a=this.content[s],l=o+a.nodeSize;if(l>e&&!1!==n(a,r+o,i||null,s)&&a.content.size){let i=o+1;a.nodesBetween(Math.max(0,e-i),Math.min(a.content.size,t-i),n,r+i)}o=l}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i="",s=!0;return this.nodesBetween(e,t,(o,a)=>{let l=o.isText?o.text.slice(Math.max(e,a)-a,t-a):o.isLeaf?r?"function"==typeof r?r(o):r:o.type.spec.leafText?o.type.spec.leafText(o):"":"";o.isBlock&&(o.isLeaf&&l||o.isTextblock)&&n&&(s?s=!1:i+=n),i+=l},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,r=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),i=1);i<e.content.length;i++)r.push(e.content[i]);return new o(r,this.size+e.size)}cut(e,t=this.size){if(0==e&&t==this.size)return this;let n=[],r=0;if(t>e)for(let i=0,s=0;s<t;i++){let o=this.content[i],a=s+o.nodeSize;a>e&&((s<e||a>t)&&(o=o.isText?o.cut(Math.max(0,e-s),Math.min(o.text.length,t-s)):o.cut(Math.max(0,e-s-1),Math.min(o.content.size,t-s-1))),n.push(o),r+=o.nodeSize),s=a}return new o(n,r)}cutByIndex(e,t){return e==t?o.empty:0==e&&t==this.content.length?this:new o(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let r=this.content.slice(),i=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new o(r,i)}addToStart(e){return new o([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new o(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))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 t=this.content[e];if(!t)throw RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return function e(t,n,r){for(let o=0;;o++){if(o==t.childCount||o==n.childCount)return t.childCount==n.childCount?null:r;let a=t.child(o),l=n.child(o);if(a==l){r+=a.nodeSize;continue}if(!a.sameMarkup(l))return r;if(a.isText&&a.text!=l.text){let e=a.text,t=l.text,n=0;for(;e[n]==t[n];n++)r++;return n&&n<e.length&&n<t.length&&s(e.charCodeAt(n-1))&&i(e.charCodeAt(n))&&r--,r}if(a.content.size||l.content.size){let t=e(a.content,l.content,r+1);if(null!=t)return t}r+=a.nodeSize}}(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return function e(t,n,r,o){for(let a=t.childCount,l=n.childCount;;){if(0==a||0==l)return a==l?null:{a:r,b:o};let h=t.child(--a),d=n.child(--l),c=h.nodeSize;if(h==d){r-=c,o-=c;continue}if(!h.sameMarkup(d))return{a:r,b:o};if(h.isText&&h.text!=d.text){let e=h.text,t=d.text,n=e.length,a=t.length;for(;n>0&&a>0&&e[n-1]==t[a-1];)n--,a--,r--,o--;return n&&a&&n<e.length&&s(e.charCodeAt(n-1))&&i(e.charCodeAt(n))&&(r++,o++),{a:r,b:o}}if(h.content.size||d.content.size){let t=e(h.content,d.content,r-1,o-1);if(t)return t}r-=c,o-=c}}(this,e,t,n)}findIndex(e){if(0==e)return l(0,e);if(e==this.size)return l(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let r=n+this.child(t).nodeSize;if(r>=e){if(r==e)return l(t+1,r);return l(t,n)}n=r}}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 o.empty;if(!Array.isArray(t))throw RangeError("Invalid input for Fragment.fromJSON");return o.fromArray(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return o.empty;let t,n=0;for(let r=0;r<e.length;r++){let i=e[r];n+=i.nodeSize,r&&i.isText&&e[r-1].sameMarkup(i)?(t||(t=e.slice(0,r)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new o(t||e,n)}static from(e){if(!e)return o.empty;if(e instanceof o)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new o([e],e.nodeSize);throw RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}o.empty=new o([],0);let a={index:0,offset:0};function l(e,t){return a.index=e,a.offset=t,a}function h(e,t){if(e===t)return!0;
vendor: 6,962 bytes, line 1
1if(!(e&&"object"==typeof e)||!(t&&"object"==typeof t))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!h(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!h(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}class d{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,r));else{if(i.type.excludes(this.type))return e;!n&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(i)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&h(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);let r=n.create(t.attrs);return n.checkAttrs(r.attrs),r}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&0==e.length)return d.none;if(e instanceof d)return[e];let t=e.slice();return t.sort((e,t)=>e.type.rank-t.type.rank),t}}d.none=[];class c extends Error{}class u{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=function e(t,n,r,i,s,o){let{index:a,offset:l}=t.findIndex(n),h=t.maybeChild(a);if(l==n||h.isText)return o&&i<=0&&s<=0&&!o.canReplace(a,a,r)?null:t.cut(0,n).append(r).append(t.cut(n));let d=e(h.content,n-l-1,r,0==a?i-1:0,a==t.childCount-1?s-1:0,h);return d&&t.replaceChild(a,h.copy(d))}(this.content,e+this.openStart,t,this.openStart+1,this.openEnd+1);return n&&new u(n,this.openStart,this.openEnd)}removeBetween(e,t){return new u(function e(t,n,r){let{index:i,offset:s}=t.findIndex(n),o=t.maybeChild(i),{index:a,offset:l}=t.findIndex(r);if(s==n||o.isText){if(l!=r&&!t.child(a).isText)throw RangeError("Removing non-flat range");return t.cut(0,n).append(t.cut(r))}if(i!=a)throw RangeError("Removing non-flat range");return t.replaceChild(i,o.copy(e(o.content,n-s-1,r-s-1)))}(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 u.empty;let n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw RangeError("Invalid input for Slice.fromJSON");return new u(o.fromJSON(e,t.content),n,r)}static maxOpen(e,t=!0){let n=0,r=0;for(let r=e.firstChild;r&&!r.isLeaf&&(t||!r.type.spec.isolating);r=r.firstChild)n++;for(let n=e.lastChild;n&&!n.isLeaf&&(t||!n.type.spec.isolating);n=n.lastChild)r++;return new u(e,n,r)}}function p(e,t){if(!t.type.compatibleContent(e.type))throw new c("Cannot join "+t.type.name+" onto "+e.type.name)}function f(e,t,n){let r=e.node(n);return p(r,t.node(n)),r}function m(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function g(e,t,n,r){let i=(t||e).node(n),s=0,o=t?t.index(n):i.childCount;e&&(s=e.index(n),e.depth>n?s++:e.textOffset&&(m(e.nodeAfter,r),s++));for(let e=s;e<o;e++)m(i.child(e),r);t&&t.depth==n&&t.textOffset&&m(t.nodeBefore,r)}function y(e,t){if(!e.type.validContent(t))throw new c("Invalid content for node "+e.type.name);return e.copy(t)}function k(e,t,n){let r=[];return g(null,e,n,r),e.depth>n&&m(y(f(e,t,n+1),k(e,t,n+1)),r),g(t,null,n,r),new o(r)}u.empty=new u(o.empty,0,0);class w{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return null==e?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[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].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 n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}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):0==e?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(0==e.content.size)return d.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let i=n.marks;for(var s=0;s<i.length;s++)!1!==i[s].type.spec.inclusive||r&&i[s].isInSet(r.marks)||(i=i[s--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)!1!==n[i].type.spec.inclusive||r&&n[i].isInSet(r.marks)||(n=n[i--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new C(this,e,n);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<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw RangeError("Position "+t+" out of range");let n=[],r=0,i=t;for(let t=e;;){let{index:e,offset:s}=t.content.findIndex(i),o=i-s;if(n.push(t,e,r+s),!o||(t=t.child(e)).isText)break;
1i=o-1,r+=s+1}return new w(t,n,i)}static resolveCached(e,t){let n=x.get(e);if(n)for(let e=0;e<n.elts.length;e++){let r=n.elts[e];if(r.pos==t)return r}else x.set(e,n=new v);let r=n.elts[n.i]=w.resolve(e,t);return n.i=(n.i+1)%b,r}}class v{constructor(){this.elts=[],this.i=0}}let b=12,x=new WeakMap;class C{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}let S=Object.create(null);class M{constructor(e,t,n,r=d.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||o.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&h(this.attrs,t||e.defaultAttrs||S)&&d.sameSet(this.marks,n||d.none)}copy(e=null){return e==this.content?this:new M(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new M(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return u.empty;let r=this.resolve(e),i=this.resolve(t),s=n?0:r.sharedDepth(t),o=r.start(s);return new u(r.node(s).content.cut(r.pos-o,i.pos-o),r.depth-s,i.depth-s)}replace(e,t,n){var r=this.resolve(e),i=this.resolve(t);if(n.openStart>r.depth)throw new c("Inserted content deeper than insertion position");if(r.depth-n.openStart!=i.depth-n.openEnd)throw new c("Inconsistent open depths");return function e(t,n,r,i){let s=t.index(i),a=t.node(i);if(s==n.index(i)&&i<t.depth-r.openStart){let o=e(t,n,r,i+1);return a.copy(a.content.replaceChild(s,o))}if(!r.content.size)return y(a,k(t,n,i));if(r.openStart||r.openEnd||t.depth!=i||n.depth!=i){let{start:e,end:s}=function(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(o.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(r,t);return y(a,function e(t,n,r,i,s){let a=t.depth>s&&f(t,n,s+1),l=i.depth>s&&f(r,i,s+1),h=[];return g(null,t,s,h),a&&l&&n.index(s)==r.index(s)?(p(a,l),m(y(a,e(t,n,r,i,s+1)),h)):(a&&m(y(a,k(t,n,s+1)),h),g(n,r,s,h),l&&m(y(l,k(r,i,s+1)),h)),g(i,null,s,h),new o(h)}(t,e,s,n,i))}{let e=t.parent,i=e.content;return y(e,i.cut(0,t.parentOffset).append(r.content).append(i.cut(n.parentOffset)))}}(r,i,n,0)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(!(t=t.maybeChild(n)))return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(0==e)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return w.resolveCached(this,e)}resolveNoCache(e){return w.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}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}
1toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),E(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=o.empty,r=0,i=n.childCount){let s=this.contentMatchAt(e).matchFragment(n,r,i),a=s&&s.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let e=r;e<i;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),s=i&&i.matchFragment(this.content,t);return!!s&&s.validEnd}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=d.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!d.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.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(e=>e.toJSON())),e}static fromJSON(e,t){let n;if(!t)throw RangeError("Invalid input for Node.fromJSON");if(t.marks){if(!Array.isArray(t.marks))throw RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=o.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,r,n);return i.type.checkAttrs(i.attrs),i}}M.prototype.text=void 0;class A extends M{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):E(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 A(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new A(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return 0==e&&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 E(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class T{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){var n;let r,i=new O(e,t);if(null==i.next)return T.empty;let s=function e(t){let n=[];do n.push(function(t){let n=[];do n.push(function(t){let n=function(t){if(t.eat("(")){let n=e(t);return t.eat(")")||t.err("Missing closing paren"),n}if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=(function(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let e in n){let r=n[e];r.isInGroup(t)&&i.push(r)}return 0==i.length&&e.err("No node type or group '"+t+"' found"),i})(t,t.next).map(e=>(null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e}));return t.pos++,1==e.length?e[0]:{type:"choice",exprs:e}}}(t);for(;;)if(t.eat("+"))n={type:"plus",expr:n};else if(t.eat("*"))n={type:"star",expr:n};else if(t.eat("?"))n={type:"opt",expr:n};else if(t.eat("{"))n=function(e,t){let n=R(e),r=n;return e.eat(",")&&(r="}"!=e.next?R(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}(t,n);else break;return n}(t));while(t.next&&")"!=t.next&&"|"!=t.next);return 1==n.length?n[0]:{type:"seq",exprs:n}}(t));while(t.eat("|"));return 1==n.length?n[0]:{type:"choice",exprs:n}}(i);i.next&&i.err("Unexpected trailing text");let o=(n=function(e){let t=[[]];return i(function e(t,s){if("choice"==t.type)return t.exprs.reduce((t,n)=>t.concat(e(n,s)),[]);if("seq"==t.type)for(let r=0;;r++){let o=e(t.exprs[r],s);if(r==t.exprs.length-1)return o;i(o,s=n())}else if("star"==t.type){let o=n();return r(s,o),i(e(t.expr,o),o),[r(o)]}else if("plus"==t.type){let o=n();return i(e(t.expr,s),o),i(e(t.expr,o),o),[r(o)]}else if("opt"==t.type)return[r(s)].concat(e(t.expr,s));else if("range"==t.type){let o=s;for(let r=0;r<t.min;r++){let r=n();i(e(t.expr,o),r),o=r}if(-1==t.max)i(e(t.expr,o),o);else for(let s=t.min;s<t.max;s++){let s=n();r(o,s),i(e(t.expr,o),s),o=s}return[r(o)]}else if("name"==t.type)return[r(s,void 0,t.value)];else throw Error("Unknown expr type")}(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let i={term:r,to:n};return t[e].push(i),i}
vendor: 5,540 bytes, line 1
1function i(e,t){e.forEach(e=>e.to=t)}}(s),r=Object.create(null),function e(t){let i=[];t.forEach(e=>{n[e].forEach(({term:e,to:t})=>{let r;if(e){for(let t=0;t<i.length;t++)i[t][0]==e&&(r=i[t][1]);I(n,t).forEach(t=>{r||i.push([e,r=[]]),-1==r.indexOf(t)&&r.push(t)})}})});let s=r[t.join(",")]=new T(t.indexOf(n.length-1)>-1);for(let t=0;t<i.length;t++){let n=i[t][1].sort(L);s.next.push({type:i[t][0],next:r[n.join(",")]||e(n)})}return s}(I(n,0)));return function(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],i=!e.validEnd,s=[];for(let t=0;t<e.next.length;t++){let{type:n,next:o}=e.next[t];s.push(n.name),i&&!(n.isText||n.hasRequiredAttrs())&&(i=!1),-1==r.indexOf(o)&&r.push(o)}i&&t.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,i),o}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let i=t;r&&i<n;i++)r=r.matchType(e.child(i).type);return r}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];return function i(s,a){let l=s.matchFragment(e,n);if(l&&(!t||l.validEnd))return o.from(a.map(e=>e.createAndFill()));for(let e=0;e<s.next.length;e++){let{type:t,next:n}=s.next[e];if(!(t.isText||t.hasRequiredAttrs())&&-1==r.indexOf(n)){r.push(n);let e=i(n,a.concat(t));if(e)return e}}return null}(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<i.next.length;e++){let{type:s,next:o}=i.next[e];s.isLeaf||s.hasRequiredAttrs()||s.name in t||r.type&&!o.validEnd||(n.push({match:s.contentMatch,type:s,via:r}),t[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return!function t(n){e.push(n);for(let r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}(this),e.map((t,n)=>{let r=n+(t.validEnd?"*":" ")+" ";for(let n=0;n<t.next.length;n++)r+=(n?", ":"")+t.next[n].type.name+"->"+e.indexOf(t.next[n].next);return r}).join("\n")}}T.empty=new T(!0);class O{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 SyntaxError(e+" (in content expression '"+this.string+"')")}}function R(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function L(e,t){return t-e}function I(e,t){let n=[];return function t(r){let i=e[r];if(1==i.length&&!i[0].term)return t(i[0].to);n.push(r);for(let e=0;e<i.length;e++){let{term:r,to:s}=i[e];r||-1!=n.indexOf(s)||t(s)}}(t),n.sort(L)}function N(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function D(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(void 0===i){let t=e[r];if(t.hasDefault)i=t.default;else throw RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function z(e,t,n,r){for(let i in t)if(!(i in e))throw RangeError(`Unsupported attribute ${i} for ${n} of type ${r}`);for(let n in e)e[n].validate&&e[n].validate(t[n])}function P(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new j(e,r,t[r]);return n}class ${constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=P(e,n.attrs),this.defaultAttrs=N(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==T.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-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:D(this.attrs,e)}create(e=null,t,n){if(this.isText)throw Error("NodeType.create can't construct text nodes");return new M(this,this.computeAttrs(e),o.from(t),d.setFrom(n))}createChecked(e=null,t,n){return t=o.from(t),this.checkContent(t),new M(this,this.computeAttrs(e),t,d.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),(t=o.from(t)).size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),i=r&&r.fillBefore(o.empty,!0);return i?new M(this,e,t.append(i),d.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);
1if(!t||!t.validEnd)return!1;for(let t=0;t<e.childCount;t++)if(!this.allowsMarks(e.child(t).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){z(this.attrs,e,"node",this.name)}allowsMarkType(e){return null==this.markSet||this.markSet.indexOf(e)>-1}allowsMarks(e){if(null==this.markSet)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){let t;if(null==this.markSet)return e;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:d.none:e}static compile(e,t){let n=Object.create(null);e.forEach((e,r)=>n[e]=new $(e,t,r));let r=t.spec.topNode||"doc";if(!n[r])throw RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw RangeError("Every schema needs a 'text' type");for(let e in n.text.attrs)throw RangeError("The text node type should not have attributes");return n}}class j{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate="string"==typeof n.validate?function(e,t,n){let r=n.split("|");return n=>{let i=null===n?"null":typeof n;if(0>r.indexOf(i))throw RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}}(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class B{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=P(e,r.attrs),this.excluded=null;let i=N(this.attrs);this.instance=i?new d(this,i):null}create(e=null){return!e&&this.instance?this.instance:new d(this,D(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach((e,i)=>n[e]=new B(e,r++,t,i)),n}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){z(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class F{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=r.from(e.nodes),t.marks=r.from(e.marks||{}),this.nodes=$.compile(this.spec.nodes,this),this.marks=B.compile(this.spec.marks,this);let n=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw RangeError(e+" can not be both a node and a mark");let t=this.nodes[e],r=t.spec.content||"",i=t.spec.marks;if(t.contentMatch=n[r]||(n[r]=T.parse(r,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.spec.linebreakReplacement){if(this.linebreakReplacement)throw RangeError("Multiple linebreak nodes defined");if(!t.isInline||!t.isLeaf)throw RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=t}t.markSet="_"==i?null:i?H(this,i.split(" ")):""!=i&&t.inlineContent?null:[]}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=null==n?[t]:""==n?[]:H(this,n.split(" "))}this.nodeFromJSON=e=>M.fromJSON(this,e),this.markFromJSON=e=>d.fromJSON(this,e),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if("string"==typeof e)e=this.nodeType(e);else if(e instanceof $){if(e.schema!=this)throw RangeError("Node type from different schema used ("+e.name+")")}else throw RangeError("Invalid node type: "+e);return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new A(n,n.defaultAttrs,e,d.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError("Unknown node type: "+e);return t}}function H(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],s=e.marks[i],o=s;if(s)n.push(s);else for(let t in e.marks){let r=e.marks[t];("_"==i||r.spec.group&&r.spec.group.split(" ").indexOf(i)>-1)&&n.push(o=r)}if(!o)throw SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class K{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];
1t.forEach(e=>{if(null!=e.tag)this.tags.push(e);else if(null!=e.style){let t=/[^=]*/.exec(e.style)[0];0>n.indexOf(t)&&n.push(t),this.styles.push(e)}}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)})}parse(e,t={}){let n=new q(this,t,!1);return n.addAll(e,d.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new q(this,t,!0);return n.addAll(e,d.none,t.from,t.to),u.maxOpen(n.finish())}matchTag(e,t,n){for(let s=n?this.tags.indexOf(n)+1:0;s<this.tags.length;s++){var r,i;let n=this.tags[s];if(r=e,i=n.tag,(r.matches||r.msMatchesSelector||r.webkitMatchesSelector||r.mozMatchesSelector).call(r,i)&&(void 0===n.namespace||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs){let t=n.getAttrs(e);if(!1===t)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let r=this.styles[i],s=r.style;if(0==s.indexOf(e)&&(!r.context||n.matchesContext(r.context))&&(!(s.length>e.length)||61==s.charCodeAt(e.length)&&s.slice(e.length+1)==t)){if(r.getAttrs){let e=r.getAttrs(t);if(!1===e)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=null==e.priority?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((null==e.priority?50:e.priority)<n)break}t.splice(r,0,e)}for(let t in e.marks){let r=e.marks[t].spec.parseDOM;r&&r.forEach(e=>{n(e=Y(e)),e.mark||e.ignore||e.clearMark||(e.mark=t)})}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach(e=>{n(e=Y(e)),e.node||e.ignore||e.mark||(e.node=t)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new K(e,K.schemaRules(e)))}}let _={address:!0,article:!0,aside:!0,blockquote:!0,body:!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},J={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},U={ol:!0,ul:!0};function V(e,t,n){return null!=t?!!t|2*("full"===t):e&&"pre"==e.whitespace?3:-5&n}class W{constructor(e,t,n,r,i,s){this.type=e,this.attrs=t,this.marks=n,this.solid=r,this.options=s,this.content=[],this.activeMarks=d.none,this.match=i||(4&s?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(o.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let t=this.type.contentMatch,n;return(n=t.findWrapping(e.type))?(this.match=t,n):null}}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let e=this.content[this.content.length-1],t;e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))&&(e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=e.withText(e.text.slice(0,e.text.length-t[0].length)))}let t=o.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(o.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&&!_.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class q{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r=t.topNode,i,s=V(null,t.preserveWhitespace,0)|4*!!n;i=r?new W(r.type,r.attrs,d.none,!0,t.topMatch||r.type.contentMatch,s):n?new W(null,null,d.none,!0,null,s):new W(e.schema.topNodeType,null,d.none,!0,null,s),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){3==e.nodeType?this.addTextNode(e,t):1==e.nodeType&&this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,r=this.top,i=2&r.options?"full":this.localPreserveWS||(1&r.options)>0,{schema:s}=this.parser;if("full"===i||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(i)if("full"===i)n=n.replace(/\r\n?/g,"\n");else if(s.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(s.linebreakReplacement.create())){let e=n.split(/\r?\n|\r/);for(let n=0;n<e.length;n++)n&&this.insertNode(s.linebreakReplacement.create(),t,!0),e[n]&&this.insertNode(s.text(e[n]),t,!/\S/.test(e[n]));n=""}else n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let t=r.content[r.content.length-1],i=e.previousSibling;(!t||i&&"BR"==i.nodeName||t.isText&&/[ \t\r\n\u000c]$/.test(t.text))&&(n=n.slice(1))}n&&this.insertNode(s.text(n),t,!/\S/.test(n)),this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let r=this.localPreserveWS,i=this.top;("PRE"==e.tagName||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),o;U.hasOwnProperty(s)&&this.parser.normalizeLists&&function(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=1==t.nodeType?t.nodeName.toLowerCase():null;e&&U.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):"li"==e?n=t:e&&(n=null)}}(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,n));
vendor: 4,918 bytes, line 1
1e:if(a?a.ignore:J.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,t);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(e=a.skip);let n,r=this.needsBlock;if(_.hasOwnProperty(s))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),n=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let o=a&&a.skip?t:this.readStyles(e,t);o&&this.addAll(e,o),n&&this.sync(i),this.needsBlock=r}else{let n=this.readStyles(e,t);n&&this.addElementByRule(e,a,n,!1===a.consuming?o:void 0)}this.localPreserveWS=r}leafFallback(e,t){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"),t)}ignoreFallback(e,t){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let n=e.style;if(n&&n.length)for(let e=0;e<this.parser.matchedStyles.length;e++){let r=this.parser.matchedStyles[e],i=n.getPropertyValue(r);if(i)for(let e;;){let n=this.parser.matchStyle(r,i,this,e);if(!n)break;if(n.ignore)return null;if(t=n.clearMark?t.filter(e=>!n.clearMark(e)):t.concat(this.parser.schema.marks[n.mark].create(n.attrs)),!1===n.consuming)e=n;else break}}return t}addElementByRule(e,t,n,r){let i,s;if(t.node)if((s=this.parser.schema.nodes[t.node]).isLeaf)this.insertNode(s.create(t.attrs),n,"BR"==e.nodeName)||this.leafFallback(e,n);else{let e=this.enter(s,t.attrs||null,n,t.preserveWhitespace);e&&(i=!0,n=e)}else{let e=this.parser.schema.marks[t.mark];n=n.concat(e.create(t.attrs))}let o=this.top;if(s&&s.isLeaf)this.findInside(e);else if(r)this.addElement(e,n,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(e=>this.insertNode(e,n,!1));else{let r=e;"string"==typeof t.contentElement?r=e.querySelector(t.contentElement):"function"==typeof t.contentElement?r=t.contentElement(e):t.contentElement&&(r=t.contentElement),this.findAround(e,r,!0),this.addAll(r,n),this.findAround(e,r,!1)}i&&this.sync(o)&&this.open--}addAll(e,t,n,r){let i=n||0;for(let s=n?e.childNodes[n]:e.firstChild,o=null==r?null:e.childNodes[r];s!=o;s=s.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(s,t);this.findAtPoint(e,i)}findPlace(e,t,n){let r,i;for(let t=this.open,s=0;t>=0;t--){let o=this.nodes[t],a=o.findWrapping(e);if(a&&(!r||r.length>a.length+s)&&(r=a,i=o,!a.length))break;if(o.solid){if(n)break;s+=2}}if(!r)return null;this.sync(i);for(let e=0;e<r.length;e++)t=this.enterInner(r[e],null,t,!1);return t}insertNode(e,t,n){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&(t=this.enterInner(e,null,t))}let r=this.findPlace(e,t,n);if(r){this.closeExtra();let t=this.top;t.match&&(t.match=t.match.matchType(e.type));let n=d.none;for(let i of r.concat(e.marks))(t.type?t.type.allowsMarkType(i.type):X(i.type,e.type))&&(n=i.addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n,r){let i=this.findPlace(e.create(t),n,!1);return i&&(i=this.enterInner(e,t,n,!0,r)),i}enterInner(e,t,n,r=!1,i){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let o=V(e,i,s.options);4&s.options&&0==s.content.length&&(o|=4);let a=d.none;return n=n.filter(t=>(s.type?!s.type.allowsMarkType(t.type):!X(t.type,e))||(a=t.addToSet(a),!1)),this.nodes.push(new W(e,t,a,r,null,o)),this.open++,n}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;else this.localPreserveWS&&(this.nodes[t].options|=1);return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node)&&t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+ +!r,s=(e,o)=>{for(;e>=0;e--){let a=t[e];
1if(""==a){if(e==t.length-1||0==e)continue;for(;o>=i;o--)if(s(e-1,o))return!0;return!1}{let e=o>0||0==o&&r?this.nodes[o].type:n&&o>=i?n.node(o-i).type:null;if(!e||e.name!=a&&!e.isInGroup(a))return!1;o--}}return!0};return s(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}}function Y(e){let t={};for(let n in e)t[n]=e[n];return t}function X(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let s=[],o=e=>{s.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:i}=e.edge(n);if(r==t||0>s.indexOf(i)&&o(i))return!0}};if(o(i.contentMatch))return!0}}class G{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=Q(t).createDocumentFragment());let r=n,i=[];return e.forEach(e=>{if(i.length||e.marks.length){let n=0,s=0;for(;n<i.length&&s<e.marks.length;){let t=e.marks[s];if(!this.marks[t.type.name]){s++;continue}if(!t.eq(i[n][0])||!1===t.type.spec.spanning)break;n++,s++}for(;n<i.length;)r=i.pop()[1];for(;s<e.marks.length;){let n=e.marks[s++],o=this.serializeMark(n,e.isInline,t);o&&(i.push([n,r]),r.appendChild(o.dom),r=o.contentDOM||o.dom)}}r.appendChild(this.serializeNodeInner(e,t))}),n}serializeNodeInner(e,t){if(e.isText)return Q(t).createTextNode(e.text);let{dom:n,contentDOM:r}=et(Q(t),this.nodes[e.type.name](e),null,e.attrs);if(r){if(e.isLeaf)throw RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let i=this.serializeMark(e.marks[r],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&et(Q(n),r(e,t),null,e.attrs)}static renderSpec(e,t,n=null,r){return"string"==typeof t?{dom:e.createTextNode(t)}:et(e,t,n,r)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new G(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Z(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return Z(e.marks)}}function Z(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function Q(e){return e.document||window.document}let ee=new WeakMap;function et(e,t,n,r){let i,s,o;if(1==t.nodeType)return{dom:t};if(t.dom&&1==t.dom.nodeType)return t;let a=t[0],l;if("string"!=typeof a)throw RangeError("Invalid array passed to renderSpec");if(r&&(void 0===(s=ee.get(r))&&ee.set(r,(o=null,!function e(t){if(t&&"object"==typeof t)if(Array.isArray(t))if("string"==typeof t[0])o||(o=[]),o.push(t);else for(let n=0;n<t.length;n++)e(t[n]);else for(let n in t)e(t[n])}(r),s=o)),l=s)&&l.indexOf(t)>-1)throw 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&&(n=a.slice(0,h),a=a.slice(h+1));let d=n?e.createElementNS(n,a):e.createElement(a),c=t[1],u=1;if(c&&"object"==typeof c&&null==c.nodeType&&!Array.isArray(c)){for(let e in u=2,c)if(null!=c[e]){let t=e.indexOf(" ");t>0?d.setAttributeNS(e.slice(0,t),e.slice(t+1),c[e]):"style"==e&&d.style?d.style.cssText=c[e]:d.setAttribute(e,c[e])}}for(let s=u;s<t.length;s++){let o=t[s];if(0===o){if(s<t.length-1||s>u)throw RangeError("Content hole must be the only child of its parent node");return{dom:d,contentDOM:d}}if("string"==typeof o)d.appendChild(e.createTextNode(o));else{let{dom:t,contentDOM:s}=et(e,o,n,r);if(d.appendChild(t),s){if(i)throw RangeError("Multiple content holes");i=s}}}return{dom:d,contentDOM:i}}},72679:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(61133).A)("sliders-horizontal",[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]])},73292:(e,t,n)=>{n.d(t,{$t:()=>C,LN:()=>o,U3:()=>d,hs:()=>E,i5:()=>f,k_:()=>S,nh:()=>u});var r=n(66935),i=n(75419);let s=Object.create(null);class o{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new a(e.min(t),e.max(t))]}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 e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=r.Ji.empty){let n=t.content.lastChild,i=null;for(let e=0;e<t.openEnd;e++)i=n,n=n.lastChild;let s=e.steps.length,o=this.ranges;for(let a=0;a<o.length;a++){let{$from:l,$to:h}=o[a],d=e.mapping.slice(s);e.replaceRange(d.map(l.pos),d.map(h.pos),a?r.Ji.empty:t),0==a&&y(e,s,(n?n.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:s,$to:o}=r[i],a=e.mapping.slice(n),l=a.map(s.pos),h=a.map(o.pos);i?e.deleteRange(l,h):(e.replaceRangeWith(l,h,t),y(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new d(e):g(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let r=e.depth-1;r>=0;r--){let i=t<0?g(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):g(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(i)return i}return null}
1static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new f(e.node(0))}static atStart(e){return g(e,e,0,0,1)||new f(e)}static atEnd(e){return g(e,e,e.content.size,e.childCount,-1)||new f(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError("Invalid input for Selection.fromJSON");let n=s[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in s)throw RangeError("Duplicate use of selection JSON ID "+e);return s[e]=t,t.prototype.jsonID=e,t}getBookmark(){return d.between(this.$anchor,this.$head).getBookmark()}}o.prototype.visible=!0;class a{constructor(e,t){this.$from=e,this.$to=t}}let l=!1;function h(e){l||e.parent.inlineContent||(l=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class d extends o{constructor(e,t=e){h(e),h(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return o.near(n);let r=e.resolve(t.map(this.anchor));return new d(r.parent.inlineContent?r:n,n)}replace(e,t=r.Ji.empty){if(super.replace(e,t),t==r.Ji.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof d&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new c(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw RangeError("Invalid input for TextSelection.fromJSON");return new d(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if((!n||r)&&(n=r>=0?1:-1),!t.parent.inlineContent){let e=o.findFrom(t,n,!0)||o.findFrom(t,-n,!0);if(!e)return o.near(t,n);t=e.$head}return e.parent.inlineContent||(0==r?e=t:(e=(o.findFrom(e,-n,!0)||o.findFrom(e,n,!0)).$anchor).pos<t.pos!=r<0&&(e=t)),new d(e,t)}}o.jsonID("text",d);class c{constructor(e,t){this.anchor=e,this.head=t}map(e){return new c(e.map(this.anchor),e.map(this.head))}resolve(e){return d.between(e.resolve(this.anchor),e.resolve(this.head))}}class u extends o{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),i=e.resolve(r);return n?o.near(i):new u(i)}content(){return new r.Ji(r.FK.from(this.node),0,0)}eq(e){return e instanceof u&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new p(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw RangeError("Invalid input for NodeSelection.fromJSON");return new u(e.resolve(t.anchor))}static create(e,t){return new u(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}u.prototype.visible=!1,o.jsonID("node",u);class p{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new c(n,n):new p(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&u.isSelectable(n)?new u(t):o.near(t)}}class f extends o{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=r.Ji.empty){if(t==r.Ji.empty){e.delete(0,e.doc.content.size);let t=o.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new f(e)}map(e){return new f(e)}eq(e){return e instanceof f}getBookmark(){return m}}o.jsonID("all",f);let m={map(){return this},resolve:e=>new f(e)};function g(e,t,n,r,i,s=!1){if(t.inlineContent)return d.create(e,n);for(let o=r-(i>0?0:1);i>0?o<t.childCount:o>=0;o+=i){let r=t.child(o);if(r.isAtom){if(!s&&u.isSelectable(r))return u.create(e,n-(i<0?r.nodeSize:0))}else{let t=g(e,r,n+i,i<0?r.childCount:0,i,s);if(t)return t}n+=r.nodeSize*i}return null}function y(e,t,n){let r,s=e.steps.length-1;if(s<t)return;let a=e.steps[s];(a instanceof i.Ln||a instanceof i.Wg)&&(e.mapping.maps[s].forEach((e,t,n,i)=>{null==r&&(r=i)}),e.setSelection(o.near(e.doc.resolve(r),n)))}class k extends i.dL{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(1|this.updated)&-3,this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return r.CU.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(e,t){super.addStep(e,t),this.updated=-3&this.updated,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r.CU.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(null==n&&(n=t),!e)return this.deleteRange(t,n);let i=this.storedMarks;if(!i){let e=this.doc.resolve(t);i=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,i)),this.selection.empty||this.selection.to!=t+e.length||this.setSelection(o.near(this.selection.$to)),this}}setMeta(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}getMeta(e){return this.meta["string"==typeof e?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function w(e,t){return t&&e?e.bind(t):e}class v{constructor(e,t,n){this.name=e,this.init=w(t.init,n),this.apply=w(t.apply,n)}}let b=[new v("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new v("selection",{init:(e,t)=>
1e.selection||o.atStart(t.doc),apply:e=>e.selection}),new v("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new v("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class x{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=b.slice(),t&&t.forEach(e=>{if(this.pluginsByKey[e.key])throw RangeError("Adding different instances of a keyed plugin ("+e.key+")");this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new v(e.key,e.spec.state,e))})}}class C{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let t=this.config.plugins[n];if(t.spec.filterTransaction&&!t.spec.filterTransaction.call(t,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),r=null;for(;;){let i=!1;for(let s=0;s<this.config.plugins.length;s++){let o=this.config.plugins[s];if(o.spec.appendTransaction){let a=r?r[s].n:0,l=r?r[s].state:this,h=a<t.length&&o.spec.appendTransaction.call(o,a?t.slice(a):t,l,n);if(h&&n.filterTransaction(h,s)){if(h.setMeta("appendedTransaction",e),!r){r=[];for(let e=0;e<this.config.plugins.length;e++)r.push(e<s?{state:n,n:t.length}:{state:this,n:0})}t.push(h),n=n.applyInner(h),i=!0}r&&(r[s]={state:n,n:t.length})}}if(!i)return{state:n,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw RangeError("Applying a mismatched transaction");let t=new C(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let i=n[r];t[i.name]=i.apply(e,this[i.name],this,t)}return t}get tr(){return new k(this)}static create(e){let t=new x(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new C(t);for(let r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n}reconfigure(e){let t=new x(this.schema,e.plugins),n=t.fields,r=new C(t);for(let t=0;t<n.length;t++){let i=n[t].name;r[i]=this.hasOwnProperty(i)?this[i]:n[t].init(e,r)}return r}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(e=>e.toJSON())),e&&"object"==typeof e)for(let n in e){if("doc"==n||"selection"==n)throw RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],i=r.spec.state;i&&i.toJSON&&(t[n]=i.toJSON.call(r,this[r.key]))}return t}static fromJSON(e,t,n){if(!t)throw RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw RangeError("Required config field 'schema' missing");let i=new x(e.schema,e.plugins),s=new C(i);return i.fields.forEach(i=>{if("doc"==i.name)s.doc=r.bP.fromJSON(e.schema,t.doc);else if("selection"==i.name)s.selection=o.fromJSON(s.doc,t.selection);else if("storedMarks"==i.name)t.storedMarks&&(s.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let r in n){let o=n[r],a=o.spec.state;if(o.key==i.name&&a&&a.fromJSON&&Object.prototype.hasOwnProperty.call(t,r)){s[i.name]=a.fromJSON.call(o,e,t[r],s);return}}s[i.name]=i.init(e,s)}}),s}}class S{constructor(e){this.spec=e,this.props={},e.props&&function e(t,n,r){for(let i in t){let s=t[i];s instanceof Function?s=s.bind(n):"handleDOMEvents"==i&&(s=e(s,n,{})),r[i]=s}return r}(e.props,this,this.props),this.key=e.key?e.key.key:A("plugin")}getState(e){return e[this.key]}}let M=Object.create(null);function A(e){return e in M?e+"$"+ ++M[e]:(M[e]=0,e+"$")}class E{constructor(e="key"){this.key=A(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}},74367:(e,t,n)=>{n.d(t,{A:()=>r});var r=n(79746).Or},75419:(e,t,n)=>{n.d(t,{$L:()=>O,Ln:()=>m,N0:()=>E,Um:()=>T,Wg:()=>g,X9:()=>o,Ys:()=>u,dL:()=>F,jP:()=>w,n9:()=>M,oM:()=>v,zy:()=>S});var r=n(66935);class i{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class s{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&s.empty)return s.empty}recover(e){let t=0,n=65535&e;if(!this.inverted)for(let e=0;e<n;e++)t+=this.ranges[3*e+2]-this.ranges[3*e+1];return this.ranges[3*n]+t+(e-(65535&e))/65536}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,s=this.inverted?2:1,o=this.inverted?1:2;
1for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let h=this.ranges[a+s],d=this.ranges[a+o],c=l+h;if(e<=c){let s=h?e==l?-1:e==c?1:t:t,o=l+r+(s<0?0:d);if(n)return o;let u=e==(t<0?l:c)?null:a/3+(e-l)*65536,p=e==l?2:e==c?1:4;return(t<0?e!=l:e!=c)&&(p|=8),new i(o,p,u)}r+=d-h}return n?e+r:new i(e+r,0,null)}touches(e,t){let n=0,r=65535&t,i=this.inverted?2:1,s=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let o=this.ranges[t]-(this.inverted?n:0);if(o>e)break;let a=this.ranges[t+i];if(e<=o+a&&t==3*r)return!0;n+=this.ranges[t+s]-a}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let s=this.ranges[r],o=s-(this.inverted?i:0),a=s+(this.inverted?0:i),l=this.ranges[r+t],h=this.ranges[r+n];e(o,o+l,a,a+h),i+=h-l}}invert(){return new s(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?s.empty:new s(e<0?[0,-e,0]:[0,0,e])}}s.empty=new s([]);class o{constructor(e,t,n=0,r=e?e.length:0){this.mirror=t,this.from=n,this.to=r,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new o(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),null!=t&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,n=this._maps.length;t<e._maps.length;t++){let r=e.getMirror(t);this.appendMap(e._maps[t],null!=r&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this._maps.length+e._maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e._maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}invert(){let e=new o;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let n=this.from;n<this.to;n++){let i=this._maps[n].mapResult(e,t);if(null!=i.recover){let t=this.getMirror(n);if(null!=t&&t>n&&t<this.to){n=t,e=this._maps[t].recover(i.recover);continue}}r|=i.delInfo,e=i.pos}return n?e:new i(e,r,null)}}let a=Object.create(null);class l{getMap(){return s.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError("Invalid input for Step.fromJSON");let n=a[t.stepType];if(!n)throw RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in a)throw RangeError("Duplicate use of step JSON ID "+e);return a[e]=t,t.prototype.jsonID=e,t}}class h{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new h(e,null)}static fail(e){return new h(null,e)}static fromReplace(e,t,n,i){try{return h.ok(e.replace(t,n,i))}catch(e){if(e instanceof r.vI)return h.fail(e.message);throw e}}}function d(e,t,n){let i=[];for(let r=0;r<e.childCount;r++){let s=e.child(r);s.content.size&&(s=s.copy(d(s.content,t,s))),s.isInline&&(s=t(s,n,r)),i.push(s)}return r.FK.fromArray(i)}class c extends l{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),i=n.node(n.sharedDepth(this.to)),s=new r.Ji(d(t.content,(e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e,i),t.openStart,t.openEnd);return h.fromReplace(e,this.from,this.to,s)}invert(){return new u(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new c(t.pos,n.pos,this.mark)}merge(e){return e instanceof c&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new c(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("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for AddMarkStep.fromJSON");return new c(t.from,t.to,e.markFromJSON(t.mark))}}l.jsonID("addMark",c);class u extends l{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}
vendor: 11,824 bytes, line 1
1apply(e){let t=e.slice(this.from,this.to),n=new r.Ji(d(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return h.fromReplace(e,this.from,this.to,n)}invert(){return new c(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new u(t.pos,n.pos,this.mark)}merge(e){return e instanceof u&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new u(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("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for RemoveMarkStep.fromJSON");return new u(t.from,t.to,e.markFromJSON(t.mark))}}l.jsonID("removeMark",u);class p extends l{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return h.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return h.fromReplace(e,this.pos,this.pos+1,new r.Ji(r.FK.from(n),0,+!t.isLeaf))}invert(e){let t=e.nodeAt(this.pos);if(t){let e=this.mark.addToSet(t.marks);if(e.length==t.marks.length){for(let n=0;n<t.marks.length;n++)if(!t.marks[n].isInSet(e))return new p(this.pos,t.marks[n]);return new p(this.pos,this.mark)}}return new f(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new p(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new p(t.pos,e.markFromJSON(t.mark))}}l.jsonID("addNodeMark",p);class f extends l{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return h.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return h.fromReplace(e,this.pos,this.pos+1,new r.Ji(r.FK.from(n),0,+!t.isLeaf))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new p(this.pos,this.mark):this}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new f(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new f(t.pos,e.markFromJSON(t.mark))}}l.jsonID("removeNodeMark",f);class m extends l{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&y(e,this.from,this.to)?h.fail("Structure replace would overwrite content"):h.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new s([this.from,this.to-this.from,this.slice.size])}invert(e){return new m(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.to,-1),n=this.from==this.to&&m.MAP_BIAS<0?t:e.mapResult(this.from,1);return n.deletedAcross&&t.deletedAcross?null:new m(n.pos,Math.max(n.pos,t.pos),this.slice,this.structure)}merge(e){if(!(e instanceof m)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart)if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;else{let t=this.slice.size+e.slice.size==0?r.Ji.empty:new r.Ji(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new m(e.from,this.to,t,this.structure)}{let t=this.slice.size+e.slice.size==0?r.Ji.empty:new r.Ji(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new m(this.from,this.to+(e.to-e.from),t,this.structure)}}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,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for ReplaceStep.fromJSON");return new m(t.from,t.to,r.Ji.fromJSON(e,t.slice),!!t.structure)}}m.MAP_BIAS=1,l.jsonID("replace",m);class g extends l{constructor(e,t,n,r,i,s,o=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=s,this.structure=o}apply(e){if(this.structure&&(y(e,this.from,this.gapFrom)||y(e,this.gapTo,this.to)))return h.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return h.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?h.fromReplace(e,this.from,this.to,n):h.fail("Content does not fit in gap")}getMap(){return new s([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new g(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),r=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?n.pos:e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||i>n.pos?null:new g(t.pos,n.pos,r,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,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new g(t.from,t.to,t.gapFrom,t.gapTo,r.Ji.fromJSON(e,t.slice),t.insert,!!t.structure)}}function y(e,t,n){let r=e.resolve(t),i=n-t,s=r.depth;for(;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i--;if(i>0){let e=r.node(s).maybeChild(r.indexAfter(s));for(;i>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,i--}}return!1}function k(e,t,n,i=n.contentMatch,s=!0){let o=e.doc.nodeAt(t),a=[],l=t+1;for(let t=0;t<o.childCount;t++){let h=o.child(t),d=l+h.nodeSize,c=i.matchType(h.type);if(c){i=c;for(let t=0;t<h.marks.length;t++)n.allowsMarkType(h.marks[t].type)||e.step(new u(l,d,h.marks[t]));if(s&&h.isText&&"pre"!=n.whitespace){let e,t=/\r?\n|\r/g,i;for(;e=t.exec(h.text);)i||(i=new r.Ji(r.FK.from(n.schema.text(" ",n.allowedMarks(h.marks))),0,0)),a.push(new m(l+e.index,l+e.index+e[0].length,i))}}else a.push(new m(l,d,r.Ji.empty));l=d}if(!i.validEnd){let t=i.fillBefore(r.FK.empty,!0);e.replace(l,l,new r.Ji(t,0,0))}for(let t=a.length-1;t>=0;t--)e.step(a[t])}function w(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth,r=0,i=0;;--n){let s=e.$from.node(n),o=e.$from.index(n)+r,a=e.$to.indexAfter(n)-i;if(n<e.depth&&s.canReplace(o,a,t))return n;if(0==n||s.type.spec.isolating||!((0==o||s.canReplace(o,s.childCount))&&(a==s.childCount||s.canReplace(0,a))))break;o&&(r=1),a<s.childCount&&(i=1)}return null}function v(e,t,n=null,r=e){let i=function(e,t){let{parent:n,startIndex:r,endIndex:i}=e,s=n.contentMatchAt(r).findWrapping(t);if(!s)return null;let o=s.length?s[0]:t;return n.canReplaceWith(r,i,o)?s:null}(e,t),s=i&&function(e,t){let{parent:n,startIndex:r,endIndex:i}=e,s=n.child(r),o=t.contentMatch.findWrapping(s.type);if(!o)return null;let a=(o.length?o[o.length-1]:t).contentMatch;for(let e=r;a&&e<i;e++)a=a.matchType(n.child(e).type);return a&&a.validEnd?o:null}(r,t);return s?i.map(b).concat({type:t,attrs:n}).concat(s.map(b)):null}function b(e){return{type:e,attrs:null}}function x(e,t,n,r){t.forEach((i,s)=>{if(i.isText){let o,a=/\r?\n|\r/g;for(;o=a.exec(i.text);){let i=e.mapping.slice(r).map(n+1+s+o.index);e.replaceWith(i,i+1,t.type.schema.linebreakReplacement.create())}}})}function C(e,t,n,r){t.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let i=e.mapping.slice(r).map(n+1+s);e.replaceWith(i,i+1,t.type.schema.text("\n"))}})}function S(e,t,n=1,r){let i=e.resolve(t),s=i.depth-n,o=r&&r[r.length-1]||i.parent;if(s<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let e=i.depth-1,t=n-2;e>s;e--,t--){let n=i.node(e),s=i.index(e);if(n.type.spec.isolating)return!1;let o=n.content.cutByIndex(s,n.childCount),a=r&&r[t+1];a&&(o=o.replaceChild(0,a.type.create(a.attrs)));let l=r&&r[t]||n;if(!n.canReplace(s+1,n.childCount)||!l.type.validContent(o))return!1}let a=i.indexAfter(s),l=r&&r[0];return i.node(s).canReplaceWith(a,a,l?l.type:i.node(s+1).type)}function M(e,t){let n=e.resolve(t),r=n.index();return A(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function A(e,t){return!!(e&&t&&!e.isLeaf&&function(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let i=0;i<t.childCount;i++){let s=t.child(i),o=s.type==r?e.type.schema.nodes.text:s.type;if(!(n=n.matchType(o))||!e.type.allowsMarks(s.marks))return!1}return n.validEnd}(e,t))}function E(e,t,n=-1){let r=e.resolve(t);for(let e=r.depth;;e--){let i,s,o=r.index(e);if(e==r.depth?(i=r.nodeBefore,s=r.nodeAfter):n>0?(i=r.node(e+1),o++,s=r.node(e).maybeChild(o)):(i=r.node(e).maybeChild(o-1),s=r.node(e+1)),i&&!i.isTextblock&&A(i,s)&&r.node(e).canReplace(o,o+1))return t;if(0==e)break;t=n<0?r.before(e):r.after(e)}}function T(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let e=0;e<n.openStart;e++)i=i.firstChild.content;for(let e=1;e<=(0==n.openStart&&n.size?2:1);e++)for(let t=r.depth;t>=0;t--){let n=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,s=r.index(t)+ +(n>0),o=r.node(t),a=!1;if(1==e)a=o.canReplace(s,s,i);else{let e=o.contentMatchAt(s).findWrapping(i.firstChild.type);a=e&&o.canReplaceWith(s,s,e[0])}if(a)return 0==n?r.pos:n<0?r.before(t+1):r.after(t+1)}return null}function O(e,t,n=t,i=r.Ji.empty){if(t==n&&!i.size)return null;let s=e.resolve(t),o=e.resolve(n);return R(s,o,i)?new m(t,n,i):new L(s,o,i).fit()}function R(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}l.jsonID("replaceAround",g);class L{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=r.FK.empty;for(let t=0;t<=e.depth;t++){let n=e.node(t);this.frontier.push({type:n.type,match:n.contentMatchAt(e.indexAfter(t))})}for(let t=e.depth;t>0;t--)this.placed=r.FK.from(e.node(t).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,i=this.close(e<0?this.$to:n.doc.resolve(e));if(!i)return null;let s=this.placed,o=n.depth,a=i.depth;for(;o&&a&&1==s.childCount;)s=s.firstChild.content,o--,a--;let l=new r.Ji(s,o,a);return e>-1?new g(n.pos,e,this.$to.pos,this.$to.end(),l,t):l.size||n.pos!=this.$to.pos?new m(n.pos,i.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){let i=t.firstChild;if(t.childCount>1&&(r=0),i.type.spec.isolating&&r<=n){e=n;break}t=i.content}for(let t=1;t<=2;t++)for(let n=1==t?e:this.unplaced.openStart;n>=0;n--){let e=null,i=(n?(e=D(this.unplaced.content,n-1).firstChild).content:this.unplaced.content).firstChild;for(let s=this.depth;s>=0;s--){let{type:o,match:a}=this.frontier[s],l,h=null;if(1==t&&(i?a.matchType(i.type)||(h=a.fillBefore(r.FK.from(i),!1)):e&&o.compatibleContent(e.type)))return{sliceDepth:n,frontierDepth:s,parent:e,inject:h};if(2==t&&i&&(l=a.findWrapping(i.type)))return{sliceDepth:n,frontierDepth:s,parent:e,wrap:l};
1if(e&&a.matchType(e.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,i=D(e,t);return!!i.childCount&&!i.firstChild.isLeaf&&(this.unplaced=new r.Ji(e,t+1,Math.max(n,i.size+t>=e.size-n?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,i=D(e,t);if(i.childCount<=1&&t>0){let s=e.size-t<=t+i.size;this.unplaced=new r.Ji(I(e,t-1,1),t-1,s?t-1:n)}else this.unplaced=new r.Ji(I(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:i,wrap:s}){for(;this.depth>t;)this.closeFrontierNode();if(s)for(let e=0;e<s.length;e++)this.openFrontierNode(s[e]);let o=this.unplaced,a=n?n.content:o.content,l=o.openStart-e,h=0,d=[],{match:c,type:u}=this.frontier[t];if(i){for(let e=0;e<i.childCount;e++)d.push(i.child(e));c=c.matchFragment(i)}let p=a.size+e-(o.content.size-o.openEnd);for(;h<a.childCount;){let e=a.child(h),t=c.matchType(e.type);if(!t)break;(++h>1||0==l||e.content.size)&&(c=t,d.push(function e(t,n,i){if(n<=0)return t;let s=t.content;return n>1&&(s=s.replaceChild(0,e(s.firstChild,n-1,1==s.childCount?i-1:0))),n>0&&(s=t.type.contentMatch.fillBefore(s).append(s),i<=0&&(s=s.append(t.type.contentMatch.matchFragment(s).fillBefore(r.FK.empty,!0)))),t.copy(s)}(e.mark(u.allowedMarks(e.marks)),1==h?l:0,h==a.childCount?p:-1)))}let f=h==a.childCount;f||(p=-1),this.placed=N(this.placed,t,r.FK.from(d)),this.frontier[t].match=c,f&&p<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=a;e<p;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=f?0==e?r.Ji.empty:new r.Ji(I(o.content,e-1,1),e-1,p<0?o.openEnd:e-1):new r.Ji(I(o.content,e,h),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return -1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!z(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return -1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){t:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),s=z(e,t,r,n,i);if(s){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],i=z(e,n,r,t,!0);if(!i||i.childCount)continue t}return{depth:t,fit:s,move:i?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=N(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=N(this.placed,this.depth,r.FK.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(r.FK.empty,!0);e.childCount&&(this.placed=N(this.placed,this.frontier.length,e))}}function I(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(I(e.firstChild.content,t-1,n)))}function N(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(N(e.lastChild.content,t-1,n)))}function D(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function z(e,t,n,r,i){let s=e.node(t),o=i?e.indexAfter(t):e.index(t);if(o==s.childCount&&!n.compatibleContent(s.type))return null;let a=r.fillBefore(s.content,!0,o);return a&&!function(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,s.content,o)?a:null}function P(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let i=r;i>=0;i--){let r=e.start(i);if(r<e.pos-(e.depth-i)||t.end(i)>t.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(r==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==r-1)&&n.push(i)}return n}class $ extends l{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return h.fail("No node at attribute step's position");let n=Object.create(null);for(let e in t.attrs)n[e]=t.attrs[e];n[this.attr]=this.value;let i=t.type.create(n,null,t.marks);return h.fromReplace(e,this.pos,this.pos+1,new r.Ji(r.FK.from(i),0,+!t.isLeaf))}getMap(){return s.empty}invert(e){return new $(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new $(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if("number"!=typeof t.pos||"string"!=typeof t.attr)throw RangeError("Invalid input for AttrStep.fromJSON");return new $(t.pos,t.attr,t.value)}}l.jsonID("attr",$);class j extends l{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let n in e.attrs)t[n]=e.attrs[n];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return h.ok(n)}getMap(){return s.empty}invert(e){return new j(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if("string"!=typeof t.attr)throw RangeError("Invalid input for DocAttrStep.fromJSON");return new j(t.attr,t.value)}}l.jsonID("docAttr",j);
1let B=class extends Error{};(B=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n}).prototype=Object.create(Error.prototype),B.prototype.constructor=B,B.prototype.name="TransformError";class F{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new o}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new B(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,t=-1e9;for(let n=0;n<this.mapping.maps.length;n++){let r=this.mapping.maps[n];n&&(e=r.map(e,1),t=r.map(t,-1)),r.forEach((n,r,i,s)=>{e=Math.min(e,i),t=Math.max(t,s)})}return 1e9==e?null:{from:e,to:t}}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=r.Ji.empty){let i=O(this.doc,e,t,n);return i&&this.step(i),this}replaceWith(e,t,n){return this.replace(e,t,new r.Ji(r.FK.from(n),0,0))}delete(e,t){return this.replace(e,t,r.Ji.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return!function(e,t,n,i){if(!i.size)return e.deleteRange(t,n);let s=e.doc.resolve(t),o=e.doc.resolve(n);if(R(s,o,i))return e.step(new m(t,n,i));let a=P(s,o);0==a[a.length-1]&&a.pop();let l=-(s.depth+1);a.unshift(l);for(let e=s.depth,t=s.pos-1;e>0;e--,t--){let n=s.node(e).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;a.indexOf(e)>-1?l=e:s.before(e)==t&&a.splice(1,0,-e)}let h=a.indexOf(l),d=[],c=i.openStart;for(let e=i.content,t=0;;t++){let n=e.firstChild;if(d.push(n),t==i.openStart)break;e=n.content}for(let e=c-1;e>=0;e--){var u;let t=d[e],n=(u=t.type).spec.defining||u.spec.definingForContent;if(n&&!t.sameMarkup(s.node(Math.abs(l)-1)))c=e;else if(n||!t.type.isTextblock)break}for(let t=i.openStart;t>=0;t--){let l=(t+c+1)%(i.openStart+1),u=d[l];if(u)for(let t=0;t<a.length;t++){let d=a[(t+h)%a.length],c=!0;d<0&&(c=!1,d=-d);let p=s.node(d-1),f=s.index(d-1);if(p.canReplaceWith(f,f,u.type,u.marks))return e.replace(s.before(d),c?o.after(d):n,new r.Ji(function e(t,n,i,s,o){if(n<i){let r=t.firstChild;t=t.replaceChild(0,r.copy(e(r.content,n+1,i,s,r)))}if(n>s){let e=o.contentMatchAt(0),n=e.fillBefore(t).append(t);t=n.append(e.matchFragment(n).fillBefore(r.FK.empty,!0))}return t}(i.content,0,i.openStart,l),l,i.openEnd))}}let p=e.steps.length;for(let r=a.length-1;r>=0&&(e.replace(t,n,i),!(e.steps.length>p));r--){let e=a[r];e<0||(t=s.before(e),n=o.after(e))}}(this,e,t,n),this}replaceRangeWith(e,t,n){var i=e,s=t;if(!n.isInline&&i==s&&this.doc.resolve(i).parent.content.size){let e=function(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(let e=r.depth-1;e>=0;e--){let t=r.index(e);if(r.node(e).canReplaceWith(t,t,n))return r.before(e+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let e=r.depth-1;e>=0;e--){let t=r.indexAfter(e);if(r.node(e).canReplaceWith(t,t,n))return r.after(e+1);if(t<r.node(e).childCount)break}return null}(this.doc,i,n.type);null!=e&&(i=s=e)}return this.replaceRange(i,s,new r.Ji(r.FK.from(n),0,0)),this}deleteRange(e,t){return!function(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n);if(r.parent.isTextblock&&i.parent.isTextblock&&r.start()!=i.start()&&0==r.parentOffset&&0==i.parentOffset){let s=r.sharedDepth(n),o=!1;for(let e=r.depth;e>s;e--)r.node(e).type.spec.isolating&&(o=!0);for(let e=i.depth;e>s;e--)i.node(e).type.spec.isolating&&(o=!0);if(!o){for(let e=r.depth;e>0&&t==r.start(e);e--)t=r.before(e);for(let e=i.depth;e>0&&n==i.start(e);e--)n=i.before(e);r=e.doc.resolve(t),i=e.doc.resolve(n)}}let s=P(r,i);for(let t=0;t<s.length;t++){let n=s[t],o=t==s.length-1;if(o&&0==n||r.node(n).type.contentMatch.validEnd)return e.delete(r.start(n),i.end(n));if(n>0&&(o||r.node(n-1).canReplace(r.index(n-1),i.indexAfter(n-1))))return e.delete(r.before(n),i.after(n))}for(let s=1;s<=r.depth&&s<=i.depth;s++)if(t-r.start(s)==r.depth-s&&n>r.end(s)&&i.end(s)-n!=i.depth-s&&r.start(s-1)==i.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),i.index(s-1)))return e.delete(r.before(s),n);e.delete(t,n)}(this,e,t),this}lift(e,t){return!function(e,t,n){let{$from:i,$to:s,depth:o}=t,a=i.before(o+1),l=s.after(o+1),h=a,d=l,c=r.FK.empty,u=0;for(let e=o,t=!1;e>n;e--)t||i.index(e)>
10?(t=!0,c=r.FK.from(i.node(e).copy(c)),u++):h--;let p=r.FK.empty,f=0;for(let e=o,t=!1;e>n;e--)t||s.after(e+1)<s.end(e)?(t=!0,p=r.FK.from(s.node(e).copy(p)),f++):d++;e.step(new g(h,d,a,l,new r.Ji(c.append(p),u,f),c.size-u,!0))}(this,e,t),this}join(e,t=1){return!function(e,t,n){let i=null,{linebreakReplacement:s}=e.doc.type.schema,o=e.doc.resolve(t-n),a=o.node().type;if(s&&a.inlineContent){let e="pre"==a.whitespace,t=!!a.contentMatch.matchType(s);e&&!t?i=!1:!e&&t&&(i=!0)}let l=e.steps.length;if(!1===i){let r=e.doc.resolve(t+n);C(e,r.node(),r.before(),l)}a.inlineContent&&k(e,t+n-1,a,o.node().contentMatchAt(o.index()),null==i);let h=e.mapping.slice(l),d=h.map(t-n);if(e.step(new m(d,h.map(t+n,-1),r.Ji.empty,!0)),!0===i){let t=e.doc.resolve(d);x(e,t.node(),t.before(),e.steps.length)}}(this,e,t),this}wrap(e,t){return!function(e,t,n){let i=r.FK.empty;for(let e=n.length-1;e>=0;e--){if(i.size){let t=n[e].type.contentMatch.matchFragment(i);if(!t||!t.validEnd)throw RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}i=r.FK.from(n[e].type.create(n[e].attrs,i))}let s=t.start,o=t.end;e.step(new g(s,o,s,o,new r.Ji(i,0,0),n.length,!0))}(this,e,t),this}setBlockType(e,t=e,n,i=null){var s=this;if(!n.isTextblock)throw RangeError("Type given to setBlockType should be a textblock");let o=s.steps.length;return s.doc.nodesBetween(e,t,(e,t)=>{var a,l,h;let d,c,u="function"==typeof i?i(e):i;if(e.isTextblock&&!e.hasMarkup(n,u)&&(a=s.doc,l=s.mapping.slice(o).map(t),h=n,c=(d=a.resolve(l)).index(),d.parent.canReplaceWith(c,c+1,h))){let i=null;if(n.schema.linebreakReplacement){let e="pre"==n.whitespace,t=!!n.contentMatch.matchType(n.schema.linebreakReplacement);e&&!t?i=!1:!e&&t&&(i=!0)}!1===i&&C(s,e,t,o),k(s,s.mapping.slice(o).map(t,1),n,void 0,null===i);let a=s.mapping.slice(o),l=a.map(t,1),h=a.map(t+e.nodeSize,1);return s.step(new g(l,h,l+1,h-1,new r.Ji(r.FK.from(n.create(u,null,e.marks)),0,0),1,!0)),!0===i&&x(s,e,t,o),!1}}),this}setNodeMarkup(e,t,n=null,i){return!function(e,t,n,i,s){let o=e.doc.nodeAt(t);if(!o)throw RangeError("No node at given position");n||(n=o.type);let a=n.create(i,null,s||o.marks);if(o.isLeaf)return e.replaceWith(t,t+o.nodeSize,a);if(!n.validContent(o.content))throw RangeError("Invalid content for node type "+n.name);e.step(new g(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new r.Ji(r.FK.from(a),0,0),1,!0))}(this,e,t,n,i),this}setNodeAttribute(e,t,n){return this.step(new $(e,t,n)),this}setDocAttribute(e,t){return this.step(new j(e,t)),this}addNodeMark(e,t){return this.step(new p(e,t)),this}removeNodeMark(e,t){let n=this.doc.nodeAt(e);if(!n)throw RangeError("No node at position "+e);if(t instanceof r.CU)t.isInSet(n.marks)&&this.step(new f(e,t));else{let r=n.marks,i,s=[];for(;i=t.isInSet(r);)s.push(new f(e,i)),r=i.removeFromSet(r);for(let e=s.length-1;e>=0;e--)this.step(s[e])}return this}split(e,t=1,n){return!function(e,t,n=1,i){let s=e.doc.resolve(t),o=r.FK.empty,a=r.FK.empty;for(let e=s.depth,t=s.depth-n,l=n-1;e>t;e--,l--){o=r.FK.from(s.node(e).copy(o));let t=i&&i[l];a=r.FK.from(t?t.type.create(t.attrs,a):s.node(e).copy(a))}e.step(new m(t,t,new r.Ji(o.append(a),n,n),!0))}(this,e,t,n),this}addMark(e,t,n){var r;let i,s,o,a;return r=this,o=[],a=[],r.doc.nodesBetween(e,t,(r,l,h)=>{if(!r.isInline)return;let d=r.marks;if(!n.isInSet(d)&&h.type.allowsMarkType(n.type)){let h=Math.max(l,e),p=Math.min(l+r.nodeSize,t),f=n.addToSet(d);for(let e=0;e<d.length;e++)d[e].isInSet(f)||(i&&i.to==h&&i.mark.eq(d[e])?i.to=p:o.push(i=new u(h,p,d[e])));s&&s.to==h?s.to=p:a.push(s=new c(h,p,n))}}),o.forEach(e=>r.step(e)),a.forEach(e=>r.step(e)),this}removeMark(e,t,n){var i;let s,o;return i=this,s=[],o=0,i.doc.nodesBetween(e,t,(i,a)=>{if(!i.isInline)return;o++;let l=null;if(n instanceof r.sX){let e=i.marks,t;for(;t=n.isInSet(e);)(l||(l=[])).push(t),e=t.removeFromSet(e)}else n?n.isInSet(i.marks)&&(l=[n]):l=i.marks;if(l&&l.length){let n=Math.min(a+i.nodeSize,t);for(let t=0;t<l.length;t++){let r=l[t],i;for(let e=0;e<s.length;e++){let t=s[e];t.step==o-1&&r.eq(s[e].style)&&(i=t)}i?(i.to=n,i.step=o):s.push({style:r,from:Math.max(a,e),to:n,step:o})}}}
1),s.forEach(e=>i.step(new u(e.from,e.to,e.style))),this}clearIncompatible(e,t,n){return k(this,e,t,n),this}}},79746:(e,t,n)=>{n.d(t,{QO:()=>z,vR:()=>P,Or:()=>U,JU:()=>q,lb:()=>Y});var r=n(56856),i=n(73292),s=n(75419);class o{constructor(e,t){var n;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.lastDragEvent=null,this.width=null!=(n=t.width)?n:1,this.color=!1===t.color?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){if(null!=this.cursorPos&&t.doc!=e.state.doc)if(this.lastDragEvent){let e=this.computeTarget(this.lastDragEvent);e==this.cursorPos?this.updateOverlay():this.setCursor(e)}else this.updateOverlay()}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e,t,n=this.editorView.state.doc.resolve(this.cursorPos),r=!n.parent.inlineContent,i,s=this.editorView.dom,o=s.getBoundingClientRect(),a=o.width/s.offsetWidth,l=o.height/s.offsetHeight;if(r){let e=n.nodeBefore,t=n.nodeAfter;if(e||t){let n=this.editorView.nodeDOM(this.cursorPos-(e?e.nodeSize:0));if(n){let r=n.getBoundingClientRect(),s=e?r.bottom:r.top;e&&t&&(s=(s+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let o=this.width/2*l;i={left:r.left,right:r.right,top:s-o,bottom:s+o}}}}if(!i){let e=this.editorView.coordsAtPos(this.cursorPos),t=this.width/2*a;i={left:e.left-t,right:e.left+t,top:e.top,bottom:e.bottom}}let h=this.editorView.dom.offsetParent;if(!this.element&&(this.element=h.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",r),this.element.classList.toggle("prosemirror-dropcursor-inline",!r),h&&(h!=document.body||"static"!=getComputedStyle(h).position)){let n=h.getBoundingClientRect(),r=n.width/h.offsetWidth,i=n.height/h.offsetHeight;e=n.left-h.scrollLeft*r,t=n.top-h.scrollTop*i}else e=-pageXOffset,t=-pageYOffset;this.element.style.left=(i.left-e)/a+"px",this.element.style.top=(i.top-t)/l+"px",this.element.style.width=(i.right-i.left)/a+"px",this.element.style.height=(i.bottom-i.top)/l+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}computeTarget(e){let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,i="function"==typeof r?r(this.editorView,t,e):r;if(!t||i)return null;let o=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let e=(0,s.Um)(this.editorView.state.doc,o,this.editorView.dragging.slice);null!=e&&(o=e)}return o}dragover(e){if(!this.editorView.editable)return;this.lastDragEvent=e;let t=this.computeTarget(e);null!=t&&(this.setCursor(t),this.scheduleRemoval(5e3))}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}var a=n(72554),l=n(64647),h=n(66935);class d extends i.LN{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return d.valid(n)?new d(n):i.LN.near(n)}content(){return h.Ji.empty}eq(e){return e instanceof d&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for GapCursor.fromJSON");return new d(e.resolve(t.pos))}getBookmark(){return new c(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!function(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(0==n){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n-1);;e=e.lastChild){if(0==e.childCount&&!e.inlineContent||u(e.type))return!0;
1if(e.inlineContent)return!1}}return!0}(e)||!function(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n);;e=e.firstChild){if(0==e.childCount&&!e.inlineContent||u(e.type))return!0;if(e.inlineContent)return!1}}return!0}(e))return!1;let n=t.type.spec.allowGapCursor;if(null!=n)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,t,n=!1){n:for(;;){if(!n&&d.valid(e))return e;let r=e.pos,s=null;for(let n=e.depth;;n--){let i=e.node(n);if(t>0?e.indexAfter(n)<i.childCount:e.index(n)>0){s=i.child(t>0?e.indexAfter(n):e.index(n)-1);break}if(0==n)return null;r+=t;let o=e.doc.resolve(r);if(d.valid(o))return o}for(;;){let o=t>0?s.firstChild:s.lastChild;if(!o){if(s.isAtom&&!s.isText&&!i.nh.isSelectable(s)){e=e.doc.resolve(r+s.nodeSize*t),n=!1;continue n}break}s=o,r+=t;let a=e.doc.resolve(r);if(d.valid(a))return a}return null}}}d.prototype.visible=!1,d.findFrom=d.findGapCursorFrom,i.LN.jsonID("gapcursor",d);class c{constructor(e){this.pos=e}map(e){return new c(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return d.valid(t)?new d(t):i.LN.near(t)}}function u(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}let p=(0,l.K)({ArrowLeft:f("horiz",-1),ArrowRight:f("horiz",1),ArrowUp:f("vert",-1),ArrowDown:f("vert",1)});function f(e,t){let n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,s){let o=e.selection,a=t>0?o.$to:o.$from,l=o.empty;if(o instanceof i.U3){if(!s.endOfTextblock(n)||0==a.depth)return!1;l=!1,a=e.doc.resolve(t>0?a.after():a.before())}let h=d.findGapCursorFrom(a,t,l);return!!h&&(r&&r(e.tr.setSelection(new d(h))),!0)}}function m(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!d.valid(r))return!1;let s=e.posAtCoords({left:n.clientX,top:n.clientY});return!(s&&s.inside>-1&&i.nh.isSelectable(e.state.doc.nodeAt(s.inside)))&&(e.dispatch(e.state.tr.setSelection(new d(r))),!0)}function g(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof d))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let s=h.FK.empty;for(let e=r.length-1;e>=0;e--)s=h.FK.from(r[e].createAndFill(null,s));let o=e.state.tr.replace(n.pos,n.pos,new h.Ji(s,0,0));return o.setSelection(i.U3.near(o.doc.resolve(n.pos+1))),e.dispatch(o),!1}function y(e){if(!(e.selection instanceof d))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",a.zF.create(e.doc,[a.NZ.widget(e.selection.head,t,{key:"gapcursor"})])}var k=function(){};k.prototype.append=function(e){return e.length?(e=k.from(e),!this.length&&e||e.length<200&&this.leafAppend(e)||this.length<200&&e.leafPrepend(this)||this.appendInner(e)):this},k.prototype.prepend=function(e){return e.length?k.from(e).append(this):this},k.prototype.appendInner=function(e){return new v(this,e)},k.prototype.slice=function(e,t){return(void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t)?k.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},k.prototype.get=function(e){if(!(e<0)&&!(e>=this.length))return this.getInner(e)},k.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},k.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach(function(t,n){return r.push(e(t,n))},t,n),r},k.from=function(e){return e instanceof k?e:e&&e.length?new w(e):k.empty};var w=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(!1===e(this.values[i],r+i))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(!1===e(this.values[i],r+i))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=200)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=200)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(k);k.empty=new w([]);var v=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;if(t<i&&!1===this.left.forEachInner(e,t,Math.min(n,i),r)||n>i&&!1===this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;if(t>i&&!1===this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i)||n<i&&!1===this.left.forEachInvertedInner(e,Math.min(t,i),n,r))return!1},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(k);class b{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){let n,r,i,s;if(0==this.eventCount)return null;let o=this.items.length;for(;;o--)if(this.items.get(o-1).selection){--o;break}t&&(r=(n=this.remapping(o,this.items.length)).maps.length);let a=e.tr,l=[],h=[];
1return this.items.forEach((e,t)=>{if(!e.step){n||(r=(n=this.remapping(o,t+1)).maps.length),r--,h.push(e);return}if(n){h.push(new x(e.map));let t=e.step.map(n.slice(r)),i;t&&a.maybeStep(t).doc&&(i=a.mapping.maps[a.mapping.maps.length-1],l.push(new x(i,void 0,void 0,l.length+h.length))),r--,i&&n.appendMap(i,r)}else a.maybeStep(e.step);if(e.selection)return i=n?e.selection.map(n.slice(r)):e.selection,s=new b(this.items.slice(0,o).append(h.reverse().concat(l)),this.eventCount-1),!1},this.items.length,0),{remaining:s,transform:a,selection:i}}addTransform(e,t,n,r){var i,s;let o,a=[],l=this.eventCount,h=this.items,d=!r&&h.length?h.get(h.length-1):null;for(let n=0;n<e.steps.length;n++){let i=e.steps[n].invert(e.docs[n]),s=new x(e.mapping.maps[n],i,t),o;(o=d&&d.merge(s))&&(s=o,n?a.pop():h=h.slice(0,h.length-1)),a.push(s),t&&(l++,t=void 0),r||(d=s)}let c=l-n.depth;return c>S&&(i=h,s=c,i.forEach((e,t)=>{if(e.selection&&0==s--)return o=t,!1}),h=i.slice(o),l-=c),new b(h.append(a),l)}remapping(e,t){let n=new s.X9;return this.items.forEach((t,r)=>{let i=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)},e,t),n}addMaps(e){return 0==this.eventCount?this:new b(this.items.append(e.map(e=>new x(e))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),i=e.mapping,s=e.steps.length,o=this.eventCount;this.items.forEach(e=>{e.selection&&o--},r);let a=t;this.items.forEach(t=>{let r=i.getMirror(--a);if(null==r)return;s=Math.min(s,r);let l=i.maps[r];if(t.step){let s=e.steps[r].invert(e.docs[r]),h=t.selection&&t.selection.map(i.slice(a+1,r));h&&o++,n.push(new x(l,s,h))}else n.push(new x(l))},r);let l=[];for(let e=t;e<s;e++)l.push(new x(i.maps[e]));let h=new b(this.items.slice(0,r).append(l).append(n),o);return h.emptyItemCount()>500&&(h=h.compress(this.items.length-n.length)),h}emptyItemCount(){let e=0;return this.items.forEach(t=>{!t.step&&e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,r=[],i=0;return this.items.forEach((s,o)=>{if(o>=e)r.push(s),s.selection&&i++;else if(s.step){let e=s.step.map(t.slice(n)),o=e&&e.getMap();if(n--,o&&t.appendMap(o,n),e){let a=s.selection&&s.selection.map(t.slice(n));a&&i++;let l=new x(o.invert(),e,a),h,d=r.length-1;(h=r.length&&r[d].merge(l))?r[d]=h:r.push(l)}}else s.map&&n--},this.items.length,0),new b(k.from(r.reverse()),i)}}b.empty=new b(k.empty,0);class x{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new x(t.getMap().invert(),t,this.selection)}}}class C{constructor(e,t,n,r,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}}let S=20;function M(e){let t=[];for(let n=e.length-1;n>=0&&0==t.length;n--)e[n].forEach((e,n,r,i)=>t.push(r,i));return t}function A(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),s=t.map(e[r+1],-1);i<=s&&n.push(i,s)}return n}let E=!1,T=null;function O(e){let t=e.plugins;if(T!=t){E=!1,T=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){E=!0;break}}return E}let R=new i.hs("history"),L=new i.hs("closeHistory");function I(e,t){return(n,r)=>{let i=R.getState(n);if(!i||0==(e?i.undone:i.done).eventCount)return!1;if(r){let s=function(e,t,n){let r=O(t),i=R.get(t).spec.config,s=(n?e.undone:e.done).popEvent(t,r);if(!s)return null;let o=s.selection.resolve(s.transform.doc),a=(n?e.done:e.undone).addTransform(s.transform,t.selection.getBookmark(),i,r),l=new C(n?a:s.remaining,n?s.remaining:a,null,0,-1);return s.transform.setSelection(o).setMeta(R,{redo:n,historyState:l})}(i,n,e);s&&r(t?s.scrollIntoView():s)}return!0}}let N=I(!1,!0),D=I(!0,!0);I(!1,!1),I(!0,!1),r.YY.create({name:"characterCount",addOptions:()=>({limit:null,autoTrim:!0,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(e=>""!==e).length}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=e=>{let t=(null==e?void 0:e.node)||this.editor.state.doc;if("textSize"===((null==e?void 0:e.mode)||this.options.mode)){let e=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(e)}return t.nodeSize},this.storage.words=e=>{let t=(null==e?void 0:e.node)||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new i.k_({key:new i.hs("characterCount"),appendTransaction:(t,n,r)=>{if(e)return;let i=this.options.limit,s=this.options.autoTrim;if(null==i||0===i||!1===s){e=!0;return}let o=this.storage.characters({node:r.doc});if(o>i){console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);let t=r.tr.deleteRange(0,o-i);return e=!0,t}e=!0},filterTransaction:(e,t)=>{let n=this.options.limit;if(!e.docChanged||0===n||null==n)return!0;let r=this.storage.characters({node:t.doc}),i=this.storage.characters({node:e.doc});if(i<=n||r>n&&i>n&&i<=r)return!0;
1if(r>n&&i>n&&i>r||!e.getMeta("paste"))return!1;let s=e.selection.$head.pos;return e.deleteRange(s-(i-n),s),!(this.storage.characters({node:e.doc})>n)}})]}});var z=r.YY.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[function(e={}){return new i.k_({view:t=>new o(t,e)})}(this.options)]}});r.YY.create({name:"focus",addOptions:()=>({className:"has-focus",mode:"all"}),addProseMirrorPlugins(){return[new i.k_({key:new i.hs("focus"),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:r}=this.editor,{anchor:i}=t,s=[];if(!n||!r)return a.zF.create(e,[]);let o=0;"deepest"===this.options.mode&&e.descendants((e,t)=>{if(!e.isText){if(!(i>=t&&i<=t+e.nodeSize-1))return!1;o+=1}});let l=0;return e.descendants((e,t)=>!e.isText&&!!(i>=t&&i<=t+e.nodeSize-1)&&((l+=1,"deepest"===this.options.mode&&o-l>0||"shallowest"===this.options.mode&&l>1)?"deepest"===this.options.mode:void s.push(a.NZ.node(t,t+e.nodeSize,{class:this.options.className})))),a.zF.create(e,s)}}})]}});var P=r.YY.create({name:"gapCursor",addProseMirrorPlugins:()=>[new i.k_({props:{decorations:y,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&d.valid(n)?new d(n):null,handleClick:m,handleKeyDown:p,handleDOMEvents:{beforeinput
1:g}}})],extendNodeSchema(e){var t;let n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:null!=(t=(0,r.gk)((0,r.iI)(e,"allowGapCursor",n)))?t:null}}}),$="placeholder",j=new i.hs("tiptap__placeholder");function B(e){let{editor:t,placeholder:n,dataAttribute:r,pos:i,node:s,isEmptyDoc:o,hasAnchor:l,classes:{emptyNode:h,emptyEditor:d}}=e,c=[h];return o&&c.push(d),a.NZ.node(i,i+s.nodeSize,{class:c.join(" "),[r]:"function"==typeof n?n({editor:t,node:s,pos:i,hasAnchor:l}):n})}function F(e,t){return"function"==typeof e?e(t):e}function H({editor:e,options:t,dataAttribute:n,doc:i,selection:s,from:o,to:a}){let{anchor:l}=s,h=[],d=e.isEmpty;return i.nodesBetween(o,a,(i,s)=>{let o=l>=s&&l<=s+i.nodeSize,a=!i.isLeaf&&(0,r.Op)(i);return i.type.isTextblock&&(o||!t.showOnlyCurrent)&&a&&h.push(B({editor:e,isEmptyDoc:d,dataAttribute:n,hasAnchor:o,placeholder:t.placeholder,classes:{emptyEditor:t.emptyEditorClass,emptyNode:F(t.emptyNodeClass,{editor:e,node:i,pos:s,hasAnchor:o})},node:i,pos:s})),t.includeChildren}),h}function K({editor:e,options:t,dataAttribute:n,doc:i,selection:s}){if(!(e.isEditable||!t.showOnlyWhenEditable))return null;let{anchor:o}=s,l=[],h=e.isEmpty;if(t.showOnlyCurrent&&!t.includeChildren){let s=i.resolve(o),a=s.depth>0?s.node(1):s.nodeAfter,d=s.depth>0?s.before(1):o;if(a&&a.type.isTextblock&&(0,r.Op)(a)){let r=o>=d&&o<=d+a.nodeSize;l.push(B({editor:e,isEmptyDoc:h,dataAttribute:n,hasAnchor:r,placeholder:t.placeholder,classes:{emptyEditor:t.emptyEditorClass,emptyNode:F(t.emptyNodeClass,{editor:e,node:a,pos:d,hasAnchor:r})},node:a,pos:d}))}}else l.push(...H({editor:e,options:t,dataAttribute:n,doc:i,selection:s,from:0,to:i.content.size}));return a.zF.create(i,l)}function _(e,t){var n;let r=e.resolve(t);if(0===r.depth){let e=null!=(n=r.nodeAfter)?n:r.nodeBefore;if(!e)return{from:t,to:t};let i=r.nodeAfter?t:t-e.nodeSize;return{from:i,to:i+e.nodeSize}}let i=r.before(1);return{from:i,to:i+r.node(1).nodeSize}}function J(e,t){return{from:Math.max(0,t.from-1),to:Math.min(e.content.size,t.to-1)}}var U=r.YY.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:$,placeholder:"Write something â¦",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){return[function({editor:e,options:t}){let n=t.dataAttribute?`data-${t.dataAttribute.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}`:`data-${$}`,s=t.showOnlyCurrent&&!t.includeChildren;return new i.k_({key:j,...s?{}:{state:function({editor:e,options:t,dataAttribute:n}){return{init(r,i){let s=K({editor:e,options:t,dataAttribute:n,doc:i.doc,selection:i.selection});return null!=s?s:a.zF.empty},apply:(i,s,o,a)=>i.docChanged||i.selectionSet?function({decorations:e,ranges:t,editor:n,options:r,dataAttribute:i,doc:s,selection:o}){let a=e;for(let e of t){let{from:t,to:l}=function(e,t,n){let r=Math.max(0,Math.min(e,n.content.size)),i=Math.max(r,Math.min(t,n.content.size));return{from:r,to:i}}(e.from,e.to,s),h=a.find(t,l).filter(e=>e.from>=t&&e.to<=l);h.length&&(a=a.remove(h));let d=H({editor:n,options:r,dataAttribute:i,doc:s,selection:o,from:t,to:l});d.length&&(a=a.add(s,d))}return a}({decorations:s.map(i.mapping,i.doc),ranges:function(e,t,n){let i=[];if(e.docChanged)for(let t of(0,r.FF)(e))i.push(...function(e,t){var n,r;let i,s=(n=t.from,r=t.to,i=[],e.forEach((e,t)=>{let s=t+e.nodeSize,o=s+1;t+1<r&&o>n&&i.push({from:t,to:s})}),i);return s.push(J(e,_(e,t.from))),t.to>t.from?s.push(J(e,_(e,Math.min(t.to,e.content.size+1)-1))):t.from<e.content.size+1&&s.push(J(e,_(e,Math.min(t.from+1,e.content.size)))),s}(n.doc,t.newRange));return e.selectionSet&&(i.push(J(n.doc,_(n.doc,e.mapping.map(t.selection.anchor)))),i.push(J(n.doc,_(n.doc,n.selection.anchor)))),function(e){if(0===e.length)return[];let t=[...e].sort((e,t)=>e.from-t.from),n=[{...t[0]}];for(let e=1;e<t.length;e+=1){let r=n[n.length-1],i=t[e];i.from<=r.to?r.to=Math.max(r.to,i.to):n.push({...i})}return n}(i)}(i,o,a),editor:e,options:t,dataAttribute:n,doc:a.doc,selection:a.selection}):s}}({editor:e,options:t,dataAttribute:n})},props:{decorations:s?({doc:r,selection:i})=>K({editor:e,options:t,dataAttribute:n,doc:r,selection:i}):n=>{var r;return t.showOnlyWhenEditable&&!e.isEditable?a.zF.empty:null!=(r=j.getState(n))?r:a.zF.empty}}})}({editor:this.editor,options:this.options})]}});function V(e,t){return!e.selection.empty&&!(0,r.BQ)(e.selection)&&t.isEditable}function W({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||(null==t?void 0:t.type)===e}r.YY.create({name:"selection",addOptions:()=>({className:"selection"}),addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new i.k_({key:new i.hs("selection"),props:{decorations:n=>!V(n,e)||e.isFocused||e.view.dragging?null:a.zF.create(n.doc,[a.NZ.inline(n.selection.from,n.selection.to,{class:t.className})]),handleDOMEvents:{blur(t){var n;return!!V(t.state,e)&&(null==(n=window.getSelection())||n.removeAllRanges(),!1)},focus:t=>!!V(t.state,e)&&(requestAnimationFrame(()=>
1{!e.isDestroyed&&t.hasFocus()&&t.focus()}),!1)}}})]}});var q=r.YY.create({name:"trailingNode",addOptions:()=>({node:void 0,notAfter:[]}),addProseMirrorPlugins(){var e;let t=new i.hs(this.name),n=this.options.node||(null==(e=this.editor.schema.topNodeType.contentMatch.defaultType)?void 0:e.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,e])=>e).filter(e=>(this.options.notAfter||[]).concat(n).includes(e.name));return[new i.k_({key:t,appendTransaction:(e,r,i)=>{let{doc:s,tr:o,schema:a}=i,l=t.getState(i),h=s.content.size,d=a.nodes[n];if(!e.some(e=>e.getMeta("skipTrailingNode"))&&l)return o.insert(h,d.create())},state:{init:(e,t)=>!W({node:t.tr.doc.lastChild,types:r}),apply:(e,t)=>!e.docChanged||e.getMeta("__uniqueIDTransaction")?t:!W({node:e.doc.lastChild,types:r})}})]}}),Y=r.YY.create({name:"undoRedo",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>N(e,t),redo:()=>({state:e,dispatch:t})=>D(e,t)}),addProseMirrorPlugins(){return[function(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new i.k_({key:R,state:{init:()=>new C(b.empty,b.empty,null,0,-1),apply:(t,n,r)=>(function(e,t,n,r){let i=n.getMeta(R),s;if(i)return i.historyState;n.getMeta(L)&&(e=new C(e.done,e.undone,null,0,-1));let o=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(o&&o.getMeta(R))if(o.getMeta(R).redo)return new C(e.done.addTransform(n,void 0,r,O(t)),e.undone,M(n.mapping.maps),e.prevTime,e.prevComposition);else return new C(e.done,e.undone.addTransform(n,void 0,r,O(t)),null,e.prevTime,e.prevComposition);if(!1===n.getMeta("addToHistory")||o&&!1===o.getMeta("addToHistory"))if(s=n.getMeta("rebased"))return new C(e.done.rebased(n,s),e.undone.rebased(n,s),A(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);else return new C(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),A(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);{let i=n.getMeta("composition"),s=0==e.prevTime||!o&&e.prevComposition!=i&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)}),n}(n,e.prevRanges)),a=o?A(e.prevRanges,n.mapping):M(n.mapping.maps);return new C(e.done.addTransform(n,s?t.selection.getBookmark():void 0,r,O(t)),b.empty,a,n.time,null==i?e.prevComposition:i)}})(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?N:"historyRedo"==n?D:null;return!!r&&!!e.editable&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}(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()}}})},80958:(e,t,n)=>{n.d(t,{A:()=>t6});var r=n(56856),i=n(73292),s=(e,t)=>{if("slot"===e)return 0;if(e instanceof Function)return e(t);let{children:n,...r}=null!=t?t:{};if("svg"===e)throw Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[e,r,n]},o=/^\s*>\s$/,a=r.bP.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:e}){return s("blockquote",{...(0,r.KV)(this.options.HTMLAttributes,e),children:s("slot",{})})},parseMarkdown:(e,t)=>{var n;let r=null!=(n=t.parseBlockChildren)?n:t.parseChildren;return t.createNode("blockquote",void 0,r(e.tokens||[]))},renderMarkdown:(e,t)=>{if(!e.content)return"";let n=[];return e.content.forEach((e,r)=>{var i,s;let o=(null!=(s=null==(i=t.renderChild)?void 0:i.call(t,e,r))?s:t.renderChildren([e])).split("\n").map(e=>""===e.trim()?">":`> ${e}`);n.push(o.join("\n"))}),n.join(` 2> 3`)},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote(),Backspace:()=>((e,t)=>{var n;let{state:r,view:s}=e,{selection:o}=r;if(!o.empty)return!1;let{$from:a}=o;if(0!==a.parentOffset)return!1;let l=a.depth-1;if(l<0)return!1;let h=a.node(l),d=a.index(l);if(0===d)return!1;if(h.type===t)return e.commands.lift(t.name);let c=h.child(d-1);if(c.type!==t||!(null==(n=c.lastChild)?void 0:n.isTextblock))return!1;let u=a.before(),p=u-1-1,{tr:f}=r;return f.delete(u,a.after()).insert(p,a.parent.content),f.setSelection(i.U3.create(f.doc,p)),s.dispatch(f.scrollIntoView()),!0})(this.editor,this.type)}}
3,addInputRules(){return[(0,r.tG)({find:o,type:this.type})]}}),l=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,h=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,d=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,c=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,u=r.CU.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!==e.style.fontWeight&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return s("strong",{...(0,r.KV)(this.options.HTMLAttributes,e),children:s("slot",{})})},markdownTokenName:"strong",parseMarkdown:(e,t)=>t.applyMark("bold",t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:"<strong>",close:"</strong>"}},renderMarkdown:(e,t)=>`**${t.renderChildren(e)}**`,addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[(0,r.OX)({find:l,type:this.type}
3),(0,r.OX)({find:d,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:h,type:this.type}),(0,r.Zc)({find:c,type:this.type})]}}),p=e=>{let t=/`([^`]+)`(?!`)$/.exec(e);return!t||t.index>0&&"`"===e[t.index-1]?null:{index:t.index,text:t[0],replaceWith:t[1]}},f=e=>{let t,n=/`([^`]+)`(?!`)/g,r=[];for(;null!==(t=n.exec(e));)t.index>0&&"`"===e[t.index-1]||r.push({index:t.index,text:t[0],replaceWith:t[1]});return r},m=r.CU.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:e}){return["code",(0,r.KV)(this.options.HTMLAttributes,e),0]},markdownTokenName:"codespan",parseMarkdown:(e,t)=>t.applyMark("code",[{type:"text",text:e.text||""}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:"",addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}}
3,addInputRules(){return[(0,r.OX)({find:p,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:f,type:this.type})]}}),g=/^```([a-z]+)?[\s\n]$/,y=/^~~~([a-z]+)?[\s\n]$/,k=r.bP.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,exitOnArrowUp:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:4,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;let{languageClassPrefix:n}=this.options;if(!n)return null;let r=[...(null==(t=e.firstElementChild)?void 0:t.classList)||[]].filter(e=>e.startsWith(n)).map(e=>e.replace(n,""))[0];return r||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:e,HTMLAttributes:t}){return["pre",(0,r.KV)(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(e,t)=>{var n,r;return(null==(n=e.raw)?void 0:n.startsWith("```"))===!1&&(null==(r=e.raw)?void 0:r.startsWith("~~~"))===!1&&"indented"!==e.codeBlockStyle?[]:t.createNode("codeBlock",{language:e.lang||null},e.text?[t.createTextNode(e.text)]:[])},renderMarkdown:(e,t)=>{var n;let r=(null==(n=e.attrs)?void 0:n.language)||"";return e.content?[`\`\`\`${r}`,t.renderChildren(e.content),"```"].join("\n"):`\`\`\`${r} 4 5\`\`\``},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:e,$anchor:t}=this.editor.state.selection,n=1===t.pos;return!!e&&t.parent.type.name===this.name&&(!!n||!t.parent.textContent.length)&&this.editor.commands.clearNodes()},Tab:({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=null!=(t=this.options.tabSize)?t:4,{state:r}=e,{selection:i}=r,{$from:s,empty:o}=i;if(s.parent.type!==this.type)return!1;let a=" ".repeat(n);return o?e.commands.insertContent(a):e.commands.command(({tr:e})=>{let{from:t,to:n}=i,s=r.doc.textBetween(t,n,"\n","\n").split("\n").map(e=>a+e).join("\n");return e.replaceWith(t,n,r.schema.text(s)),!0})},"Shift-Tab":({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=null!=(t=this.options.tabSize)?t:4,{state:r}=e,{selection:s}=r,{$from:o,empty:a}=s;return o.parent.type===this.type&&(a?e.commands.command(({tr:e})=>{var t;let{pos:s}=o,a=o.start(),l=o.end(),h=r.doc.textBetween(a,l,"\n","\n").split("\n"),d=0,c=0,u=s-a;for(let e=0;e<h.length;e+=1){if(c+h[e].length>=u){d=e;break}c+=h[e].length+1}let p=Math.min(((null==(t=h[d].match(/^ */))?void 0:t[0])||"").length,n);if(0===p)return!0;let f=a;for(let e=0;e<d;e+=1)f+=h[e].length+1;return e.delete(f,f+p),s-f<=p&&e.setSelection(i.U3.create(e.doc,f)),!0}):e.commands.command(({tr:e})=>{let{from:t,to:i}=s,o=r.doc.textBetween(t,i,"\n","\n").split("\n").map(e=>{var t;let r=Math.min(((null==(t=e.match(/^ */))?void 0:t[0])||"").length,n);return e.slice(r)}).join("\n");return e.replaceWith(t,i,r.schema.text(o)),!0}))},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:t}=e,{selection:n}=t,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;let s=r.parentOffset===r.parent.nodeSize-2,o=r.parent.textContent.endsWith("\n\n");return!!s&&!!o&&e.chain().command(({tr:e})=>(e.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowUp:({editor:e})=>{if(!this.options.exitOnArrowUp)return!1;let{state:t}=e,{selection:n}=t,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type||0!==r.parentOffset)return!1;let s=r.before();return!(s>0)&&e.commands.insertDefaultBlock({pos:s})},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:n,doc:r}=t,{$from:s,empty:o}=n;if(!o||s.parent.type!==this.type||s.parentOffset!==s.parent.nodeSize-2)return!1;let a=s.after();return void 0!==a&&(r.nodeAt(a)?e.commands.command(({tr:e})=>(e.setSelection(i.LN.near(r.resolve(a))),!0)):e.commands.exitCode())}}}
5,addInputRules(){return[(0,r.JJ)({find:g,type:this.type,getAttributes:e=>({language:e[1]})}),(0,r.JJ)({find:y,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new i.k_({key:new i.hs("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),s=r?JSON.parse(r):void 0,o=null==s?void 0:s.mode;if(!n||!o)return!1;let{tr:a,schema:l}=e.state,h=l.text(n.replace(/\r\n?/g,"\n"));return a.replaceSelectionWith(this.type.create({language:o},h)),a.selection.$from.parent.type!==this.type&&a.setSelection(i.U3.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.setMeta("paste",!0),e.dispatch(a),!0}}})]}}),w=r.bP.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n\n"):""}),v=r.bP.create({name:"hardBreak",markdownTokenName:"br",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:e}){return["br",(0,r.KV)(this.options.HTMLAttributes,e)]},renderText:()=>"\n",renderMarkdown:()=>` 6`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:e,storedMarks:i}=n;if(e.$from.parent.type.spec.isolating)return!1;let{keepMarks:s}=this.options,{splittableMarks:o}=r.extensionManager,a=i||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command(({tr:e,dispatch:t})=>{if(t&&a&&s){let t=a.filter(e=>o.includes(e.type.name));e.ensureMarks(t)}return!0}).scrollIntoView().run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),b=r.bP.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){let n=this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0];return[`h${n}`,(0,r.KV)(this.options.HTMLAttributes,t),0]},parseMarkdown:(e,t)=>t.createNode("heading",{level:e.depth||1},t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>{var n;let r=(null==(n=e.attrs)?void 0:n.level)?parseInt(e.attrs.level,10):1,i="#".repeat(r);return e.content?`${i} ${t.renderChildren(e.content)}`:""},addCommands(){return{setHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.setNode(this.name,e),toggleHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>(0,r.JJ)({find:RegExp(`^(#{${Math.min(...this.options.levels)},${e}}
6)\\s$`),type:this.type,getAttributes:{level:e}}))}}),x=r.bP.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{},nextNodeType:"paragraph"}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:e}){return["hr",(0,r.KV)(this.options.HTMLAttributes,e)]},markdownTokenName:"hr",parseMarkdown:(e,t)=>t.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!(0,r.AB)(t,t.schema.nodes[this.name]))return!1;let{selection:n}=t,{$to:s}=n,o=e();return(0,r.BQ)(n)?o.insertContentAt(s.pos,{type:this.name}):o.insertContent({type:this.name}),o.command(({state:e,tr:t,dispatch:n})=>{if(n){let{$to:n}=t.selection,r=n.end();if(n.nodeAfter)n.nodeAfter.isTextblock?t.setSelection(i.U3.create(t.doc,n.pos+1)):n.nodeAfter.isBlock?t.setSelection(i.nh.create(t.doc,n.pos)):t.setSelection(i.U3.create(t.doc,n.pos));else{let s=e.schema.nodes[this.options.nextNodeType]||n.parent.type.contentMatch.defaultType,o=null==s?void 0:s.create();o&&(t.insert(r,o),t.setSelection(i.U3.create(t.doc,r+1)))}t.scrollIntoView()}return!0}).run()}}},addInputRules(){return[(0,r.Ce)({find:/^(?:---|â-|___\s|\*\*\*\s)$/,type:this.t
6ype})]}}),C=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,S=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,M=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,A=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,E=r.CU.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>"normal"!==e.style.fontStyle&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",(0,r.KV)(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(e,t)=>t.applyMark("italic",t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:"<em>",close:"</em>"}},renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}}
6,addInputRules(){return[(0,r.OX)({find:C,type:this.type}),(0,r.OX)({find:M,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:S,type:this.type}),(0,r.Zc)({find:A,type:this.type})]}});let T="numeric",O="ascii",R="alpha",L="asciinumeric",I="alphanumeric",N="domain",D="emoji",z="whitespace";function P(e,t,n){for(let r in t[T]&&(t[L]=!0,t[I]=!0),t[O]&&(t[L]=!0,t[R]=!0),t[L]&&(t[I]=!0),t[R]&&(t[I]=!0),t[I]&&(t[N]=!0),t[D]&&(t[N]=!0),t){let t=(r in n||(n[r]=[]),n[r]);0>t.indexOf(e)&&t.push(e)}}function $(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}$.groups={},$.prototype={accepts(){return!!this.t},go(e){let t=this.j[e];if(t)return t;for(let t=0;t<this.jr.length;t++){let n=this.jr[t][0],r=this.jr[t][1];if(r&&n.test(e))return r}return this.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let i=0;i<e.length;i++)this.tt(e[i],t,n,r)},tr(e,t,n,r){let i;return r=r||$.groups,t&&t.j?i=t:(i=new $(t),n&&r&&P(t,n,r)),this.jr.push([e,i]),i},ts(e,t,n,r){let i=this,s=e.length;if(!s)return i;for(let t=0;t<s-1;t++)i=i.tt(e[t]);return i.tt(e[s-1],t,n,r)},tt(e,t,n,r){if(r=r||$.groups,t&&t.j)return this.j[e]=t,t;let i,s=this.go(e);return s?(Object.assign((i=new $).j,s.j),i.jr.push.apply(i.jr,s.jr),i.jd=s.jd,i.t=s.t):i=new $,t&&(r&&(i.t&&"string"==typeof i.t?P(t,Object.assign(function(e,t){let n={};for(let r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}(i.t,r),n),r):n&&P(t,n,r)),i.t=t),this.j[e]=i,i}};let j=(e,t,n,r,i)=>e.ta(t,n,r,i),B=(e,t,n,r,i)=>e.tr(t,n,r,i),F=(e,t,n,r,i)=>e.ts(t,n,r,i),H=(e,t,n,r,i)=>e.tt(t,n,r,i),K="WORD",_="UWORD",J="ASCIINUMERICAL",U="ALPHANUMERICAL",V="LOCALHOST",W="UTLD",q="SCHEME",Y="SLASH_SCHEME",X="OPENBRACE",G="CLOSEBRACE",Z="OPENBRACKET",Q="CLOSEBRACKET",ee="OPENPAREN",et="CLOSEPAREN",en="OPENANGLEBRACKET",er="CLOSEANGLEBRACKET",ei="FULLWIDTHLEFTPAREN",es="FULLWIDTHRIGHTPAREN",eo="LEFTCORNERBRACKET",ea="RIGHTCORNERBRACKET",el="LEFTWHITECORNERBRACKET",eh="RIGHTWHITECORNERBRACKET",ed="FULLWIDTHLESSTHAN",ec="FULLWIDTHGREATERTHAN",eu="AMPERSAND",ep="APOSTROPHE",ef="ASTERISK",em="BACKSLASH",eg="BACKTICK",ey="CARET",ek="COLON",ew="COMMA",ev="DOLLAR",eb="EQUALS",ex="EXCLAMATION",eC="HYPHEN",eS="PERCENT",eM="PIPE",eA="PLUS",eE="POUND",eT="QUERY",eO="QUOTE",eR="FULLWIDTHMIDDLEDOT",eL="SEMI",eI="SLASH",eN="TILDE",eD="UNDERSCORE",ez="EMOJI";var eP=Object.freeze({__proto__:null,ALPHANUMERICAL:U,AMPERSAND:eu,APOSTROPHE:ep,ASCIINUMERICAL:J,ASTERISK:ef,AT:"AT",BACKSLASH:em,BACKTICK:eg,CARET:ey,CLOSEANGLEBRACKET:er,CLOSEBRACE:G,CLOSEBRACKET:Q,CLOSEPAREN:et,COLON:ek,COMMA:ew,DOLLAR:ev,DOT:"DOT",EMOJI:ez,EQUALS:eb,EXCLAMATION:ex,FULLWIDTHGREATERTHAN:ec,FULLWIDTHLEFTPAREN:ei,FULLWIDTHLESSTHAN:ed,FULLWIDTHMIDDLEDOT:eR,FULLWIDTHRIGHTPAREN:es,HYPHEN:eC,LEFTCORNERBRACKET:eo,LEFTWHITECORNERBRACKET:el,LOCALHOST:V,NL:"NL",NUM:"NUM",OPENANGLEBRACKET:en,OPENBRACE:X,OPENBRACKET:Z,OPENPAREN:ee,PERCENT:eS,PIPE:eM,PLUS:eA,POUND:eE,QUERY:eT,QUOTE:eO,RIGHTCORNERBRACKET:ea,RIGHTWHITECORNERBRACKET:eh,SCHEME:q,SEMI:eL,SLASH:eI,SLASH_SCHEME:Y,SYM:"SYM",TILDE:eN,TLD:"TLD",UNDERSCORE:eD,UTLD:W,UWORD:_,WORD:K,WS:"WS"});let e$=/[a-z]/,ej=/\p{L}/u,eB=/\p{Emoji}/u,eF=/\d/,eH=/\s/,eK=null,e_=null;function eJ(e,t){let n=function(e){let t=[],n=e.length,r=0;for(;r<n;){let i,s=e.charCodeAt(r),o=s<55296||s>56319||r+1===n||(i=e.charCodeAt(r+1))<56320||i>57343?e[r]:e.slice(r,r+2);t.push(o),r+=o.length}return t}(t.replace(/[A-Z]/g,e=>e.toLowerCase())),r=n.length,i=[],s=0,o=0;for(;o<r;){let a=e,l=null,h=0,d=null,c=-1,u=-1;for(;o<r&&(l=a.go(n[o]));)(a=l).accepts()?(c=0,u=0,d=a):c>=0&&(c+=n[o].length,u++),h+=n[o].length,s+=n[o].length,o++;s-=c,o-=u,h-=c,i.push({t:d.t,v:t.slice(s-h,s),s:s-h,e:s})}return i}function eU(e,t,n,r,i){let s,o=t.length;for(let n=0;n<o-1;n++){let o=t[n];e.j[o]?s=e.j[o]:((s=new $(r)).jr=i.slice(),e.j[o]=s),e=s}return(s=new $(n)).jr=i.slice(),e.j[t[o-1]]=s,s}function eV(e){let t=[],n=[],r=0;for(;r<e.length;){let i=0;for(;"0123456789".indexOf(e[r+i])>=0;)i++;if(i>0){t.push(n.join(""));for(let t=parseInt(e.substring(r,r+i),10);t>0;t--)n.pop();r+=i}else n.push(e[r]),r++}return t}let eW={defaultProtocol:"http",events:null,format:eY,formatHref:eY,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};
6function eq(e,t=null){let n=Object.assign({},eW);e&&(n=Object.assign(n,e instanceof eq?e.o:e));let r=n.ignoreTags,i=[];for(let e=0;e<r.length;e++)i.push(r[e].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=i}function eY(e){return e}function eX(e,t){this.t="token",this.v=e,this.tk=t}function eG(e,t){class n extends eX{constructor(t,n){super(t,n),this.t=e}}for(let e in t)n.prototype[e]=t[e];return n.t=e,n}eq.prototype={o:eW,ignoreTags:[],defaultRender:e=>e,check(e){return this.get("validate",e.toString(),e)},get(e,t,n){let r=null!=t,i=this.o[e];return i&&("object"==typeof i?"function"==typeof(i=n.t in i?i[n.t]:eW[e])&&r&&(i=i(t,n)):"function"==typeof i&&r&&(i=i(t,n.t,n))),i},getObj(e,t,n){let r=this.o[e];return"function"==typeof r&&null!=t&&(r=r(t,n.t,n)),r},render(e){let t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}},eX.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){let t=this.toString(),n=e.get("truncate",t,this),r=e.get("format",t,this);return n&&r.length>n?r.substring(0,n)+"â¦":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=eW.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){let t=this.toHref(e.get("defaultProtocol")),n=e.get("formatHref",t,this),r=e.get("tagName",t,this),i=this.toFormattedString(e),s={},o=e.get("className",t,this),a=e.get("target",t,this),l=e.get("rel",t,this),h=e.getObj("attributes",t,this),d=e.getObj("events",t,this);return s.href=n,o&&(s.class=o),a&&(s.target=a),l&&(s.rel=l),h&&Object.assign(s,h),{tagName:r,attributes:s,content:i,eventListeners:d}}};let eZ=eG("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),eQ=eG("text"),e0=eG("nl"),e1=eG("url",{isLink:!0,toHref(e=eW.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==V&&e[1].t===ek}}),e2=e=>new $(e);function e3(e,t,n){let r=n[0].s,i=n[n.length-1].e;return new e(t.slice(r,i),n)}let e4="u">typeof console&&console&&console.warn||(()=>{}),e5={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function e6(e,t=!1){if(e5.initialized&&e4(`linkifyjs: already initialized - will not register custom scheme "${e}" until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw Error(`linkifyjs: incorrect scheme format. 71. Must only contain digits, lowercase ASCII letters or "-" 82. Cannot start or end with "-" 93. "-" cannot repeat`);e5.customSchemes.push([e,t])}function e7(e){return e5.initialized||function(){e5.scanner=function(e=[]){let t={};$.groups=t;let n=new $;null==eK&&(eK=eV("aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2
9ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xf6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2")),null==e_&&(e_=eV("ελ1Ï
2бг1ел3деÑи4еÑ2каÑолик6ом3мÐ
9ºÐ´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")),H(n,"'",ep),H(n,"{",X),H(n,"}",G),H(n,"[",Z),H(n,"]",Q),H(n,"(",ee),H(n,")",et),H(n,"<",en),H(n,">",er),H(n,"ï¼",ei),H(n,"ï¼",es),H(n,"ã",eo),H(n,"ã",ea),H(n,"ã",el),H(n,"ã",eh),H(n,"ï¼",ed),H(n,"ï¼",ec),H(n,"&",eu),H(n,"*",ef),H(n,"@","AT"),H(n,"`",eg),H(n,"^",ey),H(n,":",ek),H(n,",",ew),H(n,"$",ev),H(n,".","DOT"),H(n,"=",eb),H(n,"!",ex),H(n,"-",eC),H(n,"%",eS),H(n,"|",eM),H(n,"+",eA),H(n,"#",eE),H(n,"?",eT),H(n,'"',eO),H(n,"/",eI),H(n,";",eL),H(n,"~",eN),H(n,"_",eD),H(n,"\\",em),H(n,"ã»",eR);let r=B(n,eF,"NUM",{[T]:!0});B(r,eF,r);let i=B(r,e$,J,{[L]:!0}),s=B(r,ej,U,{[I]:!0}),o=B(n,e$,K,{[O]:!0});B(o,eF,i),B(o,e$,o),B(i,eF,i),B(i,e$,i);let a=B(n,ej,_,{[R]:!0});B(a,e$),B(a,eF,s),B(a,ej,a),B(s,eF,s),B(s,e$),B(s,ej,s);let l=H(n,"\n","NL",{[z]:!0}),h=H(n,"\r","WS",{[z]:!0}),d=B(n,eH,"WS",{[z]:!0});H(n,"",d),H(h,"\n",l),H(h,"",d),B(h,eH,d),H(d,"\r"),H(d,"\n"),B(d,eH,d),H(d,"",d);let c=B(n,eB,ez,{[D]:!0});H(c,"#"),B(c,eB,c),H(c,"ï¸",c);let u=H(c,"â");H(u,"#"),B(u,eB,c);let p=[[e$,o],[eF,i]],f=[[e$,null],[ej,a],[eF,s]];for(let e=0;e<eK.length;e++)eU(n,eK[e],"TLD",K,p);for(let e=0;e<e_.length;e++)eU(n,e_[e],W,_,f);P("TLD",{tld:!0,ascii:!0},t),P(W,{utld:!0,alpha:!0},t),eU(n,"file",q,K,p),eU(n,"mailto",q,K,p),eU(n,"http",Y,K,p),eU(n,"https",Y,K,p),eU(n,"ftp",Y,K,p),eU(n,"ftps",Y,K,p),P(q,{scheme:!0,ascii:!0},t),P(Y,{slashscheme:!0,ascii:!0},t),e=e.sort((e,t)=>e[0]>t[0]?1:-1);for(let t=0;t<e.length;t++){let r=e[t][0],i=e[t][1]?{scheme:!0}:{slashscheme:!0};r.indexOf("-")>=0?i[N]=!0:e$.test(r)?eF.test(r)?i[L]=!0:i[O]=!0:i[T]=!0,F(n,r,r,i)}return F(n,"localhost",V,{ascii:!0}),n.jd=new $("SYM"),{start:n,tokens:Object.assign({groups:t},eP)}}(e5.customSchemes);for(let e=0;e<e5.tokenQueue.length;e++)e5.tokenQueue[e][1]({scanner:e5.scanner});e5.parser=function({groups:e}){let t=e.domain.concat([eu,ef,"AT",em,eg,ey,ev,eb,eC,"NUM",eS,eM,eA,eE,eI,"SYM",eN,eD]),n=[ep,ek,ew,"DOT",ex,eS,eT,eO,eL,en,er,X,G,Q,Z,ee,et,ei,es,eo,ea,el,eh,ed,ec],r=[eu,ep,ef,em,eg,ey,ev,eb,eC,X,G,eS,eM,eA,eE,eT,eI,"SYM",eN,eD],i=e2(),s=H(i,eN);j(s,r,s),j(s,e.domain,s);let o=e2(),a=e2(),l=e2();j(i,e.domain,o),j(i,e.scheme,a),j(i,e.slashscheme,l),j(o,r,s),j(o,e.domain,o);let h=H(o,"AT");H(s,"AT",h),H(a,"AT",h),H(l,"AT",h);let d=H(s,"DOT");j(d,r,s),j(d,e.domain,s);let c=e2();j(h,e.domain,c),j(c,e.domain,c);let u=H(c,"DOT");j(u,e.domain,c);let p=e2(eZ);j(u,e.tld,p),j(u,e.utld,p),H(h,V,p);let f=H(c,eC);H(f,eC,f),j(f,e.domain,c),j(p,e.domain,c),H(p,"DOT",u),H(p,eC,f);let m=H(o,eC),g=H(o,"DOT");H(m,eC,m),j(m,e.domain,o),j(g,r,s),j(g,e.domain,o);let y=e2(e1);j(g,e.tld,y),j(g,e.utld,y),j(y,e.domain,o),j(y,r,s),H(y,"DOT",g),H(y,eC,m),H(y,"AT",h);let k=H(y,ek),w=e2(e1);j(k,e.numeric,w);let v=e2(e1),b=e2();j(v,t,v),j(v,n,b),j(b,t,v),j(b,n,b),H(y,eI,v),H(w,eI,v);let x=H(a,ek),C=H(l,ek),S=H(C,eI),M=H(S,eI);j(a,e.domain,o),H(a,"DOT",g),H(a,eC,m),j(l,e.domain,o),H(l,"DOT",g),H(l,eC,m),j(x,e.domain,v),H(x,eI,v),H(x,eT,v),j(M,e.domain,v),j(M,t,v),H(M,eI,v);let A=[[X,G],[Z,Q],[ee,et],[en,er],[ei,es],[eo,ea],[el,eh],[ed,ec]];for(let e=0;e<A.length;e++){let[r,i]=A[e],s=H(v,r);H(b,r,s);let o=e2(e1);j(s,t,o);let a=e2();j(s,n,a),H(s,i,v),j(o,t,o),j(o,n,a),j(a,t,o),j(a,n,a),H(o,i,v),H(a,i,v)}return H(i,V,y),H(i,"NL",e0),{start:i,tokens:eP}}(e5.scanner.tokens);for(let e=0;e<e5.pluginQueue.length;e++)e5.pluginQueue[e][1]({scanner:e5.scanner,parser:e5.parser});e5.initialized=!0}(),function(e,t,n){let r=n.length,i=0,s=[],o=[];for(;i<r;){let a=e,l=null,h=null,d=0,c=null,u=-1;for(;i<r&&!(l=a.go(n[i].t));)o.push(n[i++]);for(;i<r&&(h=l||a.go(n[i].t));)l=null,(a=h).accepts()?(u=0,c=a):u>=0&&u++,i++,d++;if(u<0)(i-=d)<r&&(o.push(n[i]),i++);else{o.length>0&&(s.push(e3(eQ,t,o)),o=[]),i-=u,d-=u;let e=c.t,r=n.slice(i-d,i);s.push(e3(e,t,r))}}return o.length>0&&s.push(e3(eQ,t,o)),s}(e5.parser.start,e,eJ(e5.scanner.start,e))}function e9(e,t=null,n=null){if(t&&"object"==typeof t){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}let r=new eq(n),i=e7(e),s=[];for(let e=0;e<i.length;e++){let n=i[e];n.isLink&&(!t||n.t===t)&&r.check(n)&&s.push(n.toFormattedObject(r))}return s}e7.scan=eJ;
9var e8="[\0- \xa0áá â-\u2029âã]",te=new RegExp(e8),tt=RegExp(`${e8}$`),tn=RegExp(e8,"g"),tr=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|â(.*?)â|â(.*?)â))?\)$/,ti=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|â(.*?)â|â(.*?)â))?\)/g;function ts(e,t){let n=0;for(let r=t-1;r>=0&&"\\"===e[r];r-=1)n+=1;return n%2==1}function to(e,t,n){var r,i;let[,s,o]=t;return!("!"===(t.index?e[t.index-1]:void 0)||ts(e,null!=(r=t.index)?r:0)||function(e,t){let n=0,r=0;for(;r<t;){if("`"!==e[r]||0===n&&ts(e,r)){r+=1;continue}let i=0;for(;r<t&&"`"===e[r];)i+=1,r+=1;0===n?n=i:i===n&&(n=0)}return n>0}(e,null!=(i=t.index)?i:0))&&!!s.trim()&&n(o)}function ta(e){var t,n;let[r,i,s,,o,a,l]=e,h=null!=(t=null!=o?o:a)?t:l;return{index:null!=(n=e.index)?n:0,text:r,replaceWith:i,data:{href:s,title:h||null,markdown:!0}}}function tl(e){var t,n,r;return{href:null==(t=e.data)?void 0:t.href,title:null!=(r=null==(n=e.data)?void 0:n.title)?r:null}}function th(e,t){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(e=>{let t="string"==typeof e?e:e.scheme;t&&n.push(t)}),!e||e.replace(tn,"").match(RegExp(`^(?:(?:${n.map(e=>e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join("|")}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`,"i"))}var td=r.CU.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(e=>{"string"==typeof e?e6(e):e6(e.scheme,e.optionalSlashes)})},onDestroy(){$.groups={},e5.scanner=null,e5.parser=null,e5.tokenQueue=[],e5.pluginQueue=[],e5.customSchemes=[],e5.initialized=!1},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,markdownLinks:!1,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!th(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>{let t=/^[a-z][a-z0-9+.-]*:\/\//i.test(e),n=/^[a-z][a-z0-9+.-]*:/i.test(e);if(t||n&&!e.includes("@"))return!0;let r=(e.includes("@")?e.split("@").pop():e).split(/[/?#:]/)[0];return!/^\d{1,3}(\.\d{1,3}){3}$/.test(r)&&!!/\./.test(r)}}),addAttributes(){var e,t,n;return{href:{default:null,parseHTML:e=>e.getAttribute("href")},target:{default:null!=(e=this.options.HTMLAttributes.target)?e:null},rel:{default:null!=(t=this.options.HTMLAttributes.rel)?t:null},class:{default:null!=(n=this.options.HTMLAttributes.class)?n:null},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{let t=e.getAttribute("href");return!!t&&!!this.options.isAllowedUri(t,{defaultValidate:e=>!!th(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:e=>!!th(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",(0,r.KV)(this.options.HTMLAttributes,e),0]:["a",(0,r.KV)(this.options.HTMLAttributes,{...e,href:""}),0]},markdownTokenName:"link",parseMarkdown:(e,t)=>t.applyMark("link",t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{var n,r,i,s;let o=null!=(r=null==(n=e.attrs)?void 0:n.href)?r:"",a=null!=(s=null==(i=e.attrs)?void 0:i.title)?s:"",l=t.renderChildren(e);return a?`[${l}](${o} "${a}")`:`[${l}](${o})`},addCommands(){return{setLink:e=>({chain:t})=>{let{href:n}=e;return!!this.options.isAllowedUri(n,{defaultValidate:e=>!!th(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&t().setMark(this.name,e).setMeta("preventAutolink",!0).run()},toggleLink:e=>({chain:t})=>{let{href:n}=e||{};return(!n||!!this.options.isAllowedUri(n,{defaultValidate:e=>!!th(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))&&t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addInputRules(){var e;let t;
9return this.options.markdownLinks?[(e={type:this.type,isAllowedHref:e=>this.options.isAllowedUri(e,{defaultValidate:e=>!!th(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})},t=(0,r.OX)({find:t=>{let n=tr.exec(t);return n&&to(t,n,e.isAllowedHref)?ta(n):null},type:e.type,getAttributes:tl}),new r.fV({find:t.find,handler:e=>{let n=t.handler(e);return null!==n&&e.state.tr.steps.length&&e.state.tr.setMeta("preventAutolink",!0),n}}))]:[]},addPasteRules(){let e=e=>{let t=[];if(e){let{protocols:n,defaultProtocol:r}=this.options;e9(e).filter(e=>e.isLink&&this.options.isAllowedUri(e.value,{defaultValidate:e=>!!th(e,n),protocols:n,defaultProtocol:r})).forEach(e=>{this.options.shouldAutoLink(e.value)&&t.push({text:e.value,data:{href:e.href},index:e.start})})}return t};if(this.options.markdownLinks){var t;let n;return[(t={type:this.type,isAllowedHref:e=>this.options.isAllowedUri(e,{defaultValidate:e=>!!th(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}),findPlainUrls:e},n=(0,r.Zc)({find:e=>{var n,r;let i=[];for(let n of e.matchAll(ti))to(e,n,t.isAllowedHref)&&i.push(ta(n));let s=(null!=(r=null==(n=t.findPlainUrls)?void 0:n.call(t,e))?r:[]).filter(e=>!i.some(t=>t.index<e.index+e.text.length&&e.index<t.index+t.text.length));return[...i,...s]},type:t.type,getAttributes:tl}),new r._n({find:n.find,handler:e=>{var t;let r=n.handler(e);return null!==r&&e.state.tr.steps.length&&(null==(t=e.match.data)?void 0:t.markdown)&&e.state.tr.setMeta("preventAutolink",!0),r}}))]}return[(0,r.Zc)({find:e,type:this.type,getAttributes:e=>{var t;return{href:null==(t=e.data)?void 0:t.href}}})]},addProseMirrorPlugins(){var e,t,n;let s=[],{protocols:o,defaultProtocol:a}=this.options;return this.options.autolink&&s.push((e={type:this.type,defaultProtocol:this.options.defaultProtocol,validate:e=>this.options.isAllowedUri(e,{defaultValidate:e=>!!th(e,o),protocols:o,defaultProtocol:a}),shouldAutoLink:this.options.shouldAutoLink},new i.k_({key:new i.hs("autolink"),appendTransaction:(t,n,i)=>{let s=t.some(e=>e.docChanged)&&!n.doc.eq(i.doc),o=t.some(e=>e.getMeta("preventAutolink"));if(!s||o)return;let{tr:a}=i,l=(0,r.T7)(n.doc,[...t]);if((0,r.FF)(l).forEach(({newRange:t})=>{let n,s,o=(0,r.Nx)(i.doc,t,e=>e.isTextblock);if(o.length>1)n=o[0],s=i.doc.textBetween(n.pos,n.pos+n.node.nodeSize,void 0," ");else if(o.length){let e=i.doc.textBetween(t.from,t.to," "," ");if(!tt.test(e))return;n=o[0],s=i.doc.textBetween(n.pos,t.to,void 0," ")}if(n&&s){let t=s.split(te).filter(Boolean);if(t.length<=0)return!1;let o=t[t.length-1],l=n.pos+s.lastIndexOf(o);if(!o)return!1;let h=e7(o).map(t=>t.toObject(e.defaultProtocol));if(!(1===h.length?h[0].isLink:3===h.length&&!!h[1].isLink&&["()","[]"].includes(h[0].value+h[2].value)))return!1;h.filter(e=>e.isLink).map(e=>({...e,from:l+e.start+1,to:l+e.end+1})).filter(e=>!i.schema.marks.code||!i.doc.rangeHasMark(e.from,e.to,i.schema.marks.code)).filter(t=>e.validate(t.value)).filter(t=>e.shouldAutoLink(t.value)).forEach(t=>{(0,r.hO)(t.from,t.to,i.doc).some(t=>t.mark.type===e.type)||a.addMark(t.from,t.to,e.type.create({href:t.href}))})}}),a.steps.length)return a}}))),s.push((t={type:this.type,editor:this.editor,openOnClick:"whenNotEditable"===this.options.openOnClick||this.options.openOnClick,enableClickSelection:this.options.enableClickSelection},new i.k_({key:new i.hs("handleClickLink"),props:{handleClick:(e,n,i)=>{var s,o;if(0!==i.button||!e.editable)return!1;let a=null;if(i.target instanceof HTMLAnchorElement)a=i.target;else{let e=i.target;if(!e)return!1;let n=t.editor.view.dom;(a=e.closest("a"))&&!n.contains(a)&&(a=null)}if(!a)return!1;let l=!1;if(t.enableClickSelection&&(l=t.editor.commands.extendMarkRange(t.type.name)),t.openOnClick){let n=(0,r.gu)(e.state,t.type.name),i=null!=(s=a.href)?s:n.href,h=null!=(o=a.target)?o:n.target;i&&(window.open(i,h),l=!0)}return l}}}))),this.options.linkOnPaste&&s.push((n={editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink},new i.k_({key:new i.hs("handlePasteLink"),props:{handlePaste:(e,t,r)=>{let{shouldAutoLink:i}=n,{state:s}=e,{selection:o}=s,{empty:a}=o;if(a)return!1;let l="";
9r.content.forEach(e=>{l+=e.textContent});let h=e9(l,{defaultProtocol:n.defaultProtocol}).find(e=>e.isLink&&e.value===l);return!!l&&!!h&&(void 0===i||!!i(h.value))&&n.editor.commands.setMark(n.type,{href:h.href})}}}))),s}}),tc=n(66935),tu=Object.defineProperty,tp="textStyle",tf=/^\s*([-+*])\s$/,tm=r.bP.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:e}){return["ul",(0,r.KV)(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>"list"!==e.type||e.ordered?[]:{type:"bulletList",content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n"):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes("listItem",this.editor.getAttributes(tp)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=(0,r.tG)({find:tf,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=(0,r.tG)({find:tf,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(tp),editor:this.editor})),[e]}}),tg=(e,t)=>r.YY.create({name:`${e}BranchingDeleteKeymap`,priority:101,addKeyboardShortcuts(){let n=()=>{let n;return n=this.editor,((e,t,n,r)=>{let i=((e,t,n)=>{let{selection:r}=e;if(!r.empty)return null;let{$from:i}=r;if(!i.parent.isTextblock||i.parentOffset!==i.parent.content.size)return null;let s=-1;for(let e=i.depth;e>0;e-=1)if(i.node(e).type.name===t){s=e;break}if(s<0)return null;let o=i.node(s),a=i.index(s);if(a+1>=o.childCount)return null;let l=o.child(a+1);
9if(!n.includes(l.type.name))return null;let h=e.schema.nodes[t],d=!1;if(l.forEach(e=>{e.type===h&&e.childCount>1&&(d=!0)}),!d)return null;let c=e.doc.resolve(i.after()).nodeAfter;if(!c||!n.includes(c.type.name))return null;let u=[];return(c.forEach(e=>{u.push(e)}),0===u.length)?null:{listItemDepth:s,nestedList:c,nestedListPos:i.after(),insertPos:i.after(s),items:u}})(e,n,r);if(!i)return!1;let{selection:s}=e,{nestedList:o,nestedListPos:a,insertPos:l,items:h}=i,d=e.tr;d.delete(a,a+o.nodeSize);let c=d.mapping.map(l);return d.insert(c,tc.FK.from(h)),d.setSelection(s.map(d.doc,d.mapping)),t&&t(d),!0})(n.state,n.view.dispatch,e,t)};return{Delete:n,"Mod-Delete":n}}}),ty=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],tk="abcdefghijklmnopqrstuvwxyz",tw=String.raw`\d+|[ivxlcdmIVXLCDM]+|${"[a-zA-Z]{1,2}"}`;function tv(e){let t=e,n="";for(let[e,r]of ty)for(;t>=e;)n+=r,t-=e;return n}function tb(e){return tv(e).toUpperCase()}function tx(e){let t=e.toLowerCase(),n=0,r=0;for(;n<t.length;){let e=!1;for(let[i,s]of ty)if(t.startsWith(s,n)){r+=i,n+=s.length,e=!0;break}if(!e)return 0}return r}function tC(e){if(e<=26)return tk[e-1];let t=Math.floor((e-1)/26)-1,n=(e-1)%26;return t<0?tk[n]:tk[t]+tk[n]}function tS(e){if(!(!e||/^\d+$/.test(e))){if(function(e){if(!/^[ivxlcdmIVXLCDM]+$/.test(e))return!1;let t=tx(e);return!(t<=0)&&(e===e.toLowerCase()?tv(t):tb(t))===e}(e))return e===e.toLowerCase()?"i":"I";if(/^[a-z]{1,2}$/.test(e))return"a";if(/^[A-Z]{1,2}$/.test(e))return"A"}}function tM(e){if(/^\d+$/.test(e))return parseInt(e,10);let t=tS(e);if("i"===t||"I"===t)return tx(e);if("a"===t||"A"===t){let t,n=1===(t=e.toLowerCase()).length?t.charCodeAt(0)-97+1:2===t.length?(t.charCodeAt(0)-97+1)*26+(t.charCodeAt(1)-97)+1:0;return n>0?n:1}let n=parseInt(e,10);return Number.isNaN(n)?1:n}var tA=r.bP.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",(0,r.KV)(this.options.HTMLAttributes,e),0]},markdownTokenName:"list_item",parseMarkdown:(e,t)=>{var n,r,i,s;if("list_item"!==e.type)return[];let o=null!=(n=t.parseBlockChildren)?n:t.parseChildren,a=[];if(e.tokens&&e.tokens.length>0){let n;if(n=null==(r=e.tokens)?void 0:r[0],e.text&&(null==(i=e.tokens)?void 0:i.length)===1&&(null==n?void 0:n.type)==="list"&&n.ordered&&n.raw===e.text)return{type:"listItem",content:[{type:"paragraph",content:(s=e.text||"",t.tokenizeInline?t.parseInline(t.tokenizeInline(s)):t.parseInline([{type:"text",raw:s,text:s}]))}]};if(e.tokens.some(e=>"paragraph"===e.type))a=o(e.tokens);else{let n=e.tokens[0];if(n&&"text"===n.type&&n.tokens&&n.tokens.length>0){if(a=[{type:"paragraph",content:t.parseInline(n.tokens)}],e.tokens.length>1){let t=o(e.tokens.slice(1));a.push(...t)}}else a=o(e.tokens)}}return 0===a.length&&(a=[{type:"paragraph",content:[]}]),{type:"listItem",content:a}},renderMarkdown:(e,t,n)=>(0,r.kj)(e,t,e=>{var t,n,r,i;if("bulletList"===e.parentType)return"- ";if("orderedList"===e.parentType){let s=(null==(n=null==(t=e.meta)?void 0:t.parentAttrs)?void 0:n.start)||1;return function(e,t,n=". "){let r=t+1;if(!e||"1"===e)return`${r}${n}`;switch(e){case"a":return`${tC(r)}${n}`;case"A":return`${tC(r).toUpperCase()}${n}`;case"i":return`${tv(r)}${n}`;case"I":return`${tb(r)}${n}`;default:return`${r}${n}`}}(null==(i=null==(r=e.meta)?void 0:r.parentAttrs)?void 0:i.type,s-1+(e.index||0),". ")}return"- "},n),addExtensions(){return[tg(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)}}}),tE={},tT={findListItemPos:()=>tR,getNextListDepth:()=>tL,handleBackspace:()=>tN,handleDelete:()=>tP,hasListBefore:()=>tI,hasListItemAfter:()=>t$,hasListItemBefore:()=>tj,listItemHasSubList:()=>tB,nextListIsDeeper:()=>tD,nextListIsHigher:()=>tz};for(var tO in tT)tu(tE,tO,{get:tT[tO],enumerable:!0});var tR=(e,t)=>{let{$from:n}=t.selection,i=(0,r.Pg)(e,t.schema),s=n.depth,o=n.pos,a=null;for(;s>0&&null===a;)n.node(s).type===i?a=s:(s-=1,o-=1);return null===a?null:{$pos:t.doc.resolve(o),depth:a}},tL=(e,t)=>{let n=tR(e,t);if(!n)return!1;let[,i]=(0,r.fl)(t,e,n.$pos.pos+4);return i},tI=(e,t,n)=>{let{$anchor:r}=e.selection,i=Math.max(0,r.pos-2),s=e.doc.resolve(i).node();return!!s&&!!n.includes(s.type.name)}
9,tN=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!(0,r.rU)(e.state,t)&&tI(e.state,t,n)){let{$anchor:n}=e.state.selection,r=e.state.doc.resolve(n.before()-1),i=[];r.node().descendants((e,n)=>{e.type.name===t&&i.push({node:e,pos:n})});let s=i.at(-1);if(!s)return!1;let o=e.state.doc.resolve(r.start()+s.pos+1);return e.chain().cut({from:n.start()-1,to:n.end()+1},o.end()).joinForward().run()}return!!(0,r.rU)(e.state,t)&&!!(0,r.J_)(e.state)&&e.chain().liftListItem(t).run()},tD=(e,t)=>{let n=tL(e,t),r=tR(e,t);return!!r&&!!n&&n>r.depth},tz=(e,t)=>{let n=tL(e,t),r=tR(e,t);return!!r&&!!n&&n<r.depth},tP=(e,t)=>{if(!(0,r.rU)(e.state,t)||!(0,r.QN)(e.state,t))return!1;let{selection:n}=e.state,{$from:i,$to:s}=n;return!(!n.empty&&i.sameParent(s))&&(tD(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():tz(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward())},t$=(e,t)=>{var n;let{$anchor:r}=t.selection,i=t.doc.resolve(r.pos-r.parentOffset-2);return i.index()!==i.parent.childCount-1&&(null==(n=i.nodeAfter)?void 0:n.type.name)===e},tj=(e,t)=>{var n;let{$anchor:r}=t.selection,i=t.doc.resolve(r.pos-2);return 0!==i.index()&&(null==(n=i.nodeBefore)?void 0:n.type.name)===e},tB=(e,t,n)=>{if(!n)return!1;let i=(0,r.Pg)(e,t.schema),s=!1;return n.descendants(e=>{e.type===i&&(s=!0)}),s},tF=r.YY.create({name:"listKeymap",addOptions:()=>({listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}),addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{void 0!==e.state.schema.nodes[n]&&tP(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{void 0!==e.state.schema.nodes[n]&&tP(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{void 0!==e.state.schema.nodes[n]&&tN(e,n,r)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{void 0!==e.state.schema.nodes[n]&&tN(e,n,r)&&(t=!0)}),t}}}}),tH=RegExp(`^(\\s*)(${tw})([.)])\\s+(.*)$`),tK=/^\s/,t_={heading:/^#{1,6}(?:\s|$)/,bulletItem:/^[-+*]\s+/,codeFence:/^(?:```|~~~)/,thematicBreak:/^(?:(?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})$/},tJ=RegExp(`^(${tw})([.)])\\s+(.+)$`),tU="textStyle",tV=/^(\d+)\.\s$/;function tW(e){let t=e.match(/list-style-type\s*:\s*([^;]+)/i);if(!t)return null;switch(t[1].trim().toLowerCase()){case"upper-roman":return"I";case"lower-roman":return"i";case"upper-alpha":case"upper-latin":return"A";case"lower-alpha":case"lower-latin":return"a";default:return null}}var tq=r.bP.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:null,parseHTML:e=>{let t=e.getAttribute("type");if(t)return t;let n=e.getAttribute("style");if(n){let e=tW(n);if(e)return e}let r=e.querySelector("li");if(r){let e=r.getAttribute("style");if(e){let t=tW(e);if(t)return t}}return null}}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:e}){let{start:t,type:n,...i}=e,s=(0,r.KV)(this.options.HTMLAttributes,i);return 1!==t&&(s.start=t),n&&"1"!==n&&(s.type=n),["ol",s,0]},markdownTokenName:"list",parseMarkdown:(e,t)=>{var n;if("list"!==e.type||!e.ordered)return[];let r=e.start||1,i=e.typeMarker,s=e.items?(n=e.items,n.map(e=>{if("list_item"!==e.type)return t.parseChildren([e])[0];let n=[];return e.tokens&&e.tokens.length>0&&e.tokens.forEach(e=>{if("paragraph"===e.type||"list"===e.type||"blockquote"===e.type||"code"===e.type)n.push(...t.parseChildren([e]));else if("text"===e.type&&e.tokens){let r=t.parseChildren([e]);n.push({type:"paragraph",content:r})}else{let r=t.parseChildren([e]);r.length>0&&n.push(...r)}}),{type:"listItem",content:n}})):[],o={};return(1!==r&&(o.start=r),i&&(o.type=i),Object.keys(o).length>0)?{type:"orderedList",attrs:o,content:s}:{type:"orderedList",content:s}},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n"):"",markdownTokenizer:{name:"orderedList",level:"block",start:()=>
9-1,tokenize:(e,t,n)=>{var r,i;let s=e.split("\n"),[o,a]=function(e){let t=[],n=0,r=0;for(;n<e.length;){let i=e[n],s=i.match(tH);if(!s)break;let[,o,a,l,h]=s,d=o.length,c=parseInt(a,10),u=isNaN(c)?tS(a):void 0,p=isNaN(c)?tM(a):c,f=[h],m=n+1,g=[i],y=!1;for(;m<e.length;){let t=e[m];if(t.match(tH))break;if(""===t.trim())g.push(t),f.push(""),y=!0,m+=1;else if(t.match(tK)){let e=t.length-t.trimStart().length,n=d+a.length+1;g.push(t),f.push(t.slice(Math.min(e,n))),m+=1}else{if(y||function(e){return Object.values(t_).some(t=>t.test(e))}(t))break;g.push(t),f.push(t),m+=1}}t.push({indent:d,number:p,type:u,content:f.join("\n").trim(),contentLines:f,raw:g.join("\n")}),r=m,n=m}return[t,r]}(s);if(0===o.length)return;let l=function e(t,n,r){let i=[],s=0;for(;s<t.length;){let o=t[s];if(o.indent===n){let{paragraphLines:a,blockLines:l}=function(e){let t=[],n=[],r=!1;return e.forEach(e=>{let i;if(r)return void n.push(e);if(""===e.trim()||t.length>0&&(i=e.trimStart(),t_.bulletItem.test(i)||tH.test(i.trimStart())||t_.heading.test(i)||t_.thematicBreak.test(i)&&!i.startsWith("-")||/^>\s?/.test(i)||t_.codeFence.test(i))){r=!0,n.push(e);return}t.push(e)}),{paragraphLines:t,blockLines:n}}(o.contentLines),h=a.join("\n").trim(),d=[];h&&d.push({type:"paragraph",raw:h,tokens:r.inlineTokens(h)});let c=l.join("\n").trim();if(c){let e=r.blockTokens(c);d.push(...e)}let u=s+1,p=[];for(;u<t.length&&t[u].indent>n;)p.push(t[u]),u+=1;if(p.length>0){let t=Math.min(...p.map(e=>e.indent)),n=e(p,t,r);d.push({type:"list",ordered:!0,start:p[0].number,typeMarker:p[0].type,items:n,raw:p.map(e=>e.raw).join("\n")})}i.push({type:"list_item",raw:o.raw,tokens:d}),s=u}else s+=1}return i}(o,o[0].indent,n);if(0!==l.length)return{type:"list",ordered:!0,start:(null==(r=o[0])?void 0:r.number)||1,typeMarker:null==(i=o[0])?void 0:i.type,items:l,raw:s.slice(0,a).join("\n")}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes("listItem",this.editor.getAttributes(tU)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addProseMirrorPlugins:()=>[new i.k_({props:{handlePaste:(e,t)=>
9{var n,r;let i=null==(n=t.clipboardData)?void 0:n.getData("text/html");if(null==i?void 0:i.trim())return!1;let s=null==(r=t.clipboardData)?void 0:r.getData("text/plain");if(!s)return!1;let o=function(e){let t=e.split("\n").filter(e=>e.trim().length>0);if(0===t.length)return null;let n=[];for(let e of t){let t=e.trim().match(tJ);if(!t)return null;n.push({marker:t[1],content:t[3]})}return!function(e){var t;if(0===e.length)return!1;let n=null!=(t=tS(e[0]))?t:"numeric",r=tM(e[0]);if(r<1)return!1;for(let t=0;t<e.length;t++){let i=function(e,t){if("numeric"===e)return String(t);switch(e){case"a":return tC(t);case"A":return tC(t).toUpperCase();case"i":return tv(t);case"I":return tb(t);default:return String(t)}}(n,r+t);if(e[t]!==i)return!1}return!0}(n.map(e=>e.marker))?null:{type:"orderedList",attrs:function(e){let{type:t,start:n}={type:tS(e),start:tM(e)},r={};return t&&(r.type=t),1!==n&&(r.start=n),r}(n[0].marker),content:n.map(e=>({type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:e.content}]}]}))}}(s);if(!o)return!1;try{let t=e.state.schema.nodeFromJSON(o),n=e.state.tr.replaceSelectionWith(t);return e.dispatch(n),!0}catch{return!1}}}})],addInputRules(){let e=(e,t)=>(!t.attrs.type||"1"===t.attrs.type)&&t.childCount+t.attrs.start===+e[1],t=(0,r.tG)({find:tV,type:this.t
9ype,getAttributes:e=>({start:+e[1]}),joinPredicate:e});return(this.options.keepMarks||this.options.keepAttributes)&&(t=(0,r.tG)({find:tV,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(tU)}),joinPredicate:e,editor:this.editor})),[t]}}),tY=/^\s*(\[([( |x])?\])\s$/,tX=r.bP.create({name:"taskItem",addOptions:()=>({nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}),content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes:()=>({checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute("data-checked");return""===t||"true"===t},renderHTML:e=>({"data-checked":e.checked})}}),parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return["li",(0,r.KV)(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode("paragraph",{},t.parseInline(e.tokens))):e.text?n.push(t.createNode("paragraph",{},[t.createNode("text",{text:e.text})])):n.push(t.createNode("paragraph",{},[])),e.nestedTokens&&e.nestedTokens.length>0){let r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode("taskItem",{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>{var n;let i=(null==(n=e.attrs)?void 0:n.checked)?"x":" ",s=`- [${i}] `;return(0,r.kj)(e,t,s)},addExtensions(){return this.options.nested?[tg(this.name,[this.options.taskListTypeName])]:[]},addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:i})=>{let s=document.createElement("li"),o=document.createElement("label"),a=document.createElement("span"),l=document.createElement("input"),h=document.createElement("div"),d=e=>{var t,n;l.ariaLabel=(null==(n=null==(t=this.options.a11y)?void 0:t.checkboxLabel)?void 0:n.call(t,e,l.checked))||`Task item checkbox for ${e.textContent||"empty task item"}`};d(e),o.contentEditable="false",l.type="checkbox",l.addEventListener("mousedown",e=>e.preventDefault()),l.addEventListener("change",t=>{if(!i.isEditable&&!this.options.onReadOnlyChecked){l.checked=!l.checked;return}let{checked:r}=t.target;i.isEditable&&"function"==typeof n&&i.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:e})=>{let t=n();if("number"!=typeof t)return!1;let i=e.doc.nodeAt(t);return e.setNodeMarkup(t,void 0,{...null==i?void 0:i.attrs,checked:r}),!0}).run(),i.isEditable||!this.options.onReadOnlyChecked||this.options.onReadOnlyChecked(e,r)||(l.checked=!l.checked)}),Object.entries(this.options.HTMLAttributes).forEach(([e,t])=>{s.setAttribute(e,t)}),s.dataset.checked=e.attrs.checked,l.checked=e.attrs.checked,o.append(l,a),s.append(o,h),Object.entries(t).forEach(([e,t])=>{s.setAttribute(e,t)});let c=new Set(Object.keys(t));return{dom:s,contentDOM:h,update:e=>{if(e.type!==this.type)return!1;s.dataset.checked=e.attrs.checked,l.checked=e.attrs.checked,d(e);let t=i.extensionManager.attributes,n=(0,r.zU)(e,t),o=new Set(Object.keys(n)),a=this.options.HTMLAttributes;return c.forEach(e=>{o.has(e)||(e in a?s.setAttribute(e,a[e]):s.removeAttribute(e))}),Object.entries(n).forEach(([e,t])=>{null==t?e in a?s.setAttribute(e,a[e]):s.removeAttribute(e):s.setAttribute(e,t)}),c=o,!0}}}},addInputRules(){return[(0,r.tG)({find:tY,type:this.type,getAttributes:e=>({checked:"x"===e[e.length-1]})})]}}),tG=r.bP.create({name:"taskList",addOptions:()=>({itemTypeName:"taskItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",(0,r.KV)(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode("taskList",{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n"):"",markdownTokenizer:{name:"taskList",level:"block",start(e){var t;let n=null==(t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))?void 0:t.index;return void 0!==n?n:-1},tokenize(e,t,n){let i=e=>{let t=(0,r.Dd)(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:"x"===e[3].toLowerCase()}),createToken:(e,t)=>({type:"taskItem",raw:"",mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:i},n);if(t){let r={type:"taskList",raw:t.raw,items:t.items},i=e.slice(t.raw.length);return i.trim()?[r,...n.blockTokens(i)]:[r]}return n.blockTokens(e)},s=(0,r.Dd)(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:"x"===e[3].toLowerCase()}),createToken:(e,t)=>({type:"taskItem",raw:"",mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:i},n);if(s)return{type:"taskList",raw:s.raw,items:s.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}}
9,addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});r.YY.create({name:"listKit",addExtensions(){let e=[];return!1!==this.options.bulletList&&e.push(tm.configure(this.options.bulletList)),!1!==this.options.listItem&&e.push(tA.configure(this.options.listItem)),!1!==this.options.listKeymap&&e.push(tF.configure(this.options.listKeymap)),!1!==this.options.orderedList&&e.push(tq.configure(this.options.orderedList)),!1!==this.options.taskItem&&e.push(tX.configure(this.options.taskItem)),!1!==this.options.taskList&&e.push(tG.configure(this.options.taskList)),e}});var tZ=" ",tQ=r.bP.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",(0,r.KV)(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];if(1===n.length&&"image"===n[0].type)return t.parseChildren([n[0]]);let r=t.parseInline(n);return 1===n.length&&"text"===n[0].type&&(n[0].raw===tZ||n[0].text===tZ||"\xa0"===n[0].raw||"\xa0"===n[0].text)&&1===r.length&&"text"===r[0].type&&(r[0].text===tZ||"\xa0"===r[0].text)?t.createNode("paragraph",void 0,[]):t.createNode("paragraph",void 0,r)},renderMarkdown:(e,t,n)=>{var r,i;if(!e)return"";let s=Array.isArray(e.content)?e.content:[];if(0===s.length){let e=Array.isArray(null==(r=null==n?void 0:n.previousNode)?void 0:r.content)?n.previousNode.content:[];return(null==(i=null==n?void 0:n.previousNode)?void 0:i.type)==="paragraph"&&0===e.length?tZ:""}return t.renderChildren(s)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),t0=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,t1=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,t2=r.CU.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("line-through")&&{}}],renderHTML({HTMLAttributes:e}){return["s",(0,r.KV)(this.options.HTMLAttributes,e),0]},markdownTokenName:"del",parseMarkdown:(e,t)=>t.applyMark("strike",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}}
9,addInputRules(){return[(0,r.OX)({find:t0,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:t1,type:this.type})]}}),t3=r.bP.create({name:"text",group:"inline",parseMarkdown:e=>({type:"text",text:e.text||""}),renderMarkdown:e=>e.text||""}),t4=r.CU.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("underline")&&{}}],renderHTML({HTMLAttributes:e}){return["u",(0,r.KV)(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||"underline",t.parseInline(e.tokens||[]))},renderMarkdown:(e,t)=>`++${t.renderChildren(e)}++`,markdownTokenizer:{name:"underline",level:"inline",start:e=>e.indexOf("++"),tokenize(e,t,n){let r=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!r)return;let i=r[2].trim();return{type:"underline",raw:r[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),t5=n(79746),t6=r.YY.create({name:"starterKit",addExtensions(){var e,t,n,r;let i=[];return!1!==this.options.bold&&i.push(u.configure(this.options.bold)),!1!==this.options.blockquote&&i.push(a.configure(this.options.blockquote)),!1!==this.options.bulletList&&i.push(tm.configure(this.options.bulletList)),!1!==this.options.code&&i.push(m.configure(this.options.code)),!1!==this.options.codeBlock&&i.push(k.configure(this.options.codeBlock)),!1!==this.options.document&&i.push(w.configure(this.options.document)),!1!==this.options.dropcursor&&i.push(t5.QO.configure(this.options.dropcursor)),!1!==this.options.gapcursor&&i.push(t5.vR.configure(this.options.gapcursor)),!1!==this.options.hardBreak&&i.push(v.configure(this.options.hardBreak)),!1!==this.options.heading&&i.push(b.configure(this.options.heading)),!1!==this.options.undoRedo&&i.push(t5.lb.configure(this.options.undoRedo)),!1!==this.options.horizontalRule&&i.push(x.configure(this.options.horizontalRule)),!1!==this.options.italic&&i.push(E.configure(this.options.italic)),!1!==this.options.listItem&&i.push(tA.configure(this.options.listItem)),!1!==this.options.listKeymap&&i.push(tF.configure(null==(e=this.options)?void 0:e.listKeymap)),!1!==this.options.link&&i.push(td.configure(null==(t=this.options)?void 0:t.link)),!1!==this.options.orderedList&&i.push(tq.configure(this.options.orderedList)),!1!==this.options.paragraph&&i.push(tQ.configure(this.options.paragraph)),!1!==this.options.strike&&i.push(t2.configure(this.options.strike)),!1!==this.options.text&&i.push(t3.configure(this.options.text)),!1!==this.options.underline&&i.push(t4.configure(null==(n=this.options)?void 0:n.underline)),!1!==this.options.trailingNode&&i.push(t5.JU.configure(null==(r=this.options)?void 0:r.trailingNode)),i}})},86609:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(61133).A)("refresh-ccw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]])},88030:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(61133).A)("music-2",[["circle",{cx:"8",cy:"18",r:"4",key:"1fc0mg"}],["path",{d:"M12 18V2l7 4",key:"g04rme"}]])},96127:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(61133).A)("library",[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]])},98187:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(61133).A)("video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]])},99988:(e,t,n)=>{n.d(t,{C1:()=>M,bL:()=>S});var r=n(2193),i=n(90376),s=n(54362),o=n(72642),a=n(77886),l=n(90880),h=n(76144),d=n(34438),c=n(37418),u=n(47477),p="Checkbox",[f,m]=(0,s.A)(p),[g,y]=f(p),k=r.forwardRef((e,t)=>
9{let{__scopeCheckbox:n,name:s,checked:l,defaultChecked:h,required:d,disabled:p,value:f="on",onCheckedChange:m,...y}=e,[k,w]=r.useState(null),v=(0,i.s)(t,e=>w(e)),S=r.useRef(!1),M=!k||!!k.closest("form"),[A=!1,E]=(0,a.i)({prop:l,defaultProp:h,onChange:m}),T=r.useRef(A);return r.useEffect(()=>{let e=k?.form;if(e){let t=()=>E(T.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[k,E]),(0,u.jsxs)(g,{scope:n,state:A,disabled:p,children:[(0,u.jsx)(c.sG.button,{type:"button",role:"checkbox","aria-checked":x(A)?"mixed":A,"aria-required":d,"data-state":C(A),"data-disabled":p?"":void 0,disabled:p,value:f,...y,ref:v,onKeyDown:(0,o.m)(e.onKeyDown,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:(0,o.m)(e.onClick,e=>{E(e=>!!x(e)||!e),M&&(S.current=e.isPropagationStopped(),S.current||e.stopPropagation())})}),M&&(0,u.jsx)(b,{control:k,bubbles:!S.current,name:s,value:f,checked:A,required:d,disabled:p,style:{transform:"translateX(-100%)"}})]})});k.displayName=p;var w="CheckboxIndicator",v=r.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:r,...i}=e,s=y(w,n);return(0,u.jsx)(d.C,{present:r||x(s.state)||!0===s.state,children:(0,u.jsx)(c.sG.span,{"data-state":C(s.state),"data-disabled":s.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});v.displayName=w;var b=e=>{let{control:t,checked:n,bubbles:i=!0,...s}=e,o=r.useRef(null),a=(0,l.Z)(n),d=(0,h.X)(t);return r.useEffect(()=>{let e=o.current,t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(a!==n&&t){let r=new Event("click",{bubbles:i});e.indeterminate=x(n),t.call(e,!x(n)&&n),e.dispatchEvent(r)}},[a,n,i]),(0,u.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:!x(n)&&n,...s,tabIndex:-1,ref:o,style:{...e.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function x(e){return"indeterminate"===e}function C(e){return x(e)?"indeterminate":e?"checked":"unchecked"}var S=k,M=v}}]);
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.