/*! For license information please see 9539.763162dc.js.LICENSE.txt */ (self.webpackChunksubstack=self.webpackChunksubstack||[]).push([["9539"],{42617:function(e,t,n){"use strict";n.d(t,{LE:()=>s,Mv:()=>o,qg:()=>a});var i=n(98661);let r={display:"none"};function o(e){let{id:t,value:n}=e;return i.default.createElement("div",{id:t,style:r},n)}function s(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;return i.default.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0},n)}function a(){let[e,t]=(0,i.useState)("");return{announce:(0,i.useCallback)(e=>{null!=e&&t(e)},[]),announcement:e}}},96333:function(e,t,n){"use strict";function i(e){return e?(e.nodeName||"").toLowerCase():null}n.d(t,{Z:()=>i})},62057:function(e,t,n){"use strict";function i(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}n.d(t,{Z:()=>i})},62556:function(e,t,n){"use strict";n.d(t,{Re:()=>o,Zq:()=>s,kK:()=>r});var i=n(62057);function r(e){var t=(0,i.Z)(e).Element;return e instanceof t||e instanceof Element}function o(e){var t=(0,i.Z)(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function s(e){if("undefined"==typeof ShadowRoot)return!1;var t=(0,i.Z)(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}},17824:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var i=n(96333),r=n(62556);let o={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},s=t.elements[e];(0,r.Re)(s)&&(0,i.Z)(s)&&(Object.assign(s.style,n),Object.keys(o).forEach(function(e){var t=o[e];!1===t?s.removeAttribute(e):s.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var o=t.elements[e],s=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});(0,r.Re)(o)&&(0,i.Z)(o)&&(Object.assign(o.style,a),Object.keys(s).forEach(function(e){o.removeAttribute(e)}))})}},requires:["computeStyles"]}},14626:function(e,t,n){"use strict";n.d(t,{fi:()=>el});var i,r,o,s,a,l=n(62556),c=Math.max,d=Math.min,h=Math.round,u=n(62057);function p(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function f(){return!/^((?!chrome|android).)*safari/i.test(p())}function m(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var i=e.getBoundingClientRect(),r=1,o=1;t&&(0,l.Re)(e)&&(r=e.offsetWidth>0&&h(i.width)/e.offsetWidth||1,o=e.offsetHeight>0&&h(i.height)/e.offsetHeight||1);var s=((0,l.kK)(e)?(0,u.Z)(e):window).visualViewport,a=!f()&&n,c=(i.left+(a&&s?s.offsetLeft:0))/r,d=(i.top+(a&&s?s.offsetTop:0))/o,p=i.width/r,m=i.height/o;return{width:p,height:m,top:d,right:c+p,bottom:d+m,left:c,x:c,y:d}}function g(e){var t=(0,u.Z)(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}var y=n(96333);function v(e){return(((0,l.kK)(e)?e.ownerDocument:e.document)||window.document).documentElement}function b(e){return m(v(e)).left+g(e).scrollLeft}function w(e){return(0,u.Z)(e).getComputedStyle(e)}function x(e){var t=w(e),n=t.overflow,i=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+i)}function k(e){var t=m(e),n=e.offsetWidth,i=e.offsetHeight;return 1>=Math.abs(t.width-n)&&(n=t.width),1>=Math.abs(t.height-i)&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function S(e){return"html"===(0,y.Z)(e)?e:e.assignedSlot||e.parentNode||((0,l.Zq)(e)?e.host:null)||v(e)}function O(e,t){void 0===t&&(t=[]);var n,i=function e(t){return["html","body","#document"].indexOf((0,y.Z)(t))>=0?t.ownerDocument.body:(0,l.Re)(t)&&x(t)?t:e(S(t))}(e),r=i===(null==(n=e.ownerDocument)?void 0:n.body),o=(0,u.Z)(i),s=r?[o].concat(o.visualViewport||[],x(i)?i:[]):i,a=t.concat(s);return r?a:a.concat(O(S(s)))}function M(e){return(0,l.Re)(e)&&"fixed"!==w(e).position?e.offsetParent:null}function C(e){for(var t,n=(0,u.Z)(e),i=M(e);i&&(t=i,["table","td","th"].indexOf((0,y.Z)(t))>=0)&&"static"===w(i).position;)i=M(i);return i&&("html"===(0,y.Z)(i)||"body"===(0,y.Z)(i)&&"static"===w(i).position)?n:i||function(e){var t=/firefox/i.test(p());if(/Trident/i.test(p())&&(0,l.Re)(e)&&"fixed"===w(e).position)return null;var n=S(e);for((0,l.Zq)(n)&&(n=n.host);(0,l.Re)(n)&&0>["html","body"].indexOf((0,y.Z)(n));){var i=w(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(e)||n}var T="bottom",E="right",N="left",D="auto",A=["top",T,E,N],P="start",R="viewport",L="popper",B=A.reduce(function(e,t){return e.concat([t+"-"+P,t+"-end"])},[]),I=[].concat(A,[D]).reduce(function(e,t){return e.concat([t,t+"-"+P,t+"-end"])},[]),z=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"],$={placement:"bottom",modifiers:[],strategy:"absolute"};function j(){for(var e=arguments.length,t=Array(e),n=0;n=0?"x":"y"}function K(e){var t,n=e.reference,i=e.element,r=e.placement,o=r?V(r):null,s=r?q(r):null,a=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2;switch(o){case"top":t={x:a,y:n.y-i.height};break;case T:t={x:a,y:n.y+n.height};break;case E:t={x:n.x+n.width,y:l};break;case N:t={x:n.x-i.width,y:l};break;default:t={x:n.x,y:n.y}}var c=o?F(o):null;if(null!=c){var d="y"===c?"height":"width";switch(s){case P:t[c]=t[c]-(n[d]/2-i[d]/2);break;case"end":t[c]=t[c]+(n[d]/2-i[d]/2)}}return t}var W={top:"auto",right:"auto",bottom:"auto",left:"auto"};function _(e){var t,n,i,r,o,s,a,l=e.popper,c=e.popperRect,d=e.placement,p=e.variation,f=e.offsets,m=e.position,g=e.gpuAcceleration,y=e.adaptive,b=e.roundOffsets,x=e.isFixed,k=f.x,S=void 0===k?0:k,O=f.y,M=void 0===O?0:O,D="function"==typeof b?b({x:S,y:M}):{x:S,y:M};S=D.x,M=D.y;var A=f.hasOwnProperty("x"),P=f.hasOwnProperty("y"),R=N,L="top",B=window;if(y){var I=C(l),z="clientHeight",$="clientWidth";I===(0,u.Z)(l)&&"static"!==w(I=v(l)).position&&"absolute"===m&&(z="scrollHeight",$="scrollWidth"),("top"===d||(d===N||d===E)&&"end"===p)&&(L=T,M-=(x&&I===B&&B.visualViewport?B.visualViewport.height:I[z])-c.height,M*=g?1:-1),(d===N||("top"===d||d===T)&&"end"===p)&&(R=E,S-=(x&&I===B&&B.visualViewport?B.visualViewport.width:I[$])-c.width,S*=g?1:-1)}var j=Object.assign({position:m},y&&W),H=!0===b?(t={x:S,y:M},n=(0,u.Z)(l),i=t.x,r=t.y,{x:h(i*(o=n.devicePixelRatio||1))/o||0,y:h(r*o)/o||0}):{x:S,y:M};return(S=H.x,M=H.y,g)?Object.assign({},j,((a={})[L]=P?"0":"",a[R]=A?"0":"",a.transform=1>=(B.devicePixelRatio||1)?"translate("+S+"px, "+M+"px)":"translate3d("+S+"px, "+M+"px, 0)",a)):Object.assign({},j,((s={})[L]=P?M+"px":"",s[R]=A?S+"px":"",s.transform="",s))}var U=n(17824),J={left:"right",right:"left",bottom:"top",top:"bottom"};function Z(e){return e.replace(/left|right|bottom|top/g,function(e){return J[e]})}var Y={start:"end",end:"start"};function G(e){return e.replace(/start|end/g,function(e){return Y[e]})}function Q(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&(0,l.Zq)(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function X(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ee(e,t,n){var i,r,o,s,a,d,h,p,y,x;return t===R?X(function(e,t){var n=(0,u.Z)(e),i=v(e),r=n.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;var c=f();(c||!c&&"fixed"===t)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:s,x:a+b(e),y:l}}(e,n)):(0,l.kK)(t)?((i=m(t,!1,"fixed"===n)).top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i):X((r=v(e),s=v(r),a=g(r),d=null==(o=r.ownerDocument)?void 0:o.body,h=c(s.scrollWidth,s.clientWidth,d?d.scrollWidth:0,d?d.clientWidth:0),p=c(s.scrollHeight,s.clientHeight,d?d.scrollHeight:0,d?d.clientHeight:0),y=-a.scrollLeft+b(r),x=-a.scrollTop,"rtl"===w(d||s).direction&&(y+=c(s.clientWidth,d?d.clientWidth:0)-h),{width:h,height:p,x:y,y:x}))}function et(){return{top:0,right:0,bottom:0,left:0}}function en(e){return Object.assign({},et(),e)}function ei(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}function er(e,t){void 0===t&&(t={});var n,i,r,o,s,a,h,u,p=t,f=p.placement,g=void 0===f?e.placement:f,b=p.strategy,x=void 0===b?e.strategy:b,k=p.boundary,M=p.rootBoundary,N=p.elementContext,D=void 0===N?L:N,P=p.altBoundary,B=p.padding,I=void 0===B?0:B,z=en("number"!=typeof I?I:ei(I,A)),$=e.rects.popper,j=e.elements[void 0!==P&&P?D===L?"reference":L:D],H=(n=(0,l.kK)(j)?j:j.contextElement||v(e.elements.popper),i=void 0===k?"clippingParents":k,r=void 0===M?R:M,h=(a=[].concat("clippingParents"===i?(o=O(S(n)),s=["absolute","fixed"].indexOf(w(n).position)>=0&&(0,l.Re)(n)?C(n):n,(0,l.kK)(s)?o.filter(function(e){return(0,l.kK)(e)&&Q(e,s)&&"body"!==(0,y.Z)(e)}):[]):[].concat(i),[r]))[0],(u=a.reduce(function(e,t){var i=ee(n,t,x);return e.top=c(i.top,e.top),e.right=d(i.right,e.right),e.bottom=d(i.bottom,e.bottom),e.left=c(i.left,e.left),e},ee(n,h,x))).width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u),V=m(e.elements.reference),q=K({reference:V,element:$,strategy:"absolute",placement:g}),F=X(Object.assign({},$,q)),W=D===L?F:V,_={top:H.top-W.top+z.top,bottom:W.bottom-H.bottom+z.bottom,left:H.left-W.left+z.left,right:W.right-H.right+z.right},U=e.modifiersData.offset;if(D===L&&U){var J=U[g];Object.keys(_).forEach(function(e){var t=[E,T].indexOf(e)>=0?1:-1,n=["top",T].indexOf(e)>=0?"y":"x";_[e]+=J[n]*t})}return _}function eo(e,t,n){return c(e,d(t,n))}function es(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ea(e){return["top",E,T,N].some(function(t){return e[t]>=0})}var el=(o=void 0===(r=(i={defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,i=e.options,r=i.scroll,o=void 0===r||r,s=i.resize,a=void 0===s||s,l=(0,u.Z)(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(e){e.addEventListener("scroll",n.update,H)}),a&&l.addEventListener("resize",n.update,H),function(){o&&c.forEach(function(e){e.removeEventListener("scroll",n.update,H)}),a&&l.removeEventListener("resize",n.update,H)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=K({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,i=n.gpuAcceleration,r=n.adaptive,o=n.roundOffsets,s=void 0===o||o,a={placement:V(t.placement),variation:q(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:void 0===i||i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,_(Object.assign({},a,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:void 0===r||r,roundOffsets:s})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,_(Object.assign({},a,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},U.Z,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,i=e.name,r=n.offset,o=void 0===r?[0,0]:r,s=I.reduce(function(e,n){var i,r,s,a,l,c;return e[n]=(i=t.rects,s=[N,"top"].indexOf(r=V(n))>=0?-1:1,l=(a="function"==typeof o?o(Object.assign({},i,{placement:n})):o)[0],c=a[1],l=l||0,c=(c||0)*s,[N,E].indexOf(r)>=0?{x:c,y:l}:{x:l,y:c}),e},{}),a=s[t.placement],l=a.x,c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[i]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var r=n.mainAxis,o=void 0===r||r,s=n.altAxis,a=void 0===s||s,l=n.fallbackPlacements,c=n.padding,d=n.boundary,h=n.rootBoundary,u=n.altBoundary,p=n.flipVariations,f=void 0===p||p,m=n.allowedAutoPlacements,g=t.options.placement,y=V(g)===g,v=l||(y||!f?[Z(g)]:function(e){if(V(e)===D)return[];var t=Z(e);return[G(e),t,G(t)]}(g)),b=[g].concat(v).reduce(function(e,n){var i,r,o,s,a,l,u,p,g,y,v,b;return e.concat(V(n)===D?(r=(i={placement:n,boundary:d,rootBoundary:h,padding:c,flipVariations:f,allowedAutoPlacements:m}).placement,o=i.boundary,s=i.rootBoundary,a=i.padding,l=i.flipVariations,p=void 0===(u=i.allowedAutoPlacements)?I:u,0===(v=(y=(g=q(r))?l?B:B.filter(function(e){return q(e)===g}):A).filter(function(e){return p.indexOf(e)>=0})).length&&(v=y),Object.keys(b=v.reduce(function(e,n){return e[n]=er(t,{placement:n,boundary:o,rootBoundary:s,padding:a})[V(n)],e},{})).sort(function(e,t){return b[e]-b[t]})):n)},[]),w=t.rects.reference,x=t.rects.popper,k=new Map,S=!0,O=b[0],M=0;M=0,$=z?"width":"height",j=er(t,{placement:C,boundary:d,rootBoundary:h,altBoundary:u,padding:c}),H=z?L?E:N:L?T:"top";w[$]>x[$]&&(H=Z(H));var F=Z(H),K=[];if(o&&K.push(j[R]<=0),a&&K.push(j[H]<=0,j[F]<=0),K.every(function(e){return e})){O=C,S=!1;break}k.set(C,K)}if(S)for(var W=f?3:1,_=function(e){var t=b.find(function(t){var n=k.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return O=t,"break"},U=W;U>0&&"break"!==_(U);U--);t.placement!==O&&(t.modifiersData[i]._skip=!0,t.placement=O,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,i=e.name,r=n.mainAxis,o=n.altAxis,s=n.boundary,a=n.rootBoundary,l=n.altBoundary,h=n.padding,u=n.tether,p=void 0===u||u,f=n.tetherOffset,m=void 0===f?0:f,g=er(t,{boundary:s,rootBoundary:a,padding:h,altBoundary:l}),y=V(t.placement),v=q(t.placement),b=!v,w=F(y),x="x"===w?"y":"x",S=t.modifiersData.popperOffsets,O=t.rects.reference,M=t.rects.popper,D="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,A="number"==typeof D?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),R=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,L={x:0,y:0};if(S){if(void 0===r||r){var B,I="y"===w?"top":N,z="y"===w?T:E,$="y"===w?"height":"width",j=S[w],H=j+g[I],K=j-g[z],W=p?-M[$]/2:0,_=v===P?O[$]:M[$],U=v===P?-M[$]:-O[$],J=t.elements.arrow,Z=p&&J?k(J):{width:0,height:0},Y=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:et(),G=Y[I],Q=Y[z],X=eo(0,O[$],Z[$]),ee=b?O[$]/2-W-X-G-A.mainAxis:_-X-G-A.mainAxis,en=b?-O[$]/2+W+X+Q+A.mainAxis:U+X+Q+A.mainAxis,ei=t.elements.arrow&&C(t.elements.arrow),es=ei?"y"===w?ei.clientTop||0:ei.clientLeft||0:0,ea=null!=(B=null==R?void 0:R[w])?B:0,el=eo(p?d(H,j+ee-ea-es):H,j,p?c(K,j+en-ea):K);S[w]=el,L[w]=el-j}if(void 0!==o&&o){var ec,ed,eh="x"===w?"top":N,eu="x"===w?T:E,ep=S[x],ef="y"===x?"height":"width",em=ep+g[eh],eg=ep-g[eu],ey=-1!==["top",N].indexOf(y),ev=null!=(ed=null==R?void 0:R[x])?ed:0,eb=ey?em:ep-O[ef]-M[ef]-ev+A.altAxis,ew=ey?ep+O[ef]+M[ef]-ev-A.altAxis:eg,ex=p&&ey?(ec=eo(eb,ep,ew))>ew?ew:ec:eo(p?eb:em,ep,p?ew:eg);S[x]=ex,L[x]=ex-ep}t.modifiersData[i]=L}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n,i=e.state,r=e.name,o=e.options,s=i.elements.arrow,a=i.modifiersData.popperOffsets,l=V(i.placement),c=F(l),d=[N,E].indexOf(l)>=0?"height":"width";if(s&&a){var h=en("number"!=typeof(t="function"==typeof(t=o.padding)?t(Object.assign({},i.rects,{placement:i.placement})):t)?t:ei(t,A)),u=k(s),p="y"===c?"top":N,f="y"===c?T:E,m=i.rects.reference[d]+i.rects.reference[c]-a[c]-i.rects.popper[d],g=a[c]-i.rects.reference[c],y=C(s),v=y?"y"===c?y.clientHeight||0:y.clientWidth||0:0,b=h[p],w=v-u[d]-h[f],x=v/2-u[d]/2+(m/2-g/2),S=eo(b,x,w);i.modifiersData[r]=((n={})[c]=S,n.centerOffset=S-x,n)}},effect:function(e){var t=e.state,n=e.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=t.elements.popper.querySelector(i)))&&Q(t.elements.popper,i)&&(t.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,i=t.rects.reference,r=t.rects.popper,o=t.modifiersData.preventOverflow,s=er(t,{elementContext:"reference"}),a=er(t,{altBoundary:!0}),l=es(s,i),c=es(a,r,o),d=ea(l),h=ea(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":h})}}]}).defaultModifiers)?[]:r,a=void 0===(s=i.defaultOptions)?$:s,function(e,t,n){void 0===n&&(n=a);var i,r,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},$,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],d=!1,p={state:s,setOptions:function(n){var i,r,d,h,u,m,g="function"==typeof n?n(s.options):n;f(),s.options=Object.assign({},a,s.options,g),s.scrollParents={reference:(0,l.kK)(e)?O(e):e.contextElement?O(e.contextElement):[],popper:O(t)};var y=(r=Object.keys(i=[].concat(o,s.options.modifiers).reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{})).map(function(e){return i[e]}),d=new Map,h=new Set,u=[],r.forEach(function(e){d.set(e.name,e)}),r.forEach(function(e){h.has(e.name)||function e(t){h.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!h.has(t)){var n=d.get(t);n&&e(n)}}),u.push(t)}(e)}),m=u,z.reduce(function(e,t){return e.concat(m.filter(function(e){return e.phase===t}))},[]));return s.orderedModifiers=y.filter(function(e){return e.enabled}),s.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,i=e.effect;if("function"==typeof i){var r=i({state:s,name:t,instance:p,options:void 0===n?{}:n});c.push(r||function(){})}}),p.update()},forceUpdate:function(){if(!d){var e,t,n,i,r,o,a,c,f,w,S,O=s.elements,M=O.reference,T=O.popper;if(j(M,T)){s.rects={reference:(e=C(T),t="fixed"===s.options.strategy,n=(0,l.Re)(e),a=(0,l.Re)(e)&&(r=h((i=e.getBoundingClientRect()).width)/e.offsetWidth||1,o=h(i.height)/e.offsetHeight||1,1!==r||1!==o),c=v(e),f=m(M,a,t),w={scrollLeft:0,scrollTop:0},S={x:0,y:0},(n||!n&&!t)&&(("body"!==(0,y.Z)(e)||x(c))&&(w=function(e){return e!==(0,u.Z)(e)&&(0,l.Re)(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:g(e)}(e)),(0,l.Re)(e)?(S=m(e,!0),S.x+=e.clientLeft,S.y+=e.clientTop):c&&(S.x=b(c))),{x:f.left+w.scrollLeft-S.x,y:f.top+w.scrollTop-S.y,width:f.width,height:f.height}),popper:k(T)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach(function(e){return s.modifiersData[e.name]=Object.assign({},e.data)});for(var E=0;Ei});let i=(0,n(36150).Z)("Captions",[["rect",{width:"18",height:"14",x:"3",y:"5",rx:"2",ry:"2",key:"12ruh7"}],["path",{d:"M7 15h4M15 15h2M7 11h2M13 11h4",key:"1ueiar"}]])},65445:function(e,t,n){"use strict";n.d(t,{Z:()=>i});let i=(0,n(36150).Z)("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]])},53716:function(e,t,n){"use strict";n.d(t,{Z:()=>i});let i=(0,n(36150).Z)("Repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]])},5281:function(e,t,n){"use strict";n.d(t,{Z:()=>i});let i=(0,n(36150).Z)("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]])},74945:function(e,t,n){"use strict";n.d(t,{Z:()=>i});let i=(0,n(36150).Z)("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]])},98961:function(e,t,n){"use strict";n.d(t,{Z:()=>i});let i=(0,n(36150).Z)("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"}]])},45088:function(e,t,n){"use strict";n.d(t,{ZP:()=>F});var i=n(14626),r=n(17824),o="tippy-content",s="tippy-arrow",a="tippy-svg-arrow",l={passive:!0,capture:!0},c=function(){return document.body};function d(e,t,n){if(Array.isArray(e)){var i=e[t];return null==i?Array.isArray(n)?n[t]:n:i}return e}function h(e,t){var n=({}).toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function u(e,t){return"function"==typeof e?e.apply(void 0,t):e}function p(e,t){var n;return 0===t?e:function(i){clearTimeout(n),n=setTimeout(function(){e(i)},t)}}function f(e){return[].concat(e)}function m(e,t){-1===e.indexOf(t)&&e.push(t)}function g(e){return[].slice.call(e)}function y(e){return Object.keys(e).reduce(function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t},{})}function v(){return document.createElement("div")}function b(e){return["Element","Fragment"].some(function(t){return h(e,t)})}function w(e,t){e.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function x(e,t){e.forEach(function(e){e&&e.setAttribute("data-state",t)})}function k(e,t,n){var i=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(t){e[i](t,n)})}function S(e,t){for(var n,i=t;i;){if(e.contains(i))return!0;i=null==i.getRootNode?void 0:null==(n=i.getRootNode())?void 0:n.host}return!1}var O={isTouch:!1},M=0;function C(){!O.isTouch&&(O.isTouch=!0,window.performance&&document.addEventListener("mousemove",T))}function T(){var e=performance.now();e-M<20&&(O.isTouch=!1,document.removeEventListener("mousemove",T)),M=e}function E(){var e=document.activeElement;if(e&&e._tippy&&e._tippy.reference===e){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var N="undefined"!=typeof window&&"undefined"!=typeof document&&!!window.msCrypto,D=Object.assign({appendTo:c,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),A=Object.keys(D);function P(e){var t=(e.plugins||[]).reduce(function(t,n){var i,r=n.name,o=n.defaultValue;return r&&(t[r]=void 0!==e[r]?e[r]:null!=(i=D[r])?i:o),t},{});return Object.assign({},e,t)}function R(e,t){var n,i=Object.assign({},t,{content:u(t.content,[e])},t.ignoreAttributes?{}:((n=t.plugins)?Object.keys(P(Object.assign({},D,{plugins:n}))):A).reduce(function(t,n){var i=(e.getAttribute("data-tippy-"+n)||"").trim();if(!i)return t;if("content"===n)t[n]=i;else try{t[n]=JSON.parse(i)}catch(e){t[n]=i}return t},{}));return i.aria=Object.assign({},D.aria,i.aria),i.aria={expanded:"auto"===i.aria.expanded?t.interactive:i.aria.expanded,content:"auto"===i.aria.content?t.interactive?null:"describedby":i.aria.content},i}function L(e,t){e.innerHTML=t}function B(e){var t=v();return!0===e?t.className=s:(t.className=a,b(e)?t.appendChild(e):L(t,e)),t}function I(e,t){b(t.content)?(L(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?L(e,t.content):e.textContent=t.content)}function z(e){var t=e.firstElementChild,n=g(t.children);return{box:t,content:n.find(function(e){return e.classList.contains(o)}),arrow:n.find(function(e){return e.classList.contains(s)||e.classList.contains(a)}),backdrop:n.find(function(e){return e.classList.contains("tippy-backdrop")})}}function $(e){var t=v(),n=v();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var i=v();function r(n,i){var r=z(t),o=r.box,s=r.content,a=r.arrow;i.theme?o.setAttribute("data-theme",i.theme):o.removeAttribute("data-theme"),"string"==typeof i.animation?o.setAttribute("data-animation",i.animation):o.removeAttribute("data-animation"),i.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof i.maxWidth?i.maxWidth+"px":i.maxWidth,i.role?o.setAttribute("role",i.role):o.removeAttribute("role"),(n.content!==i.content||n.allowHTML!==i.allowHTML)&&I(s,e.props),i.arrow?a?n.arrow!==i.arrow&&(o.removeChild(a),o.appendChild(B(i.arrow))):o.appendChild(B(i.arrow)):a&&o.removeChild(a)}return i.className=o,i.setAttribute("data-state","hidden"),I(i,e.props),t.appendChild(n),n.appendChild(i),r(e.props,e.props),{popper:t,onUpdate:r}}$.$$tippy=!0;var j=1,H=[],V=[];function q(e,t){void 0===t&&(t={});var n,r=D.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",C,l),window.addEventListener("blur",E);var o=Object.assign({},t,{plugins:r}),s=(b(n=e)?[n]:h(n,"NodeList")?g(n):Array.isArray(n)?n:g(document.querySelectorAll(n))).reduce(function(e,t){var n=t&&function(e,t){var n,r,o,s,a,b,M,C,T=R(e,Object.assign({},D,P(y(t)))),E=!1,A=!1,L=!1,B=!1,I=[],$=p(eg,T.interactiveDebounce),q=j++,F=(n=T.plugins).filter(function(e,t){return n.indexOf(e)===t}),K={id:q,reference:e,popper:v(),popperInstance:null,props:T,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:F,clearDelayTimeouts:function(){clearTimeout(r),clearTimeout(o),cancelAnimationFrame(s)},setProps:function(t){if(!K.state.isDestroyed){en("onBeforeUpdate",[K,t]),ef();var n=K.props,i=R(e,Object.assign({},n,y(t),{ignoreAttributes:!0}));K.props=i,ep(),n.interactiveDebounce!==i.interactiveDebounce&&(eo(),$=p(eg,i.interactiveDebounce)),n.triggerTarget&&!i.triggerTarget?f(n.triggerTarget).forEach(function(e){e.removeAttribute("aria-expanded")}):i.triggerTarget&&e.removeAttribute("aria-expanded"),er(),et(),U&&U(n,i),K.popperInstance&&(ew(),ek().forEach(function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})),en("onAfterUpdate",[K,t])}},setContent:function(e){K.setProps({content:e})},show:function(){var t,n,i,r=K.state.isVisible,o=K.state.isDestroyed,s=!K.state.isEnabled,a=O.isTouch&&!K.props.touch,l=d(K.props.duration,0,D.duration);if(!(r||o||s||a||(C||e).hasAttribute("disabled"))){if(en("onShow",[K],!1),!1!==K.props.onShow(K)){if(K.state.isVisible=!0,Q()&&(_.style.visibility="visible"),et(),ec(),K.state.isMounted||(_.style.transition="none"),Q()){var h=z(_);w([h.box,h.content],0)}M=function(){if(K.state.isVisible&&!B){if(B=!0,_.offsetHeight,_.style.transition=K.props.moveTransition,Q()&&K.props.animation){var e,t=z(_),n=t.box,i=t.content;w([n,i],l),x([n,i],"visible")}ei(),er(),m(V,K),null==(e=K.popperInstance)||e.forceUpdate(),en("onMount",[K]),K.props.animation&&Q()&&eh(l,function(){K.state.isShown=!0,en("onShown",[K])})}},n=K.props.appendTo,i=C||e,(t=K.props.interactive&&n===c||"parent"===n?i.parentNode:u(n,[i])).contains(_)||t.appendChild(_),K.state.isMounted=!0,ew()}}},hide:function(){var e,t=!K.state.isVisible,n=K.state.isDestroyed,i=!K.state.isEnabled,r=d(K.props.duration,1,D.duration);if(!t&&!n&&!i){if(en("onHide",[K],!1),!1!==K.props.onHide(K)){if(K.state.isVisible=!1,K.state.isShown=!1,B=!1,E=!1,Q()&&(_.style.visibility="hidden"),eo(),ed(),et(!0),Q()){var o=z(_),s=o.box,a=o.content;K.props.animation&&(w([s,a],r),x([s,a],"hidden"))}(ei(),er(),K.props.animation)?Q()&&(e=K.unmount,eh(r,function(){!K.state.isVisible&&_.parentNode&&_.parentNode.contains(_)&&e()})):K.unmount()}}},hideWithInteractivity:function(e){X().addEventListener("mousemove",$),m(H,$),$(e)},enable:function(){K.state.isEnabled=!0},disable:function(){K.hide(),K.state.isEnabled=!1},unmount:function(){K.state.isVisible&&K.hide(),K.state.isMounted&&(ex(),ek().forEach(function(e){e._tippy.unmount()}),_.parentNode&&_.parentNode.removeChild(_),V=V.filter(function(e){return e!==K}),K.state.isMounted=!1,en("onHidden",[K]))},destroy:function(){!K.state.isDestroyed&&(K.clearDelayTimeouts(),K.unmount(),ef(),delete e._tippy,K.state.isDestroyed=!0,en("onDestroy",[K]))}};if(!T.render)return K;var W=T.render(K),_=W.popper,U=W.onUpdate;_.setAttribute("data-tippy-root",""),_.id="tippy-"+K.id,K.popper=_,e._tippy=K,_._tippy=K;var J=F.map(function(e){return e.fn(K)}),Z=e.hasAttribute("aria-expanded");return ep(),er(),et(),en("onCreate",[K]),T.showOnCreate&&eS(),_.addEventListener("mouseenter",function(){K.props.interactive&&K.state.isVisible&&K.clearDelayTimeouts()}),_.addEventListener("mouseleave",function(){K.props.interactive&&K.props.trigger.indexOf("mouseenter")>=0&&X().addEventListener("mousemove",$)}),K;function Y(){var e=K.props.touch;return Array.isArray(e)?e:[e,0]}function G(){return"hold"===Y()[0]}function Q(){var e;return!!(null!=(e=K.props.render)&&e.$$tippy)}function X(){var t,n,i=(C||e).parentNode;return i&&null!=(n=f(i)[0])&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}function ee(e){return K.state.isMounted&&!K.state.isVisible||O.isTouch||a&&"focus"===a.type?0:d(K.props.delay,+!e,D.delay)}function et(e){void 0===e&&(e=!1),_.style.pointerEvents=K.props.interactive&&!e?"":"none",_.style.zIndex=""+K.props.zIndex}function en(e,t,n){if(void 0===n&&(n=!0),J.forEach(function(n){n[e]&&n[e].apply(n,t)}),n){var i;(i=K.props)[e].apply(i,t)}}function ei(){var t=K.props.aria;if(t.content){var n="aria-"+t.content,i=_.id;f(K.props.triggerTarget||e).forEach(function(e){var t=e.getAttribute(n);if(K.state.isVisible)e.setAttribute(n,t?t+" "+i:i);else{var r=t&&t.replace(i,"").trim();r?e.setAttribute(n,r):e.removeAttribute(n)}})}}function er(){!Z&&K.props.aria.expanded&&f(K.props.triggerTarget||e).forEach(function(t){K.props.interactive?t.setAttribute("aria-expanded",K.state.isVisible&&t===(C||e)?"true":"false"):t.removeAttribute("aria-expanded")})}function eo(){X().removeEventListener("mousemove",$),H=H.filter(function(e){return e!==$})}function es(t){if(!O.isTouch||!L&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!(K.props.interactive&&S(_,n))){if(f(K.props.triggerTarget||e).some(function(e){return S(e,n)})){if(O.isTouch||K.state.isVisible&&K.props.trigger.indexOf("click")>=0)return}else en("onClickOutside",[K,t]);!0!==K.props.hideOnClick||(K.clearDelayTimeouts(),K.hide(),A=!0,setTimeout(function(){A=!1}),K.state.isMounted||ed())}}}function ea(){L=!0}function el(){L=!1}function ec(){var e=X();e.addEventListener("mousedown",es,!0),e.addEventListener("touchend",es,l),e.addEventListener("touchstart",el,l),e.addEventListener("touchmove",ea,l)}function ed(){var e=X();e.removeEventListener("mousedown",es,!0),e.removeEventListener("touchend",es,l),e.removeEventListener("touchstart",el,l),e.removeEventListener("touchmove",ea,l)}function eh(e,t){var n=z(_).box;function i(e){e.target===n&&(k(n,"remove",i),t())}if(0===e)return t();k(n,"remove",b),k(n,"add",i),b=i}function eu(t,n,i){void 0===i&&(i=!1),f(K.props.triggerTarget||e).forEach(function(e){e.addEventListener(t,n,i),I.push({node:e,eventType:t,handler:n,options:i})})}function ep(){G()&&(eu("touchstart",em,{passive:!0}),eu("touchend",ey,{passive:!0})),K.props.trigger.split(/\s+/).filter(Boolean).forEach(function(e){if("manual"!==e)switch(eu(e,em),e){case"mouseenter":eu("mouseleave",ey);break;case"focus":eu(N?"focusout":"blur",ev);break;case"focusin":eu("focusout",ev)}})}function ef(){I.forEach(function(e){var t=e.node,n=e.eventType,i=e.handler,r=e.options;t.removeEventListener(n,i,r)}),I=[]}function em(e){var t,n=!1;if(!(!K.state.isEnabled||eb(e))&&!A){var i=(null==(t=a)?void 0:t.type)==="focus";a=e,C=e.currentTarget,er(),!K.state.isVisible&&h(e,"MouseEvent")&&H.forEach(function(t){return t(e)}),"click"===e.type&&(0>K.props.trigger.indexOf("mouseenter")||E)&&!1!==K.props.hideOnClick&&K.state.isVisible?n=!0:eS(e),"click"===e.type&&(E=!n),n&&!i&&eO(e)}}function eg(t){var n,i,r,o=t.target,s=(C||e).contains(o)||_.contains(o);("mousemove"!==t.type||!s)&&(n=ek().concat(_).map(function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:T}:null}).filter(Boolean),i=t.clientX,r=t.clientY,n.every(function(e){var t=e.popperRect,n=e.popperState,o=e.props.interactiveBorder,s=n.placement.split("-")[0],a=n.modifiersData.offset;if(!a)return!0;var l="bottom"===s?a.top.y:0,c="top"===s?a.bottom.y:0,d="right"===s?a.left.x:0,h="left"===s?a.right.x:0,u=t.top-r+l>o,p=r-t.bottom-c>o,f=t.left-i+d>o,m=i-t.right-h>o;return u||p||f||m})&&(eo(),eO(t)))}function ey(e){if(!(eb(e)||K.props.trigger.indexOf("click")>=0&&E)){if(K.props.interactive){K.hideWithInteractivity(e);return}eO(e)}}function ev(t){!(0>K.props.trigger.indexOf("focusin")&&t.target!==(C||e)||K.props.interactive&&t.relatedTarget&&_.contains(t.relatedTarget))&&eO(t)}function eb(e){return!!O.isTouch&&G()!==e.type.indexOf("touch")>=0}function ew(){ex();var t=K.props,n=t.popperOptions,r=t.placement,o=t.offset,s=t.getReferenceClientRect,a=t.moveTransition,l=Q()?z(_).arrow:null,c=s?{getBoundingClientRect:s,contextElement:s.contextElement||C||e}:e,d=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(Q()){var n=z(_).box;["placement","reference-hidden","escaped"].forEach(function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)}),t.attributes.popper={}}}}];Q()&&l&&d.push({name:"arrow",options:{element:l,padding:3}}),d.push.apply(d,(null==n?void 0:n.modifiers)||[]),K.popperInstance=(0,i.fi)(c,_,Object.assign({},n,{placement:r,onFirstUpdate:M,modifiers:d}))}function ex(){K.popperInstance&&(K.popperInstance.destroy(),K.popperInstance=null)}function ek(){return g(_.querySelectorAll("[data-tippy-root]"))}function eS(e){K.clearDelayTimeouts(),e&&en("onTrigger",[K,e]),ec();var t=ee(!0),n=Y(),i=n[0],o=n[1];O.isTouch&&"hold"===i&&o&&(t=o),t?r=setTimeout(function(){K.show()},t):K.show()}function eO(e){if(K.clearDelayTimeouts(),en("onUntrigger",[K,e]),!K.state.isVisible){ed();return}if(!(K.props.trigger.indexOf("mouseenter")>=0&&K.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0)||!E){var t=ee(!1);t?o=setTimeout(function(){K.state.isVisible&&K.hide()},t):s=requestAnimationFrame(function(){K.hide()})}}}(t,o);return n&&e.push(n),e},[]);return b(e)?s[0]:s}q.defaultProps=D,q.setDefaultProps=function(e){Object.keys(e).forEach(function(t){D[t]=e[t]})},q.currentInput=O,Object.assign({},r.Z,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),q.setDefaultProps({render:$});let F=q},88897:function(e,t,n){"use strict";n.d(t,{AW:()=>ea,Cf:()=>eE,DK:()=>eB,DS:()=>eA,EG:()=>eg,Ig:()=>Q,J1:()=>es,Jo:()=>en,K9:()=>eI,ML:()=>eT,NB:()=>eL,Nl:()=>p,Ov:()=>ez,P1:()=>y,QC:()=>eh,S0:()=>eP,XP:()=>ei,_4:()=>ec,b5:()=>er,eE:()=>G,hj:()=>I,nU:()=>w,pr:()=>ey,tI:()=>eu,u9:()=>ed,vc:()=>eR,x2:()=>eN,xh:()=>K,zK:()=>eD});var i=n(92007),r=n(45901),o=n(79358),s=n(76405),a=n(83311),l=n(21834),c=n(18923);function d(e){let{state:t,transaction:n}=e,{selection:i}=n,{doc:r}=n,{storedMarks:o}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),filterTransaction:t.filterTransaction,plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return o},get selection(){return i},get doc(){return r},get tr(){return i=n.selection,r=n.doc,o=n.storedMarks,n}}}class h{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:e,editor:t,state:n}=this,{view:i}=t,{tr:r}=n,o=this.buildProps(r);return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,(...e)=>{let n=t(...e)(o);return r.getMeta("preventDispatch")||this.hasCustomState||i.dispatch(r),n}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){let{rawCommands:n,editor:i,state:r}=this,{view:o}=i,s=[],a=!!e,l=e||r.tr,c={...Object.fromEntries(Object.entries(n).map(([e,n])=>[e,(...e)=>{let i=this.buildProps(l,t),r=n(...e)(i);return s.push(r),c}])),run:()=>(a||!t||l.getMeta("preventDispatch")||this.hasCustomState||o.dispatch(l),s.every(e=>!0===e))};return c}createCan(e){let{rawCommands:t,state:n}=this,i=e||n.tr,r=this.buildProps(i,!1);return{...Object.fromEntries(Object.entries(t).map(([e,t])=>[e,(...e)=>t(...e)({...r,dispatch:void 0})])),chain:()=>this.createChain(i,!1)}}buildProps(e,t=!0){let{rawCommands:n,editor:i,state:r}=this,{view:o}=i,s={tr:e,editor:i,view:o,state:d({state:r,transaction:e}),dispatch:t?()=>void 0:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([e,t])=>[e,(...e)=>t(...e)(s)]))}};return s}}class u{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){let n=this.callbacks[e];return n&&n.forEach(e=>e.apply(this,t)),this}off(e,t){let n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter(e=>e!==t):delete this.callbacks[e]),this}removeAllListeners(){this.callbacks={}}}function p(e,t,n){return void 0===e.config[t]&&e.parent?p(e.parent,t,n):"function"==typeof e.config[t]?e.config[t].bind({...n,parent:e.parent?p(e.parent,t,n):null}):e.config[t]}function f(e){let t=e.filter(e=>"extension"===e.type);return{baseExtensions:t,nodeExtensions:e.filter(e=>"node"===e.type),markExtensions:e.filter(e=>"mark"===e.type)}}function m(e){let t=[],{nodeExtensions:n,markExtensions:i}=f(e),r=[...n,...i],o={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach(e=>{let n={name:e.name,options:e.options,storage:e.storage},i=p(e,"addGlobalAttributes",n);i&&i().forEach(e=>{e.types.forEach(n=>{Object.entries(e.attributes).forEach(([e,i])=>{t.push({type:n,name:e,attribute:{...o,...i}})})})})}),r.forEach(e=>{let n={name:e.name,options:e.options,storage:e.storage},i=p(e,"addAttributes",n);i&&Object.entries(i()).forEach(([n,i])=>{let r={...o,...i};"function"==typeof(null==r?void 0:r.default)&&(r.default=r.default()),(null==r?void 0:r.isRequired)&&(null==r?void 0:r.default)===void 0&&delete r.default,t.push({type:e.name,name:n,attribute:r})})}),t}function g(e,t){if("string"==typeof e){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function y(...e){return e.filter(e=>!!e).reduce((e,t)=>{let n={...e};return Object.entries(t).forEach(([e,t])=>{if(!n[e]){n[e]=t;return}if("class"===e){let i=t?t.split(" "):[],r=n[e]?n[e].split(" "):[],o=i.filter(e=>!r.includes(e));n[e]=[...r,...o].join(" ")}else"style"===e?n[e]=[n[e],t].join("; "):n[e]=t}),n},{})}function v(e,t){return t.filter(e=>e.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(e.attrs)||{}:{[t.name]:e.attrs[t.name]}).reduce((e,t)=>y(e,t),{})}function b(e){return"function"==typeof e}function w(e,t,...n){return b(e)?t?e.bind(t)(...n):e(...n):e}function x(e,t){return e.style?e:{...e,getAttrs:n=>{let i=e.getAttrs?e.getAttrs(n):e.attrs;if(!1===i)return!1;let r=t.reduce((e,t)=>{var i;let r=t.attribute.parseHTML?t.attribute.parseHTML(n):"string"!=typeof(i=n.getAttribute(t.name))?i:i.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(i):"true"===i||"false"!==i&&i;return null==r?e:{...e,[t.name]:r}},{});return{...i,...r}}}}function k(e){return Object.fromEntries(Object.entries(e).filter(([e,t])=>!("attrs"===e&&function(e={}){return 0===Object.keys(e).length&&e.constructor===Object}(t))&&null!=t))}function S(e,t){var n;let i=m(e),{nodeExtensions:r,markExtensions:o}=f(e),a=null===(n=r.find(e=>p(e,"topNode")))||void 0===n?void 0:n.name,l=Object.fromEntries(r.map(n=>{let r=i.filter(e=>e.type===n.name),o={name:n.name,options:n.options,storage:n.storage,editor:t},s=k({...e.reduce((e,t)=>{let i=p(t,"extendNodeSchema",o);return{...e,...i?i(n):{}}},{}),content:w(p(n,"content",o)),marks:w(p(n,"marks",o)),group:w(p(n,"group",o)),inline:w(p(n,"inline",o)),atom:w(p(n,"atom",o)),selectable:w(p(n,"selectable",o)),draggable:w(p(n,"draggable",o)),code:w(p(n,"code",o)),defining:w(p(n,"defining",o)),isolating:w(p(n,"isolating",o)),attrs:Object.fromEntries(r.map(e=>{var t;return[e.name,{default:null===(t=null==e?void 0:e.attribute)||void 0===t?void 0:t.default}]}))}),a=w(p(n,"parseHTML",o));a&&(s.parseDOM=a.map(e=>x(e,r)));let l=p(n,"renderHTML",o);l&&(s.toDOM=e=>l({node:e,HTMLAttributes:v(e,r)}));let c=p(n,"renderText",o);return c&&(s.toText=c),[n.name,s]})),c=Object.fromEntries(o.map(n=>{let r=i.filter(e=>e.type===n.name),o={name:n.name,options:n.options,storage:n.storage,editor:t},s=k({...e.reduce((e,t)=>{let i=p(t,"extendMarkSchema",o);return{...e,...i?i(n):{}}},{}),inclusive:w(p(n,"inclusive",o)),excludes:w(p(n,"excludes",o)),group:w(p(n,"group",o)),spanning:w(p(n,"spanning",o)),code:w(p(n,"code",o)),attrs:Object.fromEntries(r.map(e=>{var t;return[e.name,{default:null===(t=null==e?void 0:e.attribute)||void 0===t?void 0:t.default}]}))}),a=w(p(n,"parseHTML",o));a&&(s.parseDOM=a.map(e=>x(e,r)));let l=p(n,"renderHTML",o);return l&&(s.toDOM=e=>l({mark:e,HTMLAttributes:v(e,r)})),[n.name,s]}));return new s.V_({topNode:a,nodes:l,marks:c})}function O(e,t){return t.nodes[e]||t.marks[e]||null}function M(e,t){return Array.isArray(t)?t.some(t=>("string"==typeof t?t:t.name)===e.name):t}let C=(e,t=500)=>{let n="",i=e.parentOffset;return e.parent.nodesBetween(Math.max(0,i-t),i,(e,t,r,o)=>{var s,a;let l=(null===(a=(s=e.type.spec).toText)||void 0===a?void 0:a.call(s,{node:e,pos:t,parent:r,index:o}))||e.textContent||"%leaf%";n+=l.slice(0,Math.max(0,i-t))}),n};function T(e){return"[object RegExp]"===Object.prototype.toString.call(e)}class E{constructor(e){this.find=e.find,this.handler=e.handler}}let N=(e,t)=>{if(T(t))return t.exec(e);let n=t(e);if(!n)return null;let i=[n.text];return i.index=n.index,i.input=e,i.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),i.push(n.replaceWith)),i};function D(e){var t;let{editor:n,from:i,to:r,text:o,rules:s,plugin:a}=e,{view:l}=n;if(l.composing)return!1;let c=l.state.doc.resolve(i);if(c.parent.type.spec.code||(null===(t=c.nodeBefore||c.nodeAfter)||void 0===t?void 0:t.marks.find(e=>e.type.spec.code)))return!1;let u=!1,p=C(c)+o;return s.forEach(e=>{if(u)return;let t=N(p,e.find);if(!t)return;let s=l.state.tr,c=d({state:l.state,transaction:s}),f={from:i-(t[0].length-o.length),to:r},{commands:m,chain:g,can:y}=new h({editor:n,state:c});null!==e.handler({state:c,range:f,match:t,commands:m,chain:g,can:y})&&s.steps.length&&(s.setMeta(a,{transform:s,from:i,to:r,text:o}),l.dispatch(s),u=!0)}),u}class A{constructor(e){this.find=e.find,this.handler=e.handler}}let P=(e,t)=>{if(T(t))return[...e.matchAll(t)];let n=t(e);return n?n.map(t=>{let n=[t.text];return n.index=t.index,n.input=e,n.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),n.push(t.replaceWith)),n}):[]};class R{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=R.resolve(e),this.schema=S(this.extensions,t),this.extensions.forEach(e=>{var t;this.editor.extensionStorage[e.name]=e.storage;let n={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:O(e.name,this.schema)};"mark"===e.type&&(null===(t=w(p(e,"keepOnSplit",n)))||void 0===t||t)&&this.splittableMarks.push(e.name);let i=p(e,"onBeforeCreate",n);i&&this.editor.on("beforeCreate",i);let r=p(e,"onCreate",n);r&&this.editor.on("create",r);let o=p(e,"onUpdate",n);o&&this.editor.on("update",o);let s=p(e,"onSelectionUpdate",n);s&&this.editor.on("selectionUpdate",s);let a=p(e,"onTransaction",n);a&&this.editor.on("transaction",a);let l=p(e,"onFocus",n);l&&this.editor.on("focus",l);let c=p(e,"onBlur",n);c&&this.editor.on("blur",c);let d=p(e,"onDestroy",n);d&&this.editor.on("destroy",d)})}static resolve(e){var t;let n=R.sort(R.flatten(e)),i=[...new Set((t=n.map(e=>e.name)).filter((e,n)=>t.indexOf(e)!==n))];return i.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${i.map(e=>`'${e}'`).join(", ")}]. This can lead to issues.`),n}static flatten(e){return e.map(e=>{let t={name:e.name,options:e.options,storage:e.storage},n=p(e,"addExtensions",t);return n?[e,...this.flatten(n())]:e}).flat(10)}static sort(e){return e.sort((e,t)=>{let n=p(e,"priority")||100,i=p(t,"priority")||100;return n>i?-1:+(n{let n={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:O(t.name,this.schema)},i=p(t,"addCommands",n);return i?{...e,...i()}:e},{})}get plugins(){let{editor:e}=this,t=R.sort([...this.extensions].reverse()),n=[],r=[],s=t.map(t=>{let i={name:t.name,options:t.options,storage:t.storage,editor:e,type:O(t.name,this.schema)},s=[],a=p(t,"addKeyboardShortcuts",i),l={};if("mark"===t.type&&t.config.exitable&&(l.ArrowRight=()=>eR.handleExit({editor:e,mark:t})),a){let t=Object.fromEntries(Object.entries(a()).map(([t,n])=>[t,()=>n({editor:e})]));l={...l,...t}}let c=(0,o.h)(l);s.push(c);let d=p(t,"addInputRules",i);M(t,e.options.enableInputRules)&&d&&n.push(...d());let h=p(t,"addPasteRules",i);M(t,e.options.enablePasteRules)&&h&&r.push(...h());let u=p(t,"addProseMirrorPlugins",i);if(u){let e=u();s.push(...e)}return s}).flat();return[function(e){let{editor:t,rules:n}=e,r=new i.Sy({state:{init:()=>null,apply(e,t){let n=e.getMeta(r);return n||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:(e,i,o,s)=>D({editor:t,from:i,to:o,text:s,rules:n,plugin:r}),handleDOMEvents:{compositionend:e=>(setTimeout(()=>{let{$cursor:i}=e.state.selection;i&&D({editor:t,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(e,i){if("Enter"!==i.key)return!1;let{$cursor:o}=e.state.selection;return!!o&&D({editor:t,from:o.pos,to:o.pos,text:"\n",rules:n,plugin:r})}},isInputRules:!0});return r}({editor:e,rules:n}),...function(e){let{editor:t,rules:n}=e,r=null,o=!1,s=!1,a=new ClipboardEvent("paste"),l=new DragEvent("drop");return n.map(e=>new i.Sy({view(e){let t=t=>{var n;r=(null===(n=e.dom.parentElement)||void 0===n?void 0:n.contains(t.target))?e.dom.parentElement:null};return window.addEventListener("dragstart",t),{destroy(){window.removeEventListener("dragstart",t)}}},props:{handleDOMEvents:{drop:(e,t)=>(s=r===e.dom.parentElement,l=t,!1),paste:(e,t)=>{var n;let i=null===(n=t.clipboardData)||void 0===n?void 0:n.getData("text/html");return a=t,o=!!(null==i?void 0:i.includes("data-pm-slice")),!1}}},appendTransaction:(n,i,r)=>{let c=n[0],u="paste"===c.getMeta("uiEvent")&&!o,p="drop"===c.getMeta("uiEvent")&&!s;if(!u&&!p)return;let f=i.doc.content.findDiffStart(r.doc.content),m=i.doc.content.findDiffEnd(r.doc.content);if("number"!=typeof f||!m||f===m.b)return;let g=r.tr;if(function(e){let{editor:t,state:n,from:i,to:r,rule:o,pasteEvent:s,dropEvent:a}=e,{commands:l,chain:c,can:d}=new h({editor:t,state:n}),u=[];return n.doc.nodesBetween(i,r,(e,t)=>{if(!e.isTextblock||e.type.spec.code)return;let h=Math.max(i,t),p=Math.min(r,t+e.content.size);P(e.textBetween(h-t,p-t,void 0,""),o.find).forEach(e=>{if(void 0===e.index)return;let t=h+e.index+1,i=t+e[0].length,r={from:n.tr.mapping.map(t),to:n.tr.mapping.map(i)},p=o.handler({state:n,range:r,match:e,commands:l,chain:c,can:d,pasteEvent:s,dropEvent:a});u.push(p)})}),u.every(e=>null!==e)}({editor:t,state:d({state:r,transaction:g}),from:Math.max(f-1,0),to:m.b-1,rule:e,pasteEvent:a,dropEvent:l})&&g.steps.length)return l=new DragEvent("drop"),a=new ClipboardEvent("paste"),g}}))}({editor:e,rules:r}),...s]}get attributes(){return m(this.extensions)}get nodeViews(){let{editor:e}=this,{nodeExtensions:t}=f(this.extensions);return Object.fromEntries(t.filter(e=>!!p(e,"addNodeView")).map(t=>{let n=this.attributes.filter(e=>e.type===t.name),i={name:t.name,options:t.options,storage:t.storage,editor:e,type:g(t.name,this.schema)},r=p(t,"addNodeView",i);return r?[t.name,(i,o,s,a)=>{let l=v(i,n);return r()({editor:e,node:i,getPos:s,decorations:a,HTMLAttributes:l,extension:t})}]:[]}))}}function L(e){return"Object"===Object.prototype.toString.call(e).slice(8,-1)&&e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function B(e,t){let n={...e};return L(e)&&L(t)&&Object.keys(t).forEach(i=>{L(t[i])&&i in e?n[i]=B(e[i],t[i]):Object.assign(n,{[i]:t[i]})}),n}class I{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=w(p(this,"addOptions",{name:this.name}))),this.storage=w(p(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new I(e)}configure(e={}){let t=this.extend();return t.options=B(this.options,e),t.storage=w(p(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){let t=new I(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=w(p(t,"addOptions",{name:t.name})),t.storage=w(p(t,"addStorage",{name:t.name,options:t.options})),t}}function z(e,t,n){let{from:i,to:r}=t,{blockSeparator:o="\n\n",textSerializers:s={}}=n||{},a="",l=!0;return e.nodesBetween(i,r,(e,n,c,d)=>{var h;let u=null==s?void 0:s[e.type.name];u?(e.isBlock&&!l&&(a+=o,l=!0),c&&(a+=u({node:e,pos:n,parent:c,index:d,range:t}))):e.isText?(a+=null===(h=null==e?void 0:e.text)||void 0===h?void 0:h.slice(Math.max(i,n)-n,r-n),l=!1):e.isBlock&&!l&&(a+=o,l=!0)}),a}function $(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}let j=I.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new i.Sy({key:new i.H$("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{let{editor:e}=this,{state:t,schema:n}=e,{doc:i,selection:r}=t,{ranges:o}=r,s=Math.min(...o.map(e=>e.$from.pos)),a=Math.max(...o.map(e=>e.$to.pos));return z(i,{from:s,to:a},{textSerializers:$(n)})}}})]}});function H(e,t,n={strict:!0}){let i=Object.keys(t);return!i.length||i.every(i=>n.strict?t[i]===e[i]:T(t[i])?t[i].test(e[i]):t[i]===e[i])}function V(e,t,n={}){return e.find(e=>e.type===t&&H(e.attrs,n))}function q(e,t,n={}){if(!e||!t)return;let i=e.parent.childAfter(e.parentOffset);if(e.parentOffset===i.offset&&0!==i.offset&&(i=e.parent.childBefore(e.parentOffset)),!i.node)return;let r=V([...i.node.marks],t,n);if(!r)return;let o=i.index,s=e.start()+i.offset,a=o+1,l=s+i.node.nodeSize;for(V([...i.node.marks],t,n);o>0&&r.isInSet(e.parent.child(o-1).marks);)o-=1,s-=e.parent.child(o).nodeSize;for(;a${e}`;return new window.DOMParser().parseFromString(t,"text/html").body}function Z(e,t,n){if(n={slice:!0,parseOptions:{},...n},"object"==typeof e&&null!==e)try{if(Array.isArray(e)&&e.length>0)return s.HY.fromArray(e.map(e=>t.nodeFromJSON(e)));return t.nodeFromJSON(e)}catch(i){return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",i),Z("",t,n)}if("string"==typeof e){let i=s.aw.fromSchema(t);return n.slice?i.parseSlice(J(e),n.parseOptions).content:i.parse(J(e),n.parseOptions)}return Z("",t,n)}let Y=e=>e.toString().startsWith("<");function G(){return"undefined"!=typeof navigator&&/Mac/.test(navigator.platform)}function Q(e,t,n={}){let{from:i,to:r,empty:o}=e.selection,s=t?g(t,e.schema):null,a=[];e.doc.nodesBetween(i,r,(e,t)=>{if(e.isText)return;let n=Math.max(i,t),o=Math.min(r,t+e.nodeSize);a.push({node:e,from:n,to:o})});let l=r-i,c=a.filter(e=>!s||s.name===e.node.type.name).filter(e=>H(e.node.attrs,n,{strict:!1}));return o?!!c.length:c.reduce((e,t)=>e+t.to-t.from,0)>=l}function X(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function ee(e,t){let n="string"==typeof t?[t]:t;return Object.keys(e).reduce((t,i)=>(n.includes(i)||(t[i]=e[i]),t),{})}function et(e,t,n={}){return Z(e,t,{slice:!1,parseOptions:n})}function en(e,t){let n=F(t,e.schema),{from:i,to:r,empty:o}=e.selection,s=[];o?(e.storedMarks&&s.push(...e.storedMarks),s.push(...e.selection.$head.marks())):e.doc.nodesBetween(i,r,e=>{s.push(...e.marks)});let a=s.find(e=>e.type.name===n.name);return a?{...a.attrs}:{}}function ei(e,t){let n=new a.wx(e);return t.forEach(e=>{e.steps.forEach(e=>{n.step(e)})}),n}function er(e,t,n){let i=[];return e.nodesBetween(t.from,t.to,(e,t)=>{n(e)&&i.push({node:e,pos:t})}),i}function eo(e){return t=>(function(e,t){for(let n=e.depth;n>0;n-=1){let i=e.node(n);if(t(i))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:i}}})(t.$from,e)}function es(e,t){return S(R.resolve(e),t)}function ea(e,t){let n=es(t),i=J(e);return s.aw.fromSchema(n).parse(i).toJSON()}function el(e,t){let n={from:0,to:e.content.size};return z(e,n,t)}function ec(e,t,n){let{blockSeparator:i="\n\n",textSerializers:r={}}=n||{},o=es(t);return el(s.NB.fromJSON(o,e),{blockSeparator:i,textSerializers:{...$(o),...r}})}function ed(e,t){let n=X("string"==typeof t?t:t.name,e.schema);return"node"===n?function(e,t){let n=g(t,e.schema),{from:i,to:r}=e.selection,o=[];e.doc.nodesBetween(i,r,e=>{o.push(e)});let s=o.reverse().find(e=>e.type.name===n.name);return s?{...s.attrs}:{}}(e,t):"mark"===n?en(e,t):{}}function eh(e){let{mapping:t,steps:n}=e,i=[];return t.maps.forEach((e,r)=>{let o=[];if(e.ranges.length)e.forEach((e,t)=>{o.push({from:e,to:t})});else{let{from:e,to:t}=n[r];if(void 0===e||void 0===t)return;o.push({from:e,to:t})}o.forEach(({from:e,to:n})=>{let o=t.slice(r).map(e,-1),s=t.slice(r).map(n),a=t.invert().map(o,-1),l=t.invert().map(s);i.push({oldRange:{from:a,to:l},newRange:{from:o,to:s}})})}),function(e){let t=function(e,t=JSON.stringify){let n={};return e.filter(e=>{let i=t(e);return!Object.prototype.hasOwnProperty.call(n,i)&&(n[i]=!0)})}(e);return 1===t.length?t:t.filter((e,n)=>!t.filter((e,t)=>t!==n).some(t=>e.oldRange.from>=t.oldRange.from&&e.oldRange.to<=t.oldRange.to&&e.newRange.from>=t.newRange.from&&e.newRange.to<=t.newRange.to))}(i)}function eu(e,t,n){let i=[];return e===t?n.resolve(e).marks().forEach(t=>{let r=q(n.resolve(e-1),t.type);r&&i.push({mark:t,...r})}):n.nodesBetween(e,t,(e,t)=>{i.push(...e.marks.map(n=>({from:t,to:t+e.nodeSize,mark:n})))}),i}function ep(e,t,n){return Object.fromEntries(Object.entries(n).filter(([n])=>{let i=e.find(e=>e.type===t&&e.name===n);return!!i&&i.attribute.keepOnSplit}))}function ef(e,t,n={}){let{empty:i,ranges:r}=e.selection,o=t?F(t,e.schema):null;if(i)return!!(e.storedMarks||e.selection.$from.marks()).filter(e=>!o||o.name===e.type.name).find(e=>H(e.attrs,n,{strict:!1}));let s=0,a=[];if(r.forEach(({$from:t,$to:n})=>{let i=t.pos,r=n.pos;e.doc.nodesBetween(i,r,(e,t)=>{if(!e.isText&&!e.marks.length)return;let n=Math.max(i,t),o=Math.min(r,t+e.nodeSize);s+=o-n,a.push(...e.marks.map(e=>({mark:e,from:n,to:o})))})}),0===s)return!1;let l=a.filter(e=>!o||o.name===e.mark.type.name).filter(e=>H(e.mark.attrs,n,{strict:!1})).reduce((e,t)=>e+t.to-t.from,0),c=a.filter(e=>!o||e.mark.type!==o&&e.mark.type.excludes(o)).reduce((e,t)=>e+t.to-t.from,0);return(l>0?l+c:l)>=s}function em(e,t){let{nodeExtensions:n}=f(t),i=n.find(t=>t.name===e);if(!i)return!1;let r={name:i.name,options:i.options,storage:i.storage},o=w(p(i,"group",r));return"string"==typeof o&&o.split(" ").includes("list")}function eg(e){return e instanceof i.qv}function ey(e,t,n){let i=e.state.doc.content.size,r=W(t,0,i),o=W(n,0,i),s=e.coordsAtPos(r),a=e.coordsAtPos(o,-1),l=Math.min(s.top,a.top),c=Math.max(s.bottom,a.bottom),d=Math.min(s.left,a.left),h=Math.max(s.right,a.right),u={top:l,bottom:c,left:d,right:h,width:h-d,height:c-l,x:d,y:l};return{...u,toJSON:()=>u}}function ev(e,t){let n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){let i=n.filter(e=>null==t?void 0:t.includes(e.type.name));e.tr.ensureMarks(i)}}let eb=(e,t)=>{let n=eo(e=>e.type===t)(e.selection);if(!n)return!0;let i=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(void 0===i)return!0;let r=e.doc.nodeAt(i);return!(n.node.type===(null==r?void 0:r.type)&&(0,a.Mn)(e.doc,n.pos))||(e.join(n.pos),!0)},ew=(e,t)=>{let n=eo(e=>e.type===t)(e.selection);if(!n)return!0;let i=e.doc.resolve(n.start).after(n.depth);if(void 0===i)return!0;let r=e.doc.nodeAt(i);return!(n.node.type===(null==r?void 0:r.type)&&(0,a.Mn)(e.doc,i))||(e.join(i),!0)};var ex=Object.freeze({__proto__:null,blur:()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),null===(n=null==window?void 0:window.getSelection())||void 0===n||n.removeAllRanges())}),!0),clearContent:(e=!1)=>({commands:t})=>t.setContent("",e),clearNodes:()=>({state:e,tr:t,dispatch:n})=>{let{selection:i}=t,{ranges:r}=i;return!n||(r.forEach(({$from:n,$to:i})=>{e.doc.nodesBetween(n.pos,i.pos,(e,n)=>{if(e.type.isText)return;let{doc:i,mapping:r}=t,o=i.resolve(r.map(n)),s=i.resolve(r.map(n+e.nodeSize)),l=o.blockRange(s);if(!l)return;let c=(0,a.k9)(l);if(e.type.isTextblock){let{defaultType:e}=o.parent.contentMatchAt(o.index());t.setNodeMarkup(l.start,e)}(c||0===c)&&t.lift(l,c)})}),!0)},command:e=>t=>e(t),createParagraphNear:()=>({state:e,dispatch:t})=>(0,l.mD)(e,t),cut:(e,t)=>({editor:n,tr:r})=>{let{state:o}=n,s=o.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);let a=r.mapping.map(t);return r.insert(a,s.content),r.setSelection(new i.Bs(r.doc.resolve(a-1))),!0},deleteCurrentNode:()=>({tr:e,dispatch:t})=>{let{selection:n}=e,i=n.$anchor.node();if(i.content.size>0)return!1;let r=e.selection.$anchor;for(let n=r.depth;n>0;n-=1)if(r.node(n).type===i.type){if(t){let t=r.before(n),i=r.after(n);e.delete(t,i).scrollIntoView()}return!0}return!1},deleteNode:e=>({tr:t,state:n,dispatch:i})=>{let r=g(e,n.schema),o=t.selection.$anchor;for(let e=o.depth;e>0;e-=1)if(o.node(e).type===r){if(i){let n=o.before(e),i=o.after(e);t.delete(n,i).scrollIntoView()}return!0}return!1},deleteRange:e=>({tr:t,dispatch:n})=>{let{from:i,to:r}=e;return n&&t.delete(i,r),!0},deleteSelection:()=>({state:e,dispatch:t})=>(0,l.NE)(e,t),enter:()=>({commands:e})=>e.keyboardShortcut("Enter"),exitCode:()=>({state:e,dispatch:t})=>(0,l.uo)(e,t),extendMarkRange:(e,t={})=>({tr:n,state:r,dispatch:o})=>{let s=F(e,r.schema),{doc:a,selection:l}=n,{$from:c,from:d,to:h}=l;if(o){let e=q(c,s,t);if(e&&e.from<=d&&e.to>=h){let t=i.Bs.create(a,e.from,e.to);n.setSelection(t)}}return!0},first:e=>t=>{let n="function"==typeof e?e(t):e;for(let e=0;e({editor:n,view:i,tr:r,dispatch:o})=>{t={scrollIntoView:!0,...t};let s=()=>{U()&&i.dom.focus(),requestAnimationFrame(()=>{!n.isDestroyed&&(i.focus(),(null==t?void 0:t.scrollIntoView)&&n.commands.scrollIntoView())})};if(i.hasFocus()&&null===e||!1===e)return!0;if(o&&null===e&&!K(n.state.selection))return s(),!0;let a=_(r.doc,e)||n.state.selection,l=n.state.selection.eq(a);return o&&(l||r.setSelection(a),l&&r.storedMarks&&r.setStoredMarks(r.storedMarks),s()),!0},forEach:(e,t)=>n=>e.every((e,i)=>t(e,{...n,index:i})),insertContent:(e,t)=>({tr:n,commands:i})=>i.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),insertContentAt:(e,t,n)=>({tr:r,dispatch:o,editor:s})=>{if(o){n={parseOptions:{},updateSelection:!0,...n};let o=Z(t,s.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions}});if("<>"===o.toString())return!0;let{from:l,to:c}="number"==typeof e?{from:e,to:e}:{from:e.from,to:e.to},d=!0,h=!0;if((Y(o)?o:[o]).forEach(e=>{e.check(),d=!!d&&e.isText&&0===e.marks.length,h=!!h&&e.isBlock}),l===c&&h){let{parent:e}=r.doc.resolve(l);!e.isTextblock||e.type.spec.code||e.childCount||(l-=1,c+=1)}d?Array.isArray(t)?r.insertText(t.map(e=>e.text||"").join(""),l,c):"object"==typeof t&&t&&t.text?r.insertText(t.text,l,c):r.insertText(t,l,c):r.replaceWith(l,c,o),n.updateSelection&&function(e,t,n){let r=e.steps.length-1;if(r{0===l&&(l=i)}),e.setSelection(i.Y1.near(e.doc.resolve(l),-1))}(r,r.steps.length-1,0)}return!0},joinUp:()=>({state:e,dispatch:t})=>(0,l.MI)(e,t),joinDown:()=>({state:e,dispatch:t})=>(0,l.Ig)(e,t),joinBackward:()=>({state:e,dispatch:t})=>(0,l.al)(e,t),joinForward:()=>({state:e,dispatch:t})=>(0,l.Y_)(e,t),joinItemBackward:()=>({tr:e,state:t,dispatch:n})=>{try{let i=(0,a.GJ)(t.doc,t.selection.$from.pos,-1);if(null==i)return!1;return e.join(i,2),n&&n(e),!0}catch{return!1}},joinItemForward:()=>({state:e,dispatch:t,tr:n})=>{try{let i=(0,a.GJ)(e.doc,e.selection.$from.pos,1);if(null==i)return!1;return n.join(i,2),t&&t(n),!0}catch(e){return!1}},keyboardShortcut:e=>({editor:t,view:n,tr:i,dispatch:r})=>{let o=(function(e){let t,n,i,r;let o=e.split(/-(?!$)/),s=o[o.length-1];"Space"===s&&(s=" ");for(let e=0;e!["Alt","Ctrl","Meta","Shift"].includes(e)),a=new KeyboardEvent("keydown",{key:"Space"===s?" ":s,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0}),l=t.captureTransaction(()=>{n.someProp("handleKeyDown",e=>e(n,a))});return null==l||l.steps.forEach(e=>{let t=e.map(i.mapping);t&&r&&i.maybeStep(t)}),!0},lift:(e,t={})=>({state:n,dispatch:i})=>{let r=g(e,n.schema);return!!Q(n,r,t)&&(0,l.xb)(n,i)},liftEmptyBlock:()=>({state:e,dispatch:t})=>(0,l.X0)(e,t),liftListItem:e=>({state:t,dispatch:n})=>{let i=g(e,t.schema);return(0,c.IB)(i)(t,n)},newlineInCode:()=>({state:e,dispatch:t})=>(0,l.QK)(e,t),resetAttributes:(e,t)=>({tr:n,state:i,dispatch:r})=>{let o=null,s=null,a=X("string"==typeof e?e:e.name,i.schema);return!!a&&("node"===a&&(o=g(e,i.schema)),"mark"===a&&(s=F(e,i.schema)),r&&n.selection.ranges.forEach(e=>{i.doc.nodesBetween(e.$from.pos,e.$to.pos,(e,i)=>{o&&o===e.type&&n.setNodeMarkup(i,void 0,ee(e.attrs,t)),s&&e.marks.length&&e.marks.forEach(r=>{s===r.type&&n.addMark(i,i+e.nodeSize,s.create(ee(r.attrs,t)))})})}),!0)},scrollIntoView:()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),selectAll:()=>({tr:e,commands:t})=>t.setTextSelection({from:0,to:e.doc.content.size}),selectNodeBackward:()=>({state:e,dispatch:t})=>(0,l._M)(e,t),selectNodeForward:()=>({state:e,dispatch:t})=>(0,l.o)(e,t),selectParentNode:()=>({state:e,dispatch:t})=>(0,l.N0)(e,t),selectTextblockEnd:()=>({state:e,dispatch:t})=>(0,l.nw)(e,t),selectTextblockStart:()=>({state:e,dispatch:t})=>(0,l.U9)(e,t),setContent:(e,t=!1,n={})=>({tr:i,editor:r,dispatch:o})=>{let{doc:s}=i,a=et(e,r.schema,n);return o&&i.replaceWith(0,s.content.size,a).setMeta("preventUpdate",!t),!0},setMark:(e,t={})=>({tr:n,state:i,dispatch:r})=>{let{selection:o}=n,{empty:s,ranges:a}=o,l=F(e,i.schema);if(r){if(s){let e=en(i,l);n.addStoredMark(l.create({...e,...t}))}else a.forEach(e=>{let r=e.$from.pos,o=e.$to.pos;i.doc.nodesBetween(r,o,(e,i)=>{let s=Math.max(i,r),a=Math.min(i+e.nodeSize,o);e.marks.find(e=>e.type===l)?e.marks.forEach(e=>{l===e.type&&n.addMark(s,a,l.create({...e.attrs,...t}))}):n.addMark(s,a,l.create(t))})})}return function(e,t,n){var i;let{selection:r}=t,o=null;if(K(r)&&(o=r.$cursor),o){let t=null!==(i=e.storedMarks)&&void 0!==i?i:o.marks();return!!n.isInSet(t)||!t.some(e=>e.type.excludes(n))}let{ranges:s}=r;return s.some(({$from:t,$to:i})=>{let r=0===t.depth&&e.doc.inlineContent&&e.doc.type.allowsMarkType(n);return e.doc.nodesBetween(t.pos,i.pos,(e,t,i)=>{if(r)return!1;if(e.isInline){let t=!i||i.type.allowsMarkType(n),o=!!n.isInSet(e.marks)||!e.marks.some(e=>e.type.excludes(n));r=t&&o}return!r}),r})}(i,n,l)},setMeta:(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),setNode:(e,t={})=>({state:n,dispatch:i,chain:r})=>{let o=g(e,n.schema);return o.isTextblock?r().command(({commands:e})=>!!(0,l.uJ)(o,t)(n)||e.clearNodes()).command(({state:e})=>(0,l.uJ)(o,t)(e,i)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},setNodeSelection:e=>({tr:t,dispatch:n})=>{if(n){let{doc:n}=t,r=W(e,0,n.content.size),o=i.qv.create(n,r);t.setSelection(o)}return!0},setTextSelection:e=>({tr:t,dispatch:n})=>{if(n){let{doc:n}=t,{from:r,to:o}="number"==typeof e?{from:e,to:e}:e,s=i.Bs.atStart(n).from,a=i.Bs.atEnd(n).to,l=W(r,s,a),c=W(o,s,a),d=i.Bs.create(n,l,c);t.setSelection(d)}return!0},sinkListItem:e=>({state:t,dispatch:n})=>{let i=g(e,t.schema);return(0,c.bw)(i)(t,n)},splitBlock:({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:o})=>{let{selection:s,doc:l}=t,{$from:c,$to:d}=s,h=ep(o.extensionManager.attributes,c.node().type.name,c.node().attrs);if(s instanceof i.qv&&s.node.isBlock)return!!(c.parentOffset&&(0,a.Ax)(l,c.pos))&&(r&&(e&&ev(n,o.extensionManager.splittableMarks),t.split(c.pos).scrollIntoView()),!0);if(!c.parent.isBlock)return!1;if(r){let r=d.parentOffset===d.parent.content.size;s instanceof i.Bs&&t.deleteSelection();let l=0===c.depth?void 0:function(e){for(let t=0;t({tr:t,state:n,dispatch:r,editor:o})=>{var l;let c=g(e,n.schema),{$from:d,$to:h}=n.selection,u=n.selection.node;if(u&&u.isBlock||d.depth<2||!d.sameParent(h))return!1;let p=d.node(-1);if(p.type!==c)return!1;let f=o.extensionManager.attributes;if(0===d.parent.content.size&&d.node(-1).childCount===d.indexAfter(-1)){if(2===d.depth||d.node(-3).type!==c||d.index(-2)!==d.node(-2).childCount-1)return!1;if(r){let e=s.HY.empty,n=d.index(-1)?1:d.index(-2)?2:3;for(let t=d.depth-n;t>=d.depth-3;t-=1)e=s.HY.from(d.node(t).copy(e));let r=d.indexAfter(-1){if(u>-1)return!1;e.isTextblock&&0===e.content.size&&(u=t+1)}),u>-1&&t.setSelection(i.Bs.near(t.doc.resolve(u))),t.scrollIntoView()}return!0}let m=h.pos===d.end()?p.contentMatchAt(0).defaultType:null,y=ep(f,p.type.name,p.attrs),v=ep(f,d.node().type.name,d.node().attrs);t.delete(d.pos,h.pos);let b=m?[{type:c,attrs:y},{type:m,attrs:v}]:[{type:c,attrs:y}];if(!(0,a.Ax)(t.doc,d.pos,2))return!1;if(r){let{selection:e,storedMarks:i}=n,{splittableMarks:s}=o.extensionManager,a=i||e.$to.parentOffset&&e.$from.marks();if(t.split(d.pos,2,b).scrollIntoView(),!a||!r)return!0;let l=a.filter(e=>s.includes(e.type.name));t.ensureMarks(l)}return!0},toggleList:(e,t,n,i={})=>({editor:r,tr:o,state:s,dispatch:a,chain:l,commands:c,can:d})=>{let{extensions:h,splittableMarks:u}=r.extensionManager,p=g(e,s.schema),f=g(t,s.schema),{selection:m,storedMarks:y}=s,{$from:v,$to:b}=m,w=v.blockRange(b),x=y||m.$to.parentOffset&&m.$from.marks();if(!w)return!1;let k=eo(e=>em(e.type.name,h))(m);if(w.depth>=1&&k&&w.depth-k.depth<=1){if(k.node.type===p)return c.liftListItem(f);if(em(k.node.type.name,h)&&p.validContent(k.node.content)&&a)return l().command(()=>(o.setNodeMarkup(k.pos,p),!0)).command(()=>eb(o,p)).command(()=>ew(o,p)).run()}return n&&x&&a?l().command(()=>{let e=d().wrapInList(p,i),t=x.filter(e=>u.includes(e.type.name));return o.ensureMarks(t),!!e||c.clearNodes()}).wrapInList(p,i).command(()=>eb(o,p)).command(()=>ew(o,p)).run():l().command(()=>!!d().wrapInList(p,i)||c.clearNodes()).wrapInList(p,i).command(()=>eb(o,p)).command(()=>ew(o,p)).run()},toggleMark:(e,t={},n={})=>({state:i,commands:r})=>{let{extendEmptyMarkRange:o=!1}=n,s=F(e,i.schema);return ef(i,s,t)?r.unsetMark(s,{extendEmptyMarkRange:o}):r.setMark(s,t)},toggleNode:(e,t,n={})=>({state:i,commands:r})=>{let o=g(e,i.schema),s=g(t,i.schema);return Q(i,o,n)?r.setNode(s):r.setNode(o,n)},toggleWrap:(e,t={})=>({state:n,commands:i})=>{let r=g(e,n.schema);return Q(n,r,t)?i.lift(r):i.wrapIn(r,t)},undoInputRule:()=>({state:e,dispatch:t})=>{let n=e.plugins;for(let i=0;i=0;e-=1)t.step(n.steps[e].invert(n.docs[e]));if(r.text){let n=t.doc.resolve(r.from).marks();t.replaceWith(r.from,r.to,e.schema.text(r.text,n))}else t.delete(r.from,r.to)}return!0}}return!1},unsetAllMarks:()=>({tr:e,dispatch:t})=>{let{selection:n}=e,{empty:i,ranges:r}=n;return!!i||(t&&r.forEach(t=>{e.removeMark(t.$from.pos,t.$to.pos)}),!0)},unsetMark:(e,t={})=>({tr:n,state:i,dispatch:r})=>{var o;let{extendEmptyMarkRange:s=!1}=t,{selection:a}=n,l=F(e,i.schema),{$from:c,empty:d,ranges:h}=a;if(!r)return!0;if(d&&s){let{from:e,to:t}=a,i=null===(o=c.marks().find(e=>e.type===l))||void 0===o?void 0:o.attrs,r=q(c,l,i);r&&(e=r.from,t=r.to),n.removeMark(e,t,l)}else h.forEach(e=>{n.removeMark(e.$from.pos,e.$to.pos,l)});return n.removeStoredMark(l),!0},updateAttributes:(e,t={})=>({tr:n,state:i,dispatch:r})=>{let o=null,s=null,a=X("string"==typeof e?e:e.name,i.schema);return!!a&&("node"===a&&(o=g(e,i.schema)),"mark"===a&&(s=F(e,i.schema)),r&&n.selection.ranges.forEach(e=>{let r=e.$from.pos,a=e.$to.pos;i.doc.nodesBetween(r,a,(e,i)=>{o&&o===e.type&&n.setNodeMarkup(i,void 0,{...e.attrs,...t}),s&&e.marks.length&&e.marks.forEach(o=>{if(s===o.type){let l=Math.max(i,r),c=Math.min(i+e.nodeSize,a);n.addMark(l,c,s.create({...o.attrs,...t}))}})})}),!0)},wrapIn:(e,t={})=>({state:n,dispatch:i})=>{let r=g(e,n.schema);return(0,l.ym)(r,t)(n,i)},wrapInList:(e,t={})=>({state:n,dispatch:i})=>{let r=g(e,n.schema);return(0,c.KI)(r,t)(n,i)}});let ek=I.create({name:"commands",addCommands:()=>({...ex})}),eS=I.create({name:"editable",addProseMirrorPlugins(){return[new i.Sy({key:new i.H$("editable"),props:{editable:()=>this.editor.options.editable}})]}}),eO=I.create({name:"focusEvents",addProseMirrorPlugins(){let{editor:e}=this;return[new i.Sy({key:new i.H$("focusEvents"),props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;let i=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(i),!1},blur:(t,n)=>{e.isFocused=!1;let i=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(i),!1}}}})]}});var eM=Object.freeze({__proto__:null,ClipboardTextSerializer:j,Commands:ek,Editable:eS,FocusEvents:eO,Keymap:I.create({name:"keymap",addKeyboardShortcuts(){let e=()=>this.editor.commands.first(({commands:e})=>[()=>e.undoInputRule(),()=>e.command(({tr:t})=>{let{selection:n,doc:r}=t,{empty:o,$anchor:s}=n,{pos:a,parent:l}=s,c=s.parent.isTextblock?t.doc.resolve(a-1):s,d=c.parent.type.spec.isolating,h=s.pos-s.parentOffset,u=d&&1===c.parent.childCount?h===s.pos:i.Y1.atStart(r).from===a;return!!o&&!!u&&!!l.type.isTextblock&&!l.textContent.length&&e.clearNodes()}),()=>e.deleteSelection(),()=>e.joinBackward(),()=>e.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:e})=>[()=>e.deleteSelection(),()=>e.deleteCurrentNode(),()=>e.joinForward(),()=>e.selectNodeForward()]),n={Enter:()=>this.editor.commands.first(({commands:e})=>[()=>e.newlineInCode(),()=>e.createParagraphNear(),()=>e.liftEmptyBlock(),()=>e.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},r={...n},o={...n,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return U()||G()?o:r},addProseMirrorPlugins(){return[new i.Sy({key:new i.H$("clearDocument"),appendTransaction:(e,t,n)=>{if(!(e.some(e=>e.docChanged)&&!t.doc.eq(n.doc)))return;let{empty:r,from:o,to:s}=t.selection,a=i.Y1.atStart(t.doc).from,l=i.Y1.atEnd(t.doc).to;if(r||o!==a||s!==l||0!==n.doc.textBetween(0,n.doc.content.size," "," ").length)return;let c=n.tr,u=d({state:n,transaction:c}),{commands:p}=new h({editor:this.editor,state:u});if(p.clearNodes(),c.steps.length)return c}})]}}),Tabindex:I.create({name:"tabindex",addProseMirrorPlugins(){return[new i.Sy({key:new i.H$("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}})});let eC=`.ProseMirror { position: relative; } .ProseMirror { word-wrap: break-word; white-space: pre-wrap; white-space: break-spaces; -webkit-font-variant-ligatures: none; font-variant-ligatures: none; font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */ } .ProseMirror [contenteditable="false"] { white-space: normal; } .ProseMirror [contenteditable="false"] [contenteditable="true"] { white-space: pre-wrap; } .ProseMirror pre { white-space: pre-wrap; } img.ProseMirror-separator { display: inline !important; border: none !important; margin: 0 !important; width: 1px !important; height: 1px !important; } .ProseMirror-gapcursor { display: none; pointer-events: none; position: absolute; margin: 0; } .ProseMirror-gapcursor:after { content: ""; display: block; position: absolute; top: -2px; width: 20px; border-top: 1px solid black; animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite; } @keyframes ProseMirror-cursor-blink { to { visibility: hidden; } } .ProseMirror-hideselection *::selection { background: transparent; } .ProseMirror-hideselection *::-moz-selection { background: transparent; } .ProseMirror-hideselection * { caret-color: transparent; } .ProseMirror-focused .ProseMirror-gapcursor { display: block; } .tippy-box[data-animation=fade][data-state=hidden] { opacity: 0 }`;class eT extends u{constructor(e={}){super(),this.isFocused=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),window.setTimeout(()=>{!this.isDestroyed&&(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}))},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=function(e,t,n){let i=document.querySelector("style[data-tiptap-style]");if(null!==i)return i;let r=document.createElement("style");return t&&r.setAttribute("nonce",t),r.setAttribute("data-tiptap-style",""),r.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(r),r}(eC,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},this.view&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,t){let n=b(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],i=this.state.reconfigure({plugins:n});this.view.updateState(i)}unregisterPlugin(e){if(this.isDestroyed)return;let t="string"==typeof e?`${e}$`:e.key,n=this.state.reconfigure({plugins:this.state.plugins.filter(e=>!e.key.startsWith(t))});this.view.updateState(n)}createExtensionManager(){let e=[...this.options.enableCoreExtensions?Object.values(eM):[],...this.options.extensions].filter(e=>["extension","node","mark"].includes(null==e?void 0:e.type));this.extensionManager=new R(e,this)}createCommandManager(){this.commandManager=new h({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){let e=et(this.options.content,this.schema,this.options.parseOptions),t=_(e,this.options.autofocus);this.view=new r.tk(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:i.yy.create({doc:e,selection:t||void 0})});let n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.createNodeViews(),this.prependClass(),this.view.dom.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;let t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(e=>{var t;return null===(t=this.capturedTransaction)||void 0===t?void 0:t.step(e)});return}let t=this.state.apply(e),n=!this.state.selection.eq(t.selection);this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e}),n&&this.emit("selectionUpdate",{editor:this,transaction:e});let i=e.getMeta("focus"),r=e.getMeta("blur");i&&this.emit("focus",{editor:this,event:i.event,transaction:e}),r&&this.emit("blur",{editor:this,event:r.event,transaction:e}),!(!e.docChanged||e.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return ed(this.state,e)}isActive(e,t){let n="string"==typeof e?e:null,i="string"==typeof e?t:e;return function(e,t,n={}){if(!t)return Q(e,null,n)||ef(e,null,n);let i=X(t,e.schema);return"node"===i?Q(e,t,n):"mark"===i&&ef(e,t,n)}(this.state,n,i)}getJSON(){return this.state.doc.toJSON()}getHTML(){return function(e,t){let n=s.PW.fromSchema(t).serializeFragment(e),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(n),i.innerHTML}(this.state.doc.content,this.schema)}getText(e){let{blockSeparator:t="\n\n",textSerializers:n={}}=e||{};return el(this.state.doc,{blockSeparator:t,textSerializers:{...$(this.schema),...n}})}get isEmpty(){return function(e){var t;let n=null===(t=e.type.createAndFill())||void 0===t?void 0:t.toJSON(),i=e.toJSON();return JSON.stringify(n)===JSON.stringify(i)}(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}get isDestroyed(){var e;return!(null===(e=this.view)||void 0===e?void 0:e.docView)}}function eE(e){return new E({find:e.find,handler:({state:t,range:n,match:i})=>{let r=w(e.getAttributes,void 0,i);if(!1===r||null===r)return null;let{tr:o}=t,s=i[i.length-1],a=i[0];if(s){let i=a.search(/\S/),l=n.from+a.indexOf(s),c=l+s.length;if(eu(n.from,n.to,t.doc).filter(t=>t.mark.type.excluded.find(n=>n===e.type&&n!==t.mark.type)).filter(e=>e.to>l).length)return null;cn.from&&o.delete(n.from+i,l);let d=n.from+i+s.length;o.addMark(n.from+i,d,e.type.create(r||{})),o.removeStoredMark(e.type)}}})}function eN(e){return new E({find:e.find,handler:({state:t,range:n,match:i})=>{let r=w(e.getAttributes,void 0,i)||{},{tr:o}=t,s=n.from,a=n.to,l=e.type.create(r);if(i[1]){let e=s+i[0].lastIndexOf(i[1]);e>a?e=a:a=e+i[1].length;let t=i[0][i[0].length-1];o.insertText(t,s+i[0].length-1),o.replaceWith(e,a,l)}else i[0]&&o.insert(s-1,e.type.create(r)).delete(o.mapping.map(s),o.mapping.map(a));o.scrollIntoView()}})}function eD(e){return new E({find:e.find,handler:({state:t,range:n,match:i})=>{let r=t.doc.resolve(n.from),o=w(e.getAttributes,void 0,i)||{};if(!r.node(-1).canReplaceWith(r.index(-1),r.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,o)}})}function eA(e){return new E({find:e.find,handler:({state:t,range:n,match:i})=>{let r=e.replace,o=n.from,s=n.to;if(i[1]){let e=i[0].lastIndexOf(i[1]);r+=i[0].slice(e+i[1].length);let t=(o+=e)-s;t>0&&(r=i[0].slice(e-t,e)+r,o=s)}t.tr.insertText(r,o,s)}})}function eP(e){return new E({find:e.find,handler:({state:t,range:n,match:i,chain:r})=>{let o=w(e.getAttributes,void 0,i)||{},s=t.tr.delete(n.from,n.to),l=s.doc.resolve(n.from).blockRange(),c=l&&(0,a.nd)(l,e.type,o);if(!c)return null;if(s.wrap(l,c),e.keepMarks&&e.editor){let{selection:n,storedMarks:i}=t,{splittableMarks:r}=e.editor.extensionManager,o=i||n.$to.parentOffset&&n.$from.marks();if(o){let e=o.filter(e=>r.includes(e.type.name));s.ensureMarks(e)}}if(e.keepAttributes){let t="bulletList"===e.type.name||"orderedList"===e.type.name?"listItem":"taskList";r().updateAttributes(t,o).run()}let d=s.doc.resolve(n.from-1).nodeBefore;d&&d.type===e.type&&(0,a.Mn)(s.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(i,d))&&s.join(n.from-1)}})}class eR{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=w(p(this,"addOptions",{name:this.name}))),this.storage=w(p(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new eR(e)}configure(e={}){let t=this.extend();return t.options=B(this.options,e),t.storage=w(p(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){let t=new eR(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=w(p(t,"addOptions",{name:t.name})),t.storage=w(p(t,"addStorage",{name:t.name,options:t.options})),t}static handleExit({editor:e,mark:t}){let{tr:n}=e.state,i=e.state.selection.$from;if(i.pos===i.end()){let r=i.marks();if(!r.find(e=>(null==e?void 0:e.type.name)===t.name))return!1;let o=r.find(e=>(null==e?void 0:e.type.name)===t.name);return o&&n.removeStoredMark(o),n.insertText(" ",i.pos),e.view.dispatch(n),!0}return!1}}class eL{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=w(p(this,"addOptions",{name:this.name}))),this.storage=w(p(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new eL(e)}configure(e={}){let t=this.extend();return t.options=B(this.options,e),t.storage=w(p(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){let t=new eL(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=w(p(t,"addOptions",{name:t.name})),t.storage=w(p(t,"addStorage",{name:t.name,options:t.options})),t}}class eB{constructor(e,t,n){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var t,n,r,o,s,a,l;let{view:c}=this.editor,d=e.target,h=3===d.nodeType?null===(t=d.parentElement)||void 0===t?void 0:t.closest("[data-drag-handle]"):d.closest("[data-drag-handle]");if(!this.dom||(null===(n=this.contentDOM)||void 0===n?void 0:n.contains(d))||!h)return;let u=0,p=0;if(this.dom!==h){let t=this.dom.getBoundingClientRect(),n=h.getBoundingClientRect(),i=null!==(r=e.offsetX)&&void 0!==r?r:null===(o=e.nativeEvent)||void 0===o?void 0:o.offsetX,l=null!==(s=e.offsetY)&&void 0!==s?s:null===(a=e.nativeEvent)||void 0===a?void 0:a.offsetY;u=n.x-t.x+i,p=n.y-t.y+l}null===(l=e.dataTransfer)||void 0===l||l.setDragImage(this.dom,u,p);let f=i.qv.create(c.state.doc,this.getPos()),m=c.state.tr.setSelection(f);c.dispatch(m)}stopEvent(e){var t;if(!this.dom)return!1;if("function"==typeof this.options.stopEvent)return this.options.stopEvent({event:e});let n=e.target;if(!(this.dom.contains(n)&&!(null===(t=this.contentDOM)||void 0===t?void 0:t.contains(n))))return!1;let r=e.type.startsWith("drag"),o="drop"===e.type;if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!o&&!r)return!0;let{isEditable:s}=this.editor,{isDragging:a}=this,l=!!this.node.type.spec.draggable,c=i.qv.isSelectable(this.node),d="copy"===e.type,h="paste"===e.type,u="cut"===e.type,p="mousedown"===e.type;if(!l&&c&&r&&e.preventDefault(),l&&r&&!a)return e.preventDefault(),!1;if(l&&s&&!a&&p){let e=n.closest("[data-drag-handle]");e&&(this.dom===e||this.dom.contains(e))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!a&&!o&&!d&&!h&&!u&&(!p||!c)}ignoreMutation(e){return!this.dom||!this.contentDOM||("function"==typeof this.options.ignoreMutation?this.options.ignoreMutation({mutation:e}):!!this.node.isLeaf||!!this.node.isAtom||!("selection"===e.type||this.dom.contains(e.target)&&"childList"===e.type&&(U()||"Android"===navigator.platform||/android/i.test(navigator.userAgent))&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(e=>e.isContentEditable))&&(this.contentDOM===e.target&&"attributes"===e.type||!this.contentDOM.contains(e.target)))}updateAttributes(e){this.editor.commands.command(({tr:t})=>{let n=this.getPos();return t.setNodeMarkup(n,void 0,{...this.node.attrs,...e}),!0})}deleteNode(){let e=this.getPos(),t=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:t})}}function eI(e){return new A({find:e.find,handler:({state:t,range:n,match:i,pasteEvent:r})=>{let o=w(e.getAttributes,void 0,i,r);if(!1===o||null===o)return null;let{tr:s}=t,a=i[i.length-1],l=i[0],c=n.to;if(a){let i=l.search(/\S/),r=n.from+l.indexOf(a),d=r+a.length;if(eu(n.from,n.to,t.doc).filter(t=>t.mark.type.excluded.find(n=>n===e.type&&n!==t.mark.type)).filter(e=>e.to>r).length)return null;dn.from&&s.delete(n.from+i,r),c=n.from+i+a.length,s.addMark(n.from+i,c,e.type.create(o||{})),s.removeStoredMark(e.type)}}})}function ez(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}},19512:function(e,t,n){"use strict";n.d(t,{V6:()=>o,ZP:()=>o});var i=n(88897);let r=/^\s*>\s$/,o=i.NB.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:e}){return["blockquote",(0,i.P1)(this.options.HTMLAttributes,e),0]},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()}},addInputRules(){return[(0,i.S0)({find:r,type:this.type})]}})},56070:function(e,t,n){"use strict";n.d(t,{ZP:()=>l,d8:()=>l});var i=n(88897);let r=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,o=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,s=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,a=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,l=i.vc.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!==e.style.fontWeight&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],renderHTML({HTMLAttributes:e}){return["strong",(0,i.P1)(this.options.HTMLAttributes,e),0]},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,i.Cf)({find:r,type:this.type}),(0,i.Cf)({find:s,type:this.type})]},addPasteRules(){return[(0,i.K9)({find:o,type:this.type}),(0,i.K9)({find:a,type:this.type})]}})},36779:function(e,t,n){"use strict";n.d(t,{q3:()=>a});var i=n(88897),r=n(92007),o=n(45088);class s{constructor({editor:e,element:t,view:n,tippyOptions:r={},updateDelay:o=250,shouldShow:s}){this.preventHide=!1,this.shouldShow=({view:e,state:t,from:n,to:r})=>{let{doc:o,selection:s}=t,{empty:a}=s,l=!o.textBetween(n,r).length&&(0,i.xh)(t.selection),c=this.element.contains(document.activeElement);return!!(e.hasFocus()||c)&&!a&&!l&&!!this.editor.isEditable},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:e})=>{var t;if(this.preventHide){this.preventHide=!1;return}!((null==e?void 0:e.relatedTarget)&&(null===(t=this.element.parentNode)||void 0===t?void 0:t.contains(e.relatedTarget)))&&this.hide()},this.tippyBlurHandler=e=>{this.blurHandler({event:e})},this.handleDebouncedUpdate=(e,t)=>{let n=!(null==t?void 0:t.selection.eq(e.state.selection)),i=!(null==t?void 0:t.doc.eq(e.state.doc));(n||i)&&(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(e,n,i,t)},this.updateDelay))},this.updateHandler=(e,t,n,r)=>{var o,s,a;let{state:l,composing:c}=e,{selection:d}=l;if(c||!t&&!n)return;this.createTooltip();let{ranges:h}=d,u=Math.min(...h.map(e=>e.$from.pos)),p=Math.max(...h.map(e=>e.$to.pos));if(!(null===(o=this.shouldShow)||void 0===o?void 0:o.call(this,{editor:this.editor,view:e,state:l,oldState:r,from:u,to:p}))){this.hide();return}null===(s=this.tippy)||void 0===s||s.setProps({getReferenceClientRect:(null===(a=this.tippyOptions)||void 0===a?void 0:a.getReferenceClientRect)||(()=>{if((0,i.EG)(l.selection)){let t=e.nodeDOM(u),n=t.dataset.nodeViewWrapper?t:t.querySelector("[data-node-view-wrapper]");if(n&&(t=n.firstChild),t)return t.getBoundingClientRect()}return(0,i.pr)(e,u,p)})}),this.show()},this.editor=e,this.element=t,this.view=n,this.updateDelay=o,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){let{element:e}=this.editor.options,t=!!e.parentElement;!this.tippy&&t&&(this.tippy=(0,o.ZP)(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,t){let{state:n}=e,i=n.selection.$from.pos!==n.selection.$to.pos;if(this.updateDelay>0&&i){this.handleDebouncedUpdate(e,t);return}let r=!(null==t?void 0:t.selection.eq(e.state.selection)),o=!(null==t?void 0:t.doc.eq(e.state.doc));this.updateHandler(e,r,o,t)}show(){var e;null===(e=this.tippy)||void 0===e||e.show()}hide(){var e;null===(e=this.tippy)||void 0===e||e.hide()}destroy(){var e,t;(null===(e=this.tippy)||void 0===e?void 0:e.popper.firstChild)&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),null===(t=this.tippy)||void 0===t||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}let a=e=>new r.Sy({key:"string"==typeof e.pluginKey?new r.H$(e.pluginKey):e.pluginKey,view:t=>new s({view:t,...e})});i.hj.create({name:"bubbleMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[a({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}})},56782:function(e,t,n){"use strict";n.d(t,{ZP:()=>a,dn:()=>a});var i=n(88897),r=n(92007);let o=/^```([a-z]+)?[\s\n]$/,s=/^~~~([a-z]+)?[\s\n]$/,a=i.NB.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:e=>{var t;let{languageClassPrefix:n}=this.options,i=[...(null===(t=e.firstElementChild)||void 0===t?void 0:t.classList)||[]].filter(e=>e.startsWith(n)).map(e=>e.replace(n,""))[0];return i||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:e,HTMLAttributes:t}){return["pre",(0,i.P1)(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},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()},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:t}=e,{selection:n}=t,{$from:i,empty:r}=n;if(!r||i.parent.type!==this.type)return!1;let o=i.parentOffset===i.parent.nodeSize-2,s=i.parent.textContent.endsWith("\n\n");return!!o&&!!s&&e.chain().command(({tr:e})=>(e.delete(i.pos-2,i.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:n,doc:i}=t,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type||r.parentOffset!==r.parent.nodeSize-2)return!1;let s=r.after();return!(void 0===s||i.nodeAt(s))&&e.commands.exitCode()}}},addInputRules(){return[(0,i.zK)({find:o,type:this.type,getAttributes:e=>({language:e[1]})}),(0,i.zK)({find:s,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new r.Sy({key:new r.H$("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData("text/plain"),i=t.clipboardData.getData("vscode-editor-data"),o=i?JSON.parse(i):void 0,s=null==o?void 0:o.mode;if(!n||!s)return!1;let{tr:a}=e.state;return a.replaceSelectionWith(this.type.create({language:s})),a.setSelection(r.Bs.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.insertText(n.replace(/\r\n?/g,"\n")),a.setMeta("paste",!0),e.dispatch(a),!0}}})]}})},24717:function(e,t,n){"use strict";n.d(t,{EK:()=>s,ZP:()=>s});var i=n(88897);let r=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/,o=/(?:^|\s)((?:`)((?:[^`]+))(?:`))/g,s=i.vc.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:e}){return["code",(0,i.P1)(this.options.HTMLAttributes,e),0]},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()}},addInputRules(){return[(0,i.Cf)({find:r,type:this.type})]},addPasteRules(){return[(0,i.K9)({find:o,type:this.type})]}})},43557:function(e,t,n){"use strict";n.d(t,{B:()=>i,Z:()=>i});let i=n(88897).NB.create({name:"doc",topNode:!0,content:"block+"})},51127:function(e,t,n){"use strict";n.d(t,{A:()=>o,Z:()=>o});var i=n(88897),r=n(141);let o=i.hj.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>(0,r.Yw)(e,t),redo:()=>({state:e,dispatch:t})=>(0,r.KX)(e,t)}),addProseMirrorPlugins(){return[(0,r.m8)(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-Z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-Y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Shift-Mod-Z":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}})},75481:function(e,t,n){"use strict";n.d(t,{Tx:()=>l,ZP:()=>l});var i=n(88897);let r=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,o=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,s=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,a=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,l=i.vc.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"em"},{tag:"i",getAttrs:e=>"normal"!==e.style.fontStyle&&null},{style:"font-style=italic"}],renderHTML({HTMLAttributes:e}){return["em",(0,i.P1)(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)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[(0,i.Cf)({find:r,type:this.type}),(0,i.Cf)({find:s,type:this.type})]},addPasteRules(){return[(0,i.K9)({find:o,type:this.type}),(0,i.K9)({find:a,type:this.type})]}})},61767:function(e,t,n){"use strict";n.d(t,{Z:()=>eE,r:()=>eE});var i=n(88897);let r=(e,t)=>{for(let n in t)e[n]=t[n];return e},o="numeric",s="ascii",a="alpha",l="asciinumeric",c="alphanumeric",d="domain",h="emoji",u="whitespace";function p(e,t,n){for(let i in t[o]&&(t[l]=!0,t[c]=!0),t[s]&&(t[l]=!0,t[a]=!0),t[l]&&(t[c]=!0),t[a]&&(t[c]=!0),t[c]&&(t[d]=!0),t[h]&&(t[d]=!0),t){let t=(i in n||(n[i]=[]),n[i]);0>t.indexOf(e)&&t.push(e)}}function f(e){void 0===e&&(e=null),this.j={},this.jr=[],this.jd=null,this.t=e}f.groups={},f.prototype={accepts(){return!!this.t},go(e){let t=this.j[e];if(t)return t;for(let t=0;t=0&&(n[i]=!0);return n}(o.t,i),n),i):n&&p(t,n,i)),o.t=t),this.j[e]=o,o}};let m=(e,t,n,i,r)=>e.ta(t,n,i,r),g=(e,t,n,i,r)=>e.tr(t,n,i,r),y=(e,t,n,i,r)=>e.ts(t,n,i,r),v=(e,t,n,i,r)=>e.tt(t,n,i,r),b="WORD",w="UWORD",x="LOCALHOST",k="UTLD",S="SCHEME",O="SLASH_SCHEME",M="OPENBRACE",C="OPENBRACKET",T="OPENANGLEBRACKET",E="OPENPAREN",N="CLOSEBRACE",D="CLOSEBRACKET",A="CLOSEANGLEBRACKET",P="CLOSEPAREN",R="AMPERSAND",L="APOSTROPHE",B="ASTERISK",I="BACKSLASH",z="BACKTICK",$="CARET",j="COLON",H="COMMA",V="DOLLAR",q="EQUALS",F="EXCLAMATION",K="HYPHEN",W="PERCENT",_="PIPE",U="PLUS",J="POUND",Z="QUERY",Y="QUOTE",G="SEMI",Q="SLASH",X="TILDE",ee="UNDERSCORE",et="EMOJI";var en=Object.freeze({__proto__:null,WORD:b,UWORD:w,LOCALHOST:x,TLD:"TLD",UTLD:k,SCHEME:S,SLASH_SCHEME:O,NUM:"NUM",WS:"WS",NL:"NL",OPENBRACE:M,OPENBRACKET:C,OPENANGLEBRACKET:T,OPENPAREN:E,CLOSEBRACE:N,CLOSEBRACKET:D,CLOSEANGLEBRACKET:A,CLOSEPAREN:P,AMPERSAND:R,APOSTROPHE:L,ASTERISK:B,AT:"AT",BACKSLASH:I,BACKTICK:z,CARET:$,COLON:j,COMMA:H,DOLLAR:V,DOT:"DOT",EQUALS:q,EXCLAMATION:F,HYPHEN:K,PERCENT:W,PIPE:_,PLUS:U,POUND:J,QUERY:Z,QUOTE:Y,SEMI:G,SLASH:Q,TILDE:X,UNDERSCORE:ee,EMOJI:et,SYM:"SYM"});let ei=/[a-z]/,er=/\p{L}/u,eo=/\p{Emoji}/u,es=/\d/,ea=/\s/,el=null,ec=null;function ed(e,t,n,i,r){let o;let s=t.length;for(let n=0;n=0;)r++;if(r>0){t.push(n.join(""));for(let t=parseInt(e.substring(i,i+r),10);t>0;t--)n.pop();i+=r}else n.push(e[i]),i++}return t}let eu={defaultProtocol:"http",events:null,format:ef,formatHref:ef,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function ep(e,t){void 0===t&&(t=null);let n=r({},eu);e&&(n=r(n,e instanceof ep?e.o:e));let i=n.ignoreTags,o=[];for(let e=0;ee,check(e){return this.get("validate",e.toString(),e)},get(e,t,n){let i=null!=t,r=this.o[e];return r&&("object"==typeof r?"function"==typeof(r=n.t in r?r[n.t]:eu[e])&&i&&(r=r(t,n)):"function"==typeof r&&i&&(r=r(t,n.t,n))),r},getObj(e,t,n){let i=this.o[e];return"function"==typeof i&&null!=t&&(i=i(t,n.t,n)),i},render(e){let t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}},em.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){let t=this.toString(),n=e.get("truncate",t,this),i=e.get("format",t,this);return n&&i.length>n?i.substring(0,n)+"…":i},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){return void 0===e&&(e=eu.defaultProtocol),{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),i=e.get("tagName",t,this),o=this.toFormattedString(e),s={},a=e.get("className",t,this),l=e.get("target",t,this),c=e.get("rel",t,this),d=e.getObj("attributes",t,this),h=e.getObj("events",t,this);return s.href=n,a&&(s.class=a),l&&(s.target=l),c&&(s.rel=c),d&&r(s,d),{tagName:i,attributes:s,content:o,eventListeners:h}}};let ey=eg("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),ev=eg("text"),eb=eg("nl"),ew=eg("url",{isLink:!0,toHref(e){return void 0===e&&(e=eu.defaultProtocol),this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==x&&e[1].t===j}}),ex=e=>new f(e);function ek(e,t,n){let i=n[0].s,r=n[n.length-1].e;return new e(t.slice(i,r),n)}let eS="undefined"!=typeof console&&console&&console.warn||(()=>{}),eO={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function eM(e,t){if(void 0===t&&(t=!1),eO.initialized&&eS(`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.\n 1. Must only contain digits, lowercase ASCII letters or "-"\n 2. Cannot start or end with "-"\n 3. "-" cannot repeat');eO.customSchemes.push([e,t])}function eC(e,t,n){if(void 0===t&&(t=null),void 0===n&&(n=null),t&&"object"==typeof t){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}let i=new ep(n),c=(eO.initialized||function(){eO.scanner=function(e){void 0===e&&(e=[]);let t={};f.groups=t;let n=new f;null==el&&(el=eh("aaa1rp3barth4b0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0faromeo7ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re2s2c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y0eats7k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking0channel11l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t0isalat7u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0at2delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d0network8tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntdoor4ier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5gtv3iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0eles2s3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1nder2le4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster5ia3d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4de2k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0cys3drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7serati6ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic3tual5v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rthwesternmutual14on4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3ssagens7y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cher3ks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w0time7i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ffany5ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0channel7ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xf6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lkswagen7vo3te1ing3o2yage5u0elos6wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2")),null==ec&&(ec=eh("ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5تصالات6رامكو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")),v(n,"'",L),v(n,"{",M),v(n,"[",C),v(n,"<",T),v(n,"(",E),v(n,"}",N),v(n,"]",D),v(n,">",A),v(n,")",P),v(n,"&",R),v(n,"*",B),v(n,"@","AT"),v(n,"`",z),v(n,"^",$),v(n,":",j),v(n,",",H),v(n,"$",V),v(n,".","DOT"),v(n,"=",q),v(n,"!",F),v(n,"-",K),v(n,"%",W),v(n,"|",_),v(n,"+",U),v(n,"#",J),v(n,"?",Z),v(n,'"',Y),v(n,"/",Q),v(n,";",G),v(n,"~",X),v(n,"_",ee),v(n,"\\",I);let i=g(n,es,"NUM",{[o]:!0});g(i,es,i);let c=g(n,ei,b,{[s]:!0});g(c,ei,c);let m=g(n,er,w,{[a]:!0});g(m,ei),g(m,er,m);let eu=g(n,ea,"WS",{[u]:!0});v(n,"\n","NL",{[u]:!0}),v(eu,"\n"),g(eu,ea,eu);let ep=g(n,eo,et,{[h]:!0});g(ep,eo,ep),v(ep,"️",ep),g(v(ep,"‍"),eo,ep);let ef=[[ei,c]],em=[[ei,null],[er,m]];for(let e=0;ee[0]>t[0]?1:-1);for(let t=0;t=0?r[d]=!0:ei.test(i)?es.test(i)?r[l]=!0:r[s]=!0:r[o]=!0,y(n,i,i,r)}return y(n,"localhost",x,{ascii:!0}),n.jd=new f("SYM"),{start:n,tokens:r({groups:t},en)}}(eO.customSchemes);for(let e=0;e=0&&u++,r++,d++;if(u<0)(r-=d)0&&(o.push(ek(ev,t,s)),s=[]),r-=u,d-=u;let e=h.t,i=n.slice(r-d,r);o.push(ek(e,t,i))}}return s.length>0&&o.push(ek(ev,t,s)),o}(eO.parser.start,e,function(e,t){let n=function(e){let t=[],n=e.length,i=0;for(;i56319||i+1===n||(r=e.charCodeAt(i+1))<56320||r>57343?e[i]:e.slice(i,i+2);t.push(s),i+=s.length}return t}(t.replace(/[A-Z]/g,e=>e.toLowerCase())),i=n.length,r=[],o=0,s=0;for(;s=0&&(h+=n[s].length,u++),c+=n[s].length,o+=n[s].length,s++;o-=h,s-=u,c-=h,r.push({t:d.t,v:t.slice(o-c,o),s:o-c,e:o})}return r}(eO.scanner.start,e))),eu=[];for(let e=0;e{if("string"==typeof e){eM(e);return}eM(e.scheme,e.optionalSlashes)})},onDestroy(){f.groups={},eO.scanner=null,eO.parser=null,eO.tokenQueue=[],eO.pluginQueue=[],eO.customSchemes=[],eO.initialized=!1},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}),addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:e}){return["a",(0,i.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{setLink:e=>({chain:t})=>t().setMark(this.name,e).setMeta("preventAutolink",!0).run(),toggleLink:e=>({chain:t})=>t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[(0,i.K9)({find:e=>eC(e).filter(e=>!this.options.validate||this.options.validate(e.value)).filter(e=>e.isLink).map(e=>({text:e.value,index:e.start,data:e})),type:this.type,getAttributes:(e,t)=>{var n,i;let r=null===(n=null==t?void 0:t.clipboardData)||void 0===n?void 0:n.getData("text/html"),o=null==r?void 0:r.match(/href="([^"]*)"/);return o?{href:o[1]}:{href:null===(i=e.data)||void 0===i?void 0:i.href}}})]},addProseMirrorPlugins(){var e,t,n;let r=[];return this.options.autolink&&r.push((e={type:this.type,validate:this.options.validate},new eT.Sy({key:new eT.H$("autolink"),appendTransaction:(t,n,r)=>{let o=t.some(e=>e.docChanged)&&!n.doc.eq(r.doc),s=t.some(e=>e.getMeta("preventAutolink"));if(!o||s)return;let{tr:a}=r,l=(0,i.XP)(n.doc,[...t]);if((0,i.QC)(l).forEach(({newRange:t})=>{let n,o;let s=(0,i.b5)(r.doc,t,e=>e.isTextblock);if(s.length>1?(n=s[0],o=r.doc.textBetween(n.pos,n.pos+n.node.nodeSize,void 0," ")):s.length&&r.doc.textBetween(t.from,t.to," "," ").endsWith(" ")&&(n=s[0],o=r.doc.textBetween(n.pos,t.to,void 0," ")),n&&o){let t=o.split(" ").filter(e=>""!==e);if(t.length<=0)return!1;let s=t[t.length-1],l=n.pos+o.lastIndexOf(s);if(!s)return!1;eC(s).filter(e=>e.isLink).map(e=>({...e,from:l+e.start+1,to:l+e.end+1})).filter(e=>!r.schema.marks.code||!r.doc.rangeHasMark(e.from,e.to,r.schema.marks.code)).filter(t=>!e.validate||e.validate(t.value)).forEach(t=>{!(0,i.tI)(t.from,t.to,r.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}}))),this.options.openOnClick&&r.push((t={type:this.type},new eT.Sy({key:new eT.H$("handleClickLink"),props:{handleClick:(e,n,r)=>{var o,s;if(0!==r.button||"A"!==r.target.nodeName)return!1;let a=(0,i.u9)(e.state,t.type.name),l=r.target,c=null!==(o=null==l?void 0:l.href)&&void 0!==o?o:a.href,d=null!==(s=null==l?void 0:l.target)&&void 0!==s?s:a.target;return!!l&&!!c&&(e.editable&&window.open(c,d),!0)}}}))),this.options.linkOnPaste&&r.push((n={editor:this.editor,type:this.type},new eT.Sy({key:new eT.H$("handlePasteLink"),props:{handlePaste:(e,t,i)=>{var r;let{state:o}=e,{selection:s}=o,{empty:a}=s;if(a)return!1;let l="";i.content.forEach(e=>{l+=e.textContent});let c=eC(l).find(e=>e.isLink&&e.value===l);if(!l||!c)return!1;let d=null===(r=t.clipboardData)||void 0===r?void 0:r.getData("text/html"),h=null==d?void 0:d.match(/href="([^"]*)"/),u=h?h[1]:c.href;return n.editor.commands.setMark(n.type,{href:u}),!0}}}))),r}})},55786:function(e,t,n){"use strict";n.d(t,{H:()=>r,Z:()=>r});var i=n(88897);let r=i.NB.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",(0,i.P1)(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}})},59981:function(e,t,n){"use strict";n.d(t,{pf:()=>l,ZP:()=>l});var i=n(88897),r=n(92007),o=n(45901);let s=new r.H$("suggestion"),a=new r.H$("mention"),l=i.NB.create({name:"mention",addOptions(){return{HTMLAttributes:{},renderLabel({options:e,node:t}){var n;return`${e.suggestion.char}${null!==(n=t.attrs.label)&&void 0!==n?n:t.attrs.id}`},suggestion:{char:"@",pluginKey:a,command:({editor:e,range:t,props:n})=>{var i,r;let o=e.view.state.selection.$to.nodeAfter;(null===(i=null==o?void 0:o.text)||void 0===i?void 0:i.startsWith(" "))&&(t.to+=1),e.chain().focus().insertContentAt(t,[{type:this.name,attrs:n},{type:"text",text:" "}]).run(),null===(r=window.getSelection())||void 0===r||r.collapseToEnd()},allow:({state:e,range:t})=>{let n=e.doc.resolve(t.from),i=e.schema.nodes[this.name];return!!n.parent.type.contentMatch.matchType(i)}}}},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}:{}}}),parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:e,HTMLAttributes:t}){return["span",(0,i.P1)({"data-type":this.name},this.options.HTMLAttributes,t),this.options.renderLabel({options:this.options,node:e})]},renderText({node:e}){return this.options.renderLabel({options:this.options,node:e})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:e,state:t})=>{let n=!1,{selection:i}=t,{empty:r,anchor:o}=i;return!!r&&(t.doc.nodesBetween(o-1,o,(t,i)=>{if(t.type.name===this.name)return n=!0,e.insertText(this.options.suggestion.char||"",i,i+t.nodeSize),!1}),n)})}},addProseMirrorPlugins(){return[function({pluginKey:e=s,editor:t,char:n="@",allowSpaces:a=!1,allowedPrefixes:l=[" "],startOfLine:c=!1,decorationTag:d="span",decorationClass:h="suggestion",command:u=()=>null,items:p=()=>[],render:f=()=>({}),allow:m=()=>!0}){let g;let y=null==f?void 0:f(),v=new r.Sy({key:e,view(){return{update:async(e,n)=>{var i,r,o,s,a,l,c;let d=null===(i=this.key)||void 0===i?void 0:i.getState(n),h=null===(r=this.key)||void 0===r?void 0:r.getState(e.state),f=d.active&&h.active&&d.range.from!==h.range.from,m=!d.active&&h.active,v=d.active&&!h.active,b=!m&&!v&&d.query!==h.query,w=m||f,x=b&&!f,k=v||f;if(!w&&!x&&!k)return;let S=k&&!w?d:h,O=e.dom.querySelector(`[data-decoration-id="${S.decorationId}"]`);g={editor:t,range:S.range,query:S.query,text:S.text,items:[],command:e=>{u({editor:t,range:S.range,props:e})},decorationNode:O,clientRect:O?()=>{var n;let{decorationId:i}=null===(n=this.key)||void 0===n?void 0:n.getState(t.state),r=e.dom.querySelector(`[data-decoration-id="${i}"]`);return(null==r?void 0:r.getBoundingClientRect())||null}:null},w&&(null===(o=null==y?void 0:y.onBeforeStart)||void 0===o||o.call(y,g)),x&&(null===(s=null==y?void 0:y.onBeforeUpdate)||void 0===s||s.call(y,g)),(x||w)&&(g.items=await p({editor:t,query:S.query})),k&&(null===(a=null==y?void 0:y.onExit)||void 0===a||a.call(y,g)),x&&(null===(l=null==y?void 0:y.onUpdate)||void 0===l||l.call(y,g)),w&&(null===(c=null==y?void 0:y.onStart)||void 0===c||c.call(y,g))},destroy:()=>{var e;g&&(null===(e=null==y?void 0:y.onExit)||void 0===e||e.call(y,g))}}},state:{init:()=>({active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}),apply(e,r,o,s){let{isEditable:d}=t,{composing:h}=t.view,{selection:u}=e,{empty:p,from:f}=u,g={...r};if(g.composing=h,d&&(p||t.view.composing)){(fr.range.to)&&!h&&!r.composing&&(g.active=!1);let e=function(e){var t;let{char:n,allowSpaces:r,allowedPrefixes:o,startOfLine:s,$position:a}=e,l=(0,i.Ov)(n),c=RegExp(`\\s${l}$`),d=s?"^":"",h=r?RegExp(`${d}${l}.*?(?=\\s${l}|$)`,"gm"):RegExp(`${d}(?:^)?${l}[^\\s${l}]*`,"gm"),u=(null===(t=a.nodeBefore)||void 0===t?void 0:t.isText)&&a.nodeBefore.text;if(!u)return null;let p=a.pos-u.length,f=Array.from(u.matchAll(h)).pop();if(!f||void 0===f.input||void 0===f.index)return null;let m=f.input.slice(Math.max(0,f.index-1),f.index),g=RegExp(`^[${null==o?void 0:o.join("")}\0]?$`).test(m);if(null!==o&&!g)return null;let y=p+f.index,v=y+f[0].length;return(r&&c.test(u.slice(v-1,v+1))&&(f[0]+=" ",v+=1),y=a.pos)?{range:{from:y,to:v},query:f[0].slice(n.length),text:f[0]}:null}({char:n,allowSpaces:a,allowedPrefixes:l,startOfLine:c,$position:u.$from}),o=`id_${Math.floor(0xffffffff*Math.random())}`;e&&m({editor:t,state:s,range:e.range})?(g.active=!0,g.decorationId=r.decorationId?r.decorationId:o,g.range=e.range,g.query=e.query,g.text=e.text):g.active=!1}else g.active=!1;return g.active||(g.decorationId=null,g.range={from:0,to:0},g.query=null,g.text=null),g}},props:{handleKeyDown(e,t){var n;let{active:i,range:r}=v.getState(e.state);return!!i&&((null===(n=null==y?void 0:y.onKeyDown)||void 0===n?void 0:n.call(y,{view:e,event:t,range:r}))||!1)},decorations(e){let{active:t,range:n,decorationId:i}=v.getState(e);return t?o.EH.create(e.doc,[o.p.inline(n.from,n.to,{nodeName:d,class:h,"data-decoration-id":i})]):null}}});return v}({editor:this.editor,...this.options.suggestion})]}})},91077:function(e,t,n){"use strict";n.d(t,{Z:()=>r,n:()=>r});var i=n(88897);let r=i.NB.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",(0,i.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}})},87597:function(e,t,n){"use strict";n.d(t,{Re:()=>s,ZP:()=>s});var i=n(88897);let r=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,o=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,s=i.vc.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,i.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){let e={};return(0,i.eE)()?e["Mod-Shift-s"]=()=>this.editor.commands.toggleStrike():e["Ctrl-Shift-s"]=()=>this.editor.commands.toggleStrike(),e},addInputRules(){return[(0,i.Cf)({find:r,type:this.type})]},addPasteRules(){return[(0,i.K9)({find:o,type:this.type})]}})},55963:function(e,t,n){"use strict";n.d(t,{Z:()=>i,x:()=>i});let i=n(88897).NB.create({name:"text",group:"inline"})},141:function(e,t,n){"use strict";n.d(t,{Yw:()=>x,KX:()=>k,m8:()=>b});var i=function(){};i.prototype.append=function(e){return e.length?(e=i.from(e),!this.length&&e||e.length<200&&this.leafAppend(e)||this.length<200&&e.leafPrepend(this)||this.appendInner(e)):this},i.prototype.prepend=function(e){return e.length?i.from(e).append(this):this},i.prototype.appendInner=function(e){return new o(this,e)},i.prototype.slice=function(e,t){return(void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t)?i.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},i.prototype.get=function(e){if(!(e<0)&&!(e>=this.length))return this.getInner(e)},i.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)},i.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var i=[];return this.forEach(function(t,n){return i.push(e(t,n))},t,n),i},i.from=function(e){return e instanceof i?e:e&&e.length?new r(e):i.empty};var r=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,i){for(var r=t;r=n;r--)if(!1===e(this.values[r],i+r))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}(i);i.empty=new r([]);var o=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 er&&!1===this.right.forEachInner(e,Math.max(t-r,0),Math.min(this.length,n)-r,i+r))return!1},t.prototype.forEachInvertedInner=function(e,t,n,i){var r=this.left.length;if(t>r&&!1===this.right.forEachInvertedInner(e,t-r,Math.max(n,r)-r,i+r)||n=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}(i),s=n(83311),a=n(92007);class l{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){let n,i,r,o;if(0==this.eventCount)return null;let s=this.items.length;for(;;s--)if(this.items.get(s-1).selection){--s;break}t&&(i=(n=this.remapping(s,this.items.length)).maps.length);let a=e.tr,d=[],h=[];return this.items.forEach((e,t)=>{if(!e.step){n||(i=(n=this.remapping(s,t+1)).maps.length),i--,h.push(e);return}if(n){h.push(new c(e.map));let t=e.step.map(n.slice(i)),r;t&&a.maybeStep(t).doc&&(r=a.mapping.maps[a.mapping.maps.length-1],d.push(new c(r,void 0,void 0,d.length+h.length))),i--,r&&n.appendMap(r,i)}else a.maybeStep(e.step);if(e.selection)return r=n?e.selection.map(n.slice(i)):e.selection,o=new l(this.items.slice(0,s).append(h.reverse().concat(d)),this.eventCount-1),!1},this.items.length,0),{remaining:o,transform:a,selection:r}}addTransform(e,t,n,i){var r,o;let s,a=[],d=this.eventCount,u=this.items,p=!i&&u.length?u.get(u.length-1):null;for(let n=0;nh&&(r=u,o=f,r.forEach((e,t)=>{if(e.selection&&0==o--)return s=t,!1}),u=r.slice(s),d-=f),new l(u.append(a),d)}remapping(e,t){let n=new s.vs;return this.items.forEach((t,i)=>{let r=null!=t.mirrorOffset&&i-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,r)},e,t),n}addMaps(e){return 0==this.eventCount?this:new l(this.items.append(e.map(e=>new c(e))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],i=Math.max(0,this.items.length-t),r=e.mapping,o=e.steps.length,s=this.eventCount;this.items.forEach(e=>{e.selection&&s--},i);let a=t;this.items.forEach(t=>{let i=r.getMirror(--a);if(null==i)return;o=Math.min(o,i);let l=r.maps[i];if(t.step){let o=e.steps[i].invert(e.docs[i]),d=t.selection&&t.selection.map(r.slice(a+1,i));d&&s++,n.push(new c(l,o,d))}else n.push(new c(l))},i);let d=[];for(let e=t;e500&&(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=[],o=0;return this.items.forEach((i,s)=>{if(s>=e)r.push(i),i.selection&&o++;else if(i.step){let e=i.step.map(t.slice(n)),s=e&&e.getMap();if(n--,s&&t.appendMap(s,n),e){let a=i.selection&&i.selection.map(t.slice(n));a&&o++;let l=new c(s.invert(),e,a),d,h=r.length-1;(d=r.length&&r[h].merge(l))?r[h]=d:r.push(l)}}else i.map&&n--},this.items.length,0),new l(i.from(r.reverse()),o)}}l.empty=new l(i.empty,0);class c{constructor(e,t,n,i){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new c(t.getMap().invert(),t,this.selection)}}}class d{constructor(e,t,n,i,r){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=i,this.prevComposition=r}}let h=20;function u(e){let t=[];for(let n=e.length-1;n>=0&&0==t.length;n--)e[n].forEach((e,n,i,r)=>t.push(i,r));return t}function p(e,t){if(!e)return null;let n=[];for(let i=0;inew d(l.empty,l.empty,null,0,-1),apply:(t,n,i)=>(function(e,t,n,i){let r=n.getMeta(y),o;if(r)return r.historyState;n.getMeta(v)&&(e=new d(e.done,e.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(s&&s.getMeta(y))return s.getMeta(y).redo?new d(e.done.addTransform(n,void 0,i,g(t)),e.undone,u(n.mapping.maps),e.prevTime,e.prevComposition):new d(e.done,e.undone.addTransform(n,void 0,i,g(t)),null,e.prevTime,e.prevComposition);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new d(e.done.rebased(n,o),e.undone.rebased(n,o),p(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new d(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),p(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);{let r=n.getMeta("composition"),o=0==e.prevTime||!s&&e.prevComposition!=r&&(e.prevTime<(n.time||0)-i.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((e,i)=>{for(let r=0;r=t[r]&&(n=!0)}),n}(n,e.prevRanges)),a=s?p(e.prevRanges,n.mapping):u(n.mapping.maps);return new d(e.done.addTransform(n,o?t.selection.getBookmark():void 0,i,g(t)),l.empty,a,n.time,null==r?e.prevComposition:r)}})(n,i,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,i="historyUndo"==n?x:"historyRedo"==n?k:null;return!!i&&(t.preventDefault(),i(e.state,e.dispatch))}}}})}function w(e,t){return(n,i)=>{let r=y.getState(n);if(!r||0==(e?r.undone:r.done).eventCount)return!1;if(i){let o=function(e,t,n){let i=g(t),r=y.get(t).spec.config,o=(n?e.undone:e.done).popEvent(t,i);if(!o)return null;let s=o.selection.resolve(o.transform.doc),a=(n?e.done:e.undone).addTransform(o.transform,t.selection.getBookmark(),r,i),l=new d(n?a:o.remaining,n?o.remaining:a,null,0,-1);return o.transform.setSelection(s).setMeta(y,{redo:n,historyState:l})}(r,n,e);o&&i(t?o.scrollIntoView():o)}return!0}}let x=w(!1,!0),k=w(!0,!0);w(!1,!1),w(!0,!1)},79358:function(e,t,n){"use strict";n.d(t,{h:()=>g,$:()=>y});for(var i={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"},r={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},o="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),s="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),a="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),l="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),c="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),d=o&&(l||57>+o[1])||a&&l,h=0;h<10;h++)i[48+h]=i[96+h]=String(h);for(var h=1;h<=24;h++)i[h+111]="F"+h;for(var h=65;h<=90;h++)i[h]=String.fromCharCode(h+32),r[h]=String.fromCharCode(h);for(var u in i)r.hasOwnProperty(u)||(r[u]=i[u]);var p=n(92007);let f="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function m(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 g(e){return new p.Sy({props:{handleKeyDown:y(e)}})}function y(e){let t=function(e){let t=Object.create(null);for(let n in e)t[function(e){let t,n,i,r,o=e.split(/-(?!$)/),s=o[o.length-1];"Space"==s&&(s=" ");for(let e=0;e127)&&(l=i[n.keyCode])&&l!=a){let i=t[m(l,n)];if(i&&i(e.state,e.dispatch,e))return!0}}return!1}}},76405:function(e,t,n){"use strict";function i(e){this.content=e}n.d(t,{aw:()=>H,NB:()=>S,p2:()=>d,Ts:()=>x,ZU:()=>z,e4:()=>c,vc:()=>l,PW:()=>Z,HY:()=>r,V_:()=>$}),i.prototype={constructor:i,find:function(e){for(var t=0;t>1}},i.from=function(e){if(e instanceof i)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new i(t)};class r{constructor(e,t){if(this.content=e,this.size=t||0,null==t)for(let t=0;te&&!1!==n(a,i+s,r||null,o)&&a.content.size){let r=s+1;a.nodesBetween(Math.max(0,e-r),Math.min(a.content.size,t-r),n,i+r)}s=l}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,i){let r="",o=!0;return this.nodesBetween(e,t,(s,a)=>{let l=s.isText?s.text.slice(Math.max(e,a)-a,t-a):s.isLeaf?i?"function"==typeof i?i(s):i:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&l||s.isTextblock)&&n&&(o?o=!1:r+=n),r+=l},0),r}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,i=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(n)&&(i[i.length-1]=t.withText(t.text+n.text),o=1);oe)for(let r=0,o=0;oe&&((ot)&&(s=s.isText?s.cut(Math.max(0,e-o),Math.min(s.text.length,t-o)):s.cut(Math.max(0,e-o-1),Math.min(s.content.size,t-o-1))),n.push(s),i+=s.nodeSize),o=a}return new r(n,i)}cutByIndex(e,t){return e==t?r.empty:0==e&&t==this.content.length?this:new r(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let i=this.content.slice(),o=this.size+t.nodeSize-n.nodeSize;return i[e]=t,new r(i,o)}addToStart(e){return new r([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new r(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;tthis.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,i=0;;n++){let r=i+this.child(n).nodeSize;if(r>=e){if(r==e||t>0)return s(n+1,r);return s(n,i)}i=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 r.empty;if(!Array.isArray(t))throw RangeError("Invalid input for Fragment.fromJSON");return new r(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return r.empty;let t,n=0;for(let i=0;ithis.type.rank&&(t||(t=e.slice(0,i)),t.push(this),n=!0),t&&t.push(r)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;te.type.rank-t.type.rank),t}}l.none=[];class c extends Error{}class d{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,i,r){let{index:o,offset:s}=t.findIndex(n),a=t.maybeChild(o);if(s==n||a.isText)return r&&!r.canReplace(o,o,i)?null:t.cut(0,n).append(i).append(t.cut(n));let l=e(a.content,n-s-1,i);return l&&t.replaceChild(o,a.copy(l))}(this.content,e+this.openStart,t);return n&&new d(n,this.openStart,this.openEnd)}removeBetween(e,t){return new d(function e(t,n,i){let{index:r,offset:o}=t.findIndex(n),s=t.maybeChild(r),{index:a,offset:l}=t.findIndex(i);if(o==n||s.isText){if(l!=i&&!t.child(a).isText)throw RangeError("Removing non-flat range");return t.cut(0,n).append(t.cut(i))}if(r!=a)throw RangeError("Removing non-flat range");return t.replaceChild(r,s.copy(e(s.content,n-o-1,i-o-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 d.empty;let n=t.openStart||0,i=t.openEnd||0;if("number"!=typeof n||"number"!=typeof i)throw RangeError("Invalid input for Slice.fromJSON");return new d(r.fromJSON(e,t.content),n,i)}static maxOpen(e,t=!0){let n=0,i=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)n++;for(let n=e.lastChild;n&&!n.isLeaf&&(t||!n.type.spec.isolating);n=n.lastChild)i++;return new d(e,n,i)}}function h(e,t){if(!t.type.compatibleContent(e.type))throw new c("Cannot join "+t.type.name+" onto "+e.type.name)}function u(e,t,n){let i=e.node(n);return h(i,t.node(n)),i}function p(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 f(e,t,n,i){let r=(t||e).node(n),o=0,s=t?t.index(n):r.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(p(e.nodeAfter,i),o++));for(let e=o;en&&p(m(u(e,t,n+1),g(e,t,n+1)),i),f(t,null,n,i),new r(i)}d.empty=new d(r.empty,0,0);class y{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],i=e.child(t);return n?e.child(t).cut(n):i}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],i=0==t?0:this.path[3*t-1]+1;for(let t=0;t0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new x(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=0&&t<=e.content.size))throw RangeError("Position "+t+" out of range");let n=[],i=0,r=t;for(let t=e;;){let{index:e,offset:o}=t.content.findIndex(r),s=r-o;if(n.push(t,e,i+o),!s||(t=t.child(e)).isText)break;r=s-1,i+=o+1}return new y(t,n,r)}static resolveCached(e,t){let n=w.get(e);if(n)for(let e=0;ee.depth)throw new c("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new c("Inconsistent open depths");return function e(t,n,i,o){let s=t.index(o),a=t.node(o);if(s==n.index(o)&&o=0;e--)i=t.node(e).copy(r.from(i));return{start:i.resolveNoCache(e.openStart+n),end:i.resolveNoCache(i.content.size-e.openEnd-n)}}(i,t);return m(a,function e(t,n,i,o,s){let a=t.depth>s&&u(t,n,s+1),l=o.depth>s&&u(i,o,s+1),c=[];return f(null,t,s,c),a&&l&&n.index(s)==i.index(s)?(h(a,l),p(m(a,e(t,n,i,o,s+1)),c)):(a&&p(m(a,g(t,n,s+1)),c),f(n,i,s,c),l&&p(m(l,g(i,o,s+1)),c)),f(o,null,s,c),new r(c)}(t,e,s,n,o))}{let e=t.parent,r=e.content;return m(e,r.cut(0,t.parentOffset).append(i.content).append(r.cut(n.parentOffset)))}}(e,t,n,0)}(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:i}=t.content.findIndex(e);if(!(t=t.maybeChild(n)))return null;if(i==e||t.isText)return t;e-=i+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(ne&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),M(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=r.empty,i=0,o=n.childCount){let s=this.contentMatchAt(e).matchFragment(n,i,o),a=s&&s.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let e=i;ee.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 i=r.fromJSON(e,t.content),o=e.nodeType(t.type).create(t.attrs,i,n);return o.type.checkAttrs(o.attrs),o}}S.prototype.text=void 0;class O extends S{constructor(e,t,n,i){if(super(e,t,null,i),!n)throw RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):M(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 O(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new O(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 M(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class C{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){var n;let i,r=new T(e,t);if(null==r.next)return C.empty;let o=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,i=n[t];if(i)return[i];let r=[];for(let e in n){let i=n[e];i.groups.indexOf(t)>-1&&r.push(i)}return 0==r.length&&e.err("No node type or group '"+t+"' found"),r})(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=E(e),i=n;return e.eat(",")&&(i="}"!=e.next?E(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:i,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}}(r);r.next&&r.err("Unexpected trailing text");let s=(n=function(e){let t=[[]];return r(function e(t,o){if("choice"==t.type)return t.exprs.reduce((t,n)=>t.concat(e(n,o)),[]);if("seq"==t.type)for(let i=0;;i++){let s=e(t.exprs[i],o);if(i==t.exprs.length-1)return s;r(s,o=n())}else if("star"==t.type){let s=n();return i(o,s),r(e(t.expr,s),s),[i(s)]}else if("plus"==t.type){let s=n();return r(e(t.expr,o),s),r(e(t.expr,s),s),[i(s)]}else if("opt"==t.type)return[i(o)].concat(e(t.expr,o));else if("range"==t.type){let s=o;for(let i=0;ie.to=t)}}(o),i=Object.create(null),function e(t){let r=[];t.forEach(e=>{n[e].forEach(({term:e,to:t})=>{let i;if(e){for(let t=0;t{i||r.push([e,i=[]]),-1==i.indexOf(t)&&i.push(t)})}})});let o=i[t.join(",")]=new C(t.indexOf(n.length-1)>-1);for(let t=0;te.createAndFill()));for(let e=0;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 i=0;i{let i=n+(t.validEnd?"*":" ")+" ";for(let n=0;n"+e.indexOf(t.next[n].next);return i}).join("\n")}}C.empty=new C(!0);class T{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 E(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function N(e,t){return t-e}function D(e,t){let n=[];return function t(i){let r=e[i];if(1==r.length&&!r[0].term)return t(r[0].to);n.push(i);for(let e=0;e-1}allowsMarks(e){if(null==this.markSet)return!0;for(let t=0;tn[e]=new B(e,t,i));let i=t.spec.topNode||"doc";if(!n[i])throw RangeError("Schema is missing its top node type ('"+i+"')");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 I{constructor(e,t,n){let i;this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate="string"==typeof n.validate?(i=n.validate.split("|"),n=>{let r=null===n?"null":typeof n;if(0>i.indexOf(r))throw RangeError(`Expected value of type ${i} for attribute ${t} on type ${e}, got ${r}`)}):n.validate}get isRequired(){return!this.hasDefault}}class z{constructor(e,t,n,i){this.name=e,this.rank=t,this.schema=n,this.spec=i,this.attrs=L(e,i.attrs),this.excluded=null;let r=A(this.attrs);this.instance=r?new l(this,r):null}create(e=null){return!e&&this.instance?this.instance:new l(this,P(this.attrs,e))}static compile(e,t){let n=Object.create(null),i=0;return e.forEach((e,r)=>n[e]=new z(e,i++,t,r)),n}removeFromSet(e){for(var t=0;t-1}}class ${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=i.from(e.nodes),t.marks=i.from(e.marks||{}),this.nodes=B.compile(this.spec.nodes,this),this.marks=z.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],i=t.spec.content||"",r=t.spec.marks;if(t.contentMatch=n[i]||(n[i]=C.parse(i,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="_"==r?null:r?j(this,r.split(" ")):""!=r&&t.inlineContent?null:[]}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=null==n?[t]:""==n?[]:j(this,n.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,i){if("string"==typeof e)e=this.nodeType(e);else if(e instanceof B){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,i)}text(e,t){let n=this.nodes.text;return new O(n,n.defaultAttrs,e,l.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return S.fromJSON(this,e)}markFromJSON(e){return l.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError("Unknown node type: "+e);return t}}function j(e,t){let n=[];for(let i=0;i-1)&&n.push(s=i)}if(!s)throw SyntaxError("Unknown mark type: '"+t[i]+"'")}return n}class H{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.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 _(this,t,!1);return n.addAll(e,l.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new _(this,t,!0);return n.addAll(e,l.none,t.from,t.to),d.maxOpen(n.finish())}matchTag(e,t,n){for(let o=n?this.tags.indexOf(n)+1:0;oe.length)||61==o.charCodeAt(e.length)&&o.slice(e.length+1)==t)){if(i.getAttrs){let e=i.getAttrs(t);if(!1===e)continue;i.attrs=e||void 0}return i}}}static schemaRules(e){let t=[];function n(e){let n=null==e.priority?50:e.priority,i=0;for(;i{n(e=U(e)),e.mark||e.ignore||e.clearMark||(e.mark=t)})}for(let t in e.nodes){let i=e.nodes[t].spec.parseDOM;i&&i.forEach(e=>{n(e=U(e)),e.node||e.ignore||e.mark||(e.node=t)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new H(e,H.schemaRules(e)))}}let V={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},q={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},F={ol:!0,ul:!0};function K(e,t,n){return null!=t?+!!t|2*("full"===t):e&&"pre"==e.whitespace?3:-5&n}class W{constructor(e,t,n,i,r,o){this.type=e,this.attrs=t,this.marks=n,this.solid=i,this.options=o,this.content=[],this.activeMarks=l.none,this.match=r||(4&o?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(r.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=r.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(r.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&&!V.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class _{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0;let i=t.topNode,r,o=K(null,t.preserveWhitespace,0)|4*!!n;r=i?new W(i.type,i.attrs,l.none,!0,t.topMatch||i.type.contentMatch,o):n?new W(null,null,l.none,!0,null,o):new W(e.schema.topNodeType,null,l.none,!0,null,o),this.nodes=[r],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,i=this.top;if(2&i.options||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(1&i.options)n=2&i.options?n.replace(/\r\n?/g,"\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=i.content[i.content.length-1],r=e.previousSibling;(!t||r&&"BR"==r.nodeName||t.isText&&/[ \t\r\n\u000c]$/.test(t.text))&&(n=n.slice(1))}n&&this.insertNode(this.parser.schema.text(n),t),this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let i=e.nodeName.toLowerCase(),r;F.hasOwnProperty(i)&&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&&F.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):"li"==e?n=t:e&&(n=null)}}(e);let o=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(r=this.parser.matchTag(e,this,n));if(o?o.ignore:q.hasOwnProperty(i))this.findInside(e),this.ignoreFallback(e,t);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(e=o.skip);let n,r=this.top,s=this.needsBlock;if(V.hasOwnProperty(i))r.content.length&&r.content[0].isInline&&this.open&&(this.open--,r=this.top),n=!0,r.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);return}let a=o&&o.skip?t:this.readStyles(e,t);a&&this.addAll(e,a),n&&this.sync(r),this.needsBlock=s}else{let n=this.readStyles(e,t);n&&this.addElementByRule(e,o,n,!1===o.consuming?r:void 0)}}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)}readStyles(e,t){let n=e.style;if(n&&n.length)for(let e=0;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,i){let r,o;if(t.node){if((o=this.parser.schema.nodes[t.node]).isLeaf)this.insertNode(o.create(t.attrs),n)||this.leafFallback(e,n);else{let e=this.enter(o,t.attrs||null,n,t.preserveWhitespace);e&&(r=!0,n=e)}}else{let e=this.parser.schema.marks[t.mark];n=n.concat(e.create(t.attrs))}let s=this.top;if(o&&o.isLeaf)this.findInside(e);else if(i)this.addElement(e,n,i);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(e=>this.insertNode(e,n));else{let i=e;"string"==typeof t.contentElement?i=e.querySelector(t.contentElement):"function"==typeof t.contentElement?i=t.contentElement(e):t.contentElement&&(i=t.contentElement),this.findAround(e,i,!0),this.addAll(i,n)}r&&this.sync(s)&&this.open--}addAll(e,t,n,i){let r=n||0;for(let o=n?e.childNodes[n]:e.firstChild,s=null==i?null:e.childNodes[i];o!=s;o=o.nextSibling,++r)this.findAtPoint(e,r),this.addDOM(o,t);this.findAtPoint(e,r)}findPlace(e,t){let n,i;for(let t=this.open;t>=0;t--){let r=this.nodes[t],o=r.findWrapping(e);if(o&&(!n||n.length>o.length)&&(n=o,i=r,!o.length)||r.solid)break}if(!n)return null;this.sync(i);for(let e=0;e(o.type?!o.type.allowsMarkType(t.type):!J(t.type,e))||(a=t.addToSet(a),!1)),this.nodes.push(new W(e,t,a,i,null,s)),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;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-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,i=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),r=-(n?n.depth+1:0)+ +!i,o=(e,s)=>{for(;e>=0;e--){let a=t[e];if(""==a){if(e==t.length-1||0==e)continue;for(;s>=r;s--)if(o(e-1,s))return!0;return!1}{let e=s>0||0==s&&i?this.nodes[s].type:n&&s>=r?n.node(s-r).type:null;if(!e||e.name!=a&&-1==e.groups.indexOf(a))return!1;s--}}return!0};return o(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 U(e){let t={};for(let n in e)t[n]=e[n];return t}function J(e,t){let n=t.schema.nodes;for(let i in n){let r=n[i];if(!r.allowsMarkType(e))continue;let o=[],s=e=>{o.push(e);for(let n=0;no.indexOf(r)&&s(r))return!0}};if(s(r.contentMatch))return!0}}class Z{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=G(t).createDocumentFragment());let i=n,r=[];return e.forEach(e=>{if(r.length||e.marks.length){let n=0,o=0;for(;n=0;i--){let r=this.serializeMark(e.marks[i],e.isInline,t);r&&((r.contentDOM||r.dom).appendChild(n),n=r.dom)}return n}serializeMark(e,t,n={}){let i=this.marks[e.type.name];return i&&X(G(n),i(e,t),null,e.attrs)}static renderSpec(e,t,n=null,i){return X(e,t,n,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Z(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Y(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return Y(e.marks)}}function Y(e){let t={};for(let n in e){let i=e[n].spec.toDOM;i&&(t[n]=i)}return t}function G(e){return e.document||window.document}let Q=new WeakMap;function X(e,t,n,i){let r,o,s;if("string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;let a=t[0],l;if("string"!=typeof a)throw RangeError("Invalid array passed to renderSpec");if(i&&(void 0===(o=Q.get(i))&&Q.set(i,(s=null,function e(t){if(t&&"object"==typeof t){if(Array.isArray(t)){if("string"==typeof t[0])s||(s=[]),s.push(t);else for(let n=0;n-1)throw RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let c=a.indexOf(" ");c>0&&(n=a.slice(0,c),a=a.slice(c+1));let d=n?e.createElementNS(n,a):e.createElement(a),h=t[1],u=1;if(h&&"object"==typeof h&&null==h.nodeType&&!Array.isArray(h)){for(let e in u=2,h)if(null!=h[e]){let t=e.indexOf(" ");t>0?d.setAttributeNS(e.slice(0,t),e.slice(t+1),h[e]):d.setAttribute(e,h[e])}}for(let o=u;ou)throw RangeError("Content hole must be the only child of its parent node");return{dom:d,contentDOM:d}}{let{dom:t,contentDOM:o}=X(e,s,n,i);if(d.appendChild(t),o){if(r)throw RangeError("Multiple content holes");r=o}}}return{dom:d,contentDOM:r}}},92007:function(e,t,n){"use strict";n.d(t,{Bs:()=>d,C1:()=>f,H$:()=>T,Sy:()=>O,Y1:()=>s,qv:()=>u,yy:()=>S});var i=n(76405),r=n(83311);let o=Object.create(null);class s{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=0;i--){let r=t<0?g(e.node(0),e.node(i),e.before(i+1),e.index(i),t,n):g(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,t,n);if(r)return r}return null}static 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=o[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in o)throw RangeError("Duplicate use of selection JSON ID "+e);return o[e]=t,t.prototype.jsonID=e,t}getBookmark(){return d.between(this.$anchor,this.$head).getBookmark()}}s.prototype.visible=!0;class a{constructor(e,t){this.$from=e,this.$to=t}}let l=!1;function c(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 s{constructor(e,t=e){c(e),c(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 s.near(n);let i=e.resolve(t.map(this.anchor));return new d(i.parent.inlineContent?i:n,n)}replace(e,t=i.p2.empty){if(super.replace(e,t),t==i.p2.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 h(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 i=e.resolve(t);return new this(i,n==t?i:e.resolve(n))}static between(e,t,n){let i=e.pos-t.pos;if((!n||i)&&(n=i>=0?1:-1),!t.parent.inlineContent){let e=s.findFrom(t,n,!0)||s.findFrom(t,-n,!0);if(!e)return s.near(t,n);t=e.$head}return e.parent.inlineContent||(0==i?e=t:(e=(s.findFrom(e,-n,!0)||s.findFrom(e,n,!0)).$anchor).posnew f(e)};function g(e,t,n,i,r,o=!1){if(t.inlineContent)return d.create(e,n);for(let s=i-(r>0?0:1);r>0?s=0;s+=r){let i=t.child(s);if(i.isAtom){if(!o&&u.isSelectable(i))return u.create(e,n-(r<0?i.nodeSize:0))}else{let t=g(e,i,n+r,r<0?i.childCount:0,r,o);if(t)return t}n+=i.nodeSize*r}return null}function y(e,t,n){let i,o=e.steps.length-1;if(o{null==i&&(i=r)}),e.setSelection(s.near(e.doc.resolve(i),n)))}class v extends r.wx{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.curSelectionFor0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return i.vc.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)||i.vc.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let i=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(null==n&&(n=t),n=null==n?t:n,!e)return this.deleteRange(t,n);let r=this.storedMarks;if(!r){let e=this.doc.resolve(t);r=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,i.text(e,r)),this.selection.empty||this.setSelection(s.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 b(e,t){return t&&e?e.bind(t):e}class w{constructor(e,t,n){this.name=e,this.init=b(t.init,n),this.apply=b(t.apply,n)}}let x=[new w("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new w("selection",{init:(e,t)=>e.selection||s.atStart(t.doc),apply:e=>e.selection}),new w("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,i)=>i.selection.$cursor?e.storedMarks:null}),new w("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class k{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=x.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 w(e.key,e.spec.state,e))})}}class S{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;ne.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 i=e[n],r=i.spec.state;r&&r.toJSON&&(t[n]=r.toJSON.call(i,this[i.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 r=new k(e.schema,e.plugins),o=new S(r);return r.fields.forEach(r=>{if("doc"==r.name)o.doc=i.NB.fromJSON(e.schema,t.doc);else if("selection"==r.name)o.selection=s.fromJSON(o.doc,t.selection);else if("storedMarks"==r.name)t.storedMarks&&(o.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let i in n){let s=n[i],a=s.spec.state;if(s.key==r.name&&a&&a.fromJSON&&Object.prototype.hasOwnProperty.call(t,i)){o[r.name]=a.fromJSON.call(s,e,t[i],o);return}}o[r.name]=r.init(e,o)}}),o}}class O{constructor(e){this.spec=e,this.props={},e.props&&function e(t,n,i){for(let r in t){let o=t[r];o instanceof Function?o=o.bind(n):"handleDOMEvents"==r&&(o=e(o,n,{})),i[r]=o}return i}(e.props,this,this.props),this.key=e.key?e.key.key:C("plugin")}getState(e){return e[this.key]}}let M=Object.create(null);function C(e){return e in M?e+"$"+ ++M[e]:(M[e]=0,e+"$")}class T{constructor(e="key"){this.key=C(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}},45901:function(e,t,n){"use strict";n.d(t,{EH:()=>ty,p:()=>tf,tk:()=>tH});var i=n(92007),r=n(76405),o=n(83311);let s=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},a=function(e){let t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t},l=null,c=function(e,t,n){let i=l||(l=document.createRange());return i.setEnd(e,null==n?e.nodeValue.length:n),i.setStart(e,t||0),i},d=function(){l=null},h=function(e,t,n,i){return n&&(p(e,t,n,i,-1)||p(e,t,n,i,1))},u=/^(img|br|input|textarea|hr)$/i;function p(e,t,n,i,r){for(;;){if(e==n&&t==i)return!0;if(t==(r<0?0:f(e))){let n=e.parentNode;if(!n||1!=n.nodeType||m(e)||u.test(e.nodeName)||"false"==e.contentEditable)return!1;t=s(e)+(r<0?0:1),e=n}else{if(1!=e.nodeType||"false"==(e=e.childNodes[t+(r<0?-1:0)]).contentEditable)return!1;t=r<0?f(e):0}}}function f(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function m(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}let g=function(e){return e.focusNode&&h(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function y(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}let v="undefined"!=typeof navigator?navigator:null,b="undefined"!=typeof document?document:null,w=v&&v.userAgent||"",x=/Edge\/(\d+)/.exec(w),k=/MSIE \d/.exec(w),S=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(w),O=!!(k||S||x),M=k?document.documentMode:S?+S[1]:x?+x[1]:0,C=!O&&/gecko\/(\d+)/i.test(w);C&&(/Firefox\/(\d+)/.exec(w)||[0,0])[1];let T=!O&&/Chrome\/(\d+)/.exec(w),E=!!T,N=T?+T[1]:0,D=!O&&!!v&&/Apple Computer/.test(v.vendor),A=D&&(/Mobile\/\w+/.test(w)||!!v&&v.maxTouchPoints>2),P=A||!!v&&/Mac/.test(v.platform),R=!!v&&/Win/.test(v.platform),L=/Android \d/.test(w),B=!!b&&"webkitFontSmoothing"in b.documentElement.style,I=B?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function z(e,t){return"number"==typeof e?e:e[t]}function $(e,t,n){let i=e.someProp("scrollThreshold")||0,r=e.someProp("scrollMargin")||5,o=e.dom.ownerDocument;for(let s=n||e.dom;s;s=a(s)){if(1!=s.nodeType)continue;let e=s,n=e==o.body,a=n?function(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}(o):function(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,i=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*i}}(e),l=0,c=0;if(t.topa.bottom-z(i,"bottom")&&(c=t.bottom-t.top>a.bottom-a.top?t.top+z(r,"top")-a.top:t.bottom-a.bottom+z(r,"bottom")),t.lefta.right-z(i,"right")&&(l=t.right-a.right+z(r,"right")),l||c){if(n)o.defaultView.scrollBy(l,c);else{let n=e.scrollLeft,i=e.scrollTop;c&&(e.scrollTop+=c),l&&(e.scrollLeft+=l);let r=e.scrollLeft-n,o=e.scrollTop-i;t={left:t.left-r,top:t.top-o,right:t.right-r,bottom:t.bottom-o}}}if(n||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function j(e){let t=[],n=e.ownerDocument;for(let i=e;i&&(t.push({dom:i,top:i.scrollTop,left:i.scrollLeft}),e!=n);i=a(i));return t}function H(e,t){for(let n=0;n=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function F(e){return e.top=0&&r==i.nodeValue.length?(e--,o=1):n<0?e--:t++,U(K(c(i,e,t),o),o<0)}}if(!e.state.doc.resolve(t-(o||0)).parent.inlineContent){if(null==o&&r&&(n<0||r==f(i))){let e=i.childNodes[r-1];if(1==e.nodeType)return J(e.getBoundingClientRect(),!1)}if(null==o&&r=0)}if(null==o&&r&&(n<0||r==f(i))){let e=i.childNodes[r-1],t=3==e.nodeType?c(e,f(e)-+!s):1!=e.nodeType||"BR"==e.nodeName&&e.nextSibling?null:e;if(t)return U(K(t,1),!1)}if(null==o&&r=0)}function U(e,t){if(0==e.width)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function J(e,t){if(0==e.height)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function Z(e,t,n){let i=e.state,r=e.root.activeElement;i!=t&&e.updateState(t),r!=e.dom&&e.focus();try{return n()}finally{i!=t&&e.updateState(i),r!=e.dom&&r&&r.focus()}}let Y=/[\u0590-\u08ac]/,G=null,Q=null,X=!1;class ee{constructor(e,t,n,i){this.parent=e,this.children=t,this.dom=n,this.contentDOM=i,this.dirty=0,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;ts(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(let t=e;;t=t.parentNode){if(t==this.dom){i=!1;break}if(t.previousSibling)break}if(null==i&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){i=!0;break}if(t.nextSibling)break}}return(null==i?n>0:i)?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,i=e;i;i=i.parentNode){let r=this.getDesc(i),o;if(r&&(!t||r.node)){if(!n||!(o=r.nodeDOM)||(1==o.nodeType?o.contains(1==e.nodeType?e:e.parentNode):o==e))return r;n=!1}}}getDesc(e){let t=e.pmViewDesc;for(let e=t;e;e=e.parent)if(e==this)return t}posFromDOM(e,t,n){for(let i=e;i;i=i.parentNode){let r=this.getDesc(i);if(r)return r.localPosFromDOM(e,t,n)}return -1}descAt(e){for(let t=0,n=0;te||r instanceof ea){i=e-t;break}t=o}if(i)return this.children[n].domFromPos(i-this.children[n].border,t);for(let e;n&&!(e=this.children[n-1]).size&&e instanceof et&&e.side>=0;n--);if(t<=0){let e,i=!0;for(;(e=n?this.children[n-1]:null)&&e.dom.parentNode!=this.contentDOM;n--,i=!1);return e&&t&&i&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?s(e.dom)+1:0}}{let e,i=!0;for(;(e=n=r&&t<=l-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,r);e=o;for(let t=a;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){i=s(n.dom)+1;break}e-=n.size}-1==i&&(i=0)}if(i>-1&&(l>t||a==this.children.length-1)){t=l;for(let e=a+1;ea&&ot){let e=a;a=l,l=e}let n=document.createRange();n.setEnd(l.node,l.offset),n.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(n)}}ignoreMutation(e){return!this.contentDOM&&"selection"!=e.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,i=0;i=n:en){let i=n+r.border,s=o-r.border;if(e>=i&&t<=s){this.dirty=e==n||t==o?2:1,e==i&&t==s&&(r.contentLost||r.dom.parentNode!=this.contentDOM)?r.dirty=3:r.markDirty(e-i,t-i);return}r.dirty=r.dom!=r.contentDOM||r.dom.parentNode!=this.contentDOM||r.children.length?3:2}n=o}this.dirty=2}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=1==e?2:1;t.dirtyr?r.parent?r.parent.posBeforeChild(r):void 0:i)),!t.type.spec.raw){if(1!=o.nodeType){let e=document.createElement("span");e.appendChild(o),o=e}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(e,[],o,null),this.widget=t,this.widget=t,r=this}matchesWidget(e){return 0==this.dirty&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return!!t&&t(e)}ignoreMutation(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class en extends ee{constructor(e,t,n,i){super(e,[],t,null),this.textDOM=n,this.text=i}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}class ei extends ee{constructor(e,t,n,i){super(e,[],n,i),this.mark=t}static create(e,t,n,i){let o=i.nodeViews[t.type.name],s=o&&o(t,i,n);return s&&s.dom||(s=r.PW.renderSpec(document,t.type.spec.toDOM(t,n),null,t.attrs)),new ei(e,t,s.dom,s.contentDOM||s.dom)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return 3!=this.dirty&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),0!=this.dirty){let e=this.parent;for(;!e.node;)e=e.parent;e.dirty0&&(r=ev(r,0,e,n));for(let e=0;el?l.parent?l.parent.posBeforeChild(l):void 0:s,n,i),d=c&&c.dom,h=c&&c.contentDOM;if(t.isText){if(d){if(3!=d.nodeType)throw RangeError("Text must be rendered as a DOM text node")}else d=document.createTextNode(t.text)}else if(!d){let e=r.PW.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs);({dom:d,contentDOM:h}=e)}h||t.isText||"BR"==d.nodeName||(d.hasAttribute("contenteditable")||(d.contentEditable="false"),t.type.spec.draggable&&(d.draggable=!0));let u=d;return(d=ep(d,n,t),c)?l=new el(e,t,n,i,d,h||null,u,c,o,s+1):t.isText?new es(e,t,n,i,d,u,o):new er(e,t,n,i,d,h||null,u,o,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(e.preserveWhitespace="full"),this.contentDOM){if(this.contentLost){for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>r.HY.empty)}else e.contentElement=this.contentDOM}else e.getContent=()=>this.node.content;return e}matchesNode(e,t,n){return 0==this.dirty&&e.eq(this.node)&&ef(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return+!this.node.isLeaf}updateChildren(e,t){let n=this.node.inlineContent,i=t,o=e.composing?this.localCompositionInfo(e,t):null,s=o&&o.pos>-1?o:null,a=o&&o.pos<0,l=new eg(this,s&&s.node,e);(function(e,t,n,i){let r=t.locals(e),o=0;if(0==r.length){for(let n=0;no;)a.push(r[s++]);let f=o+u.nodeSize;if(u.isText){let e=f;s!e.inline):a.slice();i(u,m,t.forChild(o,u),p),o=f}})(this.node,this.innerDeco,(t,o,s)=>{t.spec.marks?l.syncToMarks(t.spec.marks,n,e):t.type.side>=0&&!s&&l.syncToMarks(o==this.node.childCount?r.vc.none:this.node.child(o).marks,n,e),l.placeWidget(t,e,i)},(t,r,s,c)=>{let d;l.syncToMarks(t.marks,n,e),l.findNodeMatch(t,r,s,c)||a&&e.state.selection.from>i&&e.state.selection.to-1&&l.updateNodeAt(t,r,s,d,e)||l.updateNextNode(t,r,s,e,c,i)||l.addNode(t,r,s,e,i),i+=t.nodeSize}),l.syncToMarks([],n,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||2==this.dirty)&&(s&&this.protectLocalComposition(e,s),function e(t,n,i){let r=t.firstChild,o=!1;for(let s=0;st+this.node.content.size)return null;let o=e.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(!this.node.inlineContent)return{node:o,pos:-1,text:""};{let e=o.nodeValue,i=function(e,t,n,i){for(let r=0,o=0;r=n){if(o>=i&&l.slice(i-t.length-a,i-a)==t)return i-t.length;let e=a=0&&e+t.length+a>=n)return a+e;if(n==i&&l.length>=i+t.length-a&&l.slice(i-a,i-a+t.length)==t)return i}}return -1}(this.node.content,e,n-t,r-t);return i<0?null:{node:o,pos:i,text:e}}}protectLocalComposition(e,{node:t,pos:n,text:i}){if(this.getDesc(t))return;let r=t;for(;r.parentNode!=this.contentDOM;r=r.parentNode){for(;r.previousSibling;)r.parentNode.removeChild(r.previousSibling);for(;r.nextSibling;)r.parentNode.removeChild(r.nextSibling);r.pmViewDesc&&(r.pmViewDesc=void 0)}let o=new en(this,r,t,i);e.input.compositionNodes.push(o),this.children=ev(this.children,n,n+i.length,e,o)}update(e,t,n,i){return!!(3!=this.dirty&&e.sameMarkup(this.node))&&(this.updateInner(e,t,n,i),!0)}updateInner(e,t,n,i){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=0}updateOuterDeco(e){if(ef(e,this.outerDeco))return;let t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=eu(this.dom,this.nodeDOM,eh(this.outerDeco,this.node,t),eh(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){1==this.nodeDOM.nodeType&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function eo(e,t,n,i,r){ep(i,t,e);let o=new er(void 0,e,t,n,i,i,i,r,0);return o.contentDOM&&o.updateChildren(r,0),o}class es extends er{constructor(e,t,n,i,r,o,s){super(e,t,n,i,r,null,o,s,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,i){return!!(3!=this.dirty&&(0==this.dirty||this.inParent())&&e.sameMarkup(this.node))&&(this.updateOuterDeco(t),(0!=this.dirty||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=e,this.dirty=0,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return"characterData"!=e.type&&"selection"!=e.type}slice(e,t,n){let i=this.node.cut(e,t),r=document.createTextNode(i.text);return new es(this.parent,i,this.outerDeco,this.innerDeco,r,r,n)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(0==e||t==this.nodeDOM.nodeValue.length)&&(this.dirty=3)}get domAtom(){return!1}isText(e){return this.node.text==e}}class ea extends ee{parseRule(){return{ignore:!0}}matchesHack(e){return 0==this.dirty&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class el extends er{constructor(e,t,n,i,r,o,s,a,l,c){super(e,t,n,i,r,o,s,l,c),this.spec=a}update(e,t,n,i){if(3==this.dirty)return!1;if(this.spec.update){let r=this.spec.update(e,t,n);return r&&this.updateInner(e,t,n,i),r}return(!!this.contentDOM||!!e.isLeaf)&&super.update(e,t,n,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,i){this.spec.setSelection?this.spec.setSelection(e,t,n):super.setSelection(e,t,n,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}let ec=function(e){e&&(this.nodeName=e)};ec.prototype=Object.create(null);let ed=[new ec];function eh(e,t,n){if(0==e.length)return ed;let i=n?ed[0]:new ec,r=[i];for(let o=0;o0;){let a;for(;;)if(i){let e=n.children[i-1];if(e instanceof ei)n=e,i=e.children.length;else{a=e,i--;break}}else if(n==t)break e;else i=n.parent.children.indexOf(n),n=n.parent;let l=a.node;if(l){if(l!=e.child(r-1))break;--r,o.set(a,r),s.push(a)}}return{index:r,matched:o,matches:s.reverse()}}(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n>1,o=Math.min(r,e.length);for(;i-1)i>this.index&&(this.changed=!0,this.destroyBetween(this.index,i)),this.top=this.top.children[this.index];else{let i=ei.create(this.top,e[r],t,n);this.top.children.splice(this.index,0,i),this.top=i,this.changed=!0}this.index=0,r++}}findNodeMatch(e,t,n,i){let r=-1,o;if(i>=this.preMatch.index&&(o=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,n))r=this.top.children.indexOf(o,this.index);else for(let i=this.index,o=Math.min(this.top.children.length,i+5);i=n||d<=t?o.push(l):(cn&&o.push(l.slice(n-c,l.size,i)))}return o}function eb(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let o=e.docView.nearestDesc(n.focusNode),a=o&&0==o.size,l=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(l<0)return null;let c=r.resolve(l),d,h;if(g(n)){for(d=c;o&&!o.node;)o=o.parent;let e=o.node;if(o&&e.isAtom&&i.qv.isSelectable(e)&&o.parent&&!(e.isInline&&function(e,t,n){for(let i=0==t,r=t==f(e);i||r;){if(e==n)return!0;let t=s(e);if(!(e=e.parentNode))return!1;i=i&&0==t,r=r&&t==f(e)}}(n.focusNode,n.focusOffset,o.dom))){let e=o.posBefore;h=new i.qv(l==e?c:r.resolve(e))}}else{let t=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(t<0)return null;d=r.resolve(t)}if(!h){let n="pointer"==t||e.state.selection.head{(s.anchorNode!=a||s.anchorOffset!=l)&&(r.removeEventListener("selectionchange",o.input.hideSelectionGuard),setTimeout(()=>{(!ew(o)||o.state.selection.visible)&&o.dom.classList.remove("ProseMirror-hideselection")},20))})))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}let ek=D||E&&N<63;function eS(e,t){let{node:n,offset:i}=e.docView.domFromPos(t,0),r=ii(e,t,n))||i.Bs.between(t,n,r)}function eN(e){return(!e.editable||!!e.hasFocus())&&eD(e)}function eD(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(e){return!1}}function eA(e,t){let{$anchor:n,$head:r}=e.selection,o=t>0?n.max(r):n.min(r),s=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return s&&i.Y1.findFrom(s,t)}function eP(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function eR(e,t,n){let r=e.state.selection;if(r instanceof i.Bs){if(n.indexOf("s")>-1){let{$head:n}=r,o=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let s=e.state.doc.resolve(n.pos+o.nodeSize*(t<0?-1:1));return eP(e,new i.Bs(r.$anchor,s))}if(!r.empty)return!1;if(e.endOfTextblock(t>0?"forward":"backward")){let n=eA(e.state,t);return!!n&&n instanceof i.qv&&eP(e,n)}else if(!(P&&n.indexOf("m")>-1)){let n=r.$head,o=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter,s;if(!o||o.isText)return!1;let a=t<0?n.pos-o.nodeSize:n.pos;return!!(o.isAtom||(s=e.docView.descAt(a))&&!s.contentDOM)&&(i.qv.isSelectable(o)?eP(e,new i.qv(t<0?e.state.doc.resolve(n.pos-o.nodeSize):n)):!!B&&eP(e,new i.Bs(e.state.doc.resolve(t<0?a:a+o.nodeSize))))}}else{if(r instanceof i.qv&&r.node.isInline)return eP(e,new i.Bs(t>0?r.$to:r.$from));let n=eA(e.state,t);return!!n&&eP(e,n)}}function eL(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function eB(e,t){let n=e.pmViewDesc;return n&&0==n.size&&(t<0||e.nextSibling||"BR"!=e.nodeName)}function eI(e,t){return t<0?function(e){let t=e.domSelectionRange(),n=t.focusNode,i=t.focusOffset;if(!n)return;let r,o,a=!1;for(C&&1==n.nodeType&&i0){if(1!=n.nodeType)break;{let e=n.childNodes[i-1];if(eB(e,-1))r=n,o=--i;else if(3==e.nodeType)i=(n=e).nodeValue.length;else break}}else if(ez(n))break;else{let t=n.previousSibling;for(;t&&eB(t,-1);)r=n.parentNode,o=s(t),t=t.previousSibling;if(t)i=eL(n=t);else{if((n=n.parentNode)==e.dom)break;i=0}}a?e$(e,n,i):r&&e$(e,r,o)}(e):function(e){let t,n,i=e.domSelectionRange(),r=i.focusNode,o=i.focusOffset;if(!r)return;let a=eL(r);for(;;)if(o{e.state==r&&ex(e)},50)}function ej(e,t){let n=e.state.doc.resolve(t);if(!(E||R)&&n.parent.inlineContent){let i=e.coordsAtPos(t);if(t>n.start()){let n=e.coordsAtPos(t-1),r=(n.top+n.bottom)/2;if(r>i.top&&r1)return n.lefti.top&&r1)return n.left>i.left?"ltr":"rtl"}}return"rtl"==getComputedStyle(e.dom).direction?"rtl":"ltr"}function eH(e,t,n){let r=e.state.selection;if(r instanceof i.Bs&&!r.empty||n.indexOf("s")>-1||P&&n.indexOf("m")>-1)return!1;let{$from:o,$to:s}=r;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let n=eA(e.state,t);if(n&&n instanceof i.qv)return eP(e,n)}if(!o.parent.inlineContent){let n=t<0?o:s,a=r instanceof i.C1?i.Y1.near(n,t):i.Y1.findFrom(n,t);return!!a&&eP(e,a)}return!1}function eV(e,t){if(!(e.state.selection instanceof i.Bs))return!0;let{$head:n,$anchor:r,empty:o}=e.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let s=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(s&&!s.isText){let i=e.state.tr;return t<0?i.delete(n.pos-s.nodeSize,n.pos):i.delete(n.pos,n.pos+s.nodeSize),e.dispatch(i),!0}return!1}function eq(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function eF(e,t){e.someProp("transformCopied",n=>{t=n(t,e)});let n=[],{content:i,openStart:o,openEnd:s}=t;for(;o>1&&s>1&&1==i.childCount&&1==i.firstChild.childCount;){o--,s--;let e=i.firstChild;n.push(e.type.name,e.attrs!=e.type.defaultAttrs?e.attrs:null),i=e.content}let a=e.someProp("clipboardSerializer")||r.PW.fromSchema(e.state.schema),l=eG(),c=l.createElement("div");c.appendChild(a.serializeFragment(i,{document:l}));let d=c.firstChild,h,u=0;for(;d&&1==d.nodeType&&(h=eZ[d.nodeName.toLowerCase()]);){for(let e=h.length-1;e>=0;e--){let t=l.createElement(h[e]);for(;c.firstChild;)t.appendChild(c.firstChild);c.appendChild(t),u++}d=c.firstChild}return d&&1==d.nodeType&&d.setAttribute("data-pm-slice",`${o} ${s}${u?` -${u}`:""} ${JSON.stringify(n)}`),{dom:c,text:e.someProp("clipboardTextSerializer",n=>n(t,e))||t.content.textBetween(0,t.content.size,"\n\n"),slice:t}}function eK(e,t,n,i,o){let s,a,l=o.parent.type.spec.code;if(!n&&!t)return null;let c=t&&(i||l||!n);if(c){if(e.someProp("transformPastedText",n=>{t=n(t,l||i,e)}),l)return t?new r.p2(r.HY.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):r.p2.empty;let n=e.someProp("clipboardTextParser",n=>n(t,o,i,e));if(n)a=n;else{let n=o.marks(),{schema:i}=e.state,a=r.PW.fromSchema(i);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(e=>{let t=s.appendChild(document.createElement("p"));e&&t.appendChild(a.serializeNode(i.text(e,n)))})}}else e.someProp("transformPastedHTML",t=>{n=t(n,e)}),s=function(e){let t=/^(\s*]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=eG().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(e),r;if((r=i&&eZ[i[1].toLowerCase()])&&(e=r.map(e=>"<"+e+">").join("")+e+r.map(e=>"").reverse().join("")),n.innerHTML=e,r)for(let e=0;e0;e--){let e=s.firstChild;for(;e&&1!=e.nodeType;)e=e.nextSibling;if(!e)break;s=e}if(a||(a=(e.someProp("clipboardParser")||e.someProp("domParser")||r.aw.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(c||h),context:o,ruleFromNode:e=>"BR"!=e.nodeName||e.nextSibling||!e.parentNode||eW.test(e.parentNode.nodeName)?null:{ignore:!0}})),h)a=function(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,i;try{i=JSON.parse(t)}catch(t){return e}let{content:o,openStart:s,openEnd:a}=e;for(let e=i.length-2;e>=0;e-=2){let t=n.nodes[i[e]];if(!t||t.hasRequiredAttrs())break;o=r.HY.from(t.create(i[e+1],o)),s++,a++}return new r.p2(o,s,a)}(eJ(a,+h[1],+h[2]),h[4]);else if((a=r.p2.maxOpen(function(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let i=t.node(n).contentMatchAt(t.index(n)),o,s=[];if(e.forEach(e=>{if(!s)return;let t=i.findWrapping(e.type),n;if(!t)return s=null;if(n=s.length&&o.length&&function e(t,n,i,o,s){if(s{a=t(a,e)}),a}let eW=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function e_(e,t,n=0){for(let i=t.length-1;i>=n;i--)e=t[i].create(null,r.HY.from(e));return e}function eU(e,t,n,i,o,s){let a=t<0?e.firstChild:e.lastChild,l=a.content;return e.childCount>1&&(s=0),o=n&&(l=t<0?a.contentMatchAt(0).fillBefore(l,s<=o).append(l):l.append(a.contentMatchAt(a.childCount).fillBefore(r.HY.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,a.copy(l))}function eJ(e,t,n){return t{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>e5(e,t))})}function e5(e,t){return e.someProp("handleDOMEvents",n=>{let i=n[t.type];return!!i&&(i(e,t)||t.defaultPrevented)})}function e4(e){return{left:e.clientX,top:e.clientY}}function e6(e,t,n,i,r){if(-1==i)return!1;let o=e.state.doc.resolve(i);for(let i=o.depth+1;i>0;i--)if(e.someProp(t,t=>i>o.depth?t(e,n,o.nodeAfter,o.before(i),r,!0):t(e,n,o.node(i),o.before(i),r,!1)))return!0;return!1}function e8(e,t,n){e.focused||e.focus();let i=e.state.tr.setSelection(t);"pointer"==n&&i.setMeta("pointer",!0),e.dispatch(i)}eX.keydown=(e,t)=>{if(e.input.shiftKey=16==t.keyCode||t.shiftKey,!te(e,t)&&(e.input.lastKeyCode=t.keyCode,e.input.lastKeyCodeTime=Date.now(),!L||!E||13!=t.keyCode)){if(229!=t.keyCode&&e.domObserver.forceFlush(),!A||13!=t.keyCode||t.ctrlKey||t.altKey||t.metaKey)e.someProp("handleKeyDown",n=>n(e,t))||function(e,t){let n;let i=t.keyCode,r=(n="",t.ctrlKey&&(n+="c"),t.metaKey&&(n+="m"),t.altKey&&(n+="a"),t.shiftKey&&(n+="s"),n);if(8==i||P&&72==i&&"c"==r)return eV(e,-1)||eI(e,-1);if(46==i&&!t.shiftKey||P&&68==i&&"c"==r)return eV(e,1)||eI(e,1);if(13==i||27==i)return!0;if(37==i||P&&66==i&&"c"==r){let t=37==i?"ltr"==ej(e,e.state.selection.from)?-1:1:-1;return eR(e,t,r)||eI(e,t)}if(39==i||P&&70==i&&"c"==r){let t=39==i?"ltr"==ej(e,e.state.selection.from)?1:-1:1;return eR(e,t,r)||eI(e,t)}else if(38==i||P&&80==i&&"c"==r)return eH(e,-1,r)||eI(e,-1);else if(40==i||P&&78==i&&"c"==r)return function(e){if(!D||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&1==t.nodeType&&0==n&&t.firstChild&&"false"==t.firstChild.contentEditable){let n=t.firstChild;eq(e,n,"true"),setTimeout(()=>eq(e,n,"false"),20)}return!1}(e)||eH(e,1,r)||eI(e,1);else if(r==(P?"m":"c")&&(66==i||73==i||89==i||90==i))return!0;return!1}(e,t)?t.preventDefault():e2(e,"key");else{let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==t&&(e.someProp("handleKeyDown",t=>t(e,y(13,"Enter"))),e.input.lastIOSEnter=0)},200)}}},eX.keyup=(e,t)=>{16==t.keyCode&&(e.input.shiftKey=!1)},eX.keypress=(e,t)=>{if(te(e,t)||!t.charCode||t.ctrlKey&&!t.altKey||P&&t.metaKey)return;if(e.someProp("handleKeyPress",n=>n(e,t))){t.preventDefault();return}let n=e.state.selection;if(!(n instanceof i.Bs)||!n.$from.sameParent(n.$to)){let i=String.fromCharCode(t.charCode);/[\r\n]/.test(i)||e.someProp("handleTextInput",t=>t(e,n.$from.pos,n.$to.pos,i))||e.dispatch(e.state.tr.insertText(i).scrollIntoView()),t.preventDefault()}};let e7=P?"metaKey":"ctrlKey";eQ.mousedown=(e,t)=>{var n;let r,o;e.input.shiftKey=t.shiftKey;let s=tr(e),a=Date.now(),l="singleClick";a-e.input.lastClick.time<500&&(r=(n=e.input.lastClick).x-t.clientX)*r+(o=n.y-t.clientY)*o<100&&!t[e7]&&("singleClick"==e.input.lastClick.type?l="doubleClick":"doubleClick"==e.input.lastClick.type&&(l="tripleClick")),e.input.lastClick={time:a,x:t.clientX,y:t.clientY,type:l};let c=e.posAtCoords(e4(t));c&&("singleClick"==l?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new e9(e,c,t,!!s)):("doubleClick"==l?function(e,t,n,i){return e6(e,"handleDoubleClickOn",t,n,i)||e.someProp("handleDoubleClick",n=>n(e,t,i))}:function(e,t,n,r){return e6(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",n=>n(e,t,r))||function(e,t,n){if(0!=n.button)return!1;let r=e.state.doc;if(-1==t)return!!r.inlineContent&&(e8(e,i.Bs.create(r,0,r.content.size),"pointer"),!0);let o=r.resolve(t);for(let t=o.depth+1;t>0;t--){let n=t>o.depth?o.nodeAfter:o.node(t),s=o.before(t);if(n.inlineContent)e8(e,i.Bs.create(r,s+1,s+1+n.content.size),"pointer");else{if(!i.qv.isSelectable(n))continue;e8(e,i.qv.create(r,s),"pointer")}return!0}}(e,n,r)})(e,c.pos,c.inside,t)?t.preventDefault():e2(e,"pointer"))};class e9{constructor(e,t,n,r){let o,s;if(this.view=e,this.pos=t,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[e7],this.allowDefault=n.shiftKey,t.inside>-1)o=e.state.doc.nodeAt(t.inside),s=t.inside;else{let n=e.state.doc.resolve(t.pos);o=n.parent,s=n.depth?n.before():0}let a=r?null:n.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l&&1==l.dom.nodeType?l.dom:null;let{selection:c}=e.state;(0==n.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||c instanceof i.qv&&c.from<=s&&c.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&C&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),e2(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>ex(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;if(this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(e4(e))),this.updateAllowDefault(e),this.allowDefault||!t)e2(this.view,"pointer");else{var n,r,o,s;(n=this.view,r=t.pos,o=t.inside,s=this.selectNode,e6(n,"handleClickOn",r,o,e)||n.someProp("handleClick",t=>t(n,r,e))||(s?function(e,t){if(-1==t)return!1;let n=e.state.selection,r,o;n instanceof i.qv&&(r=n.node);let s=e.state.doc.resolve(t);for(let e=s.depth+1;e>0;e--){let t=e>s.depth?s.nodeAfter:s.node(e);if(i.qv.isSelectable(t)){o=r&&n.$from.depth>0&&e>=n.$from.depth&&s.before(n.$from.depth+1)==n.$from.pos?s.before(n.$from.depth):s.before(e);break}}return null!=o&&(e8(e,i.qv.create(e.state.doc,o),"pointer"),!0)}(n,o):function(e,t){if(-1==t)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&i.qv.isSelectable(r))&&(e8(e,new i.qv(n),"pointer"),!0)}(n,o)))?e.preventDefault():0==e.button&&(this.flushed||D&&this.mightDrag&&!this.mightDrag.node.isAtom||E&&!this.view.state.selection.visible&&2>=Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to)))?(e8(this.view,i.Y1.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):e2(this.view,"pointer")}}move(e){this.updateAllowDefault(e),e2(this.view,"pointer"),0==e.buttons&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}function te(e,t){return!!e.composing||!!(D&&500>Math.abs(t.timeStamp-e.input.compositionEndedAt))&&(e.input.compositionEndedAt=-2e8,!0)}eQ.touchstart=e=>{e.input.lastTouch=Date.now(),tr(e),e2(e,"pointer")},eQ.touchmove=e=>{e.input.lastTouch=Date.now(),e2(e,"pointer")},eQ.contextmenu=e=>tr(e);let tt=L?5e3:-1;function tn(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>tr(e),t))}function ti(e){let t;for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=((t=document.createEvent("Event")).initEvent("event",!0,!0),t.timeStamp));e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function tr(e,t=!1){if(!L||!(e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),ti(e),t||e.docView&&e.docView.dirty){let t=eb(e);return t&&!t.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(t)):e.updateState(e.state),!0}return!1}}eX.compositionstart=eX.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(e=>!1===e.type.spec.inclusive)))e.markCursor=e.state.storedMarks||n.marks(),tr(e,!0),e.markCursor=null;else if(tr(e),C&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelectionRange();for(let n=t.focusNode,i=t.focusOffset;n&&1==n.nodeType&&0!=i;){let t=i<0?n.lastChild:n.childNodes[i-1];if(!t)break;if(3==t.nodeType){e.domSelection().collapse(t,t.nodeValue.length);break}n=t,i=-1}}e.input.composing=!0}tn(e,tt)},eX.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,tn(e,20))};let to=O&&M<15||A&&I<604;function ts(e,t,n,i,o){let s=eK(e,t,n,i,e.state.selection.$from);if(e.someProp("handlePaste",t=>t(e,o,s||r.p2.empty)))return!0;if(!s)return!1;let a=0==s.openStart&&0==s.openEnd&&1==s.content.childCount?s.content.firstChild:null,l=a?e.state.tr.replaceSelectionWith(a,i):e.state.tr.replaceSelection(s);return e.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function ta(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}eQ.copy=eX.cut=(e,t)=>{let n=e.state.selection,i="cut"==t.type;if(n.empty)return;let r=to?null:t.clipboardData,{dom:o,text:s}=eF(e,n.content());r?(t.preventDefault(),r.clearData(),r.setData("text/html",o.innerHTML),r.setData("text/plain",s)):function(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let i=getSelection(),r=document.createRange();r.selectNodeContents(t),e.dom.blur(),i.removeAllRanges(),i.addRange(r),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}(e,o),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},eX.paste=(e,t)=>{if(e.composing&&!L)return;let n=to?null:t.clipboardData,i=e.input.shiftKey&&45!=e.input.lastKeyCode;n&&ts(e,ta(n),n.getData("text/html"),i,t)?t.preventDefault():function(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,i=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(i.contentEditable="true"),i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus();let r=e.input.shiftKey&&45!=e.input.lastKeyCode;setTimeout(()=>{e.focus(),i.parentNode&&i.parentNode.removeChild(i),n?ts(e,i.value,null,r,t):ts(e,i.textContent,i.innerHTML,r,t)},50)}(e,t)};class tl{constructor(e,t,n){this.slice=e,this.move=t,this.node=n}}let tc=P?"altKey":"ctrlKey";for(let e in eQ.dragstart=(e,t)=>{let n;let r=e.input.mouseDown;if(r&&r.done(),!t.dataTransfer)return;let o=e.state.selection,s=o.empty?null:e.posAtCoords(e4(t));if(s&&s.pos>=o.from&&s.pos<=(o instanceof i.qv?o.to-1:o.to));else if(r&&r.mightDrag)n=i.qv.create(e.state.doc,r.mightDrag.pos);else if(t.target&&1==t.target.nodeType){let r=e.docView.nearestDesc(t.target,!0);r&&r.node.type.spec.draggable&&r!=e.docView&&(n=i.qv.create(e.state.doc,r.posBefore))}let a=(n||e.state.selection).content(),{dom:l,text:c,slice:d}=eF(e,a);t.dataTransfer.files.length&&E&&!(N>120)||t.dataTransfer.clearData(),t.dataTransfer.setData(to?"Text":"text/html",l.innerHTML),t.dataTransfer.effectAllowed="copyMove",to||t.dataTransfer.setData("text/plain",c),e.dragging=new tl(d,!t[tc],n)},eQ.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)},eX.dragover=eX.dragenter=(e,t)=>t.preventDefault(),eX.drop=(e,t)=>{let n=e.dragging;if(e.dragging=null,!t.dataTransfer)return;let s=e.posAtCoords(e4(t));if(!s)return;let a=e.state.doc.resolve(s.pos),l=n&&n.slice;l?e.someProp("transformPasted",t=>{l=t(l,e)}):l=eK(e,ta(t.dataTransfer),to?null:t.dataTransfer.getData("text/html"),!1,a);let c=!!(n&&!t[tc]);if(e.someProp("handleDrop",n=>n(e,t,l||r.p2.empty,c))){t.preventDefault();return}if(!l)return;t.preventDefault();let d=l?(0,o.nj)(e.state.doc,a.pos,l):a.pos;null==d&&(d=a.pos);let h=e.state.tr;if(c){let{node:e}=n;e?e.replace(h):h.deleteSelection()}let u=h.mapping.map(d),p=0==l.openStart&&0==l.openEnd&&1==l.content.childCount,f=h.doc;if(p?h.replaceRangeWith(u,u,l.content.firstChild):h.replaceRange(u,u,l),h.doc.eq(f))return;let m=h.doc.resolve(u);if(p&&i.qv.isSelectable(l.content.firstChild)&&m.nodeAfter&&m.nodeAfter.sameMarkup(l.content.firstChild))h.setSelection(new i.qv(m));else{let t=h.mapping.map(d);h.mapping.maps[h.mapping.maps.length-1].forEach((e,n,i,r)=>t=r),h.setSelection(eE(e,m,h.doc.resolve(t)))}e.focus(),e.dispatch(h.setMeta("uiEvent","drop"))},eQ.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&ex(e)},20))},eQ.blur=(e,t)=>{e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),t.relatedTarget&&e.dom.contains(t.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},eQ.beforeinput=(e,t)=>{if(E&&L&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=t||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",t=>t(e,y(8,"Backspace")))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())},50)}},eX)eQ[e]=eX[e];function td(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class th{constructor(e,t){this.toDOM=e,this.spec=t||tg,this.side=this.spec.side||0}map(e,t,n,i){let{pos:r,deleted:o}=e.mapResult(t.from+i,this.side<0?-1:1);return o?null:new tf(r-n,r-n,this)}valid(){return!0}eq(e){return this==e||e instanceof th&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&td(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class tu{constructor(e,t){this.attrs=e,this.spec=t||tg}map(e,t,n,i){let r=e.map(t.from+i,this.spec.inclusiveStart?-1:1)-n,o=e.map(t.to+i,this.spec.inclusiveEnd?1:-1)-n;return r>=o?null:new tf(r,o,this)}valid(e,t){return t.from=e&&(!r||r(s.spec))&&n.push(s.copy(s.from+i,s.to+i))}for(let o=0;oe){let s=this.children[o]+1;this.children[o+2].findInner(e-s,t-s,n,i+s,r)}}map(e,t,n){return this==tv||0==e.maps.length?this:this.mapInner(e,t,0,0,n||tg)}mapInner(e,t,n,i,r){let o;for(let s=0;s{let s=o-r-(n-e);for(let r=0;ro+t-i)continue;let l=a[r]+t-i;n>=l?a[r+1]=e<=l?-2:-1:e>=t&&s&&(a[r]+=s,a[r+1]+=s)}i+=s}),t=n.maps[e].map(t,-1)}let l=!1;for(let t=0;t=i.content.size){l=!0;continue}let h=n.map(e[t+1]+o,-1)-r,{index:u,offset:p}=i.content.findIndex(d),f=i.maybeChild(u);if(f&&p==d&&p+f.nodeSize==h){let i=a[t+2].mapInner(n,f,c+1,e[t]+o+1,s);i!=tv?(a[t]=d,a[t+1]=h,a[t+2]=i):(a[t+1]=-2,l=!0)}else l=!0}if(l){let l=tS(function(e,t,n,i,r,o,s){for(let a=0;a{let s=o+n,a;if(a=tx(t,e,s)){for(i||(i=this.children.slice());ro&&n.to=e){this.children[t]==e&&(n=this.children[t+2]);break}let r=e+1,o=r+t.content.size;for(let e=0;er&&t.type instanceof tu){let e=Math.max(r,t.from)-r,n=Math.min(o,t.to)-r;en.map(e,t,tg));return tb.from(n)}forChild(e,t){if(t.isLeaf)return ty.empty;let n=[];for(let i=0;ie instanceof ty)?e:e.reduce((e,t)=>e.concat(t instanceof ty?t:t.members),[]))}}}function tw(e,t){if(!t||!e.length)return e;let n=[];for(let i=0;in&&o.to{let a=tx(e,t,s+n);if(a){o=!0;let e=tS(a,t,n+s+1,i);e!=tv&&r.push(s,s+t.nodeSize,e)}});let s=tw(o?tk(e):e,-n).sort(tO);for(let e=0;e0;)t++;e.splice(t,0,n)}function tT(e){let t=[];return e.someProp("decorations",n=>{let i=n(e.state);i&&i!=tv&&t.push(i)}),e.cursorWrapper&&t.push(ty.create(e.state.doc,[e.cursorWrapper.deco])),tb.from(t)}let tE={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},tN=O&&M<=11;class tD{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class tA{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new tD,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(e=>{for(let t=0;t"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),tN&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,tE)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;tthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(eN(this.view)){if(this.suppressingSelectionUpdates)return ex(this.view);if(O&&M<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&h(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,n;for(let n=e.focusNode;n;n=a(n))t.add(n);for(let i=e.anchorNode;i;i=a(i))if(t.has(i)){n=i;break}let i=n&&this.view.docView.nearestDesc(n);if(i&&i.ignoreMutation({type:"selection",target:3==n.nodeType?n.parentNode:n}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){var e;let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&eN(t)&&!this.ignoreSelectionChange(r),s=-1,a=-1,l=!1,c=[];if(t.editable)for(let e=0;e"BR"==e.nodeName);if(2==e.length){let[t,n]=e;t.parentNode&&t.parentNode.parentNode==n.parentNode?n.remove():t.remove()}else{let{focusNode:n}=this.currentSelection;for(let i of e){let e=i.parentNode;e&&"LI"==e.nodeName&&(!n||function(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let t=e.docView.nearestDesc(n,!0);if(t&&t.node.isBlock)return n}return null}(t,n)!=e)&&i.remove()}}}let d=null;s<0&&o&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)-1||o)&&(s>-1&&(t.docView.markDirty(s,a),e=t,tP.has(e)||(tP.set(e,null),-1===["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace))||(e.requiresGeckoHackNode=C,tR||(console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),tR=!0))),this.handleDOMChange(s,a,l,c),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||ex(t),this.currentSelection.set(r))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style"))||!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(let n=0;nArray.prototype.indexOf.call(e.addedNodes,n))&&(i=n),(!o||0>Array.prototype.indexOf.call(e.addedNodes,o))&&(r=o)}let o=i&&i.parentNode==e.target?s(i)+1:0,a=n.localPosFromDOM(e.target,o,-1),l=r&&r.parentNode==e.target?s(r):e.target.childNodes.length;return{from:a,to:n.localPosFromDOM(e.target,l,1)}}return"attributes"==e.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:(this.lastChangedTextNode=e.target,{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let tP=new WeakMap,tR=!1;function tL(e,t){let n=t.startContainer,i=t.startOffset,r=t.endContainer,o=t.endOffset,s=e.domAtPos(e.state.selection.anchor);return h(s.node,s.offset,r,o)&&([n,i,r,o]=[r,o,n,i]),{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:o}}function tB(e){let t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(D&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let e=document.createElement("div");return e.appendChild(document.createElement("li")),{skip:e}}if(e.parentNode.lastChild==e||D&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}let tI=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function tz(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:eE(e,t.resolve(n.anchor),t.resolve(n.head))}function t$(e,t,n){let i=e.depth,r=t?e.end():e.pos;for(;i>0&&(t||e.indexAfter(i)==e.node(i).childCount);)i--,r++,t=!1;if(n){let t=e.node(i).maybeChild(e.indexAfter(i));for(;t&&!t.isLeaf;)t=t.firstChild,r++}return r}function tj(e){if(2!=e.length)return!1;let t=e.charCodeAt(0),n=e.charCodeAt(1);return t>=56320&&t<=57343&&n>=55296&&n<=56319}class tH{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new e1,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(tW),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):"function"==typeof e?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=tF(this),tq(this),this.nodeViews=tK(this),this.docView=eo(this.state.doc,tV(this),tT(this),this.dom,this),this.domObserver=new tA(this,(e,t,n,o)=>(function(e,t,n,o,s){let a,l,c,d,h,u,p=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let t=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,n=eb(e,t);if(n&&!e.state.selection.eq(n)){if(E&&L&&13===e.input.lastKeyCode&&Date.now()-100t(e,y(13,"Enter"))))return;let i=e.state.tr.setSelection(n);"pointer"==t?i.setMeta("pointer",!0):"key"==t&&i.scrollIntoView(),p&&i.setMeta("composition",p),e.dispatch(i)}return}let f=e.state.doc.resolve(t),m=f.sharedDepth(n);t=f.before(m+1),n=e.state.doc.resolve(n).after(m+1);let v=e.state.selection,b=function(e,t,n){let i,{node:o,fromOffset:s,toOffset:a,from:l,to:c}=e.docView.parseRange(t,n),d=e.domSelectionRange(),h=d.anchorNode;if(h&&e.dom.contains(1==h.nodeType?h:h.parentNode)&&(i=[{node:h,offset:d.anchorOffset}],g(d)||i.push({node:d.focusNode,offset:d.focusOffset})),E&&8===e.input.lastKeyCode)for(let e=a;e>s;e--){let t=o.childNodes[e-1],n=t.pmViewDesc;if("BR"==t.nodeName&&!n){a=e;break}if(!n||n.size)break}let u=e.state.doc,p=e.someProp("domParser")||r.aw.fromSchema(e.state.schema),f=u.resolve(l),m=null,y=p.parse(o,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:s,to:a,preserveWhitespace:"pre"!=f.parent.type.whitespace||"full",findPositions:i,ruleFromNode:tB,context:f});if(i&&null!=i[0].pos){let e=i[0].pos,t=i[1]&&i[1].pos;null==t&&(t=e),m={anchor:e+l,head:t+l}}return{doc:y,sel:m,from:l,to:c}}(e,t,n),w=e.state.doc,x=w.slice(b.from,b.to);8===e.input.lastKeyCode&&Date.now()-100=s?o-i:0;(o-=e)&&o=a?o-i:0;(o-=t)&&oDate.now()-225||L)&&s.some(e=>1==e.nodeType&&!tI.test(e.nodeName))&&(!k||k.endA>=k.endB)&&e.someProp("handleKeyDown",t=>t(e,y(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!k){if(o&&v instanceof i.Bs&&!v.empty&&v.$head.sameParent(v.$anchor)&&!e.composing&&!(b.sel&&b.sel.anchor!=b.sel.head))k={start:v.from,endA:v.to,endB:v.to};else{if(b.sel){let t=tz(e,e.state.doc,b.sel);if(t&&!t.eq(e.state.selection)){let n=e.state.tr.setSelection(t);p&&n.setMeta("composition",p),e.dispatch(n)}}return}}e.input.domChangeCount++,e.state.selection.frome.state.selection.from&&k.start<=e.state.selection.from+2&&e.state.selection.from>=b.from?k.start=e.state.selection.from:k.endA=e.state.selection.to-2&&e.state.selection.to<=b.to&&(k.endB+=e.state.selection.to-k.endA,k.endA=e.state.selection.to)),O&&M<=11&&k.endB==k.start+1&&k.endA==k.start&&k.start>b.from&&" \xa0"==b.doc.textBetween(k.start-b.from-1,k.start-b.from+1)&&(k.start--,k.endA--,k.endB--);let S=b.doc.resolveNoCache(k.start-b.from),C=b.doc.resolveNoCache(k.endB-b.from),T=w.resolve(k.start),N=S.sameParent(C)&&S.parent.inlineContent&&T.end()>=k.endA;if((A&&e.input.lastIOSEnter>Date.now()-225&&(!N||s.some(e=>"DIV"==e.nodeName||"P"==e.nodeName))||!N&&S.post(e,y(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>k.start&&function(e,t,n,i,r){if(n-t<=r.pos-i.pos||t$(i,!0,!1)n||t$(s,!0,!1)t(e,y(8,"Backspace")))){L&&E&&e.domObserver.suppressSelectionUpdates();return}E&&L&&k.endB==k.start&&(e.input.lastAndroidDelete=Date.now()),L&&!N&&S.start()!=C.start()&&0==C.parentOffset&&S.depth==C.depth&&b.sel&&b.sel.anchor==b.sel.head&&b.sel.head==k.endA&&(k.endB-=2,C=b.doc.resolveNoCache(k.endB-b.from),setTimeout(()=>{e.someProp("handleKeyDown",function(t){return t(e,y(13,"Enter"))})},20));let D=k.start,P=k.endA;if(N){if(S.pos==C.pos)O&&M<=11&&0==S.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>ex(e),20)),d=e.state.tr.delete(D,P),h=w.resolve(k.start).marksAcross(w.resolve(k.endA));else if(k.endA==k.endB&&(u=function(e,t){let n=e.firstChild.marks,i=t.firstChild.marks,o=n,s=i,a,l,c;for(let e=0;ee.mark(l.addToSet(e.marks));else{if(0!=o.length||1!=s.length)return null;l=s[0],a="remove",c=e=>e.mark(l.removeFromSet(e.marks))}let d=[];for(let e=0;en(e,D,P,t)))return;d=e.state.tr.insertText(t,D,P)}}if(d||(d=e.state.tr.replace(D,P,b.doc.slice(k.start-b.from,k.endB-b.from))),b.sel){let t=tz(e,d.doc,b.sel);t&&!(E&&L&&e.composing&&t.empty&&(k.start!=k.endB||e.input.lastAndroidDelete{!function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}(e,t)||e5(e,t)||!e.editable&&t.type in eX||n(e,t)},e0[t]?{passive:!0}:void 0)}D&&e.dom.addEventListener("input",()=>null),e3(e)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;for(let t in this._props={},e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&e3(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(tW),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let e in this._props)t[e]=this._props[e];for(let n in t.state=this.state,e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var n,i,r;let o=this.state,a=!1,l=!1;e.storedMarks&&this.composing&&(ti(this),l=!0),this.state=e;let c=o.plugins!=e.plugins||this._props.plugins!=t.plugins;if(c||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let e=tK(this);(function(e,t){let n=0,i=0;for(let i in e){if(e[i]!=t[i])return!0;n++}for(let e in t)i++;return n!=i})(e,this.nodeViews)&&(this.nodeViews=e,a=!0)}(c||t.handleDOMEvents!=this._props.handleDOMEvents)&&e3(this),this.editable=tF(this),tq(this);let d=tT(this),u=tV(this),p=o.plugins==e.plugins||o.doc.eq(e.doc)?e.scrollToSelection>o.scrollToSelection?"to selection":"preserve":"reset",g=a||!this.docView.matchesNode(e.doc,u,d);(g||!e.selection.eq(o.selection))&&(l=!0);let y="preserve"==p&&l&&null==this.dom.style.overflowAnchor&&function(e){let t,n,i=e.dom.getBoundingClientRect(),r=Math.max(0,i.top);for(let o=(i.left+i.right)/2,s=r+1;s=r-20){t=i,n=a.top;break}}return{refDOM:t,refTop:n,stack:j(e.dom)}}(this);if(l){let t,n,l;this.domObserver.stop();let c=g&&(O||E)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&(i=o.selection,r=e.selection,l=Math.min(i.$anchor.sharedDepth(i.head),r.$anchor.sharedDepth(r.head)),i.$anchor.start(l)!=r.$anchor.start(l));if(g){let t=E?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=function(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=function(e,t){for(;;){if(3==e.nodeType&&t)return e;if(1==e.nodeType&&t>0){if("false"==e.contentEditable)return null;t=f(e=e.childNodes[t-1])}else{if(!e.parentNode||m(e))return null;t=s(e),e=e.parentNode}}}(t.focusNode,t.focusOffset),i=function(e,t){for(;;){if(3==e.nodeType&&te(this)));else if(this.state.selection instanceof i.qv){let t=this.docView.domAfterPos(this.state.selection.from);1==t.nodeType&&$(this,t.getBoundingClientRect(),e)}else $(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let t=0;t0&&this.state.doc.nodeAt(e))==n.node&&(r=e)}this.dragging=new tl(e.slice,e.move,r<0?void 0:i.qv.create(this.state.doc,r))}someProp(e,t){let n=this._props&&this._props[e],i;if(null!=n&&(i=t?t(n):n))return i;for(let n=0;ne.ownerDocument.getSelection()),this._root=e}return e||document}updateRoot(){this._root=null}posAtCoords(e){return function(e,t){var n;let i,r,o=e.dom.ownerDocument,s,l=0,d=function(e,t,n){if(e.caretPositionFromPoint)try{let i=e.caretPositionFromPoint(t,n);if(i)return{node:i.offsetNode,offset:i.offset}}catch(e){}if(e.caretRangeFromPoint){let i=e.caretRangeFromPoint(t,n);if(i)return{node:i.startContainer,offset:i.startOffset}}}(o,t.left,t.top);d&&({node:s,offset:l}=d);let h=(e.root.elementFromPoint?e.root:o).elementFromPoint(t.left,t.top);if(!h||!e.dom.contains(1!=h.nodeType?h.parentNode:h)){let n=e.dom.getBoundingClientRect();if(!q(t,n)||!(h=function e(t,n,i){let r=t.childNodes.length;if(r&&i.topt.top&&l++}B&&l&&1==s.nodeType&&1==(n=s.childNodes[l-1]).nodeType&&"false"==n.contentEditable&&n.getBoundingClientRect().top>=t.top&&l--,s==e.dom&&l==s.childNodes.length-1&&1==s.lastChild.nodeType&&t.top>s.lastChild.getBoundingClientRect().bottom?r=e.state.doc.content.size:(0==l||1!=s.nodeType||"BR"!=s.childNodes[l-1].nodeName)&&(r=function(e,t,n,i){let r=-1;for(let n=t,o=!1;n!=e.dom;){let t=e.docView.nearestDesc(n,!0);if(!t)return null;if(1==t.dom.nodeType&&(t.node.isBlock&&t.parent||!t.contentDOM)){let e=t.dom.getBoundingClientRect();if(t.node.isBlock&&t.parent&&(!o&&e.left>i.left||e.top>i.top?r=t.posBefore:(!o&&e.right-1?r:e.docView.posFromDOM(t,n,-1)}(e,s,l,t))}null==r&&(r=function(e,t,n){let{node:i,offset:r}=function e(t,n){let i,r,o,s=2e8,a,l=0,d=n.top,h=n.top;for(let e=t.firstChild,u=0;e;e=e.nextSibling,u++){let t;if(1==e.nodeType)t=e.getClientRects();else{if(3!=e.nodeType)continue;t=c(e).getClientRects()}for(let c=0;c=h){d=Math.max(p.bottom,d),h=Math.min(p.top,h);let t=p.left>n.left?p.left-n.left:p.right=(p.left+p.right)/2));continue}}else p.top>n.top&&!i&&p.left<=n.left&&p.right>=n.left&&(i=e,r={left:Math.max(p.left,Math.min(p.right,n.left)),top:p.top});!o&&(n.left>=p.right&&n.top>=p.top||n.left>=p.left&&n.top>=p.bottom)&&(l=u+1)}}return(!o&&i&&(o=i,a=r,s=0),o&&3==o.nodeType)?function(e,t){let n=e.nodeValue.length,i=document.createRange();for(let r=0;r=(n.left+n.right)/2)}}return{node:e,offset:0}}(o,a):!o||s&&1==o.nodeType?{node:t,offset:l}:e(o,a)}(t,n),o=-1;if(1==i.nodeType&&!i.firstChild){let e=i.getBoundingClientRect();o=e.left!=e.right&&n.left>(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(i,r,o)}(e,h,t));let u=e.docView.nearestDesc(h,!0);return{pos:r,inside:u?u.posAtStart-u.border:-1}}(this,e)}coordsAtPos(e,t=1){return _(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let i=this.docView.posFromDOM(e,t,n);if(null==i)throw RangeError("DOM position not inside the editor");return i}endOfTextblock(e,t){return function(e,t,n){let i,r;return G==t&&Q==n?X:(G=t,Q=n,X="up"==n||"down"==n?(i=t.selection,r="up"==n?i.$from:i.$to,Z(e,t,()=>{let{node:t}=e.docView.domFromPos(r.pos,"up"==n?-1:1);for(;;){let n=e.docView.nearestDesc(t,!0);if(!n)break;if(n.node.isBlock){t=n.contentDOM||n.dom;break}t=n.dom.parentNode}let i=_(e,r.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(1==e.nodeType)t=e.getClientRects();else{if(3!=e.nodeType)continue;t=c(e,0,e.nodeValue.length).getClientRects()}for(let e=0;er.top+1&&("up"==n?i.top-r.top>(r.bottom-i.top)*2:r.bottom-i.bottom>(i.bottom-r.top)*2))return!1}}return!0})):function(e,t,n){let{$head:i}=t.selection;if(!i.parent.isTextblock)return!1;let r=i.parentOffset,o=r==i.parent.content.size,s=e.domSelection();return Y.test(i.parent.textContent)&&s.modify?Z(e,t,()=>{let{focusNode:t,focusOffset:r,anchorNode:o,anchorOffset:a}=e.domSelectionRange(),l=s.caretBidiLevel;s.modify("move",n,"character");let c=i.depth?e.docView.domAfterPos(i.before()):e.dom,{focusNode:d,focusOffset:h}=e.domSelectionRange(),u=d&&!c.contains(1==d.nodeType?d:d.parentNode)||t==d&&r==h;try{s.collapse(o,a),t&&(t!=o||r!=a)&&s.extend&&s.extend(t,r)}catch(e){}return null!=l&&(s.caretBidiLevel=l),u}):"left"==n||"backward"==n?!r:o}(e,t,n))}(this,t||this.state,e)}pasteHTML(e,t){return ts(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return ts(this,e,null,!0,t||new ClipboardEvent("paste"))}destroy(){this.docView&&(!function(e){for(let t in e.domObserver.stop(),e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],tT(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,d())}get isDestroyed(){return null==this.docView}dispatchEvent(e){e5(this,e)||!eQ[e.type]||!this.editable&&e.type in eX||eQ[e.type](this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){let e=this.domSelection();return D&&11===this.root.nodeType&&function(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom&&function(e,t){let n;if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return tL(e,n)}function i(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.dom.addEventListener("beforeinput",i,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",i,!0),n?tL(e,n):null}(this,e)||e}domSelection(){return this.root.getSelection()}}function tV(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if("function"==typeof n&&(n=n(e.state)),n)for(let e in n)"class"==e?t.class+=" "+n[e]:"style"==e?t.style=(t.style?t.style+";":"")+n[e]:t[e]||"contenteditable"==e||"nodeName"==e||(t[e]=String(n[e]))}),t.translate||(t.translate="no"),[tf.node(0,e.state.doc.content.size,t)]}function tq(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:tf.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function tF(e){return!e.someProp("editable",t=>!1===t(e.state))}function tK(e){let t=Object.create(null);function n(e){for(let n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function tW(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw RangeError("Plugins passed directly to the view must not have a state component")}}}]); //# sourceMappingURL=9539.763162dc.js.map