diff --git a/apps/mobile/web.bundle/asset-manifest.json b/apps/mobile/web.bundle/asset-manifest.json
index 3f05d383f..6473e4f5b 100644
--- a/apps/mobile/web.bundle/asset-manifest.json
+++ b/apps/mobile/web.bundle/asset-manifest.json
@@ -2,7 +2,7 @@
"files": {
"static/js/0.f9fcc7b4.chunk.js": "./static/js/0.f9fcc7b4.chunk.js",
"main.css": "./static/css/main.ccbe10ee.chunk.css",
- "main.js": "./static/js/main.e08a2ce0.chunk.js",
+ "main.js": "./static/js/main.3653d8a7.chunk.js",
"runtime-main.js": "./static/js/runtime-main.46e27fff.js",
"static/js/3.98236456.chunk.js": "./static/js/3.98236456.chunk.js",
"static/js/4.a8943a18.chunk.js": "./static/js/4.a8943a18.chunk.js",
@@ -16,6 +16,6 @@
"static/js/runtime-main.46e27fff.js",
"static/js/3.98236456.chunk.js",
"static/css/main.ccbe10ee.chunk.css",
- "static/js/main.e08a2ce0.chunk.js"
+ "static/js/main.3653d8a7.chunk.js"
]
}
\ No newline at end of file
diff --git a/apps/mobile/web.bundle/index.html b/apps/mobile/web.bundle/index.html
index d7f566264..02a04fab1 100644
--- a/apps/mobile/web.bundle/index.html
+++ b/apps/mobile/web.bundle/index.html
@@ -1 +1 @@
-
Notesnook editor
\ No newline at end of file
+Notesnook editor
\ No newline at end of file
diff --git a/apps/mobile/web.bundle/static/js/main.3653d8a7.chunk.js b/apps/mobile/web.bundle/static/js/main.3653d8a7.chunk.js
new file mode 100644
index 000000000..dda5b293d
--- /dev/null
+++ b/apps/mobile/web.bundle/static/js/main.3653d8a7.chunk.js
@@ -0,0 +1 @@
+(this.webpackJsonptiptap=this.webpackJsonptiptap||[]).push([[1],{126:function(e,t,n){"use strict";(function(e){var i=n(13),r=n(10),o=n(9),a=n(113),c=n(59),l=n(1),s=n(139),u=n(141),d=n(95),f=n(23),p=n(142),b=n(152),m=n(153),h=n(154),g=n(0),v=function(){var t,n,v=Object(u.a)(),j=Object(l.useState)(0),O=Object(o.a)(j,2),x=O[0],y=O[1],C=Object(d.a)((function(e){return e.colors})),k=Object(l.useState)({readonly:e.readonly||v.readonly,noHeader:e.noHeader||v.noHeader,noToolbar:e.noToolbar||v.noToolbar||e.readonly||v.readonly}),w=Object(o.a)(k,2),S=w[0],A=w[1],L=Object(l.useRef)(null),R=Object(l.useRef)(null),T=Object(l.useState)(!1),P=Object(o.a)(T,2),E=P[0],M=P[1],I=Object(a.useTheme)({accent:"green",scale:1,theme:null!==C&&void 0!==C&&C.night?"dark":"light"}),D=Object(a.useTheme)({accent:"green",scale:1,theme:null!==C&&void 0!==C&&C.night?"dark":"light"});D.space=[0,10,12,20],I.space=[0,10,12,18],I.space.small="10px",I.buttons.menuitem=Object(r.a)(Object(r.a)({},I.buttons.menuitem),{},{height:"50px",paddingX:"20px",borderBottomWidth:0}),I.iconSizes={big:20,medium:18,small:18},I.fontSizes=Object(r.a)(Object(r.a)({},I.fontSizes),{},{subBody:"0.8rem",body:"0.9rem"}),I.radii=Object(r.a)(Object(r.a)({},I.radii),{},{small:5}),I.buttons.menuitem=Object(r.a)(Object(r.a)({},I.buttons.menuitem),{},{px:5,height:"45px"}),Object(c.d)({claims:{premium:v.premium},onPermissionDenied:function(){post(f.a.pro)}});var z=Object(c.e)({onUpdate:function(t){var n=t.editor;e.editorController.contentChange(n)},onSelectionUpdate:function(t){e.editorController.selectionChange(t.editor)},onOpenAttachmentPicker:function(t,n){return e.editorController.openFilePicker(n),!0},onDownloadAttachment:function(t,n){return e.editorController.downloadAttachment(n),!0},theme:D,element:E&&L.current||void 0,editable:!S.readonly,editorProps:{editable:function(){return!S.readonly}},content:null===(t=e.editorController)||void 0===t||null===(n=t.content)||void 0===n?void 0:n.current,isMobile:!0},[E,S.readonly,x]),N=Object(s.a)(z,(function(){y((function(e){return e+1})),N.setTitlePlaceholder("Note title")})),H=Object(l.useRef)(N);return globalThis.editorController=N,globalThis.editor=z,Object(l.useEffect)((function(){A(Object(r.a)({},v))}),[v]),Object(l.useLayoutEffect)((function(){M(!0)}),[]),Object(g.jsx)(g.Fragment,{children:Object(g.jsxs)("div",{style:{display:"flex",flex:1,flexDirection:"column",maxWidth:"100vw",marginBottom:"5px"},children:[Object(g.jsx)(p.a,{hasRedo:(null===z||void 0===z?void 0:z.can().redo())||!1,hasUndo:(null===z||void 0===z?void 0:z.can().undo())||!1,settings:v,noHeader:S.noHeader||!1}),Object(g.jsxs)("div",{onScroll:N.scroll,ref:R,style:{overflowY:"scroll",flexDirection:"column",height:"100%",flexGrow:1,flexShrink:1,display:"flex"},children:[S.noHeader?null:Object(g.jsxs)(g.Fragment,{children:[Object(g.jsx)(m.a,{}),Object(g.jsx)(h.a,{titlePlaceholder:N.titlePlaceholder,readonly:v.readonly,controller:H,title:N.title}),Object(g.jsx)(b.a,{container:R,editor:z})]}),Object(g.jsx)("div",{ref:L,style:{padding:12,paddingTop:0,color:null===C||void 0===C?void 0:C.pri,flex:1}}),Object(g.jsx)("div",{onDoubleClick:function(){var e,t,n=null===(e=globalThis.editor)||void 0===e?void 0:e.state.doc.content.size;n&&(null===(t=globalThis.editor)||void 0===t||t.chain().focus().insertContentAt(n-1,"",{updateSelection:!0}).run())},style:{flexShrink:0,height:150,width:"100%"}})]}),S.noToolbar||!E?null:Object(g.jsx)(c.b,{sx:{pl:"10px",pt:"5px",minHeight:45},theme:I,editor:z,location:"bottom",tools:Object(i.a)(v.tools)})]})})};t.a=function(){return Object(g.jsx)(c.a,{children:Object(g.jsx)(v,{})})}}).call(this,n(51))},139:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return c}));var i=n(9),r=n(1),o=n(95),a=n(23);function c(t,n){var c=Object(r.useState)(""),l=Object(i.a)(c,2),s=l[0],u=l[1],d=Object(r.useState)("Note title"),f=Object(i.a)(d,2),p=f[0],b=f[1],m=Object(r.useRef)(null),h=Object(r.useRef)({selectionChange:null,change:null}),g=Object(r.useCallback)((function(e){}),[]),v=Object(r.useCallback)((function(e){var t;e&&(g(e),h.current.change=Object(a.d)((function(){m.current=e.getHTML(),Object(a.c)(a.a.content,m.current)}),300,null===(t=h.current)||void 0===t?void 0:t.change))}),[g]),j=Object(r.useCallback)((function(e){}),[]),O=Object(r.useCallback)((function(t){if(console.log(t),"{"===(null===t||void 0===t?void 0:t.data[0])){var i=JSON.parse(t.data),r=i.type,c=i.value;switch(e.sessionId=i.sessionId,r){case"native:html":m.current=c,n();break;case"native:theme":o.a.getState().setColors(i.value);break;case"native:title":u(c);break;case"native:titleplaceholder":b(c)}Object(a.c)(r)}}),[n]);Object(r.useEffect)((function(){if(Object(a.b)()){var e=navigator.vendor.match(/apple/i),t=document;return e&&(t=window),t.addEventListener("message",O),function(){t.removeEventListener("message",O)}}}),[O]);var x=Object(r.useCallback)((function(e){Object(a.c)(a.a.filepicker,e)}),[]),y=Object(r.useCallback)((function(e){alert("downloadAttachment"+e.hash),Object(a.c)(a.a.download,e)}),[]);return{contentChange:v,selectionChange:g,titleChange:function(e){Object(a.c)(a.a.title,e)},scroll:j,title:s,setTitle:u,titlePlaceholder:p,setTitlePlaceholder:b,openFilePicker:x,downloadAttachment:y,content:m,onUpdate:function(){n()}}}}).call(this,n(51))},141:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return s}));var i=n(9),r=n(10),o=n(59),a=n(1),c=localStorage.getItem("editorSettings"),l={fullscreen:!1,deviceMode:"mobile",premium:!1,tools:Object(o.c)().default,noToolbar:e.noToolbar,noHeader:e.noHeader,readonly:e.readonly};e.settingsController={update:function(t){var n=t;JSON.stringify(n)!==JSON.stringify(e.settingsController.previous)&&(e.settingsController.set&&e.settingsController.set(n),t?localStorage.setItem("editorSettings",JSON.stringify(n)):localStorage.removeItem("editorSettings"),settingsController.previous=Object(r.a)({},n))},previous:c?JSON.parse(c):Object(r.a)({},l)};var s=function(){var t=Object(a.useState)(Object(r.a)({},e.settingsController.previous)),n=Object(i.a)(t,2),o=n[0],c=n[1];return e.settingsController.set=c,o}}).call(this,n(51))},142:function(e,t,n){"use strict";n.d(t,"a",(function(){return w}));var i=n(143),r=n.n(i),o=n(144),a=n.n(o),c=n(145),l=n.n(c),s=n(146),u=n.n(s),d=n(147),f=n.n(d),p=n(148),b=n.n(p),m=n(149),h=n.n(m),g=n(150),v=n.n(g),j=(n(1),n(151)),O=n(23),x=n(56),y=n.n(x),C=n(0),k=function(e){var t=e.onPress,n=e.children,i=e.style,r=e.preventDefault,o=void 0===r||r;return Object(C.jsx)("button",{className:y.a.btn_header,style:i,onMouseDown:function(e){o&&e.preventDefault(),t()},children:n})};function w(e){var t=e.noHeader,n=e.settings,i=e.hasUndo,o=e.hasRedo,c=Object(j.a)();return Object(C.jsx)("div",{style:{display:"flex",alignItems:"center",height:"".concat(t?c.top:50+c.top,"px"),backgroundColor:"var(--nn_bg)",position:"sticky",width:"100vw"},children:t?null:Object(C.jsxs)("div",{style:{display:"flex",width:"100%",justifyContent:"space-between",flexDirection:"row",paddingTop:c.top,height:50,alignItems:"center"},children:["mobile"===n.deviceMode||n.fullscreen?Object(C.jsx)(k,{onPress:function(){post(O.a.back)},preventDefault:!1,style:{borderWidth:0,borderRadius:100,color:"var(--nn_icon)",marginLeft:6,width:40,height:40,display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",position:"relative"},children:Object(C.jsx)(r.a,{size:27,style:{position:"absolute"},color:"var(--nn_pri)"})}):Object(C.jsx)("div",{}),Object(C.jsxs)("div",{style:{display:"flex",alignItems:"center",flexDirection:"row"},children:[Object(C.jsx)(k,{onPress:function(){var e;null===(e=editor)||void 0===e||e.commands.undo()},style:{borderWidth:0,borderRadius:100,color:"var(--nn_icon)",marginRight:10,width:39,height:39,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:Object(C.jsx)(f.a,{color:i?"var(--nn_pri)":"var(--nn_nav)",size:25,style:{position:"absolute"}})}),Object(C.jsx)(k,{onPress:function(){var e;null===(e=editor)||void 0===e||e.commands.redo()},style:{borderWidth:0,borderRadius:100,color:"var(--nn_icon)",marginRight:10,width:39,height:39,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:Object(C.jsx)(b.a,{color:o?"var(--nn_pri)":"var(--nn_nav)",size:25,style:{position:"absolute"}})}),!n.premium&&Object(C.jsx)(k,{onPress:function(){post(O.a.pro)},preventDefault:!1,style:{borderWidth:0,borderRadius:100,color:"var(--nn_icon)",marginRight:10,width:39,height:39,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:Object(C.jsx)(l.a,{size:25,style:{position:"absolute"},color:"orange"})}),Object(C.jsx)(k,{onPress:function(){var e;null===(e=editor)||void 0===e||e.commands.startSearch()},style:{borderWidth:0,borderRadius:100,color:"var(--nn_icon)",marginRight:10,width:39,height:39,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:Object(C.jsx)(v.a,{size:25,style:{position:"absolute"},color:"var(--nn_pri)"})}),Object(C.jsx)(k,{onPress:function(){post(O.a.monograph)},preventDefault:!1,style:{borderWidth:0,borderRadius:100,color:"var(--nn_icon)",marginRight:10,width:39,height:39,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:Object(C.jsx)(a.a,{size:25,style:{position:"absolute"},color:"var(--nn_pri)"})}),"mobile"===n.deviceMode||n.fullscreen?null:Object(C.jsx)(k,{onPress:function(){post(O.a.fullscreen)},preventDefault:!1,style:{borderWidth:0,borderRadius:100,color:"var(--nn_icon)",marginRight:10,width:39,height:39,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:Object(C.jsx)(h.a,{size:25,style:{position:"absolute"},color:"var(--nn_pri)"})}),Object(C.jsx)(k,{onPress:function(){post(O.a.properties)},preventDefault:!1,style:{borderWidth:0,borderRadius:100,color:"var(--nn_icon)",marginRight:12,width:39,height:39,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:Object(C.jsx)(u.a,{size:25,style:{position:"absolute"},color:"var(--nn_pri)"})})]})]})})}},151:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return c}));var i=n(9),r=n(1),o=localStorage.getItem("safeAreaInsets"),a=o?JSON.parse(o):{top:0,bottom:0,left:0,right:0};e.safeAreaController={update:function(e){safeAreaController.set&&safeAreaController.set(e),safeAreaController.previous=e,localStorage.setItem("safeAreaInsets",JSON.stringify(e))},reset:function(){safeAreaController.set&&safeAreaController.set(a)},previous:a};var c=function(){var t=Object(r.useState)(e.safeAreaController.previous),n=Object(i.a)(t,2),o=n[0],a=n[1];return e.safeAreaController.set=a,o}}).call(this,n(51))},152:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var i=n(9),r=n(1),o=n.n(r),a=n(0);function c(e){var t,n,c=e.editor,l=e.container,s=Object(r.useState)({date:"",saved:""}),u=Object(i.a)(s,2),d=u[0],f=u[1],p=Object(r.useState)(!1),b=Object(i.a)(p,2),m=b[0],h=b[1],g=Object(r.useRef)(0),v=Object(r.useRef)(0),j=(null===c||void 0===c||null===(t=c.storage)||void 0===t||null===(n=t.characterCount)||void 0===n?void 0:n.words())+" words",O=Object(r.useRef)({set:f});globalThis.statusBar=O;var x=o.a.useCallback((function(e){var t=e.target.scrollTop;Date.now()-v.current<300||(t>g.current?h(!1):h(!0),v.current=Date.now(),g.current=t)}),[]);Object(r.useEffect)((function(){var e=l.current;return null===e||void 0===e||e.addEventListener("scroll",x),function(){null===e||void 0===e||e.removeEventListener("scroll",x)}}),[x,l]);var y={marginTop:0,marginBottom:0,fontSize:"12px",color:"var(--nn_icon)",marginRight:8};return Object(a.jsxs)("div",{style:{flexDirection:"row",display:"flex",height:m?20:15,paddingRight:12,paddingLeft:12,position:m?"sticky":"relative",top:0,backgroundColor:"var(--nn_bg)",zIndex:1},children:[Object(a.jsx)("p",{style:y,children:j}),Object(a.jsx)("p",{style:y,children:d.date}),Object(a.jsx)("p",{style:y,children:d.saved})]})}},153:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return s}));var i=n(9),r=n(1),o=n(23),a=n(56),c=n.n(a),l=n(0);function s(){var t=Object(r.useState)([]),n=Object(i.a)(t,2),a=n[0],s=n[1],u=Object(r.useRef)({setTags:s});e.editorTags=u;var d=function(){var e,t;null!==(e=editor)&&void 0!==e&&e.isFocused&&(editor.commands.blur(),null===(t=editorTitle.current)||void 0===t||t.blur());post(o.a.newtag)};return Object(l.jsxs)("div",{style:{padding:"0px 12px",display:"flex",alignItems:"center",marginTop:10},children:[Object(l.jsxs)("button",{className:c.a.btn,onMouseUp:function(e){e.preventDefault(),d()},onMouseDown:function(e){return e.preventDefault()},onTouchEnd:function(e){e.preventDefault(),d()},style:{borderWidth:0,backgroundColor:"var(--nn_nav)",marginRight:5,borderRadius:100,padding:"0px 10px",fontFamily:"Open Sans",display:"flex",alignItems:"center",height:"30px"},children:[0===a.length?Object(l.jsx)("p",{style:{marginRight:4,fontSize:13,color:"var(--nn_icon)",userSelect:"none"},children:"Add a tag"}):null,Object(l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"20",height:"20",viewBox:"0 0 24 24",children:Object(l.jsx)("path",{fill:"var(--nn_accent)",d:"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"})})]}),a.map((function(e){return Object(l.jsxs)("button",{className:c.a.btn,style:{borderWidth:0,backgroundColor:"var(--nn_nav)",marginRight:5,borderRadius:100,padding:"0px 10px",height:"30px",fontFamily:"Open Sans",fontSize:13,color:"var(--nn_icon)"},onMouseUp:function(t){t.preventDefault(),post(o.a.tag,e.title)},onMouseDown:function(e){return e.preventDefault()},onTouchEnd:function(t){t.preventDefault(),post(o.a.tag,e.title)},children:["#",e.alias]})}))]})}}).call(this,n(51))},154:function(e,t,n){"use strict";(function(e){var i=n(1),r=n.n(i),o=n(56),a=n.n(o),c=n(0);function l(t){var n=t.controller,r=t.title,o=t.titlePlaceholder,l=t.readonly,s=Object(i.useRef)(null),u=Object(i.useRef)(!0);return e.editorTitle=s,Object(i.useEffect)((function(){s.current&&(u.current=!1,s.current.value=r,u.current=!0)}),[r]),Object(c.jsx)("input",{ref:s,className:a.a.titleBar,contentEditable:!l,disabled:l,style:{height:50,fontSize:27,width:"100%",boxSizing:"border-box",borderWidth:0,paddingRight:12,paddingLeft:12,fontWeight:600,fontFamily:"Open Sans",backgroundColor:"transparent",color:"var(--nn_heading)"},onChange:function(e){var t;u.current&&(null===(t=n.current)||void 0===t||t.titleChange(e.target.value))},placeholder:o})}t.a=r.a.memo(l,(function(e,t){return e.title===t.title&&(e.titlePlaceholder===t.titlePlaceholder&&e.readonly===t.readonly)}))}).call(this,n(51))},164:function(e,t,n){},165:function(e,t,n){},197:function(e,t,n){},198:function(e,t,n){},199:function(e,t,n){},200:function(e,t,n){},201:function(e,t,n){"use strict";n.r(t);var i=n(1),r=n.n(i),o=n(38),a=n.n(o),c=(n(164),n(165),n(126)),l=n(0);var s=function(){return Object(l.jsx)(c.a,{})},u=function(e){e&&e instanceof Function&&n.e(5).then(n.bind(null,210)).then((function(t){var n=t.getCLS,i=t.getFID,r=t.getFCP,o=t.getLCP,a=t.getTTFB;n(e),i(e),r(e),o(e),a(e)}))};n(197),n(198),n(199),n(200);a.a.render(Object(l.jsx)(r.a.StrictMode,{children:Object(l.jsx)(s,{})}),document.getElementById("root")),u()},23:function(e,t,n){"use strict";(function(e){n.d(t,"d",(function(){return i})),n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a}));var i=function(e,t,n){return n&&(clearTimeout(n),n=null),n=setTimeout(e,t)},r={selection:"editor-event:selection",content:"editor-event:content",title:"editor-event:title",scroll:"editor-event:scroll",history:"editor-event:history",newtag:"editor-event:newtag",tag:"editor-event:tag",filepicker:"editor-event:picker",download:"editor-event:download-attachment",logger:"native:logger",back:"editor-event:back",pro:"editor-event:pro",monograph:"editor-event:monograph",properties:"editor-event:properties",fullscreen:"editor-event:fullscreen"};function o(){return!!window.ReactNativeWebView}function a(t,n){o()?window.ReactNativeWebView.postMessage(JSON.stringify({type:r[t]||t,value:n,sessionId:e.sessionId})):console.log(t,n)}globalThis.logger=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return this.options.component?Object(R.jsx)(H,{children:Object(R.jsx)(this.options.component,Object.assign({},t,{editor:this.editor,getPos:this.getPos,node:this.node,forwardRef:n,updateAttributes:function(t,n){return e.updateAttributes(t,e.getPos(),null===n||void 0===n?void 0:n.addToHistory,null===n||void 0===n?void 0:n.preventUpdate)}}))}):null}},{key:"updateAttributes",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.editor.commands.command((function(o){var a=o.tr;return a.setNodeMarkup(t,void 0,Object.assign(Object.assign({},n.node.attrs),e)),a.setMeta("addToHistory",i),a.setMeta("preventUpdate",r),!0}))}},{key:"update",value:function(e,t,n){var i=this;return this.node.type===e.type&&(this.viewShouldUpdate(e)?(this.node=e,this.renderReactComponent((function(){return i.render(i.options.props,i.handleRef)})),!0):(this.node=e,!0))}},{key:"onDragStart",value:function(e){var t,n,i,r,o,a,c,l=this.editor.view,s=e.target,u=3===s.nodeType?null===(t=s.parentElement)||void 0===t?void 0:t.closest("[data-drag-handle]"):s.closest("[data-drag-handle]");if(this.dom&&!(null===(n=this.contentDOM)||void 0===n?void 0:n.contains(s))&&u){var d=this.dom.querySelector("[data-drag-image]")||this.dom,f=0,p=0;if(d!==u){var b=d.getBoundingClientRect(),m=u.getBoundingClientRect(),h=null!==(i=e.offsetX)&&void 0!==i?i:null===(r=e.nativeEvent)||void 0===r?void 0:r.offsetX,g=null!==(o=e.offsetY)&&void 0!==o?o:null===(a=e.nativeEvent)||void 0===a?void 0:a.offsetY;f=m.x-b.x+h,p=m.y-b.y+g}var v=T.NodeSelection.create(l.state.doc,this.getPos()),j=l.state.tr.setSelection(v);l.dispatch(j),null===(c=e.dataTransfer)||void 0===c||c.setDragImage(d,f,p),function(e,t){if(!e.dataTransfer)return;var n=t.view,i=n.state.selection.content(),r=Object(P.d)(n,i),o=r.dom,a=r.text;e.dataTransfer.clearData(),e.dataTransfer.setData("Text",a),e.dataTransfer.setData("text/plain",a),e.dataTransfer.setData("text/html",o.innerHTML),e.dataTransfer.effectAllowed="copyMove",n.dragging={slice:i,move:!0}}(e,this.editor)}}},{key:"stopEvent",value:function(e){var t,n=this;if(!this.dom)return!1;var i=e.target;if(!(this.dom.contains(i)&&!(null===(t=this.contentDOM)||void 0===t?void 0:t.contains(i))))return!1;var r="drop"===e.type;if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(i.tagName)||i.isContentEditable)&&!r)return!0;var o=this.editor.isEditable,a=this.isDragging,c=!!this.node.type.spec.draggable,l=T.NodeSelection.isSelectable(this.node),s="copy"===e.type,u="paste"===e.type,d="cut"===e.type,f="mousedown"===e.type,p=e.type.startsWith("drag");if(!c&&l&&p&&e.preventDefault(),c&&p&&!a)return e.preventDefault(),!1;if(c&&o&&!a&&f){var b=i.closest("[data-drag-handle]");b&&(this.dom===b||this.dom.contains(b))&&(this.isDragging=!0,document.addEventListener("dragend",(function(){n.isDragging=!1}),{once:!0}),document.addEventListener("mouseup",(function(){n.isDragging=!1}),{once:!0}))}return!(a||r||s||u||d||f&&l)}},{key:"ignoreMutation",value:function(e){if(!this.dom||!this.contentDOM)return!0;if(this.node.isLeaf||this.node.isAtom)return!0;if("selection"===e.type)return!1;if(this.dom.contains(e.target)&&"childList"===e.type&&this.editor.isFocused&&[].concat(Object(S.a)(Array.from(e.addedNodes)),Object(S.a)(Array.from(e.removedNodes))).every((function(e){return e.isContentEditable})))return!1;return this.contentDOM===e.target&&"attributes"===e.type||!this.contentDOM.contains(e.target)}},{key:"viewShouldUpdate",value:function(e){return!this.options.shouldUpdate||this.options.shouldUpdate(this.node,e)}},{key:"setDomAttrs",value:function(e,t){Object.keys(e.attrs||{}).forEach((function(n){t.setAttribute(n,e.attrs[n])}))}},{key:"dom",get:function(){return this.domRef}},{key:"destroy",value:function(){this.domRef&&this.portalProviderAPI&&(this.portalProviderAPI.remove(this.domRef),this.domRef=void 0,this.contentDOM=void 0)}}]),e}();function F(e,t){return function(n){var i=n.node,r=n.getPos,o=n.editor;return new B(i,o,(function(){return"boolean"===typeof r?-1:r()}),Object.assign(Object.assign({},t),{component:e})).init()}}var _=n(33),V=n(15),W=n(16),U=n(1),q=n.n(U),$=n(38),J=n.n($);var G=function(e){Object(V.a)(n,e);var t=Object(W.a)(n);function n(){var e;return Object(A.a)(this,n),(e=t.call(this)).portals=new Map,e.setContext=function(t){e.context=t},e}return Object(L.a)(n,[{key:"render",value:function(e,t){this.portals.set(t,{children:e});var n=e();Object($.unstable_renderSubtreeIntoContainer)(this.context,n,t)}},{key:"forceUpdate",value:function(){}},{key:"remove",value:function(e){this.portals.delete(e);try{Object($.unmountComponentAtNode)(e)}catch(t){}}}]),n}(function(){function e(){Object(A.a)(this,e),this.listeners={}}return Object(L.a)(e,[{key:"on",value:function(e,t){this.listeners[e]||(this.listeners[e]=new Set),this.listeners[e].add(t)}},{key:"off",value:function(e,t){this.listeners[e]&&this.listeners[e].has(t)&&this.listeners[e].delete(t)}},{key:"emit",value:function(e,t){this.listeners[e]&&this.listeners[e].forEach((function(e){return e(t)}))}},{key:"destroy",value:function(){this.listeners={}}}]),e}()),X=q.a.createContext(void 0);function K(){return Object(U.useContext)(X)}var Q=function(e){Object(V.a)(n,e);var t=Object(W.a)(n);function n(e){var i;return Object(A.a)(this,n),(i=t.call(this,e)).portalProviderAPI=new G,i}return Object(L.a)(n,[{key:"render",value:function(){return Object(R.jsxs)(X.Provider,Object.assign({value:this.portalProviderAPI},{children:[this.props.children,Object(R.jsx)(Y,{portalProviderAPI:this.portalProviderAPI})]}))}},{key:"componentDidUpdate",value:function(){this.portalProviderAPI.forceUpdate()}}]),n}(q.a.Component);Q.displayName="PortalProvider";var Y=function(e){Object(V.a)(n,e);var t=Object(W.a)(n);function n(e){var i;return Object(A.a)(this,n),(i=t.call(this,e)).handleUpdate=function(e){return i.setState({portals:e})},e.portalProviderAPI.setContext(Object(_.a)(i)),e.portalProviderAPI.on("update",i.handleUpdate),i.state={portals:new Map},i}return Object(L.a)(n,[{key:"render",value:function(){var e=this.state.portals;return Object(R.jsx)(R.Fragment,{children:Array.from(e.entries()).map((function(e){var t=Object(C.a)(e,2),n=t[0],i=t[1];return Object($.createPortal)(i,n)}))})}}]),n}(q.a.Component),Z=n(25),ee=n(19),te=function(){function e(){Object(A.a)(this,e),this.changeHandlers=[],this.changeHandlers=[]}return Object(L.a)(e,[{key:"subscribe",value:function(e){this.changeHandlers.push(e)}},{key:"unsubscribe",value:function(e){this.changeHandlers=this.changeHandlers.filter((function(t){return t!==e}))}},{key:"notifyNewSelection",value:function(e,t){this.changeHandlers.forEach((function(n){return n(e,t)}))}}]),e}(),ne=new T.PluginKey("reactNodeView"),ie=new T.Plugin({state:{init:function(){return new te},apply:function(e,t){return t}},key:ne,view:function(e){var t=ne.getState(e.state);return{update:function(e){var n=e.state.selection,i=n.from,r=n.to;t.notifyNewSelection(i,r)}}}}),re=u.b.create({name:"node-view-selection-notifier",addProseMirrorPlugins:function(){return[ie]}}),oe=function(e){Object(V.a)(n,e);var t=Object(W.a)(n);function n(e,i,r,o){var a;return Object(A.a)(this,n),(a=t.call(this,e,i,r,o)).pos=-1,a.isNodeInsideSelection=function(e,t,n,i){var r=a.getPositionsWithDefault(n,i);return n=r.pos,i=r.posEnd,"number"===typeof n&&"number"===typeof i&&(e<=n&&t>=i)},a.isSelectionInsideNode=function(e,t,n,i){var r=a.getPositionsWithDefault(n,i);return n=r.pos,i=r.posEnd,"number"===typeof n&&"number"===typeof i&&(n0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(!this.options.component)return null;var i=this.editor.isEditable&&(this.insideSelection()||this.nodeInsideSelection());return Object(R.jsx)(H,{children:Object(R.jsx)(this.options.component,Object.assign({},t,{editor:this.editor,getPos:this.getPos,node:this.node,forwardRef:n,selected:i,updateAttributes:function(t,n){return e.updateAttributes(t,e.pos,null===n||void 0===n?void 0:n.addToHistory,null===n||void 0===n?void 0:n.preventUpdate)}}))})}},{key:"updatePos",value:function(){"boolean"!==typeof this.getPos&&(this.pos=this.getPos(),this.posEnd=this.pos+this.node.nodeSize)}},{key:"getPositionsWithDefault",value:function(e,t){return{pos:"number"!==typeof e?this.pos:e,posEnd:"number"!==typeof t?this.posEnd:t}}},{key:"viewShouldUpdate",value:function(e){if(Object(Z.a)(Object(ee.a)(n.prototype),"viewShouldUpdate",this).call(this,e))return!0;var t=this.editor.view.state.selection,i=this.oldSelection;this.oldSelection=t;var r=this.pos,o=this.posEnd;this.updatePos();var a=t.from,c=t.to,l=i.from,s=i.to;if(this.node.type.spec.selectable){var u=t instanceof T.NodeSelection&&t.from===this.pos,d=i instanceof T.NodeSelection&&i.from===this.pos;if(u&&!d||d&&!u)return!0}var f=this.isNodeInsideSelection(a,c)&&!this.isNodeInsideSelection(l,s),p=!this.isNodeInsideSelection(a,c)&&this.isNodeInsideSelection(l,s),b=this.isNodeInsideSelection(a,c,r,o)&&!this.isNodeInsideSelection(a,c);return!!(f||p||b)}},{key:"destroy",value:function(){this.selectionChangeState.unsubscribe(this.onSelectionChange),Object(Z.a)(Object(ee.a)(n.prototype),"destroy",this).call(this)}}]),n}(B);function ae(e,t){return function(n){var i=n.node,r=n.getPos,o=n.editor;return new oe(i,o,(function(){return"boolean"===typeof r?-1:r()}),Object.assign(Object.assign({},t),{component:e})).init()}}var ce=n(6),le=n(130),se=n.n(le),ue=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r=500)null===o||void 0===o||o();else{var n=30*b.current.offsetHeight/100;m.get()>=n?v():g.start({transition:Le,y:0})}},dragConstraints:{top:0,bottom:0},dragMomentum:!1,dragElastic:!1,sx:{bg:"transparent",alignItems:"center",justifyContent:"center",p:2}},{children:Object(R.jsx)(ce.a,{id:"pill",sx:{backgroundColor:"hover",width:60,height:8,borderRadius:100}})})),Object(R.jsx)(Te,Object.assign({items:r,title:i,onClose:o},{children:f}))]}))})):null}function Te(e){var t,n=e.title,i=e.items,r=e.onClose,o=e.children,a=function(e){var t=Object(U.useState)(e),n=Object(C.a)(t,2),i=n[0],r=n[1],o=Object(U.useState)(!1),a=Object(C.a)(o,2),c=a[0],l=a[1],s=Object(U.useRef)([e]);return{current:i,goBack:Object(U.useCallback)((function(){if(c){var e=s.current.pop();r(e),s.current.length<=1&&l(!1)}}),[c]),navigate:Object(U.useCallback)((function(e){console.log("NAVI",e),r((function(t){return t&&s.current.push(t),e})),l(!0)}),[]),canGoBack:c}}({title:n,items:i}),c=a.current,l=a.goBack,s=a.canGoBack,u=a.navigate;return Object(R.jsxs)(ce.c,Object.assign({sx:{flexDirection:"column"}},{children:[s||(null===c||void 0===c?void 0:c.title)?Object(R.jsxs)(ce.c,Object.assign({id:"header",sx:{alignItems:"center",mx:0,mb:1}},{children:[s&&Object(R.jsx)(ce.b,Object.assign({variant:"icon",sx:{p:1,ml:1},onClick:l},{children:Object(R.jsx)(fe,{path:be.arrowLeft,size:"big"})})),(null===c||void 0===c?void 0:c.title)&&Object(R.jsx)(ce.e,Object.assign({variant:"title",sx:{ml:1,fontSize:"title"}},{children:null===c||void 0===c?void 0:c.title}))]})):null,o||(null===(t=null===c||void 0===c?void 0:c.items)||void 0===t?void 0:t.map((function(e){if(e.isHidden)return null;switch(e.type){case"separator":return Object(R.jsx)(Oe,{},e.key);case"button":return Object(R.jsx)(je,{item:e,onClick:function(t){e.menu?u(e.menu):e.onClick&&(null===r||void 0===r||r(),setTimeout((function(){var t;null===(t=e.onClick)||void 0===t||t.call(e)}),300))}},e.key);case"popup":return Object(R.jsx)(q.a.Fragment,{children:Object(R.jsx)(e.component,{onClick:r})},e.key)}})))]}))}var Pe={x:0,y:0,actualX:0,actualY:0};function Ee(e,t){var n=t||{},i=n.target,r=void 0===i?"mouse":i,o=n.isTargetAbsolute,a=void 0!==o&&o,c=n.location,l=void 0===c?void 0:c,s=n.yOffset,u=void 0===s?0:s,d=n.xOffset,f=void 0===d?0:d,p=n.align,b=void 0===p?"start":p,m=n.parent,h=void 0===m?document.body:m,g=n.yAnchor,v="mouse"===r?Pe:Me(r,a),j=v.x,O=v.y,x=v.width,y=v.height,C=v.actualX,k=v.actualY,w=e.offsetWidth,S=e.offsetHeight,A=h.clientWidth,L=h.clientHeight,R={top:0,left:0};if(A-CL?L-S:O,y&&("below"===l?R.top+=y:"top"===l&&(R.top=O-S)),x&&"mouse"!==r&&"center"===b&&w>0?R.left-=(w-x)/2:x&&"mouse"!==r&&"end"===b&&w>0&&(R.left-=w-x),S>L-R.top&&(e.style.maxHeight="".concat(L-20,"px")),g){var P=Me(g,a);R.top=P.y-S}return R.top=a&&R.top<0?0:R.top,R.left=a&&R.left<0?0:R.left,R.top+="below"===l?u:-u,R.left+=f,R}function Me(e,t){var n=e.getBoundingClientRect(),i={x:e.offsetLeft,y:e.offsetTop,width:n.width,height:n.height,actualY:n.y,actualX:n.x};return t&&(i.x=i.actualX,i.y=i.actualY),i}function Ie(e,t,n){var i=Object(U.useState)(-1),r=Object(C.a)(i,2),o=r[0],a=r[1],c=Object(U.useState)(!1),l=Object(C.a)(c,2),s=l[0],u=l[1],d=Object(U.useCallback)((function(t){var n=e[t];if(n){var i=document.getElementById(n.key);i&&i.scrollIntoView({behavior:"auto"})}}),[e]),f=Object(U.useCallback)((function(i){var r=function(t){return e[t]},o=function(t){var n,i;return e&&("separator"===(null===(n=e[t])||void 0===n?void 0:n.type)||(null===(i=r(t))||void 0===i?void 0:i.isDisabled))},c=function(t){return t0?--t:e.length-1},f=function(t){return e&&r(t).menu};a((function(e){var r=e;switch(i.key){case"ArrowUp":if(s)break;for(r=l(e);o(r);)r=l(r);break;case"ArrowDown":if(s)break;for(r=c(e);o(r);)r=c(r);break;case"ArrowRight":f(e)&&u(!0);break;case"ArrowLeft":!function(e){f(e)&&u(!1)}(e);break;case"Enter":t&&t(i);break;case"Escape":n&&n(i)}return r!==e&&d(r),r}))}),[e,s,d,t]);return Object(U.useEffect)((function(){return window.addEventListener("keydown",f),function(){window.removeEventListener("keydown",f)}}),[f]),{focusIndex:o,setFocusIndex:a,isSubmenuOpen:s,setIsSubmenuOpen:u}}function De(){return document.querySelector(".editor-toolbar")||void 0}function ze(){return document.getElementById("popup-container")||void 0}window.addEventListener("mousemove",(function(e){var t=function(e){var t=0,n=0;!e&&window.event&&(e=window.event);e.pageX||e.pageY?(t=e.pageX,n=e.pageY):(e.clientX||e.clientY)&&(t=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,n=e.clientY+document.body.scrollTop+document.documentElement.scrollTop);return{x:t,y:n,actualY:n,actualX:t}}(e),n=t.x,i=t.y,r=t.actualX,o=t.actualY;Pe.x=n,Pe.y=i,Pe.actualX=r,Pe.actualY=o}));var Ne=q.a.createContext(null),He=q.a.createContext(null),Be=function(e){Object(V.a)(n,e);var t=Object(W.a)(n);function n(){var e;return Object(A.a)(this,n),(e=t.apply(this,arguments)).popupContainer=null,e.state={popups:[]},e.openPopup=function(t,n){n&&e.setState((function(e){return{popups:[].concat(Object(S.a)(e.popups),[{id:t,popup:n}])}}))},e.closePopup=function(t){e.setState((function(e){var n=e.popups.findIndex((function(e){return e.id===t}));if(n<=-1)return e;var i=e.popups.slice();return i.splice(n,1),{popups:i}}))},e}return Object(L.a)(n,[{key:"render",value:function(){return Object(R.jsxs)(Ne.Provider,Object.assign({value:this},{children:[this.props.children,Object(R.jsxs)(He.Provider,Object.assign({value:this.props.editor},{children:[this.state.popups.map((function(e){var t=e.id,n=e.popup;return Object(R.jsx)(n,{id:t},t)})),Object(R.jsx)("div",{id:"popup-container"})]}))]}))}}]),n}(q.a.Component);var Fe=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r0){var a=document.body.clientHeight-20;o+r>a&&(e.style.top=a-r+"px")}t=r}})),d.current.observe(e,{box:"border-box"})}}),[s]);return Object(R.jsx)(ye.a,Object.assign({contentRef:function(e){return u.current=e},className:"popup-presenter",role:"menu",isOpen:t,appElement:document.body,shouldCloseOnEsc:!0,shouldReturnFocusAfterClose:!0,shouldCloseOnOverlayClick:!0,shouldFocusAfterRender:c,ariaHideApp:o,preventScroll:o,onRequestClose:i,portalClassName:"popup-presenter-portal",onAfterOpen:function(e){e&&n&&(f(),b(),p())},onAfterClose:function(){var e;return null===(e=d.current)||void 0===e?void 0:e.disconnect()},overlayElement:function(e,t){return Object(R.jsx)(ce.a,Object.assign({},e,{style:Object.assign(Object.assign({},e.style),{position:o?"fixed":"initial",zIndex:1e3,backgroundColor:o?"unset":"transparent"})},{children:t}))},contentElement:function(e,t){return Object(R.jsx)(ce.a,Object.assign({},e,{style:{},sx:{top:0,left:0,right:0,bottom:0,display:"flex",width:"fit-content",height:"fit-content",position:"fixed",backgroundColor:void 0,padding:0,zIndex:0,outline:0,isolation:"isolate"}},{children:t}))},style:{content:{},overlay:{zIndex:999,background:"transparent"}}},{children:l}))}function Ve(e){return e.isOpen?Object(R.jsx)(_e,Object.assign({},e)):null}function We(e){var t=e.id,n=(e.group,e.position),i=e.renderPopup,r=(e.isOpen,e.onClosed,e.autoCloseOnUnmount),o=Fe(e,["id","group","position","renderPopup","isOpen","onClosed","autoCloseOnUnmount"]),a=Object(U.useContext)(Ne),c=Ue(e),l=c.closePopup,s=c.isPopupOpen;return Object(U.useEffect)((function(){if(r)return function(){null===a||void 0===a||a.closePopup(t)}}),[r,t,a]),Object(U.useEffect)((function(){a&&s&&a.openPopup(t,(function(e){var t=e.id,r=I((function(e){return!!e.openedPopups[t]}));return Object(U.useEffect)((function(){r||a.closePopup(t)}),[r]),Object(R.jsx)(Ve,Object.assign({isOpen:r,onClose:function(){return l(t)},position:n,blocking:!0,focusOnRender:!0},o,{children:Object(R.jsx)(ce.a,Object.assign({sx:{boxShadow:"menu",borderRadius:"default",overflow:"hidden"}},{children:Object(R.jsx)(He.Consumer,{children:function(){return i((function(){return a.closePopup(t)}))}})}))}),t)}))}),[a,s]),null}function Ue(e){var t=e.group,n=e.isOpen,i=e.id,r=e.onClosed,o=I((function(e){return!!e.openedPopups[i]})),a=I((function(e){return e.openPopup})),c=I((function(e){return e.closePopup})),l=I((function(e){return e.closePopupGroup}));return I((function(e){return"bottom"===e.toolbarLocation}))&&(t="popup"),Object(U.useEffect)((function(){n?a({id:i,group:t}):c(i)}),[n,i,t,a,c]),Object(U.useEffect)((function(){o||null===r||void 0===r||r()}),[o]),Object(U.useEffect)((function(){o&&l(t,[i])}),[r,o,l,i,t]),Object(U.useEffect)((function(){n||c(i)}),[n,i,t,c]),{isPopupOpen:o,closePopup:c}}function qe(e){var t=e.popup,n=Fe(e,["popup"]);function i(){J.a.unmountComponentAtNode(ze())}return J.a.render(Object(R.jsx)(H,{children:Object(R.jsx)(et,Object.assign({isOpen:!0,position:{target:De(),isTargetAbsolute:!0,location:"below",align:"end",yOffset:10},blocking:!0,focusOnRender:!0},n,{onClose:function(){var e;i(),null===(e=n.onClose)||void 0===e||e.call(n)}},{children:t(i)}))}),ze()),i}var $e=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r=n.map.length)break;var c=n.map[a],l=i.nodeAt(c);l&&(r.push({cell:l,pos:c}),o+=l.attrs.rowspan)}return r}function ln(e,t,n,i){return un(e,t,sn(t,n),sn(t,i))}function sn(e,t){for(var n=e.map,i=e.table,r=[],o=0,a=t*n.width;o=n.map.length);o++,a++){var c=n.map[a],l=i.nodeAt(c);l&&(r.push({cell:l,pos:c}),o+=l.attrs.colspan-1)}return r}function un(e,t,n,i){if(n.length===i.length){for(var r=e.mapping.maps.length,o=0;o1&&void 0!==arguments[1]?arguments[1]:1;if(0===e)return"0B";var n=1024,i=t<0?0:t,r=["B","K","M","G","T","P","E","Z","Y"],o=Math.floor(Math.log(e)/Math.log(n));return parseFloat((e/Math.pow(n,o)).toFixed(i))+r[o]}var oi=u.d.create({name:"attachment",content:"inline*",marks:"",inline:!0,atom:!0,addOptions:function(){return{HTMLAttributes:{},onDownloadAttachment:function(){return!1},onOpenAttachmentPicker:function(){return!1}}},group:function(){return"inline"},draggable:!0,addAttributes:function(){return{progress:{default:0,rendered:!1},hash:ai("hash"),filename:ai("filename"),type:ai("mime"),size:ai("size")}},parseHTML:function(){return[{tag:"span[data-hash]"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["span",Object(u.s)(this.options.HTMLAttributes,t)]},addNodeView:function(){return ae(ii,{shouldUpdate:function(e,t){var n=e.attrs,i=t.attrs;return n.progress!==i.progress}})},addCommands:function(){var e=this;return{insertAttachment:function(t){return function(n){return n.commands.insertContent({type:e.name,attrs:t})}},removeAttachment:function(){return function(e){var t=e.commands;e.tr;return t.deleteSelection()}},downloadAttachment:function(t){return function(n){var i=n.editor;return e.options.onDownloadAttachment(i,t)}},openAttachmentPicker:function(t){return function(n){var i=n.editor;return e.options.onOpenAttachmentPicker(i,t)}},setAttachmentProgress:function(t){return function(n){var i,r=n.state,o=n.tr,a=n.dispatch,c=t.hash,l=t.progress,s=(t.type,Object(u.g)(r.doc,(function(t){return(t.type.name===e.name||"image"===t.type.name)&&t.attrs.hash===c}))),d=Object(k.a)(s);try{for(d.s();!(i=d.n()).done;){var f=i.value;o.setNodeMarkup(f.pos,f.node.type,Object.assign(Object.assign({},f.node.attrs),{progress:100===l?null:l}))}}catch(p){d.e(p)}finally{d.f()}return o.setMeta("preventUpdate",!0),o.setMeta("addToHistory",!1),a&&a(o),!0}}}}});function ai(e,t){return{default:t,parseHTML:function(t){return t.dataset[e]},renderHTML:function(t){return t[e]?Object(w.a)({},"data-".concat(e),t[e]):{}}}}var ci=n(158);var li={a:function(e){var t=e.editor,n=e.selectedNode,i=n.node;return!(null===i||void 0===i?void 0:i.isText)||i.marks.length<=0||!i.marks.some((function(e){return"link"===e.type.name}))?null:Object(R.jsx)(ni,{force:!0,tools:["openLink","editLink","removeLink"],editor:t,selectedNode:n,sx:{bg:"background",boxShadow:"menu",borderRadius:"default",p:1}})}},si=Object.assign({},li);function ui(e){var t=e.editor,n=Object(U.useRef)(),i=Object(U.useRef)();return Object(U.useEffect)((function(){function e(e){if(e.target&&e.target instanceof HTMLElement&&!e.target.classList.contains("ProseMirror")){var r=e.target;if(i.current){var o=!r.closest(".ProseMirror"),a=r.closest(".popup-presenter-portal"),c=i.current.element===r;if(a)return;if(o||!c)return console.log("HIDING",o,c,r),i.current.hide(),void(i.current=void 0)}clearTimeout(n.current),n.current=setTimeout((function(){var e=r.nodeName.toLowerCase(),n=si[e];if(n&&t.current){var o=t.current.view.posAtDOM(r,0),a=t.current.view.state.doc.nodeAt(o);if(a){var c=qe({popup:function(){return Object(R.jsx)(n,{editor:t,selectedNode:{node:a,from:o,to:o+a.nodeSize}})},blocking:!1,focusOnRender:!1,position:{target:r,align:"center",location:"top",isTargetAbsolute:!0}});i.current={element:r,hide:c}}}}),500,{})}}return window.addEventListener("mouseover",e),function(){window.removeEventListener("mouseover",e)}}),[]),null}function di(e){var t=e.editor,n=t.storage.searchreplace,i=n.selectedText,r=n.results,o=Object(U.useState)(!1),a=Object(C.a)(o,2),c=a[0],l=a[1],s=Object(U.useState)(!1),u=Object(C.a)(s,2),d=u[0],f=u[1],p=Object(U.useState)(!1),b=Object(C.a)(p,2),m=b[0],h=b[1],g=Object(U.useState)(!1),v=Object(C.a)(g,2),j=v[0],O=v[1],x=Object(U.useState)(!1),y=Object(C.a)(x,2),k=y[0],w=y[1],S=Object(U.useRef)(""),A=Object(U.useRef)(),L=Object(U.useCallback)((function(e){t.commands.search(e,{matchCase:m,enableRegex:k,matchWholeWord:j})}),[m,k,j]);return Object(U.useEffect)((function(){A.current&&L(A.current.value)}),[L,m,j,k]),Object(U.useEffect)((function(){if(i){if(A.current){var e=A.current;setTimeout((function(){e.value=i,e.focus()}),0)}L(i)}}),[i,L]),Object(R.jsx)(ce.c,Object.assign({sx:{p:1,bg:"background",flexDirection:"column",boxShadow:["none","menu"],borderRadius:[0,"default"]}},{children:Object(R.jsxs)(ce.c,{children:[Object(R.jsxs)(ce.c,Object.assign({sx:{flexDirection:"column",flex:1,width:["auto",300],mr:1}},{children:[Object(R.jsxs)(ce.c,Object.assign({sx:{flex:1,position:"relative",alignItems:"center",outline:"1px solid var(--border)",borderRadius:"default",p:1,py:0,":focus-within":{outlineColor:"primary",outlineWidth:"1.8px"},":hover":{outlineColor:"primary"}}},{children:[Object(R.jsx)(nt.b,{variant:"clean",defaultValue:i,ref:A,autoFocus:!0,placeholder:"Find",sx:{p:0},onChange:function(e){L(e.target.value)}}),Object(R.jsxs)(ce.c,Object.assign({sx:{flexShrink:0,mr:0,alignItems:"center"}},{children:[Object(R.jsx)(ve,{sx:{mr:0},toggled:d,title:"Expand",id:"expand",icon:d?"chevronRight":"chevronLeft",onClick:function(){return f((function(e){return!e}))},iconSize:"medium"}),d&&Object(R.jsxs)(R.Fragment,{children:[Object(R.jsx)(ve,{sx:{mr:0},toggled:m,title:"Match case",id:"matchCase",icon:"caseSensitive",onClick:function(){return h((function(e){return!e}))},iconSize:"medium"}),Object(R.jsx)(ve,{sx:{mr:0},toggled:j,title:"Match whole word",id:"matchWholeWord",icon:"wholeWord",onClick:function(){return O((function(e){return!e}))},iconSize:"medium"}),Object(R.jsx)(ve,{sx:{mr:0},toggled:k,title:"Enable regex",id:"enableRegex",icon:"regex",onClick:function(){return w((function(e){return!e}))},iconSize:"medium"})]}),Object(R.jsxs)(ce.e,Object.assign({variant:"subBody",sx:{flexShrink:0,borderLeft:"1px solid var(--border)",color:"fontTertiary",px:1}},{children:[r?"".concat(r.length):"0",d?"":" results"]}))]}))]})),c&&Object(R.jsx)(nt.b,{sx:{mt:1,p:"7px"},placeholder:"Replace",onChange:function(e){return S.current=e.target.value}})]})),Object(R.jsxs)(ce.c,Object.assign({sx:{flexDirection:"column"}},{children:[Object(R.jsxs)(ce.c,Object.assign({sx:{alignItems:"center",height:"33.2px"}},{children:[Object(R.jsx)(ve,{toggled:c,title:"Toggle replace",id:"toggleReplace",icon:"replace",onClick:function(){return l((function(e){return!e}))},sx:{mr:0},iconSize:"big"}),Object(R.jsx)(ve,{toggled:!1,title:"Previous match",id:"previousMatch",icon:"previousMatch",onClick:function(){return t.commands.moveToPreviousResult()},sx:{mr:0},iconSize:"big"}),Object(R.jsx)(ve,{toggled:!1,title:"Next match",id:"nextMatch",icon:"nextMatch",onClick:function(){return t.commands.moveToNextResult()},sx:{mr:0},iconSize:"big"}),Object(R.jsx)(ve,{toggled:!1,title:"Close",id:"close",icon:"close",onClick:function(){return t.chain().focus().endSearch().run()},sx:{mr:0},iconSize:"big"})]})),c&&Object(R.jsxs)(ce.c,Object.assign({sx:{alignItems:"center",height:"33.2px",mt:1}},{children:[Object(R.jsx)(ve,{toggled:!1,title:"Replace",id:"replace",icon:"replaceOne",onClick:function(){return t.commands.replace(S.current)},sx:{mr:0},iconSize:18}),Object(R.jsx)(ve,{toggled:!1,title:"Replace all",id:"replaceAll",icon:"replaceAll",onClick:function(){return t.commands.replaceAll(S.current)},sx:{mr:0},iconSize:18})]}))]}))]})}))}function fi(e){var t=e.editor,n=t.storage.searchreplace.isSearching;return Object(R.jsx)(et,Object.assign({mobile:"sheet",desktop:"menu",isOpen:n,onClose:function(){return t.commands.endSearch()},position:{target:De(),isTargetAbsolute:!0,location:"below",align:"end",yOffset:5},blocking:!1,focusOnRender:!1,draggable:!1},{children:Object(R.jsx)(di,{editor:t})}))}function pi(e){return Object(R.jsxs)(R.Fragment,{children:[Object(R.jsx)(fi,Object.assign({},e)),Object(R.jsx)(Ye,{children:Object(R.jsx)(ui,Object.assign({},e))})]})}var bi=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r1)||(0===t.parentOffset||0===t.index(t.depth-1))}(e.state)||!e.can().liftListItem(n))return!1;var a=function(e,t){var n=Object(Kn.findParentNodeOfType)(e)(t.selection);return!!n&&!n.node.textContent.length}(n,e.state);if(a){if(ki(n,e.state)){var c=wi(n,e.state);return!!c&&e.commands.deleteNode(c.type)}return e.commands.deleteNode(n)}return ki(n,e.state)?e.commands.liftListItem(n):e.chain().joinBackward().joinBackward().run()}var ki=function(e,t){var n=Object(Kn.findParentNodeOfType)(e)(t.selection);if(!n)return!1;var i=n.pos,r=t.doc.resolve(i);return console.log("isFirstOfType",r),!r.nodeBefore},wi=function(e,t){var n,i=Object(Kn.findParentNodeOfType)(e)(t.selection);if(i){var r=i.pos,o=t.doc.resolve(r);if(o.parent.type.spec.group&&!((null===(n=o.parent.type.spec.group)||void 0===n?void 0:n.indexOf("list"))<=-1))return o.parent}};function Si(e){var t=e.editor,n=e.updateAttributes,i=(e.node,e.getPos),r=e.forwardRef,o=e.node.attrs.checked,a=z(),c=Object(U.useCallback)((function(){var e;if(!t.isEditable)return!1;n({checked:!o});var r=i(),a=null===(e=t.current)||void 0===e?void 0:e.state.doc.nodeAt(r);return!!a&&(t.commands.command((function(e){var t=e.tr;return function(e,t,n,i){var r,o=Object(u.g)(e,(function(e){return e.type.name===Ai.name})),a=Object(k.a)(o);try{for(a.s();!(r=a.n()).done;){var c=r.value.pos+i+1;t.setNodeMarkup(c,void 0,{checked:n})}}catch(l){a.e(l)}finally{a.f()}}(a,t,!o,r),!0})),!0)}),[t,i,o]);return Object(R.jsx)(R.Fragment,{children:Object(R.jsxs)(ce.c,Object.assign({"data-drag-image":!0,sx:{bg:"background",borderRadius:"default",":hover > .dragHandle":{opacity:t.isEditable?1:0}}},{children:[Object(R.jsx)(fe,{className:"dragHandle",draggable:"true","data-drag-handle":!0,path:be.dragHandle,sx:{opacity:[1,1,0],alignSelf:"start",mr:2,bg:"transparent",cursor:"grab",".icon:hover path":{fill:"var(--checked) !important"}},size:a?24:20}),Object(R.jsx)(fe,{path:o?be.check:"",stroke:"1px",sx:{border:"2px solid",borderColor:o?"checked":"icon",borderRadius:"default",alignSelf:"start",mr:2,p:"1px",cursor:t.isEditable?"pointer":"unset",":hover":{borderColor:"checked"},":hover .icon path":{fill:"var(--checked) !important"}},onMouseDown:function(e){e.preventDefault(),c()},onTouchEnd:function(e){e.preventDefault(),c()},color:o?"checked":"icon",size:a?16:14}),Object(R.jsx)(ce.e,{as:"div",ref:r,sx:{"> .taskitem-content-wrapper > p":{textDecorationLine:o?"line-through":"none",opacity:o?.8:1},flex:1}})]}))})}var Ai=n(135).a.extend({draggable:!0,addAttributes:function(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:function(e){return e.classList.contains("checked")},renderHTML:function(e){return{class:e.checked?"checked":""}}}}},renderHTML:function(e){e.node;var t=e.HTMLAttributes;return["li",Object(u.s)(this.options.HTMLAttributes,t,{class:"checklist--item"}),0]},parseHTML:function(){return[{tag:"li",getAttrs:function(e){var t;return e instanceof Node&&e instanceof HTMLElement&&(!(!e.classList.contains("checklist--item")&&!(null===(t=e.parentElement)||void 0===t?void 0:t.classList.contains("checklist")))&&null)},priority:51}]},addKeyboardShortcuts:function(){var e,t=this;return Object.assign(Object.assign({},null===(e=this.parent)||void 0===e?void 0:e.call(this)),{Backspace:function(e){return Ci(e.editor,t.name,t.type)}})},addNodeView:function(){return F(Si,{contentDOMFactory:!0,wrapperFactory:function(){return document.createElement("li")},shouldUpdate:function(e,t){var n=e.attrs,i=t.attrs;return n.checked!==i.checked||n.collapsed!==i.collapsed}})}});function Li(e){var t=z(),n=e.editor,i=e.getPos,r=e.node,o=e.updateAttributes,a=e.forwardRef,c=Object(u.p)(Ai.name,n.schema),l=r.attrs,s=l.title,d=l.collapsed,f=Object(U.useState)({checked:0,total:0,percentage:0}),p=Object(C.a)(f,2),b=p[0],m=p[1],h=Object(U.useCallback)((function(){var e=n.state.doc.resolve(i());return Object(Kn.findParentNodeOfTypeClosestToPos)(e,c)}),[]),g=Object(U.useMemo)((function(){return!!h()}),[h]);return Object(U.useEffect)((function(){var e=h();if(e){var t=e.node,i=e.pos,r=function(e,t,n){var i,r=Object(u.g)(e,(function(e){return e.type.name===Ai.name})),o=Object(k.a)(r);try{for(o.s();!(i=o.n()).done;){var a=t+i.value.pos+1,c=n.nodeAt(a);if(!(null===c||void 0===c?void 0:c.attrs.checked))return!1}}catch(l){o.e(l)}finally{o.f()}return!0}(t,i,n.state.doc);t.attrs.checked!==r&&n.commands.command((function(e){return e.tr.setNodeMarkup(i,void 0,{checked:r}),!0}))}}),[r,r.childCount]),Object(U.useEffect)((function(){var e=Object(u.g)(r,(function(e){return e.type.name===Ai.name})),t=e.filter((function(e){return e.node.attrs.checked})).length,n=e.length,i=Math.round(t/n*100);m({checked:t,total:n,percentage:i})}),[g,r]),Object(R.jsxs)(R.Fragment,{children:[Object(R.jsx)(ce.c,Object.assign({sx:{flexDirection:"column",":hover > div > .toggleSublist":{opacity:1}}},{children:g?Object(R.jsxs)(ce.c,Object.assign({sx:{position:"absolute",top:0,right:0},contentEditable:!1},{children:[d&&Object(R.jsxs)(ce.e,Object.assign({variant:"body",sx:{color:"fontTertiary",mr:35}},{children:[b.checked,"/",b.total]})),Object(R.jsx)(fe,{className:"toggleSublist",path:d?be.chevronDown:be.chevronUp,sx:{opacity:t||d?1:0,position:"absolute",right:0,alignSelf:"start",mr:2,cursor:"pointer",".icon:hover path":{fill:"var(--checked) !important"}},size:t?24:20,onClick:function(){o({collapsed:!d},{addToHistory:!1,preventUpdate:!0})}})]})):Object(R.jsxs)(ce.c,Object.assign({sx:{position:"relative",bg:"bgSecondary",py:1,borderRadius:"default",mb:2,alignItems:"center",justifyContent:"end",overflow:"hidden"},contentEditable:!1},{children:[Object(R.jsx)(ce.a,{sx:{height:"100%",width:"".concat(b.percentage,"%"),position:"absolute",bg:"border",zIndex:0,left:0,transition:"width 250ms ease-out"}}),Object(R.jsx)(nt.b,{readOnly:!n.isEditable,value:s||"",variant:"clean",sx:{p:0,px:2,zIndex:1,color:"fontTertiary"},placeholder:"Untitled",onChange:function(e){o({title:e.target.value},{addToHistory:!0,preventUpdate:!1})}}),Object(R.jsxs)(ce.c,Object.assign({sx:{flexShrink:0,pr:2}},{children:[Object(R.jsx)(fe,{path:be.checkbox,size:15,color:"fontTertiary"}),Object(R.jsxs)(ce.e,Object.assign({variant:"body",sx:{ml:1,color:"fontTertiary"}},{children:[b.checked,"/",b.total]}))]}))]}))})),Object(R.jsx)(ce.e,{as:"div",ref:a,sx:{ul:{display:d?"none":"block",paddingInlineStart:0,marginBlockStart:g?10:0,marginBlockEnd:0,marginLeft:g?-35:0},li:{listStyleType:"none",position:"relative",marginBottom:[2,"7px"]}}})]})}var Ri=yi.a.extend({addAttributes:function(){return{collapsed:{default:!1,keepOnSplit:!1,parseHTML:function(e){return"true"===e.dataset.collapsed},renderHTML:function(e){return{"data-collapsed":!0===e.collapsed}}},title:{default:null,keepOnSplit:!1,parseHTML:function(e){return e.dataset.title},renderHTML:function(e){return!e.title||e.nested?{}:{"data-title":e.title}}}}},parseHTML:function(){return[{tag:"ul",getAttrs:function(e){return e instanceof Node&&e instanceof HTMLElement&&(e.classList.contains("checklist")&&null)},priority:51}]},renderHTML:function(e){var t=e.HTMLAttributes;return["ul",Object(u.s)(this.options.HTMLAttributes,t,{class:"checklist"}),0]},addCommands:function(){var e=this;return{toggleTaskList:function(){return function(t){var n=t.editor,i=t.commands,r=t.state,o=t.tr,a=r.selection,c=a.$from,l=a.$to;i.toggleList(e.name,e.options.itemTypeName);var s={from:o.mapping.map(c.pos),to:o.mapping.map(l.pos)};return setTimeout((function(){return n.commands.setTextSelection(s)}),0),!0}}}},addNodeView:function(){var e=this;return F(Li,{contentDOMFactory:function(){var t=document.createElement("ul");return t.classList.add("".concat(e.name.toLowerCase(),"-content-wrapper")),t.style.whiteSpace="inherit",{dom:t}}})}}),Ti=n(12);function Pi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new T.Plugin({view:function(t){return new Ei(t,e)}})}var Ei=function(){function e(t,n){var i=this;Object(A.a)(this,e),this.editorView=t,this.width=n.width||1,this.color=n.color||"black",this.class=n.class||"",this.cursorPos=null,this.element=null,this.timeout=null,this.handlers=["dragover","dragend","drop","dragleave"].map((function(e){var n=function(t){return i[e](t)};return t.dom.addEventListener(e,n),{name:e,handler:n}}))}return Object(L.a)(e,[{key:"destroy",value:function(){var e=this;this.handlers.forEach((function(t){var n=t.name,i=t.handler;return e.editorView.dom.removeEventListener(n,i)}))}},{key:"update",value:function(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}},{key:"setCursor",value:function(e){e!=this.cursorPos&&(this.cursorPos=e,null==e&&this.element&&this.element.parentNode?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}},{key:"updateOverlay",value:function(){if(this.cursorPos){var e,t=this.editorView.state.doc.resolve(this.cursorPos);if(!t.parent.inlineContent){var n=t.nodeBefore,i=t.nodeAfter;if(n||i){var r=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0));if(!r)return;var o=r.getBoundingClientRect(),a=n?o.bottom:o.top;if(n&&i){var c=this.editorView.nodeDOM(this.cursorPos);if(!c)return;a=(a+c.getBoundingClientRect().top)/2}e={left:o.left,right:o.right,top:a-this.width/2,bottom:a+this.width/2}}}if(!e){var l=this.editorView.coordsAtPos(this.cursorPos);e={left:l.left-this.width/2,right:l.left+this.width/2,top:l.top,bottom:l.bottom}}var s,u,d=this.editorView.dom.offsetParent;if(!this.element&&d&&(this.element=d.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none; background-color: "+this.color),!d||d==document.body&&"static"==getComputedStyle(d).position)s=-pageXOffset,u=-pageYOffset;else{var f=d.getBoundingClientRect();s=f.left-d.scrollLeft,u=f.top-d.scrollTop}this.element&&(this.element.style.left=e.left-s+"px",this.element.style.top=e.top-u+"px",this.element.style.width=e.right-e.left+"px",this.element.style.height=e.bottom-e.top+"px")}}},{key:"scheduleRemoval",value:function(e){var t=this;clearTimeout(this.timeout||void 0),this.timeout=setTimeout((function(){return t.setCursor(null)}),e)}},{key:"dragover",value:function(e){if(this.editorView.editable){var t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),i=n&&n.type.spec.disableDropCursor,r="function"==typeof i?i(this.editorView,t):i;if(t&&!r){var o=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){var a=Object(Ti.h)(this.editorView.state.doc,o,this.editorView.dragging.slice);if(!a)return this.setCursor(null);o=a}this.setCursor(o),this.scheduleRemoval(5e3)}}}},{key:"dragend",value:function(){this.scheduleRemoval(20)}},{key:"drop",value:function(){this.scheduleRemoval(20)}},{key:"dragleave",value:function(e){e.target!=this.editorView.dom&&this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}]),e}(),Mi=u.b.create({name:"dropCursor",addOptions:function(){return{color:"currentColor",width:1,class:null}},addProseMirrorPlugins:function(){return[Pi(this.options)]}}),Ii=function(e,t){return t(e.tr)};var Di=u.b.create({name:"searchreplace",addOptions:function(){return{searchResultClass:"search-result"}},addCommands:function(){var e=this;return{startSearch:function(){return function(t){var n=t.state;return e.storage.isSearching=!0,n.selection.empty||(e.storage.selectedText=n.doc.textBetween(n.selection.$from.pos,n.selection.$to.pos)),!0}},endSearch:function(){return function(t){var n=t.state,i=t.dispatch;return e.storage.isSearching=!1,e.storage.searchTerm="",Ii(n,i),!0}},search:function(t,n){return function(i){var r=i.state,o=i.dispatch;return e.storage.searchTerm=t,e.storage.enableRegex=(null===n||void 0===n?void 0:n.enableRegex)||!1,e.storage.matchCase=(null===n||void 0===n?void 0:n.matchCase)||!1,e.storage.matchWholeWord=(null===n||void 0===n?void 0:n.matchWholeWord)||!1,e.storage.results=[],Ii(r,o),!0}},moveToNextResult:function(){return function(t){var n=t.chain,i=e.storage,r=i.selectedIndex,o=i.results;if(!o||o.length<=0)return!1;var a=r+1;(isNaN(a)||a>=o.length)&&(a=0);var c=o[a],l=c.from,s=c.to;console.log("[moveToNextResult]",l,s);var u=n().focus(void 0,{scrollIntoView:!0}).setTextSelection({from:l,to:s}).run();return u&&(e.storage.selectedIndex=a),u}},moveToPreviousResult:function(){return function(t){var n=t.chain,i=e.storage,r=i.selectedIndex,o=i.results;if(!o||o.length<=0)return!1;var a=r-1;(isNaN(a)||a<0)&&(a=o.length-1);var c=o[a],l=c.from,s=c.to,u=n().focus(void 0,{scrollIntoView:!0}).setTextSelection({from:l,to:s}).run();return u&&(e.storage.selectedIndex=a),u}},replace:function(t){return function(n){var i=n.commands,r=n.tr,o=n.dispatch,a=e.storage,c=a.selectedIndex,l=a.results;if(!o||!l||l.length<=0)return!1;var s=void 0===c?0:c,u=l[s],d=u.from,f=u.to;if(r.insertText(t,d,f),s+1-1||(null===(n=e.alias)||void 0===n?void 0:n.some((function(e){return e.toLowerCase().indexOf(t)>-1})))})))}}),Object(R.jsx)(ce.c,Object.assign({sx:{flexDirection:"column",pt:1,mt:1}},{children:a.map((function(e){return Object(R.jsxs)(he,Object.assign({variant:"menuitem",sx:{textAlign:"left",py:1,display:"flex",justifyContent:"space-between",alignItems:"center"},onClick:function(){return t(e.filename)}},{children:[Object(R.jsx)(ce.e,Object.assign({variant:"body"},{children:e.title})),n===e.filename?Object(R.jsx)(fe,{path:be.check,size:"small"}):e.alias?Object(R.jsx)(ce.e,Object.assign({variant:"subBody",sx:{fontSize:"10px"}},{children:e.alias.slice(0,3).join(", ")})):null]}),e.title)}))}))]}))}))}function Ji(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.reduce((function(e,n){if("comment"===n.type||"doctype"===n.type)return e;var i=Object(S.a)(t);return"element"===n.type&&n.properties?i.push.apply(i,Object(S.a)(n.properties.className)):i.push("token","text"),"element"===n.type?e.push.apply(e,Object(S.a)(Ji(n.children,i))):e.push({classes:i,text:n.value}),e}),[])}function Gi(e,t,n,i){var r=String(n).length,o={class:"line-number ".concat(i?"active":""),"data-line":String(t).padEnd(r," ")},a={line:t,active:i,total:n,from:e};return P.a.inline(e,e+1,o,a)}function Xi(e){var t=e.doc,n=e.name,i=e.defaultLanguage,r=e.caretPosition,o=[],a=Vi.a.listLanguages();return Object(u.g)(t,(function(e){return e.type.name===n})).forEach((function(e){var t,n=e.node.textContent,c=rr(n,e.pos),l=Object(k.a)(c||[]);try{for(l.s();!(t=l.n()).done;){var s=t.value,u=s.index+1,d=u===(null===r||void 0===r?void 0:r.line)&&s.from===(null===r||void 0===r?void 0:r.from),f=Gi(s.from,u,(null===c||void 0===c?void 0:c.length)||0,d);o.push(f)}}catch(h){l.e(h)}finally{l.f()}var p=e.node.attrs.language||i,b=a.includes(p)?Vi.a.highlight(n,p).children||[]:null;if(b){var m=e.pos+1;Ji(b).forEach((function(e){var t=m+e.text.length;if(e.classes.length){var n=P.a.inline(m,t,{class:e.classes.join(" ")});o.push(n)}m=t}))}})),P.b.create(t,o)}function Ki(e){var t=e.name,n=e.defaultLanguage,i=new T.PluginKey("highlighter");return new T.Plugin({key:i,state:{init:function(e,i){return Xi({doc:i.doc,name:t,defaultLanguage:n})},apply:function(e,i,r,o){var a=r.selection.$head.parent.type.name,c=o.selection.$head.parent.type.name,l=Object(u.g)(r.doc,(function(e){return e.type.name===t})),s=Object(u.g)(o.doc,(function(e){return e.type.name===t})),d=ir(o.selection);return e.docChanged&&([a,c].includes(t)||s.length!==l.length||e.steps.some((function(e){return void 0!==e.from&&void 0!==e.to&&l.some((function(t){return t.pos>=e.from&&t.pos+t.node.nodeSize<=e.to}))})))?Xi({doc:e.doc,name:t,defaultLanguage:n,caretPosition:d}):(i=function(e,t,n){var i=t.find(void 0,void 0,(function(e){var t=e.line,i=e.active,r=e.from;return!!n&&(t===n.line&&r===n.from)||i}));if(!i.length)return t;var r=i.slice();t=t.remove(i);var o,a=[],c=Object(k.a)(r);try{for(c.s();!(o=c.n()).done;){var l=o.value,s=l.from,u=l.spec,d=u.line,f=u.total,p=d===(null===n||void 0===n?void 0:n.line),b=Gi(s,d,(null===n||void 0===n?void 0:n.total)||f,p);a.push(b)}}catch(m){c.e(m)}finally{c.f()}return t.add(e,a)}(e.doc,i,d),i.map(e.mapping,e.doc))}},props:{decorations:function(e){return i.getState(e)}},appendTransaction:function(e,n,i){var r=i.tr,o=!1,a=e.some((function(e){return e.docChanged})),c=(i.selection.$from.parent.type.name===t||n.selection.$from.parent.type.name===t)&&n.selection.$from.pos!==i.selection.$from.pos;return Object(u.g)(i.doc,(function(e){return e.type.name===t})).forEach((function(e){var t,n=e.node,l=e.pos,s=Object.assign({},n.attrs);if(a||!(null===(t=s.lines)||void 0===t?void 0:t.length)){var u=rr(n.textContent,l);s.lines=u.slice()}if(c){var d=ir(i.selection,a?rr(n.textContent,l):void 0);s.caretPosition=d}(a||c)&&(r.setNodeMarkup(l,n.type,s),o=!0)})),o?r:null}})}var Qi=n(136),Yi=n(157),Zi=n(91),er=/^```([a-z]+)?[\s\n]$/,tr=/^~~~([a-z]+)?[\s\n]$/,nr=u.d.create({name:"codeblock",addOptions:function(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,exitOnArrowUp:!0,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes:function(){var e=this;return{caretPosition:{default:void 0,rendered:!1},lines:{default:[],rendered:!1},indentType:{default:"space",parseHTML:function(e){return e.dataset.indentType},renderHTML:function(e){return e.indentType?{"data-indent-type":e.indentType}:{}}},indentLength:{default:2,parseHTML:function(e){return e.dataset.indentLength},renderHTML:function(e){return e.indentLength?{"data-indent-length":e.indentLength}:{}}},language:{default:null,parseHTML:function(t){var n,i=e.options.languageClassPrefix,r=[].concat(Object(S.a)(t.classList||[]),Object(S.a)((null===(n=null===t||void 0===t?void 0:t.firstElementChild)||void 0===n?void 0:n.classList)||[])).filter((function(e){return e.startsWith(i)})).map((function(e){return e.replace(i,"")}))[0];return r||null},renderHTML:function(e){return e.language?{class:"language-".concat(e.language)}:{}}}}},parseHTML:function(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["pre",Object(u.s)(this.options.HTMLAttributes,t),["code",{},0]]},addCommands:function(){var e=this;return{setCodeBlock:function(t){return function(n){return n.commands.setNode(e.name,t)}},toggleCodeBlock:function(t){return function(n){var i=n.commands;return console.log("TOGGLING!"),i.toggleNode(e.name,"paragraph",t)}},changeCodeBlockIndentation:function(t){return function(n){var i=n.editor,r=n.tr,o=n.commands,a=i.state.selection.$from;if(a.parent.type!==e.type)return!1;var c,l=a.parent.attrs.lines,s=Object(k.a)(l);try{for(s.s();!(c=s.n()).done;){var u=c.value,d=u.text(),f=d.length-d.trimStart().length;if(f){var p=f,b=lr({type:t.type,amount:p});r.insertText(b,r.mapping.map(u.from),r.mapping.map(u.from+f))}}}catch(m){s.e(m)}finally{s.f()}return o.updateAttributes(e.type,{indentType:t.type,indentLength:t.amount}),!0}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Alt-c":function(){return e.editor.commands.toggleCodeBlock()},"Mod-a":function(t){var n=t.editor,i=e.editor.state.selection.$anchor;if(i.parent.type.name!==e.name)return!1;var r=Object(u.j)(i,(function(t){return t.type.name===e.type.name}));return!!r&&n.commands.setTextSelection({from:r.pos+1,to:r.pos+r.node.nodeSize-1})},Backspace:function(){var t=e.editor.state.selection,n=t.empty,i=t.$anchor,r=i.parent,o=e.editor.state.doc.nodeAt(i.pos+1),a=function(t){return t&&t.type.name===e.name},c=1===i.pos;return!!n&&(c||a(r)&&!r.textContent.length?e.editor.commands.deleteNode(e.type):!(!o||!a(o)||o.textContent.length)&&e.editor.commands.command((function(e){return e.tr.delete(i.pos+1,i.pos+1+o.nodeSize),!0})))},Enter:function(t){var n=t.editor,i=n.state.selection,r=i.$from;if(!i.empty||r.parent.type!==e.type)return!1;var o=ar(r.parent);return e.options.exitOnTripleEnter&&function(e,t){var n=t.parentOffset===t.parent.nodeSize-2,i=t.parent.textContent.endsWith("\n\n");if(!n||!i)return!1;return e.chain().command((function(e){return e.tr.delete(t.pos-2,t.pos),!0})).exitCode().run()}(n,r)||function(e,t,n){var i=function(e,t){var n=function(e,t){return e.find((function(e){return t>=e.from&&t<=e.to}))}(e.parent.attrs.lines,e.pos);if(!n)return!1;var i=n.text(),r=i.length-i.trimStart().length;return{newline:"\n",indentation:lr({amount:r,type:t.type})}}(t,n)||{},r=i.indentation,o=i.newline;return!!o&&e.chain().insertContent("".concat(o).concat(r),{parseOptions:{preserveWhitespace:"full"}}).focus().run()}(n,r,o)},ArrowUp:function(t){var n=t.editor;if(!e.options.exitOnArrowUp)return!1;var i=n.state.selection,r=i.$anchor;return!(!i.empty||r.parent.type!==e.type)&&(!(1!==r.pos)&&n.commands.insertContentAt(0,""))},ArrowDown:function(t){var n=t.editor;if(!e.options.exitOnArrowDown)return!1;var i=n.state,r=i.selection,o=i.doc,a=r.$from;if(!r.empty||a.parent.type!==e.type)return!1;if(!(a.parentOffset===a.parent.nodeSize-2))return!1;var c=a.after();return void 0!==c&&(o.nodeAt(c)?(n.commands.setNodeSelection(a.before()),!1):n.commands.exitCode())},"Shift-Tab":function(t){var n=t.editor,i=n.state.selection,r=i.$from;if(r.parent.type!==e.type)return!1;var o=ar(r.parent),a=lr(o),c=or(r.parent.attrs.lines,i);return n.chain().command((function(e){return sr(e.tr,(function(e){var t,n=Object(k.a)(c);try{for(n.s();!(t=n.n()).done;){var i=t.value;i.text(a.length)===a&&e.delete(e.mapping.map(i.from),e.mapping.map(i.from+o.amount))}}catch(r){n.e(r)}finally{n.f()}}))})).run()},Tab:function(t){var n=t.editor,i=n.state.selection,r=i.$from;if(r.parent.type!==e.type)return!1;var o=or(r.parent.attrs.lines,i);return n.chain().command((function(e){return sr(e.tr,(function(e){var t=lr(ar(r.parent));if(1===o.length)return e.insertText(t,r.pos);var n,i=Object(k.a)(o);try{for(i.s();!(n=i.n()).done;){var a=n.value;e.insertText(t,e.mapping.map(a.from))}}catch(c){i.e(c)}finally{i.f()}}))})).run()}}},addInputRules:function(){return[Object(u.v)({find:er,type:this.type,getAttributes:function(e){return{language:e[1]}}}),Object(u.v)({find:tr,type:this.type,getAttributes:function(e){return{language:e[1]}}})]},addProseMirrorPlugins:function(){var e=this;return[new T.Plugin({key:new T.PluginKey("codeBlockVSCodeHandler"),props:{handlePaste:function(t,n){if(!n.clipboardData)return!1;var i=n.clipboardData.getData("text/plain"),r=n.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,a=null===o||void 0===o?void 0:o.mode;if(!i||!a)return!1;var c=function(e,t){var n=t||Object(Qi.a)(e),i=n.amount,r=n.type,o=void 0===r?"space":r,a=Object(Yi.a)(e,i,{includeEmptyLines:!1,indent:"space"===o?" ":"\t"});return{code:Object(Zi.a)(a),amount:i,type:o}}(i,ar(t.state.selection.$from.parent)),l=t.state.tr;return e.editor.isActive(e.type.name)||l.replaceSelectionWith(e.type.create({language:a,indentType:c.type,indentLength:c.amount})),l.insertText(c.code.replace(/\r\n?/g,"\n")),l.setMeta("paste",!0),t.dispatch(l),!0}}}),Ki({name:this.name,defaultLanguage:"txt"})]},addNodeView:function(){return F(qi,{contentDOMFactory:function(){var e=document.createElement("div");return e.classList.add("node-content-wrapper"),e.style.whiteSpace="inherit",e.style.minWidth="20px",{dom:e}},shouldUpdate:function(e,t){var n=e.attrs,i=t.attrs;return function(e,t){return void 0===t||(null===e||void 0===e?void 0:e.column)!==(null===t||void 0===t?void 0:t.column)||(null===e||void 0===e?void 0:e.line)!==(null===t||void 0===t?void 0:t.line)}(n.caretPosition,i.caretPosition)||n.language!==i.language||n.indentType!==i.indentType}})}});function ir(e,t){var n=e.$from,i=e.$to,r=e.$head;if(n.parent.type.name===nr.name){t=t||(n.parent.attrs.lines||[]);var o,a=Object(k.a)(t);try{for(a.s();!(o=a.n()).done;){var c=o.value;if(r.pos>=c.from&&r.pos<=c.to){var l=c.length+1;return{line:c.index+1,column:l-(c.to-r.pos),selected:i.pos-n.pos,total:t.length,from:c.from}}}}catch(s){a.e(s)}finally{a.f()}}}function rr(e,t){for(var n=[],i=0,r=t+1,o=0,a=function(){var t=e.indexOf("\n",i);t<=-1&&(t=e.length);var a=t-i,c=r+a,l=i;n.push({index:o,length:a,from:r,to:c,text:function(t){return e.slice(l,t?l+t:l+a)}}),r=c+1,i=t+1,++o};i<=e.length;)a();return n}function or(e,t){var n=t.$from,i=t.$to;return e.filter((function(e){return cr(e.from,n.pos,i.pos)||cr(e.to,n.pos,i.pos)||cr(n.pos,e.from,e.to)}))}function ar(e){if(e.type.name===nr.name){var t=e.attrs,n=t.indentType,i=t.indentLength;return{type:n,amount:parseInt(i)}}}function cr(e,t,n){return e>=t&&e<=n}function lr(e){return("space"===e.type?" ":"\t").repeat(e.amount)}function sr(e,t){var n=e.selection,i=n.$anchor,r=n.$head;return t(e),e.setSelection(new T.TextSelection(e.doc.resolve(e.mapping.map(i.pos)),e.doc.resolve(e.mapping.map(r.pos)))),!0}var ur=n(84).a.extend({addKeyboardShortcuts:function(){var e,t=this;return Object.assign(Object.assign({},null===(e=this.parent)||void 0===e?void 0:e.call(this)),{Backspace:function(e){return Ci(e.editor,t.name,t.type)}})}});function dr(e){var t,n,i=e.editor,r=(e.updateAttributes,e.node),o=e.getPos,a=e.forwardRef,c=z(),l=(null===(t=r.lastChild)||void 0===t?void 0:t.type.name)===hr.name,s=l&&(null===(n=r.lastChild)||void 0===n?void 0:n.attrs.collapsed),d=function(){var e=Object(u.g)(r,(function(e){return e.type.name===hr.name})),t=Object(C.a)(e,1)[0];if(t){var n=t.pos;i.commands.toggleOutlineCollapse(n+o()+1,!s)}};return Object(R.jsxs)(ce.c,{children:[Object(R.jsxs)(ce.c,Object.assign({className:"outline",sx:{flexDirection:"column",alignItems:"center",mt:c?"0px":"3px"}},{children:[l?Object(R.jsx)(fe,{path:s?be.chevronRight:be.chevronDown,title:s?"Click to uncollapse list":"Click to collapse list",sx:{cursor:"pointer",transition:"all .2s ease-in-out",":hover":{transform:["unset","scale(1.3)"]},":active":{transform:["scale(1.3)","unset"]},".icon:hover path":{fill:"var(--checked) !important"}},size:c?24:18,onMouseDown:function(e){return e.preventDefault()},onTouchEnd:function(e){e.preventDefault(),d()},onClick:d}):Object(R.jsx)(fe,{path:be.circle,size:c?24:18,sx:{transform:"scale(0.4)"}}),l&&!s&&Object(R.jsx)(ce.a,{sx:{flex:1,width:1,mt:2,backgroundColor:"border",borderRadius:50,flexShrink:0,cursor:"pointer",transition:"all .2s ease-in-out",":hover":{backgroundColor:"fontTertiary",width:4}},contentEditable:!1})]})),Object(R.jsx)(ce.e,{ref:a,sx:{pl:1,listStyleType:"none",flex:1}})]})}var fr=u.d.create({name:"outlineListItem",addOptions:function(){return{HTMLAttributes:{}}},content:"heading* paragraph block*",defining:!0,parseHTML:function(){return[{tag:'li[data-type="'.concat(this.name,'"]')}]},renderHTML:function(e){var t=e.HTMLAttributes;return["li",Object(u.s)(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},addKeyboardShortcuts:function(){var e=this;return{"Mod-Space":function(t){var n=function(e,t){var n,i,r=e.state.selection.$from,o=Object(Kn.findParentNodeOfTypeClosestToPos)(r,t);if(!o)return!1;var a=Object(u.g)(o.node,(function(e){return e.type.name===hr.name})),c=Object(C.a)(a,1)[0];if(!c)return!1;var l=(null===(n=null===c||void 0===c?void 0:c.node)||void 0===n?void 0:n.type.name)===hr.name,s=null===(i=null===c||void 0===c?void 0:c.node)||void 0===i?void 0:i.attrs.collapsed,d=o.pos+c.pos+1;return{isCollapsed:s,isNested:l,subListPos:d}}(t.editor,e.type);if(!n)return!1;var i=n.isCollapsed,r=n.subListPos;return e.editor.commands.toggleOutlineCollapse(r,!i)},Enter:function(t){t.editor;return e.editor.commands.splitListItem(e.name)},Tab:function(){return e.editor.commands.sinkListItem(e.name)},"Shift-Tab":function(){return e.editor.commands.liftListItem(e.name)},Backspace:function(t){return Ci(t.editor,e.name,e.type)}}},addCommands:function(){return{toggleOutlineCollapse:function(e,t){return function(n){return n.tr.setNodeMarkup(e,void 0,{collapsed:t}),!0}}}},addNodeView:function(){return F(dr,{contentDOMFactory:!0,wrapperFactory:function(){return document.createElement("li")}})}});function pr(e){var t=e.editor,n=e.getPos,i=e.node,r=(e.updateAttributes,e.forwardRef),o=i.attrs.collapsed,a=Object(U.useMemo)((function(){var e;return(null===(e=t.state.doc.resolve(n()).parent)||void 0===e?void 0:e.type.name)===fr.name}),[]);return Object(R.jsx)(R.Fragment,{children:Object(R.jsx)(ce.e,{className:"outline-list",as:"div",ref:r,sx:{ul:{display:o?"none":"block",paddingInlineStart:0,paddingLeft:0,marginBlockStart:a?5:0,marginBlockEnd:0},li:{listStyleType:"none"}}})})}var br=/^\s*(-o)\s$/,mr="outlineListItem",hr=u.d.create({name:"outlineList",addOptions:function(){return{HTMLAttributes:{}}},addAttributes:function(){return{collapsed:{default:!1,keepOnSplit:!1,parseHTML:function(e){return"true"===e.dataset.collapsed},renderHTML:function(e){return{"data-collapsed":!0===e.collapsed}}}}},group:"block list",content:"".concat(mr,"+"),parseHTML:function(){return[{tag:'ul[data-type="'.concat(this.name,'"]'),priority:52}]},renderHTML:function(e){var t=e.HTMLAttributes;return["ul",Object(u.s)(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},addCommands:function(){var e=this;return{toggleOutlineList:function(){return function(t){return t.commands.toggleList(e.name,mr)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Shift-O":function(){return e.editor.commands.toggleOutlineList()}}},addInputRules:function(){return[Object(u.w)({find:br,type:this.type})]},addNodeView:function(){var e=this;return F(pr,{contentDOMFactory:function(){var t=document.createElement("ul");return t.classList.add("".concat(e.name.toLowerCase(),"-content-wrapper")),t.style.whiteSpace="inherit",{dom:t}}})}});function gr(e){var t=e.editor,n=e.node,i=e.forwardRef,r=Object(U.useRef)(null),o=Object(U.useRef)(),a=t.isActive("table");return Object(U.useEffect)((function(){r.current&&o.current&&Object(on.s)(n,r.current,o.current,50)}),[n]),Object(R.jsxs)(R.Fragment,{children:[Object(R.jsx)(Ye,{children:a&&Object(R.jsxs)(R.Fragment,{children:[Object(R.jsx)(jr,{editor:t,table:o.current}),Object(R.jsx)(Or,{editor:t,table:o.current})]})}),Object(R.jsx)("div",Object.assign({className:"tableWrapper"},{children:Object(R.jsx)("table",Object.assign({ref:function(e){null===i||void 0===i||i(e),o.current=e||void 0}},{children:Object(R.jsx)("colgroup",{ref:r})}))}))]})}function vr(e){return function(t){Object(V.a)(i,t);var n=Object(W.a)(i);function i(t,r){var o,a;return Object(A.a)(this,i),a=n.call(this,t,e,(function(){return 0}),{component:gr,shouldUpdate:function(e,t){return e.type===t.type},contentDOMFactory:function(){return{dom:document.createElement("tbody")}},wrapperFactory:function(){var e=document.createElement("div");return e.style.position="relative",e}}),Object(Z.a)((o=Object(_.a)(a),Object(ee.a)(i.prototype)),"init",o).call(o),a}return Object(L.a)(i)}(oe)}function jr(e){var t=e.editor,n=Object(U.useRef)(null);return Object(U.useEffect)((function(){if(n.current){var e=Bt(t,["tableRow"]);if(e){var i=Ee(n.current,{location:"left",target:e,align:"start",xOffset:-5,yOffset:-3});n.current.style.top="".concat(i.top,"px"),n.current.style.left="".concat(i.left,"px")}}}),[t.state.selection,n.current]),Object(R.jsxs)(ce.c,Object.assign({ref:n,sx:{zIndex:999,top:0,left:0,position:"absolute",bg:"background",flexWrap:"nowrap",borderRadius:"default",opacity:.3,":hover":{opacity:1}}},{children:[Object(R.jsx)(jn,Object.assign({},bn("rowProperties"),{icon:"more",variant:"small",editor:t})),Object(R.jsx)(Wn,Object.assign({},bn("insertRowBelow"),{editor:t,variant:"small"}))]}))}function Or(e){var t=e.editor,n=e.table,i=Object(U.useRef)(null);return Object(U.useEffect)((function(){if(i.current&&n){var e=Bt(t,["tableCell","tableHeader"]);if(e){var r=Ee(i.current,{location:"top",align:"center",target:e,yAnchor:n,yOffset:2});i.current.style.left="".concat(r.left,"px"),i.current.style.top="".concat(r.top,"px")}}}),[t.state.selection,i.current,n]),Object(R.jsxs)(ce.c,Object.assign({ref:i,sx:{zIndex:999,top:0,left:0,position:"absolute",bg:"background",flexWrap:"nowrap",borderRadius:"default",opacity:.3,":hover":{opacity:1}}},{children:[Object(R.jsx)(On,{editor:t,title:"tableProperties",icon:"more",variant:"small"}),Object(R.jsx)(zn,Object.assign({},bn("insertColumnRight"),{editor:t,variant:"small",icon:"plus"}))]}))}var xr=n(138).a.extend({addProseMirrorPlugins:function(){var e=this.options.resizable&&this.editor.isEditable;return[].concat(Object(S.a)(e?[Object(on.f)({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:vr(this.editor),lastColumnResizable:this.options.lastColumnResizable})]:[]),[Object(on.p)({allowTableNodeSelection:this.options.allowTableNodeSelection})])}}),yr=n(156),Cr=n(155),kr=u.b.create({name:"codemarkPlugin",addProseMirrorPlugins:function(){return Object(Cr.a)({markType:this.editor.schema.marks.code})}}),wr=n(55),Sr=n(47),Ar=n(26);function Lr(e,t,n){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return function(r,o){var a=e.state,c=a.selection,l=c.to,s=c.from,u=r.selection,d=u.to,f=u.from;if(i&&d!==f)return!1;var p=t>0?d:f;if(n){var b=r.doc.nodeSize-2;if(t>0&&p0)return!1}if(o){var m=t>0?l:s;e.dispatch(a.tr.setSelection(T.TextSelection.create(a.doc,m))),e.focus()}return!0}}var Rr=function(){function e(t,n,i,r,o,a){var c=this;Object(A.a)(this,e),this.options=r,this._node=t,this._outerView=n,this._getPos=i,this._mathPluginKey=o,this.cursorSide="start",this._isEditing=!1,this._tagName=r.tagName||this._node.type.name.replace("_","-"),this.dom=document.createElement(this._tagName),r.className&&this.dom.classList.add(r.className),this.dom.classList.add("math-node"),this._mathRenderElt=document.createElement("span"),this._mathRenderElt.textContent="",this._mathRenderElt.classList.add("math-render"),this.dom.appendChild(this._mathRenderElt),this._mathSrcElt=document.createElement("span"),this._mathSrcElt.classList.add("math-src"),this.dom.appendChild(this._mathSrcElt),this.dom.addEventListener("click",(function(){return c.ensureFocus()})),this.renderMath()}return Object(L.a)(e,[{key:"destroy",value:function(){this.closeEditor(!1),this._mathRenderElt&&(this._mathRenderElt.remove(),delete this._mathRenderElt),this._mathSrcElt&&(this._mathSrcElt.remove(),delete this._mathSrcElt),this.dom.remove()}},{key:"ensureFocus",value:function(){this._innerView&&this._outerView.hasFocus()&&this._innerView.focus()}},{key:"update",value:function(e,t,n){if(!e.sameMarkup(this._node))return!1;if(this._node=e,this._innerView){var i=this._innerView.state,r=e.content.findDiffStart(i.doc.content);if(null!=r){var o=e.content.findDiffEnd(i.doc.content);if(o){var a=o.a,c=o.b,l=r-Math.min(a,c);l>0&&(a+=l,c+=l),this._innerView.dispatch(i.tr.replace(r,c,e.slice(r,a)).setMeta("fromOutside",!0))}}}return this._isEditing||this.renderMath(),!0}},{key:"updateCursorPos",value:function(e){var t=this._getPos(),n=this._node.nodeSize;e.selection.from0&&null!==e[0].textContent&&(t=e[0].textContent.trim()),t.length<1)for(this.dom.classList.add("empty-math");this._mathRenderElt.firstChild;)this._mathRenderElt.firstChild.remove();else{this.dom.classList.remove("empty-math");try{this.options.renderer(t,this._mathRenderElt),this._mathRenderElt.classList.remove("parse-error"),this.dom.setAttribute("title","")}catch(n){n instanceof Error&&(console.error(n),this._mathRenderElt.classList.add("parse-error"),this.dom.setAttribute("title",n.toString()))}}}}},{key:"dispatchInner",value:function(e){if(this._innerView){var t=this._innerView.state.applyTransaction(e),n=t.state,i=t.transactions;if(this._innerView.updateState(n),!e.getMeta("fromOutside")){for(var r=this._outerView.state.tr,o=Ti.d.offset(this._getPos()+1),a=0;a0)&&(t._outerView.dispatch(t._outerView.state.tr.insertText("")),t._outerView.focus(),!0))})),Enter:Object(Ar.a)(Ar.i,Lr(this._outerView,1,!1)),"Ctrl-Enter":Lr(this._outerView,1,!1),ArrowLeft:Lr(this._outerView,-1,!0),ArrowRight:Lr(this._outerView,1,!0),ArrowUp:Lr(this._outerView,-1,!0),ArrowDown:Lr(this._outerView,1,!0)})]}),dispatchTransaction:this.dispatchInner.bind(this)});var n=this._innerView.state;this._innerView.focus();var i=null===(e=this._mathPluginKey.getState(this._outerView.state))||void 0===e?void 0:e.prevCursorPos;null!==i&&void 0!==i||console.error("[prosemirror-math] Error: Unable to fetch math plugin state from key.");var r=(null!==i&&void 0!==i?i:0)<=this._getPos()?0:this._node.nodeSize-2;setTimeout((function(){t._innerView&&(t._innerView.focus(),t._innerView.dispatch(n.tr.setSelection(T.TextSelection.create(n.doc,r))))})),this._isEditing=!0}},{key:"closeEditor",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._innerView&&(this._innerView.destroy(),this._innerView=void 0),e&&this.renderMath(),this._isEditing=!1}}]),e}(),Tr=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function c(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}l((i=i.apply(e,t||[])).next())}))};function Pr(){return Tr(this,void 0,void 0,Object(pt.a)().mark((function e(){var t,i;return Object(pt.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.e(0).then(n.t.bind(null,208,7));case 2:return t=e.sent,i=t.default,e.next=6,Promise.all([n.e(0),n.e(4)]).then(n.bind(null,209));case 6:return e.abrupt("return",i);case 7:case"end":return e.stop()}}),e)})))}var Er={inline:function(e,t){Pr().then((function(n){n.render(e,t,{displayMode:!1,globalGroup:!0,throwOnError:!1})}))},block:function(e,t){Pr().then((function(n){n.render(e,t,{displayMode:!0,globalGroup:!0,throwOnError:!1})}))}},Mr=new T.PluginKey("prosemirror-math");function Ir(e){return function(t,n,i){var r=Mr.getState(n.state);if(!r)throw new Error("no math plugin!");var o=r.activeNodeViews,a=new Rr(t,n,i,{className:e?"math-inline":"math-block",renderer:e?Er.inline:Er.block,tagName:e?"span":"div"},Mr,(function(){o.splice(o.indexOf(a))}));return o.push(a),a}}var Dr={key:Mr,state:{init:function(e,t){return{macros:{},activeNodeViews:[],prevCursorPos:0}},apply:function(e,t,n,i){var r=i.selection.from,o=n.selection.from;return{activeNodeViews:t.activeNodeViews,macros:t.macros,prevCursorPos:o!==r?o:t.prevCursorPos}}},props:{nodeViews:{mathInline:Ir(!0),mathBlock:Ir(!1)}}},zr=new T.Plugin(Dr),Nr=n(5);function Hr(e,t){return Nr.Fragment.from(t.text(e))}function Br(e){var t,n=e.querySelector("img.mwe-math-fallback-image-inline[alt]");return null!==(t=null===n||void 0===n?void 0:n.getAttribute("alt"))&&void 0!==t&&t}function Fr(e){var t,n=e.querySelector("math[alttext]");return null!==(t=null===n||void 0===n?void 0:n.getAttribute("alttext"))&&void 0!==t&&t}function _r(e){var t,n=e.querySelector("math annotation[encoding='application/x-tex'");return null!==(t=null===n||void 0===n?void 0:n.textContent)&&void 0!==t&&t}function Vr(e){var t=function(e,t){var n,i=Object(k.a)(t);try{for(i.s();!(n=i.n()).done;){var r=(0,n.value)(e);if(!1!==r)return r}}catch(o){i.e(o)}finally{i.f()}return!1}(e,[Br,Fr,_r]);return t}var Wr=[{tag:"span",getAttrs:function(e){return!!e.classList.contains("mwe-math-element")&&null},getContent:function(e,t){return Hr(Vr(e)||"\\text{\\color{red}(paste error)}",t)}}],Ur=[{tag:"dl",getAttrs:function(e){var t=e;if(1!==t.childElementCount)return!1;var n=t.firstChild;return"DD"===n.tagName&&(1===n.childElementCount&&(!!n.firstChild.classList.contains("mwe-math-element")&&null))},getContent:function(e,t){return Hr(Vr(e)||"\\text{\\color{red}(paste error)}",t)}}];[{tag:"math-inline"}].concat(Object(S.a)(Wr)),[{tag:"math-display"}].concat(Object(S.a)(Ur));var qr=/\$\$(.+)\$\$/,$r=(function(){try{new RegExp("(?1&&void 0!==arguments[1]?arguments[1]:"";return function(n,i){var r=n.selection,o=r.$from,a=r.empty,c=o.index();if(!a&&!o.parent.canReplaceWith(c,c,e))return!1;if(i){var l=e.create({},t?n.schema.text(t):null),s=n.tr.replaceSelectionWith(l);i(s=a?s.setSelection(T.TextSelection.create(s.doc,o.pos+1)):s.setSelection(T.NodeSelection.create(s.doc,o.pos)))}return!0}}(e.type)(n,i,r)}}}},addProseMirrorPlugins:function(){var e,t,n;return[Object(wr.b)({rules:[(e=$r,t=this.type,new wr.a(e,(function(e,i,r,o){var a=e.doc.resolve(r),c=n instanceof Function?n(i):n;if(!a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),t))return null;var l=e.tr.delete(r,o).setBlockType(r,r,t,c);return l.setSelection(T.NodeSelection.create(l.doc,l.mapping.map(a.pos-1)))})))]})]}}),Qr=void 0,Yr=u.b.create({name:"keepinview",onCreate:function(){var e=this;Qr=function(){Zr(e.editor)},window.addEventListener("resize",Qr)},onDestroy:function(){Qr&&(window.removeEventListener("resize",Qr),Qr=void 0)},addKeyboardShortcuts:function(){return{Enter:function(e){var t=e.editor;return setTimeout((function(){Zr(t)})),!1}}}});function Zr(e){var t=e.state.selection.$from,n=Object(u.u)(e.view,t.pos,t.pos+1).top;if(window.innerHeight-n<100){var i=e.view.domAtPos(t.pos).node;if(i.nodeType===Node.TEXT_NODE&&i.parentNode&&(i=i.parentNode),i instanceof HTMLElement){var r=eo(i);r?r.scrollBy({top:100,behavior:"smooth"}):i.scrollIntoView({behavior:"smooth",block:"center"})}}}var eo=function(e){if(e){for(var t=e.parentElement;t;){var n=t.style,i=n.overflow,r=n.overflowY;if(to(i)||to(r))return t;t=t.parentElement}return document.documentElement}};function to(e){return e.split(" ").every((function(e){return"auto"===e||"scroll"===e}))}var no=new T.PluginKey("selection-persist-key"),io=u.b.create({name:"selection-persist",addProseMirrorPlugins:function(){var e=!1;return[new T.Plugin({key:no,props:{decorations:function(e){return no.getState(e)}},state:{init:function(){return P.b.empty},apply:function(t,n,i,r){var o=!!t.getMeta("blur");!!t.getMeta("focus")&&(e=!1,!0),o&&(e=!0,!1);var a=i.selection,c=a.from,l=a.to;return e?P.b.create(t.doc,[P.a.inline(c,l,{style:"background-color: var(--dimPrimary)"})]):P.b.empty}}})]}}),ro=function(e){Object(V.a)(n,e);var t=Object(W.a)(n);function n(){return Object(A.a)(this,n),t.apply(this,arguments)}return Object(L.a)(n,[{key:"requestPermission",value:function(e){var t=new CustomEvent("permissionrequest",{detail:{id:e},cancelable:!0});if(window.dispatchEvent(t))return this.current}}]),n}(u.a);function oo(){var e=Object(U.useState)(0),t=Object(C.a)(e,2)[1];return function(){return t((function(e){return e+1}))}}var ao=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=Object(U.useState)(null),i=Object(C.a)(n,2),r=i[0],o=i[1],a=oo(),c=Object(U.useRef)(r);return Object(U.useEffect)((function(){var t=!0,n=new ro(e);return o(n),n.on("transaction",(function(){requestAnimationFrame((function(){requestAnimationFrame((function(){t&&a()}))}))})),function(){n.destroy(),t=!1}}),t),Object(U.useEffect)((function(){c.current=r,r&&(r.current||Object.defineProperty(r,"current",{get:function(){return c.current}}))}),[r]),Object(U.useEffect)((function(){function e(e){if(null===r||void 0===r?void 0:r.view.dragging)return e.preventDefault(),!0}return null===r||void 0===r||r.view.dom.addEventListener("dragenter",e),function(){null===r||void 0===r||r.view.dom.removeEventListener("dragenter",e)}}),[null===r||void 0===r?void 0:r.view.dom]),r},co={premium:["insertImage"]};function lo(e){var t=e.claims,n=e.onPermissionDenied;Object(U.useEffect)((function(){function e(e){var i=e.detail.id;for(var r in co){var o=r;if(!(co[o].indexOf(i)<=-1)&&!t[o]){n(o,i),e.preventDefault();break}}e.preventDefault()}return window.addEventListener("permissionrequest",e),function(){window.removeEventListener("permissionrequest",e)}}),[t,n])}var so=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.theme,u=e.isMobile,O=e.onDownloadAttachment,C=e.onOpenAttachmentPicker,k=e.onBeforeCreate,w=so(e,["theme","isMobile","onDownloadAttachment","onOpenAttachmentPicker","onBeforeCreate"]),S=K(),A=I((function(e){return e.setIsMobile})),L=I((function(e){return e.setTheme}));Object(U.useEffect)((function(){A(u||!1),L(n)}),[u,n]);var R=Object(U.useMemo)((function(){return{extensions:[re,Di,d.a,a.a.configure({dropcursor:!1,codeBlock:!1,listItem:!1,orderedList:!1,bulletList:!1,history:{depth:200,newGroupDelay:1e3}}),Mi.configure({class:"drop-cursor"}),i.a,o.a,l.a,s.a,f,p,b.a,m,h,Ai.configure({nested:!0}),Ri,yr.a.configure({openOnClick:!u}),xr.configure({resizable:!0,allowTableNodeSelection:!0,cellMinWidth:50}),j.a,x,y.a,g.a.configure({multicolor:!0}),nr,v.a,c.a.configure({types:["heading","paragraph"],alignments:["left","right","center","justify"],defaultAlignment:"left"}),r.a.configure({placeholder:"Start writing your note..."}),xi,Ni,oi.configure({onDownloadAttachment:O,onOpenAttachmentPicker:C}),fr,hr,ur,kr,Xr,Kr,Yr,io],onBeforeCreate:function(e){var t=e.editor;t.storage.portalProviderAPI=S,k&&k({editor:t})},injectCSS:!1}}),[O,C,S,k]),T=ao(Object.assign(Object.assign({},R),w),t);return T}},78:function(e){e.exports=JSON.parse('[{"filename":"markup","title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"]},{"filename":"css","title":"CSS"},{"filename":"clike","title":"C-like"},{"filename":"javascript","title":"JavaScript","alias":["js"]},{"filename":"abap","title":"ABAP"},{"filename":"abnf","title":"ABNF"},{"filename":"actionscript","title":"ActionScript"},{"filename":"ada","title":"Ada"},{"filename":"agda","title":"Agda"},{"filename":"al","title":"AL"},{"filename":"antlr4","title":"ANTLR4","alias":["g4"]},{"filename":"apacheconf","title":"Apache Configuration"},{"filename":"apex","title":"Apex"},{"filename":"apl","title":"APL"},{"filename":"applescript","title":"AppleScript"},{"filename":"aql","title":"AQL"},{"filename":"arduino","title":"Arduino","alias":["ino"]},{"filename":"arff","title":"ARFF"},{"filename":"armasm","title":"ARM Assembly","alias":["arm-asm"]},{"filename":"arturo","title":"Arturo","alias":["art"]},{"filename":"asciidoc","title":"AsciiDoc","alias":["adoc"]},{"filename":"aspnet","title":"ASP.NET (C#)"},{"filename":"asm6502","title":"6502 Assembly"},{"filename":"asmatmel","title":"Atmel AVR Assembly"},{"filename":"autohotkey","title":"AutoHotkey"},{"filename":"autoit","title":"AutoIt"},{"filename":"avisynth","title":"AviSynth","alias":["avs"]},{"filename":"avro-idl","title":"Avro IDL","alias":["avdl"]},{"filename":"awk","title":"AWK","alias":["gawk"]},{"filename":"bash","title":"Bash","alias":["shell"]},{"filename":"basic","title":"BASIC"},{"filename":"batch","title":"Batch"},{"filename":"bbcode","title":"BBcode","alias":["shortcode"]},{"filename":"bicep","title":"Bicep"},{"filename":"birb","title":"Birb"},{"filename":"bison","title":"Bison"},{"filename":"bnf","title":"BNF","alias":["rbnf"]},{"filename":"brainfuck","title":"Brainfuck"},{"filename":"brightscript","title":"BrightScript"},{"filename":"bro","title":"Bro"},{"filename":"bsl","title":"BSL (1C:Enterprise)","alias":["oscript"]},{"filename":"c","title":"C"},{"filename":"csharp","title":"C#","alias":["cs","dotnet"]},{"filename":"cpp","title":"C++"},{"filename":"cfscript","title":"CFScript","alias":["cfc"]},{"filename":"chaiscript","title":"ChaiScript"},{"filename":"cil","title":"CIL"},{"filename":"clojure","title":"Clojure"},{"filename":"cmake","title":"CMake"},{"filename":"cobol","title":"COBOL"},{"filename":"coffeescript","title":"CoffeeScript","alias":["coffee"]},{"filename":"concurnas","title":"Concurnas","alias":["conc"]},{"filename":"csp","title":"Content-Security-Policy"},{"filename":"cooklang","title":"Cooklang"},{"filename":"coq","title":"Coq"},{"filename":"crystal","title":"Crystal"},{"filename":"css-extras","title":"CSS Extras"},{"filename":"csv","title":"CSV"},{"filename":"cue","title":"CUE"},{"filename":"cypher","title":"Cypher"},{"filename":"d","title":"D"},{"filename":"dart","title":"Dart"},{"filename":"dataweave","title":"DataWeave"},{"filename":"dax","title":"DAX"},{"filename":"dhall","title":"Dhall"},{"filename":"diff","title":"Diff"},{"filename":"django","title":"Django/Jinja2","alias":["jinja2"]},{"filename":"dns-zone-file","title":"DNS zone file","alias":["dns-zone"]},{"filename":"docker","title":"Docker","alias":["dockerfile"]},{"filename":"dot","title":"DOT (Graphviz)","alias":["gv"]},{"filename":"ebnf","title":"EBNF"},{"filename":"editorconfig","title":"EditorConfig"},{"filename":"eiffel","title":"Eiffel"},{"filename":"ejs","title":"EJS","alias":["eta"]},{"filename":"elixir","title":"Elixir"},{"filename":"elm","title":"Elm"},{"filename":"etlua","title":"Embedded Lua templating"},{"filename":"erb","title":"ERB"},{"filename":"erlang","title":"Erlang"},{"filename":"excel-formula","title":"Excel Formula","alias":["xlsx","xls"]},{"filename":"fsharp","title":"F#"},{"filename":"factor","title":"Factor"},{"filename":"false","title":"False"},{"filename":"firestore-security-rules","title":"Firestore security rules"},{"filename":"flow","title":"Flow"},{"filename":"fortran","title":"Fortran"},{"filename":"ftl","title":"FreeMarker Template Language"},{"filename":"gml","title":"GameMaker Language","alias":["gamemakerlanguage"]},{"filename":"gap","title":"GAP (CAS)"},{"filename":"gcode","title":"G-code"},{"filename":"gdscript","title":"GDScript"},{"filename":"gedcom","title":"GEDCOM"},{"filename":"gettext","title":"gettext","alias":["po"]},{"filename":"gherkin","title":"Gherkin"},{"filename":"git","title":"Git"},{"filename":"glsl","title":"GLSL"},{"filename":"gn","title":"GN","alias":["gni"]},{"filename":"linker-script","title":"GNU Linker Script","alias":["ld"]},{"filename":"go","title":"Go"},{"filename":"go-module","title":"Go module","alias":["go-mod"]},{"filename":"gradle","title":"Gradle"},{"filename":"graphql","title":"GraphQL"},{"filename":"groovy","title":"Groovy"},{"filename":"haml","title":"Haml"},{"filename":"handlebars","title":"Handlebars","alias":["hbs","mustache"]},{"filename":"haskell","title":"Haskell","alias":["hs"]},{"filename":"haxe","title":"Haxe"},{"filename":"hcl","title":"HCL"},{"filename":"hlsl","title":"HLSL"},{"filename":"hoon","title":"Hoon"},{"filename":"http","title":"HTTP"},{"filename":"hpkp","title":"HTTP Public-Key-Pins"},{"filename":"hsts","title":"HTTP Strict-Transport-Security"},{"filename":"ichigojam","title":"IchigoJam"},{"filename":"icon","title":"Icon"},{"filename":"icu-message-format","title":"ICU Message Format"},{"filename":"idris","title":"Idris","alias":["idr"]},{"filename":"ignore","title":".ignore","alias":["gitignore","hgignore","npmignore"]},{"filename":"inform7","title":"Inform 7"},{"filename":"ini","title":"Ini"},{"filename":"io","title":"Io"},{"filename":"j","title":"J"},{"filename":"java","title":"Java"},{"filename":"javadoc","title":"JavaDoc"},{"filename":"javadoclike","title":"JavaDoc-like"},{"filename":"javastacktrace","title":"Java stack trace"},{"filename":"jexl","title":"Jexl"},{"filename":"jolie","title":"Jolie"},{"filename":"jq","title":"JQ"},{"filename":"jsdoc","title":"JSDoc"},{"filename":"js-extras","title":"JS Extras"},{"filename":"json","title":"JSON","alias":["webmanifest"]},{"filename":"json5","title":"JSON5"},{"filename":"jsonp","title":"JSONP"},{"filename":"jsstacktrace","title":"JS stack trace"},{"filename":"js-templates","title":"JS Templates"},{"filename":"julia","title":"Julia"},{"filename":"keepalived","title":"Keepalived Configure"},{"filename":"keyman","title":"Keyman"},{"filename":"kotlin","title":"Kotlin","alias":["kt","kts"]},{"filename":"kumir","title":"KuMir (\u041a\u0443\u041c\u0438\u0440)","alias":["kum"]},{"filename":"kusto","title":"Kusto"},{"filename":"latex","title":"LaTeX","alias":["tex","context"]},{"filename":"latte","title":"Latte"},{"filename":"less","title":"Less"},{"filename":"lilypond","title":"LilyPond","alias":["ly"]},{"filename":"liquid","title":"Liquid"},{"filename":"lisp","title":"Lisp","alias":["emacs","elisp","emacs-lisp"]},{"filename":"livescript","title":"LiveScript"},{"filename":"llvm","title":"LLVM IR"},{"filename":"log","title":"Log file"},{"filename":"lolcode","title":"LOLCODE"},{"filename":"lua","title":"Lua"},{"filename":"magma","title":"Magma (CAS)"},{"filename":"makefile","title":"Makefile"},{"filename":"markdown","title":"Markdown","alias":["md"]},{"filename":"markup-templating","title":"Markup templating"},{"filename":"mata","title":"Mata"},{"filename":"matlab","title":"MATLAB"},{"filename":"maxscript","title":"MAXScript"},{"filename":"mel","title":"MEL"},{"filename":"mermaid","title":"Mermaid"},{"filename":"mizar","title":"Mizar"},{"filename":"mongodb","title":"MongoDB"},{"filename":"monkey","title":"Monkey"},{"filename":"moonscript","title":"MoonScript","alias":["moon"]},{"filename":"n1ql","title":"N1QL"},{"filename":"n4js","title":"N4JS","alias":["n4jsd"]},{"filename":"nand2tetris-hdl","title":"Nand To Tetris HDL"},{"filename":"naniscript","title":"Naninovel Script","alias":["nani"]},{"filename":"nasm","title":"NASM"},{"filename":"neon","title":"NEON"},{"filename":"nevod","title":"Nevod"},{"filename":"nginx","title":"nginx"},{"filename":"nim","title":"Nim"},{"filename":"nix","title":"Nix"},{"filename":"nsis","title":"NSIS"},{"filename":"objectivec","title":"Objective-C","alias":["objc"]},{"filename":"ocaml","title":"OCaml"},{"filename":"odin","title":"Odin"},{"filename":"opencl","title":"OpenCL"},{"filename":"openqasm","title":"OpenQasm","alias":["qasm"]},{"filename":"oz","title":"Oz"},{"filename":"parigp","title":"PARI/GP"},{"filename":"parser","title":"Parser"},{"filename":"pascal","title":"Pascal","alias":["objectpascal"]},{"filename":"pascaligo","title":"Pascaligo"},{"filename":"psl","title":"PATROL Scripting Language"},{"filename":"pcaxis","title":"PC-Axis","alias":["px"]},{"filename":"peoplecode","title":"PeopleCode","alias":["pcode"]},{"filename":"perl","title":"Perl"},{"filename":"php","title":"PHP"},{"filename":"phpdoc","title":"PHPDoc"},{"filename":"php-extras","title":"PHP Extras"},{"filename":"plant-uml","title":"PlantUML","alias":["plantuml"]},{"filename":"plsql","title":"PL/SQL"},{"filename":"powerquery","title":"PowerQuery","alias":["pq","mscript"]},{"filename":"powershell","title":"PowerShell"},{"filename":"processing","title":"Processing"},{"filename":"prolog","title":"Prolog"},{"filename":"promql","title":"PromQL"},{"filename":"properties","title":".properties"},{"filename":"protobuf","title":"Protocol Buffers"},{"filename":"pug","title":"Pug"},{"filename":"puppet","title":"Puppet"},{"filename":"pure","title":"Pure"},{"filename":"purebasic","title":"PureBasic","alias":["pbfasm"]},{"filename":"purescript","title":"PureScript","alias":["purs"]},{"filename":"python","title":"Python","alias":["py"]},{"filename":"qsharp","title":"Q#","alias":["qs"]},{"filename":"q","title":"Q (kdb+ database)"},{"filename":"qml","title":"QML"},{"filename":"qore","title":"Qore"},{"filename":"r","title":"R"},{"filename":"racket","title":"Racket","alias":["rkt"]},{"filename":"cshtml","title":"Razor C#","alias":["razor"]},{"filename":"jsx","title":"React JSX"},{"filename":"tsx","title":"React TSX"},{"filename":"reason","title":"Reason"},{"filename":"regex","title":"Regex"},{"filename":"rego","title":"Rego"},{"filename":"renpy","title":"Ren\'py","alias":["rpy"]},{"filename":"rescript","title":"ReScript","alias":["res"]},{"filename":"rest","title":"reST (reStructuredText)"},{"filename":"rip","title":"Rip"},{"filename":"roboconf","title":"Roboconf"},{"filename":"robotframework","title":"Robot Framework","alias":["robot"]},{"filename":"ruby","title":"Ruby","alias":["rb"]},{"filename":"rust","title":"Rust"},{"filename":"sas","title":"SAS"},{"filename":"sass","title":"Sass (Sass)"},{"filename":"scss","title":"Sass (Scss)"},{"filename":"scala","title":"Scala"},{"filename":"scheme","title":"Scheme"},{"filename":"shell-session","title":"Shell session","alias":["sh-session","shellsession"]},{"filename":"smali","title":"Smali"},{"filename":"smalltalk","title":"Smalltalk"},{"filename":"smarty","title":"Smarty"},{"filename":"sml","title":"SML","alias":["smlnj"]},{"filename":"solidity","title":"Solidity (Ethereum)","alias":["sol"]},{"filename":"solution-file","title":"Solution file","alias":["sln"]},{"filename":"soy","title":"Soy (Closure Template)"},{"filename":"sparql","title":"SPARQL","alias":["rq"]},{"filename":"splunk-spl","title":"Splunk SPL"},{"filename":"sqf","title":"SQF: Status Quo Function (Arma 3)"},{"filename":"sql","title":"SQL"},{"filename":"squirrel","title":"Squirrel"},{"filename":"stan","title":"Stan"},{"filename":"stata","title":"Stata Ado"},{"filename":"iecst","title":"Structured Text (IEC 61131-3)"},{"filename":"stylus","title":"Stylus"},{"filename":"supercollider","title":"SuperCollider","alias":["sclang"]},{"filename":"swift","title":"Swift"},{"filename":"systemd","title":"Systemd configuration file"},{"filename":"t4-templating","title":"T4 templating"},{"filename":"t4-cs","title":"T4 Text Templates (C#)","alias":["t4"]},{"filename":"t4-vb","title":"T4 Text Templates (VB)"},{"filename":"tap","title":"TAP"},{"filename":"tcl","title":"Tcl"},{"filename":"tt2","title":"Template Toolkit 2"},{"filename":"textile","title":"Textile"},{"filename":"toml","title":"TOML"},{"filename":"tremor","title":"Tremor","alias":["trickle","troy"]},{"filename":"turtle","title":"Turtle","alias":["trig"]},{"filename":"twig","title":"Twig"},{"filename":"typescript","title":"TypeScript","alias":["ts"]},{"filename":"typoscript","title":"TypoScript","alias":["tsconfig"]},{"filename":"unrealscript","title":"UnrealScript","alias":["uscript","uc"]},{"filename":"uorazor","title":"UO Razor Script"},{"filename":"uri","title":"URI","alias":["url"]},{"filename":"v","title":"V"},{"filename":"vala","title":"Vala"},{"filename":"vbnet","title":"VB.Net"},{"filename":"velocity","title":"Velocity"},{"filename":"verilog","title":"Verilog"},{"filename":"vhdl","title":"VHDL"},{"filename":"vim","title":"vim"},{"filename":"visual-basic","title":"Visual Basic","alias":["vb","vba"]},{"filename":"warpscript","title":"WarpScript"},{"filename":"wasm","title":"WebAssembly"},{"filename":"web-idl","title":"Web IDL","alias":["webidl"]},{"filename":"wgsl","title":"WGSL"},{"filename":"wiki","title":"Wiki markup"},{"filename":"wolfram","title":"Wolfram language","alias":["mathematica","nb","wl"]},{"filename":"wren","title":"Wren"},{"filename":"xeora","title":"Xeora","alias":["xeoracube"]},{"filename":"xml-doc","title":"XML doc (.net)"},{"filename":"xojo","title":"Xojo (REALbasic)"},{"filename":"xquery","title":"XQuery"},{"filename":"yaml","title":"YAML","alias":["yml"]},{"filename":"yang","title":"YANG"},{"filename":"zig","title":"Zig"}]')},95:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n(140),r=n.n(i),o=n(22);function a(e){var t=document.getElementById("variables-nn"),n=document.getElementsByTagName("head")[0];t&&n.removeChild(t);var i=document.createElement("style");i.type="text/css",i.id="variables-nn",i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e)),n.insertBefore(i,function(){var e,t=Object(o.a)(document.getElementsByTagName("style"));try{for(t.s();!(e=t.n()).done;){var n=e.value;if(n.innerHTML.includes("#root"))return n}}catch(i){t.e(i)}finally{t.f()}}())}function c(e){var t=":root {";for(var n in e)t+="--nn_".concat(n,": ").concat(e[n],";");return t+"}"}var l={accent:"#008837",shade:"#00883712",fg:"#008837",normal:"black",icon:"gray",transGray:"#00000010",errorBg:"#FFB6C1",errorText:"#ff6961",successBg:"#DFF2BF",successText:"#4F8A10",warningBg:"#FF990020",warningText:"#FF9900",red:"#f44336",orange:"#FF9800",yellow:"#FFD600",green:"#4CAF50",blue:"#2196F3",purple:"#673AB7",gray:"#9E9E9E",discord:"#5865F2",night:!1,bg:"#ffffff",navbg:"#f7f7f7",nav:"#f7f7f7",pri:"#424242",sec:"white",light:"#ffffff",input:"transparent",heading:"#212121",border:"#E8E8E8",placeholder:"#a9a9a9"};a(c(l));var s=r()((function(e,t){return{colors:l,setColors:function(t){a(c(t)),e({colors:t})}}}))}},[[201,2,3]]]);
\ No newline at end of file
diff --git a/apps/mobile/web.bundle/static/js/main.e08a2ce0.chunk.js b/apps/mobile/web.bundle/static/js/main.e08a2ce0.chunk.js
deleted file mode 100644
index dbcfa0bc6..000000000
--- a/apps/mobile/web.bundle/static/js/main.e08a2ce0.chunk.js
+++ /dev/null
@@ -1 +0,0 @@
-(this.webpackJsonptiptap=this.webpackJsonptiptap||[]).push([[1],{126:function(e,t,n){"use strict";(function(e){var i=n(13),r=n(10),o=n(9),a=n(113),c=n(59),l=n(1),s=n(139),u=n(141),d=n(95),f=n(23),p=n(142),b=n(152),m=n(153),h=n(154),g=n(0),v=function(){var t,n,v=Object(u.a)(),j=Object(l.useState)(0),O=Object(o.a)(j,2),x=O[0],y=O[1],C=Object(d.a)((function(e){return e.colors})),k=Object(l.useState)({readonly:e.readonly||v.readonly,noHeader:e.noHeader||v.noHeader,noToolbar:e.noToolbar||v.noToolbar||e.readonly||v.readonly}),w=Object(o.a)(k,2),S=w[0],A=w[1],L=Object(l.useRef)(null),R=Object(l.useRef)(null),T=Object(l.useState)(!1),P=Object(o.a)(T,2),E=P[0],M=P[1],I=Object(a.useTheme)({accent:"green",scale:1,theme:null!==C&&void 0!==C&&C.night?"dark":"light"}),D=Object(a.useTheme)({accent:"green",scale:1,theme:null!==C&&void 0!==C&&C.night?"dark":"light"});D.space=[0,10,12,20],I.space=[0,10,12,18],I.space.small="10px",I.buttons.menuitem=Object(r.a)(Object(r.a)({},I.buttons.menuitem),{},{height:"50px",paddingX:"20px",borderBottomWidth:0}),I.iconSizes={big:20,medium:18,small:18},I.fontSizes=Object(r.a)(Object(r.a)({},I.fontSizes),{},{subBody:"0.8rem",body:"0.9rem"}),I.radii=Object(r.a)(Object(r.a)({},I.radii),{},{small:5}),I.buttons.menuitem=Object(r.a)(Object(r.a)({},I.buttons.menuitem),{},{px:5,height:"45px"}),Object(c.d)({claims:{premium:v.premium},onPermissionDenied:function(){post(f.a.pro)}});var z=Object(c.e)({onUpdate:function(t){var n=t.editor;e.editorController.contentChange(n)},onSelectionUpdate:function(t){e.editorController.selectionChange(t.editor)},onOpenAttachmentPicker:function(t,n){return e.editorController.openFilePicker(n),!0},onDownloadAttachment:function(t,n){return e.editorController.downloadAttachment(n),!0},theme:D,element:E&&L.current||void 0,editable:!S.readonly,editorProps:{editable:function(){return!S.readonly}},content:null===(t=e.editorController)||void 0===t||null===(n=t.content)||void 0===n?void 0:n.current,isMobile:!0},[E,S.readonly,x]),N=Object(s.a)(z,(function(){y((function(e){return e+1})),N.setTitlePlaceholder("Note title")})),H=Object(l.useRef)(N);return globalThis.editorController=N,globalThis.editor=z,Object(l.useLayoutEffect)((function(){A(Object(r.a)({},v)),M(!0)}),[v]),Object(g.jsx)(g.Fragment,{children:Object(g.jsxs)("div",{style:{display:"flex",flex:1,flexDirection:"column",maxWidth:"100vw",marginBottom:"5px"},children:[Object(g.jsx)(p.a,{hasRedo:(null===z||void 0===z?void 0:z.can().redo())||!1,hasUndo:(null===z||void 0===z?void 0:z.can().undo())||!1,settings:v,noHeader:S.noHeader||!1}),Object(g.jsxs)("div",{onScroll:N.scroll,ref:R,style:{overflowY:"scroll",flexDirection:"column",height:"100%",flexGrow:1,flexShrink:1,display:"flex"},children:[S.noHeader?null:Object(g.jsxs)(g.Fragment,{children:[Object(g.jsx)(m.a,{}),Object(g.jsx)(h.a,{titlePlaceholder:N.titlePlaceholder,readonly:v.readonly,controller:H,title:N.title}),Object(g.jsx)(b.a,{container:R,editor:z})]}),Object(g.jsx)("div",{ref:L,style:{padding:12,paddingTop:0,color:null===C||void 0===C?void 0:C.pri,flex:1}}),Object(g.jsx)("div",{onDoubleClick:function(){var e,t,n=null===(e=globalThis.editor)||void 0===e?void 0:e.state.doc.content.size;n&&(null===(t=globalThis.editor)||void 0===t||t.chain().focus().insertContentAt(n-1,"",{updateSelection:!0}).run())},style:{flexShrink:0,height:150,width:"100%"}})]}),S.noToolbar||!E?null:Object(g.jsx)(c.b,{sx:{pl:"10px",pt:"5px",minHeight:45},theme:I,editor:z,location:"bottom",tools:Object(i.a)(v.tools)})]})})};t.a=function(){return Object(g.jsx)(c.a,{children:Object(g.jsx)(v,{})})}}).call(this,n(51))},139:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return c}));var i=n(9),r=n(1),o=n(95),a=n(23);function c(t,n){var c=Object(r.useState)(""),l=Object(i.a)(c,2),s=l[0],u=l[1],d=Object(r.useState)("Note title"),f=Object(i.a)(d,2),p=f[0],b=f[1],m=Object(r.useRef)(null),h=Object(r.useRef)({selectionChange:null,change:null}),g=Object(r.useCallback)((function(e){}),[]),v=Object(r.useCallback)((function(e){var t;e&&(g(e),h.current.change=Object(a.d)((function(){m.current=e.getHTML(),Object(a.c)(a.a.content,m.current)}),300,null===(t=h.current)||void 0===t?void 0:t.change))}),[g]),j=Object(r.useCallback)((function(e){}),[]),O=Object(r.useCallback)((function(t){if(console.log(t),"{"===(null===t||void 0===t?void 0:t.data[0])){var i=JSON.parse(t.data),r=i.type,c=i.value;switch(e.sessionId=i.sessionId,r){case"native:html":m.current=c,n();break;case"native:theme":o.a.getState().setColors(i.value);break;case"native:title":u(c);break;case"native:titleplaceholder":b(c)}Object(a.c)(r)}}),[n]);Object(r.useEffect)((function(){if(Object(a.b)()){var e=navigator.vendor.match(/apple/i),t=document;return e&&(t=window),t.addEventListener("message",O),function(){t.removeEventListener("message",O)}}}),[O]);var x=Object(r.useCallback)((function(e){Object(a.c)(a.a.filepicker,e)}),[]),y=Object(r.useCallback)((function(e){alert("downloadAttachment"+e.hash),Object(a.c)(a.a.download,e)}),[]);return{contentChange:v,selectionChange:g,titleChange:function(e){Object(a.c)(a.a.title,e)},scroll:j,title:s,setTitle:u,titlePlaceholder:p,setTitlePlaceholder:b,openFilePicker:x,downloadAttachment:y,content:m,onUpdate:function(){n()}}}}).call(this,n(51))},141:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return s}));var i=n(9),r=n(10),o=n(59),a=n(1),c=localStorage.getItem("editorSettings"),l={fullscreen:!1,deviceMode:"mobile",premium:!1,tools:Object(o.c)().default,noToolbar:e.noToolbar,noHeader:e.noHeader,readonly:e.readonly};e.settingsController={update:function(t){var n=t;JSON.stringify(n)!==JSON.stringify(e.settingsController.previous)&&(e.settingsController.set&&e.settingsController.set(n),t?localStorage.setItem("editorSettings",JSON.stringify(n)):localStorage.removeItem("editorSettings"),settingsController.previous=Object(r.a)({},n))},previous:c?JSON.parse(c):Object(r.a)({},l)};var s=function(){var t=Object(a.useState)(Object(r.a)({},e.settingsController.previous)),n=Object(i.a)(t,2),o=n[0],c=n[1];return e.settingsController.set=c,o}}).call(this,n(51))},142:function(e,t,n){"use strict";n.d(t,"a",(function(){return w}));var i=n(143),r=n.n(i),o=n(144),a=n.n(o),c=n(145),l=n.n(c),s=n(146),u=n.n(s),d=n(147),f=n.n(d),p=n(148),b=n.n(p),m=n(149),h=n.n(m),g=n(150),v=n.n(g),j=(n(1),n(151)),O=n(23),x=n(56),y=n.n(x),C=n(0),k=function(e){var t=e.onPress,n=e.children,i=e.style,r=e.preventDefault,o=void 0===r||r;return Object(C.jsx)("button",{className:y.a.btn_header,style:i,onMouseDown:function(e){o&&e.preventDefault(),t()},children:n})};function w(e){var t=e.noHeader,n=e.settings,i=e.hasUndo,o=e.hasRedo,c=Object(j.a)();return Object(C.jsx)("div",{style:{display:"flex",alignItems:"center",height:"".concat(t?c.top:50+c.top,"px"),backgroundColor:"var(--nn_bg)",position:"sticky",width:"100vw"},children:t?null:Object(C.jsxs)("div",{style:{display:"flex",width:"100%",justifyContent:"space-between",flexDirection:"row",paddingTop:c.top,height:50,alignItems:"center"},children:["mobile"===n.deviceMode||n.fullscreen?Object(C.jsx)(k,{onPress:function(){post(O.a.back)},preventDefault:!1,style:{borderWidth:0,borderRadius:100,color:"var(--nn_icon)",marginLeft:6,width:40,height:40,display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",position:"relative"},children:Object(C.jsx)(r.a,{size:27,style:{position:"absolute"},color:"var(--nn_pri)"})}):Object(C.jsx)("div",{}),Object(C.jsxs)("div",{style:{display:"flex",alignItems:"center",flexDirection:"row"},children:[Object(C.jsx)(k,{onPress:function(){var e;null===(e=editor)||void 0===e||e.commands.undo()},style:{borderWidth:0,borderRadius:100,color:"var(--nn_icon)",marginRight:10,width:39,height:39,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:Object(C.jsx)(f.a,{color:i?"var(--nn_pri)":"var(--nn_nav)",size:25,style:{position:"absolute"}})}),Object(C.jsx)(k,{onPress:function(){var e;null===(e=editor)||void 0===e||e.commands.redo()},style:{borderWidth:0,borderRadius:100,color:"var(--nn_icon)",marginRight:10,width:39,height:39,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:Object(C.jsx)(b.a,{color:o?"var(--nn_pri)":"var(--nn_nav)",size:25,style:{position:"absolute"}})}),!n.premium&&Object(C.jsx)(k,{onPress:function(){post(O.a.pro)},preventDefault:!1,style:{borderWidth:0,borderRadius:100,color:"var(--nn_icon)",marginRight:10,width:39,height:39,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:Object(C.jsx)(l.a,{size:25,style:{position:"absolute"},color:"orange"})}),Object(C.jsx)(k,{onPress:function(){var e;null===(e=editor)||void 0===e||e.commands.startSearch()},style:{borderWidth:0,borderRadius:100,color:"var(--nn_icon)",marginRight:10,width:39,height:39,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:Object(C.jsx)(v.a,{size:25,style:{position:"absolute"},color:"var(--nn_pri)"})}),Object(C.jsx)(k,{onPress:function(){post(O.a.monograph)},preventDefault:!1,style:{borderWidth:0,borderRadius:100,color:"var(--nn_icon)",marginRight:10,width:39,height:39,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:Object(C.jsx)(a.a,{size:25,style:{position:"absolute"},color:"var(--nn_pri)"})}),"mobile"===n.deviceMode||n.fullscreen?null:Object(C.jsx)(k,{onPress:function(){post(O.a.fullscreen)},preventDefault:!1,style:{borderWidth:0,borderRadius:100,color:"var(--nn_icon)",marginRight:10,width:39,height:39,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:Object(C.jsx)(h.a,{size:25,style:{position:"absolute"},color:"var(--nn_pri)"})}),Object(C.jsx)(k,{onPress:function(){post(O.a.properties)},preventDefault:!1,style:{borderWidth:0,borderRadius:100,color:"var(--nn_icon)",marginRight:12,width:39,height:39,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:Object(C.jsx)(u.a,{size:25,style:{position:"absolute"},color:"var(--nn_pri)"})})]})]})})}},151:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return c}));var i=n(9),r=n(1),o=localStorage.getItem("safeAreaInsets"),a=o?JSON.parse(o):{top:0,bottom:0,left:0,right:0};e.safeAreaController={update:function(e){safeAreaController.set&&safeAreaController.set(e),safeAreaController.previous=e,localStorage.setItem("safeAreaInsets",JSON.stringify(e))},reset:function(){safeAreaController.set&&safeAreaController.set(a)},previous:a};var c=function(){var t=Object(r.useState)(e.safeAreaController.previous),n=Object(i.a)(t,2),o=n[0],a=n[1];return e.safeAreaController.set=a,o}}).call(this,n(51))},152:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var i=n(9),r=n(1),o=n.n(r),a=n(0);function c(e){var t,n,c=e.editor,l=e.container,s=Object(r.useState)({date:"",saved:""}),u=Object(i.a)(s,2),d=u[0],f=u[1],p=Object(r.useState)(!1),b=Object(i.a)(p,2),m=b[0],h=b[1],g=Object(r.useRef)(0),v=Object(r.useRef)(0),j=(null===c||void 0===c||null===(t=c.storage)||void 0===t||null===(n=t.characterCount)||void 0===n?void 0:n.words())+" words",O=Object(r.useRef)({set:f});globalThis.statusBar=O;var x=o.a.useCallback((function(e){var t=e.target.scrollTop;Date.now()-v.current<300||(t>g.current?h(!1):h(!0),v.current=Date.now(),g.current=t)}),[]);Object(r.useEffect)((function(){var e=l.current;return null===e||void 0===e||e.addEventListener("scroll",x),function(){null===e||void 0===e||e.removeEventListener("scroll",x)}}),[x,l]);var y={marginTop:0,marginBottom:0,fontSize:"12px",color:"var(--nn_icon)",marginRight:8};return Object(a.jsxs)("div",{style:{flexDirection:"row",display:"flex",height:m?20:15,paddingRight:12,paddingLeft:12,position:m?"sticky":"relative",top:0,backgroundColor:"var(--nn_bg)",zIndex:1},children:[Object(a.jsx)("p",{style:y,children:j}),Object(a.jsx)("p",{style:y,children:d.date}),Object(a.jsx)("p",{style:y,children:d.saved})]})}},153:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return s}));var i=n(9),r=n(1),o=n(23),a=n(56),c=n.n(a),l=n(0);function s(){var t=Object(r.useState)([]),n=Object(i.a)(t,2),a=n[0],s=n[1],u=Object(r.useRef)({setTags:s});e.editorTags=u;var d=function(){var e,t;null!==(e=editor)&&void 0!==e&&e.isFocused&&(editor.commands.blur(),null===(t=editorTitle.current)||void 0===t||t.blur());post(o.a.newtag)};return Object(l.jsxs)("div",{style:{padding:"0px 12px",display:"flex",alignItems:"center",marginTop:10},children:[Object(l.jsxs)("button",{className:c.a.btn,onMouseUp:function(e){e.preventDefault(),d()},onMouseDown:function(e){return e.preventDefault()},onTouchEnd:function(e){e.preventDefault(),d()},style:{borderWidth:0,backgroundColor:"var(--nn_nav)",marginRight:5,borderRadius:100,padding:"0px 10px",fontFamily:"Open Sans",display:"flex",alignItems:"center",height:"30px"},children:[0===a.length?Object(l.jsx)("p",{style:{marginRight:4,fontSize:13,color:"var(--nn_icon)",userSelect:"none"},children:"Add a tag"}):null,Object(l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"20",height:"20",viewBox:"0 0 24 24",children:Object(l.jsx)("path",{fill:"var(--nn_accent)",d:"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"})})]}),a.map((function(e){return Object(l.jsxs)("button",{className:c.a.btn,style:{borderWidth:0,backgroundColor:"var(--nn_nav)",marginRight:5,borderRadius:100,padding:"0px 10px",height:"30px",fontFamily:"Open Sans",fontSize:13,color:"var(--nn_icon)"},onMouseUp:function(t){t.preventDefault(),post(o.a.tag,e.title)},onMouseDown:function(e){return e.preventDefault()},onTouchEnd:function(t){t.preventDefault(),post(o.a.tag,e.title)},children:["#",e.alias]})}))]})}}).call(this,n(51))},154:function(e,t,n){"use strict";(function(e){var i=n(1),r=n.n(i),o=n(56),a=n.n(o),c=n(0);function l(t){var n=t.controller,r=t.title,o=t.titlePlaceholder,l=t.readonly,s=Object(i.useRef)(null),u=Object(i.useRef)(!0);return e.editorTitle=s,Object(i.useEffect)((function(){s.current&&(u.current=!1,s.current.value=r,u.current=!0)}),[r]),Object(c.jsx)("input",{ref:s,className:a.a.titleBar,contentEditable:!l,disabled:l,style:{height:50,fontSize:27,width:"100%",boxSizing:"border-box",borderWidth:0,paddingRight:12,paddingLeft:12,fontWeight:600,fontFamily:"Open Sans",backgroundColor:"transparent",color:"var(--nn_heading)"},onChange:function(e){var t;u.current&&(null===(t=n.current)||void 0===t||t.titleChange(e.target.value))},placeholder:o})}t.a=r.a.memo(l,(function(e,t){return e.title===t.title&&(e.titlePlaceholder===t.titlePlaceholder&&e.readonly===t.readonly)}))}).call(this,n(51))},164:function(e,t,n){},165:function(e,t,n){},197:function(e,t,n){},198:function(e,t,n){},199:function(e,t,n){},200:function(e,t,n){},201:function(e,t,n){"use strict";n.r(t);var i=n(1),r=n.n(i),o=n(38),a=n.n(o),c=(n(164),n(165),n(126)),l=n(0);var s=function(){return Object(l.jsx)(c.a,{})},u=function(e){e&&e instanceof Function&&n.e(5).then(n.bind(null,210)).then((function(t){var n=t.getCLS,i=t.getFID,r=t.getFCP,o=t.getLCP,a=t.getTTFB;n(e),i(e),r(e),o(e),a(e)}))};n(197),n(198),n(199),n(200);a.a.render(Object(l.jsx)(r.a.StrictMode,{children:Object(l.jsx)(s,{})}),document.getElementById("root")),u()},23:function(e,t,n){"use strict";(function(e){n.d(t,"d",(function(){return i})),n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a}));var i=function(e,t,n){return n&&(clearTimeout(n),n=null),n=setTimeout(e,t)},r={selection:"editor-event:selection",content:"editor-event:content",title:"editor-event:title",scroll:"editor-event:scroll",history:"editor-event:history",newtag:"editor-event:newtag",tag:"editor-event:tag",filepicker:"editor-event:picker",download:"editor-event:download-attachment",logger:"native:logger",back:"editor-event:back",pro:"editor-event:pro",monograph:"editor-event:monograph",properties:"editor-event:properties",fullscreen:"editor-event:fullscreen"};function o(){return!!window.ReactNativeWebView}function a(t,n){o()?window.ReactNativeWebView.postMessage(JSON.stringify({type:r[t]||t,value:n,sessionId:e.sessionId})):console.log(t,n)}globalThis.logger=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return this.options.component?Object(R.jsx)(H,{children:Object(R.jsx)(this.options.component,Object.assign({},t,{editor:this.editor,getPos:this.getPos,node:this.node,forwardRef:n,updateAttributes:function(t,n){return e.updateAttributes(t,e.getPos(),null===n||void 0===n?void 0:n.addToHistory,null===n||void 0===n?void 0:n.preventUpdate)}}))}):null}},{key:"updateAttributes",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.editor.commands.command((function(o){var a=o.tr;return a.setNodeMarkup(t,void 0,Object.assign(Object.assign({},n.node.attrs),e)),a.setMeta("addToHistory",i),a.setMeta("preventUpdate",r),!0}))}},{key:"update",value:function(e,t,n){var i=this;return this.node.type===e.type&&(this.viewShouldUpdate(e)?(this.node=e,this.renderReactComponent((function(){return i.render(i.options.props,i.handleRef)})),!0):(this.node=e,!0))}},{key:"onDragStart",value:function(e){var t,n,i,r,o,a,c,l=this.editor.view,s=e.target,u=3===s.nodeType?null===(t=s.parentElement)||void 0===t?void 0:t.closest("[data-drag-handle]"):s.closest("[data-drag-handle]");if(this.dom&&!(null===(n=this.contentDOM)||void 0===n?void 0:n.contains(s))&&u){var d=this.dom.querySelector("[data-drag-image]")||this.dom,f=0,p=0;if(d!==u){var b=d.getBoundingClientRect(),m=u.getBoundingClientRect(),h=null!==(i=e.offsetX)&&void 0!==i?i:null===(r=e.nativeEvent)||void 0===r?void 0:r.offsetX,g=null!==(o=e.offsetY)&&void 0!==o?o:null===(a=e.nativeEvent)||void 0===a?void 0:a.offsetY;f=m.x-b.x+h,p=m.y-b.y+g}var v=T.NodeSelection.create(l.state.doc,this.getPos()),j=l.state.tr.setSelection(v);l.dispatch(j),null===(c=e.dataTransfer)||void 0===c||c.setDragImage(d,f,p),function(e,t){if(!e.dataTransfer)return;var n=t.view,i=n.state.selection.content(),r=Object(P.d)(n,i),o=r.dom,a=r.text;e.dataTransfer.clearData(),e.dataTransfer.setData("Text",a),e.dataTransfer.setData("text/plain",a),e.dataTransfer.setData("text/html",o.innerHTML),e.dataTransfer.effectAllowed="copyMove",n.dragging={slice:i,move:!0}}(e,this.editor)}}},{key:"stopEvent",value:function(e){var t,n=this;if(!this.dom)return!1;var i=e.target;if(!(this.dom.contains(i)&&!(null===(t=this.contentDOM)||void 0===t?void 0:t.contains(i))))return!1;var r="drop"===e.type;if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(i.tagName)||i.isContentEditable)&&!r)return!0;var o=this.editor.isEditable,a=this.isDragging,c=!!this.node.type.spec.draggable,l=T.NodeSelection.isSelectable(this.node),s="copy"===e.type,u="paste"===e.type,d="cut"===e.type,f="mousedown"===e.type,p=e.type.startsWith("drag");if(!c&&l&&p&&e.preventDefault(),c&&p&&!a)return e.preventDefault(),!1;if(c&&o&&!a&&f){var b=i.closest("[data-drag-handle]");b&&(this.dom===b||this.dom.contains(b))&&(this.isDragging=!0,document.addEventListener("dragend",(function(){n.isDragging=!1}),{once:!0}),document.addEventListener("mouseup",(function(){n.isDragging=!1}),{once:!0}))}return!(a||r||s||u||d||f&&l)}},{key:"ignoreMutation",value:function(e){if(!this.dom||!this.contentDOM)return!0;if(this.node.isLeaf||this.node.isAtom)return!0;if("selection"===e.type)return!1;if(this.dom.contains(e.target)&&"childList"===e.type&&this.editor.isFocused&&[].concat(Object(S.a)(Array.from(e.addedNodes)),Object(S.a)(Array.from(e.removedNodes))).every((function(e){return e.isContentEditable})))return!1;return this.contentDOM===e.target&&"attributes"===e.type||!this.contentDOM.contains(e.target)}},{key:"viewShouldUpdate",value:function(e){return!this.options.shouldUpdate||this.options.shouldUpdate(this.node,e)}},{key:"setDomAttrs",value:function(e,t){Object.keys(e.attrs||{}).forEach((function(n){t.setAttribute(n,e.attrs[n])}))}},{key:"dom",get:function(){return this.domRef}},{key:"destroy",value:function(){this.domRef&&this.portalProviderAPI&&(this.portalProviderAPI.remove(this.domRef),this.domRef=void 0,this.contentDOM=void 0)}}]),e}();function F(e,t){return function(n){var i=n.node,r=n.getPos,o=n.editor;return new B(i,o,(function(){return"boolean"===typeof r?-1:r()}),Object.assign(Object.assign({},t),{component:e})).init()}}var _=n(33),V=n(15),W=n(16),U=n(1),q=n.n(U),$=n(38),J=n.n($);var G=function(e){Object(V.a)(n,e);var t=Object(W.a)(n);function n(){var e;return Object(A.a)(this,n),(e=t.call(this)).portals=new Map,e.setContext=function(t){e.context=t},e}return Object(L.a)(n,[{key:"render",value:function(e,t){this.portals.set(t,{children:e});var n=e();Object($.unstable_renderSubtreeIntoContainer)(this.context,n,t)}},{key:"forceUpdate",value:function(){}},{key:"remove",value:function(e){this.portals.delete(e);try{Object($.unmountComponentAtNode)(e)}catch(t){}}}]),n}(function(){function e(){Object(A.a)(this,e),this.listeners={}}return Object(L.a)(e,[{key:"on",value:function(e,t){this.listeners[e]||(this.listeners[e]=new Set),this.listeners[e].add(t)}},{key:"off",value:function(e,t){this.listeners[e]&&this.listeners[e].has(t)&&this.listeners[e].delete(t)}},{key:"emit",value:function(e,t){this.listeners[e]&&this.listeners[e].forEach((function(e){return e(t)}))}},{key:"destroy",value:function(){this.listeners={}}}]),e}()),X=q.a.createContext(void 0);function K(){return Object(U.useContext)(X)}var Q=function(e){Object(V.a)(n,e);var t=Object(W.a)(n);function n(e){var i;return Object(A.a)(this,n),(i=t.call(this,e)).portalProviderAPI=new G,i}return Object(L.a)(n,[{key:"render",value:function(){return Object(R.jsxs)(X.Provider,Object.assign({value:this.portalProviderAPI},{children:[this.props.children,Object(R.jsx)(Y,{portalProviderAPI:this.portalProviderAPI})]}))}},{key:"componentDidUpdate",value:function(){this.portalProviderAPI.forceUpdate()}}]),n}(q.a.Component);Q.displayName="PortalProvider";var Y=function(e){Object(V.a)(n,e);var t=Object(W.a)(n);function n(e){var i;return Object(A.a)(this,n),(i=t.call(this,e)).handleUpdate=function(e){return i.setState({portals:e})},e.portalProviderAPI.setContext(Object(_.a)(i)),e.portalProviderAPI.on("update",i.handleUpdate),i.state={portals:new Map},i}return Object(L.a)(n,[{key:"render",value:function(){var e=this.state.portals;return Object(R.jsx)(R.Fragment,{children:Array.from(e.entries()).map((function(e){var t=Object(C.a)(e,2),n=t[0],i=t[1];return Object($.createPortal)(i,n)}))})}}]),n}(q.a.Component),Z=n(25),ee=n(19),te=function(){function e(){Object(A.a)(this,e),this.changeHandlers=[],this.changeHandlers=[]}return Object(L.a)(e,[{key:"subscribe",value:function(e){this.changeHandlers.push(e)}},{key:"unsubscribe",value:function(e){this.changeHandlers=this.changeHandlers.filter((function(t){return t!==e}))}},{key:"notifyNewSelection",value:function(e,t){this.changeHandlers.forEach((function(n){return n(e,t)}))}}]),e}(),ne=new T.PluginKey("reactNodeView"),ie=new T.Plugin({state:{init:function(){return new te},apply:function(e,t){return t}},key:ne,view:function(e){var t=ne.getState(e.state);return{update:function(e){var n=e.state.selection,i=n.from,r=n.to;t.notifyNewSelection(i,r)}}}}),re=u.b.create({name:"node-view-selection-notifier",addProseMirrorPlugins:function(){return[ie]}}),oe=function(e){Object(V.a)(n,e);var t=Object(W.a)(n);function n(e,i,r,o){var a;return Object(A.a)(this,n),(a=t.call(this,e,i,r,o)).pos=-1,a.isNodeInsideSelection=function(e,t,n,i){var r=a.getPositionsWithDefault(n,i);return n=r.pos,i=r.posEnd,"number"===typeof n&&"number"===typeof i&&(e<=n&&t>=i)},a.isSelectionInsideNode=function(e,t,n,i){var r=a.getPositionsWithDefault(n,i);return n=r.pos,i=r.posEnd,"number"===typeof n&&"number"===typeof i&&(n0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(!this.options.component)return null;var i=this.editor.isEditable&&(this.insideSelection()||this.nodeInsideSelection());return Object(R.jsx)(H,{children:Object(R.jsx)(this.options.component,Object.assign({},t,{editor:this.editor,getPos:this.getPos,node:this.node,forwardRef:n,selected:i,updateAttributes:function(t,n){return e.updateAttributes(t,e.pos,null===n||void 0===n?void 0:n.addToHistory,null===n||void 0===n?void 0:n.preventUpdate)}}))})}},{key:"updatePos",value:function(){"boolean"!==typeof this.getPos&&(this.pos=this.getPos(),this.posEnd=this.pos+this.node.nodeSize)}},{key:"getPositionsWithDefault",value:function(e,t){return{pos:"number"!==typeof e?this.pos:e,posEnd:"number"!==typeof t?this.posEnd:t}}},{key:"viewShouldUpdate",value:function(e){if(Object(Z.a)(Object(ee.a)(n.prototype),"viewShouldUpdate",this).call(this,e))return!0;var t=this.editor.view.state.selection,i=this.oldSelection;this.oldSelection=t;var r=this.pos,o=this.posEnd;this.updatePos();var a=t.from,c=t.to,l=i.from,s=i.to;if(this.node.type.spec.selectable){var u=t instanceof T.NodeSelection&&t.from===this.pos,d=i instanceof T.NodeSelection&&i.from===this.pos;if(u&&!d||d&&!u)return!0}var f=this.isNodeInsideSelection(a,c)&&!this.isNodeInsideSelection(l,s),p=!this.isNodeInsideSelection(a,c)&&this.isNodeInsideSelection(l,s),b=this.isNodeInsideSelection(a,c,r,o)&&!this.isNodeInsideSelection(a,c);return!!(f||p||b)}},{key:"destroy",value:function(){this.selectionChangeState.unsubscribe(this.onSelectionChange),Object(Z.a)(Object(ee.a)(n.prototype),"destroy",this).call(this)}}]),n}(B);function ae(e,t){return function(n){var i=n.node,r=n.getPos,o=n.editor;return new oe(i,o,(function(){return"boolean"===typeof r?-1:r()}),Object.assign(Object.assign({},t),{component:e})).init()}}var ce=n(6),le=n(130),se=n.n(le),ue=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r=500)null===o||void 0===o||o();else{var n=30*b.current.offsetHeight/100;m.get()>=n?v():g.start({transition:Le,y:0})}},dragConstraints:{top:0,bottom:0},dragMomentum:!1,dragElastic:!1,sx:{bg:"transparent",alignItems:"center",justifyContent:"center",p:2}},{children:Object(R.jsx)(ce.a,{id:"pill",sx:{backgroundColor:"hover",width:60,height:8,borderRadius:100}})})),Object(R.jsx)(Te,Object.assign({items:r,title:i,onClose:o},{children:f}))]}))})):null}function Te(e){var t,n=e.title,i=e.items,r=e.onClose,o=e.children,a=function(e){var t=Object(U.useState)(e),n=Object(C.a)(t,2),i=n[0],r=n[1],o=Object(U.useState)(!1),a=Object(C.a)(o,2),c=a[0],l=a[1],s=Object(U.useRef)([e]);return{current:i,goBack:Object(U.useCallback)((function(){if(c){var e=s.current.pop();r(e),s.current.length<=1&&l(!1)}}),[c]),navigate:Object(U.useCallback)((function(e){console.log("NAVI",e),r((function(t){return t&&s.current.push(t),e})),l(!0)}),[]),canGoBack:c}}({title:n,items:i}),c=a.current,l=a.goBack,s=a.canGoBack,u=a.navigate;return Object(R.jsxs)(ce.c,Object.assign({sx:{flexDirection:"column"}},{children:[s||(null===c||void 0===c?void 0:c.title)?Object(R.jsxs)(ce.c,Object.assign({id:"header",sx:{alignItems:"center",mx:0,mb:1}},{children:[s&&Object(R.jsx)(ce.b,Object.assign({variant:"icon",sx:{p:1,ml:1},onClick:l},{children:Object(R.jsx)(fe,{path:be.arrowLeft,size:"big"})})),(null===c||void 0===c?void 0:c.title)&&Object(R.jsx)(ce.e,Object.assign({variant:"title",sx:{ml:1,fontSize:"title"}},{children:null===c||void 0===c?void 0:c.title}))]})):null,o||(null===(t=null===c||void 0===c?void 0:c.items)||void 0===t?void 0:t.map((function(e){if(e.isHidden)return null;switch(e.type){case"separator":return Object(R.jsx)(Oe,{},e.key);case"button":return Object(R.jsx)(je,{item:e,onClick:function(t){e.menu?u(e.menu):e.onClick&&(null===r||void 0===r||r(),setTimeout((function(){var t;null===(t=e.onClick)||void 0===t||t.call(e)}),300))}},e.key);case"popup":return Object(R.jsx)(q.a.Fragment,{children:Object(R.jsx)(e.component,{onClick:r})},e.key)}})))]}))}var Pe={x:0,y:0,actualX:0,actualY:0};function Ee(e,t){var n=t||{},i=n.target,r=void 0===i?"mouse":i,o=n.isTargetAbsolute,a=void 0!==o&&o,c=n.location,l=void 0===c?void 0:c,s=n.yOffset,u=void 0===s?0:s,d=n.xOffset,f=void 0===d?0:d,p=n.align,b=void 0===p?"start":p,m=n.parent,h=void 0===m?document.body:m,g=n.yAnchor,v="mouse"===r?Pe:Me(r,a),j=v.x,O=v.y,x=v.width,y=v.height,C=v.actualX,k=v.actualY,w=e.offsetWidth,S=e.offsetHeight,A=h.clientWidth,L=h.clientHeight,R={top:0,left:0};if(A-CL?L-S:O,y&&("below"===l?R.top+=y:"top"===l&&(R.top=O-S)),x&&"mouse"!==r&&"center"===b&&w>0?R.left-=(w-x)/2:x&&"mouse"!==r&&"end"===b&&w>0&&(R.left-=w-x),S>L-R.top&&(e.style.maxHeight="".concat(L-20,"px")),g){var P=Me(g,a);R.top=P.y-S}return R.top=a&&R.top<0?0:R.top,R.left=a&&R.left<0?0:R.left,R.top+="below"===l?u:-u,R.left+=f,R}function Me(e,t){var n=e.getBoundingClientRect(),i={x:e.offsetLeft,y:e.offsetTop,width:n.width,height:n.height,actualY:n.y,actualX:n.x};return t&&(i.x=i.actualX,i.y=i.actualY),i}function Ie(e,t,n){var i=Object(U.useState)(-1),r=Object(C.a)(i,2),o=r[0],a=r[1],c=Object(U.useState)(!1),l=Object(C.a)(c,2),s=l[0],u=l[1],d=Object(U.useCallback)((function(t){var n=e[t];if(n){var i=document.getElementById(n.key);i&&i.scrollIntoView({behavior:"auto"})}}),[e]),f=Object(U.useCallback)((function(i){var r=function(t){return e[t]},o=function(t){var n,i;return e&&("separator"===(null===(n=e[t])||void 0===n?void 0:n.type)||(null===(i=r(t))||void 0===i?void 0:i.isDisabled))},c=function(t){return t0?--t:e.length-1},f=function(t){return e&&r(t).menu};a((function(e){var r=e;switch(i.key){case"ArrowUp":if(s)break;for(r=l(e);o(r);)r=l(r);break;case"ArrowDown":if(s)break;for(r=c(e);o(r);)r=c(r);break;case"ArrowRight":f(e)&&u(!0);break;case"ArrowLeft":!function(e){f(e)&&u(!1)}(e);break;case"Enter":t&&t(i);break;case"Escape":n&&n(i)}return r!==e&&d(r),r}))}),[e,s,d,t]);return Object(U.useEffect)((function(){return window.addEventListener("keydown",f),function(){window.removeEventListener("keydown",f)}}),[f]),{focusIndex:o,setFocusIndex:a,isSubmenuOpen:s,setIsSubmenuOpen:u}}function De(){return document.querySelector(".editor-toolbar")||void 0}function ze(){return document.getElementById("popup-container")||void 0}window.addEventListener("mousemove",(function(e){var t=function(e){var t=0,n=0;!e&&window.event&&(e=window.event);e.pageX||e.pageY?(t=e.pageX,n=e.pageY):(e.clientX||e.clientY)&&(t=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,n=e.clientY+document.body.scrollTop+document.documentElement.scrollTop);return{x:t,y:n,actualY:n,actualX:t}}(e),n=t.x,i=t.y,r=t.actualX,o=t.actualY;Pe.x=n,Pe.y=i,Pe.actualX=r,Pe.actualY=o}));var Ne=q.a.createContext(null),He=q.a.createContext(null),Be=function(e){Object(V.a)(n,e);var t=Object(W.a)(n);function n(){var e;return Object(A.a)(this,n),(e=t.apply(this,arguments)).popupContainer=null,e.state={popups:[]},e.openPopup=function(t,n){n&&e.setState((function(e){return{popups:[].concat(Object(S.a)(e.popups),[{id:t,popup:n}])}}))},e.closePopup=function(t){e.setState((function(e){var n=e.popups.findIndex((function(e){return e.id===t}));if(n<=-1)return e;var i=e.popups.slice();return i.splice(n,1),{popups:i}}))},e}return Object(L.a)(n,[{key:"render",value:function(){return Object(R.jsxs)(Ne.Provider,Object.assign({value:this},{children:[this.props.children,Object(R.jsxs)(He.Provider,Object.assign({value:this.props.editor},{children:[this.state.popups.map((function(e){var t=e.id,n=e.popup;return Object(R.jsx)(n,{id:t},t)})),Object(R.jsx)("div",{id:"popup-container"})]}))]}))}}]),n}(q.a.Component);var Fe=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r0){var a=document.body.clientHeight-20;o+r>a&&(e.style.top=a-r+"px")}t=r}})),d.current.observe(e,{box:"border-box"})}}),[s]);return Object(R.jsx)(ye.a,Object.assign({contentRef:function(e){return u.current=e},className:"popup-presenter",role:"menu",isOpen:t,appElement:document.body,shouldCloseOnEsc:!0,shouldReturnFocusAfterClose:!0,shouldCloseOnOverlayClick:!0,shouldFocusAfterRender:c,ariaHideApp:o,preventScroll:o,onRequestClose:i,portalClassName:"popup-presenter-portal",onAfterOpen:function(e){e&&n&&(f(),b(),p())},onAfterClose:function(){var e;return null===(e=d.current)||void 0===e?void 0:e.disconnect()},overlayElement:function(e,t){return Object(R.jsx)(ce.a,Object.assign({},e,{style:Object.assign(Object.assign({},e.style),{position:o?"fixed":"initial",zIndex:1e3,backgroundColor:o?"unset":"transparent"})},{children:t}))},contentElement:function(e,t){return Object(R.jsx)(ce.a,Object.assign({},e,{style:{},sx:{top:0,left:0,right:0,bottom:0,display:"flex",width:"fit-content",height:"fit-content",position:"fixed",backgroundColor:void 0,padding:0,zIndex:0,outline:0,isolation:"isolate"}},{children:t}))},style:{content:{},overlay:{zIndex:999,background:"transparent"}}},{children:l}))}function Ve(e){return e.isOpen?Object(R.jsx)(_e,Object.assign({},e)):null}function We(e){var t=e.id,n=(e.group,e.position),i=e.renderPopup,r=(e.isOpen,e.onClosed,e.autoCloseOnUnmount),o=Fe(e,["id","group","position","renderPopup","isOpen","onClosed","autoCloseOnUnmount"]),a=Object(U.useContext)(Ne),c=Ue(e),l=c.closePopup,s=c.isPopupOpen;return Object(U.useEffect)((function(){if(r)return function(){null===a||void 0===a||a.closePopup(t)}}),[r,t,a]),Object(U.useEffect)((function(){a&&s&&a.openPopup(t,(function(e){var t=e.id,r=I((function(e){return!!e.openedPopups[t]}));return Object(U.useEffect)((function(){r||a.closePopup(t)}),[r]),Object(R.jsx)(Ve,Object.assign({isOpen:r,onClose:function(){return l(t)},position:n,blocking:!0,focusOnRender:!0},o,{children:Object(R.jsx)(ce.a,Object.assign({sx:{boxShadow:"menu",borderRadius:"default",overflow:"hidden"}},{children:Object(R.jsx)(He.Consumer,{children:function(){return i((function(){return a.closePopup(t)}))}})}))}),t)}))}),[a,s]),null}function Ue(e){var t=e.group,n=e.isOpen,i=e.id,r=e.onClosed,o=I((function(e){return!!e.openedPopups[i]})),a=I((function(e){return e.openPopup})),c=I((function(e){return e.closePopup})),l=I((function(e){return e.closePopupGroup}));return I((function(e){return"bottom"===e.toolbarLocation}))&&(t="popup"),Object(U.useEffect)((function(){n?a({id:i,group:t}):c(i)}),[n,i,t,a,c]),Object(U.useEffect)((function(){o||null===r||void 0===r||r()}),[o]),Object(U.useEffect)((function(){o&&l(t,[i])}),[r,o,l,i,t]),Object(U.useEffect)((function(){n||c(i)}),[n,i,t,c]),{isPopupOpen:o,closePopup:c}}function qe(e){var t=e.popup,n=Fe(e,["popup"]);function i(){J.a.unmountComponentAtNode(ze())}return J.a.render(Object(R.jsx)(H,{children:Object(R.jsx)(et,Object.assign({isOpen:!0,position:{target:De(),isTargetAbsolute:!0,location:"below",align:"end",yOffset:10},blocking:!0,focusOnRender:!0},n,{onClose:function(){var e;i(),null===(e=n.onClose)||void 0===e||e.call(n)}},{children:t(i)}))}),ze()),i}var $e=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r=n.map.length)break;var c=n.map[a],l=i.nodeAt(c);l&&(r.push({cell:l,pos:c}),o+=l.attrs.rowspan)}return r}function ln(e,t,n,i){return un(e,t,sn(t,n),sn(t,i))}function sn(e,t){for(var n=e.map,i=e.table,r=[],o=0,a=t*n.width;o=n.map.length);o++,a++){var c=n.map[a],l=i.nodeAt(c);l&&(r.push({cell:l,pos:c}),o+=l.attrs.colspan-1)}return r}function un(e,t,n,i){if(n.length===i.length){for(var r=e.mapping.maps.length,o=0;o1&&void 0!==arguments[1]?arguments[1]:1;if(0===e)return"0B";var n=1024,i=t<0?0:t,r=["B","K","M","G","T","P","E","Z","Y"],o=Math.floor(Math.log(e)/Math.log(n));return parseFloat((e/Math.pow(n,o)).toFixed(i))+r[o]}var oi=u.d.create({name:"attachment",content:"inline*",marks:"",inline:!0,atom:!0,addOptions:function(){return{HTMLAttributes:{},onDownloadAttachment:function(){return!1},onOpenAttachmentPicker:function(){return!1}}},group:function(){return"inline"},draggable:!0,addAttributes:function(){return{progress:{default:0,rendered:!1},hash:ai("hash"),filename:ai("filename"),type:ai("mime"),size:ai("size")}},parseHTML:function(){return[{tag:"span[data-hash]"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["span",Object(u.s)(this.options.HTMLAttributes,t)]},addNodeView:function(){return ae(ii,{shouldUpdate:function(e,t){var n=e.attrs,i=t.attrs;return n.progress!==i.progress}})},addCommands:function(){var e=this;return{insertAttachment:function(t){return function(n){return n.commands.insertContent({type:e.name,attrs:t})}},removeAttachment:function(){return function(e){var t=e.commands;e.tr;return t.deleteSelection()}},downloadAttachment:function(t){return function(n){var i=n.editor;return e.options.onDownloadAttachment(i,t)}},openAttachmentPicker:function(t){return function(n){var i=n.editor;return e.options.onOpenAttachmentPicker(i,t)}},setAttachmentProgress:function(t){return function(n){var i,r=n.state,o=n.tr,a=n.dispatch,c=t.hash,l=t.progress,s=(t.type,Object(u.g)(r.doc,(function(t){return(t.type.name===e.name||"image"===t.type.name)&&t.attrs.hash===c}))),d=Object(k.a)(s);try{for(d.s();!(i=d.n()).done;){var f=i.value;o.setNodeMarkup(f.pos,f.node.type,Object.assign(Object.assign({},f.node.attrs),{progress:100===l?null:l}))}}catch(p){d.e(p)}finally{d.f()}return o.setMeta("preventUpdate",!0),o.setMeta("addToHistory",!1),a&&a(o),!0}}}}});function ai(e,t){return{default:t,parseHTML:function(t){return t.dataset[e]},renderHTML:function(t){return t[e]?Object(w.a)({},"data-".concat(e),t[e]):{}}}}var ci=n(158);var li={a:function(e){var t=e.editor,n=e.selectedNode,i=n.node;return!(null===i||void 0===i?void 0:i.isText)||i.marks.length<=0||!i.marks.some((function(e){return"link"===e.type.name}))?null:Object(R.jsx)(ni,{force:!0,tools:["openLink","editLink","removeLink"],editor:t,selectedNode:n,sx:{bg:"background",boxShadow:"menu",borderRadius:"default",p:1}})}},si=Object.assign({},li);function ui(e){var t=e.editor,n=Object(U.useRef)(),i=Object(U.useRef)();return Object(U.useEffect)((function(){function e(e){if(e.target&&e.target instanceof HTMLElement&&!e.target.classList.contains("ProseMirror")){var r=e.target;if(i.current){var o=!r.closest(".ProseMirror"),a=r.closest(".popup-presenter-portal"),c=i.current.element===r;if(a)return;if(o||!c)return console.log("HIDING",o,c,r),i.current.hide(),void(i.current=void 0)}clearTimeout(n.current),n.current=setTimeout((function(){var e=r.nodeName.toLowerCase(),n=si[e];if(n&&t.current){var o=t.current.view.posAtDOM(r,0),a=t.current.view.state.doc.nodeAt(o);if(a){var c=qe({popup:function(){return Object(R.jsx)(n,{editor:t,selectedNode:{node:a,from:o,to:o+a.nodeSize}})},blocking:!1,focusOnRender:!1,position:{target:r,align:"center",location:"top",isTargetAbsolute:!0}});i.current={element:r,hide:c}}}}),500,{})}}return window.addEventListener("mouseover",e),function(){window.removeEventListener("mouseover",e)}}),[]),null}function di(e){var t=e.editor,n=t.storage.searchreplace,i=n.selectedText,r=n.results,o=Object(U.useState)(!1),a=Object(C.a)(o,2),c=a[0],l=a[1],s=Object(U.useState)(!1),u=Object(C.a)(s,2),d=u[0],f=u[1],p=Object(U.useState)(!1),b=Object(C.a)(p,2),m=b[0],h=b[1],g=Object(U.useState)(!1),v=Object(C.a)(g,2),j=v[0],O=v[1],x=Object(U.useState)(!1),y=Object(C.a)(x,2),k=y[0],w=y[1],S=Object(U.useRef)(""),A=Object(U.useRef)(),L=Object(U.useCallback)((function(e){t.commands.search(e,{matchCase:m,enableRegex:k,matchWholeWord:j})}),[m,k,j]);return Object(U.useEffect)((function(){A.current&&L(A.current.value)}),[L,m,j,k]),Object(U.useEffect)((function(){if(i){if(A.current){var e=A.current;setTimeout((function(){e.value=i,e.focus()}),0)}L(i)}}),[i,L]),Object(R.jsx)(ce.c,Object.assign({sx:{p:1,bg:"background",flexDirection:"column",boxShadow:["none","menu"],borderRadius:[0,"default"]}},{children:Object(R.jsxs)(ce.c,{children:[Object(R.jsxs)(ce.c,Object.assign({sx:{flexDirection:"column",flex:1,width:["auto",300],mr:1}},{children:[Object(R.jsxs)(ce.c,Object.assign({sx:{flex:1,position:"relative",alignItems:"center",outline:"1px solid var(--border)",borderRadius:"default",p:1,py:0,":focus-within":{outlineColor:"primary",outlineWidth:"1.8px"},":hover":{outlineColor:"primary"}}},{children:[Object(R.jsx)(nt.b,{variant:"clean",defaultValue:i,ref:A,autoFocus:!0,placeholder:"Find",sx:{p:0},onChange:function(e){L(e.target.value)}}),Object(R.jsxs)(ce.c,Object.assign({sx:{flexShrink:0,mr:0,alignItems:"center"}},{children:[Object(R.jsx)(ve,{sx:{mr:0},toggled:d,title:"Expand",id:"expand",icon:d?"chevronRight":"chevronLeft",onClick:function(){return f((function(e){return!e}))},iconSize:"medium"}),d&&Object(R.jsxs)(R.Fragment,{children:[Object(R.jsx)(ve,{sx:{mr:0},toggled:m,title:"Match case",id:"matchCase",icon:"caseSensitive",onClick:function(){return h((function(e){return!e}))},iconSize:"medium"}),Object(R.jsx)(ve,{sx:{mr:0},toggled:j,title:"Match whole word",id:"matchWholeWord",icon:"wholeWord",onClick:function(){return O((function(e){return!e}))},iconSize:"medium"}),Object(R.jsx)(ve,{sx:{mr:0},toggled:k,title:"Enable regex",id:"enableRegex",icon:"regex",onClick:function(){return w((function(e){return!e}))},iconSize:"medium"})]}),Object(R.jsxs)(ce.e,Object.assign({variant:"subBody",sx:{flexShrink:0,borderLeft:"1px solid var(--border)",color:"fontTertiary",px:1}},{children:[r?"".concat(r.length):"0",d?"":" results"]}))]}))]})),c&&Object(R.jsx)(nt.b,{sx:{mt:1,p:"7px"},placeholder:"Replace",onChange:function(e){return S.current=e.target.value}})]})),Object(R.jsxs)(ce.c,Object.assign({sx:{flexDirection:"column"}},{children:[Object(R.jsxs)(ce.c,Object.assign({sx:{alignItems:"center",height:"33.2px"}},{children:[Object(R.jsx)(ve,{toggled:c,title:"Toggle replace",id:"toggleReplace",icon:"replace",onClick:function(){return l((function(e){return!e}))},sx:{mr:0},iconSize:"big"}),Object(R.jsx)(ve,{toggled:!1,title:"Previous match",id:"previousMatch",icon:"previousMatch",onClick:function(){return t.commands.moveToPreviousResult()},sx:{mr:0},iconSize:"big"}),Object(R.jsx)(ve,{toggled:!1,title:"Next match",id:"nextMatch",icon:"nextMatch",onClick:function(){return t.commands.moveToNextResult()},sx:{mr:0},iconSize:"big"}),Object(R.jsx)(ve,{toggled:!1,title:"Close",id:"close",icon:"close",onClick:function(){return t.chain().focus().endSearch().run()},sx:{mr:0},iconSize:"big"})]})),c&&Object(R.jsxs)(ce.c,Object.assign({sx:{alignItems:"center",height:"33.2px",mt:1}},{children:[Object(R.jsx)(ve,{toggled:!1,title:"Replace",id:"replace",icon:"replaceOne",onClick:function(){return t.commands.replace(S.current)},sx:{mr:0},iconSize:18}),Object(R.jsx)(ve,{toggled:!1,title:"Replace all",id:"replaceAll",icon:"replaceAll",onClick:function(){return t.commands.replaceAll(S.current)},sx:{mr:0},iconSize:18})]}))]}))]})}))}function fi(e){var t=e.editor,n=t.storage.searchreplace.isSearching;return Object(R.jsx)(et,Object.assign({mobile:"sheet",desktop:"menu",isOpen:n,onClose:function(){return t.commands.endSearch()},position:{target:De(),isTargetAbsolute:!0,location:"below",align:"end",yOffset:5},blocking:!1,focusOnRender:!1,draggable:!1},{children:Object(R.jsx)(di,{editor:t})}))}function pi(e){return Object(R.jsxs)(R.Fragment,{children:[Object(R.jsx)(fi,Object.assign({},e)),Object(R.jsx)(Ye,{children:Object(R.jsx)(ui,Object.assign({},e))})]})}var bi=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r1)||(0===t.parentOffset||0===t.index(t.depth-1))}(e.state)||!e.can().liftListItem(n))return!1;var a=function(e,t){var n=Object(Kn.findParentNodeOfType)(e)(t.selection);return!!n&&!n.node.textContent.length}(n,e.state);if(a){if(ki(n,e.state)){var c=wi(n,e.state);return!!c&&e.commands.deleteNode(c.type)}return e.commands.deleteNode(n)}return ki(n,e.state)?e.commands.liftListItem(n):e.chain().joinBackward().joinBackward().run()}var ki=function(e,t){var n=Object(Kn.findParentNodeOfType)(e)(t.selection);if(!n)return!1;var i=n.pos,r=t.doc.resolve(i);return console.log("isFirstOfType",r),!r.nodeBefore},wi=function(e,t){var n,i=Object(Kn.findParentNodeOfType)(e)(t.selection);if(i){var r=i.pos,o=t.doc.resolve(r);if(o.parent.type.spec.group&&!((null===(n=o.parent.type.spec.group)||void 0===n?void 0:n.indexOf("list"))<=-1))return o.parent}};function Si(e){var t=e.editor,n=e.updateAttributes,i=(e.node,e.getPos),r=e.forwardRef,o=e.node.attrs.checked,a=z(),c=Object(U.useCallback)((function(){var e;if(!t.isEditable)return!1;n({checked:!o});var r=i(),a=null===(e=t.current)||void 0===e?void 0:e.state.doc.nodeAt(r);return!!a&&(t.commands.command((function(e){var t=e.tr;return function(e,t,n,i){var r,o=Object(u.g)(e,(function(e){return e.type.name===Ai.name})),a=Object(k.a)(o);try{for(a.s();!(r=a.n()).done;){var c=r.value.pos+i+1;t.setNodeMarkup(c,void 0,{checked:n})}}catch(l){a.e(l)}finally{a.f()}}(a,t,!o,r),!0})),!0)}),[t,i,o]);return Object(R.jsx)(R.Fragment,{children:Object(R.jsxs)(ce.c,Object.assign({"data-drag-image":!0,sx:{bg:"background",borderRadius:"default",":hover > .dragHandle":{opacity:t.isEditable?1:0}}},{children:[Object(R.jsx)(fe,{className:"dragHandle",draggable:"true","data-drag-handle":!0,path:be.dragHandle,sx:{opacity:[1,1,0],alignSelf:"start",mr:2,bg:"transparent",cursor:"grab",".icon:hover path":{fill:"var(--checked) !important"}},size:a?24:20}),Object(R.jsx)(fe,{path:o?be.check:"",stroke:"1px",sx:{border:"2px solid",borderColor:o?"checked":"icon",borderRadius:"default",alignSelf:"start",mr:2,p:"1px",cursor:t.isEditable?"pointer":"unset",":hover":{borderColor:"checked"},":hover .icon path":{fill:"var(--checked) !important"}},onMouseDown:function(e){e.preventDefault(),c()},onTouchEnd:function(e){e.preventDefault(),c()},color:o?"checked":"icon",size:a?16:14}),Object(R.jsx)(ce.e,{as:"div",ref:r,sx:{"> .taskitem-content-wrapper > p":{textDecorationLine:o?"line-through":"none",opacity:o?.8:1},flex:1}})]}))})}var Ai=n(135).a.extend({draggable:!0,addAttributes:function(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:function(e){return e.classList.contains("checked")},renderHTML:function(e){return{class:e.checked?"checked":""}}}}},renderHTML:function(e){e.node;var t=e.HTMLAttributes;return["li",Object(u.s)(this.options.HTMLAttributes,t,{class:"checklist--item"}),0]},parseHTML:function(){return[{tag:"li",getAttrs:function(e){var t;return e instanceof Node&&e instanceof HTMLElement&&(!(!e.classList.contains("checklist--item")&&!(null===(t=e.parentElement)||void 0===t?void 0:t.classList.contains("checklist")))&&null)},priority:51}]},addKeyboardShortcuts:function(){var e,t=this;return Object.assign(Object.assign({},null===(e=this.parent)||void 0===e?void 0:e.call(this)),{Backspace:function(e){return Ci(e.editor,t.name,t.type)}})},addNodeView:function(){return F(Si,{contentDOMFactory:!0,wrapperFactory:function(){return document.createElement("li")},shouldUpdate:function(e,t){var n=e.attrs,i=t.attrs;return n.checked!==i.checked||n.collapsed!==i.collapsed}})}});function Li(e){var t=z(),n=e.editor,i=e.getPos,r=e.node,o=e.updateAttributes,a=e.forwardRef,c=Object(u.p)(Ai.name,n.schema),l=r.attrs,s=l.title,d=l.collapsed,f=Object(U.useState)({checked:0,total:0,percentage:0}),p=Object(C.a)(f,2),b=p[0],m=p[1],h=Object(U.useCallback)((function(){var e=n.state.doc.resolve(i());return Object(Kn.findParentNodeOfTypeClosestToPos)(e,c)}),[]),g=Object(U.useMemo)((function(){return!!h()}),[h]);return Object(U.useEffect)((function(){var e=h();if(e){var t=e.node,i=e.pos,r=function(e,t,n){var i,r=Object(u.g)(e,(function(e){return e.type.name===Ai.name})),o=Object(k.a)(r);try{for(o.s();!(i=o.n()).done;){var a=t+i.value.pos+1,c=n.nodeAt(a);if(!(null===c||void 0===c?void 0:c.attrs.checked))return!1}}catch(l){o.e(l)}finally{o.f()}return!0}(t,i,n.state.doc);t.attrs.checked!==r&&n.commands.command((function(e){return e.tr.setNodeMarkup(i,void 0,{checked:r}),!0}))}}),[r,r.childCount]),Object(U.useEffect)((function(){var e=Object(u.g)(r,(function(e){return e.type.name===Ai.name})),t=e.filter((function(e){return e.node.attrs.checked})).length,n=e.length,i=Math.round(t/n*100);m({checked:t,total:n,percentage:i})}),[g,r]),Object(R.jsxs)(R.Fragment,{children:[Object(R.jsx)(ce.c,Object.assign({sx:{flexDirection:"column",":hover > div > .toggleSublist":{opacity:1}}},{children:g?Object(R.jsxs)(ce.c,Object.assign({sx:{position:"absolute",top:0,right:0},contentEditable:!1},{children:[d&&Object(R.jsxs)(ce.e,Object.assign({variant:"body",sx:{color:"fontTertiary",mr:35}},{children:[b.checked,"/",b.total]})),Object(R.jsx)(fe,{className:"toggleSublist",path:d?be.chevronDown:be.chevronUp,sx:{opacity:t||d?1:0,position:"absolute",right:0,alignSelf:"start",mr:2,cursor:"pointer",".icon:hover path":{fill:"var(--checked) !important"}},size:t?24:20,onClick:function(){o({collapsed:!d},{addToHistory:!1,preventUpdate:!0})}})]})):Object(R.jsxs)(ce.c,Object.assign({sx:{position:"relative",bg:"bgSecondary",py:1,borderRadius:"default",mb:2,alignItems:"center",justifyContent:"end",overflow:"hidden"},contentEditable:!1},{children:[Object(R.jsx)(ce.a,{sx:{height:"100%",width:"".concat(b.percentage,"%"),position:"absolute",bg:"border",zIndex:0,left:0,transition:"width 250ms ease-out"}}),Object(R.jsx)(nt.b,{readOnly:!n.isEditable,value:s||"",variant:"clean",sx:{p:0,px:2,zIndex:1,color:"fontTertiary"},placeholder:"Untitled",onChange:function(e){o({title:e.target.value},{addToHistory:!0,preventUpdate:!1})}}),Object(R.jsxs)(ce.c,Object.assign({sx:{flexShrink:0,pr:2}},{children:[Object(R.jsx)(fe,{path:be.checkbox,size:15,color:"fontTertiary"}),Object(R.jsxs)(ce.e,Object.assign({variant:"body",sx:{ml:1,color:"fontTertiary"}},{children:[b.checked,"/",b.total]}))]}))]}))})),Object(R.jsx)(ce.e,{as:"div",ref:a,sx:{ul:{display:d?"none":"block",paddingInlineStart:0,marginBlockStart:g?10:0,marginBlockEnd:0,marginLeft:g?-35:0},li:{listStyleType:"none",position:"relative",marginBottom:[2,"7px"]}}})]})}var Ri=yi.a.extend({addAttributes:function(){return{collapsed:{default:!1,keepOnSplit:!1,parseHTML:function(e){return"true"===e.dataset.collapsed},renderHTML:function(e){return{"data-collapsed":!0===e.collapsed}}},title:{default:null,keepOnSplit:!1,parseHTML:function(e){return e.dataset.title},renderHTML:function(e){return!e.title||e.nested?{}:{"data-title":e.title}}}}},parseHTML:function(){return[{tag:"ul",getAttrs:function(e){return e instanceof Node&&e instanceof HTMLElement&&(e.classList.contains("checklist")&&null)},priority:51}]},renderHTML:function(e){var t=e.HTMLAttributes;return["ul",Object(u.s)(this.options.HTMLAttributes,t,{class:"checklist"}),0]},addCommands:function(){var e=this;return{toggleTaskList:function(){return function(t){var n=t.editor,i=t.commands,r=t.state,o=t.tr,a=r.selection,c=a.$from,l=a.$to;i.toggleList(e.name,e.options.itemTypeName);var s={from:o.mapping.map(c.pos),to:o.mapping.map(l.pos)};return setTimeout((function(){return n.commands.setTextSelection(s)}),0),!0}}}},addNodeView:function(){var e=this;return F(Li,{contentDOMFactory:function(){var t=document.createElement("ul");return t.classList.add("".concat(e.name.toLowerCase(),"-content-wrapper")),t.style.whiteSpace="inherit",{dom:t}}})}}),Ti=n(12);function Pi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new T.Plugin({view:function(t){return new Ei(t,e)}})}var Ei=function(){function e(t,n){var i=this;Object(A.a)(this,e),this.editorView=t,this.width=n.width||1,this.color=n.color||"black",this.class=n.class||"",this.cursorPos=null,this.element=null,this.timeout=null,this.handlers=["dragover","dragend","drop","dragleave"].map((function(e){var n=function(t){return i[e](t)};return t.dom.addEventListener(e,n),{name:e,handler:n}}))}return Object(L.a)(e,[{key:"destroy",value:function(){var e=this;this.handlers.forEach((function(t){var n=t.name,i=t.handler;return e.editorView.dom.removeEventListener(n,i)}))}},{key:"update",value:function(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}},{key:"setCursor",value:function(e){e!=this.cursorPos&&(this.cursorPos=e,null==e&&this.element&&this.element.parentNode?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}},{key:"updateOverlay",value:function(){if(this.cursorPos){var e,t=this.editorView.state.doc.resolve(this.cursorPos);if(!t.parent.inlineContent){var n=t.nodeBefore,i=t.nodeAfter;if(n||i){var r=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0));if(!r)return;var o=r.getBoundingClientRect(),a=n?o.bottom:o.top;if(n&&i){var c=this.editorView.nodeDOM(this.cursorPos);if(!c)return;a=(a+c.getBoundingClientRect().top)/2}e={left:o.left,right:o.right,top:a-this.width/2,bottom:a+this.width/2}}}if(!e){var l=this.editorView.coordsAtPos(this.cursorPos);e={left:l.left-this.width/2,right:l.left+this.width/2,top:l.top,bottom:l.bottom}}var s,u,d=this.editorView.dom.offsetParent;if(!this.element&&d&&(this.element=d.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none; background-color: "+this.color),!d||d==document.body&&"static"==getComputedStyle(d).position)s=-pageXOffset,u=-pageYOffset;else{var f=d.getBoundingClientRect();s=f.left-d.scrollLeft,u=f.top-d.scrollTop}this.element&&(this.element.style.left=e.left-s+"px",this.element.style.top=e.top-u+"px",this.element.style.width=e.right-e.left+"px",this.element.style.height=e.bottom-e.top+"px")}}},{key:"scheduleRemoval",value:function(e){var t=this;clearTimeout(this.timeout||void 0),this.timeout=setTimeout((function(){return t.setCursor(null)}),e)}},{key:"dragover",value:function(e){if(this.editorView.editable){var t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),i=n&&n.type.spec.disableDropCursor,r="function"==typeof i?i(this.editorView,t):i;if(t&&!r){var o=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){var a=Object(Ti.h)(this.editorView.state.doc,o,this.editorView.dragging.slice);if(!a)return this.setCursor(null);o=a}this.setCursor(o),this.scheduleRemoval(5e3)}}}},{key:"dragend",value:function(){this.scheduleRemoval(20)}},{key:"drop",value:function(){this.scheduleRemoval(20)}},{key:"dragleave",value:function(e){e.target!=this.editorView.dom&&this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}]),e}(),Mi=u.b.create({name:"dropCursor",addOptions:function(){return{color:"currentColor",width:1,class:null}},addProseMirrorPlugins:function(){return[Pi(this.options)]}}),Ii=function(e,t){return t(e.tr)};var Di=u.b.create({name:"searchreplace",addOptions:function(){return{searchResultClass:"search-result"}},addCommands:function(){var e=this;return{startSearch:function(){return function(t){var n=t.state;return e.storage.isSearching=!0,n.selection.empty||(e.storage.selectedText=n.doc.textBetween(n.selection.$from.pos,n.selection.$to.pos)),!0}},endSearch:function(){return function(t){var n=t.state,i=t.dispatch;return e.storage.isSearching=!1,e.storage.searchTerm="",Ii(n,i),!0}},search:function(t,n){return function(i){var r=i.state,o=i.dispatch;return e.storage.searchTerm=t,e.storage.enableRegex=(null===n||void 0===n?void 0:n.enableRegex)||!1,e.storage.matchCase=(null===n||void 0===n?void 0:n.matchCase)||!1,e.storage.matchWholeWord=(null===n||void 0===n?void 0:n.matchWholeWord)||!1,e.storage.results=[],Ii(r,o),!0}},moveToNextResult:function(){return function(t){var n=t.chain,i=e.storage,r=i.selectedIndex,o=i.results;if(!o||o.length<=0)return!1;var a=r+1;(isNaN(a)||a>=o.length)&&(a=0);var c=o[a],l=c.from,s=c.to;console.log("[moveToNextResult]",l,s);var u=n().focus(void 0,{scrollIntoView:!0}).setTextSelection({from:l,to:s}).run();return u&&(e.storage.selectedIndex=a),u}},moveToPreviousResult:function(){return function(t){var n=t.chain,i=e.storage,r=i.selectedIndex,o=i.results;if(!o||o.length<=0)return!1;var a=r-1;(isNaN(a)||a<0)&&(a=o.length-1);var c=o[a],l=c.from,s=c.to,u=n().focus(void 0,{scrollIntoView:!0}).setTextSelection({from:l,to:s}).run();return u&&(e.storage.selectedIndex=a),u}},replace:function(t){return function(n){var i=n.commands,r=n.tr,o=n.dispatch,a=e.storage,c=a.selectedIndex,l=a.results;if(!o||!l||l.length<=0)return!1;var s=void 0===c?0:c,u=l[s],d=u.from,f=u.to;if(r.insertText(t,d,f),s+1-1||(null===(n=e.alias)||void 0===n?void 0:n.some((function(e){return e.toLowerCase().indexOf(t)>-1})))})))}}),Object(R.jsx)(ce.c,Object.assign({sx:{flexDirection:"column",pt:1,mt:1}},{children:a.map((function(e){return Object(R.jsxs)(he,Object.assign({variant:"menuitem",sx:{textAlign:"left",py:1,display:"flex",justifyContent:"space-between",alignItems:"center"},onClick:function(){return t(e.filename)}},{children:[Object(R.jsx)(ce.e,Object.assign({variant:"body"},{children:e.title})),n===e.filename?Object(R.jsx)(fe,{path:be.check,size:"small"}):e.alias?Object(R.jsx)(ce.e,Object.assign({variant:"subBody",sx:{fontSize:"10px"}},{children:e.alias.slice(0,3).join(", ")})):null]}),e.title)}))}))]}))}))}function Ji(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.reduce((function(e,n){if("comment"===n.type||"doctype"===n.type)return e;var i=Object(S.a)(t);return"element"===n.type&&n.properties?i.push.apply(i,Object(S.a)(n.properties.className)):i.push("token","text"),"element"===n.type?e.push.apply(e,Object(S.a)(Ji(n.children,i))):e.push({classes:i,text:n.value}),e}),[])}function Gi(e,t,n,i){var r=String(n).length,o={class:"line-number ".concat(i?"active":""),"data-line":String(t).padEnd(r," ")},a={line:t,active:i,total:n,from:e};return P.a.inline(e,e+1,o,a)}function Xi(e){var t=e.doc,n=e.name,i=e.defaultLanguage,r=e.caretPosition,o=[],a=Vi.a.listLanguages();return Object(u.g)(t,(function(e){return e.type.name===n})).forEach((function(e){var t,n=e.node.textContent,c=rr(n,e.pos),l=Object(k.a)(c||[]);try{for(l.s();!(t=l.n()).done;){var s=t.value,u=s.index+1,d=u===(null===r||void 0===r?void 0:r.line)&&s.from===(null===r||void 0===r?void 0:r.from),f=Gi(s.from,u,(null===c||void 0===c?void 0:c.length)||0,d);o.push(f)}}catch(h){l.e(h)}finally{l.f()}var p=e.node.attrs.language||i,b=a.includes(p)?Vi.a.highlight(n,p).children||[]:null;if(b){var m=e.pos+1;Ji(b).forEach((function(e){var t=m+e.text.length;if(e.classes.length){var n=P.a.inline(m,t,{class:e.classes.join(" ")});o.push(n)}m=t}))}})),P.b.create(t,o)}function Ki(e){var t=e.name,n=e.defaultLanguage,i=new T.PluginKey("highlighter");return new T.Plugin({key:i,state:{init:function(e,i){return Xi({doc:i.doc,name:t,defaultLanguage:n})},apply:function(e,i,r,o){var a=r.selection.$head.parent.type.name,c=o.selection.$head.parent.type.name,l=Object(u.g)(r.doc,(function(e){return e.type.name===t})),s=Object(u.g)(o.doc,(function(e){return e.type.name===t})),d=ir(o.selection);return e.docChanged&&([a,c].includes(t)||s.length!==l.length||e.steps.some((function(e){return void 0!==e.from&&void 0!==e.to&&l.some((function(t){return t.pos>=e.from&&t.pos+t.node.nodeSize<=e.to}))})))?Xi({doc:e.doc,name:t,defaultLanguage:n,caretPosition:d}):(i=function(e,t,n){var i=t.find(void 0,void 0,(function(e){var t=e.line,i=e.active,r=e.from;return!!n&&(t===n.line&&r===n.from)||i}));if(!i.length)return t;var r=i.slice();t=t.remove(i);var o,a=[],c=Object(k.a)(r);try{for(c.s();!(o=c.n()).done;){var l=o.value,s=l.from,u=l.spec,d=u.line,f=u.total,p=d===(null===n||void 0===n?void 0:n.line),b=Gi(s,d,(null===n||void 0===n?void 0:n.total)||f,p);a.push(b)}}catch(m){c.e(m)}finally{c.f()}return t.add(e,a)}(e.doc,i,d),i.map(e.mapping,e.doc))}},props:{decorations:function(e){return i.getState(e)}},appendTransaction:function(e,n,i){var r=i.tr,o=!1,a=e.some((function(e){return e.docChanged})),c=(i.selection.$from.parent.type.name===t||n.selection.$from.parent.type.name===t)&&n.selection.$from.pos!==i.selection.$from.pos;return Object(u.g)(i.doc,(function(e){return e.type.name===t})).forEach((function(e){var t,n=e.node,l=e.pos,s=Object.assign({},n.attrs);if(a||!(null===(t=s.lines)||void 0===t?void 0:t.length)){var u=rr(n.textContent,l);s.lines=u.slice()}if(c){var d=ir(i.selection,a?rr(n.textContent,l):void 0);s.caretPosition=d}(a||c)&&(r.setNodeMarkup(l,n.type,s),o=!0)})),o?r:null}})}var Qi=n(136),Yi=n(157),Zi=n(91),er=/^```([a-z]+)?[\s\n]$/,tr=/^~~~([a-z]+)?[\s\n]$/,nr=u.d.create({name:"codeblock",addOptions:function(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,exitOnArrowUp:!0,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes:function(){var e=this;return{caretPosition:{default:void 0,rendered:!1},lines:{default:[],rendered:!1},indentType:{default:"space",parseHTML:function(e){return e.dataset.indentType},renderHTML:function(e){return e.indentType?{"data-indent-type":e.indentType}:{}}},indentLength:{default:2,parseHTML:function(e){return e.dataset.indentLength},renderHTML:function(e){return e.indentLength?{"data-indent-length":e.indentLength}:{}}},language:{default:null,parseHTML:function(t){var n,i=e.options.languageClassPrefix,r=[].concat(Object(S.a)(t.classList||[]),Object(S.a)((null===(n=null===t||void 0===t?void 0:t.firstElementChild)||void 0===n?void 0:n.classList)||[])).filter((function(e){return e.startsWith(i)})).map((function(e){return e.replace(i,"")}))[0];return r||null},renderHTML:function(e){return e.language?{class:"language-".concat(e.language)}:{}}}}},parseHTML:function(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["pre",Object(u.s)(this.options.HTMLAttributes,t),["code",{},0]]},addCommands:function(){var e=this;return{setCodeBlock:function(t){return function(n){return n.commands.setNode(e.name,t)}},toggleCodeBlock:function(t){return function(n){var i=n.commands;return console.log("TOGGLING!"),i.toggleNode(e.name,"paragraph",t)}},changeCodeBlockIndentation:function(t){return function(n){var i=n.editor,r=n.tr,o=n.commands,a=i.state.selection.$from;if(a.parent.type!==e.type)return!1;var c,l=a.parent.attrs.lines,s=Object(k.a)(l);try{for(s.s();!(c=s.n()).done;){var u=c.value,d=u.text(),f=d.length-d.trimStart().length;if(f){var p=f,b=lr({type:t.type,amount:p});r.insertText(b,r.mapping.map(u.from),r.mapping.map(u.from+f))}}}catch(m){s.e(m)}finally{s.f()}return o.updateAttributes(e.type,{indentType:t.type,indentLength:t.amount}),!0}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Alt-c":function(){return e.editor.commands.toggleCodeBlock()},"Mod-a":function(t){var n=t.editor,i=e.editor.state.selection.$anchor;if(i.parent.type.name!==e.name)return!1;var r=Object(u.j)(i,(function(t){return t.type.name===e.type.name}));return!!r&&n.commands.setTextSelection({from:r.pos+1,to:r.pos+r.node.nodeSize-1})},Backspace:function(){var t=e.editor.state.selection,n=t.empty,i=t.$anchor,r=i.parent,o=e.editor.state.doc.nodeAt(i.pos+1),a=function(t){return t&&t.type.name===e.name},c=1===i.pos;return!!n&&(c||a(r)&&!r.textContent.length?e.editor.commands.deleteNode(e.type):!(!o||!a(o)||o.textContent.length)&&e.editor.commands.command((function(e){return e.tr.delete(i.pos+1,i.pos+1+o.nodeSize),!0})))},Enter:function(t){var n=t.editor,i=n.state.selection,r=i.$from;if(!i.empty||r.parent.type!==e.type)return!1;var o=ar(r.parent);return e.options.exitOnTripleEnter&&function(e,t){var n=t.parentOffset===t.parent.nodeSize-2,i=t.parent.textContent.endsWith("\n\n");if(!n||!i)return!1;return e.chain().command((function(e){return e.tr.delete(t.pos-2,t.pos),!0})).exitCode().run()}(n,r)||function(e,t,n){var i=function(e,t){var n=function(e,t){return e.find((function(e){return t>=e.from&&t<=e.to}))}(e.parent.attrs.lines,e.pos);if(!n)return!1;var i=n.text(),r=i.length-i.trimStart().length;return{newline:"\n",indentation:lr({amount:r,type:t.type})}}(t,n)||{},r=i.indentation,o=i.newline;return!!o&&e.chain().insertContent("".concat(o).concat(r),{parseOptions:{preserveWhitespace:"full"}}).focus().run()}(n,r,o)},ArrowUp:function(t){var n=t.editor;if(!e.options.exitOnArrowUp)return!1;var i=n.state.selection,r=i.$anchor;return!(!i.empty||r.parent.type!==e.type)&&(!(1!==r.pos)&&n.commands.insertContentAt(0,""))},ArrowDown:function(t){var n=t.editor;if(!e.options.exitOnArrowDown)return!1;var i=n.state,r=i.selection,o=i.doc,a=r.$from;if(!r.empty||a.parent.type!==e.type)return!1;if(!(a.parentOffset===a.parent.nodeSize-2))return!1;var c=a.after();return void 0!==c&&(o.nodeAt(c)?(n.commands.setNodeSelection(a.before()),!1):n.commands.exitCode())},"Shift-Tab":function(t){var n=t.editor,i=n.state.selection,r=i.$from;if(r.parent.type!==e.type)return!1;var o=ar(r.parent),a=lr(o),c=or(r.parent.attrs.lines,i);return n.chain().command((function(e){return sr(e.tr,(function(e){var t,n=Object(k.a)(c);try{for(n.s();!(t=n.n()).done;){var i=t.value;i.text(a.length)===a&&e.delete(e.mapping.map(i.from),e.mapping.map(i.from+o.amount))}}catch(r){n.e(r)}finally{n.f()}}))})).run()},Tab:function(t){var n=t.editor,i=n.state.selection,r=i.$from;if(r.parent.type!==e.type)return!1;var o=or(r.parent.attrs.lines,i);return n.chain().command((function(e){return sr(e.tr,(function(e){var t=lr(ar(r.parent));if(1===o.length)return e.insertText(t,r.pos);var n,i=Object(k.a)(o);try{for(i.s();!(n=i.n()).done;){var a=n.value;e.insertText(t,e.mapping.map(a.from))}}catch(c){i.e(c)}finally{i.f()}}))})).run()}}},addInputRules:function(){return[Object(u.v)({find:er,type:this.type,getAttributes:function(e){return{language:e[1]}}}),Object(u.v)({find:tr,type:this.type,getAttributes:function(e){return{language:e[1]}}})]},addProseMirrorPlugins:function(){var e=this;return[new T.Plugin({key:new T.PluginKey("codeBlockVSCodeHandler"),props:{handlePaste:function(t,n){if(!n.clipboardData)return!1;var i=n.clipboardData.getData("text/plain"),r=n.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,a=null===o||void 0===o?void 0:o.mode;if(!i||!a)return!1;var c=function(e,t){var n=t||Object(Qi.a)(e),i=n.amount,r=n.type,o=void 0===r?"space":r,a=Object(Yi.a)(e,i,{includeEmptyLines:!1,indent:"space"===o?" ":"\t"});return{code:Object(Zi.a)(a),amount:i,type:o}}(i,ar(t.state.selection.$from.parent)),l=t.state.tr;return e.editor.isActive(e.type.name)||l.replaceSelectionWith(e.type.create({language:a,indentType:c.type,indentLength:c.amount})),l.insertText(c.code.replace(/\r\n?/g,"\n")),l.setMeta("paste",!0),t.dispatch(l),!0}}}),Ki({name:this.name,defaultLanguage:"txt"})]},addNodeView:function(){return F(qi,{contentDOMFactory:function(){var e=document.createElement("div");return e.classList.add("node-content-wrapper"),e.style.whiteSpace="inherit",e.style.minWidth="20px",{dom:e}},shouldUpdate:function(e,t){var n=e.attrs,i=t.attrs;return function(e,t){return void 0===t||(null===e||void 0===e?void 0:e.column)!==(null===t||void 0===t?void 0:t.column)||(null===e||void 0===e?void 0:e.line)!==(null===t||void 0===t?void 0:t.line)}(n.caretPosition,i.caretPosition)||n.language!==i.language||n.indentType!==i.indentType}})}});function ir(e,t){var n=e.$from,i=e.$to,r=e.$head;if(n.parent.type.name===nr.name){t=t||(n.parent.attrs.lines||[]);var o,a=Object(k.a)(t);try{for(a.s();!(o=a.n()).done;){var c=o.value;if(r.pos>=c.from&&r.pos<=c.to){var l=c.length+1;return{line:c.index+1,column:l-(c.to-r.pos),selected:i.pos-n.pos,total:t.length,from:c.from}}}}catch(s){a.e(s)}finally{a.f()}}}function rr(e,t){for(var n=[],i=0,r=t+1,o=0,a=function(){var t=e.indexOf("\n",i);t<=-1&&(t=e.length);var a=t-i,c=r+a,l=i;n.push({index:o,length:a,from:r,to:c,text:function(t){return e.slice(l,t?l+t:l+a)}}),r=c+1,i=t+1,++o};i<=e.length;)a();return n}function or(e,t){var n=t.$from,i=t.$to;return e.filter((function(e){return cr(e.from,n.pos,i.pos)||cr(e.to,n.pos,i.pos)||cr(n.pos,e.from,e.to)}))}function ar(e){if(e.type.name===nr.name){var t=e.attrs,n=t.indentType,i=t.indentLength;return{type:n,amount:parseInt(i)}}}function cr(e,t,n){return e>=t&&e<=n}function lr(e){return("space"===e.type?" ":"\t").repeat(e.amount)}function sr(e,t){var n=e.selection,i=n.$anchor,r=n.$head;return t(e),e.setSelection(new T.TextSelection(e.doc.resolve(e.mapping.map(i.pos)),e.doc.resolve(e.mapping.map(r.pos)))),!0}var ur=n(84).a.extend({addKeyboardShortcuts:function(){var e,t=this;return Object.assign(Object.assign({},null===(e=this.parent)||void 0===e?void 0:e.call(this)),{Backspace:function(e){return Ci(e.editor,t.name,t.type)}})}});function dr(e){var t,n,i=e.editor,r=(e.updateAttributes,e.node),o=e.getPos,a=e.forwardRef,c=z(),l=(null===(t=r.lastChild)||void 0===t?void 0:t.type.name)===hr.name,s=l&&(null===(n=r.lastChild)||void 0===n?void 0:n.attrs.collapsed),d=function(){var e=Object(u.g)(r,(function(e){return e.type.name===hr.name})),t=Object(C.a)(e,1)[0];if(t){var n=t.pos;i.commands.toggleOutlineCollapse(n+o()+1,!s)}};return Object(R.jsxs)(ce.c,{children:[Object(R.jsxs)(ce.c,Object.assign({className:"outline",sx:{flexDirection:"column",alignItems:"center",mt:c?"0px":"3px"}},{children:[l?Object(R.jsx)(fe,{path:s?be.chevronRight:be.chevronDown,title:s?"Click to uncollapse list":"Click to collapse list",sx:{cursor:"pointer",transition:"all .2s ease-in-out",":hover":{transform:["unset","scale(1.3)"]},":active":{transform:["scale(1.3)","unset"]},".icon:hover path":{fill:"var(--checked) !important"}},size:c?24:18,onMouseDown:function(e){return e.preventDefault()},onTouchEnd:function(e){e.preventDefault(),d()},onClick:d}):Object(R.jsx)(fe,{path:be.circle,size:c?24:18,sx:{transform:"scale(0.4)"}}),l&&!s&&Object(R.jsx)(ce.a,{sx:{flex:1,width:1,mt:2,backgroundColor:"border",borderRadius:50,flexShrink:0,cursor:"pointer",transition:"all .2s ease-in-out",":hover":{backgroundColor:"fontTertiary",width:4}},contentEditable:!1})]})),Object(R.jsx)(ce.e,{ref:a,sx:{pl:1,listStyleType:"none",flex:1}})]})}var fr=u.d.create({name:"outlineListItem",addOptions:function(){return{HTMLAttributes:{}}},content:"heading* paragraph block*",defining:!0,parseHTML:function(){return[{tag:'li[data-type="'.concat(this.name,'"]')}]},renderHTML:function(e){var t=e.HTMLAttributes;return["li",Object(u.s)(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},addKeyboardShortcuts:function(){var e=this;return{"Mod-Space":function(t){var n=function(e,t){var n,i,r=e.state.selection.$from,o=Object(Kn.findParentNodeOfTypeClosestToPos)(r,t);if(!o)return!1;var a=Object(u.g)(o.node,(function(e){return e.type.name===hr.name})),c=Object(C.a)(a,1)[0];if(!c)return!1;var l=(null===(n=null===c||void 0===c?void 0:c.node)||void 0===n?void 0:n.type.name)===hr.name,s=null===(i=null===c||void 0===c?void 0:c.node)||void 0===i?void 0:i.attrs.collapsed,d=o.pos+c.pos+1;return{isCollapsed:s,isNested:l,subListPos:d}}(t.editor,e.type);if(!n)return!1;var i=n.isCollapsed,r=n.subListPos;return e.editor.commands.toggleOutlineCollapse(r,!i)},Enter:function(t){t.editor;return e.editor.commands.splitListItem(e.name)},Tab:function(){return e.editor.commands.sinkListItem(e.name)},"Shift-Tab":function(){return e.editor.commands.liftListItem(e.name)},Backspace:function(t){return Ci(t.editor,e.name,e.type)}}},addCommands:function(){return{toggleOutlineCollapse:function(e,t){return function(n){return n.tr.setNodeMarkup(e,void 0,{collapsed:t}),!0}}}},addNodeView:function(){return F(dr,{contentDOMFactory:!0,wrapperFactory:function(){return document.createElement("li")}})}});function pr(e){var t=e.editor,n=e.getPos,i=e.node,r=(e.updateAttributes,e.forwardRef),o=i.attrs.collapsed,a=Object(U.useMemo)((function(){var e;return(null===(e=t.state.doc.resolve(n()).parent)||void 0===e?void 0:e.type.name)===fr.name}),[]);return Object(R.jsx)(R.Fragment,{children:Object(R.jsx)(ce.e,{className:"outline-list",as:"div",ref:r,sx:{ul:{display:o?"none":"block",paddingInlineStart:0,paddingLeft:0,marginBlockStart:a?5:0,marginBlockEnd:0},li:{listStyleType:"none"}}})})}var br=/^\s*(-o)\s$/,mr="outlineListItem",hr=u.d.create({name:"outlineList",addOptions:function(){return{HTMLAttributes:{}}},addAttributes:function(){return{collapsed:{default:!1,keepOnSplit:!1,parseHTML:function(e){return"true"===e.dataset.collapsed},renderHTML:function(e){return{"data-collapsed":!0===e.collapsed}}}}},group:"block list",content:"".concat(mr,"+"),parseHTML:function(){return[{tag:'ul[data-type="'.concat(this.name,'"]'),priority:52}]},renderHTML:function(e){var t=e.HTMLAttributes;return["ul",Object(u.s)(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},addCommands:function(){var e=this;return{toggleOutlineList:function(){return function(t){return t.commands.toggleList(e.name,mr)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Shift-O":function(){return e.editor.commands.toggleOutlineList()}}},addInputRules:function(){return[Object(u.w)({find:br,type:this.type})]},addNodeView:function(){var e=this;return F(pr,{contentDOMFactory:function(){var t=document.createElement("ul");return t.classList.add("".concat(e.name.toLowerCase(),"-content-wrapper")),t.style.whiteSpace="inherit",{dom:t}}})}});function gr(e){var t=e.editor,n=e.node,i=e.forwardRef,r=Object(U.useRef)(null),o=Object(U.useRef)(),a=t.isActive("table");return Object(U.useEffect)((function(){r.current&&o.current&&Object(on.s)(n,r.current,o.current,50)}),[n]),Object(R.jsxs)(R.Fragment,{children:[Object(R.jsx)(Ye,{children:a&&Object(R.jsxs)(R.Fragment,{children:[Object(R.jsx)(jr,{editor:t,table:o.current}),Object(R.jsx)(Or,{editor:t,table:o.current})]})}),Object(R.jsx)("div",Object.assign({className:"tableWrapper"},{children:Object(R.jsx)("table",Object.assign({ref:function(e){null===i||void 0===i||i(e),o.current=e||void 0}},{children:Object(R.jsx)("colgroup",{ref:r})}))}))]})}function vr(e){return function(t){Object(V.a)(i,t);var n=Object(W.a)(i);function i(t,r){var o,a;return Object(A.a)(this,i),a=n.call(this,t,e,(function(){return 0}),{component:gr,shouldUpdate:function(e,t){return e.type===t.type},contentDOMFactory:function(){return{dom:document.createElement("tbody")}},wrapperFactory:function(){var e=document.createElement("div");return e.style.position="relative",e}}),Object(Z.a)((o=Object(_.a)(a),Object(ee.a)(i.prototype)),"init",o).call(o),a}return Object(L.a)(i)}(oe)}function jr(e){var t=e.editor,n=Object(U.useRef)(null);return Object(U.useEffect)((function(){if(n.current){var e=Bt(t,["tableRow"]);if(e){var i=Ee(n.current,{location:"left",target:e,align:"start",xOffset:-5,yOffset:-3});n.current.style.top="".concat(i.top,"px"),n.current.style.left="".concat(i.left,"px")}}}),[t.state.selection,n.current]),Object(R.jsxs)(ce.c,Object.assign({ref:n,sx:{zIndex:999,top:0,left:0,position:"absolute",bg:"background",flexWrap:"nowrap",borderRadius:"default",opacity:.3,":hover":{opacity:1}}},{children:[Object(R.jsx)(jn,Object.assign({},bn("rowProperties"),{icon:"more",variant:"small",editor:t})),Object(R.jsx)(Wn,Object.assign({},bn("insertRowBelow"),{editor:t,variant:"small"}))]}))}function Or(e){var t=e.editor,n=e.table,i=Object(U.useRef)(null);return Object(U.useEffect)((function(){if(i.current&&n){var e=Bt(t,["tableCell","tableHeader"]);if(e){var r=Ee(i.current,{location:"top",align:"center",target:e,yAnchor:n,yOffset:2});i.current.style.left="".concat(r.left,"px"),i.current.style.top="".concat(r.top,"px")}}}),[t.state.selection,i.current,n]),Object(R.jsxs)(ce.c,Object.assign({ref:i,sx:{zIndex:999,top:0,left:0,position:"absolute",bg:"background",flexWrap:"nowrap",borderRadius:"default",opacity:.3,":hover":{opacity:1}}},{children:[Object(R.jsx)(On,{editor:t,title:"tableProperties",icon:"more",variant:"small"}),Object(R.jsx)(zn,Object.assign({},bn("insertColumnRight"),{editor:t,variant:"small",icon:"plus"}))]}))}var xr=n(138).a.extend({addProseMirrorPlugins:function(){var e=this.options.resizable&&this.editor.isEditable;return[].concat(Object(S.a)(e?[Object(on.f)({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:vr(this.editor),lastColumnResizable:this.options.lastColumnResizable})]:[]),[Object(on.p)({allowTableNodeSelection:this.options.allowTableNodeSelection})])}}),yr=n(156),Cr=n(155),kr=u.b.create({name:"codemarkPlugin",addProseMirrorPlugins:function(){return Object(Cr.a)({markType:this.editor.schema.marks.code})}}),wr=n(55),Sr=n(47),Ar=n(26);function Lr(e,t,n){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return function(r,o){var a=e.state,c=a.selection,l=c.to,s=c.from,u=r.selection,d=u.to,f=u.from;if(i&&d!==f)return!1;var p=t>0?d:f;if(n){var b=r.doc.nodeSize-2;if(t>0&&p0)return!1}if(o){var m=t>0?l:s;e.dispatch(a.tr.setSelection(T.TextSelection.create(a.doc,m))),e.focus()}return!0}}var Rr=function(){function e(t,n,i,r,o,a){var c=this;Object(A.a)(this,e),this.options=r,this._node=t,this._outerView=n,this._getPos=i,this._mathPluginKey=o,this.cursorSide="start",this._isEditing=!1,this._tagName=r.tagName||this._node.type.name.replace("_","-"),this.dom=document.createElement(this._tagName),r.className&&this.dom.classList.add(r.className),this.dom.classList.add("math-node"),this._mathRenderElt=document.createElement("span"),this._mathRenderElt.textContent="",this._mathRenderElt.classList.add("math-render"),this.dom.appendChild(this._mathRenderElt),this._mathSrcElt=document.createElement("span"),this._mathSrcElt.classList.add("math-src"),this.dom.appendChild(this._mathSrcElt),this.dom.addEventListener("click",(function(){return c.ensureFocus()})),this.renderMath()}return Object(L.a)(e,[{key:"destroy",value:function(){this.closeEditor(!1),this._mathRenderElt&&(this._mathRenderElt.remove(),delete this._mathRenderElt),this._mathSrcElt&&(this._mathSrcElt.remove(),delete this._mathSrcElt),this.dom.remove()}},{key:"ensureFocus",value:function(){this._innerView&&this._outerView.hasFocus()&&this._innerView.focus()}},{key:"update",value:function(e,t,n){if(!e.sameMarkup(this._node))return!1;if(this._node=e,this._innerView){var i=this._innerView.state,r=e.content.findDiffStart(i.doc.content);if(null!=r){var o=e.content.findDiffEnd(i.doc.content);if(o){var a=o.a,c=o.b,l=r-Math.min(a,c);l>0&&(a+=l,c+=l),this._innerView.dispatch(i.tr.replace(r,c,e.slice(r,a)).setMeta("fromOutside",!0))}}}return this._isEditing||this.renderMath(),!0}},{key:"updateCursorPos",value:function(e){var t=this._getPos(),n=this._node.nodeSize;e.selection.from0&&null!==e[0].textContent&&(t=e[0].textContent.trim()),t.length<1)for(this.dom.classList.add("empty-math");this._mathRenderElt.firstChild;)this._mathRenderElt.firstChild.remove();else{this.dom.classList.remove("empty-math");try{this.options.renderer(t,this._mathRenderElt),this._mathRenderElt.classList.remove("parse-error"),this.dom.setAttribute("title","")}catch(n){n instanceof Error&&(console.error(n),this._mathRenderElt.classList.add("parse-error"),this.dom.setAttribute("title",n.toString()))}}}}},{key:"dispatchInner",value:function(e){if(this._innerView){var t=this._innerView.state.applyTransaction(e),n=t.state,i=t.transactions;if(this._innerView.updateState(n),!e.getMeta("fromOutside")){for(var r=this._outerView.state.tr,o=Ti.d.offset(this._getPos()+1),a=0;a0)&&(t._outerView.dispatch(t._outerView.state.tr.insertText("")),t._outerView.focus(),!0))})),Enter:Object(Ar.a)(Ar.i,Lr(this._outerView,1,!1)),"Ctrl-Enter":Lr(this._outerView,1,!1),ArrowLeft:Lr(this._outerView,-1,!0),ArrowRight:Lr(this._outerView,1,!0),ArrowUp:Lr(this._outerView,-1,!0),ArrowDown:Lr(this._outerView,1,!0)})]}),dispatchTransaction:this.dispatchInner.bind(this)});var n=this._innerView.state;this._innerView.focus();var i=null===(e=this._mathPluginKey.getState(this._outerView.state))||void 0===e?void 0:e.prevCursorPos;null!==i&&void 0!==i||console.error("[prosemirror-math] Error: Unable to fetch math plugin state from key.");var r=(null!==i&&void 0!==i?i:0)<=this._getPos()?0:this._node.nodeSize-2;setTimeout((function(){t._innerView&&(t._innerView.focus(),t._innerView.dispatch(n.tr.setSelection(T.TextSelection.create(n.doc,r))))})),this._isEditing=!0}},{key:"closeEditor",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._innerView&&(this._innerView.destroy(),this._innerView=void 0),e&&this.renderMath(),this._isEditing=!1}}]),e}(),Tr=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function c(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}l((i=i.apply(e,t||[])).next())}))};function Pr(){return Tr(this,void 0,void 0,Object(pt.a)().mark((function e(){var t,i;return Object(pt.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.e(0).then(n.t.bind(null,208,7));case 2:return t=e.sent,i=t.default,e.next=6,Promise.all([n.e(0),n.e(4)]).then(n.bind(null,209));case 6:return e.abrupt("return",i);case 7:case"end":return e.stop()}}),e)})))}var Er={inline:function(e,t){Pr().then((function(n){n.render(e,t,{displayMode:!1,globalGroup:!0,throwOnError:!1})}))},block:function(e,t){Pr().then((function(n){n.render(e,t,{displayMode:!0,globalGroup:!0,throwOnError:!1})}))}},Mr=new T.PluginKey("prosemirror-math");function Ir(e){return function(t,n,i){var r=Mr.getState(n.state);if(!r)throw new Error("no math plugin!");var o=r.activeNodeViews,a=new Rr(t,n,i,{className:e?"math-inline":"math-block",renderer:e?Er.inline:Er.block,tagName:e?"span":"div"},Mr,(function(){o.splice(o.indexOf(a))}));return o.push(a),a}}var Dr={key:Mr,state:{init:function(e,t){return{macros:{},activeNodeViews:[],prevCursorPos:0}},apply:function(e,t,n,i){var r=i.selection.from,o=n.selection.from;return{activeNodeViews:t.activeNodeViews,macros:t.macros,prevCursorPos:o!==r?o:t.prevCursorPos}}},props:{nodeViews:{mathInline:Ir(!0),mathBlock:Ir(!1)}}},zr=new T.Plugin(Dr),Nr=n(5);function Hr(e,t){return Nr.Fragment.from(t.text(e))}function Br(e){var t,n=e.querySelector("img.mwe-math-fallback-image-inline[alt]");return null!==(t=null===n||void 0===n?void 0:n.getAttribute("alt"))&&void 0!==t&&t}function Fr(e){var t,n=e.querySelector("math[alttext]");return null!==(t=null===n||void 0===n?void 0:n.getAttribute("alttext"))&&void 0!==t&&t}function _r(e){var t,n=e.querySelector("math annotation[encoding='application/x-tex'");return null!==(t=null===n||void 0===n?void 0:n.textContent)&&void 0!==t&&t}function Vr(e){var t=function(e,t){var n,i=Object(k.a)(t);try{for(i.s();!(n=i.n()).done;){var r=(0,n.value)(e);if(!1!==r)return r}}catch(o){i.e(o)}finally{i.f()}return!1}(e,[Br,Fr,_r]);return t}var Wr=[{tag:"span",getAttrs:function(e){return!!e.classList.contains("mwe-math-element")&&null},getContent:function(e,t){return Hr(Vr(e)||"\\text{\\color{red}(paste error)}",t)}}],Ur=[{tag:"dl",getAttrs:function(e){var t=e;if(1!==t.childElementCount)return!1;var n=t.firstChild;return"DD"===n.tagName&&(1===n.childElementCount&&(!!n.firstChild.classList.contains("mwe-math-element")&&null))},getContent:function(e,t){return Hr(Vr(e)||"\\text{\\color{red}(paste error)}",t)}}];[{tag:"math-inline"}].concat(Object(S.a)(Wr)),[{tag:"math-display"}].concat(Object(S.a)(Ur));var qr=/\$\$(.+)\$\$/,$r=(function(){try{new RegExp("(?1&&void 0!==arguments[1]?arguments[1]:"";return function(n,i){var r=n.selection,o=r.$from,a=r.empty,c=o.index();if(!a&&!o.parent.canReplaceWith(c,c,e))return!1;if(i){var l=e.create({},t?n.schema.text(t):null),s=n.tr.replaceSelectionWith(l);i(s=a?s.setSelection(T.TextSelection.create(s.doc,o.pos+1)):s.setSelection(T.NodeSelection.create(s.doc,o.pos)))}return!0}}(e.type)(n,i,r)}}}},addProseMirrorPlugins:function(){var e,t,n;return[Object(wr.b)({rules:[(e=$r,t=this.type,new wr.a(e,(function(e,i,r,o){var a=e.doc.resolve(r),c=n instanceof Function?n(i):n;if(!a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),t))return null;var l=e.tr.delete(r,o).setBlockType(r,r,t,c);return l.setSelection(T.NodeSelection.create(l.doc,l.mapping.map(a.pos-1)))})))]})]}}),Qr=void 0,Yr=u.b.create({name:"keepinview",onCreate:function(){var e=this;Qr=function(){Zr(e.editor)},window.addEventListener("resize",Qr)},onDestroy:function(){Qr&&(window.removeEventListener("resize",Qr),Qr=void 0)},addKeyboardShortcuts:function(){return{Enter:function(e){var t=e.editor;return setTimeout((function(){Zr(t)})),!1}}}});function Zr(e){var t=e.state.selection.$from,n=Object(u.u)(e.view,t.pos,t.pos+1).top;if(window.innerHeight-n<100){var i=e.view.domAtPos(t.pos).node;if(i.nodeType===Node.TEXT_NODE&&i.parentNode&&(i=i.parentNode),i instanceof HTMLElement){var r=eo(i);r?r.scrollBy({top:100,behavior:"smooth"}):i.scrollIntoView({behavior:"smooth",block:"center"})}}}var eo=function(e){if(e){for(var t=e.parentElement;t;){var n=t.style,i=n.overflow,r=n.overflowY;if(to(i)||to(r))return t;t=t.parentElement}return document.documentElement}};function to(e){return e.split(" ").every((function(e){return"auto"===e||"scroll"===e}))}var no=new T.PluginKey("selection-persist-key"),io=u.b.create({name:"selection-persist",addProseMirrorPlugins:function(){var e=!1;return[new T.Plugin({key:no,props:{decorations:function(e){return no.getState(e)}},state:{init:function(){return P.b.empty},apply:function(t,n,i,r){var o=!!t.getMeta("blur");!!t.getMeta("focus")&&(e=!1,!0),o&&(e=!0,!1);var a=i.selection,c=a.from,l=a.to;return e?P.b.create(t.doc,[P.a.inline(c,l,{style:"background-color: var(--dimPrimary)"})]):P.b.empty}}})]}}),ro=function(e){Object(V.a)(n,e);var t=Object(W.a)(n);function n(){return Object(A.a)(this,n),t.apply(this,arguments)}return Object(L.a)(n,[{key:"requestPermission",value:function(e){var t=new CustomEvent("permissionrequest",{detail:{id:e},cancelable:!0});if(window.dispatchEvent(t))return this.current}}]),n}(u.a);function oo(){var e=Object(U.useState)(0),t=Object(C.a)(e,2)[1];return function(){return t((function(e){return e+1}))}}var ao=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=Object(U.useState)(null),i=Object(C.a)(n,2),r=i[0],o=i[1],a=oo(),c=Object(U.useRef)(r);return Object(U.useEffect)((function(){var t=!0,n=new ro(e);return o(n),n.on("transaction",(function(){requestAnimationFrame((function(){requestAnimationFrame((function(){t&&a()}))}))})),function(){n.destroy(),t=!1}}),t),Object(U.useEffect)((function(){c.current=r,r&&(r.current||Object.defineProperty(r,"current",{get:function(){return c.current}}))}),[r]),Object(U.useEffect)((function(){function e(e){if(null===r||void 0===r?void 0:r.view.dragging)return e.preventDefault(),!0}return null===r||void 0===r||r.view.dom.addEventListener("dragenter",e),function(){null===r||void 0===r||r.view.dom.removeEventListener("dragenter",e)}}),[null===r||void 0===r?void 0:r.view.dom]),r},co={premium:["insertImage"]};function lo(e){var t=e.claims,n=e.onPermissionDenied;Object(U.useEffect)((function(){function e(e){var i=e.detail.id;for(var r in co){var o=r;if(!(co[o].indexOf(i)<=-1)&&!t[o]){n(o,i),e.preventDefault();break}}e.preventDefault()}return window.addEventListener("permissionrequest",e),function(){window.removeEventListener("permissionrequest",e)}}),[t,n])}var so=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.theme,u=e.isMobile,O=e.onDownloadAttachment,C=e.onOpenAttachmentPicker,k=e.onBeforeCreate,w=so(e,["theme","isMobile","onDownloadAttachment","onOpenAttachmentPicker","onBeforeCreate"]),S=K(),A=I((function(e){return e.setIsMobile})),L=I((function(e){return e.setTheme}));Object(U.useEffect)((function(){A(u||!1),L(n)}),[u,n]);var R=Object(U.useMemo)((function(){return{extensions:[re,Di,d.a,a.a.configure({dropcursor:!1,codeBlock:!1,listItem:!1,orderedList:!1,bulletList:!1,history:{depth:200,newGroupDelay:1e3}}),Mi.configure({class:"drop-cursor"}),i.a,o.a,l.a,s.a,f,p,b.a,m,h,Ai.configure({nested:!0}),Ri,yr.a.configure({openOnClick:!u}),xr.configure({resizable:!0,allowTableNodeSelection:!0,cellMinWidth:50}),j.a,x,y.a,g.a.configure({multicolor:!0}),nr,v.a,c.a.configure({types:["heading","paragraph"],alignments:["left","right","center","justify"],defaultAlignment:"left"}),r.a.configure({placeholder:"Start writing your note..."}),xi,Ni,oi.configure({onDownloadAttachment:O,onOpenAttachmentPicker:C}),fr,hr,ur,kr,Xr,Kr,Yr,io],onBeforeCreate:function(e){var t=e.editor;t.storage.portalProviderAPI=S,k&&k({editor:t})},injectCSS:!1}}),[O,C,S,k]),T=ao(Object.assign(Object.assign({},R),w),t);return T}},78:function(e){e.exports=JSON.parse('[{"filename":"markup","title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"]},{"filename":"css","title":"CSS"},{"filename":"clike","title":"C-like"},{"filename":"javascript","title":"JavaScript","alias":["js"]},{"filename":"abap","title":"ABAP"},{"filename":"abnf","title":"ABNF"},{"filename":"actionscript","title":"ActionScript"},{"filename":"ada","title":"Ada"},{"filename":"agda","title":"Agda"},{"filename":"al","title":"AL"},{"filename":"antlr4","title":"ANTLR4","alias":["g4"]},{"filename":"apacheconf","title":"Apache Configuration"},{"filename":"apex","title":"Apex"},{"filename":"apl","title":"APL"},{"filename":"applescript","title":"AppleScript"},{"filename":"aql","title":"AQL"},{"filename":"arduino","title":"Arduino","alias":["ino"]},{"filename":"arff","title":"ARFF"},{"filename":"armasm","title":"ARM Assembly","alias":["arm-asm"]},{"filename":"arturo","title":"Arturo","alias":["art"]},{"filename":"asciidoc","title":"AsciiDoc","alias":["adoc"]},{"filename":"aspnet","title":"ASP.NET (C#)"},{"filename":"asm6502","title":"6502 Assembly"},{"filename":"asmatmel","title":"Atmel AVR Assembly"},{"filename":"autohotkey","title":"AutoHotkey"},{"filename":"autoit","title":"AutoIt"},{"filename":"avisynth","title":"AviSynth","alias":["avs"]},{"filename":"avro-idl","title":"Avro IDL","alias":["avdl"]},{"filename":"awk","title":"AWK","alias":["gawk"]},{"filename":"bash","title":"Bash","alias":["shell"]},{"filename":"basic","title":"BASIC"},{"filename":"batch","title":"Batch"},{"filename":"bbcode","title":"BBcode","alias":["shortcode"]},{"filename":"bicep","title":"Bicep"},{"filename":"birb","title":"Birb"},{"filename":"bison","title":"Bison"},{"filename":"bnf","title":"BNF","alias":["rbnf"]},{"filename":"brainfuck","title":"Brainfuck"},{"filename":"brightscript","title":"BrightScript"},{"filename":"bro","title":"Bro"},{"filename":"bsl","title":"BSL (1C:Enterprise)","alias":["oscript"]},{"filename":"c","title":"C"},{"filename":"csharp","title":"C#","alias":["cs","dotnet"]},{"filename":"cpp","title":"C++"},{"filename":"cfscript","title":"CFScript","alias":["cfc"]},{"filename":"chaiscript","title":"ChaiScript"},{"filename":"cil","title":"CIL"},{"filename":"clojure","title":"Clojure"},{"filename":"cmake","title":"CMake"},{"filename":"cobol","title":"COBOL"},{"filename":"coffeescript","title":"CoffeeScript","alias":["coffee"]},{"filename":"concurnas","title":"Concurnas","alias":["conc"]},{"filename":"csp","title":"Content-Security-Policy"},{"filename":"cooklang","title":"Cooklang"},{"filename":"coq","title":"Coq"},{"filename":"crystal","title":"Crystal"},{"filename":"css-extras","title":"CSS Extras"},{"filename":"csv","title":"CSV"},{"filename":"cue","title":"CUE"},{"filename":"cypher","title":"Cypher"},{"filename":"d","title":"D"},{"filename":"dart","title":"Dart"},{"filename":"dataweave","title":"DataWeave"},{"filename":"dax","title":"DAX"},{"filename":"dhall","title":"Dhall"},{"filename":"diff","title":"Diff"},{"filename":"django","title":"Django/Jinja2","alias":["jinja2"]},{"filename":"dns-zone-file","title":"DNS zone file","alias":["dns-zone"]},{"filename":"docker","title":"Docker","alias":["dockerfile"]},{"filename":"dot","title":"DOT (Graphviz)","alias":["gv"]},{"filename":"ebnf","title":"EBNF"},{"filename":"editorconfig","title":"EditorConfig"},{"filename":"eiffel","title":"Eiffel"},{"filename":"ejs","title":"EJS","alias":["eta"]},{"filename":"elixir","title":"Elixir"},{"filename":"elm","title":"Elm"},{"filename":"etlua","title":"Embedded Lua templating"},{"filename":"erb","title":"ERB"},{"filename":"erlang","title":"Erlang"},{"filename":"excel-formula","title":"Excel Formula","alias":["xlsx","xls"]},{"filename":"fsharp","title":"F#"},{"filename":"factor","title":"Factor"},{"filename":"false","title":"False"},{"filename":"firestore-security-rules","title":"Firestore security rules"},{"filename":"flow","title":"Flow"},{"filename":"fortran","title":"Fortran"},{"filename":"ftl","title":"FreeMarker Template Language"},{"filename":"gml","title":"GameMaker Language","alias":["gamemakerlanguage"]},{"filename":"gap","title":"GAP (CAS)"},{"filename":"gcode","title":"G-code"},{"filename":"gdscript","title":"GDScript"},{"filename":"gedcom","title":"GEDCOM"},{"filename":"gettext","title":"gettext","alias":["po"]},{"filename":"gherkin","title":"Gherkin"},{"filename":"git","title":"Git"},{"filename":"glsl","title":"GLSL"},{"filename":"gn","title":"GN","alias":["gni"]},{"filename":"linker-script","title":"GNU Linker Script","alias":["ld"]},{"filename":"go","title":"Go"},{"filename":"go-module","title":"Go module","alias":["go-mod"]},{"filename":"gradle","title":"Gradle"},{"filename":"graphql","title":"GraphQL"},{"filename":"groovy","title":"Groovy"},{"filename":"haml","title":"Haml"},{"filename":"handlebars","title":"Handlebars","alias":["hbs","mustache"]},{"filename":"haskell","title":"Haskell","alias":["hs"]},{"filename":"haxe","title":"Haxe"},{"filename":"hcl","title":"HCL"},{"filename":"hlsl","title":"HLSL"},{"filename":"hoon","title":"Hoon"},{"filename":"http","title":"HTTP"},{"filename":"hpkp","title":"HTTP Public-Key-Pins"},{"filename":"hsts","title":"HTTP Strict-Transport-Security"},{"filename":"ichigojam","title":"IchigoJam"},{"filename":"icon","title":"Icon"},{"filename":"icu-message-format","title":"ICU Message Format"},{"filename":"idris","title":"Idris","alias":["idr"]},{"filename":"ignore","title":".ignore","alias":["gitignore","hgignore","npmignore"]},{"filename":"inform7","title":"Inform 7"},{"filename":"ini","title":"Ini"},{"filename":"io","title":"Io"},{"filename":"j","title":"J"},{"filename":"java","title":"Java"},{"filename":"javadoc","title":"JavaDoc"},{"filename":"javadoclike","title":"JavaDoc-like"},{"filename":"javastacktrace","title":"Java stack trace"},{"filename":"jexl","title":"Jexl"},{"filename":"jolie","title":"Jolie"},{"filename":"jq","title":"JQ"},{"filename":"jsdoc","title":"JSDoc"},{"filename":"js-extras","title":"JS Extras"},{"filename":"json","title":"JSON","alias":["webmanifest"]},{"filename":"json5","title":"JSON5"},{"filename":"jsonp","title":"JSONP"},{"filename":"jsstacktrace","title":"JS stack trace"},{"filename":"js-templates","title":"JS Templates"},{"filename":"julia","title":"Julia"},{"filename":"keepalived","title":"Keepalived Configure"},{"filename":"keyman","title":"Keyman"},{"filename":"kotlin","title":"Kotlin","alias":["kt","kts"]},{"filename":"kumir","title":"KuMir (\u041a\u0443\u041c\u0438\u0440)","alias":["kum"]},{"filename":"kusto","title":"Kusto"},{"filename":"latex","title":"LaTeX","alias":["tex","context"]},{"filename":"latte","title":"Latte"},{"filename":"less","title":"Less"},{"filename":"lilypond","title":"LilyPond","alias":["ly"]},{"filename":"liquid","title":"Liquid"},{"filename":"lisp","title":"Lisp","alias":["emacs","elisp","emacs-lisp"]},{"filename":"livescript","title":"LiveScript"},{"filename":"llvm","title":"LLVM IR"},{"filename":"log","title":"Log file"},{"filename":"lolcode","title":"LOLCODE"},{"filename":"lua","title":"Lua"},{"filename":"magma","title":"Magma (CAS)"},{"filename":"makefile","title":"Makefile"},{"filename":"markdown","title":"Markdown","alias":["md"]},{"filename":"markup-templating","title":"Markup templating"},{"filename":"mata","title":"Mata"},{"filename":"matlab","title":"MATLAB"},{"filename":"maxscript","title":"MAXScript"},{"filename":"mel","title":"MEL"},{"filename":"mermaid","title":"Mermaid"},{"filename":"mizar","title":"Mizar"},{"filename":"mongodb","title":"MongoDB"},{"filename":"monkey","title":"Monkey"},{"filename":"moonscript","title":"MoonScript","alias":["moon"]},{"filename":"n1ql","title":"N1QL"},{"filename":"n4js","title":"N4JS","alias":["n4jsd"]},{"filename":"nand2tetris-hdl","title":"Nand To Tetris HDL"},{"filename":"naniscript","title":"Naninovel Script","alias":["nani"]},{"filename":"nasm","title":"NASM"},{"filename":"neon","title":"NEON"},{"filename":"nevod","title":"Nevod"},{"filename":"nginx","title":"nginx"},{"filename":"nim","title":"Nim"},{"filename":"nix","title":"Nix"},{"filename":"nsis","title":"NSIS"},{"filename":"objectivec","title":"Objective-C","alias":["objc"]},{"filename":"ocaml","title":"OCaml"},{"filename":"odin","title":"Odin"},{"filename":"opencl","title":"OpenCL"},{"filename":"openqasm","title":"OpenQasm","alias":["qasm"]},{"filename":"oz","title":"Oz"},{"filename":"parigp","title":"PARI/GP"},{"filename":"parser","title":"Parser"},{"filename":"pascal","title":"Pascal","alias":["objectpascal"]},{"filename":"pascaligo","title":"Pascaligo"},{"filename":"psl","title":"PATROL Scripting Language"},{"filename":"pcaxis","title":"PC-Axis","alias":["px"]},{"filename":"peoplecode","title":"PeopleCode","alias":["pcode"]},{"filename":"perl","title":"Perl"},{"filename":"php","title":"PHP"},{"filename":"phpdoc","title":"PHPDoc"},{"filename":"php-extras","title":"PHP Extras"},{"filename":"plant-uml","title":"PlantUML","alias":["plantuml"]},{"filename":"plsql","title":"PL/SQL"},{"filename":"powerquery","title":"PowerQuery","alias":["pq","mscript"]},{"filename":"powershell","title":"PowerShell"},{"filename":"processing","title":"Processing"},{"filename":"prolog","title":"Prolog"},{"filename":"promql","title":"PromQL"},{"filename":"properties","title":".properties"},{"filename":"protobuf","title":"Protocol Buffers"},{"filename":"pug","title":"Pug"},{"filename":"puppet","title":"Puppet"},{"filename":"pure","title":"Pure"},{"filename":"purebasic","title":"PureBasic","alias":["pbfasm"]},{"filename":"purescript","title":"PureScript","alias":["purs"]},{"filename":"python","title":"Python","alias":["py"]},{"filename":"qsharp","title":"Q#","alias":["qs"]},{"filename":"q","title":"Q (kdb+ database)"},{"filename":"qml","title":"QML"},{"filename":"qore","title":"Qore"},{"filename":"r","title":"R"},{"filename":"racket","title":"Racket","alias":["rkt"]},{"filename":"cshtml","title":"Razor C#","alias":["razor"]},{"filename":"jsx","title":"React JSX"},{"filename":"tsx","title":"React TSX"},{"filename":"reason","title":"Reason"},{"filename":"regex","title":"Regex"},{"filename":"rego","title":"Rego"},{"filename":"renpy","title":"Ren\'py","alias":["rpy"]},{"filename":"rescript","title":"ReScript","alias":["res"]},{"filename":"rest","title":"reST (reStructuredText)"},{"filename":"rip","title":"Rip"},{"filename":"roboconf","title":"Roboconf"},{"filename":"robotframework","title":"Robot Framework","alias":["robot"]},{"filename":"ruby","title":"Ruby","alias":["rb"]},{"filename":"rust","title":"Rust"},{"filename":"sas","title":"SAS"},{"filename":"sass","title":"Sass (Sass)"},{"filename":"scss","title":"Sass (Scss)"},{"filename":"scala","title":"Scala"},{"filename":"scheme","title":"Scheme"},{"filename":"shell-session","title":"Shell session","alias":["sh-session","shellsession"]},{"filename":"smali","title":"Smali"},{"filename":"smalltalk","title":"Smalltalk"},{"filename":"smarty","title":"Smarty"},{"filename":"sml","title":"SML","alias":["smlnj"]},{"filename":"solidity","title":"Solidity (Ethereum)","alias":["sol"]},{"filename":"solution-file","title":"Solution file","alias":["sln"]},{"filename":"soy","title":"Soy (Closure Template)"},{"filename":"sparql","title":"SPARQL","alias":["rq"]},{"filename":"splunk-spl","title":"Splunk SPL"},{"filename":"sqf","title":"SQF: Status Quo Function (Arma 3)"},{"filename":"sql","title":"SQL"},{"filename":"squirrel","title":"Squirrel"},{"filename":"stan","title":"Stan"},{"filename":"stata","title":"Stata Ado"},{"filename":"iecst","title":"Structured Text (IEC 61131-3)"},{"filename":"stylus","title":"Stylus"},{"filename":"supercollider","title":"SuperCollider","alias":["sclang"]},{"filename":"swift","title":"Swift"},{"filename":"systemd","title":"Systemd configuration file"},{"filename":"t4-templating","title":"T4 templating"},{"filename":"t4-cs","title":"T4 Text Templates (C#)","alias":["t4"]},{"filename":"t4-vb","title":"T4 Text Templates (VB)"},{"filename":"tap","title":"TAP"},{"filename":"tcl","title":"Tcl"},{"filename":"tt2","title":"Template Toolkit 2"},{"filename":"textile","title":"Textile"},{"filename":"toml","title":"TOML"},{"filename":"tremor","title":"Tremor","alias":["trickle","troy"]},{"filename":"turtle","title":"Turtle","alias":["trig"]},{"filename":"twig","title":"Twig"},{"filename":"typescript","title":"TypeScript","alias":["ts"]},{"filename":"typoscript","title":"TypoScript","alias":["tsconfig"]},{"filename":"unrealscript","title":"UnrealScript","alias":["uscript","uc"]},{"filename":"uorazor","title":"UO Razor Script"},{"filename":"uri","title":"URI","alias":["url"]},{"filename":"v","title":"V"},{"filename":"vala","title":"Vala"},{"filename":"vbnet","title":"VB.Net"},{"filename":"velocity","title":"Velocity"},{"filename":"verilog","title":"Verilog"},{"filename":"vhdl","title":"VHDL"},{"filename":"vim","title":"vim"},{"filename":"visual-basic","title":"Visual Basic","alias":["vb","vba"]},{"filename":"warpscript","title":"WarpScript"},{"filename":"wasm","title":"WebAssembly"},{"filename":"web-idl","title":"Web IDL","alias":["webidl"]},{"filename":"wgsl","title":"WGSL"},{"filename":"wiki","title":"Wiki markup"},{"filename":"wolfram","title":"Wolfram language","alias":["mathematica","nb","wl"]},{"filename":"wren","title":"Wren"},{"filename":"xeora","title":"Xeora","alias":["xeoracube"]},{"filename":"xml-doc","title":"XML doc (.net)"},{"filename":"xojo","title":"Xojo (REALbasic)"},{"filename":"xquery","title":"XQuery"},{"filename":"yaml","title":"YAML","alias":["yml"]},{"filename":"yang","title":"YANG"},{"filename":"zig","title":"Zig"}]')},95:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n(140),r=n.n(i),o=n(22);function a(e){var t=document.getElementById("variables-nn"),n=document.getElementsByTagName("head")[0];t&&n.removeChild(t);var i=document.createElement("style");i.type="text/css",i.id="variables-nn",i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e)),n.insertBefore(i,function(){var e,t=Object(o.a)(document.getElementsByTagName("style"));try{for(t.s();!(e=t.n()).done;){var n=e.value;if(n.innerHTML.includes("#root"))return n}}catch(i){t.e(i)}finally{t.f()}}())}function c(e){var t=":root {";for(var n in e)t+="--nn_".concat(n,": ").concat(e[n],";");return t+"}"}var l={accent:"#008837",shade:"#00883712",fg:"#008837",normal:"black",icon:"gray",transGray:"#00000010",errorBg:"#FFB6C1",errorText:"#ff6961",successBg:"#DFF2BF",successText:"#4F8A10",warningBg:"#FF990020",warningText:"#FF9900",red:"#f44336",orange:"#FF9800",yellow:"#FFD600",green:"#4CAF50",blue:"#2196F3",purple:"#673AB7",gray:"#9E9E9E",discord:"#5865F2",night:!1,bg:"#ffffff",navbg:"#f7f7f7",nav:"#f7f7f7",pri:"#424242",sec:"white",light:"#ffffff",input:"transparent",heading:"#212121",border:"#E8E8E8",placeholder:"#a9a9a9"};a(c(l));var s=r()((function(e,t){return{colors:l,setColors:function(t){a(c(t)),e({colors:t})}}}))}},[[201,2,3]]]);
\ No newline at end of file