=0&&(n=this.attrs[t][1]),n},r.prototype.attrJoin=function(e,t){var n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t},e.exports=r},function(e,t,n){"use strict";var r=n(48),o=n(91),i=n(92);e.exports=function(e){var t,n,a=e.space,s=e.mustUseProperty||[],u=e.attributes||{},l=e.properties,c=e.transform,f={},d={};for(t in l)n=new i(t,c(u,t),l[t],a),-1!==s.indexOf(t)&&(n.mustUseProperty=!0),f[t]=n,d[r(t)]=t,d[r(n.attribute)]=t;return new o(f,d,a)}},function(e,t,n){"use strict";var r=n(21);Object.defineProperty(t,"__esModule",{value:!0});var o=n(13);t.default=function(e,t,n){return new o.InputRule(e,(function(e,o,i,a){var s=n instanceof Function?n(o):n,u=e.tr,l=o.length-1,c=a,f=i;if(o[l]){var d=i+o[0].indexOf(o[l-1]),p=d+o[l-1].length-1,h=d+o[l-1].lastIndexOf(o[l]),m=h+o[l].length;if(function(e,t,n){var o=[];return n.doc.nodesBetween(e,t,(function(e,t){o=[].concat(r(o),r(e.marks.map((function(n){return{start:t,end:t+e.nodeSize,mark:n}}))))})),o}(i,a,e).filter((function(e){return e.end>d})).length)return u;md&&u.delete(d,h),c=(f=d)+o[l].length}return u.addMark(f,c,t.create(s)),u.removeStoredMark(t),u}))}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i,a=!0,s=!1;return{s:function(){o=e[Symbol.iterator]()},n:function(){var e=o.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==o.return||o.return()}finally{if(s)throw i}}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={errors:{controlled:"A component is changing a react-medium-image-zoom component from a controlled component to an uncontrolled one. ImageZoom elements should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled image zoom element for the lifetime of the component.",uncontrolled:"A component is changing a react-medium-image-zoom component from an uncontrolled component to a controlled one. ImageZoom elements should not switch from uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled image zoom element for the lifetime of the component."},styles:{image:{cursor:"zoom-in"},zoomImage:{cursor:"zoom-out",position:"absolute",transition:"transform 300ms",transform:"translate3d(0, 0, 0) scale(1)",transformOrigin:"center center",willChange:"transform, top, left"},zoomContainer:{position:"fixed",top:0,right:0,bottom:0,left:0,zIndex:999},overlay:{position:"absolute",top:0,right:0,bottom:0,left:0,backgroundColor:"#fff",opacity:0,transition:"opacity 300ms"}},transitionDuration:300};t.default=r},function(e,t,n){"use strict";e.exports=n(148)},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){var r=n(59);e.exports=function(e,t){if(e){if("string"===typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t,n){"use strict";n.r(t),n.d(t,"CellSelection",(function(){return I})),n.d(t,"TableMap",(function(){return h})),n.d(t,"TableView",(function(){return Ee})),n.d(t,"__clipCells",(function(){return F})),n.d(t,"__insertCells",(function(){return q})),n.d(t,"__pastedCells",(function(){return j})),n.d(t,"addColSpan",(function(){return D})),n.d(t,"addColumn",(function(){return re})),n.d(t,"addColumnAfter",(function(){return ie})),n.d(t,"addColumnBefore",(function(){return oe})),n.d(t,"addRow",(function(){return le})),n.d(t,"addRowAfter",(function(){return fe})),n.d(t,"addRowBefore",(function(){return ce})),n.d(t,"cellAround",(function(){return w})),n.d(t,"colCount",(function(){return O})),n.d(t,"columnIsHeader",(function(){return P})),n.d(t,"columnResizing",(function(){return Le})),n.d(t,"columnResizingPluginKey",(function(){return Oe})),n.d(t,"deleteColumn",(function(){return se})),n.d(t,"deleteRow",(function(){return pe})),n.d(t,"deleteTable",(function(){return Se})),n.d(t,"findCell",(function(){return M})),n.d(t,"fixTables",(function(){return te})),n.d(t,"fixTablesKey",(function(){return ee})),n.d(t,"goToNextCell",(function(){return xe})),n.d(t,"handlePaste",(function(){return G})),n.d(t,"inSameTable",(function(){return E})),n.d(t,"isInTable",(function(){return C})),n.d(t,"mergeCells",(function(){return me})),n.d(t,"moveCellForward",(function(){return S})),n.d(t,"nextCell",(function(){return L})),n.d(t,"pointsAtCell",(function(){return x})),n.d(t,"removeColSpan",(function(){return A})),n.d(t,"removeColumn",(function(){return ae})),n.d(t,"removeRow",(function(){return de})),n.d(t,"rowIsHeader",(function(){return ue})),n.d(t,"selectedRect",(function(){return ne})),n.d(t,"selectionCell",(function(){return _})),n.d(t,"setAttr",(function(){return T})),n.d(t,"setCellAttr",(function(){return ye})),n.d(t,"splitCell",(function(){return ve})),n.d(t,"splitCellWithType",(function(){return ge})),n.d(t,"tableEditing",(function(){return Ne})),n.d(t,"tableEditingKey",(function(){return k})),n.d(t,"tableNodeTypes",(function(){return b})),n.d(t,"tableNodes",(function(){return y})),n.d(t,"toggleHeader",(function(){return ke})),n.d(t,"toggleHeaderCell",(function(){return _e})),n.d(t,"toggleHeaderColumn",(function(){return Ce})),n.d(t,"toggleHeaderRow",(function(){return we})),n.d(t,"updateColumnsOnResize",(function(){return Me}));var r,o,i=n(2),a=n(0),s=n(25),u=n(12),l=n(8);if("undefined"!=typeof WeakMap){var c=new WeakMap;r=function(e){return c.get(e)},o=function(e,t){return c.set(e,t),t}}else{var f=[],d=0;r=function(e){for(var t=0;tr&&(i+=l.attrs.colspan)}for(var c=0;c1&&(n=!0)}-1==t?t=i:t!=i&&(t=Math.max(t,i))}return t}(e),n=e.childCount,r=[],o=0,i=null,a=[],s=0,u=t*n;s=n){(i||(i=[])).push({type:"overlong_rowspan",pos:c,n:y-k});break}for(var w=o+k*t,C=0;C0;t--)if("row"==e.node(t).type.spec.tableRole)return e.node(0).resolve(e.before(t+1));return null}function C(e){for(var t=e.selection.$head,n=t.depth;n>0;n--)if("row"==t.node(n).type.spec.tableRole)return!0;return!1}function _(e){var t=e.selection;return t.$anchorCell?t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell:t.node&&"cell"==t.node.type.spec.tableRole?t.$anchor:w(t.$head)||function(e){for(var t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){var r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n)}for(var o=e.nodeBefore,i=e.pos;o;o=o.lastChild,i--){var a=o.type.spec.tableRole;if("cell"==a||"header_cell"==a)return e.doc.resolve(i-o.nodeSize)}}(t.$head)}function x(e){return"row"==e.parent.type.spec.tableRole&&e.nodeAfter}function S(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function E(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function M(e){return h.get(e.node(-1)).findCell(e.pos-e.start(-1))}function O(e){return h.get(e.node(-1)).colCount(e.pos-e.start(-1))}function L(e,t,n){var r=e.start(-1),o=h.get(e.node(-1)).nextCell(e.pos-r,t,n);return null==o?null:e.node(0).resolve(r+o)}function T(e,t,n){var r={};for(var o in e)r[o]=e[o];return r[t]=n,r}function A(e,t,n){void 0===n&&(n=1);var r=T(e,"colspan",e.colspan-n);return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some((function(e){return e>0}))||(r.colwidth=null)),r}function D(e,t,n){void 0===n&&(n=1);var r=T(e,"colspan",e.colspan+n);if(r.colwidth){r.colwidth=r.colwidth.slice();for(var o=0;o0||v>0){var g=p.attrs;m>0&&(g=A(g,0,m)),v>0&&(g=A(g,g.colspan-v,v)),p=d.leftr.bottom){var y=T(p.attrs,"rowspan",Math.min(d.bottom,r.bottom)-Math.max(d.top,r.top));p=d.top0)return!1;var n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount},t.colSelection=function(e,n){void 0===n&&(n=e);var r=h.get(e.node(-1)),o=e.start(-1),i=r.findCell(e.pos-o),a=r.findCell(n.pos-o),s=e.node(0);return i.top<=a.top?(i.top>0&&(e=s.resolve(o+r.map[i.left])),a.bottom0&&(n=s.resolve(o+r.map[a.left])),i.bottom0)return!1;var o=n+this.$anchorCell.nodeAfter.attrs.colspan,i=r+this.$headCell.nodeAfter.attrs.colspan;return Math.max(o,i)==e.width},t.prototype.eq=function(e){return e instanceof t&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos},t.rowSelection=function(e,n){void 0===n&&(n=e);var r=h.get(e.node(-1)),o=e.start(-1),i=r.findCell(e.pos-o),a=r.findCell(n.pos-o),s=e.node(0);return i.left<=a.left?(i.left>0&&(e=s.resolve(o+r.map[i.top*r.width])),a.right0&&(n=s.resolve(o+r.map[a.top*r.width])),i.right0&&r>0||"table"==t.firstChild.type.spec.tableRole);)n--,r--,t=t.firstChild.content;var o=t.firstChild,i=o.type.spec.tableRole,s=o.type.schema,u=[];if("row"==i)for(var l=0;l=0;i--)for(var s=o.child(i).attrs,u=s.rowspan,l=s.colspan,c=r;c=t.length&&t.push(a.Fragment.empty),n[p]t&&(h=h.type.create(A(h.attrs,h.attrs.colspan,d+h.attrs.colspan-t),h.content)),f.push(h),d+=h.attrs.colspan;for(var m=1;mn&&(C=C.type.create(T(C.attrs,"rowspan",Math.max(1,n-C.attrs.rowspan)),C.content)),b.push(C)}v.push(a.Fragment.from(b))}i=v,o=n}return{width:r,height:o,rows:i}}function B(e,t,n,r,o,i,a,s){if(0==a||a==t.height)return!1;for(var u=!1,l=o;lt.width)for(var f=0,d=0;ft.height){for(var g=[],y=0,k=(t.height-1)*t.width;y=t.width)&&n.nodeAt(t.map[k+y]).type==c.header_cell;g.push(w?l||(l=c.header_cell.createAndFill()):u||(u=c.cell.createAndFill()))}for(var C=c.row.create(null,a.Fragment.from(g)),_=[],x=t.height;x=0;o--){var a=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:a.childCount))return null;if("cell"==a.type.spec.tableRole||"header_cell"==a.type.spec.tableRole){var s=r.before(o),u="vert"==t?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(u)?s:null}}return null}function Q(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t}function X(e,t){var n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?w(e.state.doc.resolve(n.pos)):null}var ee=new i.PluginKey("fix-tables");function te(e,t){var n,r=function(t,r){"table"==t.type.spec.tableRole&&(n=function(e,t,n,r){var o=h.get(t);if(!o.problems)return r;r||(r=e.tr);for(var i,a,s=[],u=0;u0){var _="cell";k.firstChild&&(_=k.firstChild.type.spec.tableRole);for(var x=[],S=0;S0?-1:0;P(r,i,n+a)&&(a=0==n||n==r.width?null:0);for(var s=0;s0&&n0&&r.map[u-1]==l||n0?-1:0;ue(r,i,n+l)&&(l=0==n||n==r.height?null:0);for(var c=0,f=r.width*n;c0&&n0&&d==r.map[f-r.width]){var p=o.nodeAt(d).attrs;e.setNodeMarkup(e.mapping.slice(l).map(d+i),null,T(p,"rowspan",p.rowspan-1)),c+=p.colspan-1}else if(n0&&o[a]==o[a-1]||t.right0&&o[i]==o[i-n]||t.bottom0;t--){var n=e.node(t).type.spec.tableRole;if("cell"===n||"header_cell"===n)return e.node(t)}return null}(i.$from)))return!1;o=w(i.$from).pos}if(1==r.attrs.colspan&&1==r.attrs.rowspan)return!1;if(n){var a=r.attrs,s=[],u=a.colwidth;a.rowspan>1&&(a=T(a,"rowspan",1)),a.colspan>1&&(a=T(a,"colspan",1));for(var l,c=ne(t),f=t.tr,d=0;d=0;r--){var i=e.node(-1).child(r);if(i.childCount)return o-1-i.lastChild.nodeSize;o-=i.nodeSize}}else{if(e.index()0;r--){if("table"==n.node(r).type.spec.tableRole)return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0}return!1}var Ee=function(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),Me(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))};function Me(e,t,n,r,o,i){for(var a=0,s=!0,u=t.firstChild,l=e.firstChild,c=0,f=0;c-1?{class:"resize-cursor"}:null},handleDOMEvents:{mousemove:function(e,n){!function(e,t,n,r,o){var i=Oe.getState(e.state);if(!i.dragging){var a=function(e){for(;e&&"TD"!=e.nodeName&&"TH"!=e.nodeName;)e=e.classList.contains("ProseMirror")?null:e.parentNode;return e}(t.target),s=-1;if(a){var u=a.getBoundingClientRect(),l=u.left,c=u.right;t.clientX-l<=n?s=Ae(e,t,"left"):c-t.clientX<=n&&(s=Ae(e,t,"right"))}if(s!=i.activeHandle){if(!o&&-1!==s){var f=e.state.doc.resolve(s),d=f.node(-1),p=h.get(d),m=f.start(-1);if(p.colCount(f.pos-m)+f.nodeAfter.attrs.colspan-1==p.width-1)return}Pe(e,s)}}}(e,n,t,0,o)},mouseleave:function(e){!function(e){var t=Oe.getState(e.state);t.activeHandle>-1&&!t.dragging&&Pe(e,-1)}(e)},mousedown:function(e,t){!function(e,t,n){var r=Oe.getState(e.state);if(-1==r.activeHandle||r.dragging)return!1;var o=e.state.doc.nodeAt(r.activeHandle),i=function(e,t,n){var r=n.colspan,o=n.colwidth,i=o&&o[o.length-1];if(i)return i;var a=e.domAtPos(t),s=a.node.childNodes[a.offset].offsetWidth,u=r;if(o)for(var l=0;l-1)return function(e,t){for(var n=[],r=e.doc.resolve(t),o=r.node(-1),i=h.get(o),a=r.start(-1),s=i.colCount(r.pos-a)+r.nodeAfter.attrs.colspan,l=0;l=0&&!(t.after(i+1)=0&&!(n.before(a+1)>n.start(a));a--,o--);return r==o&&/row|table/.test(t.node(i).type.spec.tableRole)}(a)?r=i.TextSelection.create(s,a.from):a instanceof i.TextSelection&&function(e){for(var t,n,r=e.$from,o=e.$to,i=r.depth;i>0;i--){var a=r.node(i);if("cell"===a.type.spec.tableRole||"header_cell"===a.type.spec.tableRole){t=a;break}}for(var s=o.depth;s>0;s--){var u=o.node(s);if("cell"===u.type.spec.tableRole||"header_cell"===u.type.spec.tableRole){n=u;break}}return t!==n&&0===o.parentOffset}(a)&&(r=i.TextSelection.create(s,a.$from.start(),a.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t}(r,te(r,n),t)}})}Te.prototype.apply=function(e){var t=this,n=e.getMeta(Oe);if(n&&null!=n.setHandle)return new Te(n.setHandle,null);if(n&&void 0!==n.setDragging)return new Te(t.activeHandle,n.setDragging);if(t.activeHandle>-1&&e.docChanged){var r=e.mapping.map(t.activeHandle,-1);x(e.doc.resolve(r))||(r=null),t=new Te(r,t.dragging)}return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={almostBlack:"#181A1B",lightBlack:"#2F3336",almostWhite:"#E6E6E6",white:"#FFF",white10:"rgba(255, 255, 255, 0.1)",black:"#000",black10:"rgba(0, 0, 0, 0.1)",primary:"#1AB6FF",greyLight:"#F4F7FA",grey:"#E8EBED",greyMid:"#C5CCD3",greyDark:"#DAE1E9"};t.base=Object.assign(Object.assign({},r),{fontFamily:"-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen, Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif",fontFamilyMono:"'SFMono-Regular',Consolas,'Liberation Mono', Menlo, Courier,monospace",fontWeight:400,zIndex:100,link:r.primary,placeholder:"#B1BECC",textSecondary:"#4E5C6E",textLight:r.white,textHighlight:"#b3e7ff",selected:r.primary,codeComment:"#6a737d",codePunctuation:"#5e6687",codeNumber:"#d73a49",codeProperty:"#c08b30",codeTag:"#3d8fd1",codeString:"#032f62",codeSelector:"#6679cc",codeAttr:"#c76b29",codeEntity:"#22a2c9",codeKeyword:"#d73a49",codeFunction:"#6f42c1",codeStatement:"#22a2c9",codePlaceholder:"#3d8fd1",codeInserted:"#202746",codeImportant:"#c94922",blockToolbarBackground:r.white,blockToolbarTrigger:r.greyMid,blockToolbarTriggerIcon:r.white,blockToolbarItem:r.almostBlack,blockToolbarText:r.almostBlack,blockToolbarHoverBackground:r.greyLight,blockToolbarDivider:r.greyMid,noticeInfoBackground:"#F5BE31",noticeInfoText:r.almostBlack,noticeTipBackground:"#9E5CF7",noticeTipText:r.white,noticeWarningBackground:"#FF5C80",noticeWarningText:r.white}),t.light=Object.assign(Object.assign({},t.base),{background:r.white,text:r.almostBlack,code:r.lightBlack,cursor:r.black,divider:r.greyMid,toolbarBackground:r.lightBlack,toolbarInput:r.white10,toolbarItem:r.white,tableDivider:r.greyMid,tableSelected:r.primary,tableSelectedBackground:"#E5F7FF",quote:r.greyDark,codeBackground:r.greyLight,codeBorder:r.grey,horizontalRule:r.greyMid,imageErrorBackground:r.greyLight}),t.dark=Object.assign(Object.assign({},t.base),{background:r.almostBlack,text:r.almostWhite,code:r.almostWhite,cursor:r.white,divider:"#4E5C6E",placeholder:"#52657A",toolbarBackground:r.white,toolbarInput:r.black10,toolbarItem:r.lightBlack,tableDivider:r.lightBlack,tableSelected:r.primary,tableSelectedBackground:"#002333",quote:r.greyDark,codeBackground:r.black,codeBorder:r.lightBlack,codeString:"#3d8fd1",horizontalRule:r.lightBlack,imageErrorBackground:"rgba(0, 0, 0, 0.5)"}),t.default=t.light},function(e,t){e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},function(e,t,n){"use strict";function r(){this.__rules__=[],this.__cache__=null}r.prototype.__find__=function(e){for(var t=0;t=1&&d&&f.depth-d.depth<=1){if(d.node.type===e)return o.liftListItem(t)(n,r);if(a.default(d.node,s)&&e.validContent(d.node.content)){var p=n.tr;return p.setNodeMarkup(d.pos,e),r&&r(p),!1}}return o.wrapInList(e)(n,r)}}},function(e,t,n){"use strict";n.r(t),n.d(t,"addListNodes",(function(){return d})),n.d(t,"bulletList",(function(){return l})),n.d(t,"liftListItem",(function(){return m})),n.d(t,"listItem",(function(){return c})),n.d(t,"orderedList",(function(){return u})),n.d(t,"sinkListItem",(function(){return v})),n.d(t,"splitListItem",(function(){return h})),n.d(t,"wrapInList",(function(){return p}));var r=n(8),o=n(0),i=["ol",0],a=["ul",0],s=["li",0],u={attrs:{order:{default:1}},parseDOM:[{tag:"ol",getAttrs:function(e){return{order:e.hasAttribute("start")?+e.getAttribute("start"):1}}}],toDOM:function(e){return 1==e.attrs.order?i:["ol",{start:e.attrs.order},0]}},l={parseDOM:[{tag:"ul"}],toDOM:function(){return a}},c={parseDOM:[{tag:"li"}],toDOM:function(){return s},defining:!0};function f(e,t){var n={};for(var r in e)n[r]=e[r];for(var o in t)n[o]=t[o];return n}function d(e,t,n){return e.append({ordered_list:f(u,{content:"list_item+",group:n}),bullet_list:f(l,{content:"list_item+",group:n}),list_item:f(c,{content:t})})}function p(e,t){return function(n,i){var a=n.selection,s=a.$from,u=a.$to,l=s.blockRange(u),c=!1,f=l;if(!l)return!1;if(l.depth>=2&&s.node(l.depth-1).type.compatibleContent(e)&&0==l.startIndex){if(0==s.index(l.depth-1))return!1;var d=n.doc.resolve(l.start-2);f=new o.NodeRange(d,d,l.depth),l.endIndex=0;u--)s=o.Fragment.from(n[u].type.create(n[u].attrs,s));e.step(new r.b(t.start-(i?2:0),t.end,t.start,t.end,new o.Slice(s,0,0),n.length,!0));for(var l=0,c=0;c0,d=a.depth-(f?1:2);d>=a.depth-3;d--)c=o.Fragment.from(a.node(d).copy(c));c=c.append(o.Fragment.from(e.createAndFill()));var p=t.tr.replace(a.before(f?null:-1),a.after(-3),new o.Slice(c,f?3:2,2));p.setSelection(t.selection.constructor.near(p.doc.resolve(a.pos+(f?3:2)))),n(p.scrollIntoView())}return!0}var h=s.pos==a.end()?l.contentMatchAt(0).defaultType:null,m=t.tr.delete(a.pos,s.pos),v=h&&[null,{type:h}];return!!Object(r.f)(m.doc,a.pos,2,v)&&(n&&n(m.split(a.pos,2,v).scrollIntoView()),!0)}}function m(e){return function(t,n){var i=t.selection,a=i.$from,s=i.$to,u=a.blockRange(s,(function(t){return t.childCount&&t.firstChild.type==e}));return!!u&&(!n||(a.node(u.depth-1).type==e?function(e,t,n,i){var a=e.tr,s=i.end,u=i.$to.end(i.depth);sl;u--)s-=a.child(u).nodeSize,i.delete(s-1,s+1);var c=i.doc.resolve(n.start),f=c.nodeAfter,d=0==n.startIndex,p=n.endIndex==a.childCount,h=c.node(-1),m=c.index(-1);if(!h.canReplace(m+(d?0:1),m+1,f.content.append(p?o.Fragment.empty:o.Fragment.from(a))))return!1;var v=c.pos,g=v+f.nodeSize;return i.step(new r.b(v-(d?1:0),g+(p?1:0),v+1,g-1,new o.Slice((d?o.Fragment.empty:o.Fragment.from(a.copy(o.Fragment.empty))).append(p?o.Fragment.empty:o.Fragment.from(a.copy(o.Fragment.empty))),d?0:1,p?0:1),d?0:1)),t(i.scrollIntoView()),!0}(t,n,u)))}}function v(e){return function(t,n){var i=t.selection,a=i.$from,s=i.$to,u=a.blockRange(s,(function(t){return t.childCount&&t.firstChild.type==e}));if(!u)return!1;var l=u.startIndex;if(0==l)return!1;var c=u.parent,f=c.child(l-1);if(f.type!=e)return!1;if(n){var d=f.lastChild&&f.lastChild.type==c.type,p=o.Fragment.from(d?e.create():null),h=new o.Slice(o.Fragment.from(e.create(null,o.Fragment.from(c.type.create(null,p)))),d?3:1,0),m=u.start,v=u.end;n(t.tr.step(new r.b(m-(d?3:1),v,m,v,h,1,!0)).scrollIntoView())}return!0}}},function(e,t,n){"use strict";var r=n(22),o=n(4),i=n(5),a=n(6),s=n(7),u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var c=u(n(90)),f=u(n(346)),d=u(n(97)),p=u(n(98)),h=u(n(347)),m=u(n(348)),v=u(n(99)),g=u(n(349)),y=u(n(96)),b=u(n(350)),k=u(n(352)),w=u(n(353)),C=u(n(354)),_=u(n(355)),x=n(14),S=n(13),E=u(n(100)),M=l(n(357)),O=u(n(10));[f.default,d.default,p.default,h.default,m.default,v.default,g.default,y.default,b.default,k.default,w.default,C.default,_.default].forEach(c.default.register);var L=function(e){a(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.apply(this,arguments)).handleLanguageChange=function(t){var n=e.editor.view,r=n.state.tr,o=t.target,i=o.getBoundingClientRect(),a=i.top,s=i.left,u=n.posAtCoords({top:a,left:s});if(u){var l=r.setNodeMarkup(u.inside,void 0,{language:o.value});n.dispatch(l)}},e}return i(n,[{key:"commands",value:function(e){var t=e.type;return function(){return x.setBlockType(t)}}},{key:"keys",value:function(e){var t=e.type;return{"Shift-Ctrl-\\":x.setBlockType(t)}}},{key:"handleCopyToClipboard",value:function(e){var t=this;return function(){E.default(e.textContent),t.options.onShowToast&&t.options.onShowToast("Copied to clipboard","code_copied")}}},{key:"inputRules",value:function(e){var t=e.type;return[S.textblockTypeInputRule(/^```$/,t)]}},{key:"toMarkdown",value:function(e,t){e.write("```"+(t.attrs.language||"")+"\n"),e.text(t.textContent,!1),e.ensureNewLine(),e.write("```"),e.closeBlock(t)}},{key:"parseMarkdown",value:function(){return{block:"code_block",getAttrs:function(e){return{language:e.info}}}}},{key:"languageOptions",get:function(){return Object.entries(M.LANGUAGES)}},{key:"name",get:function(){return"code_fence"}},{key:"schema",get:function(){var e=this;return{attrs:{language:{default:"javascript"}},content:"text*",marks:"",group:"block",code:!0,defining:!0,draggable:!1,parseDOM:[{tag:"pre",preserveWhitespace:"full"}],toDOM:function(t){var n=document.createElement("button");n.innerText="Copy",n.type="button",n.addEventListener("click",e.handleCopyToClipboard(t));var o=document.createElement("select");return o.addEventListener("change",e.handleLanguageChange),e.languageOptions.forEach((function(e){var n=r(e,2),i=n[0],a=n[1],s=document.createElement("option"),u="none"===i?"":i;s.value=u,s.innerText=a,s.selected=t.attrs.language===u,o.appendChild(s)})),["div",{class:"code-block"},["div",{contentEditable:!1},o,n],["pre",["code",{spellCheck:!1},0]]]}}}},{key:"plugins",get:function(){return[M.default({name:this.name,deferred:!this.options.initialReadOnly})]}},{key:"markdownToken",get:function(){return"fence"}}]),n}(O.default);t.default=L},function(e,t,n){"use strict";e.exports=function(e){return e.toLowerCase()}},function(e,t,n){"use strict";var r=0;function o(){return Math.pow(2,++r)}t.boolean=o(),t.booleanish=o(),t.overloadedBoolean=o(),t.number=o(),t.spaceSeparated=o(),t.commaSeparated=o(),t.commaOrSpaceSeparated=o()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.createPortalContainer=function(e){var t=document.createElement(e);return document.body.appendChild(t),t},t.removePortalContainer=function(e){document.body.removeChild(e)},t.fetchImage=function(e,t){var n=e.src,r=e.srcSet,o=e.sizes,i=new Image;i.addEventListener("load",(function e(){t(i),i.removeEventListener("load",e)})),i.src=n,r&&(i.srcset=r),o&&(i.sizes=o)};var r=t.getScale=function(e){var t=e.width,n=e.height,r=e.zoomMargin,o=window.innerWidth/(t+r),i=window.innerHeight/(n+r);return Math.min(o,i)};t.getMaxDimensionScale=function(e){var t=e.width,n=e.height,o=e.naturalWidth,i=e.naturalHeight,a=e.zoomMargin,s=r({width:o,height:i,zoomMargin:a}),u=o>i?o/t:i/n;return s>1?u:s*u},t.isMaxDimension=function(e){return e.clientWidth>=e.naturalWidth||e.clientHeight>=e.naturalHeight}},function(e,t,n){"use strict";n.r(t),n.d(t,"Portal",(function(){return k})),n.d(t,"PortalWithState",(function(){return x}));var r=n(17),o=n.n(r),i=n(1),a=n.n(i),s=n(11),u=n.n(s),l=!("undefined"===typeof window||!window.document||!window.document.createElement),c=function(){function e(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1)for(var n=1;n=0;l--)if(c[l]!==f[l])return!1;for(l=c.length-1;l>=0;l--)if(u=c[l],!y(e[u],t[u],n,r))return!1;return!0}(e,t,n,a))}return n?e===t:e==t}function b(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function k(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(n){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function w(e,t,n,r){var o;if("function"!==typeof t)throw new TypeError('"block" argument must be a function');"string"===typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(n){t=n}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&v(o,n,"Missing expected exception"+r);var a="string"===typeof r,s=!e&&o&&!n;if((!e&&i.isError(o)&&a&&k(o,n)||s)&&v(o,n,"Got unwanted exception"+r),e&&o&&n&&!k(o,n)||!e&&o)throw o}f.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return h(m(e.actual),128)+" "+e.operator+" "+h(m(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||v;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,o=p(t),i=r.indexOf("\n"+o);if(i>=0){var a=r.indexOf("\n",i+1);r=r.substring(a+1)}this.stack=r}}},i.inherits(f.AssertionError,Error),f.fail=v,f.ok=g,f.equal=function(e,t,n){e!=t&&v(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&v(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){y(e,t,!1)||v(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){y(e,t,!0)||v(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){y(e,t,!1)&&v(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){y(t,n,!0)&&v(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&v(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&v(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){w(!0,e,t,n)},f.doesNotThrow=function(e,t,n){w(!1,e,t,n)},f.ifError=function(e){if(e)throw e};var C=Object.keys||function(e){var t=[];for(var n in e)a.call(e,n)&&t.push(n);return t}}).call(this,n(27))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){return function(t){var n=t.selection,r=n.from,o=n.$from,i=n.to;return n.empty?e.isInSet(t.storedMarks||o.marks()):t.doc.rangeHasMark(r,i,e)}}},function(e,t,n){"use strict";var r=n(16),o=n(4),i=n(5),a=n(6),s=n(7);function u(){var e=r(["\n padding: 8px 16px;\n position: absolute;\n z-index: ",";\n opacity: 0;\n background-color: ",';\n border-radius: 4px;\n transform: scale(0.95);\n transition: opacity 150ms cubic-bezier(0.175, 0.885, 0.32, 1.275),\n transform 150ms cubic-bezier(0.175, 0.885, 0.32, 1.275);\n transition-delay: 150ms;\n line-height: 0;\n height: 40px;\n box-sizing: border-box;\n pointer-events: none;\n white-space: nowrap;\n\n &::before {\n content: "";\n display: block;\n width: 24px;\n height: 24px;\n transform: translateX(-50%) rotate(45deg);\n background: ',";\n border-radius: 3px;\n z-index: -1;\n position: absolute;\n bottom: -2px;\n left: calc(50% - ","px);\n }\n\n * {\n box-sizing: border-box;\n }\n\n ",";\n\n @media print {\n display: none;\n }\n"]);return u=function(){return e},e}var l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var f=l(n(1)),d=n(51),p=n(24),h=c(n(15)),m="undefined"===typeof window,v=function(e){a(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.apply(this,arguments)).menuRef=e.props.forwardedRef||f.createRef(),e.state={left:-1e3,top:0,offset:0,visible:!1,isSelectingText:!1},e.handleMouseDown=function(){e.props.active||e.setState((function(e){return Object.assign(Object.assign({},e),{isSelectingText:!0})}))},e.handleMouseUp=function(){e.setState((function(e){return Object.assign(Object.assign({},e),{isSelectingText:!1})}))},e}return i(n,[{key:"componentDidMount",value:function(){window.addEventListener("mousedown",this.handleMouseDown),window.addEventListener("mouseup",this.handleMouseUp)}},{key:"componentDidUpdate",value:function(){var e=this.calculatePosition(this.props);p.isEqual(e,this.state)||this.setState(e)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("mousedown",this.handleMouseDown),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"calculatePosition",value:function(e){var t=e.view,n=e.active,r=t.state.selection;if(!n||!this.menuRef.current||m||this.state.isSelectingText)return{left:-1e3,top:0,offset:0,visible:!1,isSelectingText:this.state.isSelectingText};var o=t.coordsAtPos(r.$from.pos),i=t.coordsAtPos(r.$to.pos),a=r.isColSelection&&r.isColSelection();if(r.isRowSelection&&r.isRowSelection())i.left=o.left+12;else if(a){var s=t.domAtPos(r.$from.pos).node.getBoundingClientRect().width;i.left=o.left+s}var u=Math.abs(i.left-o.left)/2,l=o.left+u,c=this.menuRef.current,f=c.offsetWidth,d=c.offsetHeight,p=Math.min(window.innerWidth-f-12,Math.max(12,l-f/2)),h=Math.min(window.innerHeight-d-12,Math.max(12,o.top-d)),v=Math.round(p-(l-f/2));return{left:Math.round(p+window.scrollX),top:Math.round(h+window.scrollY),offset:v,visible:!0,isSelectingText:this.state.isSelectingText}}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.active;return f.createElement(d.Portal,null,f.createElement(g,{active:n&&this.state.visible,ref:this.menuRef,offset:this.state.offset,style:{top:"".concat(this.state.top,"px"),left:"".concat(this.state.left,"px")}},this.state.visible&&t))}}]),n}(f.Component),g=h.default.div(u(),(function(e){return e.theme.zIndex+100}),(function(e){return e.theme.toolbarBackground}),(function(e){return e.theme.toolbarBackground}),(function(e){return e.offset||0}),(function(e){return e.active&&"\n transform: translateY(-6px) scale(1);\n pointer-events: all;\n opacity: 1;\n "}));t.default=f.forwardRef((function(e,t){return f.createElement(v,Object.assign({},e,{forwardedRef:t}))}))},function(e,t,n){"use strict";var r=n(16),o=n(34),i=n(35),a=n(4),s=n(5),u=n(6),l=n(7);function c(){var e=r(["\n background: ",";\n position: absolute;\n top: 100%;\n width: 100%;\n height: auto;\n left: 0;\n padding: 8px;\n margin: 0;\n margin-top: -3px;\n margin-bottom: 0;\n border-radius: 0 0 4px 4px;\n overflow-y: auto;\n max-height: 25vh;\n"]);return c=function(){return e},e}function f(){var e=r(["\n margin-left: -8px;\n margin-right: -8px;\n min-width: 336px;\n"]);return f=function(){return e},e}var d=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},p=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var h=d(n(1)),m=n(18),v=n(20),g=d(n(15)),y=p(n(66)),b=p(n(61)),k=p(n(67)),w=p(n(68)),C=p(n(240)),_=function(e){u(n,e);var t=l(n);function n(){var e;return a(this,n),(e=t.apply(this,arguments)).discardInputValue=!1,e.initialValue=e.href,e.initialSelectionLength=e.props.to-e.props.from,e.state={selectedIndex:-1,value:e.href,results:[]},e.componentWillUnmount=function(){if(!e.discardInputValue&&e.state.value!==e.initialValue){var t=(e.state.value||"").trim();if(!t)return e.handleRemoveLink();e.save(t,t)}},e.save=function(t,n){if(0!==(t=t.trim()).length){e.discardInputValue=!0;var r=e.props,o=r.from,i=r.to;y.default(t)||t.startsWith("/")||(t="https://".concat(t)),e.props.onSelectLink({href:t,title:n,from:o,to:i})}},e.handleKeyDown=function(t){switch(t.key){case"Enter":t.preventDefault();var n=e.state,r=n.selectedIndex,o=n.results,i=n.value,a=e.props.onCreateLink;if(r>=0){var s=o[r];s?e.save(s.url,s.title):a&&r===o.length&&e.handleCreateLink(i)}else e.save(i,i);return void(e.initialSelectionLength&&e.moveSelectionToEnd());case"Escape":return t.preventDefault(),void(e.initialValue?e.setState({value:e.initialValue},e.moveSelectionToEnd):e.handleRemoveLink());case"ArrowUp":t.preventDefault(),t.stopPropagation();var u=e.state.selectedIndex-1;return void e.setState({selectedIndex:Math.max(0,u)});case"ArrowDown":case"Tab":t.preventDefault(),t.stopPropagation();var l=e.state.results.length,c=e.state.selectedIndex+1;return void e.setState({selectedIndex:Math.min(c,l)})}},e.handleFocusLink=function(t){e.setState({selectedIndex:t})},e.handleChange=function(){var t=i(o.mark((function t(n){var r,i,a;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=n.target.value,i=y.default(r),e.setState({value:r,results:i?[]:e.state.results,selectedIndex:-1}),!r||i||!e.props.onSearchLink){t.next=16;break}return t.prev=4,t.next=7,e.props.onSearchLink(r);case 7:a=t.sent,e.setState({results:a}),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(4),console.error(t.t0);case 14:t.next=17;break;case 16:e.setState({results:[]});case 17:case"end":return t.stop()}}),t,null,[[4,11]])})));return function(e){return t.apply(this,arguments)}}(),e.handleOpenLink=function(t){t.preventDefault(),e.props.onClickLink(e.href)},e.handleCreateLink=function(t){e.discardInputValue=!0;var n=e.props.onCreateLink;if(0!==(t=t.trim()).length)return n?n(t):void 0},e.handleRemoveLink=function(){e.discardInputValue=!0;var t=e.props,n=t.from,r=t.to,o=t.mark,i=t.view,a=t.onRemoveLink,s=e.props.view,u=s.state,l=s.dispatch;o&&l(u.tr.removeMark(n,r,o)),a&&a(),i.focus()},e.handleSelectLink=function(t,n){return function(r){r.preventDefault(),e.save(t,n),e.initialSelectionLength&&e.moveSelectionToEnd()}},e.moveSelectionToEnd=function(){var t=e.props,n=t.to,r=t.view,o=r.state;(0,r.dispatch)(m.setTextSelection(n)(o.tr)),r.focus()},e}return s(n,[{key:"render",value:function(){var e=this,t=this.props.theme,n=this.state,r=n.value,o=n.results,i=n.selectedIndex,a=this.props.tooltip,s=r.match(/^https?:\/\//i),u=!!this.props.onCreateLink&&!(r===this.initialValue)&&r.trim().length>0&&!s,l=!!r&&(u||o.length>0);return h.createElement(x,null,h.createElement(k.default,{value:r,placeholder:u?"Find or create a doc\u2026":"Search or paste a link\u2026",onKeyDown:this.handleKeyDown,onChange:this.handleChange,autoFocus:""===this.href}),h.createElement(w.default,{onClick:this.handleOpenLink,disabled:!r},h.createElement(a,{tooltip:"Open link",placement:"top"},h.createElement(v.OpenIcon,{color:t.toolbarItem}))),h.createElement(w.default,{onClick:this.handleRemoveLink},h.createElement(a,{tooltip:"Remove link",placement:"top"},this.initialValue?h.createElement(v.TrashIcon,{color:t.toolbarItem}):h.createElement(v.CloseIcon,{color:t.toolbarItem}))),l&&h.createElement(S,{id:"link-search-results"},o.map((function(n,r){return h.createElement(C.default,{key:n.url,title:n.title,icon:h.createElement(v.DocumentIcon,{color:t.toolbarItem}),onMouseOver:function(){return e.handleFocusLink(r)},onClick:e.handleSelectLink(n.url,n.title),selected:r===i})})),u&&h.createElement(C.default,{key:"create",title:"Create new doc \u201c".concat(r.trim(),"\u201d"),icon:h.createElement(v.PlusIcon,{color:t.toolbarItem}),onMouseOver:function(){return e.handleFocusLink(o.length)},onClick:function(){e.handleCreateLink(r),e.initialSelectionLength&&e.moveSelectionToEnd()},selected:o.length===i})))}},{key:"href",get:function(){return this.props.mark?this.props.mark.attrs.href:""}}]),n}(h.Component),x=g.default(b.default)(f()),S=g.default.ol(c(),(function(e){return e.theme.toolbarBackground}));t.default=g.withTheme(_)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){try{return new URL(e),!0}catch(t){return!1}}},function(e,t,n){"use strict";var r=n(16);function o(){var e=r(["\n font-size: 15px;\n background: ",";\n color: ",";\n border-radius: 2px;\n padding: 3px 8px;\n border: 0;\n margin: 0;\n outline: none;\n flex-grow: 1;\n"]);return o=function(){return e},e}var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(n(15)).default.input(o(),(function(e){return e.theme.toolbarInput}),(function(e){return e.theme.toolbarItem}));t.default=a},function(e,t,n){"use strict";var r=n(16);function o(){var e=r(["\n display: inline-block;\n flex: 0;\n width: 24px;\n height: 24px;\n cursor: pointer;\n margin-left: 10px;\n border: none;\n background: none;\n transition: opacity 100ms ease-in-out;\n padding: 0;\n opacity: 0.7;\n outline: none;\n\n &:first-child {\n margin-left: 0;\n }\n\n &:hover {\n opacity: 1;\n }\n\n &:disabled {\n opacity: 0.3;\n cursor: default;\n }\n\n ",";\n"]);return o=function(){return e},e}var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(n(15));t.default=a.default.button(o(),(function(e){return e.active&&"opacity: 1;"}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!e||!t)return!1;var n=e.parent.childAfter(e.parentOffset);if(!n.node)return!1;var r=n.node.marks.find((function(e){return e.type===t}));if(!r)return!1;for(var o=e.index(),i=e.start()+n.offset,a=o+1,s=i+n.node.nodeSize;o>0&&r.isInSet(e.parent.child(o-1).marks);)o-=1,i-=e.parent.child(o).nodeSize;for(;a1&&void 0!==arguments[1]?arguments[1]:0;"text"===r.type.name&&r.marks.forEach((function(e){if("link"===e.type.name&&e.attrs.href===t&&(n={node:r,pos:o}))return!1})),r.content.size&&r.descendants(e)}(e),n}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){var e=o(r.mark((function e(t,n,o,a){var s,u,l,c,f,d,p;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=t.dispatch,u=t.state,l=a.onCreateLink,c=a.onShowToast,e.prev=2,e.next=5,l(n);case 5:if(f=e.sent,d=i(t.state.doc,o)){e.next=9;break}return e.abrupt("return");case 9:s(t.state.tr.removeMark(d.pos,d.pos+d.node.nodeSize,u.schema.marks.link).addMark(d.pos,d.pos+d.node.nodeSize,u.schema.marks.link.create({href:f}))),e.next=19;break;case 12:if(e.prev=12,e.t0=e.catch(2),p=i(t.state.doc,o)){e.next=17;break}return e.abrupt("return");case 17:s(t.state.tr.removeMark(p.pos,p.pos+p.node.nodeSize,u.schema.marks.link)),c&&c("Sorry, an error occurred creating the link","link_create_error");case 19:case"end":return e.stop()}}),e,null,[[2,12]])})));return function(t,n,r,o){return e.apply(this,arguments)}}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=[];if(e.dataTransfer){var n=e.dataTransfer;n.files&&n.files.length?t=n.files:n.items&&n.items.length&&(t=n.items)}else e.target&&e.target.files&&(t=e.target.files);return Array.prototype.slice.call(t)}},function(e,t,n){"use strict";var r=n(36),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=o(n(73));t.default=function(e,t,n,o,a){var s=o.filter((function(e){return/image/i.test(e.type)}));if(0!==s.length){var u=a.uploadImage,l=a.onImageUploadStart,c=a.onImageUploadStop,f=a.onShowToast;if(u){t.preventDefault(),l&&l();var d,p=e.state.schema,h=0,m=r(s);try{var v=function(){var t=d.value,r={},o=e.state.tr;o.setMeta(i.default,{add:{id:r,file:t,pos:n}}),e.dispatch(o),u(t).then((function(t){var n=i.findPlaceholder(e.state,r);if(null!==n){var o=e.state.tr.replaceWith(n,n,p.nodes.image.create({src:t})).setMeta(i.default,{remove:{id:r}});e.dispatch(o)}})).catch((function(t){console.error(t);var n=e.state.tr.setMeta(i.default,{remove:{id:r}});e.dispatch(n),f&&f("Sorry, an error occurred uploading the image","image_upload_error")})).finally((function(){++h===s.length&&c&&c()}))};for(m.s();!(d=m.n()).done;)v()}catch(g){m.e(g)}finally{m.f()}}else console.warn("uploadImage callback must be defined to handle image uploads.")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=n(12),i=new r.Plugin({state:{init:function(){return o.DecorationSet.empty},apply:function(e,t){t=t.map(e.mapping,e.doc);var n=e.getMeta(this);if(n&&n.add){var r=document.createElement("div");r.className="image placeholder";var i=document.createElement("img");i.src=URL.createObjectURL(n.add.file),r.appendChild(i);var a=o.Decoration.widget(n.add.pos,r,{id:n.add.id});t=t.add(e.doc,[a])}else n&&n.remove&&(t=t.remove(t.find(null,null,(function(e){return e.id===n.remove.id}))));return t}},props:{decorations:function(e){return this.getState(e)}}});t.default=i,t.findPlaceholder=function(e,t){var n=i.getState(e).find(null,null,(function(e){return e.id===t}));return n.length?n[0].from:null}},function(e,t,n){"use strict";var r=n(22),o=n(21),i=n(39),a=n(4),s=n(5),u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=n(25),c=n(254),f=n(309),d=u(n(310)),p=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;a(this,e),n&&t.forEach((function(e){e.bindEditor(n)})),this.extensions=t,this.embeds=n?n.props.embeds:void 0}return s(e,[{key:"serializer",value:function(){var e=this.extensions.filter((function(e){return"node"===e.type})).reduce((function(e,t){return Object.assign(Object.assign({},e),i({},t.name,t.toMarkdown))}),{}),t=this.extensions.filter((function(e){return"mark"===e.type})).reduce((function(e,t){return Object.assign(Object.assign({},e),i({},t.name,t.toMarkdown))}),{});return new f.MarkdownSerializer(e,t)}},{key:"parser",value:function(e){var t=e.schema,n=this.extensions.filter((function(e){return"mark"===e.type||"node"===e.type})).reduce((function(e,t){var n=t.parseMarkdown();return n?Object.assign(Object.assign({},e),i({},t.markdownToken||t.name,n)):e}),{});return new c.MarkdownParser(t,d.default({embeds:this.embeds}),n)}},{key:"keymaps",value:function(e){var t=e.schema,n=this.extensions.filter((function(e){return["extension"].includes(e.type)})).filter((function(e){return e.keys})).map((function(e){return e.keys({schema:t})})),r=this.extensions.filter((function(e){return["node","mark"].includes(e.type)})).filter((function(e){return e.keys})).map((function(e){return e.keys({type:t["".concat(e.type,"s")][e.name],schema:t})}));return[].concat(o(n),o(r)).map((function(e){return l.keymap(e)}))}},{key:"inputRules",value:function(e){var t=e.schema,n=this.extensions.filter((function(e){return["extension"].includes(e.type)})).filter((function(e){return e.inputRules})).map((function(e){return e.inputRules({schema:t})})),r=this.extensions.filter((function(e){return["node","mark"].includes(e.type)})).filter((function(e){return e.inputRules})).map((function(e){return e.inputRules({type:t["".concat(e.type,"s")][e.name],schema:t})}));return[].concat(o(n),o(r)).reduce((function(e,t){return[].concat(o(e),o(t))}),[])}},{key:"commands",value:function(e){var t=e.schema,n=e.view;return this.extensions.filter((function(e){return e.commands})).reduce((function(e,o){var i=o.name,a=o.type,s={},u=o.commands(Object.assign({schema:t},["node","mark"].includes(a)?{type:t["".concat(a,"s")][i]}:{})),l=function(e,t){return!!n.editable&&(n.focus(),e(t)(n.state,n.dispatch,n))},c=function(e,t){Array.isArray(t)?s[e]=function(e){return t.forEach((function(t){return l(t,e)}))}:"function"===typeof t&&(s[e]=function(e){return l(t,e)})};return"object"===typeof u?Object.entries(u).forEach((function(e){var t=r(e,2),n=t[0],o=t[1];c(n,o)})):c(i,u),Object.assign(Object.assign({},e),s)}),{})}},{key:"nodes",get:function(){return this.extensions.filter((function(e){return"node"===e.type})).reduce((function(e,t){return Object.assign(Object.assign({},e),i({},t.name,t.schema))}),{})}},{key:"marks",get:function(){return this.extensions.filter((function(e){return"mark"===e.type})).reduce((function(e,t){var n=t.name,r=t.schema;return Object.assign(Object.assign({},e),i({},n,r))}),{})}},{key:"plugins",get:function(){return this.extensions.filter((function(e){return e.plugins})).reduce((function(e,t){var n=t.plugins;return[].concat(o(e),o(n))}),[])}}]),e}();t.default=p},function(e,t,n){"use strict";e.exports=n(256)},function(e,t,n){"use strict";e.exports.encode=n(257),e.exports.decode=n(258),e.exports.format=n(259),e.exports.parse=n(260)},function(e,t){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(e,t){e.exports=/[\0-\x1F\x7F-\x9F]/},function(e,t){e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},function(e,t,n){"use strict";var r="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",o="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",i=new RegExp("^(?:"+r+"|"+o+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?].*?[?]>|]*>|)"),a=new RegExp("^(?:"+r+"|"+o+")");e.exports.HTML_TAG_RE=i,e.exports.HTML_OPEN_CLOSE_TAG_RE=a},function(e,t,n){"use strict";function r(e,t){var n,r,o,i,a,s=[],u=t.length;for(n=0;n=0;n--)95!==(r=t[n]).marker&&42!==r.marker||-1!==r.end&&(o=t[r.end],s=n>0&&t[n-1].end===r.end+1&&t[n-1].token===r.token-1&&t[r.end+1].token===o.token+1&&t[n-1].marker===r.marker,a=String.fromCharCode(r.marker),(i=e.tokens[r.token]).type=s?"strong_open":"em_open",i.tag=s?"strong":"em",i.nesting=1,i.markup=s?a+a:a,i.content="",(i=e.tokens[o.token]).type=s?"strong_close":"em_close",i.tag=s?"strong":"em",i.nesting=-1,i.markup=s?a+a:a,i.content="",s&&(e.tokens[t[n-1].token].content="",e.tokens[t[r.end+1].token].content="",n--))}e.exports.tokenize=function(e,t){var n,r,o=e.pos,i=e.src.charCodeAt(o);if(t)return!1;if(95!==i&&42!==i)return!1;for(r=e.scanDelims(e.pos,42===i),n=0;n?@\[\]\\^_`{|}~]/g,lower:!0})))}t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=a(e.textContent);return 0===t?n:"".concat(n,"-").concat(t)}},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"name",get:function(){return"doc"}},{key:"schema",get:function(){return{content:"block+"}}}]),n}(s(n(10)).default);t.default=u},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"toMarkdown",value:function(e,t){e.text(t.text)}},{key:"name",get:function(){return"text"}},{key:"schema",get:function(){return{group:"inline"}}}]),n}(s(n(10)).default);t.default=u},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(13),l=s(n(10)),c=s(n(87)),f=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"inputRules",value:function(e){var t=e.type;return[u.wrappingInputRule(/^\s*>\s$/,t)]}},{key:"commands",value:function(e){var t=e.type;return function(){return c.default(t)}}},{key:"keys",value:function(e){var t=e.type;return{"Mod-]":c.default(t)}}},{key:"toMarkdown",value:function(e,t){e.wrapBlock("> ",null,t,(function(){return e.renderContent(t)}))}},{key:"parseMarkdown",value:function(){return{block:"blockquote"}}},{key:"name",get:function(){return"blockquote"}},{key:"schema",get:function(){return{content:"block+",group:"block",parseDOM:[{tag:"blockquote"}],toDOM:function(){return["blockquote",0]}}}}]),n}(l.default);t.default=f},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(14),i=r(n(28));t.default=function(e,t){return function(n,r){return i.default(e)(n)?o.lift(n,r):o.wrapIn(e,t)(n,r)}}},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(13),l=s(n(45)),c=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"commands",value:function(e){var t=e.type,n=e.schema;return function(){return l.default(t,n.nodes.list_item)}}},{key:"keys",value:function(e){var t=e.type,n=e.schema;return{"Shift-Ctrl-8":l.default(t,n.nodes.list_item)}}},{key:"inputRules",value:function(e){var t=e.type;return[u.wrappingInputRule(/^\s*([-+*])\s$/,t)]}},{key:"toMarkdown",value:function(e,t){e.renderList(t," ",(function(){return(t.attrs.bullet||"*")+" "}))}},{key:"parseMarkdown",value:function(){return{block:"bullet_list"}}},{key:"name",get:function(){return"bullet_list"}},{key:"schema",get:function(){return{content:"list_item+",group:"block",parseDOM:[{tag:"ul"}],toDOM:function(){return["ul",0]}}}}]),n}(s(n(10)).default);t.default=c},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"name",get:function(){return"code_block"}},{key:"markdownToken",get:function(){return"code_block"}}]),n}(s(n(47)).default);t.default=u},function(e,t,n){"use strict";(function(t){var r=function(){var e="Prism"in t,n=e?t.Prism:void 0;return function(){e?t.Prism=n:delete t.Prism;e=void 0,n=void 0}}();("undefined"===typeof window?"undefined"===typeof self?{}:self:window).Prism={manual:!0,disableWorkerMessageHandler:!0};var o=n(322),i=n(338),a=n(345),s=n(96),u=n(97),l=n(98),c=n(99);r();var f={}.hasOwnProperty;function d(){}d.prototype=a;var p=new d;function h(e){if("function"!==typeof e||!e.displayName)throw new Error("Expected `function` for `grammar`, got `"+e+"`");void 0===p.languages[e.displayName]&&e(p)}e.exports=p,p.highlight=function(e,t){var n,r=a.highlight;if("string"!==typeof e)throw new Error("Expected `string` for `value`, got `"+e+"`");if("Object"===p.util.type(t))n=t,t=null;else{if("string"!==typeof t)throw new Error("Expected `string` for `name`, got `"+t+"`");if(!f.call(p.languages,t))throw new Error("Unknown language: `"+t+"` is not registered");n=p.languages[t]}return r.call(this,e,n,t)},p.register=h,p.alias=function(e,t){var n,r,o,i,a=p.languages,s=e;t&&((s={})[e]=t);for(n in s)for(r=s[n],o=(r="string"===typeof r?[r]:r).length,i=-1;++i=48&&t<=57}},function(e,t,n){"use strict";function r(e){e.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype://i,cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/?[\da-z]{1,8};/i},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.value.replace(/&/,"&"))})),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(t,n){var r={};r["language-"+n]={pattern:/(^$)/i,lookbehind:!0,inside:e.languages[n]},r.cdata=/^$/i;var o={"included-cdata":{pattern://i,inside:r}};o["language-"+n]={pattern:/[\s\S]+/,inside:e.languages[n]};var i={};i[t]={pattern:RegExp(/(<__[\s\S]*?>)(?:\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g,t),"i"),lookbehind:!0,greedy:!0,inside:o},e.languages.insertBefore("markup","cdata",i)}}),e.languages.xml=e.languages.extend("markup",{}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup}e.exports=r,r.displayName="markup",r.aliases=["xml","html","mathml","svg"]},function(e,t,n){"use strict";function r(e){!function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/,inside:{rule:/@[\w-]+/}},url:{pattern:RegExp("url\\((?:"+t.source+"|[^\n\r()]*)\\)","i"),inside:{function:/^url/i,punctuation:/^\(|\)$/}},selector:RegExp("[^{}\\s](?:[^{};\"']|"+t.source+")*?(?=\\s*\\{)"),string:{pattern:t,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),e.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:n.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:e.languages.css}},alias:"language-css"}},n.tag))}(e)}e.exports=r,r.displayName="css",r.aliases=[]},function(e,t,n){"use strict";function r(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/}}e.exports=r,r.displayName="clike",r.aliases=[]},function(e,t,n){"use strict";function r(e){e.languages.javascript=e.languages.extend("clike",{"class-name":[e.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<=?|>>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}}}),e.languages.markup&&e.languages.markup.tag.addInlined("script","javascript"),e.languages.js=e.languages.javascript}e.exports=r,r.displayName="javascript",r.aliases=["js"]},function(e,t,n){"use strict";var r=n(356),o={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,i,a,s,u,l,c=!1;t||(t={}),n=t.debug||!1;try{if(a=r(),s=document.createRange(),u=document.getSelection(),(l=document.createElement("span")).textContent=e,l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),"undefined"===typeof r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var i=o[t.format]||o.default;window.clipboardData.setData(i,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(l),s.selectNodeContents(l),u.addRange(s),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");c=!0}catch(f){n&&console.error("unable to copy using execCommand: ",f),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(f){n&&console.error("unable to copy using clipboardData: ",f),n&&console.error("falling back to prompt"),i=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(i,e)}}finally{u&&("function"==typeof u.removeRange?u.removeRange(s):u.removeAllRanges()),l&&document.body.removeChild(l),a()}return c}},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(13),l=s(n(45)),c=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"keys",value:function(e){var t=e.type,n=e.schema;return{"Shift-Ctrl-7":l.default(t,n.nodes.checkbox_item)}}},{key:"commands",value:function(e){var t=e.type,n=e.schema;return function(){return l.default(t,n.nodes.checkbox_item)}}},{key:"inputRules",value:function(e){var t=e.type;return[u.wrappingInputRule(/^-?\s*(\[ \])\s$/i,t)]}},{key:"toMarkdown",value:function(e,t){e.renderList(t," ",(function(){return"- "}))}},{key:"parseMarkdown",value:function(){return{block:"checkbox_list"}}},{key:"name",get:function(){return"checkbox_list"}},{key:"schema",get:function(){var e=this;return{group:"block",content:"checkbox_item+",toDOM:function(){return["ul",{class:e.name},0]},parseDOM:[{tag:'[class="'.concat(this.name,'"]')}]}}}]),n}(s(n(10)).default);t.default=c},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(46),l=function(e){i(n,e);var t=a(n);function n(){var e;return r(this,n),(e=t.apply(this,arguments)).handleChange=function(t){var n=e.editor.view,r=n.state.tr,o=n.posAtCoords({left:t.clientX,top:t.clientY});if(o){var i=r.setNodeMarkup(o.inside,void 0,{checked:t.target.checked});n.dispatch(i)}},e}return o(n,[{key:"keys",value:function(e){var t=e.type;return{Enter:u.splitListItem(t),Tab:u.sinkListItem(t),"Shift-Tab":u.liftListItem(t),"Mod-]":u.sinkListItem(t),"Mod-[":u.liftListItem(t)}}},{key:"toMarkdown",value:function(e,t){e.write(t.attrs.checked?"[x] ":"[ ] "),e.renderContent(t)}},{key:"parseMarkdown",value:function(){return{block:"checkbox_item",getAttrs:function(e){return{checked:!!e.attrGet("checked")||void 0}}}}},{key:"name",get:function(){return"checkbox_item"}},{key:"schema",get:function(){var e=this;return{attrs:{checked:{default:!1}},content:"paragraph block*",defining:!0,draggable:!1,parseDOM:[{tag:'li[data-type="'.concat(this.name,'"]'),getAttrs:function(e){return{checked:!!e.getElementsByTagName("input")[0].checked}}}],toDOM:function(t){var n=document.createElement("input");return n.type="checkbox",n.addEventListener("click",e.handleChange),t.attrs.checked&&(n.checked=!0),["li",{"data-type":e.name,class:t.attrs.checked?"checked":void 0},["span",{contentEditable:!1},n],["div",0]]}}}}]),n}(s(n(10)).default);t.default=l},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=s(n(1)),c=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"component",value:function(e){var t=e.isEditable,n=e.isSelected,r=e.theme,o=e.node,i=o.attrs.component;return l.createElement("div",{contentEditable:!1},l.createElement(i,{attrs:o.attrs,isEditable:t,isSelected:n,theme:r}))}},{key:"commands",value:function(e){var t=e.type;return function(e){return function(n,r){return r(n.tr.replaceSelectionWith(t.create(e)).scrollIntoView()),!0}}}},{key:"toMarkdown",value:function(e,t){e.ensureNewLine(),e.write("["+e.esc(t.attrs.href)+"]("+e.esc(t.attrs.href)+")"),e.write("\n\n")}},{key:"parseMarkdown",value:function(){return{node:"embed",getAttrs:function(e){return{href:e.attrGet("href"),matches:e.attrGet("matches"),component:e.attrGet("component")}}}}},{key:"name",get:function(){return"embed"}},{key:"schema",get:function(){return{content:"inline*",group:"block",attrs:{href:{},component:{},matches:{}},parseDOM:[{tag:"iframe"}],toDOM:function(e){return["iframe",{src:e.attrs.href,contentEditable:!1},0]}}}}]),n}(u(n(10)).default);t.default=c},function(e,t,n){"use strict";var r=n(39),o=n(4),i=n(5),a=n(6),s=n(7),u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),c=u(n(100)),f=n(12),d=n(13),p=n(14),h=u(n(358)),m=u(n(359)),v=u(n(83)),g=function(e){a(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.apply(this,arguments)).handleCopyLink=function(){return function(t){var n="#".concat(t.target.parentElement.parentElement.id),r=window.location.href.split("#")[0];c.default(r+n),e.options.onShowToast&&e.options.onShowToast("Link copied to clipboard","heading_copied")}},e}return i(n,[{key:"toMarkdown",value:function(e,t){e.write(e.repeat("#",t.attrs.level)+" "),e.renderInline(t),e.closeBlock(t)}},{key:"parseMarkdown",value:function(){return{block:"heading",getAttrs:function(e){return{level:+e.tag.slice(1)}}}}},{key:"commands",value:function(e){var t=e.type,n=e.schema;return function(e){return m.default(t,n.nodes.paragraph,e)}}},{key:"keys",value:function(e){var t=e.type,n=this.options.levels.reduce((function(e,n){return Object.assign(Object.assign({},e),r({},"Shift-Ctrl-".concat(n),p.setBlockType(t,{level:n})))}),{});return Object.assign(Object.assign({},n),{Backspace:h.default(t)})}},{key:"inputRules",value:function(e){var t=e.type;return this.options.levels.map((function(e){return d.textblockTypeInputRule(new RegExp("^(#{1,".concat(e,"})\\s$")),t,(function(){return{level:e}}))}))}},{key:"name",get:function(){return"heading"}},{key:"defaultOptions",get:function(){return{levels:[1,2,3,4]}}},{key:"schema",get:function(){var e=this;return{attrs:{level:{default:1}},content:"inline*",group:"block",defining:!0,draggable:!1,parseDOM:this.options.levels.map((function(e){return{tag:"h".concat(e),attrs:{level:e}}})),toDOM:function(t){var n=document.createElement("button");return n.innerText="#",n.type="button",n.className="heading-anchor",n.addEventListener("click",e.handleCopyLink()),["h".concat(t.attrs.level+(e.options.offset||0)),n,["span",0]]}}}},{key:"plugins",get:function(){var e=this;return[new l.Plugin({props:{decorations:function(t){var n=t.doc,r=[],o={};return n.descendants((function(t,n){if(t.type.name===e.name){var i=v.default(t),a=i;o[i]>0&&(a=v.default(t,o[i])),o[i]=void 0!==o[i]?o[i]+1:1,r.push(f.Decoration.node(n,n+t.nodeSize,{id:a,class:"heading-name",nodeName:"a"}))}})),f.DecorationSet.create(n,r)}}})]}}]),n}(u(n(10)).default);t.default=g},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(13),l=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"commands",value:function(e){var t=e.type;return function(){return function(e,n){return n(e.tr.replaceSelectionWith(t.create()).scrollIntoView()),!0}}}},{key:"keys",value:function(e){var t=e.type;return{"Mod-_":function(e,n){return n(e.tr.replaceSelectionWith(t.create()).scrollIntoView()),!0}}}},{key:"inputRules",value:function(e){var t=e.type;return[new u.InputRule(/^(?:---|___\s|\*\*\*\s)$/,(function(e,n,r,o){var i=e.tr;return n[0]&&i.replaceWith(r-1,o,t.create({})),i}))]}},{key:"toMarkdown",value:function(e,t){e.write(t.attrs.markup||"\n---"),e.closeBlock(t)}},{key:"parseMarkdown",value:function(){return{node:"hr"}}},{key:"name",get:function(){return"hr"}},{key:"schema",get:function(){return{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return["div",["hr"]]}}}}]),n}(s(n(10)).default);t.default=l},function(e,t,n){"use strict";var r=n(16),o=n(22),i=n(4),a=n(5),s=n(6),u=n(7);function l(){var e=r(["\n border: 0;\n display: block;\n font-size: 13px;\n font-style: italic;\n color: ",";\n padding: 2px 0;\n line-height: 16px;\n text-align: center;\n width: 100%;\n min-height: 1em;\n outline: none;\n background: none;\n resize: none;\n\n &:empty:before {\n color: ",';\n content: "Write a caption";\n pointer-events: none;\n }\n']);return l=function(){return e},e}var c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},f=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var d=c(n(1)),p=n(2),h=n(13),m=n(18),v=f(n(15)),g=f(n(360)),y=f(n(71)),b=f(n(73)),k=f(n(72)),w=f(n(10)),C=/!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\)/,_=function(e){s(n,e);var t=u(n);function n(){var e;return i(this,n),(e=t.apply(this,arguments)).handleKeyDown=function(t){var n=t.node,r=t.getPos;return function(t){if("Enter"===t.key){t.preventDefault();var o=e.editor.view,i=r()+n.nodeSize;return o.focus(),void o.dispatch(m.setTextSelection(i)(o.state.tr))}}},e.handleBlur=function(t){var n=t.node,r=t.getPos;return function(t){var o=t.target.innerText,i=n.attrs.src;if(o!==n.attrs.alt){var a=e.editor.view,s=a.state.tr,u=r(),l=s.setNodeMarkup(u,void 0,{src:i,alt:o});a.dispatch(l)}}},e.component=function(t){var n=t.theme,r=t.node.attrs,o=r.alt,i=r.src;return d.createElement("div",{className:"image",contentEditable:!1},d.createElement(g.default,{image:{src:i,alt:o,style:{maxWidth:"100%",maxHeight:"75vh"}},defaultStyles:{overlay:{backgroundColor:n.background}},shouldRespectMaxDimension:!0}),(t.isEditable||o)&&d.createElement(x,{onKeyDown:e.handleKeyDown(t),onBlur:e.handleBlur(t),tabIndex:-1,contentEditable:t.isEditable,suppressContentEditableWarning:!0},o))},e}return a(n,[{key:"toMarkdown",value:function(e,t){e.write("!["+e.esc((t.attrs.alt||"").replace("\n","")||"")+"]("+e.esc(t.attrs.src)+")")}},{key:"parseMarkdown",value:function(){return{node:"image",getAttrs:function(e){return{src:e.attrGet("src"),alt:e.children[0]&&e.children[0].content||null}}}}},{key:"commands",value:function(e){var t=e.type;return function(e){return function(n,r){var o=n.selection,i=o.$cursor?o.$cursor.pos:o.$to.pos,a=t.create(e);return r(n.tr.insert(i,a)),!0}}}},{key:"inputRules",value:function(e){var t=e.type;return[new h.InputRule(C,(function(e,n,r,i){var a=o(n,3),s=a[0],u=a[1],l=a[2],c=e.tr;return s&&c.replaceWith(r-1,i,t.create({src:l,alt:u})),c}))]}},{key:"name",get:function(){return"image"}},{key:"schema",get:function(){return{inline:!0,attrs:{src:{},alt:{default:null}},content:"text*",marks:"",group:"inline",draggable:!0,parseDOM:[{tag:"div[class=image]",getAttrs:function(e){var t=e.getElementsByTagName("img")[0],n=e.getElementsByTagName("p")[0];return{src:t.getAttribute("src"),alt:n.innerText}}}],toDOM:function(e){return["div",{class:"image"},["img",Object.assign(Object.assign({},e.attrs),{contentEditable:!1})],["p",{class:"caption"},0]]}}}},{key:"plugins",get:function(){return[b.default,(e=this.options,new p.Plugin({props:{handleDOMEvents:{paste:function(t,n){if(t.props.editable&&!t.props.editable(t.state))return!1;if(!n.clipboardData)return!1;var r=Array.prototype.slice.call(n.clipboardData.items).map((function(e){return e.getAsFile()})).filter((function(e){return e}));if(0===r.length)return!1;var o=t.state.tr;o.selection.empty||o.deleteSelection();var i=o.selection.from;return k.default(t,n,i,r,e),!0},drop:function(t,n){if(t.props.editable&&!t.props.editable(t.state))return!1;var r=y.default(n);if(0===r.length)return!1;var o=t.posAtCoords({left:n.clientX,top:n.clientY});return!!o&&(k.default(t,n,o.pos,r,e),!0)}}}}))];var e}}]),n}(w.default);t.default=_;var x=v.default.p(l(),(function(e){return e.theme.textSecondary}),(function(e){return e.theme.placeholder}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={keys:["Enter"],keyCode:13},o=function(e){var t=e.keyCode,n=e.keys;return function(e){return e.keyCode?e.keyCode===t:-1!==n.indexOf(e.key)}},i=(t.isEnterOrSpaceBarKey=function(e){return o(r)(e)||i(e)},t.isTabKey=o({keys:["Tab"],keyCode:9}),t.isSpaceBarKey=o({keys:[" "],keyCode:32}));t.isEscapeKey=o({keys:["Escape","Esc"],keyCode:27})},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(46),l=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"keys",value:function(e){var t=e.type;return{Enter:u.splitListItem(t),Tab:u.sinkListItem(t),"Shift-Tab":u.liftListItem(t),"Mod-]":u.sinkListItem(t),"Mod-[":u.liftListItem(t)}}},{key:"toMarkdown",value:function(e,t){e.renderContent(t)}},{key:"parseMarkdown",value:function(){return{block:"list_item"}}},{key:"name",get:function(){return"list_item"}},{key:"schema",get:function(){return{content:"paragraph block*",defining:!0,draggable:!1,parseDOM:[{tag:"li"}],toDOM:function(){return["li",0]}}}}]),n}(s(n(10)).default);t.default=l},function(e,t,n){"use strict";var r=n(22),o=n(4),i=n(5),a=n(6),s=n(7),u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var c=n(13),f=u(n(87)),d=n(20),p=l(n(1)),h=u(n(17)),m=function(e){a(n,e);var t=s(n);function n(){var e;return o(this,n),(e=t.apply(this,arguments)).handleStyleChange=function(t){var n=e.editor.view,r=n.state.tr,o=t.target,i=o.getBoundingClientRect(),a=i.top,s=i.left,u=n.posAtCoords({top:a,left:s});if(u){var l=r.setNodeMarkup(u.inside,void 0,{style:o.value});n.dispatch(l)}},e}return i(n,[{key:"commands",value:function(e){var t=e.type;return function(e){return f.default(t,e)}}},{key:"inputRules",value:function(e){var t=e.type;return[c.wrappingInputRule(/^:::$/,t)]}},{key:"toMarkdown",value:function(e,t){e.write("\n:::"+(t.attrs.style||"info")+"\n"),e.renderContent(t),e.ensureNewLine(),e.write(":::"),e.closeBlock(t)}},{key:"parseMarkdown",value:function(){return{block:"container_notice",getAttrs:function(e){return{style:e.info}}}}},{key:"styleOptions",get:function(){return Object.entries({info:"Info",warning:"Warning",tip:"Tip"})}},{key:"name",get:function(){return"container_notice"}},{key:"schema",get:function(){var e=this;return{attrs:{style:{default:"info"}},content:"block+",group:"block",defining:!0,draggable:!1,parseDOM:[{tag:"div.notice-block",preserveWhitespace:"full"}],toDOM:function(t){var n,o=document.createElement("select");o.addEventListener("change",e.handleStyleChange),e.styleOptions.forEach((function(e){var n=r(e,2),i=n[0],a=n[1],s=document.createElement("option");s.value=i,s.innerText=a,s.selected=t.attrs.style===i,o.appendChild(s)})),n="tip"===t.attrs.style?p.createElement(d.StarredIcon,{color:"currentColor"}):"warning"===t.attrs.style?p.createElement(d.WarningIcon,{color:"currentColor"}):p.createElement(d.InfoIcon,{color:"currentColor"});var i=document.createElement("div");return i.className="icon",h.default.render(n,i),["div",{class:"notice-block ".concat(t.attrs.style)},i,["div",{contentEditable:!1},o],["div",0]]}}}}]),n}(u(n(10)).default);t.default=m},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(13),l=s(n(45)),c=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"commands",value:function(e){var t=e.type,n=e.schema;return function(){return l.default(t,n.nodes.list_item)}}},{key:"keys",value:function(e){var t=e.type,n=e.schema;return{"Shift-Ctrl-9":l.default(t,n.nodes.list_item)}}},{key:"inputRules",value:function(e){var t=e.type;return[u.wrappingInputRule(/^(\d+)\.\s$/,t,(function(e){return{order:+e[1]}}),(function(e,t){return t.childCount+t.attrs.order===+e[1]}))]}},{key:"toMarkdown",value:function(e,t){var n=t.attrs.order||1,r="".concat(n+t.childCount-1).length,o=e.repeat(" ",r+2);e.renderList(t,o,(function(t){var o="".concat(n+t);return e.repeat(" ",r-o.length)+o+". "}))}},{key:"parseMarkdown",value:function(){return{block:"ordered_list"}}},{key:"name",get:function(){return"ordered_list"}},{key:"schema",get:function(){return{attrs:{order:{default:1}},content:"list_item+",group:"block",parseDOM:[{tag:"ol",getAttrs:function(e){return{order:e.hasAttribute("start")?parseInt(e.getAttribute("start")||"1",10):1}}}],toDOM:function(e){return 1===e.attrs.order?["ol",0]:["ol",{start:e.attrs.order},0]}}}}]),n}(s(n(10)).default);t.default=c},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(14),l=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"keys",value:function(e){var t=e.type;return{"Shift-Ctrl-0":u.setBlockType(t)}}},{key:"commands",value:function(e){var t=e.type;return function(){return u.setBlockType(t)}}},{key:"toMarkdown",value:function(e,t){""!==t.textContent.trim()||0!==t.childCount||e.inTable?(e.renderInline(t),e.closeBlock(t)):e.write("\\\n")}},{key:"parseMarkdown",value:function(){return{block:"paragraph"}}},{key:"name",get:function(){return"paragraph"}},{key:"schema",get:function(){return{content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:function(){return["p",0]}}}}]),n}(s(n(10)).default);t.default=l},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=s(n(10)),l=n(12),c=n(41),f=n(18),d=n(2),p=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"commands",value:function(e){var t=e.schema;return{createTable:function(e){var n=e.rowsCount,r=e.colsCount;return function(e,o){var i=e.tr.selection.anchor+1,a=f.createTable(t,n,r),s=e.tr.replaceSelectionWith(a).scrollIntoView(),u=s.doc.resolve(i);s.setSelection(d.TextSelection.near(u)),o(s)}},setColumnAttr:function(e){var t=e.index,n=e.alignment;return function(e,r){var o=f.getCellsInColumn(t)(e.selection)||[],i=e.tr;o.forEach((function(e){var t=e.pos;i=i.setNodeMarkup(t,null,{alignment:n})})),r(i)}},addColumnBefore:function(){return c.addColumnBefore},addColumnAfter:function(){return c.addColumnAfter},deleteColumn:function(){return c.deleteColumn},addRowAfter:function(e){var t=e.index;return function(e,n){if(0===t){var r=f.addRowAt(t+2,!0)(e.tr);n(f.moveRow(t+2,t+1)(r))}else n(f.addRowAt(t+1,!0)(e.tr))}},deleteRow:function(){return c.deleteRow},deleteTable:function(){return c.deleteTable},toggleHeaderColumn:function(){return c.toggleHeaderColumn},toggleHeaderRow:function(){return c.toggleHeaderRow},toggleHeaderCell:function(){return c.toggleHeaderCell},setCellAttr:function(){return c.setCellAttr},fixTables:function(){return c.fixTables}}}},{key:"keys",value:function(){return{Tab:c.goToNextCell(1),"Shift-Tab":c.goToNextCell(-1),Enter:function(e,t){if(!c.isInTable(e))return!1;var n=f.getCellsInColumn(0)(e.selection)||[];return t(f.addRowAt(n.length,!0)(e.tr)),!0}}}},{key:"toMarkdown",value:function(e,t){e.renderTable(t),e.closeBlock(t)}},{key:"parseMarkdown",value:function(){return{block:"table"}}},{key:"name",get:function(){return"table"}},{key:"schema",get:function(){return{content:"tr+",tableRole:"table",isolating:!0,group:"block",parseDOM:[{tag:"table"}],toDOM:function(){return["div",{class:"scrollable-wrapper"},["div",{class:"scrollable"},["table",{class:"rme-table"},["tbody",0]]]]}}}},{key:"plugins",get:function(){var e=this;return[c.tableEditing(),new d.Plugin({props:{decorations:function(t){var n=t.doc,r=[],o=0;return n.descendants((function(t,n){if(t.type.name===e.name){var i=document.getElementsByClassName("rme-table")[o];if(i){var a=i.parentElement;!!(a&&a.scrollWidth>a.clientWidth)&&r.push(l.Decoration.widget(n+1,(function(){var e=document.createElement("div");return e.className="scrollable-shadow right",e}))),o++}}})),l.DecorationSet.create(n,r)}}})]}}]),n}(u.default);t.default=p},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(12),l=n(2),c=n(18),f=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"toMarkdown",value:function(e,t){e.renderContent(t)}},{key:"parseMarkdown",value:function(){return{block:"td",getAttrs:function(e){return{alignment:e.info}}}}},{key:"name",get:function(){return"td"}},{key:"schema",get:function(){return{content:"paragraph+",tableRole:"cell",isolating:!0,parseDOM:[{tag:"td"}],toDOM:function(e){return["td",e.attrs.alignment?{style:"text-align: ".concat(e.attrs.alignment)}:{},0]},attrs:{colspan:{default:1},rowspan:{default:1},alignment:{default:null}}}}},{key:"plugins",get:function(){var e=this;return[new l.Plugin({props:{decorations:function(t){var n=t.doc,r=t.selection,o=[],i=c.getCellsInColumn(0)(r);return i&&i.forEach((function(n,a){var s=n.pos;0===a&&o.push(u.Decoration.widget(s+1,(function(){var n="grip-table";c.isTableSelected(r)&&(n+=" selected");var o=document.createElement("a");return o.className=n,o.addEventListener("mousedown",(function(n){n.preventDefault(),e.options.onSelectTable(t)})),o}))),o.push(u.Decoration.widget(s+1,(function(){var n="grip-row";c.isRowSelected(a)(r)&&(n+=" selected"),0===a?n+=" first":a===i.length-1&&(n+=" last");var o=document.createElement("a");return o.className=n,o.addEventListener("mousedown",(function(n){n.preventDefault(),e.options.onSelectRow(a,t)})),o})))})),u.DecorationSet.create(n,o)}}})]}}]),n}(s(n(10)).default);t.default=f},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(12),l=n(2),c=n(18),f=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"toMarkdown",value:function(e,t){e.renderContent(t)}},{key:"parseMarkdown",value:function(){return{block:"th",getAttrs:function(e){return{alignment:e.info}}}}},{key:"name",get:function(){return"th"}},{key:"schema",get:function(){return{content:"paragraph+",tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th"}],toDOM:function(e){return["th",e.attrs.alignment?{style:"text-align: ".concat(e.attrs.alignment)}:{},0]},attrs:{colspan:{default:1},rowspan:{default:1},alignment:{default:null}}}}},{key:"plugins",get:function(){var e=this;return[new l.Plugin({props:{decorations:function(t){var n=t.doc,r=t.selection,o=[],i=c.getCellsInRow(0)(r);return i&&i.forEach((function(n,a){var s=n.pos;o.push(u.Decoration.widget(s+1,(function(){var n="grip-column";c.isColumnSelected(a)(r)&&(n+=" selected"),0===a?n+=" first":a===i.length-1&&(n+=" last");var o=document.createElement("a");return o.className=n,o.addEventListener("mousedown",(function(n){n.preventDefault(),e.options.onSelectColumn(a,t)})),o})))})),u.DecorationSet.create(n,o)}}})]}}]),n}(s(n(10)).default);t.default=f},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"parseMarkdown",value:function(){return{block:"tr"}}},{key:"name",get:function(){return"tr"}},{key:"schema",get:function(){return{content:"(th | td)*",tableRole:"row",parseDOM:[{tag:"tr"}],toDOM:function(){return["tr",0]}}}}]),n}(s(n(10)).default);t.default=u},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(14),l=s(n(31)),c=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"inputRules",value:function(e){var t=e.type;return[l.default(/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,t)]}},{key:"keys",value:function(e){var t=e.type;return{"Mod-b":u.toggleMark(t),"Mod-B":u.toggleMark(t)}}},{key:"parseMarkdown",value:function(){return{mark:"strong"}}},{key:"name",get:function(){return"strong"}},{key:"schema",get:function(){return{parseDOM:[{tag:"b"},{tag:"strong"},{style:"font-style",getAttrs:function(e){return"bold"===e}}],toDOM:function(){return["strong"]}}}},{key:"toMarkdown",get:function(){return{open:"**",close:"**",mixable:!0,expelEnclosingWhitespace:!0}}}]),n}(s(n(23)).default);t.default=c},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(14),l=s(n(31));function c(e,t){var n,r=/`+/g,o=0;if(e.isText)for(;n=r.exec(e.text);)o=Math.max(o,n[0].length);for(var i=o>0&&t>0?" `":"`",a=0;a0&&t<0&&(i+=" "),i}var f=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"inputRules",value:function(e){var t=e.type;return[l.default(/(?:^|[^`])(`([^`]+)`)$/,t)]}},{key:"keys",value:function(e){var t=e.type;return{"Mod`":u.toggleMark(t)}}},{key:"parseMarkdown",value:function(){return{mark:"code_inline"}}},{key:"name",get:function(){return"code_inline"}},{key:"schema",get:function(){return{excludes:"strong em link mark strikethrough",parseDOM:[{tag:"code"}],toDOM:function(){return["code",{spellCheck:!1}]}}}},{key:"toMarkdown",get:function(){return{open:function(e,t,n,r){return c(n.child(r),-1)},close:function(e,t,n,r){return c(n.child(r-1),1)},escape:!1}}}]),n}(s(n(23)).default);t.default=f},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(14),l=s(n(31)),c=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"inputRules",value:function(e){var t=e.type;return[l.default(/(?:==)([^=]+)(?:==)$/,t)]}},{key:"keys",value:function(e){var t=e.type;return{"Mod-Ctrl-h":u.toggleMark(t)}}},{key:"parseMarkdown",value:function(){return{mark:"mark"}}},{key:"name",get:function(){return"mark"}},{key:"schema",get:function(){return{parseDOM:[{tag:"mark"}],toDOM:function(){return["mark"]}}}},{key:"toMarkdown",get:function(){return{open:"==",close:"==",mixable:!0,expelEnclosingWhitespace:!0}}}]),n}(s(n(23)).default);t.default=c},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(14),l=s(n(31)),c=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"inputRules",value:function(e){var t=e.type;return[l.default(/(?:^|[^_])(_([^_]+)_)$/,t),l.default(/(?:^|[^*])(\*([^*]+)\*)$/,t)]}},{key:"keys",value:function(e){var t=e.type;return{"Mod-i":u.toggleMark(t),"Mod-I":u.toggleMark(t)}}},{key:"parseMarkdown",value:function(){return{mark:"em"}}},{key:"name",get:function(){return"em"}},{key:"schema",get:function(){return{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style",getAttrs:function(e){return"italic"===e}}],toDOM:function(){return["em"]}}}},{key:"toMarkdown",get:function(){return{open:"*",close:"*",mixable:!0,expelEnclosingWhitespace:!0}}}]),n}(s(n(23)).default);t.default=c},function(e,t,n){"use strict";var r=n(22),o=n(4),i=n(5),a=n(6),s=n(7),u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=n(14),c=n(2),f=n(13),d=u(n(23)),p=/\[(.+)]\((\S+)\)/;function h(e,t,n,r){if(e.attrs.title||!/^\w+:/.test(e.attrs.href))return!1;var o=t.child(n+(r<0?-1:0));if(!o.isText||o.text!==e.attrs.href||o.marks[o.marks.length-1]!==e)return!1;if(n===(r<0?1:t.childCount-1))return!0;var i=t.child(n+(r<0?-2:1));return!e.isInSet(i.marks)}var m=function(e){a(n,e);var t=s(n);function n(){return o(this,n),t.apply(this,arguments)}return i(n,[{key:"inputRules",value:function(e){var t=this,n=e.type;return[new f.InputRule(p,(function(e,o,i,a){var s=r(o,3),u=s[0],l=s[1],c=s[2],f=e.tr;return u&&f.replaceWith(i,a,t.editor.schema.text(l)).addMark(i,i+l.length,n.create({href:c})),f}))]}},{key:"commands",value:function(e){var t=e.type;return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{href:""},n=e.href;return l.toggleMark(t,{href:n})}}},{key:"keys",value:function(e){var t=this,n=e.type;return{"Mod-k":function(e,r){return e.selection.empty?(t.options.onKeyboardShortcut(),!0):l.toggleMark(n,{href:""})(e,r)}}}},{key:"parseMarkdown",value:function(){return{mark:"link",getAttrs:function(e){return{href:e.attrGet("href"),title:e.attrGet("title")||null}}}}},{key:"name",get:function(){return"link"}},{key:"schema",get:function(){return{attrs:{href:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:function(e){return{href:e.getAttribute("href")}}}],toDOM:function(e){return["a",Object.assign(Object.assign({},e.attrs),{rel:"noopener noreferrer nofollow"}),0]}}}},{key:"plugins",get:function(){var e=this;return[new c.Plugin({props:{handleDOMEvents:{mouseover:function(t,n){return!!(n.target instanceof HTMLAnchorElement&&e.options.onHoverLink)&&e.options.onHoverLink(n)},click:function(t,n){if(t.props.editable&&t.props.editable(t.state)&&!n.metaKey)return!1;if(n.target instanceof HTMLAnchorElement){var r=n.target.href;if(r.startsWith("#")&&e.options.onClickHashtag)return n.stopPropagation(),n.preventDefault(),e.options.onClickHashtag(r),!0;if(e.options.onClickLink)return n.stopPropagation(),n.preventDefault(),e.options.onClickLink(r),!0}return!1}}}})]}},{key:"toMarkdown",get:function(){return{open:function(e,t,n,r){return h(t,n,r,1)?"<":"["},close:function(e,t,n,r){return h(t,n,r,-1)?">":"]("+e.esc(t.attrs.href)+(t.attrs.title?" "+e.quote(t.attrs.title):"")+")"}}}}]),n}(d.default);t.default=m},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(14),l=s(n(31)),c=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"keys",value:function(e){var t=e.type;return{"Mod-d":u.toggleMark(t)}}},{key:"inputRules",value:function(e){var t=e.type;return[l.default(/~([^~]+)~$/,t)]}},{key:"parseMarkdown",value:function(){return{mark:"strikethrough"}}},{key:"name",get:function(){return"strikethrough"}},{key:"schema",get:function(){return{parseDOM:[{tag:"s"},{tag:"del"},{tag:"strike"}],toDOM:function(){return["del",0]}}}},{key:"toMarkdown",get:function(){return{open:"~~",close:"~~",mixable:!0,expelEnclosingWhitespace:!0}}},{key:"markdownToken",get:function(){return"s"}}]),n}(s(n(23)).default);t.default=c},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(7),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(2),l=s(n(69)),c=function(e){i(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return o(n,[{key:"parseMarkdown",value:function(){return{mark:"placeholder"}}},{key:"name",get:function(){return"placeholder"}},{key:"schema",get:function(){return{parseDOM:[{tag:"span.template-placeholder"}],toDOM:function(){return["span",{class:"template-placeholder"}]}}}},{key:"toMarkdown",get:function(){return{open:"!!",close:"!!",mixable:!0,expelEnclosingWhitespace:!0}}},{key:"plugins",get:function(){var e=this;return[new u.Plugin({props:{handleTextInput:function(t,n,r,o){if(e.editor.props.template)return!1;var i=t.state,a=t.dispatch,s=i.doc.resolve(n),c=l.default(s,i.schema.marks.placeholder);if(!c)return!1;var f=Math.min(n,c.from),d=Math.max(r,c.to);a(i.tr.removeMark(c.from,c.to,i.schema.marks.placeholder).insertText(o,f,d));var p=t.state.doc.resolve(f+o.length);return a(t.state.tr.setSelection(u.TextSelection.near(p))),!0},handleKeyDown:function(t,n){if(!t.props.editable||!t.props.editable(t.state))return!1;if(e.editor.props.template)return!1;if("ArrowLeft"!==n.key&&"ArrowRight"!==n.key&&"Backspace"!==n.key)return!1;var r=t.state,o=t.dispatch;if("Backspace"===n.key){var i=l.default(r.doc.resolve(Math.max(0,r.selection.from-1)),r.schema.marks.placeholder);return!!i&&(o(r.tr.removeMark(i.from,i.to,r.schema.marks.placeholder).insertText("",i.from,i.to)),!0)}if("ArrowLeft"===n.key){var a=l.default(r.doc.resolve(Math.max(0,r.selection.from-1)),r.schema.marks.placeholder);if(!a)return!1;var s=r.doc.resolve(a.from);return o(r.tr.setSelection(u.TextSelection.near(s))),!0}if("ArrowRight"===n.key){var c=l.default(r.selection.$from,r.schema.marks.placeholder);if(!c)return!1;var f=r.doc.resolve(c.to);return o(r.tr.setSelection(u.TextSelection.near(f))),!0}return!1},handleClick:function(t,n,r){if(!t.props.editable||!t.props.editable(t.state))return!1;if(e.editor.props.template)return!1;if(r.target instanceof HTMLSpanElement&&r.target.className.includes("template-placeholder")){var o=t.state,i=t.dispatch,a=l.default(o.selection.$from,o.schema.marks.placeholder);if(!a)return!1;r.stopPropagation(),r.preventDefault();var s=o.doc.resolve(a.from);return i(o.tr.setSelection(u.TextSelection.near(s))),!0}return!1}}})]}}]),n}(s(n(23)).default);t.default=c},function(e,t,n){"use strict";function r(e){return null!=e&&"object"===typeof e&&1===e.nodeType}function o(e,t){return(!t||"hidden"!==e)&&("visible"!==e&&"clip"!==e)}function i(e,t){if(e.clientHeightt||i>e&&a=t&&s>=n?i-e-r:a>t&&sn?a-t+o:0}n.r(t);var s=function(e,t){var n=t.scrollMode,o=t.block,s=t.inline,u=t.boundary,l=t.skipOverflowHiddenElements,c="function"===typeof u?u:function(e){return e!==u};if(!r(e))throw new TypeError("Invalid target");for(var f=document.scrollingElement||document.documentElement,d=[],p=e;r(p)&&c(p);){if((p=p.parentNode)===f){d.push(p);break}p===document.body&&i(p)&&!i(document.documentElement)||i(p,l)&&d.push(p)}for(var h=window.visualViewport?visualViewport.width:innerWidth,m=window.visualViewport?visualViewport.height:innerHeight,v=window.scrollX||pageXOffset,g=window.scrollY||pageYOffset,y=e.getBoundingClientRect(),b=y.height,k=y.width,w=y.top,C=y.right,_=y.bottom,x=y.left,S="start"===o||"nearest"===o?w:"end"===o?_:w+b/2,E="center"===s?x+k/2:"end"===s?C:x,M=[],O=0;O=0&&x>=0&&_<=m&&C<=h&&w>=P&&_<=N&&x>=R&&C<=I)return M;var j=getComputedStyle(L),z=parseInt(j.borderLeftWidth,10),F=parseInt(j.borderTopWidth,10),B=parseInt(j.borderRightWidth,10),$=parseInt(j.borderBottomWidth,10),q=0,V=0,H="offsetWidth"in L?L.offsetWidth-L.clientWidth-z-B:0,U="offsetHeight"in L?L.offsetHeight-L.clientHeight-F-$:0;if(f===L)q="start"===o?S:"end"===o?S-m:"nearest"===o?a(g,g+m,m,F,$,g+S,g+S+b,b):S-m/2,V="start"===s?E:"center"===s?E-h/2:"end"===s?E-h:a(v,v+h,h,z,B,v+E,v+E+k,k),q=Math.max(0,q+g),V=Math.max(0,V+v);else{q="start"===o?S-P-F:"end"===o?S-N+$+U:"nearest"===o?a(P,N,A,F,$+U,S,S+b,b):S-(P+A/2)+U/2,V="start"===s?E-R-z:"center"===s?E-(R+D/2)+H/2:"end"===s?E-I+B+H:a(R,I,D,z,B+H,E,E+k,k);var Z=L.scrollLeft,W=L.scrollTop;S+=W-(q=Math.max(0,Math.min(W+q,L.scrollHeight-A+U))),E+=Z-(V=Math.max(0,Math.min(Z+V,L.scrollWidth-D+H)))}M.push({el:L,top:q,left:V})}return M};function u(e){return e===Object(e)&&0!==Object.keys(e).length}var l,c=function(e,t){var n=!e.ownerDocument.documentElement.contains(e);if(u(t)&&"function"===typeof t.behavior)return t.behavior(n?[]:s(e,t));if(!n){var r=function(e){return!1===e?{block:"end",inline:"nearest"}:u(e)?e:{block:"start",inline:"nearest"}}(t);return function(e,t){void 0===t&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach((function(e){var r=e.el,o=e.top,i=e.left;r.scroll&&n?r.scroll({top:o,left:i,behavior:t}):(r.scrollTop=o,r.scrollLeft=i)}))}(s(e,r),r.behavior)}},f=function(){return l||(l="performance"in window?performance.now.bind(performance):Date.now),l()};function d(e,t,n,r,o,i){var a,s,u;void 0===r&&(r=600),void 0===o&&(o=function(e){return 1+--e*e*e*e*e}),a=e,s=e.scrollLeft,u=e.scrollTop,function e(t){var n=f(),r=Math.min((n-t.startTime)/t.duration,1),o=t.ease(r),i=t.startX+(t.x-t.startX)*o,a=t.startY+(t.y-t.startY)*o;t.method(i,a),i!==t.x||a!==t.y?requestAnimationFrame((function(){return e(t)})):t.cb()}({scrollable:a,method:function(t,n){e.scrollLeft=t,e.scrollTop=n},startTime:f(),startX:s,startY:u,x:t,y:n,duration:r,ease:o,cb:i})}var p=function(e,t){var n=t||{};return function(e){return e&&!e.behavior||"smooth"===e.behavior}(n)?c(e,{block:n.block,inline:n.inline,scrollMode:n.scrollMode,boundary:n.boundary,behavior:function(e){return Promise.all(e.reduce((function(e,t){var r=t.el,o=t.left,i=t.top,a=r.scrollLeft,s=r.scrollTop;return a===o&&s===i?e:[].concat(e,[new Promise((function(e){return d(r,o,i,n.duration,n.ease,(function(){return e({el:r,left:[a,o],top:[s,i]})}))}))])}),[]))}}):Promise.resolve(c(e,t))};t.default=p},function(e,t,n){"use strict";var r=n(16),o=n(39),i=n(21),a=n(4),s=n(5),u=n(6),l=n(7);function c(){var e=r(["\n color: ",";\n background: ",";\n font-family: ",";\n font-weight: ",';\n font-size: 1em;\n line-height: 1.7em;\n width: 100%;\n\n .ProseMirror {\n position: relative;\n outline: none;\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: "liga" 0; /* the above doesn\'t seem to work in Edge */\n }\n\n pre {\n white-space: pre-wrap;\n }\n\n li {\n position: relative;\n }\n\n img {\n max-width: 100%;\n }\n\n .image {\n text-align: center;\n\n img {\n pointer-events: ',";\n }\n }\n\n .image.placeholder {\n position: relative;\n background: ",";\n\n img {\n opacity: 0.5;\n }\n }\n\n .ProseMirror-hideselection *::selection {\n background: transparent;\n }\n .ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n }\n .ProseMirror-hideselection {\n caret-color: transparent;\n }\n\n .ProseMirror-selectednode {\n outline: 2px solid ",';\n }\n\n /* Make sure li selections wrap around markers */\n\n li.ProseMirror-selectednode {\n outline: none;\n }\n\n li.ProseMirror-selectednode:after {\n content: "";\n position: absolute;\n left: -32px;\n right: -2px;\n top: -2px;\n bottom: -2px;\n border: 2px solid ',";\n pointer-events: none;\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin: 1em 0 0.5em;\n font-weight: 500;\n cursor: default;\n\n &:not(.placeholder):before {\n display: ",";\n position: absolute;\n font-family: ",";\n color: ",';\n font-size: 13px;\n left: -24px;\n }\n }\n\n a:first-child {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin-top: 0;\n }\n }\n\n h1:not(.placeholder):before {\n content: "H1";\n line-height: 3em;\n }\n h2:not(.placeholder):before {\n content: "H2";\n line-height: 2.8em;\n }\n h3:not(.placeholder):before {\n content: "H3";\n line-height: 2.3em;\n }\n h4:not(.placeholder):before {\n content: "H4";\n line-height: 2.2em;\n }\n h5:not(.placeholder):before {\n content: "H5";\n }\n h6:not(.placeholder):before {\n content: "H6";\n }\n\n .heading-name {\n color: ',";\n\n &:hover {\n text-decoration: none;\n\n .heading-anchor {\n opacity: 1;\n }\n }\n }\n\n .with-emoji {\n margin-left: -1em;\n }\n\n .heading-anchor {\n opacity: 0;\n display: ",";\n color: ",";\n cursor: pointer;\n background: none;\n border: 0;\n outline: none;\n padding: 2px 12px 2px 4px;\n margin: 0;\n position: absolute;\n transition: opacity 100ms ease-in-out;\n font-family: ",";\n font-size: 22px;\n left: -1.3em;\n\n &:focus,\n &:hover {\n color: ",";\n }\n }\n\n .placeholder {\n &:before {\n display: block;\n content: ",";\n pointer-events: none;\n height: 0;\n color: ",";\n }\n }\n\n @media print {\n .placeholder {\n display: none;\n }\n }\n\n .notice-block {\n display: flex;\n align-items: center;\n background: ",";\n color: ",";\n border-radius: 4px;\n padding: 8px 16px;\n margin: 8px 0;\n\n a:not(.heading-name) {\n color: ",";\n text-decoration: underline;\n }\n }\n\n .notice-block .icon {\n width: 24px;\n height: 24px;\n align-self: flex-start;\n margin-right: 4px;\n position: relative;\n top: 1px;\n }\n\n .notice-block.tip {\n background: ",";\n color: ",";\n\n a {\n color: ",";\n }\n }\n\n .notice-block.warning {\n background: ",";\n color: ",";\n\n a {\n color: ",";\n }\n }\n\n blockquote {\n border-left: 3px solid ",";\n margin: 0;\n padding-left: 10px;\n font-style: italic;\n }\n\n b,\n strong {\n font-weight: 600;\n }\n\n .template-placeholder {\n color: ",";\n border-bottom: 1px dotted ",";\n border-radius: 2px;\n cursor: text;\n\n &:hover {\n border-bottom: 1px dotted\n ",";\n }\n }\n\n p {\n position: relative;\n margin: 0;\n }\n\n a {\n color: ",";\n }\n\n a:hover {\n text-decoration: ",";\n }\n\n ul,\n ol {\n margin: 0 0.1em;\n padding: 0 0 0 1em;\n\n ul,\n ol {\n margin: 0;\n }\n }\n\n ol ol {\n list-style: lower-alpha;\n }\n\n ol ol ol {\n list-style: lower-roman;\n }\n\n ul.checkbox_list {\n list-style: none;\n padding: 0;\n margin: 0;\n }\n\n ul.checkbox_list li {\n display: flex;\n }\n\n ul.checkbox_list li.checked > div > p {\n color: ",";\n text-decoration: line-through;\n }\n\n ul.checkbox_list li input {\n pointer-events: ",";\n opacity: ",";\n margin: 0 0.5em 0 0;\n width: 14px;\n height: 14px;\n }\n\n li p:first-child {\n margin: 0;\n }\n\n hr {\n height: 0;\n border: 0;\n border-top: 1px solid ",";\n }\n\n code {\n border-radius: 4px;\n border: 1px solid ",";\n padding: 3px 4px;\n font-family: ",";\n font-size: 85%;\n }\n\n mark {\n border-radius: 1px;\n color: ",";\n background: ",";\n }\n\n .code-block,\n .notice-block {\n position: relative;\n\n select,\n button {\n background: ",";\n color: ",";\n border-width: 1px;\n font-size: 13px;\n display: none;\n position: absolute;\n border-radius: 4px;\n padding: 2px;\n z-index: 1;\n top: 4px;\n right: 4px;\n }\n\n button {\n padding: 2px 4px;\n }\n\n &:hover {\n select {\n display: ",";\n }\n\n button {\n display: ",";\n }\n }\n\n select:focus,\n select:active {\n display: inline;\n }\n }\n\n pre {\n display: block;\n overflow-x: auto;\n padding: 0.75em 1em;\n line-height: 1.4em;\n position: relative;\n background: ",";\n border-radius: 4px;\n border: 1px solid ",";\n\n -webkit-font-smoothing: initial;\n font-family: ",";\n font-size: 13px;\n direction: ltr;\n text-align: left;\n white-space: pre;\n word-spacing: normal;\n word-break: normal;\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n -webkit-hyphens: none;\n -moz-hyphens: none;\n -ms-hyphens: none;\n hyphens: none;\n color: ",";\n margin: 0;\n\n code {\n font-size: 13px;\n background: none;\n padding: 0;\n border: 0;\n }\n }\n\n .token.comment,\n .token.prolog,\n .token.doctype,\n .token.cdata {\n color: ",";\n }\n\n .token.punctuation {\n color: ",";\n }\n\n .token.namespace {\n opacity: 0.7;\n }\n\n .token.operator,\n .token.boolean,\n .token.number {\n color: ",";\n }\n\n .token.property {\n color: ",";\n }\n\n .token.tag {\n color: ",";\n }\n\n .token.string {\n color: ",";\n }\n\n .token.selector {\n color: ",";\n }\n\n .token.attr-name {\n color: ",";\n }\n\n .token.entity,\n .token.url,\n .language-css .token.string,\n .style .token.string {\n color: ",";\n }\n\n .token.attr-value,\n .token.keyword,\n .token.control,\n .token.directive,\n .token.unit {\n color: ",";\n }\n\n .token.function {\n color: ",";\n }\n\n .token.statement,\n .token.regex,\n .token.atrule {\n color: ",";\n }\n\n .token.placeholder,\n .token.variable {\n color: ",";\n }\n\n .token.deleted {\n text-decoration: line-through;\n }\n\n .token.inserted {\n border-bottom: 1px dotted ",";\n text-decoration: none;\n }\n\n .token.italic {\n font-style: italic;\n }\n\n .token.important,\n .token.bold {\n font-weight: bold;\n }\n\n .token.important {\n color: ",";\n }\n\n .token.entity {\n cursor: help;\n }\n\n table {\n width: 100%;\n border-collapse: collapse;\n border-radius: 4px;\n margin-top: 1em;\n\n tr {\n position: relative;\n border-bottom: 1px solid ",";\n }\n\n th {\n background: ",";\n }\n\n td,\n th {\n position: relative;\n vertical-align: top;\n border: 1px solid ",";\n position: relative;\n padding: 4px 8px;\n text-align: left;\n min-width: 100px;\n }\n\n .selectedCell {\n background: ",";\n }\n\n .grip-column {\n cursor: pointer;\n position: absolute;\n top: -16px;\n left: 0;\n width: 100%;\n height: 12px;\n background: ",";\n border-bottom: 3px solid ",";\n display: ",";\n\n &:hover {\n background: ",";\n }\n &.first {\n border-top-left-radius: 3px;\n }\n &.last {\n border-top-right-radius: 3px;\n }\n &.selected {\n background: ",";\n }\n }\n\n .grip-row {\n cursor: pointer;\n position: absolute;\n left: -16px;\n top: 0;\n height: 100%;\n width: 12px;\n background: ",";\n border-right: 3px solid ",";\n display: ",";\n\n &:hover {\n background: ",";\n }\n &.first {\n border-top-left-radius: 3px;\n }\n &.last {\n border-bottom-left-radius: 3px;\n }\n &.selected {\n background: ",";\n }\n }\n\n .grip-table {\n cursor: pointer;\n background: ",";\n width: 13px;\n height: 13px;\n border-radius: 13px;\n border: 2px solid ",";\n position: absolute;\n top: -18px;\n left: -18px;\n display: ",";\n\n &:hover {\n background: ",";\n }\n &.selected {\n background: ",";\n }\n }\n }\n\n .scrollable-wrapper {\n position: relative;\n margin: 0.5em 0px;\n }\n\n .scrollable {\n overflow-y: hidden;\n overflow-x: scroll;\n padding-left: 1em;\n margin-left: -1em;\n border-left: 1px solid transparent;\n border-right: 1px solid transparent;\n transition: border 250ms ease-in-out 0s;\n }\n\n .scrollable-shadow {\n position: absolute;\n top: 0;\n bottom: 0;\n left: -1em;\n width: 16px;\n transition: box-shadow 250ms ease-in-out;\n border: 0px solid transparent;\n border-left-width: 1em;\n pointer-events: none;\n\n &.left {\n box-shadow: 16px 0 16px -16px inset rgba(0, 0, 0, 0.25);\n border-left: 1em solid ",";\n }\n\n &.right {\n right: 0;\n left: auto;\n box-shadow: -16px 0 16px -16px inset rgba(0, 0, 0, 0.25);\n }\n }\n\n .block-menu-trigger {\n display: ",";\n height: 1em;\n color: ",";\n background: none;\n border-radius: 100%;\n font-size: 30px;\n position: absolute;\n transform: scale(0.9);\n transition: color 150ms cubic-bezier(0.175, 0.885, 0.32, 1.275),\n transform 150ms cubic-bezier(0.175, 0.885, 0.32, 1.275);\n outline: none;\n border: 0;\n line-height: 1;\n margin-top: -6px;\n left: -34px;\n\n &:hover,\n &:focus {\n cursor: pointer;\n transform: scale(1);\n color: ",';\n }\n }\n\n @media print {\n .block-menu-trigger {\n display: none;\n }\n }\n\n .ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n }\n\n .ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid ',';\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n }\n\n @keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n }\n\n .ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n }\n\n @media print {\n em,\n blockquote {\n font-family: "SF Pro Text", ',";\n }\n }\n"]);return c=function(){return e},e}var f=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},d=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var p=f(n(1)),h=n(2),m=n(146),v=n(147),g=n(12),y=n(0),b=n(13),k=n(25),w=n(14),C=n(18),_=f(n(15)),x=n(42),S=d(n(61)),E=d(n(149)),M=d(n(245)),O=d(n(249)),L=d(n(250)),T=d(n(74)),A=d(n(319)),D=d(n(83)),P=d(n(84)),I=d(n(85)),N=d(n(86)),R=d(n(88)),j=d(n(89)),z=d(n(47)),F=d(n(101)),B=d(n(102)),$=d(n(103)),q=d(n(104)),V=d(n(105)),H=d(n(106)),U=d(n(108)),Z=d(n(109)),W=d(n(110)),K=d(n(111)),G=d(n(112)),J=d(n(113)),Y=d(n(114)),Q=d(n(115)),X=d(n(116)),ee=d(n(117)),te=d(n(118)),ne=d(n(119)),re=d(n(120)),oe=d(n(121)),ie=d(n(122)),ae=d(n(365)),se=d(n(366)),ue=d(n(367)),le=d(n(368)),ce=d(n(369)),fe=d(n(370)),de=d(n(371)),pe=n(372);t.schema=pe.schema,t.parser=pe.parser,t.serializer=pe.serializer;var he=n(19);t.Extension=he.default,t.theme=x.light;var me=function(e){u(n,e);var t=l(n);function n(){var e;return a(this,n),(e=t.apply(this,arguments)).state={blockMenuOpen:!1,linkMenuOpen:!1,blockMenuSearch:""},e.value=function(){return e.serializer.serialize(e.view.state.doc)},e.handleChange=function(){e.props.onChange&&e.props.onChange((function(){return e.value()}))},e.handleSave=function(){var t=e.props.onSave;t&&t({done:!1})},e.handleSaveAndExit=function(){var t=e.props.onSave;t&&t({done:!0})},e.handleOpenLinkMenu=function(){e.setState({linkMenuOpen:!0})},e.handleCloseLinkMenu=function(){e.setState({linkMenuOpen:!1})},e.handleOpenBlockMenu=function(t){e.setState({blockMenuOpen:!0,blockMenuSearch:t})},e.handleCloseBlockMenu=function(){e.state.blockMenuOpen&&e.setState({blockMenuOpen:!1})},e.handleSelectRow=function(t,n){e.view.dispatch(C.selectRow(t)(n.tr))},e.handleSelectColumn=function(t,n){e.view.dispatch(C.selectColumn(t)(n.tr))},e.handleSelectTable=function(t){e.view.dispatch(C.selectTable(t.tr))},e.focusAtStart=function(){var t=h.Selection.atStart(e.view.state.doc),n=e.view.state.tr.setSelection(t);e.view.dispatch(n),e.view.focus()},e.focusAtEnd=function(){var t=h.Selection.atEnd(e.view.state.doc),n=e.view.state.tr.setSelection(t);e.view.dispatch(n),e.view.focus()},e.getHeadings=function(){var t=[],n={};return e.view.state.doc.forEach((function(e){if("heading"===e.type.name){var r=D.default(e),o=r;n[r]>0&&(o=D.default(e,n[r])),n[r]=void 0!==n[r]?n[r]+1:1,t.push({title:e.textContent,level:e.attrs.level,id:o})}})),t},e.render=function(){var t=e.props,n=t.dark,r=t.readOnly,o=t.readOnlyWriteCheckboxes,i=t.style,a=t.tooltip,s=t.className,u=t.onKeyDown,l=e.props.theme||(n?x.dark:x.light);return p.createElement(S.default,{onKeyDown:u,style:i,className:s,align:"flex-start",justify:"center",column:!0},p.createElement(_.ThemeProvider,{theme:l},p.createElement(p.Fragment,null,p.createElement(ve,{readOnly:r,readOnlyWriteCheckboxes:o,ref:function(t){return e.element=t}}),!r&&e.view&&p.createElement(p.Fragment,null,p.createElement(E.default,{view:e.view,commands:e.commands,isTemplate:!0===e.props.template,onSearchLink:e.props.onSearchLink,onClickLink:e.props.onClickLink,onCreateLink:e.props.onCreateLink,tooltip:a}),p.createElement(O.default,{view:e.view,isActive:e.state.linkMenuOpen,onCreateLink:e.props.onCreateLink,onSearchLink:e.props.onSearchLink,onClickLink:e.props.onClickLink,onShowToast:e.props.onShowToast,onClose:e.handleCloseLinkMenu,tooltip:a}),p.createElement(M.default,{view:e.view,commands:e.commands,isActive:e.state.blockMenuOpen,search:e.state.blockMenuSearch,onClose:e.handleCloseBlockMenu,uploadImage:e.props.uploadImage,onLinkToolbarOpen:e.handleOpenLinkMenu,onImageUploadStart:e.props.onImageUploadStart,onImageUploadStop:e.props.onImageUploadStop,onShowToast:e.props.onShowToast,embeds:e.props.embeds})))))},e}return s(n,[{key:"componentDidMount",value:function(){this.init(),this.props.scrollTo&&this.scrollToAnchor(this.props.scrollTo),this.props.readOnly||this.props.autoFocus&&this.focusAtEnd()}},{key:"componentDidUpdate",value:function(e){var t=this;if(this.props.value&&e.value!==this.props.value){var n=this.createState(this.props.value);this.view.updateState(n)}e.readOnly!==this.props.readOnly&&this.view.update(Object.assign(Object.assign({},this.view.props),{editable:function(){return!t.props.readOnly}})),this.props.scrollTo&&this.props.scrollTo!==e.scrollTo&&this.scrollToAnchor(this.props.scrollTo),e.readOnly&&!this.props.readOnly&&this.props.autoFocus&&this.focusAtEnd()}},{key:"init",value:function(){this.extensions=this.createExtensions(),this.nodes=this.createNodes(),this.marks=this.createMarks(),this.schema=this.createSchema(),this.plugins=this.createPlugins(),this.keymaps=this.createKeymaps(),this.serializer=this.createSerializer(),this.parser=this.createParser(),this.inputRules=this.createInputRules(),this.nodeViews=this.createNodeViews(),this.view=this.createView(),this.commands=this.createCommands()}},{key:"createExtensions",value:function(){return new T.default([new P.default,new I.default,new K.default,new N.default,new R.default,new j.default({initialReadOnly:this.props.readOnly,onShowToast:this.props.onShowToast}),new z.default({initialReadOnly:this.props.readOnly,onShowToast:this.props.onShowToast}),new F.default,new B.default,new $.default,new U.default,new Z.default,new q.default({onShowToast:this.props.onShowToast,offset:this.props.headingsOffset}),new V.default,new H.default({uploadImage:this.props.uploadImage,onImageUploadStart:this.props.onImageUploadStart,onImageUploadStop:this.props.onImageUploadStop,onShowToast:this.props.onShowToast}),new G.default,new J.default({onSelectTable:this.handleSelectTable,onSelectRow:this.handleSelectRow}),new Y.default({onSelectColumn:this.handleSelectColumn}),new Q.default,new X.default,new ee.default,new te.default,new ne.default,new ie.default,new re.default({onKeyboardShortcut:this.handleOpenLinkMenu,onClickLink:this.props.onClickLink,onClickHashtag:this.props.onClickHashtag,onHoverLink:this.props.onHoverLink}),new oe.default,new W.default,new se.default,new ce.default,new fe.default,new de.default,new ue.default({onSave:this.handleSave,onSaveAndExit:this.handleSaveAndExit,onCancel:this.props.onCancel}),new ae.default({onOpen:this.handleOpenBlockMenu,onClose:this.handleCloseBlockMenu}),new le.default({placeholder:this.props.placeholder})].concat(i(this.props.extensions)),this)}},{key:"createPlugins",value:function(){return this.extensions.plugins}},{key:"createKeymaps",value:function(){return this.extensions.keymaps({schema:this.schema})}},{key:"createInputRules",value:function(){return this.extensions.inputRules({schema:this.schema})}},{key:"createNodeViews",value:function(){var e=this;return this.extensions.extensions.filter((function(e){return e.component})).reduce((function(t,n){return Object.assign(Object.assign({},t),o({},n.name,(function(t,r,o,i){return new A.default(n.component,{editor:e,extension:n,node:t,view:r,getPos:o,decorations:i})})))}),{})}},{key:"createCommands",value:function(){return this.extensions.commands({schema:this.schema,view:this.view})}},{key:"createNodes",value:function(){return this.extensions.nodes}},{key:"createMarks",value:function(){return this.extensions.marks}},{key:"createSchema",value:function(){return new y.Schema({nodes:this.nodes,marks:this.marks})}},{key:"createSerializer",value:function(){return this.extensions.serializer()}},{key:"createParser",value:function(){return this.extensions.parser({schema:this.schema})}},{key:"createState",value:function(e){var t=this.createDocument(e||this.props.defaultValue);return h.EditorState.create({schema:this.schema,doc:t,plugins:[].concat(i(this.plugins),i(this.keymaps),[m.dropCursor(),v.gapCursor(),b.inputRules({rules:this.inputRules}),k.keymap(w.baseKeymap)])})}},{key:"createDocument",value:function(e){return this.parser.parse(e)}},{key:"createView",value:function(){var e=this;if(!this.element)throw new Error("createView called before ref available");var t=function(t){return t.steps.some((function(t){return t.slice.content.firstChild&&t.slice.content.firstChild.type.name===e.schema.nodes.checkbox_item.name}))};return new g.EditorView(this.element,{state:this.createState(),editable:function(){return!e.props.readOnly},nodeViews:this.nodeViews,handleDOMEvents:this.props.handleDOMEvents,dispatchTransaction:function(n){var r=e.view.state.applyTransaction(n),o=r.state,i=r.transactions;e.view.updateState(o),i.some((function(e){return e.docChanged}))&&(!e.props.readOnly||e.props.readOnlyWriteCheckboxes&&i.some(t))&&e.handleChange(),e.forceUpdate()}})}},{key:"scrollToAnchor",value:function(e){if(e)try{var t=document.querySelector(e);t&&t.scrollIntoView({behavior:"smooth"})}catch(n){console.warn("Attempted to scroll to invalid hash: ".concat(e),n)}}}]),n}(p.PureComponent);me.defaultProps={defaultValue:"",placeholder:"Write something nice\u2026",onImageUploadStart:function(){},onImageUploadStop:function(){},onClickLink:function(e){window.open(e,"_blank")},embeds:[],extensions:[],tooltip:L.default};var ve=_.default("div")(c(),(function(e){return e.theme.text}),(function(e){return e.theme.background}),(function(e){return e.theme.fontFamily}),(function(e){return e.theme.fontWeight}),(function(e){return e.readOnly?"initial":"none"}),(function(e){return e.theme.background}),(function(e){return e.theme.selected}),(function(e){return e.theme.selected}),(function(e){return e.readOnly?"none":"block"}),(function(e){return e.theme.fontFamilyMono}),(function(e){return e.theme.textSecondary}),(function(e){return e.theme.text}),(function(e){return e.readOnly?"block":"none"}),(function(e){return e.theme.textSecondary}),(function(e){return e.theme.fontFamilyMono}),(function(e){return e.theme.text}),(function(e){return e.readOnly?"":"attr(data-empty-text)"}),(function(e){return e.theme.placeholder}),(function(e){return e.theme.noticeInfoBackground}),(function(e){return e.theme.noticeInfoText}),(function(e){return e.theme.noticeInfoText}),(function(e){return e.theme.noticeTipBackground}),(function(e){return e.theme.noticeTipText}),(function(e){return e.theme.noticeTipText}),(function(e){return e.theme.noticeWarningBackground}),(function(e){return e.theme.noticeWarningText}),(function(e){return e.theme.noticeWarningText}),(function(e){return e.theme.quote}),(function(e){return e.theme.placeholder}),(function(e){return e.theme.placeholder}),(function(e){return e.readOnly?e.theme.placeholder:e.theme.textSecondary}),(function(e){return e.theme.link}),(function(e){return e.readOnly?"underline":"none"}),(function(e){return e.theme.textSecondary}),(function(e){return e.readOnly&&!e.readOnlyWriteCheckboxes?"none":"initial"}),(function(e){return e.readOnly?.75:1}),(function(e){return e.theme.horizontalRule}),(function(e){return e.theme.codeBorder}),(function(e){return e.theme.fontFamilyMono}),(function(e){return e.theme.black}),(function(e){return e.theme.textHighlight}),(function(e){return e.theme.blockToolbarBackground}),(function(e){return e.theme.blockToolbarItem}),(function(e){return e.readOnly?"none":"inline"}),(function(e){return e.readOnly?"inline":"none"}),(function(e){return e.theme.codeBackground}),(function(e){return e.theme.codeBorder}),(function(e){return e.theme.fontFamilyMono}),(function(e){return e.theme.code}),(function(e){return e.theme.codeComment}),(function(e){return e.theme.codePunctuation}),(function(e){return e.theme.codeNumber}),(function(e){return e.theme.codeProperty}),(function(e){return e.theme.codeTag}),(function(e){return e.theme.codeString}),(function(e){return e.theme.codeSelector}),(function(e){return e.theme.codeAttr}),(function(e){return e.theme.codeEntity}),(function(e){return e.theme.codeKeyword}),(function(e){return e.theme.codeFunction}),(function(e){return e.theme.codeStatement}),(function(e){return e.theme.codePlaceholder}),(function(e){return e.theme.codeInserted}),(function(e){return e.theme.codeImportant}),(function(e){return e.theme.tableDivider}),(function(e){return e.theme.tableHeaderBackground}),(function(e){return e.theme.tableDivider}),(function(e){return e.readOnly?"inherit":e.theme.tableSelectedBackground}),(function(e){return e.theme.tableDivider}),(function(e){return e.theme.background}),(function(e){return e.readOnly?"none":"block"}),(function(e){return e.theme.text}),(function(e){return e.theme.tableSelected}),(function(e){return e.theme.tableDivider}),(function(e){return e.theme.background}),(function(e){return e.readOnly?"none":"block"}),(function(e){return e.theme.text}),(function(e){return e.theme.tableSelected}),(function(e){return e.theme.tableDivider}),(function(e){return e.theme.background}),(function(e){return e.readOnly?"none":"block"}),(function(e){return e.theme.text}),(function(e){return e.theme.tableSelected}),(function(e){return e.theme.background}),(function(e){return e.readOnly?"none":"block"}),(function(e){return e.theme.textSecondary}),(function(e){return e.theme.text}),(function(e){return e.theme.cursor}),(function(e){return e.theme.fontFamily}));t.default=me},function(e,t){e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!==typeof e||!e||"object"!==typeof t||!t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),u=0;ur&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0u.charCodeAt(8))break;case 115:a=a.replace(u,"-webkit-"+u)+";"+a;break;case 207:case 102:a=a.replace(u,"-webkit-"+(102s.charCodeAt(0)&&(s=s.trim()),s=[s],0p)&&(F=(q=q.replace(" ",":")).length),00&&this.requestPermissions(this.initialPermissions);var t=!0,n=!1,r=void 0;try{for(var o,i=this.messageQueue[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;this.postMessage(a.action,a.data,a.callback)}}catch(s){n=!0,r=s}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}this.messageQueue=[],this.loggingEnabled&&console.log("onReadyData",e),this.activateThemes(e.activeThemeUrls||[]),this.onReadyCallback&&this.onReadyCallback()}},{key:"getSelfComponentUUID",value:function(){return this.uuid}},{key:"isRunningInDesktopApplication",value:function(){return"desktop"===this.environment}},{key:"setComponentDataValueForKey",value:function(e,t){this.componentData[e]=t,this.postMessage("set-component-data",{componentData:this.componentData},(function(e){}))}},{key:"clearComponentData",value:function(){this.componentData={},this.postMessage("set-component-data",{componentData:this.componentData},(function(e){}))}},{key:"componentDataValueForKey",value:function(e){return this.componentData[e]}},{key:"postMessage",value:function(e,t,n){if(this.sessionKey){var r={action:e,data:t,messageId:this.generateUUID(),sessionKey:this.sessionKey,api:"component"},o=JSON.parse(JSON.stringify(r));o.callback=n,this.sentMessages.push(o),this.isMobile&&(r=JSON.stringify(r)),this.loggingEnabled&&console.log("Posting message:",r),window.parent.postMessage(r,this.origin)}else this.messageQueue.push({action:e,data:t,callback:n})}},{key:"setSize",value:function(e,t,n){this.postMessage("set-size",{type:e,width:t,height:n},(function(e){}))}},{key:"requestPermissions",value:function(e,t){this.postMessage("request-permissions",{permissions:e},function(e){t&&t()}.bind(this))}},{key:"streamItems",value:function(e,t){Array.isArray(e)||(e=[e]),this.postMessage("stream-items",{content_types:e},function(e){t(e.items)}.bind(this))}},{key:"streamContextItem",value:function(e){var t=this;this.postMessage("stream-context-item",null,(function(n){var r=n.item;(!t.lastStreamedItem||t.lastStreamedItem.uuid!==r.uuid)&&t.pendingSaveTimeout&&(clearTimeout(t.pendingSaveTimeout),t._performSavingOfItems(t.pendingSaveParams),t.pendingSaveTimeout=null,t.pendingSaveParams=null),t.lastStreamedItem=r,e(t.lastStreamedItem)}))}},{key:"selectItem",value:function(e){this.postMessage("select-item",{item:this.jsonObjectForItem(e)})}},{key:"createItem",value:function(e,t){this.postMessage("create-item",{item:this.jsonObjectForItem(e)},function(e){var n=e.item;!n&&e.items&&e.items.length>0&&(n=e.items[0]),this.associateItem(n),t&&t(n)}.bind(this))}},{key:"createItems",value:function(e,t){var n=this,r=e.map((function(e){return n.jsonObjectForItem(e)}));this.postMessage("create-items",{items:r},function(e){t&&t(e.items)}.bind(this))}},{key:"associateItem",value:function(e){this.postMessage("associate-item",{item:this.jsonObjectForItem(e)})}},{key:"deassociateItem",value:function(e){this.postMessage("deassociate-item",{item:this.jsonObjectForItem(e)})}},{key:"clearSelection",value:function(){this.postMessage("clear-selection",{content_type:"Tag"})}},{key:"deleteItem",value:function(e,t){this.deleteItems([e],t)}},{key:"deleteItems",value:function(e,t){var n={items:e.map(function(e){return this.jsonObjectForItem(e)}.bind(this))};this.postMessage("delete-items",n,(function(e){t&&t(e)}))}},{key:"sendCustomEvent",value:function(e,t,n){this.postMessage(e,t,function(e){n&&n(e)}.bind(this))}},{key:"saveItem",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.saveItems([e],t,n)}},{key:"saveItemWithPresave",value:function(e,t,n){this.saveItemsWithPresave([e],t,n)}},{key:"saveItemsWithPresave",value:function(e,t,n){this.saveItems(e,n,!1,t)}},{key:"_performSavingOfItems",value:function(e){var t=e.items,n=e.presave,r=e.callback;n&&n();var o=[],i=!0,a=!1,s=void 0;try{for(var u,l=t[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var c=u.value;o.push(this.jsonObjectForItem(c))}}catch(f){a=!0,s=f}finally{try{i||null==l.return||l.return()}finally{if(a)throw s}}this.postMessage("save-items",{items:o},(function(e){r&&r()}))}},{key:"saveItems",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3?arguments[3]:void 0;if(this.pendingSaveItems||(this.pendingSaveItems=[]),1!=this.coallesedSaving||r)this._performSavingOfItems({items:e,presave:o,callback:t});else{this.pendingSaveTimeout&&clearTimeout(this.pendingSaveTimeout);var i=e.map((function(e){return e.uuid})),a=this.pendingSaveItems.filter((function(e){return!i.includes(e.uuid)}));this.pendingSaveItems=a.concat(e),this.pendingSaveParams={items:this.pendingSaveItems,presave:o,callback:t},this.pendingSaveTimeout=setTimeout((function(){n._performSavingOfItems(n.pendingSaveParams),n.pendingSaveItems=[],n.pendingSaveTimeout=null,n.pendingSaveParams=null}),this.coallesedSavingDelay)}}},{key:"jsonObjectForItem",value:function(e){var t=Object.assign({},e);return t.children=null,t.parent=null,t}},{key:"getItemAppDataValue",value:function(e,t){var n=e.content.appData&&e.content.appData["org.standardnotes.sn"];return n?n[t]:null}},{key:"activateThemes",value:function(e){if(this.loggingEnabled&&console.log("Incoming themes",e),this.activeThemes.sort().toString()!=e.sort().toString()){var t=e||[],n=[],r=!0,o=!1,i=void 0;try{for(var a,s=this.activeThemes[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value;e.includes(u)?t=t.filter((function(e){return e!=u})):n.push(u)}}catch(b){o=!0,i=b}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}this.loggingEnabled&&(console.log("Deactivating themes:",n),console.log("Activating themes:",t));for(var l=0,c=n;l>3]>>n%8*4&15;return("x"==e?r:3&r|8).toString(16)}))}var r=(new Date).getTime();return window.performance&&"function"===typeof window.performance.now&&(r+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=(r+16*Math.random())%16|0;return r=Math.floor(r/16),("x"==e?t:3&t|8).toString(16)}))}}])&&r(t.prototype,n),o&&r(t,o),e}();"undefined"!=typeof e.exports&&(e.exports=o),window&&(window.ComponentManager=o)},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i,a=!0,s=!1;return{s:function(){o=e[Symbol.iterator]()},n:function(){var e=o.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==o.return||o.return()}finally{if(s)throw i}}}}n.d(t,"a",(function(){return o}))},,function(e,t,n){"use strict";var r=n(57),o="function"===typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,s=o?Symbol.for("react.fragment"):60107,u=o?Symbol.for("react.strict_mode"):60108,l=o?Symbol.for("react.profiler"):60114,c=o?Symbol.for("react.provider"):60109,f=o?Symbol.for("react.context"):60110,d=o?Symbol.for("react.forward_ref"):60112,p=o?Symbol.for("react.suspense"):60113,h=o?Symbol.for("react.memo"):60115,m=o?Symbol.for("react.lazy"):60116,v="function"===typeof Symbol&&Symbol.iterator;function g(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nT.length&&T.push(e)}function P(e,t,n){return null==e?0:function e(t,n,r,o){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var u=!1;if(null===t)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case i:case a:u=!0}}if(u)return r(o,t,""===n?"."+I(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var l=0;lt}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!V.call(U,e)||!V.call(H,e)&&(q.test(e)?U[e]=!0:(H[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}J.hasOwnProperty("ReactCurrentDispatcher")||(J.ReactCurrentDispatcher={current:null}),J.hasOwnProperty("ReactCurrentBatchConfig")||(J.ReactCurrentBatchConfig={suspense:null});var Q=/^(.*)[\\\/]/,X="function"===typeof Symbol&&Symbol.for,ee=X?Symbol.for("react.element"):60103,te=X?Symbol.for("react.portal"):60106,ne=X?Symbol.for("react.fragment"):60107,re=X?Symbol.for("react.strict_mode"):60108,oe=X?Symbol.for("react.profiler"):60114,ie=X?Symbol.for("react.provider"):60109,ae=X?Symbol.for("react.context"):60110,se=X?Symbol.for("react.concurrent_mode"):60111,ue=X?Symbol.for("react.forward_ref"):60112,le=X?Symbol.for("react.suspense"):60113,ce=X?Symbol.for("react.suspense_list"):60120,fe=X?Symbol.for("react.memo"):60115,de=X?Symbol.for("react.lazy"):60116,pe=X?Symbol.for("react.block"):60121,he="function"===typeof Symbol&&Symbol.iterator;function me(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=he&&e[he]||e["@@iterator"])?e:null}function ve(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case ne:return"Fragment";case te:return"Portal";case oe:return"Profiler";case re:return"StrictMode";case le:return"Suspense";case ce:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case ae:return"Context.Consumer";case ie:return"Context.Provider";case ue:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case fe:return ve(e.type);case pe:return ve(e.render);case de:if(e=1===e._status?e._result:null)return ve(e)}return null}function ge(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,o=e._debugSource,i=ve(e.type);n=null,r&&(n=ve(r.type)),r=i,i="",o?i=" (at "+o.fileName.replace(Q,"")+":"+o.lineNumber+")":n&&(i=" (created by "+n+")"),n="\n in "+(r||"Unknown")+i}t+=n,e=e.return}while(e);return t}function ye(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function be(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function ke(e){e._valueTracker||(e._valueTracker=function(e){var t=be(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function we(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=be(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Ce(e,t){var n=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function _e(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=ye(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function xe(e,t){null!=(t=t.checked)&&Y(e,"checked",t,!1)}function Se(e,t){xe(e,t);var n=ye(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?Me(e,t.type,n):t.hasOwnProperty("defaultValue")&&Me(e,t.type,ye(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Ee(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function Me(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function Oe(e,t){return e=o({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function Le(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:ye(n)}}function De(e,t){var n=ye(t.value),r=ye(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function Pe(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var Ie="http://www.w3.org/1999/xhtml",Ne="http://www.w3.org/2000/svg";function Re(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function je(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Re(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ze,Fe=function(e){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if(e.namespaceURI!==Ne||"innerHTML"in e)e.innerHTML=t;else{for((ze=ze||document.createElement("div")).innerHTML="",t=ze.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function Be(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function $e(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var qe={animationend:$e("Animation","AnimationEnd"),animationiteration:$e("Animation","AnimationIteration"),animationstart:$e("Animation","AnimationStart"),transitionend:$e("Transition","TransitionEnd")},Ve={},He={};function Ue(e){if(Ve[e])return Ve[e];if(!qe[e])return e;var t,n=qe[e];for(t in n)if(n.hasOwnProperty(t)&&t in He)return Ve[e]=n[t];return e}M&&(He=document.createElement("div").style,"AnimationEvent"in window||(delete qe.animationend.animation,delete qe.animationiteration.animation,delete qe.animationstart.animation),"TransitionEvent"in window||delete qe.transitionend.transition);var Ze=Ue("animationend"),We=Ue("animationiteration"),Ke=Ue("animationstart"),Ge=Ue("transitionend"),Je="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ye=new("function"===typeof WeakMap?WeakMap:Map);function Qe(e){var t=Ye.get(e);return void 0===t&&(t=new Map,Ye.set(e,t)),t}function Xe(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(1026&(t=e).effectTag)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function et(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function tt(e){if(Xe(e)!==e)throw Error(a(188))}function nt(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t=Xe(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return tt(o),e;if(i===r)return tt(o),t;i=i.sibling}throw Error(a(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,u=o.child;u;){if(u===n){s=!0,n=o,r=i;break}if(u===r){s=!0,r=o,n=i;break}u=u.sibling}if(!s){for(u=i.child;u;){if(u===n){s=!0,n=i,r=o;break}if(u===r){s=!0,r=i,n=o;break}u=u.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function rt(e,t){if(null==t)throw Error(a(30));return null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function ot(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var it=null;function at(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var r=0;rct.length&&ct.push(e)}function dt(e,t,n,r){if(ct.length){var o=ct.pop();return o.topLevelType=e,o.eventSystemFlags=r,o.nativeEvent=t,o.targetInst=n,o}return{topLevelType:e,eventSystemFlags:r,nativeEvent:t,targetInst:n,ancestors:[]}}function pt(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r=n;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(t=n.tag)&&6!==t||e.ancestors.push(n),n=Mn(r)}while(n);for(n=0;n=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=fn(r)}}function pn(){for(var e=window,t=cn();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=cn((e=t.contentWindow).document)}return t}function hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var mn=null,vn=null;function gn(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function yn(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var bn="function"===typeof setTimeout?setTimeout:void 0,kn="function"===typeof clearTimeout?clearTimeout:void 0;function wn(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Cn(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var _n=Math.random().toString(36).slice(2),xn="__reactInternalInstance$"+_n,Sn="__reactEventHandlers$"+_n,En="__reactContainere$"+_n;function Mn(e){var t=e[xn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[En]||n[xn]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Cn(e);null!==e;){if(n=e[xn])return n;e=Cn(e)}return t}n=(e=n).parentNode}return null}function On(e){return!(e=e[xn]||e[En])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Ln(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function Tn(e){return e[Sn]||null}function An(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function Dn(e,t){var n=e.stateNode;if(!n)return null;var r=h(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(a(231,t,typeof n));return n}function Pn(e,t,n){(t=Dn(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=rt(n._dispatchListeners,t),n._dispatchInstances=rt(n._dispatchInstances,e))}function In(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=An(t);for(t=n.length;0this.eventPool.length&&this.eventPool.push(e)}function Wn(e){e.eventPool=[],e.getPooled=Un,e.release=Zn}o(Hn.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=qn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=qn)},persist:function(){this.isPersistent=qn},isPersistent:Vn,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=Vn,this._dispatchInstances=this._dispatchListeners=null}}),Hn.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},Hn.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var i=new t;return o(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=o({},r.Interface,e),n.extend=r.extend,Wn(n),n},Wn(Hn);var Kn=Hn.extend({data:null}),Gn=Hn.extend({data:null}),Jn=[9,13,27,32],Yn=M&&"CompositionEvent"in window,Qn=null;M&&"documentMode"in document&&(Qn=document.documentMode);var Xn=M&&"TextEvent"in window&&!Qn,er=M&&(!Yn||Qn&&8=Qn),tr=String.fromCharCode(32),nr={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},rr=!1;function or(e,t){switch(e){case"keyup":return-1!==Jn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function ir(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var ar=!1;var sr={eventTypes:nr,extractEvents:function(e,t,n,r){var o;if(Yn)e:{switch(e){case"compositionstart":var i=nr.compositionStart;break e;case"compositionend":i=nr.compositionEnd;break e;case"compositionupdate":i=nr.compositionUpdate;break e}i=void 0}else ar?or(e,n)&&(i=nr.compositionEnd):"keydown"===e&&229===n.keyCode&&(i=nr.compositionStart);return i?(er&&"ko"!==n.locale&&(ar||i!==nr.compositionStart?i===nr.compositionEnd&&ar&&(o=$n()):(Fn="value"in(zn=r)?zn.value:zn.textContent,ar=!0)),i=Kn.getPooled(i,t,n,r),o?i.data=o:null!==(o=ir(n))&&(i.data=o),jn(i),o=i):o=null,(e=Xn?function(e,t){switch(e){case"compositionend":return ir(t);case"keypress":return 32!==t.which?null:(rr=!0,tr);case"textInput":return(e=t.data)===tr&&rr?null:e;default:return null}}(e,n):function(e,t){if(ar)return"compositionend"===e||!Yn&&or(e,t)?(e=$n(),Bn=Fn=zn=null,ar=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=document.documentMode,$r={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},qr=null,Vr=null,Hr=null,Ur=!1;function Zr(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return Ur||null==qr||qr!==cn(n)?null:("selectionStart"in(n=qr)&&hn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},Hr&&Fr(Hr,n)?null:(Hr=n,(e=Hn.getPooled($r.select,Vr,e,t)).type="select",e.target=qr,jn(e),e))}var Wr={eventTypes:$r,extractEvents:function(e,t,n,r,o,i){if(!(i=!(o=i||(r.window===r?r.document:9===r.nodeType?r:r.ownerDocument)))){e:{o=Qe(o),i=S.onSelect;for(var a=0;aso||(e.current=ao[so],ao[so]=null,so--)}function lo(e,t){so++,ao[so]=e.current,e.current=t}var co={},fo={current:co},po={current:!1},ho=co;function mo(e,t){var n=e.type.contextTypes;if(!n)return co;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function vo(e){return null!==(e=e.childContextTypes)&&void 0!==e}function go(){uo(po),uo(fo)}function yo(e,t,n){if(fo.current!==co)throw Error(a(168));lo(fo,t),lo(po,n)}function bo(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(a(108,ve(t)||"Unknown",i));return o({},n,{},r)}function ko(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||co,ho=fo.current,lo(fo,e),lo(po,po.current),!0}function wo(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=bo(e,t,ho),r.__reactInternalMemoizedMergedChildContext=e,uo(po),uo(fo),lo(fo,e)):uo(po),lo(po,n)}var Co=i.unstable_runWithPriority,_o=i.unstable_scheduleCallback,xo=i.unstable_cancelCallback,So=i.unstable_requestPaint,Eo=i.unstable_now,Mo=i.unstable_getCurrentPriorityLevel,Oo=i.unstable_ImmediatePriority,Lo=i.unstable_UserBlockingPriority,To=i.unstable_NormalPriority,Ao=i.unstable_LowPriority,Do=i.unstable_IdlePriority,Po={},Io=i.unstable_shouldYield,No=void 0!==So?So:function(){},Ro=null,jo=null,zo=!1,Fo=Eo(),Bo=1e4>Fo?Eo:function(){return Eo()-Fo};function $o(){switch(Mo()){case Oo:return 99;case Lo:return 98;case To:return 97;case Ao:return 96;case Do:return 95;default:throw Error(a(332))}}function qo(e){switch(e){case 99:return Oo;case 98:return Lo;case 97:return To;case 96:return Ao;case 95:return Do;default:throw Error(a(332))}}function Vo(e,t){return e=qo(e),Co(e,t)}function Ho(e,t,n){return e=qo(e),_o(e,t,n)}function Uo(e){return null===Ro?(Ro=[e],jo=_o(Oo,Wo)):Ro.push(e),Po}function Zo(){if(null!==jo){var e=jo;jo=null,xo(e)}Wo()}function Wo(){if(!zo&&null!==Ro){zo=!0;var e=0;try{var t=Ro;Vo(99,(function(){for(;e=t&&(Ta=!0),e.firstContext=null)}function oi(e,t){if(Xo!==e&&!1!==t&&0!==t)if("number"===typeof t&&1073741823!==t||(Xo=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Qo){if(null===Yo)throw Error(a(308));Qo=t,Yo.dependencies={expirationTime:0,firstContext:t,responders:null}}else Qo=Qo.next=t;return e._currentValue}var ii=!1;function ai(e){e.updateQueue={baseState:e.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function si(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,baseQueue:e.baseQueue,shared:e.shared,effects:e.effects})}function ui(e,t){return(e={expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null}).next=e}function li(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function ci(e,t){var n=e.alternate;null!==n&&si(n,e),null===(n=(e=e.updateQueue).baseQueue)?(e.baseQueue=t.next=t,t.next=t):(t.next=n.next,n.next=t)}function fi(e,t,n,r){var i=e.updateQueue;ii=!1;var a=i.baseQueue,s=i.shared.pending;if(null!==s){if(null!==a){var u=a.next;a.next=s.next,s.next=u}a=s,i.shared.pending=null,null!==(u=e.alternate)&&(null!==(u=u.updateQueue)&&(u.baseQueue=s))}if(null!==a){u=a.next;var l=i.baseState,c=0,f=null,d=null,p=null;if(null!==u)for(var h=u;;){if((s=h.expirationTime)c&&(c=s)}else{null!==p&&(p=p.next={expirationTime:1073741823,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null}),iu(s,h.suspenseConfig);e:{var v=e,g=h;switch(s=t,m=n,g.tag){case 1:if("function"===typeof(v=g.payload)){l=v.call(m,l,s);break e}l=v;break e;case 3:v.effectTag=-4097&v.effectTag|64;case 0:if(null===(s="function"===typeof(v=g.payload)?v.call(m,l,s):v)||void 0===s)break e;l=o({},l,s);break e;case 2:ii=!0}}null!==h.callback&&(e.effectTag|=32,null===(s=i.effects)?i.effects=[h]:s.push(h))}if(null===(h=h.next)||h===u){if(null===(s=i.shared.pending))break;h=a.next=s.next,s.next=u,i.baseQueue=a=s,i.shared.pending=null}}null===p?f=l:p.next=d,i.baseState=f,i.baseQueue=p,au(c),e.expirationTime=c,e.memoizedState=l}}function di(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;tm?(v=f,f=null):v=f.sibling;var g=p(o,f,s[m],u);if(null===g){null===f&&(f=v);break}e&&f&&null===g.alternate&&t(o,f),a=i(g,a,m),null===c?l=g:c.sibling=g,c=g,f=v}if(m===s.length)return n(o,f),l;if(null===f){for(;mv?(g=m,m=null):g=m.sibling;var b=p(o,m,y.value,l);if(null===b){null===m&&(m=g);break}e&&m&&null===b.alternate&&t(o,m),s=i(b,s,v),null===f?c=b:f.sibling=b,f=b,m=g}if(y.done)return n(o,m),c;if(null===m){for(;!y.done;v++,y=u.next())null!==(y=d(o,y.value,l))&&(s=i(y,s,v),null===f?c=y:f.sibling=y,f=y);return c}for(m=r(o,m);!y.done;v++,y=u.next())null!==(y=h(m,o,v,y.value,l))&&(e&&null!==y.alternate&&m.delete(null===y.key?v:y.key),s=i(y,s,v),null===f?c=y:f.sibling=y,f=y);return e&&m.forEach((function(e){return t(o,e)})),c}return function(e,r,i,u){var l="object"===typeof i&&null!==i&&i.type===ne&&null===i.key;l&&(i=i.props.children);var c="object"===typeof i&&null!==i;if(c)switch(i.$$typeof){case ee:e:{for(c=i.key,l=r;null!==l;){if(l.key===c){switch(l.tag){case 7:if(i.type===ne){n(e,l.sibling),(r=o(l,i.props.children)).return=e,e=r;break e}break;default:if(l.elementType===i.type){n(e,l.sibling),(r=o(l,i.props)).ref=Ci(e,l,i),r.return=e,e=r;break e}}n(e,l);break}t(e,l),l=l.sibling}i.type===ne?((r=Ou(i.props.children,e.mode,u,i.key)).return=e,e=r):((u=Mu(i.type,i.key,i.props,null,e.mode,u)).ref=Ci(e,r,i),u.return=e,e=u)}return s(e);case te:e:{for(l=i.key;null!==r;){if(r.key===l){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),(r=o(r,i.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Tu(i,e.mode,u)).return=e,e=r}return s(e)}if("string"===typeof i||"number"===typeof i)return i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,i)).return=e,e=r):(n(e,r),(r=Lu(i,e.mode,u)).return=e,e=r),s(e);if(wi(i))return m(e,r,i,u);if(me(i))return v(e,r,i,u);if(c&&_i(e,i),"undefined"===typeof i&&!l)switch(e.tag){case 1:case 0:throw e=e.type,Error(a(152,e.displayName||e.name||"Component"))}return n(e,r)}}var Si=xi(!0),Ei=xi(!1),Mi={},Oi={current:Mi},Li={current:Mi},Ti={current:Mi};function Ai(e){if(e===Mi)throw Error(a(174));return e}function Di(e,t){switch(lo(Ti,t),lo(Li,e),lo(Oi,Mi),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:je(null,"");break;default:t=je(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}uo(Oi),lo(Oi,t)}function Pi(){uo(Oi),uo(Li),uo(Ti)}function Ii(e){Ai(Ti.current);var t=Ai(Oi.current),n=je(t,e.type);t!==n&&(lo(Li,e),lo(Oi,n))}function Ni(e){Li.current===e&&(uo(Oi),uo(Li))}var Ri={current:0};function ji(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function zi(e,t){return{responder:e,props:t}}var Fi=J.ReactCurrentDispatcher,Bi=J.ReactCurrentBatchConfig,$i=0,qi=null,Vi=null,Hi=null,Ui=!1;function Zi(){throw Error(a(321))}function Wi(e,t){if(null===t)return!1;for(var n=0;ni))throw Error(a(301));i+=1,Hi=Vi=null,t.updateQueue=null,Fi.current=ba,e=n(r,o)}while(t.expirationTime===$i)}if(Fi.current=va,t=null!==Vi&&null!==Vi.next,$i=0,Hi=Vi=qi=null,Ui=!1,t)throw Error(a(300));return e}function Gi(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Hi?qi.memoizedState=Hi=e:Hi=Hi.next=e,Hi}function Ji(){if(null===Vi){var e=qi.alternate;e=null!==e?e.memoizedState:null}else e=Vi.next;var t=null===Hi?qi.memoizedState:Hi.next;if(null!==t)Hi=t,Vi=e;else{if(null===e)throw Error(a(310));e={memoizedState:(Vi=e).memoizedState,baseState:Vi.baseState,baseQueue:Vi.baseQueue,queue:Vi.queue,next:null},null===Hi?qi.memoizedState=Hi=e:Hi=Hi.next=e}return Hi}function Yi(e,t){return"function"===typeof t?t(e):t}function Qi(e){var t=Ji(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=Vi,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(null!==o){o=o.next,r=r.baseState;var u=s=i=null,l=o;do{var c=l.expirationTime;if(c<$i){var f={expirationTime:l.expirationTime,suspenseConfig:l.suspenseConfig,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null};null===u?(s=u=f,i=r):u=u.next=f,c>qi.expirationTime&&(qi.expirationTime=c,au(c))}else null!==u&&(u=u.next={expirationTime:1073741823,suspenseConfig:l.suspenseConfig,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null}),iu(c,l.suspenseConfig),r=l.eagerReducer===e?l.eagerState:e(r,l.action);l=l.next}while(null!==l&&l!==o);null===u?i=r:u.next=s,jr(r,t.memoizedState)||(Ta=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=u,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function Xi(e){var t=Ji(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var s=o=o.next;do{i=e(i,s.action),s=s.next}while(s!==o);jr(i,t.memoizedState)||(Ta=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function ea(e){var t=Gi();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Yi,lastRenderedState:e}).dispatch=ma.bind(null,qi,e),[t.memoizedState,e]}function ta(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=qi.updateQueue)?(t={lastEffect:null},qi.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function na(){return Ji().memoizedState}function ra(e,t,n,r){var o=Gi();qi.effectTag|=e,o.memoizedState=ta(1|t,n,void 0,void 0===r?null:r)}function oa(e,t,n,r){var o=Ji();r=void 0===r?null:r;var i=void 0;if(null!==Vi){var a=Vi.memoizedState;if(i=a.destroy,null!==r&&Wi(r,a.deps))return void ta(t,n,i,r)}qi.effectTag|=e,o.memoizedState=ta(1|t,n,i,r)}function ia(e,t){return ra(516,4,e,t)}function aa(e,t){return oa(516,4,e,t)}function sa(e,t){return oa(4,2,e,t)}function ua(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function la(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,oa(4,2,ua.bind(null,t,e),n)}function ca(){}function fa(e,t){return Gi().memoizedState=[e,void 0===t?null:t],e}function da(e,t){var n=Ji();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Wi(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function pa(e,t){var n=Ji();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Wi(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ha(e,t,n){var r=$o();Vo(98>r?98:r,(function(){e(!0)})),Vo(97<\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=u.createElement(i,{is:r.is}):(e=u.createElement(i),"select"===i&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,i),e[xn]=t,e[Sn]=r,Ba(e,t),t.stateNode=e,u=an(i,r),i){case"iframe":case"object":case"embed":Wt("load",e),l=r;break;case"video":case"audio":for(l=0;lr.tailExpiration&&1t)&&qs.set(e,t))}}function Gs(e,t){e.expirationTime=(e=n>(e=e.nextKnownPendingLevel)?n:e)&&t!==e?0:e}function Ys(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=Uo(Xs.bind(null,e));else{var t=Js(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var r=Zs();if(1073741823===t?r=99:1===t||2===t?r=95:r=0>=(r=10*(1073741821-t)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var o=e.callbackPriority;if(e.callbackExpirationTime===t&&o>=r)return;n!==Po&&xo(n)}e.callbackExpirationTime=t,e.callbackPriority=r,t=1073741823===t?Uo(Xs.bind(null,e)):Ho(r,Qs.bind(null,e),{timeout:10*(1073741821-t)-Bo()}),e.callbackNode=t}}}function Qs(e,t){if(Us=0,t)return Nu(e,t=Zs()),Ys(e),null;var n=Js(e);if(0!==n){if(t=e.callbackNode,0!==(48&_s))throw Error(a(327));if(mu(),e===xs&&n===Es||nu(e,n),null!==Ss){var r=_s;_s|=16;for(var o=ou();;)try{uu();break}catch(u){ru(e,u)}if(ei(),_s=r,ys.current=o,1===Ms)throw t=Os,nu(e,n),Pu(e,n),Ys(e),t;if(null===Ss)switch(o=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,r=Ms,xs=null,r){case ks:case 1:throw Error(a(345));case 2:Nu(e,2=n){e.lastPingedTime=n,nu(e,n);break}}if(0!==(i=Js(e))&&i!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}e.timeoutHandle=bn(du.bind(null,e),o);break}du(e);break;case Cs:if(Pu(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=fu(o)),Ps&&(0===(o=e.lastPingedTime)||o>=n)){e.lastPingedTime=n,nu(e,n);break}if(0!==(o=Js(e))&&o!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}if(1073741823!==Ts?r=10*(1073741821-Ts)-Bo():1073741823===Ls?r=0:(r=10*(1073741821-Ls)-5e3,0>(r=(o=Bo())-r)&&(r=0),(n=10*(1073741821-n)-o)<(r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*gs(r/1960))-r)&&(r=n)),10=(r=0|s.busyMinDurationMs)?r=0:(o=0|s.busyDelayMs,r=(i=Bo()-(10*(1073741821-i)-(0|s.timeoutMs||5e3)))<=o?0:o+r-i),10 component higher in the tree to provide a loading indicator or placeholder to display."+ge(a))}5!==Ms&&(Ms=2),s=Qa(s,a),f=i;do{switch(f.tag){case 3:u=s,f.effectTag|=4096,f.expirationTime=t,ci(f,hs(f,u,t));break e;case 1:u=s;var k=f.type,w=f.stateNode;if(0===(64&f.effectTag)&&("function"===typeof k.getDerivedStateFromError||null!==w&&"function"===typeof w.componentDidCatch&&(null===zs||!zs.has(w)))){f.effectTag|=4096,f.expirationTime=t,ci(f,ms(f,u,t));break e}}f=f.return}while(null!==f)}Ss=cu(Ss)}catch(C){t=C;continue}break}}function ou(){var e=ys.current;return ys.current=va,null===e?va:e}function iu(e,t){eDs&&(Ds=e)}function su(){for(;null!==Ss;)Ss=lu(Ss)}function uu(){for(;null!==Ss&&!Io();)Ss=lu(Ss)}function lu(e){var t=vs(e.alternate,e,Es);return e.memoizedProps=e.pendingProps,null===t&&(t=cu(e)),bs.current=null,t}function cu(e){Ss=e;do{var t=Ss.alternate;if(e=Ss.return,0===(2048&Ss.effectTag)){if(t=Ja(t,Ss,Es),1===Es||1!==Ss.childExpirationTime){for(var n=0,r=Ss.child;null!==r;){var o=r.expirationTime,i=r.childExpirationTime;o>n&&(n=o),i>n&&(n=i),r=r.sibling}Ss.childExpirationTime=n}if(null!==t)return t;null!==e&&0===(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=Ss.firstEffect),null!==Ss.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=Ss.firstEffect),e.lastEffect=Ss.lastEffect),1(e=e.childExpirationTime)?t:e}function du(e){var t=$o();return Vo(99,pu.bind(null,e,t)),null}function pu(e,t){do{mu()}while(null!==Bs);if(0!==(48&_s))throw Error(a(327));var n=e.finishedWork,r=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var o=fu(n);if(e.firstPendingTime=o,r<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:r<=e.firstSuspendedTime&&(e.firstSuspendedTime=r-1),r<=e.lastPingedTime&&(e.lastPingedTime=0),r<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===xs&&(Ss=xs=null,Es=0),1u&&(c=u,u=s,s=c),c=dn(k,s),f=dn(k,u),c&&f&&(1!==C.rangeCount||C.anchorNode!==c.node||C.anchorOffset!==c.offset||C.focusNode!==f.node||C.focusOffset!==f.offset)&&((w=w.createRange()).setStart(c.node,c.offset),C.removeAllRanges(),s>u?(C.addRange(w),C.extend(f.node,f.offset)):(w.setEnd(f.node,f.offset),C.addRange(w))))),w=[];for(C=k;C=C.parentNode;)1===C.nodeType&&w.push({element:C,left:C.scrollLeft,top:C.scrollTop});for("function"===typeof k.focus&&k.focus(),k=0;k=n?Ha(e,t,n):(lo(Ri,1&Ri.current),null!==(t=Ka(e,t,n))?t.sibling:null);lo(Ri,1&Ri.current);break;case 19:if(r=t.childExpirationTime>=n,0!==(64&e.effectTag)){if(r)return Wa(e,t,n);t.effectTag|=64}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null),lo(Ri,Ri.current),!r)return null}return Ka(e,t,n)}Ta=!1}}else Ta=!1;switch(t.expirationTime=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,o=mo(t,fo.current),ri(t,n),o=Ki(null,t,r,e,o,n),t.effectTag|=1,"object"===typeof o&&null!==o&&"function"===typeof o.render&&void 0===o.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,vo(r)){var i=!0;ko(t)}else i=!1;t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,ai(t);var s=r.getDerivedStateFromProps;"function"===typeof s&&mi(t,r,s,e),o.updater=vi,t.stateNode=o,o._reactInternalFiber=t,ki(t,r,e,n),t=za(null,t,r,!0,i,n)}else t.tag=0,Aa(null,t,o,n),t=t.child;return t;case 16:e:{if(o=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}}(o),1!==o._status)throw o._result;switch(o=o._result,t.type=o,i=t.tag=function(e){if("function"===typeof e)return Su(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===ue)return 11;if(e===fe)return 14}return 2}(o),e=Go(o,e),i){case 0:t=Ra(null,t,o,e,n);break e;case 1:t=ja(null,t,o,e,n);break e;case 11:t=Da(null,t,o,e,n);break e;case 14:t=Pa(null,t,o,Go(o.type,e),r,n);break e}throw Error(a(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,Ra(e,t,r,o=t.elementType===r?o:Go(r,o),n);case 1:return r=t.type,o=t.pendingProps,ja(e,t,r,o=t.elementType===r?o:Go(r,o),n);case 3:if(Fa(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,o=null!==(o=t.memoizedState)?o.element:null,si(e,t),fi(t,r,null,n),(r=t.memoizedState.element)===o)Oa(),t=Ka(e,t,n);else{if((o=t.stateNode.hydrate)&&(wa=wn(t.stateNode.containerInfo.firstChild),ka=t,o=Ca=!0),o)for(n=Ei(t,null,r,n),t.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else Aa(e,t,r,n),Oa();t=t.child}return t;case 5:return Ii(t),null===e&&Sa(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,s=o.children,yn(r,o)?s=null:null!==i&&yn(r,i)&&(t.effectTag|=16),Na(e,t),4&t.mode&&1!==n&&o.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(Aa(e,t,s,n),t=t.child),t;case 6:return null===e&&Sa(t),null;case 13:return Ha(e,t,n);case 4:return Di(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Si(t,null,r,n):Aa(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,Da(e,t,r,o=t.elementType===r?o:Go(r,o),n);case 7:return Aa(e,t,t.pendingProps,n),t.child;case 8:case 12:return Aa(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value;var u=t.type._context;if(lo(Jo,u._currentValue),u._currentValue=i,null!==s)if(u=s.value,0===(i=jr(u,i)?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(u,i):1073741823))){if(s.children===o.children&&!po.current){t=Ka(e,t,n);break e}}else for(null!==(u=t.child)&&(u.return=t);null!==u;){var l=u.dependencies;if(null!==l){s=u.child;for(var c=l.firstContext;null!==c;){if(c.context===r&&0!==(c.observedBits&i)){1===u.tag&&((c=ui(n,null)).tag=2,li(u,c)),u.expirationTime=t&&e<=t}function Pu(e,t){var n=e.firstSuspendedTime,r=e.lastSuspendedTime;nt||0===n)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)}function Iu(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var n=e.firstSuspendedTime;0!==n&&(t>=n?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))}function Nu(e,t){var n=e.lastExpiredTime;(0===n||n>t)&&(e.lastExpiredTime=t)}function Ru(e,t,n,r){var o=t.current,i=Zs(),s=pi.suspense;i=Ws(i,o,s);e:if(n){t:{if(Xe(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(a(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break t;case 1:if(vo(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break t}}u=u.return}while(null!==u);throw Error(a(171))}if(1===n.tag){var l=n.type;if(vo(l)){n=bo(n,l,u);break e}}n=u}else n=co;return null===t.context?t.context=n:t.pendingContext=n,(t=ui(i,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),li(o,t),Ks(o,i),i}function ju(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function zu(e,t){null!==(e=e.memoizedState)&&null!==e.dehydrated&&e.retryTime=C},s=function(){},t.unstable_forceFrameRate=function(e){0>e||125>>1,o=e[r];if(!(void 0!==o&&0O(a,n))void 0!==u&&0>O(u,a)?(e[r]=u,e[s]=n,r=s):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==u&&0>O(u,n)))break e;e[r]=u,e[s]=n,r=s}}}return t}return null}function O(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var L=[],T=[],A=1,D=null,P=3,I=!1,N=!1,R=!1;function j(e){for(var t=E(T);null!==t;){if(null===t.callback)M(T);else{if(!(t.startTime<=e))break;M(T),t.sortIndex=t.expirationTime,S(L,t)}t=E(T)}}function z(e){if(R=!1,j(e),!N)if(null!==E(L))N=!0,r(F);else{var t=E(T);null!==t&&o(z,t.startTime-e)}}function F(e,n){N=!1,R&&(R=!1,i()),I=!0;var r=P;try{for(j(n),D=E(L);null!==D&&(!(D.expirationTime>n)||e&&!a());){var s=D.callback;if(null!==s){D.callback=null,P=D.priorityLevel;var u=s(D.expirationTime<=n);n=t.unstable_now(),"function"===typeof u?D.callback=u:D===E(L)&&M(L),j(n)}else M(L);D=E(L)}if(null!==D)var l=!0;else{var c=E(T);null!==c&&o(z,c.startTime-n),l=!1}return l}finally{D=null,P=r,I=!1}}function B(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var $=s;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){N||I||(N=!0,r(F))},t.unstable_getCurrentPriorityLevel=function(){return P},t.unstable_getFirstCallbackNode=function(){return E(L)},t.unstable_next=function(e){switch(P){case 1:case 2:case 3:var t=3;break;default:t=P}var n=P;P=t;try{return e()}finally{P=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=$,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=P;P=e;try{return t()}finally{P=n}},t.unstable_scheduleCallback=function(e,n,a){var s=t.unstable_now();if("object"===typeof a&&null!==a){var u=a.delay;u="number"===typeof u&&0s?(e.sortIndex=u,S(T,e),null===E(L)&&e===E(T)&&(R?i():R=!0,o(z,u-s))):(e.sortIndex=a,S(L,e),N||I||(N=!0,r(F))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();j(e);var n=E(L);return n!==D&&null!==D&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime=0;t--){var n=e.index(t);if(0!=n)for(var r=e.node(t).child(n-1);;r=r.lastChild){if(0==r.childCount&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}}return!0}(e)||!function(e){for(var t=e.depth;t>=0;t--){var n=e.indexAfter(t),r=e.node(t);if(n!=r.childCount)for(var o=r.child(n);;o=o.firstChild){if(0==o.childCount&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}(e))return!1;var n=t.type.spec.allowGapCursor;if(null!=n)return n;var r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock},t.findFrom=function(e,n,r){e:for(;;){if(!r&&t.valid(e))return e;for(var i=e.pos,a=null,s=e.depth;;s--){var u=e.node(s);if(n>0?e.indexAfter(s)0){a=u.child(n>0?e.indexAfter(s):e.index(s)-1);break}if(0==s)return null;i+=n;var l=e.doc.resolve(i);if(t.valid(l))return l}for(;;){var c=n>0?a.firstChild:a.lastChild;if(!c){if(a.isAtom&&!a.isText&&!o.NodeSelection.isSelectable(a)){e=e.doc.resolve(i+a.nodeSize*n),r=!1;continue e}break}a=c,i+=n;var f=e.doc.resolve(i);if(t.valid(f))return f}return null}},t}(o.Selection);s.prototype.visible=!1,o.Selection.jsonID("gapcursor",s);var u=function(e){this.pos=e};u.prototype.map=function(e){return new u(e.map(this.pos))},u.prototype.resolve=function(e){var t=e.resolve(this.pos);return s.valid(t)?new s(t):o.Selection.near(t)};var l=function(){return new o.Plugin({props:{decorations:p,createSelectionBetween:function(e,t,n){if(t.pos==n.pos&&s.valid(n))return new s(n)},handleClick:d,handleKeyDown:c}})},c=Object(r.keydownHandler)({ArrowLeft:f("horiz",-1),ArrowRight:f("horiz",1),ArrowUp:f("vert",-1),ArrowDown:f("vert",1)});function f(e,t){var n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,i){var a=e.selection,u=t>0?a.$to:a.$from,l=a.empty;if(a instanceof o.TextSelection){if(!i.endOfTextblock(n)||0==u.depth)return!1;l=!1,u=e.doc.resolve(t>0?u.after():u.before())}var c=s.findFrom(u,t,l);return!!c&&(r&&r(e.tr.setSelection(new s(c))),!0)}}function d(e,t,n){if(!e.editable)return!1;var r=e.state.doc.resolve(t);if(!s.valid(r))return!1;var i=e.posAtCoords({left:n.clientX,top:n.clientY}).inside;return!(i>-1&&o.NodeSelection.isSelectable(e.state.doc.nodeAt(i)))&&(e.dispatch(e.state.tr.setSelection(new s(r))),!0)}function p(e){if(!(e.selection instanceof s))return null;var t=document.createElement("div");return t.className="ProseMirror-gapcursor",i.DecorationSet.create(e.doc,[i.Decoration.widget(e.selection.head,t,{key:"gapcursor"})])}},function(e,t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,v=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,k=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function C(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case f:case d:case a:case u:case s:case h:return e;default:switch(e=e&&e.$$typeof){case c:case p:case g:case v:case l:return e;default:return t}}case i:return t}}}function _(e){return C(e)===d}t.AsyncMode=f,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=o,t.ForwardRef=p,t.Fragment=a,t.Lazy=g,t.Memo=v,t.Portal=i,t.Profiler=u,t.StrictMode=s,t.Suspense=h,t.isAsyncMode=function(e){return _(e)||C(e)===f},t.isConcurrentMode=_,t.isContextConsumer=function(e){return C(e)===c},t.isContextProvider=function(e){return C(e)===l},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return C(e)===p},t.isFragment=function(e){return C(e)===a},t.isLazy=function(e){return C(e)===g},t.isMemo=function(e){return C(e)===v},t.isPortal=function(e){return C(e)===i},t.isProfiler=function(e){return C(e)===u},t.isStrictMode=function(e){return C(e)===s},t.isSuspense=function(e){return C(e)===h},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===a||e===d||e===u||e===s||e===h||e===m||"object"===typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===v||e.$$typeof===l||e.$$typeof===c||e.$$typeof===p||e.$$typeof===b||e.$$typeof===k||e.$$typeof===w||e.$$typeof===y)},t.typeOf=C},function(e,t,n){"use strict";var r=n(34),o=n(35),i=n(4),a=n(5),s=n(6),u=n(7),l=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o