From 0c0ea4dc354327b20274ecf2c0052015d61fa2dd Mon Sep 17 00:00:00 2001 From: TheodoreChu <22967798+TheodoreChu@users.noreply.github.com> Date: Fri, 22 Jan 2021 18:53:59 -0800 Subject: [PATCH] chore(version): v1.2.4 --- build/alpha.ext.json | 4 ++-- build/asset-manifest.json | 6 +++--- build/beta.ext.json | 4 ++-- build/index.html | 2 +- build/package.json | 2 +- build/sample.ext.json | 2 +- .../js/{main.7e0f6b25.chunk.js => main.000c5a19.chunk.js} | 4 ++-- ...ain.7e0f6b25.chunk.js.map => main.000c5a19.chunk.js.map} | 2 +- package.json | 2 +- public/alpha.ext.json | 4 ++-- public/beta.ext.json | 4 ++-- public/package.json | 2 +- public/sample.ext.json | 2 +- src/components/Help.tsx | 2 +- 14 files changed, 21 insertions(+), 21 deletions(-) rename build/static/js/{main.7e0f6b25.chunk.js => main.000c5a19.chunk.js} (99%) rename build/static/js/{main.7e0f6b25.chunk.js.map => main.000c5a19.chunk.js.map} (99%) diff --git a/build/alpha.ext.json b/build/alpha.ext.json index 61ab5f90..3f0881ac 100644 --- a/build/alpha.ext.json +++ b/build/alpha.ext.json @@ -3,10 +3,10 @@ "name": "Append Editor - Alpha", "content_type": "SN|Component", "area": "editor-editor", - "version": "1.2.3", + "version": "1.2.4", "description": "Append to your notes", "url": "https://alpha.appendeditor.com", - "download_url": "https://github.com/TheodoreChu/append-editor/releases/download/v1.2.3/append-editor-build-v1.2.3.zip", + "download_url": "https://github.com/TheodoreChu/append-editor/releases/download/v1.2.4/append-editor-build-v1.2.4.zip", "latest_url": "https://raw.githubusercontent.com/TheodoreChu/append-editor/main/public/alpha.ext.json", "marketing_url": "https://appendeditor.com", "thumbnail_url": "" diff --git a/build/asset-manifest.json b/build/asset-manifest.json index 9be768c2..bab39309 100644 --- a/build/asset-manifest.json +++ b/build/asset-manifest.json @@ -5,8 +5,8 @@ "static/js/1.10d1e0a8.chunk.js": "./static/js/1.10d1e0a8.chunk.js", "static/js/1.10d1e0a8.chunk.js.map": "./static/js/1.10d1e0a8.chunk.js.map", "main.css": "./static/css/main.dceb5629.chunk.css", - "main.js": "./static/js/main.7e0f6b25.chunk.js", - "main.js.map": "./static/js/main.7e0f6b25.chunk.js.map", + "main.js": "./static/js/main.000c5a19.chunk.js", + "main.js.map": "./static/js/main.000c5a19.chunk.js.map", "runtime-main.js": "./static/js/runtime-main.b05d359d.js", "runtime-main.js.map": "./static/js/runtime-main.b05d359d.js.map", "static/css/4.2f15ad22.chunk.css": "./static/css/4.2f15ad22.chunk.css", @@ -162,6 +162,6 @@ "static/css/4.2f15ad22.chunk.css", "static/js/4.a5c7e97b.chunk.js", "static/css/main.dceb5629.chunk.css", - "static/js/main.7e0f6b25.chunk.js" + "static/js/main.000c5a19.chunk.js" ] } \ No newline at end of file diff --git a/build/beta.ext.json b/build/beta.ext.json index 7ba9642f..69b7921f 100644 --- a/build/beta.ext.json +++ b/build/beta.ext.json @@ -3,10 +3,10 @@ "name": "Append Editor - Beta", "content_type": "SN|Component", "area": "editor-editor", - "version": "1.2.3", + "version": "1.2.4", "description": "Append to your notes", "url": "https://beta.appendeditor.com", - "download_url": "https://github.com/TheodoreChu/append-editor/releases/download/v1.2.3/append-editor-build-v1.2.3.zip", + "download_url": "https://github.com/TheodoreChu/append-editor/releases/download/v1.2.4/append-editor-build-v1.2.4.zip", "latest_url": "https://raw.githubusercontent.com/TheodoreChu/append-editor/main/public/beta.ext.json", "marketing_url": "https://appendeditor.com", "thumbnail_url": "" diff --git a/build/index.html b/build/index.html index aaf0e219..d127471a 100644 --- a/build/index.html +++ b/build/index.html @@ -1 +1 @@ -Append Editor
\ No newline at end of file +Append Editor
\ No newline at end of file diff --git a/build/package.json b/build/package.json index 6d3dea3b..35b69e6b 100644 --- a/build/package.json +++ b/build/package.json @@ -1,6 +1,6 @@ { "name": "append-editor", - "version": "1.2.3", + "version": "1.2.4", "description": "Append to your notes", "keywords": [ "Append Editor", diff --git a/build/sample.ext.json b/build/sample.ext.json index 5e4f9761..cb579116 100644 --- a/build/sample.ext.json +++ b/build/sample.ext.json @@ -3,7 +3,7 @@ "name": "Append Editor - Develop Local", "content_type": "SN|Component", "area": "editor-editor", - "version": "1.2.3", + "version": "1.2.4", "description": "Append to your notes", "url": "http://localhost:3000/index.html", "download_url": "", diff --git a/build/static/js/main.7e0f6b25.chunk.js b/build/static/js/main.000c5a19.chunk.js similarity index 99% rename from build/static/js/main.7e0f6b25.chunk.js rename to build/static/js/main.000c5a19.chunk.js index 3d9c5c3a..e0587775 100644 --- a/build/static/js/main.7e0f6b25.chunk.js +++ b/build/static/js/main.000c5a19.chunk.js @@ -1,2 +1,2 @@ -(this["webpackJsonpappend-editor"]=this["webpackJsonpappend-editor"]||[]).push([[2],{1174:function(e,t,o){},1175:function(e,t,o){"use strict";o.r(t);var n=o(6),i=o(24),s=o.n(i),a=o(151),r=o.n(a);o(455),Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));var c=function(e){e&&e instanceof Function&&o.e(73).then(o.bind(null,1181)).then((function(t){var o=t.getCLS,n=t.getFID,i=t.getFCP,s=t.getLCP,a=t.getTTFB;o(e),n(e),i(e),s(e),a(e)}))},l=o(181),d=o(0),p=o(1),h=o(4),u=o(5),j=o(311),g="var(--sn-stylekit-info-color)",b="var(--sn-stylekit-foreground-color)",f=function(e){var t=e.fill,o=e.role;return Object(n.jsx)("span",{className:"chevron-icon down",children:Object(n.jsx)("svg",{"aria-label":"chevron icon down",role:o,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M6.17622 7.15015L10.0012 10.9751L13.8262 7.15015L15.0012 8.33348L10.0012 13.3335L5.00122 8.33348L6.17622 7.15015Z",fill:t||b})})})},x=function(e){var t=e.fill,o=e.role;return Object(n.jsx)("span",{className:"chevron-icon right",children:Object(n.jsx)("svg",{"aria-label":"chevron icon down",role:o,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M6.90918 14.0667L10.7342 10.2417L6.90918 6.4167L8.09251 5.2417L13.0925 10.2417L8.09251 15.2417L6.90918 14.0667Z",fill:t||b})})})},m=function(e){var t=e.fill,o=e.role;return Object(n.jsx)("svg",{"aria-label":"close icon",role:o,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M15.2459 5.92917C15.5704 5.6047 15.5704 5.07864 15.2459 4.75417C14.9214 4.4297 14.3954 4.4297 14.0709 4.75417L10.0001 8.82501L5.92925 4.75417C5.60478 4.4297 5.07872 4.4297 4.75425 4.75417C4.42978 5.07864 4.42978 5.6047 4.75425 5.92917L8.82508 10L4.75425 14.0708C4.42978 14.3953 4.42978 14.9214 4.75425 15.2458C5.07872 15.5703 5.60478 15.5703 5.92925 15.2458L10.0001 11.175L14.0709 15.2458C14.3954 15.5703 14.9214 15.5703 15.2459 15.2458C15.5704 14.9214 15.5704 14.3953 15.2459 14.0708L11.1751 10L15.2459 5.92917Z",fill:t||b})})},v=function(e){var t=e.fill,o=e.role;return Object(n.jsx)("svg",{"aria-label":"copy icon",role:o,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M1.66724 3.66626C1.66724 2.56169 2.56267 1.66626 3.66724 1.66626H11.3339C12.4385 1.66626 13.3339 2.56169 13.3339 3.66626V13.3329H3.66724C2.56267 13.3329 1.66724 12.4375 1.66724 11.3329V3.66626ZM16.3339 6.66626C17.4385 6.66626 18.3339 7.56169 18.3339 8.66626V16.3329C18.3339 17.4375 17.4385 18.3329 16.3339 18.3329H8.66724C7.56267 18.3329 6.66724 17.4375 6.66724 16.3329V14.9996H15.0006V6.66626H16.3339ZM3.3339 3.33293V11.6663H11.6672V3.33293H3.3339Z",fill:t||b})})},O=function(e){var t=e.condition,o=e.fill,i=e.role;return Object(n.jsx)("svg",{"aria-label":"eye icon",role:i,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M9.99992 7.5C9.33688 7.5 8.70099 7.76339 8.23215 8.23223C7.76331 8.70107 7.49992 9.33696 7.49992 10C7.49992 10.663 7.76331 11.2989 8.23215 11.7678C8.70099 12.2366 9.33688 12.5 9.99992 12.5C10.663 12.5 11.2988 12.2366 11.7677 11.7678C12.2365 11.2989 12.4999 10.663 12.4999 10C12.4999 9.33696 12.2365 8.70107 11.7677 8.23223C11.2988 7.76339 10.663 7.5 9.99992 7.5ZM9.99992 14.1667C8.89485 14.1667 7.83504 13.7277 7.05364 12.9463C6.27224 12.1649 5.83325 11.1051 5.83325 10C5.83325 8.89493 6.27224 7.83512 7.05364 7.05372C7.83504 6.27232 8.89485 5.83333 9.99992 5.83333C11.105 5.83333 12.1648 6.27232 12.9462 7.05372C13.7276 7.83512 14.1666 8.89493 14.1666 10C14.1666 11.1051 13.7276 12.1649 12.9462 12.9463C12.1648 13.7277 11.105 14.1667 9.99992 14.1667ZM9.99992 3.75C5.83325 3.75 2.27492 6.34167 0.833252 10C2.27492 13.6583 5.83325 16.25 9.99992 16.25C14.1666 16.25 17.7249 13.6583 19.1666 10C17.7249 6.34167 14.1666 3.75 9.99992 3.75Z",fill:o||(t?g:b)})})},w=function(e){var t=e.condition,o=e.fill,i=e.role;return Object(n.jsx)("svg",{"aria-label":"gear icon",role:i,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M10.0001 6.66675C10.8842 6.66675 11.732 7.01794 12.3571 7.64306C12.9823 8.26818 13.3334 9.11603 13.3334 10.0001C13.3334 10.8841 12.9823 11.732 12.3571 12.3571C11.732 12.9822 10.8842 13.3334 10.0001 13.3334C9.11606 13.3334 8.26821 12.9822 7.64309 12.3571C7.01797 11.732 6.66678 10.8841 6.66678 10.0001C6.66678 9.11603 7.01797 8.26818 7.64309 7.64306C8.26821 7.01794 9.11606 6.66675 10.0001 6.66675ZM10.0001 8.33342C9.55808 8.33342 9.13416 8.50901 8.8216 8.82157C8.50904 9.13413 8.33344 9.55805 8.33344 10.0001C8.33344 10.4421 8.50904 10.866 8.8216 11.1786C9.13416 11.4912 9.55808 11.6667 10.0001 11.6667C10.4421 11.6667 10.8661 11.4912 11.1786 11.1786C11.4912 10.866 11.6668 10.4421 11.6668 10.0001C11.6668 9.55805 11.4912 9.13413 11.1786 8.82157C10.8661 8.50901 10.4421 8.33342 10.0001 8.33342ZM8.33344 18.3334C8.12511 18.3334 7.95011 18.1834 7.91678 17.9834L7.60844 15.7751C7.08344 15.5667 6.63344 15.2834 6.20011 14.9501L4.12511 15.7917C3.94178 15.8584 3.71678 15.7917 3.61678 15.6084L1.95011 12.7251C1.84178 12.5417 1.89178 12.3167 2.05011 12.1917L3.80844 10.8084L3.75011 10.0001L3.80844 9.16675L2.05011 7.80841C1.89178 7.68341 1.84178 7.45841 1.95011 7.27508L3.61678 4.39175C3.71678 4.20841 3.94178 4.13341 4.12511 4.20842L6.20011 5.04175C6.63344 4.71675 7.08344 4.43341 7.60844 4.22508L7.91678 2.01675C7.95011 1.81675 8.12511 1.66675 8.33344 1.66675H11.6668C11.8751 1.66675 12.0501 1.81675 12.0834 2.01675L12.3918 4.22508C12.9168 4.43341 13.3668 4.71675 13.8001 5.04175L15.8751 4.20842C16.0584 4.13341 16.2834 4.20841 16.3834 4.39175L18.0501 7.27508C18.1584 7.45841 18.1084 7.68341 17.9501 7.80841L16.1918 9.16675L16.2501 10.0001L16.1918 10.8334L17.9501 12.1917C18.1084 12.3167 18.1584 12.5417 18.0501 12.7251L16.3834 15.6084C16.2834 15.7917 16.0584 15.8667 15.8751 15.7917L13.8001 14.9584C13.3668 15.2834 12.9168 15.5667 12.3918 15.7751L12.0834 17.9834C12.0501 18.1834 11.8751 18.3334 11.6668 18.3334H8.33344ZM9.37511 3.33341L9.06678 5.50841C8.06678 5.71675 7.18344 6.25008 6.54178 6.99175L4.53344 6.12508L3.90844 7.20841L5.66678 8.50008C5.33344 9.47508 5.33344 10.5334 5.66678 11.5001L3.90011 12.8001L4.52511 13.8834L6.55011 13.0167C7.19178 13.7501 8.06678 14.2834 9.05844 14.4834L9.36678 16.6667H10.6334L10.9418 14.4917C11.9334 14.2834 12.8084 13.7501 13.4501 13.0167L15.4751 13.8834L16.1001 12.8001L14.3334 11.5084C14.6668 10.5334 14.6668 9.47508 14.3334 8.50008L16.0918 7.20841L15.4668 6.12508L13.4584 6.99175C12.8168 6.25008 11.9334 5.71675 10.9334 5.51675L10.6251 3.33341H9.37511Z",fill:o||(t?g:b)})})},M=function(e){var t=e.condition,o=e.fill,i=e.role;return Object(n.jsx)("svg",{"aria-label":"help icon",role:i,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M9.16675 15.0001H10.8334V13.3334H9.16675V15.0001ZM10.0001 1.66675C8.90573 1.66675 7.8221 1.8823 6.81105 2.30109C5.80001 2.71987 4.88135 3.3337 4.10753 4.10753C2.54472 5.67033 1.66675 7.78995 1.66675 10.0001C1.66675 12.2102 2.54472 14.3298 4.10753 15.8926C4.88135 16.6665 5.80001 17.2803 6.81105 17.6991C7.8221 18.1179 8.90573 18.3334 10.0001 18.3334C12.2102 18.3334 14.3298 17.4554 15.8926 15.8926C17.4554 14.3298 18.3334 12.2102 18.3334 10.0001C18.3334 8.90573 18.1179 7.8221 17.6991 6.81105C17.2803 5.80001 16.6665 4.88135 15.8926 4.10753C15.1188 3.3337 14.2002 2.71987 13.1891 2.30109C12.1781 1.8823 11.0944 1.66675 10.0001 1.66675ZM10.0001 16.6668C6.32508 16.6668 3.33342 13.6751 3.33342 10.0001C3.33342 6.32508 6.32508 3.33342 10.0001 3.33342C13.6751 3.33342 16.6668 6.32508 16.6668 10.0001C16.6668 13.6751 13.6751 16.6668 10.0001 16.6668ZM10.0001 5.00008C9.11603 5.00008 8.26818 5.35127 7.64306 5.97639C7.01794 6.60151 6.66675 7.44936 6.66675 8.33342H8.33342C8.33342 7.89139 8.50901 7.46747 8.82157 7.1549C9.13413 6.84234 9.55806 6.66675 10.0001 6.66675C10.4421 6.66675 10.866 6.84234 11.1786 7.1549C11.4912 7.46747 11.6667 7.89139 11.6667 8.33342C11.6667 10.0001 9.16675 9.79175 9.16675 12.5001H10.8334C10.8334 10.6251 13.3334 10.4167 13.3334 8.33342C13.3334 7.44936 12.9822 6.60151 12.3571 5.97639C11.732 5.35127 10.8841 5.00008 10.0001 5.00008Z",fill:o||(t?g:b)})})},y=function(e){var t=e.condition,o=e.fill,i=e.role;return Object(n.jsx)("svg",{"aria-label":"menu icon",role:i,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M17 5V6.66667H3V5H17ZM3 15H17V13.3333H3V15ZM3 10.8333H17V9.16667H3V10.8333Z",fill:o||(t?g:b)})})},C=function(e){var t=e.condition,o=e.fill,i=e.role;return Object(n.jsx)("svg",{"aria-label":"pencil icon",role:i,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M11.7167 7.5L12.5 8.28333L4.93333 15.8333H4.16667V15.0667L11.7167 7.5ZM14.7167 2.5C14.5083 2.5 14.2917 2.58333 14.1333 2.74167L12.6083 4.26667L15.7333 7.39167L17.2583 5.86667C17.5833 5.54167 17.5833 5 17.2583 4.69167L15.3083 2.74167C15.1417 2.575 14.9333 2.5 14.7167 2.5ZM11.7167 5.15833L2.5 14.375V17.5H5.625L14.8417 8.28333L11.7167 5.15833Z",fill:o||(t?g:b)})})},E=function(e){var t=e.condition,o=e.fill,i=e.role;return Object(n.jsx)("svg",{role:i,"aria-label":"plus icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.385 11.385H15.615C16.3799 11.385 17 10.7649 17 10C17 9.23507 16.3799 8.61497 15.615 8.61497H11.385V4.38503C11.385 3.6201 10.7649 3 10 3C9.23507 3 8.61497 3.6201 8.61497 4.38503V8.61497H4.38503C3.6201 8.61497 3 9.23507 3 10C3 10.7649 3.6201 11.385 4.38503 11.385H8.61497V15.615C8.61497 16.3799 9.23507 17 10 17C10.7649 17 11.385 16.3799 11.385 15.615V11.385Z",fill:o||(t?g:b)})})},S=function(e){var t=e.fill,o=e.role;return Object(n.jsx)("svg",{"aria-label":"print icon",role:o,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M15.0001 2.5H5.00008V5.83333H15.0001V2.5ZM15.8334 10C15.6124 10 15.4004 9.9122 15.2442 9.75592C15.0879 9.59964 15.0001 9.38768 15.0001 9.16667C15.0001 8.94565 15.0879 8.73369 15.2442 8.57741C15.4004 8.42113 15.6124 8.33333 15.8334 8.33333C16.0544 8.33333 16.2664 8.42113 16.4227 8.57741C16.579 8.73369 16.6668 8.94565 16.6668 9.16667C16.6668 9.38768 16.579 9.59964 16.4227 9.75592C16.2664 9.9122 16.0544 10 15.8334 10ZM13.3334 15.8333H6.66675V11.6667H13.3334V15.8333ZM15.8334 6.66667H4.16675C3.50371 6.66667 2.86782 6.93006 2.39898 7.3989C1.93014 7.86774 1.66675 8.50363 1.66675 9.16667V14.1667H5.00008V17.5H15.0001V14.1667H18.3334V9.16667C18.3334 8.50363 18.07 7.86774 17.6012 7.3989C17.1323 6.93006 16.4965 6.66667 15.8334 6.66667Z",fill:t||b})})},k=function(e){var t=e.fill,o=e.role;return Object(n.jsx)("svg",{"aria-label":"refresh icon",role:o,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M9.99992 14.9999C8.67384 14.9999 7.40207 14.4731 6.46438 13.5355C5.5267 12.5978 4.99992 11.326 4.99992 9.99992C4.99992 9.16658 5.20825 8.35825 5.58325 7.66658L4.36659 6.44992C3.71659 7.47492 3.33325 8.69158 3.33325 9.99992C3.33325 11.768 4.03563 13.4637 5.28587 14.714C6.53612 15.9642 8.23181 16.6666 9.99992 16.6666V19.1666L13.3333 15.8332L9.99992 12.4999V14.9999ZM9.99992 3.33325V0.833252L6.66658 4.16658L9.99992 7.49992V4.99992C11.326 4.99992 12.5978 5.5267 13.5355 6.46438C14.4731 7.40207 14.9999 8.67383 14.9999 9.99992C14.9999 10.8333 14.7916 11.6416 14.4166 12.3333L15.6333 13.5499C16.2833 12.5249 16.6666 11.3083 16.6666 9.99992C16.6666 8.23181 15.9642 6.53612 14.714 5.28587C13.4637 4.03563 11.768 3.33325 9.99992 3.33325Z",fill:t||b})})},T=function(e){var t=e.fill,o=e.role;return Object(n.jsx)("svg",{"aria-label":"undo icon",role:o,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M10.1812 7.66667C8.36883 7.66667 6.72741 8.33333 5.46214 9.4L3 7V13H9.15535L6.67953 10.5867C7.63019 9.81333 8.84074 9.33333 10.1812 9.33333C12.6023 9.33333 14.661 10.8733 15.3791 13L17 12.48C16.0493 9.68667 13.3615 7.66667 10.1812 7.66667Z",fill:t||b})})},L=function(e){var t=e.cancelText,o=e.confirmText,i=e.helpLink,s=e.onCancel,a=e.onConfirm,r=e.onUndo,c=e.title;return Object(n.jsx)("div",{className:"note-overlay",children:Object(n.jsxs)("div",{className:"sk-panel note-dialog",children:[Object(n.jsx)("div",{className:"sk-panel-content",children:Object(n.jsxs)("div",{className:"sk-panel-section",children:[Object(n.jsxs)("div",{className:"sk-panel-row title-section",children:[Object(n.jsx)("h2",{children:c}),Object(n.jsx)("button",{id:"undoDialog",onClick:r,title:"Close",children:Object(n.jsx)(m,{role:"button"})})]}),Object(n.jsxs)("p",{children:["Need help deciding? Check out the"," ",Object(n.jsx)("a",{href:i,target:"_blank",rel:"noopener noreferrer",children:"documentation"}),"."]})]})}),Object(n.jsx)("div",{className:"sk-panel-footer",children:Object(n.jsxs)("div",{className:"sk-button-group stretch",children:[Object(n.jsx)("button",{className:"sk-button neutral",onClick:s,children:Object(n.jsx)("div",{children:t})}),Object(n.jsx)("button",{className:"sk-button info",onClick:a,children:Object(n.jsx)("div",{children:o})})]})})]})})},N=o(242),B="MonacoEditorContainer",D="MonacoDiffEditorContainer";self.MonacoEnvironment={getWorkerUrl:function(e,t){return"json"===t?"./monaco/json.worker.bundle.js":"css"===t||"scss"===t||"less"===t?"./monaco/css.worker.bundle.js":"html"===t||"handlebars"===t||"razor"===t?"./monaco/html.worker.bundle.js":"typescript"===t||"javascript"===t?"./monaco/ts.worker.bundle.js":"./monaco/editor.worker.bundle.js"}};var A=function(e){var t,o=e.fontSize,s=void 0===o?"16":o,a=e.id,r=void 0===a?B:a,c=e.language,l=void 0===c?"markdown":c,d=e.saveText,p=e.tabSize,h=void 0===p?2:p,u=e.text,j=e.theme,g=void 0===j?"vs-dark":j,b=e.viewMode,f=void 0!==b&&b,x=Object(i.useRef)(null);""===s&&(s="16px");var m=!0;return f&&(m=!1),Object(i.useEffect)((function(){return x.current&&((t=N.a.create(x.current,{fontSize:parseInt(s.replace("px","")),language:l,tabSize:h,theme:g,scrollBeyondLastLine:m,value:[u].join("\n"),autoClosingOvertype:"auto",formatOnPaste:!0,formatOnType:!0,wordWrap:"on",wrappingStrategy:"advanced"})).onKeyDown((function(e){!function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&console.log("IKeyboardEvent Up: "+e)}(e.code,false),e.ctrlKey&&"KeyS"===e.code&&e.preventDefault()})),t.onKeyUp((function(e){!function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&console.log("IKeyboardEvent Up: "+e)}(e.code,false)})),t.onDidChangeModelContent((function(e){d&&d(t.getValue())}))),function(){t.dispose()}}),[]),Object(n.jsx)("div",{id:r,className:B,ref:x})},V=function(e){var t,o=e.fontSize,s=void 0===o?"16":o,a=e.id,r=void 0===a?D:a,c=e.language,l=void 0===c?"markdown":c,d=e.saveText,p=e.text,h=e.modifiedText,u=e.theme,j=void 0===u?"vs-dark":u,g=Object(i.useRef)(null);return""===s&&(s="16px"),Object(i.useEffect)((function(){if(g.current){var e=N.a.createModel([p].join("\n"),l),o=N.a.createModel([h].join("\n"),l);(t=N.a.createDiffEditor(g.current,{fontSize:parseInt(s.replace("px","")),theme:j,autoClosingOvertype:"auto",formatOnPaste:!0,formatOnType:!0,wordWrap:"on",wrappingStrategy:"advanced",originalEditable:!0,readOnly:!0})).setModel({original:e,modified:o}),e.onDidChangeContent((function(t){d&&d(e.getValue())}))}return function(){t.dispose()}}),[]),Object(n.jsx)("div",{id:r,className:D,ref:g})},H=o(440),K=o.n(H),I=o(441),F=o.n(I),P=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(){return Object(d.a)(this,o),t.apply(this,arguments)}return Object(p.a)(o,[{key:"render",value:function(){var e=this.props.attrs.matches[1];return Object(n.jsx)("iframe",{title:"Youtube Embed ".concat(e),className:this.props.isSelected?"YouTube ProseMirror-selectednode":"YouTube",src:"https://www.youtube.com/embed/".concat(e,"?modestbranding=1")})}}]),o}(i.Component),U=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;return Object(d.a)(this,o),(n=t.call(this,e)).handleToggleReadOnly=function(){n.setState({readOnly:!n.state.readOnly})},n.handleChange=K()((function(e){var t=e();n.props.debugMode&&console.log(t),n.props.onChange(t)}),50),n.state={readOnly:n.props.readOnly,template:!1,value:void 0},n}return Object(p.a)(o,[{key:"render",value:function(){var e=this;return Object(n.jsx)(F.a,{className:"DynamicEditor",placeholder:"Type '/' to insert...",id:"DynamicEditor",readOnly:this.state.readOnly,readOnlyWriteCheckboxes:!0,value:this.state.value,defaultValue:this.props.text,scrollTo:window.location.hash,onCancel:function(){e.props.debugMode&&console.log("Cancel triggered")},autoFocus:!0,onChange:function(t){return e.handleChange(t)},embeds:[{title:"YouTube",keywords:"youtube video tube google",icon:function(){return Object(n.jsx)("img",{alt:"YouTube Logo",src:"/icons/ic-YouTube.svg",width:24,height:24})},matcher:function(e){return e.match(/(?:https?:\/\/)?(?:www\.)?youtu\.?be(?:\.com)?\/?.*(?:watch|embed)?(?:.*v=|v\/|\/)([a-zA-Z0-9_-]{11})$/i)},component:P}]})}}]),o}(i.Component),z=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;return Object(d.a)(this,o),(n=t.call(this,e)).handleInputChange=function(e){var t=e.target.value;n.setState({text:t},(function(){n.props.saveText(n.state.text)}))},n.saveText=function(e){n.setState({text:e},(function(){n.props.saveText(n.state.text)}))},n.onBlur=function(e){var t=document.getElementById(Ge.content);t&&t.classList.remove(qe.focused)},n.onFocus=function(e){var t=document.getElementById(Ge.content);t&&t.classList.add(qe.focused)},n.onKeyDown=function(e){n.props.onKeyDown(e),n.props.onKeyDownEditTextArea(e),n.props.onKeyDownTextArea(e)},n.onKeyUp=function(e){n.props.keyMap.delete(e.key),n.props.onKeyUp(e)},n.state={text:n.props.text},n}return Object(p.a)(o,[{key:"render",value:function(){var e=this.state.text;return Object(n.jsx)("div",{className:"sk-panel main edit "+(this.props.editingMode===Xe.useMonacoEditor?"monacoEditor":this.props.editingMode===Xe.useDynamicEditor?"dynamicEditor":"otherEditor"),children:Object(n.jsx)("div",{className:"sk-panel-content edit"+(this.props.editingMode===Xe.useMonacoEditor?" MonacoEditorContainerParentDiv":""),id:Ge.edit,children:this.props.editingMode===Xe.useMonacoEditor?Object(n.jsx)(A,{fontSize:this.props.fontSize,language:this.props.monacoEditorLanguage,saveText:this.saveText,text:e,viewMode:this.props.viewMode}):this.props.editingMode===Xe.useDynamicEditor?Object(n.jsx)("div",{id:"dynamicEditor",children:Object(n.jsx)(U,{debugMode:this.props.debugMode,text:e,onChange:this.saveText,readOnly:!1})}):Object(n.jsx)("textarea",{id:Ge.editTextArea,name:"text",className:"sk-input contrast textarea editnote",placeholder:"Welcome to the Append Editor! \ud83d\ude04",rows:15,spellCheck:"true",value:e,onBlur:this.onBlur,onChange:this.handleInputChange,onFocus:this.onFocus,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp})})})}}]),o}(s.a.Component);z.defaultProps={};var R=function(){var e=document.getElementById(Ge.appendButton);e&&e.click()},W=function(){var e=document.getElementById(Ge.editButton);e&&e.click()},_=function(){var e=document.getElementById(Ge.helpButton);e&&e.click()},Z=function(){var e=document.getElementById(Ge.menuButton);e&&e.click()},Y=function(){var e=document.getElementById(Ge.settingsButton);e&&e.click()},G=function(){var e=document.getElementById(Ge.viewButton);e&&e.click()},q=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;return Object(d.a)(this,o),(n=t.call(this,e)).onToggleShowFeelings=function(){n.setState({showFeelings:!n.state.showFeelings})},n.onToggleShowMoreQuestions=function(){n.setState({showMoreQuestions:!n.state.showMoreQuestions})},n.onToggleShowFeedback=function(){n.setState({showFeedback:!n.state.showFeedback})},n.state={showFeelings:!1,showMoreQuestions:!1,showFeedback:!1},n}return Object(p.a)(o,[{key:"render",value:function(){return Object(n.jsxs)("div",{id:"help",children:[Object(n.jsx)("hr",{}),Object(n.jsx)("h2",{children:"Append Editor Help"}),Object(n.jsxs)("p",{children:["The Append Editor is an ",Object(n.jsx)("b",{children:"unofficial"})," ",Object(n.jsx)("a",{href:"https://standardnotes.org/help/77/what-are-editors",target:"_blank",rel:"nofollow noreferrer noopener",children:"editor"})," ","for"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/",target:"_blank",rel:"nofollow noreferrer noopener",children:"Standard Notes"}),", a free,"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/knowledge/5/what-is-free-and-open-source-software",target:"_blank",rel:"nofollow noreferrer noopener",children:"open-source"}),", and"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/knowledge/2/what-is-end-to-end-encryption",target:"_blank",rel:"nofollow noreferrer noopener",children:"end-to-end encrypted"})," ","notes app. The Append Editor is also free software licensed under"," ",Object(n.jsx)("a",{href:"https://github.com/TheodoreChu/append-editor/blob/main/LICENSE",target:"_blank",rel:"nofollow noreferrer noopener",children:"AGPL-3.0"}),". Its source code is available on"," ",Object(n.jsx)("a",{href:"https://github.com/TheodoreChu/append-editor",target:"_blank",rel:"nofollow noreferrer noopener",children:"GitHub"}),"."]}),Object(n.jsx)("h3",{children:"Append Editor Features"}),Object(n.jsxs)("p",{children:["The Append Editor supports"," ",Object(n.jsx)("a",{href:"https://guides.github.com/features/mastering-markdown/",target:"_blank",rel:"nofollow noreferrer noopener",children:"Markdown"})," ","with"," ",Object(n.jsx)("a",{href:"https://katex.org/docs/support_table.html",target:"_blank",rel:"nofollow noreferrer noopener",children:"KaTeX"}),", syntax highlighting, in-line HTML, table of contents, footnotes, auto-linking,"," ",Object(n.jsx)("a",{href:"https://github.com/ikatyang/emoji-cheat-sheet/blob/master/README.md",target:"_blank",rel:"nofollow noreferrer noopener",children:"emoji codes"}),", and more."," "]}),Object(n.jsxs)("p",{children:["There are four editing modes: Plain Textarea, CodeMirror, Dynamic, and Monaco. You can read about each mode and choose which to use in the Settings",Object(n.jsxs)("button",{className:"inline-text-and-svg",onClick:Y,title:"Open Settings",children:[Object(n.jsx)("span",{children:"\xa0"}),Object(n.jsx)(w,{role:"button"}),Object(n.jsx)("span",{children:"\xa0"})]}),". You can also choose default and per-note font sizes, font families, and custom styles (CSS)."]}),Object(n.jsxs)("p",{children:["The Menu",Object(n.jsxs)("button",{className:"inline-text-and-svg",onClick:Z,title:"Open the Menu",children:[Object(n.jsx)("span",{children:"\xa0"}),Object(n.jsx)(y,{role:"button"}),Object(n.jsx)("span",{children:"\xa0"})]}),"has additional options to customize the appearance of the editor, share your note, and perform actions to quickly format and edit Markdown text."]}),Object(n.jsxs)("p",{children:["A more detailed documentation of the Append Editor is available at"," ",Object(n.jsx)("a",{href:"https://appendeditor.com",target:"_blank",rel:"noopener noreferrer",children:"appendeditor.com"}),". If you like the Append Editor, please support it by giving it a star on"," ",Object(n.jsx)("a",{href:"https://github.com/TheodoreChu/append-editor/stargazers",target:"_blank",rel:"noopener noreferrer",children:"GitHub"}),"."," ",Object(n.jsx)("span",{role:"img","aria-label":"smile emoji",children:"\ud83d\ude42"})," "]}),Object(n.jsx)("h3",{children:"How to install the Append Editor in Standard Notes"}),Object(n.jsxs)("ol",{children:[Object(n.jsxs)("li",{children:["Download, install, and sign in to the Standard Notes"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/download",target:"_blank",rel:"noopener noreferrer",children:"Desktop"})," ","app."]}),Object(n.jsxs)("li",{children:["In the bottom left corner of the app, click ",Object(n.jsx)("b",{children:"Extensions"}),"."]}),Object(n.jsxs)("li",{children:["Click ",Object(n.jsx)("b",{children:"Import Extensions"})," and paste the following link into the input box. If you want to use the alpha version, replace"," ",Object(n.jsx)("code",{children:"beta"})," with ",Object(n.jsx)("code",{children:"alpha"}),":"," ",Object(n.jsx)("code",{children:Object(n.jsx)("a",{href:"https://raw.githubusercontent.com/TheodoreChu/append-editor/main/public/beta.ext.json",target:"_blank",rel:"noopener noreferrer",children:"https://raw.githubusercontent.com/TheodoreChu/append-editor/main/public/beta.ext.json"})})]}),Object(n.jsxs)("li",{children:["Press ",Object(n.jsx)("b",{children:"Enter"})," or ",Object(n.jsx)("b",{children:"Return"})," on your keyboard."]}),Object(n.jsxs)("li",{children:["The title of your selected note is near the top of the app. Under the title, click ",Object(n.jsx)("b",{children:"Editor"}),", click ",Object(n.jsx)("b",{children:"Append Editor"}),", and click ",Object(n.jsx)("b",{children:"Continue"})," to begin using the editor. Enjoy!"," ",Object(n.jsx)("span",{role:"img","aria-label":"clap emoji",children:"\ud83d\udc4f"})," "]})]}),Object(n.jsxs)("p",{children:["After you install the editor on the desktop app, it will automatically sync to the"," ",Object(n.jsx)("a",{href:"https://app.standardnotes.org",target:"_blank",rel:"noopener noreferrer",children:"web"})," ","and"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/download",target:"_blank",rel:"noopener noreferrer",children:"mobile apps"})," ","after you sign in."]}),Object(n.jsx)("h3",{children:"What to write about"}),Object(n.jsx)("p",{children:"The Append Editor is great for writing articles, blog posts, checklists, code snippets, documentation, emails, essays, journals, lists, logs, notes, tables, todo lists, and much more. Here are some questions to help you get started with today's daily journal:"})," ",Object(n.jsxs)("ul",{children:[Object(n.jsx)("li",{children:"How are you? What's happening?"}),Object(n.jsx)("li",{children:"What might be affecting your mood?"}),Object(n.jsx)("li",{children:"Which feelings fit your mood and to what extent?"}),Object(n.jsxs)("details",{onToggle:this.onToggleShowFeelings,children:[Object(n.jsxs)("summary",{children:[!this.state.showFeelings&&[Object(n.jsx)("p",{className:"link",children:"Show feelings"})],this.state.showFeelings&&[Object(n.jsx)("p",{className:"link",children:"Hide feelings"})]]}),Object(n.jsxs)("li",{children:[Object(n.jsx)("b",{children:"Positive Feelings:"})," bold, calm, cheerful, confident, content, eager, ecstatic, energized, engaged, enthusiastic, excited, grateful, happy, humorous, inspired, joyful, light, lively, loving, motivated, optimistic, passionate, peaceful, playful, proud, reassured, refreshed, relaxed, relieved, satisfied, secure, surprised, thrilled, wonderful"]}),Object(n.jsxs)("li",{children:[Object(n.jsx)("b",{children:"Negative Feelings:"})," afraid, angry, annoyed, anxious, ashamed, bored, burnt out, confused, demoralized, depressed, disappointed, disgusted, distraught, embarrassed, empty, exhausted, frustrated, furious, guilty, heavy, insecure, irritated, jealous, jittery, lethargic, lonely, nervous, numb, resentful, sad, self-conscious, sleepy, stressed, tired, winded, worried"]})]}),Object(n.jsx)("li",{children:"What thoughts are contributing to the way you're feeling?"}),Object(n.jsx)("details",{onToggle:this.onToggleShowMoreQuestions,children:Object(n.jsxs)("summary",{children:[!this.state.showMoreQuestions&&[Object(n.jsx)("p",{className:"link",children:"Show more questions"})],this.state.showMoreQuestions&&[Object(n.jsx)("p",{className:"link",children:"Show fewer questions"})]]})}),this.state.showMoreQuestions&&[Object(n.jsxs)("div",{children:[Object(n.jsx)("li",{children:"What do you hope your life will look like in a week? a month? a year?"}),Object(n.jsx)("li",{children:"What can you do today to make your life the way you want it?"}),Object(n.jsx)("li",{children:"How will you feel when you've realized the goals that you have for yourself?"}),Object(n.jsx)("li",{children:"Who or what do you feel grateful for and why?"}),Object(n.jsx)("li",{children:"What did you enjoy about today?"})]})]]}),Object(n.jsxs)("details",{onToggle:this.onToggleShowFeedback,children:[Object(n.jsx)("summary",{children:Object(n.jsx)("p",{className:"link",children:"Need more help?"})}),this.state.showFeedback&&[Object(n.jsxs)("p",{children:["Feel free to"," ",Object(n.jsx)("a",{href:"https://appendeditor.com/contact",target:"_blank",rel:"noopener noreferrer",children:"reach out"})," ","if you have any questions, comments, concerns, or feedback."," ",Object(n.jsx)("span",{role:"img","aria-label":"wave emoji",children:"\ud83d\udc4b"}),Object(n.jsx)("br",{}),"If you find any bugs or have a feature request, please"," ",Object(n.jsx)("a",{href:"https://github.com/TheodoreChu/append-editor/issues",target:"_blank",rel:"noopener noreferrer",children:"open an issue on GitHub"}),"."," ",Object(n.jsx)("span",{role:"img","aria-label":"smile emoji",children:"\ud83d\ude42"}),Object(n.jsx)("br",{}),"You are using version ",Object(n.jsx)("code",{children:"1.2.3"}),". The release notes and change log are available on"," ",Object(n.jsx)("a",{href:"https://github.com/TheodoreChu/append-editor/releases",target:"_blank",rel:"noopener noreferrer",children:"GitHub"}),"."]})]]}),"Click Help",Object(n.jsxs)("button",{className:"inline-text-and-svg",onClick:_,title:"Close Help",children:[Object(n.jsx)("span",{children:"\xa0"}),Object(n.jsx)(M,{fill:"var(--sn-stylekit-info-color)",role:"button"}),Object(n.jsx)("span",{children:"\xa0"})]}),"to close this section.",Object(n.jsx)("hr",{})]})}}]),o}(s.a.Component),X=function(e){var t=e.appendMode,o=e.editMode,i=e.showHelp;return Object(n.jsx)("div",{id:"intro",children:Object(n.jsxs)("details",{children:[Object(n.jsxs)("summary",{children:["Welcome to the Append Editor!"," ",Object(n.jsx)("span",{role:"img","aria-label":"wave emoji",children:"\ud83d\udc4b"})," ","Your note is empty."," ",Object(n.jsx)("span",{role:"img","aria-label":"smile emoji",children:"\ud83d\ude42"})," ","Click here to get started."," ",Object(n.jsx)("span",{role:"img","aria-label":"memo emoji",children:"\ud83d\udcdd"})]}),Object(n.jsx)("p",{children:"To get started:"}),Object(n.jsxs)("ul",{children:[Object(n.jsx)("li",{children:Object(n.jsxs)("p",{children:["Click the Pencil",Object(n.jsxs)("button",{className:"inline-text-and-svg",onClick:W,title:"Toggle Edit Mode",children:[Object(n.jsx)("span",{children:"\xa0"}),Object(n.jsx)(C,{condition:o,role:"button"}),Object(n.jsx)("span",{children:"\xa0"})]}),"to toggle ",Object(n.jsx)("b",{children:"Edit Mode"})]})}),Object(n.jsx)("li",{children:Object(n.jsxs)("p",{children:["Click the Plus",Object(n.jsxs)("button",{className:"inline-text-and-svg",onClick:R,title:"Toggle Append Mode",children:[Object(n.jsx)("span",{children:"\xa0"}),Object(n.jsx)(E,{condition:t,role:"button"}),Object(n.jsx)("span",{children:"\xa0"})]}),"to toggle ",Object(n.jsx)("b",{children:"Append Mode"})]})})]}),Object(n.jsxs)("p",{children:[Object(n.jsx)("b",{children:"View Mode"})," is currently ",Object(n.jsx)("b",{children:"on"}),". When you type in"," ",Object(n.jsx)("b",{children:"Edit Mode"}),", your note will automatically render here. In"," ",Object(n.jsx)("b",{children:"Append Mode"}),", clicking ",Object(n.jsx)("b",{children:"Append"})," will add the text in the textarea to the end of your note. Click the Eye",Object(n.jsxs)("button",{className:"inline-text-and-svg",onClick:G,title:"Toggle View Mode",children:[Object(n.jsx)("span",{children:"\xa0"}),Object(n.jsx)(O,{condition:!0,role:"button"}),Object(n.jsx)("span",{children:"\xa0"})]}),"to turn ",Object(n.jsx)("b",{children:"View Mode"})," off and switch to ",Object(n.jsx)("b",{children:"Edit Only Mode"}),"."]}),Object(n.jsxs)("p",{children:["If you are using the demo at"," ",Object(n.jsx)("a",{href:"https://beta.appendeditor.com",target:"_blank",rel:"nofollow noreferrer noopener",children:"beta.appendeditor.com"}),", then your notes will be lost after you close the page."]}),Object(n.jsxs)("p",{children:["If you want to save your notes, then click Help",Object(n.jsxs)("button",{className:"inline-text-and-svg",onClick:_,title:"Toggle show Help",children:[Object(n.jsx)("span",{children:"\xa0"}),Object(n.jsx)(M,{condition:i,role:"button"}),Object(n.jsx)("span",{children:"\xa0"})]}),"and follow the instructions on how to install the Append Editor in"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/",target:"_blank",rel:"nofollow noreferrer noopener",children:"Standard Notes"}),", a free,"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/knowledge/5/what-is-free-and-open-source-software",target:"_blank",rel:"nofollow noreferrer noopener",children:"open-source"}),", and"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/knowledge/2/what-is-end-to-end-encryption",target:"_blank",rel:"nofollow noreferrer noopener",children:"end-to-end encrypted"})," ","notes app."]}),Object(n.jsxs)("p",{children:["If you like Standard Notes, please check out Standard Notes"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/extensions",target:"_blank",rel:"nofollow noreferrer noopener",children:"Extended"})," ","for more editors, themes, components, and methods to backup up your data."]}),Object(n.jsxs)("p",{children:["Happy note-taking!"," ",Object(n.jsx)("span",{role:"img","aria-label":"smile emoji",children:"\ud83d\ude04"})]})]})})},Q=o(309),J=o.n(Q),$=o(445),ee=o.n($),te=o(446),oe=o.n(te),ne=o(447),ie=o.n(ne),se=o(278),ae=o(889),re=o(890),ce=o(892),le=o(897),de=o(922),pe=o(924),he=o(932),ue=o(934),je=o(939),ge=o(1137),be=o(1158),fe=J()().use(ee.a).use(le).use(ae).use(he).use(ue,{maxDepth:6}).use(re).use(ce,{inlineNotes:!0}).use(de).use(oe.a,{allowDangerousHtml:!0}).use(be).use(pe).use(ge).use(je,{ignoreMissing:!0}).use(ie.a,{createElement:s.a.createElement}),xe=function(e){return fe.processSync(e).result},me=Object(se.throttle)((function(e){return e.length>1e4}),1e3),ve=Object(se.debounce)((function(e){return xe(e)}),500),Oe=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;return Object(d.a)(this,o),(n=t.call(this,e)).onToggleShowHelp=function(){var e=document.getElementById("helpButton");e&&e.click()},n.renderMarkdown=function(e){return function(e,t){return t?xe(e):me(e)?ve(e):xe(e)}(e,n.props.bypassDebounce)},n.state={showHelp:n.props.showHelp},n}return Object(p.a)(o,[{key:"render",value:function(){var e=this.props.text;return Object(n.jsx)("div",{className:"sk-panel main view"+(this.props.printURL?" printURL":""),children:Object(n.jsxs)("div",{className:"sk-panel-content view",id:Ge.view,children:[!e&&[Object(n.jsx)(X,{appendMode:this.props.appendMode,editMode:this.props.editMode,showHelp:this.props.showHelp})],this.state.showHelp&&[Object(n.jsx)(q,{debugMode:this.props.debugMode,printURL:this.props.printURL})],Object(n.jsx)("div",{id:"renderedNote",className:this.props.editingMode===Xe.useDynamicEditor?"":"rendered-note-section",children:this.props.editingMode===Xe.useMonacoEditor&&"markdown"!==this.props.monacoEditorLanguage&&"html"!==this.props.monacoEditorLanguage&&e?this.renderMarkdown("```"+this.props.monacoEditorLanguage+"\n"+e+"\n```"):this.props.editingMode===Xe.useDynamicEditor?Object(n.jsx)(U,{debugMode:this.props.debugMode,onChange:this.props.saveText,readOnly:!0,text:e}):this.renderMarkdown(e)})]})})}}]),o}(s.a.Component),we=o(38),Me=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;return Object(d.a)(this,o),(n=t.call(this,e)).handleInputChange=function(e){var t=e.target,o="checkbox"===t.type?t.checked:t.value,i=t.name;n.setState(Object(we.a)({},i,o),(function(){n.autoSaveCheckBoxes()}))},n.handleTextAreaChange=function(e){var t=e.target.value;n.setState({text:t},(function(){n.autoSaveAppendText()}))},n.saveText=function(e){n.setState({text:e},(function(){n.props.autoSaveAppendText(n.state.text)}))},n.appendTextToNote=function(){n.props.appendTextToNote(),n.setState({text:""});var e=document.getElementById(Ge.appendTextArea);e&&e.focus(),n.state.useMonacoEditor&&n.setState({useMonacoEditor:!1},(function(){n.setState({useMonacoEditor:!0})})),n.state.useDynamicEditor&&n.setState({useDynamicEditor:!1},(function(){n.setState({useDynamicEditor:!0})}))},n.autoSaveAppendText=function(){var e=n.state.text;n.props.autoSaveAppendText(e)},n.autoSaveCheckBoxes=function(){var e=n.state.newLine,t=n.state.newParagraph;n.props.autoSaveCheckBoxes(e,t)},n.onKeyDown=function(e){n.props.keyMap.set(e.key,!0),n.props.debugMode&&(console.log("Keys pressed: "+e.key+"KeyMap for key: "+n.props.keyMap.get(e.key)),console.log("Append Text Value: "+n.state.text)),n.props.onKeyDown(e),n.props.onKeyDownAppendTextArea(e),n.props.onKeyDownTextArea(e),(n.props.keyMap.get("Control")&&n.props.keyMap.get("Enter")||n.props.keyMap.get("Control")&&n.props.keyMap.get("s"))&&(e.preventDefault(),n.appendTextToNote())},n.onKeyUp=function(e){n.props.keyMap.delete(e.key),n.props.onKeyUp(e)},n.state={text:n.props.text,newLine:n.props.appendNewLine,newParagraph:n.props.appendNewParagraph,useMonacoEditor:n.props.editingMode===Xe.useMonacoEditor,useDynamicEditor:n.props.editingMode===Xe.useDynamicEditor},n}return Object(p.a)(o,[{key:"render",value:function(){var e=this.state.text;return Object(n.jsxs)("div",{className:"sk-panel main appendix "+(this.props.editingMode===Xe.useMonacoEditor?"monacoEditor":this.props.editingMode===Xe.useDynamicEditor?"dynamicEditor":"otherEditor"),children:[Object(n.jsx)("div",{className:"sk-panel-content edit"+(this.props.editingMode===Xe.useMonacoEditor?" MonacoEditorContainerParentDiv":""),children:this.state.useMonacoEditor?Object(n.jsx)(A,{fontSize:this.props.fontSize,language:this.props.monacoEditorLanguage,saveText:this.saveText,text:e}):this.state.useDynamicEditor?Object(n.jsx)("div",{id:"appendDynamicEditor",children:Object(n.jsx)(U,{debugMode:this.props.debugMode,onChange:this.saveText,readOnly:!1,text:e})}):Object(n.jsx)("textarea",{id:Ge.appendTextArea,name:"text",className:"sk-input contrast textarea append",placeholder:"Append to your note",rows:this.props.appendRows,spellCheck:"true",value:e,onChange:this.handleTextAreaChange,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp})}),Object(n.jsxs)("div",{className:"sk-panel-row",children:[Object(n.jsxs)("form",{className:"checkBoxForm",children:[Object(n.jsxs)("label",{children:[Object(n.jsx)("input",{id:Ge.newLine,name:"newLine",type:"checkbox",checked:this.state.newLine,onChange:this.handleInputChange}),"New Line"]}),Object(n.jsx)("br",{}),Object(n.jsxs)("label",{children:[Object(n.jsx)("input",{id:Ge.newParagraph,name:"newParagraph",type:"checkbox",checked:this.state.newParagraph,onChange:this.handleInputChange}),"New Paragraph"]})]}),Object(n.jsx)("div",{className:"sk-button-group stretch",children:Object(n.jsx)("button",{type:"button",id:"appendTextButton",onClick:this.appendTextToNote,className:"sk-button info",children:Object(n.jsx)("div",{children:"Append"})})})]})]})}}]),o}(s.a.Component);Me.defaultProps={};var ye,Ce=function(e){var t=e.caption,o=e.className,i=e.condition,s=e.onClick,a=e.title;return Object(n.jsxs)("button",{className:o,onClick:s,title:a,children:[i?Object(n.jsx)(f,{role:"button"}):Object(n.jsx)(x,{role:"button"}),Object(n.jsx)("p",{className:"chevron-button-caption",children:t})]})},Ee=function(e){var t=e.caption,o=e.className,i=e.fill,s=e.onClick,a=e.title;return Object(n.jsxs)("button",{className:o,onClick:s,title:a,children:[Object(n.jsx)(v,{fill:i,role:"button"}),Object(n.jsx)("span",{className:"button-caption",children:t})]})},Se=function(e){var t=e.caption,o=e.className,i=e.condition,s=e.messageOn,a=e.messageOff,r=e.onClick,c=e.title;return Object(n.jsxs)("button",{className:o,onClick:r,title:c,children:[Object(n.jsx)(O,{condition:i,role:"button"}),Object(n.jsxs)("span",{className:"button-caption",children:[t,":",Object(n.jsxs)("b",{children:["\xa0",i?s:a]})]})]})},ke=function(e){var t=e.caption,o=e.className,i=e.fill,s=e.onClick,a=e.title;return Object(n.jsxs)("button",{className:o,onClick:s,title:a,children:[Object(n.jsx)(C,{fill:i,role:"button"}),Object(n.jsx)("span",{className:"button-caption",children:t})]})},Te=function(e){var t=e.caption,o=e.className,i=e.fill,s=e.id,a=e.onClick,r=e.title;return Object(n.jsxs)("button",{className:o,id:s,onClick:a,title:r,children:[Object(n.jsx)(S,{fill:i,role:"button"}),Object(n.jsx)("span",{className:"button-caption",children:t})]})},Le=function(e){var t=e.className,o=e.fill,i=e.id,s=e.onClick,a=e.title;return Object(n.jsx)("button",{className:t,id:i,onClick:s,title:a,children:Object(n.jsx)(T,{fill:o,role:"button"})})},Ne="editingMode",Be="fontEdit",De="fontSize",Ae="fontView",Ve="monacoEditorLanguage",He="resetAllSettings",Ke="saveAsDefault",Ie=new RegExp(/```css\n/gm),Fe=new RegExp(/```css/gm),Pe=new RegExp(/\n```/gm),Ue=new RegExp(/```/gm),ze=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;Object(d.a)(this,o),(n=t.call(this,e)).handleInputChange=function(e){var t=e.target,o="checkbox"===t.type?t.checked:t.value,i=t.name;n.setState(Object(we.a)({},i,o)),n.props.debugMode&&console.log("Settings event name: "+e.target.name+" Value: "+e.target.value)},n.handleSelectChange=function(e){var t=e.target,o=t.value,i=t.name;n.setState(Object(we.a)({},i,o),(function(){n.props.debugMode&&console.log("Saved select. Name: "+e.target.name+" Value: "+e.target.value)}))},n.toggleShowCustomStyles=function(){n.setState({showCustomStyles:!n.state.showCustomStyles})},n.cleanCustomStyles=function(e){return e?e.replace(Ie,"").replace(Fe,"").replace(Pe,"").replace(Ue,""):e},n.saveText=function(e){n.setState({customStyles:e})},n.handleSubmit=function(){if(n.props.debugMode){var e="",t="";""===n.state.fontEdit||void 0===n.state.fontEdit?e="Default":n.state.fontEdit&&(e=n.state.fontEdit),""===n.state.fontView||void 0===n.state.fontView?t="Default":n.state.fontView&&(t=n.state.fontView),console.log("Settings.tsx handleSubmit() triggered: \n - Settings editingMode: "+n.state.editingMode+"\n - Settings fontEdit: "+n.state.fontEdit+"\n - Settings fontView: "+n.state.fontView+"\n - Your chosen font for Edit/Append is: "+e+"\n - Your chosen font for View/Print is: "+t+"\n")}n.setState({customStyles:n.cleanCustomStyles(n.state.customStyles)},(function(){n.props.debugMode&&console.log("Your custom styles: "+n.state.customStyles);var e=n.state,t=e.customStyles,o=e.editingMode,i=e.fontEdit,s=e.fontSize,a=e.fontView,r=e.monacoEditorLanguage,c=e.saveAsDefault;n.props.onConfirm({customStyles:t,editingMode:o,fontEdit:i,fontSize:s,fontView:a,monacoEditorLanguage:r,saveAsDefault:c})}))},n.loadDefaultSettings=function(){var e=n.props.defaultSettings;n.setState(Object(l.a)({},e),(function(){n.refreshCustomStyles()}))},n.refreshCustomStyles=function(){n.setState({showCustomStyles:!n.state.showCustomStyles},(function(){n.setState({showCustomStyles:!n.state.showCustomStyles})}))},n.clearCustomStyles=function(){n.setState({customStyles:""},(function(){n.refreshCustomStyles(),n.props.debugMode&&console.log("customStyles reset: "+n.state.customStyles)}));var e=document.getElementById("customStyles");e&&(e.value="",e.focus())},n.clearFontEdit=function(){n.setState({fontEdit:""});var e=document.getElementById(Be);e&&(e.value="",e.focus())},n.clearFontSize=function(){n.setState({fontSize:""});var e=document.getElementById(De);e&&(e.value="",e.focus())},n.clearFontView=function(){n.setState({fontView:""});var e=document.getElementById(Ae);e&&(e.value="",e.focus())},n.clearEditingMode=function(){n.setState({editingMode:Xe.usePlainText})},n.clearMonacoEditorLanguage=function(){n.setState({monacoEditorLanguage:"markdown"});var e=document.getElementById(Ve);e&&(e.value="markdown",e.focus())},n.clearSaveAsDefault=function(){n.setState({saveAsDefault:!1});var e=document.getElementById(Ke);e.checked=!1,e.focus()},n.clearAllSettings=function(){n.clearSaveAsDefault(),n.clearCustomStyles(),n.clearFontView(),n.clearFontEdit(),n.clearFontSize(),n.clearMonacoEditorLanguage(),n.clearEditingMode();var e=document.getElementById(He);e&&e.focus()},n.onKeyDown=function(e){n.props.keyMap.set(e.key,!0),(n.props.keyMap.get("Control")&&n.props.keyMap.get("s")||n.props.keyMap.get("Control")&&n.props.keyMap.get("Enter"))&&(e.preventDefault(),n.handleSubmit())},n.onKeyUp=function(e){n.props.keyMap.set(e.key,!1)},n.onBlur=function(e){n.props.keyMap.clear()},n.componentWillUnmount=function(){n.props.keyMap.clear()};var i="markdown";n.props.monacoEditorLanguage&&(i=n.props.monacoEditorLanguage);var s="usePlainText";return n.props.editingMode&&(s=n.props.editingMode),n.state={customStyles:n.props.customStyles,editingMode:s,fontEdit:n.props.fontEdit,fontSize:n.props.fontSize,fontView:n.props.fontView,monacoEditorLanguage:i,saveAsDefault:!1,showCustomStyles:!1},n}return Object(p.a)(o,[{key:"render",value:function(){var e=this.props,t=e.title,o=e.onCancel,i=e.confirmText,s=e.cancelText,a=e.helpLink;return Object(n.jsxs)("div",{id:"settings",className:"sk-panel main settings",children:[Object(n.jsx)("div",{className:"sk-panel-content",children:Object(n.jsxs)("div",{className:"sk-panel-section",children:[Object(n.jsxs)("datalist",{id:"fonts",children:[Object(n.jsx)("option",{value:'SFMono-Regular, Consolas, Liberation Mono, Menlo, "Ubuntu Mono", courier, monospace;'}),Object(n.jsx)("option",{value:"Times New Roman"}),Object(n.jsx)("option",{value:"Arial"}),Object(n.jsx)("option",{value:"Arial Black"}),Object(n.jsx)("option",{value:"-apple-system"}),Object(n.jsx)("option",{value:"Bell MT"}),Object(n.jsx)("option",{value:"Baskerville Old Face"}),Object(n.jsx)("option",{value:"Bahnschrift Light"}),Object(n.jsx)("option",{value:"BlinkMacSystemFont"}),Object(n.jsx)("option",{value:"Bodoni MT"}),Object(n.jsx)("option",{value:"Calibri"}),Object(n.jsx)("option",{value:"Calibri Light"}),Object(n.jsx)("option",{value:"Calisto MT"}),Object(n.jsx)("option",{value:"Cambria"}),Object(n.jsx)("option",{value:"Candara"}),Object(n.jsx)("option",{value:"Candara Light"}),Object(n.jsx)("option",{value:"Cantarell"}),Object(n.jsx)("option",{value:"Centaur"}),Object(n.jsx)("option",{value:"Century"}),Object(n.jsx)("option",{value:"Century Gothic"}),Object(n.jsx)("option",{value:"Comic Sans MS"}),Object(n.jsx)("option",{value:"Consolas"}),Object(n.jsx)("option",{value:"Constantia"}),Object(n.jsx)("option",{value:"Courier New"}),Object(n.jsx)("option",{value:"Corbel"}),Object(n.jsx)("option",{value:"Corbel Light"}),Object(n.jsx)("option",{value:"DengXian"}),Object(n.jsx)("option",{value:"Ebrima"}),Object(n.jsx)("option",{value:"Droid Sans"}),Object(n.jsx)("option",{value:"Fira Sans"}),Object(n.jsx)("option",{value:"Gabriola"}),Object(n.jsx)("option",{value:"Garamond"}),Object(n.jsx)("option",{value:"Georgia"}),Object(n.jsx)("option",{value:"Helvetica"}),Object(n.jsx)("option",{value:"Helvetica Neue"}),Object(n.jsx)("option",{value:"Impact"}),Object(n.jsx)("option",{value:"KaTeX_AMS"}),Object(n.jsx)("option",{value:"KaTeX_Caligraphic"}),Object(n.jsx)("option",{value:"KaTeX_Fraktur"}),Object(n.jsx)("option",{value:"KaTeX_Main"}),Object(n.jsx)("option",{value:"KaTeX_Math"}),Object(n.jsx)("option",{value:"KaTeX_SansSerif"}),Object(n.jsx)("option",{value:"KaTeX_Script"}),Object(n.jsx)("option",{value:"KaTeX_Typewriter"}),Object(n.jsx)("option",{value:"Lato"}),Object(n.jsx)("option",{value:"Liberation Mono"}),Object(n.jsx)("option",{value:"Lucida Caligraphy"}),Object(n.jsx)("option",{value:"Lucida Sans"}),Object(n.jsx)("option",{value:"Menlo"}),Object(n.jsx)("option",{value:"Monaco"}),Object(n.jsx)("option",{value:"Monospace"}),Object(n.jsx)("option",{value:"New York"}),Object(n.jsx)("option",{value:"Oxygen"}),Object(n.jsx)("option",{value:"Palatino"}),Object(n.jsx)("option",{value:"Roboto"}),Object(n.jsx)("option",{value:"Sans-Serif"}),Object(n.jsx)("option",{value:"Segoe UI"}),Object(n.jsx)("option",{value:"SFMono-Regular"}),Object(n.jsx)("option",{value:"Serif"}),Object(n.jsx)("option",{value:"Sylfaen"}),Object(n.jsx)("option",{value:"Tahoma"}),Object(n.jsx)("option",{value:"Times New Roman"}),Object(n.jsx)("option",{value:"Trebuchet MS"}),Object(n.jsx)("option",{value:"Ubuntu"}),Object(n.jsx)("option",{value:"Verdana"}),Object(n.jsx)("option",{value:"Yu Gothic"})]}),Object(n.jsxs)("div",{className:"sk-panel-row title-section",children:[Object(n.jsx)("h1",{children:t}),Object(n.jsx)("button",{id:"undoDialog",onClick:o,title:"Close",children:Object(n.jsx)(m,{role:"button"})})]}),Object(n.jsx)("section",{className:"sk-panel-row settings",children:Object(n.jsxs)("div",{className:"text-and-undo-button",children:[Object(n.jsxs)("p",{children:["Need help? Check out the"," ",Object(n.jsx)("a",{href:a,target:"_blank",rel:"noopener noreferrer",children:"documentation"}),". To clear all settings, click undo:\xa0"]}),Object(n.jsx)(Le,{onClick:this.clearAllSettings,title:"Reset all Settings",id:He})]})}),Object(n.jsx)("section",{className:"sk-panel-row settings",children:Object(n.jsxs)("div",{className:"text-and-undo-button",children:[Object(n.jsx)("p",{children:"To load your personal default settings, click:\xa0"}),Object(n.jsx)("button",{onClick:this.loadDefaultSettings,title:"Load personal default settings",children:Object(n.jsx)(k,{role:"button"})})]})}),Object(n.jsx)("section",{className:"sk-panel-row settings",children:Object(n.jsxs)("div",{className:"text-and-undo-button",children:[Object(n.jsx)("p",{children:"Editing Mode: "}),Object(n.jsx)(Le,{onClick:this.clearEditingMode,title:"Reset Editing Mode to Plain Textarea"})]})}),Object(n.jsx)("section",{className:"sk-panel-row settings",children:Object(n.jsxs)("label",{children:[Object(n.jsx)("input",{id:Xe.usePlainText,name:Ne,value:Xe.usePlainText,className:"radio",type:"radio",checked:this.state.editingMode===Xe.usePlainText,onChange:this.handleInputChange}),"Plain Textarea: standard textarea with spellcheck (default, mobile recommended)"]})}),Object(n.jsx)("section",{className:"sk-panel-row settings",children:Object(n.jsxs)("label",{children:[Object(n.jsx)("input",{id:Xe.useCodeMirror,name:Ne,value:Xe.useCodeMirror,type:"radio",className:"radio",checked:this.state.editingMode===Xe.useCodeMirror,onChange:this.handleInputChange}),"CodeMirror: in-line formatting for Markdown"]})}),Object(n.jsx)("section",{className:"sk-panel-row settings",children:Object(n.jsxs)("label",{children:[Object(n.jsx)("input",{id:Xe.useDynamicEditor,name:Ne,value:Xe.useDynamicEditor,type:"radio",className:"radio",checked:this.state.editingMode===Xe.useDynamicEditor,onChange:this.handleInputChange}),"Dynamic: live formatting for Markdown. ",Object(n.jsx)("b",{children:"warning: "}),"existing Markdown may break (not compatible with KaTeX, lists may not render properly; desktop and mobile compatible)"]})}),Object(n.jsx)("section",{className:"sk-panel-row settings",children:Object(n.jsxs)("label",{htmlFor:Xe.useMonacoEditor,children:[Object(n.jsx)("input",{id:Xe.useMonacoEditor,name:Ne,value:Xe.useMonacoEditor,type:"radio",className:"radio",checked:this.state.editingMode===Xe.useMonacoEditor,onChange:this.handleInputChange}),"Monaco: syntax highlighting for Markdown and many other programming languages, intelligent auto-completion, sophisticated search and replace (desktop recommended)"]})}),this.state.editingMode===Xe.useMonacoEditor&&[Object(n.jsxs)("section",{className:"sk-panel-row settings",children:[Object(n.jsxs)("label",{htmlFor:Ve,children:["Monaco Editor Language:"," "]}),Object(n.jsxs)("div",{className:"input-and-undo-button",children:[Object(n.jsx)("label",{children:Object(n.jsxs)("select",{id:Ve,name:Ve,value:this.state.monacoEditorLanguage,onChange:this.handleSelectChange,children:[Object(n.jsx)("option",{children:"abap"}),Object(n.jsx)("option",{children:"aes"}),Object(n.jsx)("option",{children:"apex"}),Object(n.jsx)("option",{children:"azcli"}),Object(n.jsx)("option",{children:"bat"}),Object(n.jsx)("option",{children:"c"}),Object(n.jsx)("option",{children:"cameligo"}),Object(n.jsx)("option",{children:"clojure"}),Object(n.jsx)("option",{children:"coffeescript"}),Object(n.jsx)("option",{children:"cpp"}),Object(n.jsx)("option",{children:"csharp"}),Object(n.jsx)("option",{children:"csp"}),Object(n.jsx)("option",{children:"css"}),Object(n.jsx)("option",{children:"dart"}),Object(n.jsx)("option",{children:"dockerfile"}),Object(n.jsx)("option",{children:"fsharp"}),Object(n.jsx)("option",{children:"go"}),Object(n.jsx)("option",{children:"graphql"}),Object(n.jsx)("option",{children:"handlebars"}),Object(n.jsx)("option",{children:"hcl"}),Object(n.jsx)("option",{children:"html"}),Object(n.jsx)("option",{children:"ini"}),Object(n.jsx)("option",{children:"java"}),Object(n.jsx)("option",{children:"javascript"}),Object(n.jsx)("option",{children:"json"}),Object(n.jsx)("option",{children:"julia"}),Object(n.jsx)("option",{children:"kotlin"}),Object(n.jsx)("option",{children:"less"}),Object(n.jsx)("option",{children:"lexon"}),Object(n.jsx)("option",{children:"lua"}),Object(n.jsx)("option",{children:"markdown"}),Object(n.jsx)("option",{children:"mips"}),Object(n.jsx)("option",{children:"msdax"}),Object(n.jsx)("option",{children:"mysql"}),Object(n.jsx)("option",{children:"objective-c"}),Object(n.jsx)("option",{children:"pascal"}),Object(n.jsx)("option",{children:"pascaligo"}),Object(n.jsx)("option",{children:"perl"}),Object(n.jsx)("option",{children:"pgsql"}),Object(n.jsx)("option",{children:"php"}),Object(n.jsx)("option",{children:"plaintext"}),Object(n.jsx)("option",{children:"postiats"}),Object(n.jsx)("option",{children:"powerquery"}),Object(n.jsx)("option",{children:"powershell"}),Object(n.jsx)("option",{children:"pug"}),Object(n.jsx)("option",{children:"python"}),Object(n.jsx)("option",{children:"r"}),Object(n.jsx)("option",{children:"razor"}),Object(n.jsx)("option",{children:"redis"}),Object(n.jsx)("option",{children:"redshift"}),Object(n.jsx)("option",{children:"restructuredtext"}),Object(n.jsx)("option",{children:"ruby"}),Object(n.jsx)("option",{children:"rust"}),Object(n.jsx)("option",{children:"sb"}),Object(n.jsx)("option",{children:"scala"}),Object(n.jsx)("option",{children:"scheme"}),Object(n.jsx)("option",{children:"scss"}),Object(n.jsx)("option",{children:"shell"}),Object(n.jsx)("option",{children:"sol"}),Object(n.jsx)("option",{children:"sql"}),Object(n.jsx)("option",{children:"st"}),Object(n.jsx)("option",{children:"swift"}),Object(n.jsx)("option",{children:"systemverilog"}),Object(n.jsx)("option",{children:"tcl"}),Object(n.jsx)("option",{children:"twig"}),Object(n.jsx)("option",{children:"typescript"}),Object(n.jsx)("option",{children:"vb"}),Object(n.jsx)("option",{children:"verilog"}),Object(n.jsx)("option",{children:"xml"}),Object(n.jsx)("option",{children:"yaml"})]})}),Object(n.jsx)(Le,{onClick:this.clearMonacoEditorLanguage,title:"Reset Monaco Editor Language to Markdown"})]})]})],Object(n.jsxs)("section",{className:"sk-panel-row settings",children:[Object(n.jsx)("label",{htmlFor:De,children:"Choose a base font size: "}),Object(n.jsxs)("div",{className:"input-and-undo-button",children:[Object(n.jsxs)("select",{id:De,name:De,value:this.state.fontSize,onChange:this.handleSelectChange,children:[Object(n.jsx)("option",{}),Object(n.jsx)("option",{children:"12px"}),Object(n.jsx)("option",{children:"13px"}),Object(n.jsx)("option",{children:"14px"}),Object(n.jsx)("option",{children:"15px"}),Object(n.jsx)("option",{children:"16px"}),Object(n.jsx)("option",{children:"17px"}),Object(n.jsx)("option",{children:"18px"}),Object(n.jsx)("option",{children:"19px"}),Object(n.jsx)("option",{children:"20px"}),Object(n.jsx)("option",{children:"21px"}),Object(n.jsx)("option",{children:"22px"}),Object(n.jsx)("option",{children:"23px"}),Object(n.jsx)("option",{children:"24px"}),Object(n.jsx)("option",{children:"25px"}),Object(n.jsx)("option",{children:"26px"}),Object(n.jsx)("option",{children:"27px"}),Object(n.jsx)("option",{children:"28px"}),Object(n.jsx)("option",{children:"29px"}),Object(n.jsx)("option",{children:"30px"})]}),Object(n.jsx)(Le,{onClick:this.clearFontSize,title:"Reset font size to 16px"})]})]}),this.state.editingMode!==Xe.useMonacoEditor&&[Object(n.jsxs)("section",{className:"sk-panel-row settings",children:[Object(n.jsxs)("label",{htmlFor:Be,children:["Choose a font for Edit/Append:"," "]}),Object(n.jsxs)("div",{className:"input-and-undo-button",children:[Object(n.jsx)("input",{list:"fonts",id:Be,name:Be,value:this.state.fontEdit,onChange:this.handleInputChange,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,type:"text"}),Object(n.jsx)(Le,{onClick:this.clearFontEdit,title:"Reset font for Edit/Append"})]})]})],this.state.editingMode!==Xe.useDynamicEditor&&[Object(n.jsxs)("section",{className:"sk-panel-row settings",children:[Object(n.jsxs)("label",{htmlFor:Ae,children:["Choose a font for View/Print:"," "]}),Object(n.jsxs)("div",{className:"input-and-undo-button",children:[Object(n.jsx)("input",{list:"fonts",id:Ae,name:Ae,value:this.state.fontView,onChange:this.handleInputChange,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,type:"text"}),Object(n.jsx)(Le,{onClick:this.clearFontView,title:"Reset font for View/Print"})]})]})],Object(n.jsxs)("section",{className:"sk-panel-row settings custom-css",children:[Object(n.jsx)(Ce,{caption:"Add custom styles (CSS):",className:"chevron-toggle-button",condition:this.state.showCustomStyles,onClick:this.toggleShowCustomStyles,title:"Toggle show add custom styles (CSS)"}),this.state.showCustomStyles&&[Object(n.jsx)(Le,{className:"custom-css-undo-button",onClick:this.clearCustomStyles,title:"Reset custom styles (CSS)"})]]}),this.state.showCustomStyles&&[Object(n.jsx)("section",{className:"sk-panel-row settings",children:Object(n.jsx)(A,{tabSize:2,language:"css",text:this.state.customStyles,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,saveText:this.saveText})})],Object(n.jsxs)("section",{className:"sk-panel-row settings",children:[Object(n.jsxs)("label",{htmlFor:Ke,children:["Save these settings as your personal default:"," "]}),Object(n.jsxs)("div",{className:"input-and-undo-button",children:[Object(n.jsx)("label",{className:"checkbox-input-label",children:Object(n.jsx)("input",{id:Ke,name:Ke,type:"checkbox",checked:this.state.saveAsDefault,onChange:this.handleInputChange})}),Object(n.jsx)(Le,{onClick:this.clearSaveAsDefault,title:"Clear save as default"})]})]})]})}),Object(n.jsx)("div",{className:"sk-panel-footer",children:Object(n.jsxs)("div",{className:"sk-button-group stretch",children:[Object(n.jsx)("button",{className:"sk-button neutral",onClick:o,children:Object(n.jsx)("div",{children:s})}),Object(n.jsx)("button",{className:"sk-button info",onClick:this.handleSubmit,children:Object(n.jsx)("div",{children:i})})]})})]})}}]),o}(s.a.Component),Re=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;return Object(d.a)(this,o),(n=t.call(this,e)).state={hasError:!1},n}return Object(p.a)(o,[{key:"componentDidCatch",value:function(e,t){console.log("Error:",e,"\nError Info:",t),this.setState({error:e,errorInfo:t})}},{key:"render",value:function(){var e,t;return this.state.hasError?Object(n.jsx)("div",{className:"sk-panel main",children:Object(n.jsx)("div",{className:"sk-panel-content view",children:Object(n.jsxs)("div",{id:"errorBoundary",children:[Object(n.jsx)("h1",{children:"Something went wrong."}),Object(n.jsxs)("p",{children:["Error Name: ",Object(n.jsx)("code",{children:null===(e=this.state.error)||void 0===e?void 0:e.name})]}),Object(n.jsxs)("p",{children:["Error Message: ",Object(n.jsx)("code",{children:null===(t=this.state.error)||void 0===t?void 0:t.message})]}),Object(n.jsx)("p",{children:"Please see the developer console for details."}),Object(n.jsx)("hr",{}),Object(n.jsxs)("p",{children:["Errors such as ",Object(n.jsx)("code",{children:"TypeError"})," and"," ",Object(n.jsx)("code",{children:"Cannot read property 'type' of undefined"})," usually occur when the editor is unable to process and render your notes because it contains incorrect or incomplete HTML. If you are writing in HTML, then please continue to write and refresh the View Mode when the HTML tags are closed."]}),Object(n.jsxs)("p",{children:["If you are using the Dynamic editing mode, then please switch to the Plain Textarea or Monaco editing modes in the Settings",Object(n.jsxs)("button",{className:"inline-text-and-svg",onClick:Y,title:"Open Settings",children:[Object(n.jsx)("span",{children:"\xa0"}),Object(n.jsx)(w,{role:"button"}),Object(n.jsx)("span",{children:"\xa0"})]}),"and remove or fix the text that is causing the error."]}),Object(n.jsxs)("p",{children:["If the error persists or is not related to the content of your note, then please"," ",Object(n.jsx)("a",{href:"https://github.com/TheodoreChu/append-editor/issues",target:"_blank",rel:"noopener noreferrer",children:"report the issue on GitHub"})," ","and we will try to fix it."," ",Object(n.jsx)("span",{role:"img","aria-label":"smile emoji",children:"\ud83d\ude42"})]})]})})}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{hasError:!0}}}]),o}(s.a.Component),We=o(448),_e=o.n(We),Ze=o(449),Ye=o.n(Ze);!function(e){e.chevronToggleButton="menu-button chevron-toggle-button",e.menuButton="menu-button",e.on=" on",e.off=" off"}(ye||(ye={}));var Ge,qe,Xe,Qe=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;return Object(d.a)(this,o),(n=t.call(this,e)).clearTooltipTimer=void 0,n.resetMessageTimer=function(){n.clearTooltipTimer&&clearTimeout(n.clearTooltipTimer),n.clearTooltipTimer=setTimeout((function(){n.setState({displayMessageEdit:!1,displayMessageShare:!1})}),5e3)},n.showMessageEdit=function(){n.setState({displayMessageEdit:!0,displayMessageShare:!1},(function(){n.resetMessageTimer()}))},n.showMessageShare=function(){n.setState({displayMessageEdit:!1,displayMessageShare:!0},(function(){n.resetMessageTimer()}))},n.copyToClipboard=function(e){var t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),n.showMessageShare(),t.remove()},n.copyText=function(){n.props.text?n.setState({message:"Copied Text to clipboard"},(function(){n.copyToClipboard(n.props.text)})):n.setState({message:"No text to copy. Your note is empty"},(function(){n.showMessageShare()}))},n.copyHtml=function(){if(n.props.viewMode)if(n.props.text){var e,t=document.getElementById("renderedNote");(null===t||void 0===t||null===(e=t.firstElementChild)||void 0===e?void 0:e.innerHTML)&&(n.setState({message:"Copied HTML to clipboard"}),n.copyToClipboard(null===t||void 0===t?void 0:t.firstElementChild.innerHTML))}else n.setState({message:"No HTML to copy. Your note is empty"},(function(){n.showMessageShare()}));else n.setState({message:"Unable to copy HTML. Please turn View Mode on"},(function(){return n.showMessageShare()}))},n.formatText=function(){"markdown"!==n.props.monacoEditorLanguage&&n.props.editingMode===Xe.useMonacoEditor?n.setState({message:"Error: Your Monaco Editor language is not Markdown. Formatting is only available for Markdown"},(function(){n.showMessageEdit()})):n.props.text?n.setState({message:"Formatted Markdown text with Prettier"},(function(){try{var e=_e.a.format(n.props.text,{parser:"markdown",plugins:[Ye.a]});n.props.saveText(e),n.props.refreshEdit(),n.props.refreshView(),n.showMessageEdit()}catch(t){n.setState({message:"Error formatting text: "+t},(function(){n.showMessageEdit()})),console.log("Error formatting text: "+t)}})):n.setState({message:"No text to format. Your note is empty"},(function(){n.showMessageEdit()}))},n.uncheckBoxes=function(){var e=n.props.text,t=new RegExp(/- \[x\]/gm);if(t.test(e)){var o=e.replace(t,"- [ ]");n.props.saveText(o),n.props.refreshEdit(),n.props.refreshView(),n.setState({message:"Unchecked all checkboxes"},(function(){n.showMessageEdit()}))}else n.setState({message:"No checked checkboxes found"},(function(){n.showMessageEdit()}))},n.state={message:"",displayMessageEdit:!1,displayMessageShare:!1},n}return Object(p.a)(o,[{key:"render",value:function(){return[Object(n.jsx)("div",{className:"menu-overlay",onClick:this.props.toggleShowMenu}),Object(n.jsxs)("div",{id:"menu",children:[Object(n.jsx)(Ce,{caption:"Appearance",className:ye.chevronToggleButton,condition:this.props.showMenuOptionsView,onClick:this.props.toggleShowMenuOptionsView,title:"Toggle show options for the appearance of the editor"}),this.props.showMenuOptionsView&&[Object(n.jsx)(Se,{caption:"Borderless",className:ye.menuButton+(this.props.borderlessMode?ye.on:ye.off),condition:this.props.borderlessMode,messageOn:"on",messageOff:"off",onClick:this.props.toggleBorderlessMode,title:"Toggle Borderless Mode. Blends borders and margins into the background for a cleaner look"}),Object(n.jsx)(Se,{caption:"Fixed Height",className:ye.menuButton+(this.props.fixedHeightMode?ye.on:ye.off),condition:this.props.fixedHeightMode,messageOn:"on",messageOff:"off",onClick:this.props.toggleFixedHeightMode,title:"Toggle Fixed Height Mode. Limits the height of the content container for easier side-by-side editing"}),Object(n.jsx)(Se,{caption:"Full Width",className:ye.menuButton+(this.props.fullWidthMode?ye.on:ye.off),condition:this.props.fullWidthMode,messageOn:"on",messageOff:"off",onClick:this.props.toggleFullWidthMode,title:"Toggle Full Width Mode for unrestricted editing. Borderless mode plus unset maximum container widths"}),Object(n.jsx)(Se,{caption:"Horizontal Overflow",className:ye.menuButton+(this.props.overflowMode?ye.on:ye.off),condition:this.props.overflowMode,messageOn:"visible",messageOff:"auto",onClick:this.props.toggleOverflowMode,title:"Toggle Horizontal Overflow. Visible is great for editing and viewing large tables and preformatted text. Works best with Full Width mode"})],Object(n.jsx)(Ce,{caption:"Share",className:ye.chevronToggleButton,condition:this.props.showMenuOptionsShare,onClick:this.props.toggleShowMenuOptionsShare,title:"Toggle show options to share your note"}),this.props.showMenuOptionsShare&&[Object(n.jsx)(Ee,{caption:"Copy note text",className:ye.menuButton,fill:"var(--sn-stylekit-success-color)",onClick:this.copyText,title:"Copy the text of your note to your device's clipboard"}),Object(n.jsx)(Ee,{caption:"Copy rendered HTML",className:ye.menuButton,fill:"var(--sn-stylekit-success-color)",onClick:this.copyHtml,title:"Copy the rendered HTML from your note text to your device's clipboard"}),Object(n.jsx)(Te,{caption:"Print rendered note",className:"menu-button off",fill:"var(--sn-stylekit-foreground-color)",id:Ge.printButton,onClick:this.props.onConfirmPrintUrl,title:"Print rendered note. Works best on the web app in Chromium browsers (e.g., MS Edge, Google Chrome). Not available on mobile"}),Object(n.jsx)("div",{className:"notification ".concat(this.state.displayMessageShare?"visible":"hidden"),children:Object(n.jsx)("p",{children:Object(n.jsx)("b",{children:this.state.message})})})],Object(n.jsx)(Ce,{caption:"Actions",className:ye.chevronToggleButton,condition:this.props.showMenuOptionsEdit,onClick:this.props.toggleShowMenuOptionsEdit,title:"Toggle show actions to quickly format and edit your note"}),this.props.showMenuOptionsEdit&&[Object(n.jsx)(ke,{caption:"Format Markdown text",className:ye.menuButton,fill:"var(--sn-stylekit-warning-color)",onClick:this.formatText,title:"Format Markdown text with Prettier. WARNING: this may cause undesired changes to your note text. Use the Note History feature to revert unwanted changes"}),Object(n.jsx)(ke,{caption:"Uncheck all checkboxes",className:ye.menuButton,fill:"var(--sn-stylekit-danger-color)",onClick:this.uncheckBoxes,title:"Uncheck all checkboxes. DANGER: this may cause undesired changes to your note text. Use the Note History feature to revert unwanted changes"}),Object(n.jsx)("div",{className:"notification ".concat(this.state.displayMessageEdit?"visible":"hidden"),children:Object(n.jsx)("p",{children:Object(n.jsx)("b",{children:this.state.message})})})],Object(n.jsx)("div",{className:"extra-space"})]})]}}]),o}(s.a.Component),Je=o(108),$e=o.n(Je);o(1163),o(1168),o(1169),o(1170),o(438),o(1172),o(305),o(304),o(1173);!function(e){e.appendButton="appendButton",e.appendTextArea="appendTextArea",e.appendix="appendix",e.content="content",e.edit="edit",e.editButton="editButton",e.editTextArea="editTextArea",e.header="header",e.helpButton="helpButton",e.menuButton="menuButton",e.newLine="newLine",e.newParagraph="newParagraph",e.printButton="printButton",e.settingsButton="settingsButton",e.view="view",e.viewButton="viewButton"}(Ge||(Ge={})),function(e){e.fixed="fixed",e.fixedHeader="fixed-header",e.focused="focused"}(qe||(qe={})),function(e){e.usePlainText="usePlainText",e.useCodeMirror="useCodeMirror",e.useDynamicEditor="useDynamicEditor",e.useMonacoEditor="useMonacoEditor"}(Xe||(Xe={}));var et={text:"",appendNewLine:!1,appendNewParagraph:!1,appendMode:!1,appendRows:8,appendText:"",bypassDebounce:!1,confirmPrintUrl:!1,customStyles:"",defaultSettings:{customStyles:"",editingMode:"usePlainText",fontEdit:"",fontSize:"",fontView:"",monacoEditorLanguage:"markdown"},fontEdit:"",fontSize:"",fontView:"",monacoEditorLanguage:"markdown",printURL:!0,refreshEdit:!1,refreshView:!1,showAppendix:!0,showHeader:!0,showHelp:!1,showDiff:!1,settingsMode:!1},tt=0,ot=!1,nt=new Map,it=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;return Object(d.a)(this,o),(n=t.call(this,e)).editorKit=void 0,n.refreshEditorTimer=void 0,n.saveTimer=void 0,n.componentDidMount=function(){n.onViewMode(),n.loadDefaultMenuState(),document.addEventListener("scroll",n.onScroll)},n.componentWillUnmount=function(){document.removeEventListener("scroll",n.onScroll)},n.configureEditorKit=function(){var e=new j.EditorKitDelegate({setEditorRawText:function(e){n.setState(Object(l.a)(Object(l.a)({},et),{},{bypassDebounce:!0,text:e}),(function(){me.cancel(),me(e),me.flush(),ve.cancel(),me(e)&&(ve(e),ve.flush()),n.state.savingEditorOptions||(n.loadEditorOptions(),n.loadDefaultSettings(),n.loadMetaData()),setTimeout((function(){n.setState({bypassDebounce:!1})}),1e3)}))},clearUndoHistory:function(){},getElementsBySelector:function(){return[]}});n.editorKit=new j.EditorKit({delegate:e,mode:"plaintext",supportsFilesafe:!1})},n.refreshEditor=function(){me(n.state.text)?(n.refreshEditorTimer&&clearTimeout(n.refreshEditorTimer),n.refreshEditorTimer=setTimeout((function(){n.state.savingEditorOptions||(n.refreshEdit(),n.refreshView(),n.activateStyles())}),20)):(n.refreshEditorTimer&&clearTimeout(n.refreshEditorTimer),n.refreshEditorTimer=setTimeout((function(){n.state.savingEditorOptions||(n.refreshEdit(),n.refreshView(),n.activateStyles())}),10))},n.loadDefaultSettings=function(){try{var e=n.editorKit.internal.componentRelay.getComponentDataValueForKey("defaultSettings"),t=n.editorKit.internal.componentRelay.getComponentDataValueForKey("editingMode");if(void 0!==e){var o=JSON.parse(e);ot,n.setState({customStyles:o.customStyles,editingMode:o.editingMode,fontEdit:o.fontEdit,fontSize:o.fontSize,fontView:o.fontView,monacoEditorLanguage:o.monacoEditorLanguage,defaultSettings:o},(function(){n.refreshEditor()}))}else if(void 0!==t){var i=n.editorKit.internal.componentRelay.getComponentDataValueForKey("customStyles"),s=n.editorKit.internal.componentRelay.getComponentDataValueForKey("fontEdit"),a=n.editorKit.internal.componentRelay.getComponentDataValueForKey("fontSize"),r=n.editorKit.internal.componentRelay.getComponentDataValueForKey("fontView"),c=n.editorKit.internal.componentRelay.getComponentDataValueForKey("monacoEditorLanguage");ot,n.setState({customStyles:i,editingMode:t,fontEdit:s,fontSize:a,fontView:r,monacoEditorLanguage:c,defaultSettings:{customStyles:i,editingMode:t,fontEdit:s,fontSize:a,fontView:r,monacoEditorLanguage:c}},(function(){n.refreshEditor()}))}else n.refreshEditor()}catch(l){console.log("Error loading default settings:",l)}},n.loadEditorOptions=function(){try{var e=n.editorKit.internal.componentRelay.getComponentDataValueForKey("menuOptions");if(void 0!==e){var t=JSON.parse(e);n.setState({borderlessMode:t.borderlessMode,fixedHeightMode:t.fixedHeightMode,fullWidthMode:t.fullWidthMode,overflowMode:t.overflowMode},(function(){n.refreshEditor()}))}}catch(o){console.log("Error loading editor options:",o)}},n.loadMetaData=function(){n.editorKit.internal.componentRelay.streamContextItem((function(e){(e.content.appendEditorCustomStyles||e.content.appendEditorEditingMode||e.content.appendEditorFontEdit||e.content.appendEditorFontSize||e.content.appendEditorFontView||e.content.appendEditorMonacoEditorLanguage)&&n.setState({customStyles:e.content.appendEditorCustomStyles,editingMode:e.content.appendEditorEditingMode,fontEdit:e.content.appendEditorFontEdit,fontSize:e.content.appendEditorFontSize,fontView:e.content.appendEditorFontView,monacoEditorLanguage:e.content.appendEditorMonacoEditorLanguage},(function(){n.refreshEditor()})),(e.content.appendNewLine||e.content.appendNewParagraph)&&n.setState({appendNewLine:e.content.appendNewLine,appendNewParagraph:e.content.appendNewParagraph}),n.setState({appendText:e.content.appendText},(function(){n.state.text||n.state.appendText||n.state.editMode||n.onEditMode()}))}))},n.saveText=function(e){n.saveNote(e),n.setState({text:e},(function(){n.state.editingMode===Xe.useDynamicEditor?n.refreshView():n.state.viewMode&&me(e)&&(n.saveTimer&&clearTimeout(n.saveTimer),n.saveTimer=setTimeout((function(){if(n.state.fixedHeightMode){var e=document.getElementById(Ge.view);if(e){var t=e.scrollTop;n.refreshView();var o=document.getElementById(Ge.view);o&&(o.scrollTop=t)}else n.refreshView()}else n.refreshView()}),550))}))},n.saveNote=function(e){try{n.editorKit.onEditorValueChanged(e)}catch(t){console.log("Error saving note:",t)}},n.appendTextToNote=function(){if(n.state.appendText){var e=n.state.appendText,t="";t=n.state.appendNewParagraph?" \n\n"+e:n.state.appendNewLine?" \n"+e:e,n.setState({text:n.state.text.concat(t),appendText:""},(function(){var e=n.editorKit.internal.note;e&&n.editorKit.internal.componentRelay.saveItemWithPresave(e,(function(){e.content.text=n.state.text,e.content.appendText=n.state.appendText})),n.refreshEdit(),n.state.editingMode===Xe.useDynamicEditor?(n.refreshView(),setTimeout((function(){n.skipToBottom()}),50)):me(n.state.text)?setTimeout((function(){n.refreshView(),n.skipToBottom()}),550):n.skipToBottom()}))}n.state.appendCodeMirror&&n.state.editingMode===Xe.useCodeMirror&&n.state.appendCodeMirror.setValue("")},n.autoSaveAppendText=function(e){n.setState({appendText:e});try{var t=n.editorKit.internal.note;t&&n.editorKit.internal.componentRelay.saveItemWithPresave(t,(function(){t.content.appendText=e}))}catch(o){console.log("Error saving appendText:",o)}},n.autoSaveCheckBoxes=function(e,t){n.setState({appendNewLine:e,appendNewParagraph:t});try{var o=n.editorKit.internal.note;o&&n.editorKit.internal.componentRelay.saveItemWithPresave(o,(function(){o.content.appendNewLine=e,o.content.appendNewParagraph=t}))}catch(i){console.log("Error saving checkboxes:",i)}},n.refreshEdit=function(){n.setState({refreshEdit:!n.state.refreshEdit},(function(){document.getElementById(Ge.editTextArea)&&n.state.editingMode===Xe.useCodeMirror&&n.configureCodeMirror(Ge.editTextArea)}))},n.refreshView=function(){n.setState({refreshView:!n.state.refreshView})},n.configureCodeMirror=function(e){if(e===Ge.editTextArea){ot;var t=document.getElementById(e);if(t){var o=$e.a.fromTextArea(t,{autocorrect:!0,autocapitalize:!0,extraKeys:{Enter:"newlineAndIndentContinueMarkdownList","Alt-F":"findPersistent"},lineNumbers:!1,lineWrapping:!0,mode:"gfm",spellcheck:!0,styleSelectedText:!0,tabindex:0,theme:"default",value:n.state.text});o.setSize("100%","100%"),o.on("change",(function(){var e=o.getValue();o.save(),n.saveText(e)})),o.on("blur",(function(e,t){var o=document.getElementById(Ge.content);o&&o.classList.remove(qe.focused)})),o.on("focus",(function(e,t){var o=document.getElementById(Ge.content);o&&o.classList.add(qe.focused)})),o.on("keydown",(function(e,t){n.onKeyDown(t),n.onKeyDownEditTextArea(t),n.onKeyDownTextArea(t)})),o.on("keyup",(function(e,t){n.onKeyUp(t)})),n.setState({editCodeMirror:o})}}else if(e===Ge.appendTextArea){var i=document.getElementById(Ge.appendTextArea);if(i){var s=$e.a.fromTextArea(i,{autocorrect:!0,autocapitalize:!0,extraKeys:{Enter:"newlineAndIndentContinueMarkdownList","Alt-F":"findPersistent"},lineNumbers:!1,lineWrapping:!0,mode:"gfm",spellcheck:!0,styleSelectedText:!0,tabindex:0,theme:"default",value:n.state.appendText});s.setSize("100%","100%"),s.on("change",(function(){var e=s.getValue();s.save(),n.autoSaveAppendText(e)})),s.on("keydown",(function(e,t){n.onKeyDown(t),n.onKeyDownAppendTextArea(t),n.onKeyDownTextArea(t)})),s.on("keyup",(function(e,t){n.onKeyUp(t)})),n.setState({appendCodeMirror:s})}}},n.onEditMode=function(){n.state.editMode?n.state.editMode&&(n.state.editingMode!==Xe.useMonacoEditor&&n.setState({viewMode:!0}),n.state.editCodeMirror&&n.state.editCodeMirror.toTextArea(),n.setState({editMode:!1},(function(){if(!n.state.appendMode){var e=document.getElementById(Ge.editButton);e&&e.focus()}}))):(n.state.appendMode&&!n.state.appendText&&n.setState({appendMode:!1}),n.setState({editMode:!0},(function(){var e=document.getElementById(Ge.editTextArea);e&&(e.focus(),n.state.editingMode===Xe.useCodeMirror&&n.configureCodeMirror(Ge.editTextArea))})))},n.onAppendMode=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];n.state.appendMode?n.state.appendMode&&(n.state.appendCodeMirror&&n.state.appendCodeMirror.toTextArea(),n.setState({appendMode:!1},(function(){if(n.state.editingMode===Xe.useMonacoEditor&&n.refreshEdit(),o){var e=document.getElementById(Ge.appendButton);e&&e.focus()}}))):(t&&n.setState({editMode:!1}),n.setState({appendMode:!0},(function(){if(e&&n.scrollToBottom(),o){var t=document.getElementById(Ge.appendTextArea);t&&(t.focus(),n.state.editingMode===Xe.useCodeMirror&&n.configureCodeMirror(Ge.appendTextArea))}})))},n.onViewMode=function(){n.state.viewMode||n.setState({viewMode:!0},(function(){n.state.editingMode===Xe.useMonacoEditor&&n.refreshEdit(),n.state.appendMode&&!n.state.editMode&&n.skipToBottom()})),n.state.viewMode&&n.setState({viewMode:!1},(function(){n.state.editingMode===Xe.useMonacoEditor&&n.refreshEdit(),n.state.editMode||n.state.appendMode||n.onEditMode()}))},n.toggleShowHelp=function(){n.state.showHelp?n.setState({showHelp:!1},(function(){n.refreshView();var e=document.getElementById(Ge.helpButton);e&&e.focus()})):n.setState({showHelp:!0},(function(){n.state.viewMode?n.state.viewMode&&n.refreshView():n.onViewMode();var e=document.getElementById(Ge.helpButton);e&&e.focus(),setTimeout((function(){n.scrollToTop()}),50)}))},n.toggleShowMenu=function(){n.setState({showMenu:!n.state.showMenu},(function(){var e=document.getElementById(Ge.menuButton);e&&e.focus()}))},n.loadDefaultMenuState=function(){n.setState({showMenuOptionsEdit:!1,showMenuOptionsShare:!0,showMenuOptionsView:!0})},n.toggleShowMenuOptionsEdit=function(){n.setState({showMenuOptionsEdit:!n.state.showMenuOptionsEdit})},n.toggleShowMenuOptionsShare=function(){n.setState({showMenuOptionsShare:!n.state.showMenuOptionsShare})},n.toggleShowMenuOptionsView=function(){n.setState({showMenuOptionsView:!n.state.showMenuOptionsView})},n.toggleBorderlessMode=function(){n.setState({borderlessMode:!n.state.borderlessMode},(function(){n.activateFixedHeader(),n.saveMenuOptions()}))},n.toggleFixedHeightMode=function(){n.setState({fixedHeightMode:!n.state.fixedHeightMode},(function(){n.activateFixedHeader(),n.saveMenuOptions()}))},n.toggleFullWidthMode=function(){n.setState({fullWidthMode:!n.state.fullWidthMode},(function(){n.activateFixedHeader(),n.saveMenuOptions()}))},n.toggleOverflowMode=function(){n.setState({overflowMode:!n.state.overflowMode},(function(){n.activateFixedHeader(),n.saveMenuOptions()}))},n.saveMenuOptions=function(){var e;e={borderlessMode:n.state.borderlessMode,fixedHeightMode:n.state.fixedHeightMode,fullWidthMode:n.state.fullWidthMode,overflowMode:n.state.overflowMode},n.saveEditorOption("menuOptions",JSON.stringify(e))},n.saveEditorOption=function(e,t){n.setState({savingEditorOptions:!0},(function(){try{n.editorKit.internal.componentRelay.setComponentDataValueForKey(e,t),setTimeout((function(){n.setState({savingEditorOptions:!1},(function(){n.loadDefaultSettings(),n.loadMetaData()}))}),250)}catch(o){console.log("Error saving editor option. Your optionKey:",e,"\n - Your optionValue: ",t,"\n - The error: ",o),n.setState({savingEditorOptions:!1},(function(){n.refreshEditor(),n.loadDefaultSettings(),n.loadMetaData()}))}}))},n.onSettingsMode=function(){n.state.settingsMode?n.state.settingsMode&&n.setState(Object(l.a)(Object(l.a)({},n.state.currentState),{},{settingsMode:!1}),(function(){n.refreshEdit();var e=document.getElementById(Ge.settingsButton);e&&e.focus()})):(n.removeFixedHeader(),n.setState({currentState:n.state},(function(){n.setState({appendMode:!1,editMode:!1,fullWidthMode:!1,fixedHeightMode:!1,settingsMode:!0,showAppendix:!1,showHeader:!1,showMenu:!1,viewMode:!1},(function(){var e=document.getElementById("undoDialog");e&&e.focus()}))})))},n.onSaveSettings=function(e){var t=e.customStyles,o=e.editingMode,i=e.fontEdit,s=e.fontSize,a=e.fontView,r=e.monacoEditorLanguage,c=e.saveAsDefault;n.setState(Object(l.a)(Object(l.a)({},n.state.currentState),{},{customStyles:t,editingMode:o,fontEdit:i,fontSize:s,fontView:a,monacoEditorLanguage:r,showAppendix:!0,showHeader:!0,settingsMode:!1}),(function(){n.refreshEditor();var e=document.getElementById(Ge.settingsButton);e&&e.focus()}));var d=n.editorKit.internal.note;d&&n.editorKit.internal.componentRelay.saveItemWithPresave(d,(function(){d.content.appendEditorCustomStyles=t,d.content.appendEditorEditingMode=o,d.content.appendEditorFontEdit=i,d.content.appendEditorFontSize=s,d.content.appendEditorFontView=a,d.content.appendEditorMonacoEditorLanguage=r})),c&&n.setState({defaultSettings:{customStyles:t,editingMode:o,fontEdit:i,fontSize:s,fontView:a,monacoEditorLanguage:r}},(function(){n.saveEditorOption("defaultSettings",JSON.stringify(n.state.defaultSettings))}))},n.activateStyles=function(){var e=document.getElementById("customStyleSheet");if(e){var t=e.parentNode;t&&t.removeChild(e)}var o="";n.state.fontSize&&(o=".CodeMirror, .DynamicEditor, .MonacoEditorContainer, .ProseMirror, #editTextArea, #appendTextArea, #renderedNote {font-size: "+n.state.fontSize+";}\n");var i="";n.state.fontEdit&&(i=".CodeMirror, .DynamicEditor, .ProseMirror, #editTextArea, #appendTextArea {font-family: "+n.state.fontEdit+";}\n");var s="";if(n.state.fontView&&(s="#renderedNote {font-family: "+n.state.fontView+";}\n"),n.state.customStyles||n.state.fontEdit||n.state.fontSize||n.state.fontView){var a=document.createElement("style");a.setAttribute("id","customStyleSheet"),a.innerHTML=o+i+s+n.state.customStyles,document.body.appendChild(a)}},n.onCancelPrint=function(){n.setState({confirmPrintUrl:!1},(function(){var e=document.getElementById(Ge.printButton);e&&e.focus()}))},n.onConfirmPrintUrl=function(){n.setState({confirmPrintUrl:!0},(function(){var e=document.getElementById("undoDialog");e&&e.focus()}))},n.onPrintUrlTrue=function(){n.setState({confirmPrintUrl:!1,printURL:!0},(function(){n.printRenderedHtml()}))},n.onPrintUrlFalse=function(){n.setState({confirmPrintUrl:!1,printURL:!1},(function(){n.printRenderedHtml()}))},n.printRenderedHtml=function(){window.print();var e=document.getElementById(Ge.printButton);e&&e.focus()},n.goDown=function(){if(document.body.scrollTop=1e7,n.state.editMode){var e=document.getElementById(Ge.editTextArea);e&&(e.scrollTop=1e7)}if(n.state.appendMode){var t=document.getElementById(Ge.appendTextArea);t&&(t.scrollTop=1e7)}if(n.state.fixedHeightMode){var o=document.getElementById(Ge.view);o&&(o.scrollTop=1e7);var i=document.getElementById(Ge.edit);i&&(i.scrollTop=1e7);var s=document.getElementsByClassName("CodeMirror-vscrollbar")[0];s&&(s.scrollTop=1e7)}},n.scrollToBottom=function(){n.goDown();var e=document.getElementById(Ge.appendix);e&&e.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})},n.skipToBottom=function(){n.goDown();var e=document.getElementById(Ge.appendix);e&&e.scrollIntoView({behavior:"auto",block:"end",inline:"nearest"})},n.goUp=function(){if(document.body.scrollTop=0,n.state.editMode){var e=document.getElementById(Ge.editTextArea);e&&(e.scrollTop=0)}if(n.state.appendMode){var t=document.getElementById(Ge.appendTextArea);t&&(t.scrollTop=0)}if(n.state.fixedHeightMode){var o=document.getElementById(Ge.view);o&&(o.scrollTop=0);var i=document.getElementById(Ge.edit);i&&(i.scrollTop=0);var s=document.getElementsByClassName("CodeMirror-vscrollbar")[0];s&&(s.scrollTop=0)}},n.scrollToTop=function(){n.goUp();var e=document.getElementById("top");e&&e.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})},n.skipToTop=function(){n.goUp();var e=document.getElementById("top");e&&e.scrollIntoView({behavior:"auto",block:"start",inline:"nearest"})},n.onKeyDown=function(e){nt.set(e.key,!0),nt.get("Control")&&nt.get("e")?(e.preventDefault(),n.onEditMode()):nt.get("Control")&&!nt.get("Alt")&&(nt.get("u")||nt.get("m"))?(e.preventDefault(),n.onAppendMode()):nt.get("Control")&&!nt.get("Alt")&&nt.get("p")?(e.preventDefault(),n.onViewMode()):nt.get("Control")&&nt.get(".")?(e.preventDefault(),n.setState({appendRows:n.state.appendRows+1})):nt.get("Control")&&nt.get(",")?(e.preventDefault(),n.state.appendRows>5&&n.setState({appendRows:n.state.appendRows-1})):nt.get("Control")&&nt.get("<")?(e.preventDefault(),n.setState({appendMode:!1,editMode:!1,viewMode:!1},(function(){n.onEditMode()}))):nt.get("Control")&&nt.get(">")?(e.preventDefault(),n.setState({appendMode:!1,editMode:!1,viewMode:!1},(function(){n.onAppendMode()}))):nt.get("Control")&&nt.get("[")?(e.preventDefault(),n.skipToTop()):nt.get("Control")&&nt.get("]")?(e.preventDefault(),n.skipToBottom()):nt.get("Control")&&!nt.get("Alt")&&!nt.get("Shift")&&nt.get("w")&&nt.delete("w")},n.onKeyDownAppendTextArea=function(e){if(nt.get("Escape"))e.preventDefault(),nt.delete("Escape"),n.onAppendMode();else if(nt.get("Control")&&nt.get("Enter"))e.preventDefault(),n.state.editingMode===Xe.useCodeMirror&&n.appendTextToNote();else if(nt.get("Control")&&nt.get("s"))e.preventDefault(),n.state.editingMode===Xe.useCodeMirror&&n.appendTextToNote();else if(nt.get("Control")&&!nt.get("Shift")&&nt.get("Alt")&&nt.get("n")){e.preventDefault();var t=document.getElementById(Ge.newLine);t&&t.click()}else if(nt.get("Control")&&!nt.get("Shift")&&nt.get("Alt")&&nt.get("p")){e.preventDefault();var o=document.getElementById(Ge.newParagraph);o&&o.click()}},n.onKeyDownEditTextArea=function(e){nt.get("Escape")&&(e.preventDefault(),nt.set("Escape",!1),n.onEditMode())},n.onKeyDownTextArea=function(e){nt.get("Control")&&nt.get("b")?(e.preventDefault(),document.execCommand("insertText",!1,"**")):nt.get("Control")&&nt.get("h")?(e.preventDefault(),document.execCommand("insertText",!1,"#")):nt.get("Control")&&nt.get("Alt")&&nt.get("i")?(e.preventDefault(),document.execCommand("insertText",!1,"![]()")):nt.get("Control")&&nt.get("i")?(e.preventDefault(),document.execCommand("insertText",!1,"*")):nt.get("Control")&&nt.get("Alt")&&nt.get("k")?(e.preventDefault(),document.execCommand("insertText",!1,"`")):nt.get("Control")&&nt.get("k")?(e.preventDefault(),document.execCommand("insertText",!1,"[]()")):nt.get("Control")&&nt.get("Alt")&&nt.get("l")?(e.preventDefault(),document.execCommand("insertText",!1,"\n1. ")):nt.get("Control")&&nt.get("l")?(e.preventDefault(),document.execCommand("insertText",!1,"\n- ")):nt.get("Control")&&nt.get("Alt")&&nt.get("u")?(e.preventDefault(),document.execCommand("insertText",!1,"~~")):(nt.get("Control")&&nt.get("q")||nt.get("Control")&&nt.get("'")||nt.get("Control")&&nt.get('"'))&&(e.preventDefault(),document.execCommand("insertText",!1,"\n> "))},n.onKeyUp=function(e){nt.delete(e.key)},n.onBlur=function(e){nt.clear()},n.onScroll=function(e){n.state.settingsMode||(window.scrollYtt&&!n.state.showMenu&&(void 0!==n.state.editingMode&&n.state.editingMode!==Xe.usePlainText&&n.state.editingMode!==Xe.useCodeMirror||!n.state.editMode||n.state.appendMode||n.state.settingsMode||n.state.viewMode)&&n.removeFixedHeader(),tt=window.scrollY)},n.activateFixedHeader=function(){var e=document.getElementById(Ge.header),t=document.getElementById(Ge.content);e&&t&&(e.classList.add(qe.fixed),t.classList.add(qe.fixedHeader))},n.removeFixedHeader=function(){var e=document.getElementById(Ge.header),t=document.getElementById(Ge.content);e&&e.classList.remove(qe.fixed),t&&t.classList.remove(qe.fixedHeader)},n.configureEditorKit(),n.state=et,n}return Object(p.a)(o,[{key:"render",value:function(){var e=this;return[Object(n.jsx)("span",{id:"top"}),Object(n.jsxs)("div",{tabIndex:0,className:"sn-component",onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,onBlur:this.onBlur,children:[this.state.showHeader&&[Object(n.jsx)("div",{id:Ge.header,className:"header"+(void 0!==this.state.editingMode&&this.state.editingMode!==Xe.usePlainText&&this.state.editingMode!==Xe.useCodeMirror||!this.state.editMode||this.state.appendMode||this.state.settingsMode||this.state.viewMode?"":" fixed"),children:Object(n.jsxs)("div",{className:"sk-button-group",children:[Object(n.jsx)("button",{type:"button",id:Ge.editButton,onClick:this.onEditMode,title:"Toggle Edit Mode",className:"sk-button "+(this.state.editMode?"on":"off"),children:Object(n.jsx)(C,{condition:this.state.editMode,role:"button"})}),Object(n.jsx)("button",{type:"button",id:Ge.viewButton,onClick:this.onViewMode,title:"Toggle View Mode",className:"sk-button "+(this.state.viewMode?"on":"off"),children:Object(n.jsx)(O,{condition:this.state.viewMode,role:"button"})}),Object(n.jsx)("button",{type:"button",id:Ge.appendButton,onClick:function(){return e.onAppendMode()},title:"Toggle Append Mode",className:"sk-button "+(this.state.appendMode?"on":"off"),children:Object(n.jsx)(E,{condition:this.state.appendMode,role:"button"})}),Object(n.jsx)("div",{className:"sk-button divider",children:Object(n.jsx)("svg",{role:"img","aria-label":"Vertical line divider",width:"1",height:"24",viewBox:"0 0 1 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("rect",{width:"1",height:"24",fill:"var(--sn-stylekit-foreground-color)"})})}),Object(n.jsx)("button",{type:"button",id:Ge.helpButton,onClick:this.toggleShowHelp,title:"Help",className:"sk-button "+(this.state.showHelp?"on":"off"),children:Object(n.jsx)(M,{condition:this.state.showHelp,role:"button"})}),Object(n.jsx)("button",{type:"button",id:Ge.settingsButton,onClick:this.onSettingsMode,title:"Settings",className:"sk-button "+(this.state.settingsMode?"on":"off"),children:Object(n.jsx)(w,{condition:this.state.settingsMode,role:"button"})}),Object(n.jsx)("div",{className:"sk-button divider",children:Object(n.jsx)("svg",{role:"img","aria-label":"Vertical line divider",width:"1",height:"24",viewBox:"0 0 1 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("rect",{width:"1",height:"24",fill:"var(--sn-stylekit-foreground-color)"})})}),Object(n.jsx)("button",{type:"button",id:"scrollToBottomButtonHeader",onClick:this.skipToBottom,title:"Scroll to Bottom",className:"sk-button off",children:Object(n.jsx)("svg",{role:"button","aria-label":"Arrow pointing down for scroll to bottom button",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M6.17622 7.15015L10.0012 10.9751L13.8262 7.15015L15.0012 8.33348L10.0012 13.3335L5.00122 8.33348L6.17622 7.15015Z",fill:"var(--sn-stylekit-foreground-color)"})})}),Object(n.jsx)("button",{type:"button",id:"scrollToTopButtonHeader",onClick:this.skipToTop,title:"Scroll to Top",className:"sk-button off",children:Object(n.jsx)("svg",{role:"button","aria-label":"Arrow pointing up for scroll to top button",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M13.826 13.3335L10.001 9.5085L6.17597 13.3335L5.00097 12.1502L10.001 7.15017L15.001 12.1502L13.826 13.3335Z",fill:"var(--sn-stylekit-foreground-color)"})})}),Object(n.jsx)("button",{type:"button",id:Ge.menuButton,onClick:this.toggleShowMenu,title:"Toggle Menu",className:"sk-button "+(this.state.showMenu?"on":"off"),children:Object(n.jsx)(y,{condition:this.state.showMenu,role:"button"})})]})})],Object(n.jsxs)("div",{id:Ge.content,className:"content"+(void 0!==this.state.editingMode&&this.state.editingMode!==Xe.usePlainText&&this.state.editingMode!==Xe.useCodeMirror||!this.state.editMode||this.state.appendMode||this.state.settingsMode||this.state.viewMode?"":" fixed-header edit-only")+(this.state.borderlessMode?" borderless":"")+(this.state.fixedHeightMode?" fixed-height":"")+(this.state.fullWidthMode?" full-width":"")+(this.state.overflowMode?" overflow":""),children:[this.state.showMenu&&Object(n.jsx)(Re,{children:Object(n.jsx)(Qe,{borderlessMode:this.state.borderlessMode,editingMode:this.state.editingMode,fixedHeightMode:this.state.fixedHeightMode,fullWidthMode:this.state.fullWidthMode,monacoEditorLanguage:this.state.monacoEditorLanguage,onConfirmPrintUrl:this.onConfirmPrintUrl,overflowMode:this.state.overflowMode,refreshEdit:this.refreshEdit,refreshView:this.refreshView,saveText:this.saveText,showMenuOptionsEdit:this.state.showMenuOptionsEdit,showMenuOptionsShare:this.state.showMenuOptionsShare,showMenuOptionsView:this.state.showMenuOptionsView,text:this.state.text,toggleBorderlessMode:this.toggleBorderlessMode,toggleFixedHeightMode:this.toggleFixedHeightMode,toggleFullWidthMode:this.toggleFullWidthMode,toggleOverflowMode:this.toggleOverflowMode,toggleShowMenu:this.toggleShowMenu,toggleShowMenuOptionsEdit:this.toggleShowMenuOptionsEdit,toggleShowMenuOptionsShare:this.toggleShowMenuOptionsShare,toggleShowMenuOptionsView:this.toggleShowMenuOptionsView,viewMode:this.state.viewMode})}),this.state.settingsMode&&Object(n.jsx)(Re,{children:Object(n.jsx)(ze,{cancelText:"Cancel",confirmText:"Save",customStyles:this.state.customStyles,debugMode:ot,defaultSettings:this.state.defaultSettings,editingMode:this.state.editingMode,fontEdit:this.state.fontEdit,fontSize:this.state.fontSize,fontView:this.state.fontView,helpLink:"https://appendeditor.com/#settings",keyMap:nt,onConfirm:this.onSaveSettings,onCancel:this.onSettingsMode,title:"Append Editor Settings",monacoEditorLanguage:this.state.monacoEditorLanguage})}),this.state.editMode&&!this.state.refreshEdit&&Object(n.jsx)(Re,{children:Object(n.jsx)(z,{debugMode:ot,editingMode:this.state.editingMode,fontSize:this.state.fontSize,keyMap:nt,monacoEditorLanguage:this.state.monacoEditorLanguage,onKeyDown:this.onKeyDown,onKeyDownEditTextArea:this.onKeyDownEditTextArea,onKeyDownTextArea:this.onKeyDownTextArea,onKeyUp:this.onKeyUp,saveText:this.saveText,text:this.state.text,viewMode:this.state.viewMode})}),this.state.editMode&&this.state.refreshEdit&&Object(n.jsx)(Re,{children:Object(n.jsx)(z,{debugMode:ot,editingMode:this.state.editingMode,fontSize:this.state.fontSize,keyMap:nt,monacoEditorLanguage:this.state.monacoEditorLanguage,onKeyDown:this.onKeyDown,onKeyDownEditTextArea:this.onKeyDownEditTextArea,onKeyDownTextArea:this.onKeyDownTextArea,onKeyUp:this.onKeyUp,saveText:this.saveText,text:this.state.text,viewMode:this.state.viewMode})}),this.state.viewMode&&!this.state.refreshView&&Object(n.jsx)(Re,{children:Object(n.jsx)(Oe,{appendMode:this.state.appendMode,bypassDebounce:this.state.bypassDebounce,debugMode:ot,editMode:this.state.editMode,editingMode:this.state.editingMode,monacoEditorLanguage:this.state.monacoEditorLanguage,printURL:this.state.printURL,showHelp:this.state.showHelp,saveText:this.saveText,text:this.state.text})}),this.state.viewMode&&this.state.refreshView&&Object(n.jsx)(Re,{children:Object(n.jsx)(Oe,{appendMode:this.state.appendMode,bypassDebounce:this.state.bypassDebounce,debugMode:ot,editMode:this.state.editMode,editingMode:this.state.editingMode,monacoEditorLanguage:this.state.monacoEditorLanguage,printURL:this.state.printURL,showHelp:this.state.showHelp,saveText:this.saveText,text:this.state.text})}),this.state.confirmPrintUrl&&Object(n.jsxs)(Re,{children:[Object(n.jsx)(L,{title:"Would you like to print URLs?",onUndo:this.onCancelPrint,onConfirm:this.onPrintUrlTrue,onCancel:this.onPrintUrlFalse,helpLink:"https://appendeditor.com/#printing",confirmText:"Yes, print URLs",cancelText:"No, thanks"})," "]}),this.state.showDiff&&[Object(n.jsx)(Re,{children:Object(n.jsx)(V,{text:this.state.text,modifiedText:this.state.appendText,saveText:this.saveText})})]]}),this.state.showAppendix&&[Object(n.jsxs)("div",{id:Ge.appendix,className:"appendix"+(this.state.borderlessMode?" borderless":"")+(this.state.fullWidthMode?" full-width":""),children:[this.state.appendMode&&Object(n.jsx)(Re,{children:Object(n.jsx)(Me,{appendTextToNote:this.appendTextToNote,autoSaveAppendText:this.autoSaveAppendText,autoSaveCheckBoxes:this.autoSaveCheckBoxes,debugMode:ot,editingMode:this.state.editingMode,fontSize:this.state.fontSize,keyMap:nt,appendNewLine:this.state.appendNewLine,appendNewParagraph:this.state.appendNewParagraph,monacoEditorLanguage:this.state.monacoEditorLanguage,onKeyDown:this.onKeyDown,onKeyDownAppendTextArea:this.onKeyDownAppendTextArea,onKeyDownTextArea:this.onKeyDownTextArea,onKeyUp:this.onKeyUp,appendRows:this.state.appendRows,text:this.state.appendText})}),Object(n.jsx)("button",{className:"sk-button info",id:"scrollToTopButton",onClick:this.scrollToTop,title:"Scroll to Top",type:"button",children:Object(n.jsx)("div",{children:" \u25b2 "})}),Object(n.jsx)("button",{className:"sk-button info",id:"scrollToBottomButton",onClick:this.scrollToBottom,title:"Scroll to Bottom",type:"button",children:Object(n.jsx)("div",{children:" \u25bc "})})]})]]})]}}]),o}(s.a.Component);o(1174);r.a.render(Object(n.jsx)(s.a.StrictMode,{children:Object(n.jsx)(it,{})}),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()})).catch((function(e){console.error(e.message)})),c()},455:function(e,t,o){}},[[1175,3,4]]]); -//# sourceMappingURL=main.7e0f6b25.chunk.js.map \ No newline at end of file +(this["webpackJsonpappend-editor"]=this["webpackJsonpappend-editor"]||[]).push([[2],{1174:function(e,t,o){},1175:function(e,t,o){"use strict";o.r(t);var n=o(6),i=o(24),s=o.n(i),a=o(151),r=o.n(a);o(455),Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));var c=function(e){e&&e instanceof Function&&o.e(73).then(o.bind(null,1181)).then((function(t){var o=t.getCLS,n=t.getFID,i=t.getFCP,s=t.getLCP,a=t.getTTFB;o(e),n(e),i(e),s(e),a(e)}))},l=o(181),d=o(0),p=o(1),h=o(4),u=o(5),j=o(311),g="var(--sn-stylekit-info-color)",b="var(--sn-stylekit-foreground-color)",f=function(e){var t=e.fill,o=e.role;return Object(n.jsx)("span",{className:"chevron-icon down",children:Object(n.jsx)("svg",{"aria-label":"chevron icon down",role:o,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M6.17622 7.15015L10.0012 10.9751L13.8262 7.15015L15.0012 8.33348L10.0012 13.3335L5.00122 8.33348L6.17622 7.15015Z",fill:t||b})})})},x=function(e){var t=e.fill,o=e.role;return Object(n.jsx)("span",{className:"chevron-icon right",children:Object(n.jsx)("svg",{"aria-label":"chevron icon down",role:o,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M6.90918 14.0667L10.7342 10.2417L6.90918 6.4167L8.09251 5.2417L13.0925 10.2417L8.09251 15.2417L6.90918 14.0667Z",fill:t||b})})})},m=function(e){var t=e.fill,o=e.role;return Object(n.jsx)("svg",{"aria-label":"close icon",role:o,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M15.2459 5.92917C15.5704 5.6047 15.5704 5.07864 15.2459 4.75417C14.9214 4.4297 14.3954 4.4297 14.0709 4.75417L10.0001 8.82501L5.92925 4.75417C5.60478 4.4297 5.07872 4.4297 4.75425 4.75417C4.42978 5.07864 4.42978 5.6047 4.75425 5.92917L8.82508 10L4.75425 14.0708C4.42978 14.3953 4.42978 14.9214 4.75425 15.2458C5.07872 15.5703 5.60478 15.5703 5.92925 15.2458L10.0001 11.175L14.0709 15.2458C14.3954 15.5703 14.9214 15.5703 15.2459 15.2458C15.5704 14.9214 15.5704 14.3953 15.2459 14.0708L11.1751 10L15.2459 5.92917Z",fill:t||b})})},v=function(e){var t=e.fill,o=e.role;return Object(n.jsx)("svg",{"aria-label":"copy icon",role:o,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M1.66724 3.66626C1.66724 2.56169 2.56267 1.66626 3.66724 1.66626H11.3339C12.4385 1.66626 13.3339 2.56169 13.3339 3.66626V13.3329H3.66724C2.56267 13.3329 1.66724 12.4375 1.66724 11.3329V3.66626ZM16.3339 6.66626C17.4385 6.66626 18.3339 7.56169 18.3339 8.66626V16.3329C18.3339 17.4375 17.4385 18.3329 16.3339 18.3329H8.66724C7.56267 18.3329 6.66724 17.4375 6.66724 16.3329V14.9996H15.0006V6.66626H16.3339ZM3.3339 3.33293V11.6663H11.6672V3.33293H3.3339Z",fill:t||b})})},O=function(e){var t=e.condition,o=e.fill,i=e.role;return Object(n.jsx)("svg",{"aria-label":"eye icon",role:i,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M9.99992 7.5C9.33688 7.5 8.70099 7.76339 8.23215 8.23223C7.76331 8.70107 7.49992 9.33696 7.49992 10C7.49992 10.663 7.76331 11.2989 8.23215 11.7678C8.70099 12.2366 9.33688 12.5 9.99992 12.5C10.663 12.5 11.2988 12.2366 11.7677 11.7678C12.2365 11.2989 12.4999 10.663 12.4999 10C12.4999 9.33696 12.2365 8.70107 11.7677 8.23223C11.2988 7.76339 10.663 7.5 9.99992 7.5ZM9.99992 14.1667C8.89485 14.1667 7.83504 13.7277 7.05364 12.9463C6.27224 12.1649 5.83325 11.1051 5.83325 10C5.83325 8.89493 6.27224 7.83512 7.05364 7.05372C7.83504 6.27232 8.89485 5.83333 9.99992 5.83333C11.105 5.83333 12.1648 6.27232 12.9462 7.05372C13.7276 7.83512 14.1666 8.89493 14.1666 10C14.1666 11.1051 13.7276 12.1649 12.9462 12.9463C12.1648 13.7277 11.105 14.1667 9.99992 14.1667ZM9.99992 3.75C5.83325 3.75 2.27492 6.34167 0.833252 10C2.27492 13.6583 5.83325 16.25 9.99992 16.25C14.1666 16.25 17.7249 13.6583 19.1666 10C17.7249 6.34167 14.1666 3.75 9.99992 3.75Z",fill:o||(t?g:b)})})},w=function(e){var t=e.condition,o=e.fill,i=e.role;return Object(n.jsx)("svg",{"aria-label":"gear icon",role:i,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M10.0001 6.66675C10.8842 6.66675 11.732 7.01794 12.3571 7.64306C12.9823 8.26818 13.3334 9.11603 13.3334 10.0001C13.3334 10.8841 12.9823 11.732 12.3571 12.3571C11.732 12.9822 10.8842 13.3334 10.0001 13.3334C9.11606 13.3334 8.26821 12.9822 7.64309 12.3571C7.01797 11.732 6.66678 10.8841 6.66678 10.0001C6.66678 9.11603 7.01797 8.26818 7.64309 7.64306C8.26821 7.01794 9.11606 6.66675 10.0001 6.66675ZM10.0001 8.33342C9.55808 8.33342 9.13416 8.50901 8.8216 8.82157C8.50904 9.13413 8.33344 9.55805 8.33344 10.0001C8.33344 10.4421 8.50904 10.866 8.8216 11.1786C9.13416 11.4912 9.55808 11.6667 10.0001 11.6667C10.4421 11.6667 10.8661 11.4912 11.1786 11.1786C11.4912 10.866 11.6668 10.4421 11.6668 10.0001C11.6668 9.55805 11.4912 9.13413 11.1786 8.82157C10.8661 8.50901 10.4421 8.33342 10.0001 8.33342ZM8.33344 18.3334C8.12511 18.3334 7.95011 18.1834 7.91678 17.9834L7.60844 15.7751C7.08344 15.5667 6.63344 15.2834 6.20011 14.9501L4.12511 15.7917C3.94178 15.8584 3.71678 15.7917 3.61678 15.6084L1.95011 12.7251C1.84178 12.5417 1.89178 12.3167 2.05011 12.1917L3.80844 10.8084L3.75011 10.0001L3.80844 9.16675L2.05011 7.80841C1.89178 7.68341 1.84178 7.45841 1.95011 7.27508L3.61678 4.39175C3.71678 4.20841 3.94178 4.13341 4.12511 4.20842L6.20011 5.04175C6.63344 4.71675 7.08344 4.43341 7.60844 4.22508L7.91678 2.01675C7.95011 1.81675 8.12511 1.66675 8.33344 1.66675H11.6668C11.8751 1.66675 12.0501 1.81675 12.0834 2.01675L12.3918 4.22508C12.9168 4.43341 13.3668 4.71675 13.8001 5.04175L15.8751 4.20842C16.0584 4.13341 16.2834 4.20841 16.3834 4.39175L18.0501 7.27508C18.1584 7.45841 18.1084 7.68341 17.9501 7.80841L16.1918 9.16675L16.2501 10.0001L16.1918 10.8334L17.9501 12.1917C18.1084 12.3167 18.1584 12.5417 18.0501 12.7251L16.3834 15.6084C16.2834 15.7917 16.0584 15.8667 15.8751 15.7917L13.8001 14.9584C13.3668 15.2834 12.9168 15.5667 12.3918 15.7751L12.0834 17.9834C12.0501 18.1834 11.8751 18.3334 11.6668 18.3334H8.33344ZM9.37511 3.33341L9.06678 5.50841C8.06678 5.71675 7.18344 6.25008 6.54178 6.99175L4.53344 6.12508L3.90844 7.20841L5.66678 8.50008C5.33344 9.47508 5.33344 10.5334 5.66678 11.5001L3.90011 12.8001L4.52511 13.8834L6.55011 13.0167C7.19178 13.7501 8.06678 14.2834 9.05844 14.4834L9.36678 16.6667H10.6334L10.9418 14.4917C11.9334 14.2834 12.8084 13.7501 13.4501 13.0167L15.4751 13.8834L16.1001 12.8001L14.3334 11.5084C14.6668 10.5334 14.6668 9.47508 14.3334 8.50008L16.0918 7.20841L15.4668 6.12508L13.4584 6.99175C12.8168 6.25008 11.9334 5.71675 10.9334 5.51675L10.6251 3.33341H9.37511Z",fill:o||(t?g:b)})})},M=function(e){var t=e.condition,o=e.fill,i=e.role;return Object(n.jsx)("svg",{"aria-label":"help icon",role:i,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M9.16675 15.0001H10.8334V13.3334H9.16675V15.0001ZM10.0001 1.66675C8.90573 1.66675 7.8221 1.8823 6.81105 2.30109C5.80001 2.71987 4.88135 3.3337 4.10753 4.10753C2.54472 5.67033 1.66675 7.78995 1.66675 10.0001C1.66675 12.2102 2.54472 14.3298 4.10753 15.8926C4.88135 16.6665 5.80001 17.2803 6.81105 17.6991C7.8221 18.1179 8.90573 18.3334 10.0001 18.3334C12.2102 18.3334 14.3298 17.4554 15.8926 15.8926C17.4554 14.3298 18.3334 12.2102 18.3334 10.0001C18.3334 8.90573 18.1179 7.8221 17.6991 6.81105C17.2803 5.80001 16.6665 4.88135 15.8926 4.10753C15.1188 3.3337 14.2002 2.71987 13.1891 2.30109C12.1781 1.8823 11.0944 1.66675 10.0001 1.66675ZM10.0001 16.6668C6.32508 16.6668 3.33342 13.6751 3.33342 10.0001C3.33342 6.32508 6.32508 3.33342 10.0001 3.33342C13.6751 3.33342 16.6668 6.32508 16.6668 10.0001C16.6668 13.6751 13.6751 16.6668 10.0001 16.6668ZM10.0001 5.00008C9.11603 5.00008 8.26818 5.35127 7.64306 5.97639C7.01794 6.60151 6.66675 7.44936 6.66675 8.33342H8.33342C8.33342 7.89139 8.50901 7.46747 8.82157 7.1549C9.13413 6.84234 9.55806 6.66675 10.0001 6.66675C10.4421 6.66675 10.866 6.84234 11.1786 7.1549C11.4912 7.46747 11.6667 7.89139 11.6667 8.33342C11.6667 10.0001 9.16675 9.79175 9.16675 12.5001H10.8334C10.8334 10.6251 13.3334 10.4167 13.3334 8.33342C13.3334 7.44936 12.9822 6.60151 12.3571 5.97639C11.732 5.35127 10.8841 5.00008 10.0001 5.00008Z",fill:o||(t?g:b)})})},y=function(e){var t=e.condition,o=e.fill,i=e.role;return Object(n.jsx)("svg",{"aria-label":"menu icon",role:i,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M17 5V6.66667H3V5H17ZM3 15H17V13.3333H3V15ZM3 10.8333H17V9.16667H3V10.8333Z",fill:o||(t?g:b)})})},C=function(e){var t=e.condition,o=e.fill,i=e.role;return Object(n.jsx)("svg",{"aria-label":"pencil icon",role:i,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M11.7167 7.5L12.5 8.28333L4.93333 15.8333H4.16667V15.0667L11.7167 7.5ZM14.7167 2.5C14.5083 2.5 14.2917 2.58333 14.1333 2.74167L12.6083 4.26667L15.7333 7.39167L17.2583 5.86667C17.5833 5.54167 17.5833 5 17.2583 4.69167L15.3083 2.74167C15.1417 2.575 14.9333 2.5 14.7167 2.5ZM11.7167 5.15833L2.5 14.375V17.5H5.625L14.8417 8.28333L11.7167 5.15833Z",fill:o||(t?g:b)})})},E=function(e){var t=e.condition,o=e.fill,i=e.role;return Object(n.jsx)("svg",{role:i,"aria-label":"plus icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.385 11.385H15.615C16.3799 11.385 17 10.7649 17 10C17 9.23507 16.3799 8.61497 15.615 8.61497H11.385V4.38503C11.385 3.6201 10.7649 3 10 3C9.23507 3 8.61497 3.6201 8.61497 4.38503V8.61497H4.38503C3.6201 8.61497 3 9.23507 3 10C3 10.7649 3.6201 11.385 4.38503 11.385H8.61497V15.615C8.61497 16.3799 9.23507 17 10 17C10.7649 17 11.385 16.3799 11.385 15.615V11.385Z",fill:o||(t?g:b)})})},S=function(e){var t=e.fill,o=e.role;return Object(n.jsx)("svg",{"aria-label":"print icon",role:o,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M15.0001 2.5H5.00008V5.83333H15.0001V2.5ZM15.8334 10C15.6124 10 15.4004 9.9122 15.2442 9.75592C15.0879 9.59964 15.0001 9.38768 15.0001 9.16667C15.0001 8.94565 15.0879 8.73369 15.2442 8.57741C15.4004 8.42113 15.6124 8.33333 15.8334 8.33333C16.0544 8.33333 16.2664 8.42113 16.4227 8.57741C16.579 8.73369 16.6668 8.94565 16.6668 9.16667C16.6668 9.38768 16.579 9.59964 16.4227 9.75592C16.2664 9.9122 16.0544 10 15.8334 10ZM13.3334 15.8333H6.66675V11.6667H13.3334V15.8333ZM15.8334 6.66667H4.16675C3.50371 6.66667 2.86782 6.93006 2.39898 7.3989C1.93014 7.86774 1.66675 8.50363 1.66675 9.16667V14.1667H5.00008V17.5H15.0001V14.1667H18.3334V9.16667C18.3334 8.50363 18.07 7.86774 17.6012 7.3989C17.1323 6.93006 16.4965 6.66667 15.8334 6.66667Z",fill:t||b})})},k=function(e){var t=e.fill,o=e.role;return Object(n.jsx)("svg",{"aria-label":"refresh icon",role:o,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M9.99992 14.9999C8.67384 14.9999 7.40207 14.4731 6.46438 13.5355C5.5267 12.5978 4.99992 11.326 4.99992 9.99992C4.99992 9.16658 5.20825 8.35825 5.58325 7.66658L4.36659 6.44992C3.71659 7.47492 3.33325 8.69158 3.33325 9.99992C3.33325 11.768 4.03563 13.4637 5.28587 14.714C6.53612 15.9642 8.23181 16.6666 9.99992 16.6666V19.1666L13.3333 15.8332L9.99992 12.4999V14.9999ZM9.99992 3.33325V0.833252L6.66658 4.16658L9.99992 7.49992V4.99992C11.326 4.99992 12.5978 5.5267 13.5355 6.46438C14.4731 7.40207 14.9999 8.67383 14.9999 9.99992C14.9999 10.8333 14.7916 11.6416 14.4166 12.3333L15.6333 13.5499C16.2833 12.5249 16.6666 11.3083 16.6666 9.99992C16.6666 8.23181 15.9642 6.53612 14.714 5.28587C13.4637 4.03563 11.768 3.33325 9.99992 3.33325Z",fill:t||b})})},T=function(e){var t=e.fill,o=e.role;return Object(n.jsx)("svg",{"aria-label":"undo icon",role:o,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M10.1812 7.66667C8.36883 7.66667 6.72741 8.33333 5.46214 9.4L3 7V13H9.15535L6.67953 10.5867C7.63019 9.81333 8.84074 9.33333 10.1812 9.33333C12.6023 9.33333 14.661 10.8733 15.3791 13L17 12.48C16.0493 9.68667 13.3615 7.66667 10.1812 7.66667Z",fill:t||b})})},L=function(e){var t=e.cancelText,o=e.confirmText,i=e.helpLink,s=e.onCancel,a=e.onConfirm,r=e.onUndo,c=e.title;return Object(n.jsx)("div",{className:"note-overlay",children:Object(n.jsxs)("div",{className:"sk-panel note-dialog",children:[Object(n.jsx)("div",{className:"sk-panel-content",children:Object(n.jsxs)("div",{className:"sk-panel-section",children:[Object(n.jsxs)("div",{className:"sk-panel-row title-section",children:[Object(n.jsx)("h2",{children:c}),Object(n.jsx)("button",{id:"undoDialog",onClick:r,title:"Close",children:Object(n.jsx)(m,{role:"button"})})]}),Object(n.jsxs)("p",{children:["Need help deciding? Check out the"," ",Object(n.jsx)("a",{href:i,target:"_blank",rel:"noopener noreferrer",children:"documentation"}),"."]})]})}),Object(n.jsx)("div",{className:"sk-panel-footer",children:Object(n.jsxs)("div",{className:"sk-button-group stretch",children:[Object(n.jsx)("button",{className:"sk-button neutral",onClick:s,children:Object(n.jsx)("div",{children:t})}),Object(n.jsx)("button",{className:"sk-button info",onClick:a,children:Object(n.jsx)("div",{children:o})})]})})]})})},N=o(242),B="MonacoEditorContainer",D="MonacoDiffEditorContainer";self.MonacoEnvironment={getWorkerUrl:function(e,t){return"json"===t?"./monaco/json.worker.bundle.js":"css"===t||"scss"===t||"less"===t?"./monaco/css.worker.bundle.js":"html"===t||"handlebars"===t||"razor"===t?"./monaco/html.worker.bundle.js":"typescript"===t||"javascript"===t?"./monaco/ts.worker.bundle.js":"./monaco/editor.worker.bundle.js"}};var A=function(e){var t,o=e.fontSize,s=void 0===o?"16":o,a=e.id,r=void 0===a?B:a,c=e.language,l=void 0===c?"markdown":c,d=e.saveText,p=e.tabSize,h=void 0===p?2:p,u=e.text,j=e.theme,g=void 0===j?"vs-dark":j,b=e.viewMode,f=void 0!==b&&b,x=Object(i.useRef)(null);""===s&&(s="16px");var m=!0;return f&&(m=!1),Object(i.useEffect)((function(){return x.current&&((t=N.a.create(x.current,{fontSize:parseInt(s.replace("px","")),language:l,tabSize:h,theme:g,scrollBeyondLastLine:m,value:[u].join("\n"),autoClosingOvertype:"auto",formatOnPaste:!0,formatOnType:!0,wordWrap:"on",wrappingStrategy:"advanced"})).onKeyDown((function(e){!function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&console.log("IKeyboardEvent Up: "+e)}(e.code,false),e.ctrlKey&&"KeyS"===e.code&&e.preventDefault()})),t.onKeyUp((function(e){!function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&console.log("IKeyboardEvent Up: "+e)}(e.code,false)})),t.onDidChangeModelContent((function(e){d&&d(t.getValue())}))),function(){t.dispose()}}),[]),Object(n.jsx)("div",{id:r,className:B,ref:x})},V=function(e){var t,o=e.fontSize,s=void 0===o?"16":o,a=e.id,r=void 0===a?D:a,c=e.language,l=void 0===c?"markdown":c,d=e.saveText,p=e.text,h=e.modifiedText,u=e.theme,j=void 0===u?"vs-dark":u,g=Object(i.useRef)(null);return""===s&&(s="16px"),Object(i.useEffect)((function(){if(g.current){var e=N.a.createModel([p].join("\n"),l),o=N.a.createModel([h].join("\n"),l);(t=N.a.createDiffEditor(g.current,{fontSize:parseInt(s.replace("px","")),theme:j,autoClosingOvertype:"auto",formatOnPaste:!0,formatOnType:!0,wordWrap:"on",wrappingStrategy:"advanced",originalEditable:!0,readOnly:!0})).setModel({original:e,modified:o}),e.onDidChangeContent((function(t){d&&d(e.getValue())}))}return function(){t.dispose()}}),[]),Object(n.jsx)("div",{id:r,className:D,ref:g})},H=o(440),K=o.n(H),I=o(441),F=o.n(I),P=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(){return Object(d.a)(this,o),t.apply(this,arguments)}return Object(p.a)(o,[{key:"render",value:function(){var e=this.props.attrs.matches[1];return Object(n.jsx)("iframe",{title:"Youtube Embed ".concat(e),className:this.props.isSelected?"YouTube ProseMirror-selectednode":"YouTube",src:"https://www.youtube.com/embed/".concat(e,"?modestbranding=1")})}}]),o}(i.Component),U=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;return Object(d.a)(this,o),(n=t.call(this,e)).handleToggleReadOnly=function(){n.setState({readOnly:!n.state.readOnly})},n.handleChange=K()((function(e){var t=e();n.props.debugMode&&console.log(t),n.props.onChange(t)}),50),n.state={readOnly:n.props.readOnly,template:!1,value:void 0},n}return Object(p.a)(o,[{key:"render",value:function(){var e=this;return Object(n.jsx)(F.a,{className:"DynamicEditor",placeholder:"Type '/' to insert...",id:"DynamicEditor",readOnly:this.state.readOnly,readOnlyWriteCheckboxes:!0,value:this.state.value,defaultValue:this.props.text,scrollTo:window.location.hash,onCancel:function(){e.props.debugMode&&console.log("Cancel triggered")},autoFocus:!0,onChange:function(t){return e.handleChange(t)},embeds:[{title:"YouTube",keywords:"youtube video tube google",icon:function(){return Object(n.jsx)("img",{alt:"YouTube Logo",src:"/icons/ic-YouTube.svg",width:24,height:24})},matcher:function(e){return e.match(/(?:https?:\/\/)?(?:www\.)?youtu\.?be(?:\.com)?\/?.*(?:watch|embed)?(?:.*v=|v\/|\/)([a-zA-Z0-9_-]{11})$/i)},component:P}]})}}]),o}(i.Component),z=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;return Object(d.a)(this,o),(n=t.call(this,e)).handleInputChange=function(e){var t=e.target.value;n.setState({text:t},(function(){n.props.saveText(n.state.text)}))},n.saveText=function(e){n.setState({text:e},(function(){n.props.saveText(n.state.text)}))},n.onBlur=function(e){var t=document.getElementById(Ge.content);t&&t.classList.remove(qe.focused)},n.onFocus=function(e){var t=document.getElementById(Ge.content);t&&t.classList.add(qe.focused)},n.onKeyDown=function(e){n.props.onKeyDown(e),n.props.onKeyDownEditTextArea(e),n.props.onKeyDownTextArea(e)},n.onKeyUp=function(e){n.props.keyMap.delete(e.key),n.props.onKeyUp(e)},n.state={text:n.props.text},n}return Object(p.a)(o,[{key:"render",value:function(){var e=this.state.text;return Object(n.jsx)("div",{className:"sk-panel main edit "+(this.props.editingMode===Xe.useMonacoEditor?"monacoEditor":this.props.editingMode===Xe.useDynamicEditor?"dynamicEditor":"otherEditor"),children:Object(n.jsx)("div",{className:"sk-panel-content edit"+(this.props.editingMode===Xe.useMonacoEditor?" MonacoEditorContainerParentDiv":""),id:Ge.edit,children:this.props.editingMode===Xe.useMonacoEditor?Object(n.jsx)(A,{fontSize:this.props.fontSize,language:this.props.monacoEditorLanguage,saveText:this.saveText,text:e,viewMode:this.props.viewMode}):this.props.editingMode===Xe.useDynamicEditor?Object(n.jsx)("div",{id:"dynamicEditor",children:Object(n.jsx)(U,{debugMode:this.props.debugMode,text:e,onChange:this.saveText,readOnly:!1})}):Object(n.jsx)("textarea",{id:Ge.editTextArea,name:"text",className:"sk-input contrast textarea editnote",placeholder:"Welcome to the Append Editor! \ud83d\ude04",rows:15,spellCheck:"true",value:e,onBlur:this.onBlur,onChange:this.handleInputChange,onFocus:this.onFocus,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp})})})}}]),o}(s.a.Component);z.defaultProps={};var R=function(){var e=document.getElementById(Ge.appendButton);e&&e.click()},W=function(){var e=document.getElementById(Ge.editButton);e&&e.click()},_=function(){var e=document.getElementById(Ge.helpButton);e&&e.click()},Z=function(){var e=document.getElementById(Ge.menuButton);e&&e.click()},Y=function(){var e=document.getElementById(Ge.settingsButton);e&&e.click()},G=function(){var e=document.getElementById(Ge.viewButton);e&&e.click()},q=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;return Object(d.a)(this,o),(n=t.call(this,e)).onToggleShowFeelings=function(){n.setState({showFeelings:!n.state.showFeelings})},n.onToggleShowMoreQuestions=function(){n.setState({showMoreQuestions:!n.state.showMoreQuestions})},n.onToggleShowFeedback=function(){n.setState({showFeedback:!n.state.showFeedback})},n.state={showFeelings:!1,showMoreQuestions:!1,showFeedback:!1},n}return Object(p.a)(o,[{key:"render",value:function(){return Object(n.jsxs)("div",{id:"help",children:[Object(n.jsx)("hr",{}),Object(n.jsx)("h2",{children:"Append Editor Help"}),Object(n.jsxs)("p",{children:["The Append Editor is an ",Object(n.jsx)("b",{children:"unofficial"})," ",Object(n.jsx)("a",{href:"https://standardnotes.org/help/77/what-are-editors",target:"_blank",rel:"nofollow noreferrer noopener",children:"editor"})," ","for"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/",target:"_blank",rel:"nofollow noreferrer noopener",children:"Standard Notes"}),", a free,"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/knowledge/5/what-is-free-and-open-source-software",target:"_blank",rel:"nofollow noreferrer noopener",children:"open-source"}),", and"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/knowledge/2/what-is-end-to-end-encryption",target:"_blank",rel:"nofollow noreferrer noopener",children:"end-to-end encrypted"})," ","notes app. The Append Editor is also free software licensed under"," ",Object(n.jsx)("a",{href:"https://github.com/TheodoreChu/append-editor/blob/main/LICENSE",target:"_blank",rel:"nofollow noreferrer noopener",children:"AGPL-3.0"}),". Its source code is available on"," ",Object(n.jsx)("a",{href:"https://github.com/TheodoreChu/append-editor",target:"_blank",rel:"nofollow noreferrer noopener",children:"GitHub"}),"."]}),Object(n.jsx)("h3",{children:"Append Editor Features"}),Object(n.jsxs)("p",{children:["The Append Editor supports"," ",Object(n.jsx)("a",{href:"https://guides.github.com/features/mastering-markdown/",target:"_blank",rel:"nofollow noreferrer noopener",children:"Markdown"})," ","with"," ",Object(n.jsx)("a",{href:"https://katex.org/docs/support_table.html",target:"_blank",rel:"nofollow noreferrer noopener",children:"KaTeX"}),", syntax highlighting, in-line HTML, table of contents, footnotes, auto-linking,"," ",Object(n.jsx)("a",{href:"https://github.com/ikatyang/emoji-cheat-sheet/blob/master/README.md",target:"_blank",rel:"nofollow noreferrer noopener",children:"emoji codes"}),", and more."," "]}),Object(n.jsxs)("p",{children:["There are four editing modes: Plain Textarea, CodeMirror, Dynamic, and Monaco. You can read about each mode and choose which to use in the Settings",Object(n.jsxs)("button",{className:"inline-text-and-svg",onClick:Y,title:"Open Settings",children:[Object(n.jsx)("span",{children:"\xa0"}),Object(n.jsx)(w,{role:"button"}),Object(n.jsx)("span",{children:"\xa0"})]}),". You can also choose default and per-note font sizes, font families, and custom styles (CSS)."]}),Object(n.jsxs)("p",{children:["The Menu",Object(n.jsxs)("button",{className:"inline-text-and-svg",onClick:Z,title:"Open the Menu",children:[Object(n.jsx)("span",{children:"\xa0"}),Object(n.jsx)(y,{role:"button"}),Object(n.jsx)("span",{children:"\xa0"})]}),"has additional options to customize the appearance of the editor, share your note, and perform actions to quickly format and edit Markdown text."]}),Object(n.jsxs)("p",{children:["A more detailed documentation of the Append Editor is available at"," ",Object(n.jsx)("a",{href:"https://appendeditor.com",target:"_blank",rel:"noopener noreferrer",children:"appendeditor.com"}),". If you like the Append Editor, please support it by giving it a star on"," ",Object(n.jsx)("a",{href:"https://github.com/TheodoreChu/append-editor/stargazers",target:"_blank",rel:"noopener noreferrer",children:"GitHub"}),"."," ",Object(n.jsx)("span",{role:"img","aria-label":"smile emoji",children:"\ud83d\ude42"})," "]}),Object(n.jsx)("h3",{children:"How to install the Append Editor in Standard Notes"}),Object(n.jsxs)("ol",{children:[Object(n.jsxs)("li",{children:["Download, install, and sign in to the Standard Notes"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/download",target:"_blank",rel:"noopener noreferrer",children:"Desktop"})," ","app."]}),Object(n.jsxs)("li",{children:["In the bottom left corner of the app, click ",Object(n.jsx)("b",{children:"Extensions"}),"."]}),Object(n.jsxs)("li",{children:["Click ",Object(n.jsx)("b",{children:"Import Extensions"})," and paste the following link into the input box. If you want to use the alpha version, replace"," ",Object(n.jsx)("code",{children:"beta"})," with ",Object(n.jsx)("code",{children:"alpha"}),":"," ",Object(n.jsx)("code",{children:Object(n.jsx)("a",{href:"https://raw.githubusercontent.com/TheodoreChu/append-editor/main/public/beta.ext.json",target:"_blank",rel:"noopener noreferrer",children:"https://raw.githubusercontent.com/TheodoreChu/append-editor/main/public/beta.ext.json"})})]}),Object(n.jsxs)("li",{children:["Press ",Object(n.jsx)("b",{children:"Enter"})," or ",Object(n.jsx)("b",{children:"Return"})," on your keyboard."]}),Object(n.jsxs)("li",{children:["The title of your selected note is near the top of the app. Under the title, click ",Object(n.jsx)("b",{children:"Editor"}),", click ",Object(n.jsx)("b",{children:"Append Editor"}),", and click ",Object(n.jsx)("b",{children:"Continue"})," to begin using the editor. Enjoy!"," ",Object(n.jsx)("span",{role:"img","aria-label":"clap emoji",children:"\ud83d\udc4f"})," "]})]}),Object(n.jsxs)("p",{children:["After you install the editor on the desktop app, it will automatically sync to the"," ",Object(n.jsx)("a",{href:"https://app.standardnotes.org",target:"_blank",rel:"noopener noreferrer",children:"web"})," ","and"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/download",target:"_blank",rel:"noopener noreferrer",children:"mobile apps"})," ","after you sign in."]}),Object(n.jsx)("h3",{children:"What to write about"}),Object(n.jsx)("p",{children:"The Append Editor is great for writing articles, blog posts, checklists, code snippets, documentation, emails, essays, journals, lists, logs, notes, tables, todo lists, and much more. Here are some questions to help you get started with today's daily journal:"})," ",Object(n.jsxs)("ul",{children:[Object(n.jsx)("li",{children:"How are you? What's happening?"}),Object(n.jsx)("li",{children:"What might be affecting your mood?"}),Object(n.jsx)("li",{children:"Which feelings fit your mood and to what extent?"}),Object(n.jsxs)("details",{onToggle:this.onToggleShowFeelings,children:[Object(n.jsxs)("summary",{children:[!this.state.showFeelings&&[Object(n.jsx)("p",{className:"link",children:"Show feelings"})],this.state.showFeelings&&[Object(n.jsx)("p",{className:"link",children:"Hide feelings"})]]}),Object(n.jsxs)("li",{children:[Object(n.jsx)("b",{children:"Positive Feelings:"})," bold, calm, cheerful, confident, content, eager, ecstatic, energized, engaged, enthusiastic, excited, grateful, happy, humorous, inspired, joyful, light, lively, loving, motivated, optimistic, passionate, peaceful, playful, proud, reassured, refreshed, relaxed, relieved, satisfied, secure, surprised, thrilled, wonderful"]}),Object(n.jsxs)("li",{children:[Object(n.jsx)("b",{children:"Negative Feelings:"})," afraid, angry, annoyed, anxious, ashamed, bored, burnt out, confused, demoralized, depressed, disappointed, disgusted, distraught, embarrassed, empty, exhausted, frustrated, furious, guilty, heavy, insecure, irritated, jealous, jittery, lethargic, lonely, nervous, numb, resentful, sad, self-conscious, sleepy, stressed, tired, winded, worried"]})]}),Object(n.jsx)("li",{children:"What thoughts are contributing to the way you're feeling?"}),Object(n.jsx)("details",{onToggle:this.onToggleShowMoreQuestions,children:Object(n.jsxs)("summary",{children:[!this.state.showMoreQuestions&&[Object(n.jsx)("p",{className:"link",children:"Show more questions"})],this.state.showMoreQuestions&&[Object(n.jsx)("p",{className:"link",children:"Show fewer questions"})]]})}),this.state.showMoreQuestions&&[Object(n.jsxs)("div",{children:[Object(n.jsx)("li",{children:"What do you hope your life will look like in a week? a month? a year?"}),Object(n.jsx)("li",{children:"What can you do today to make your life the way you want it?"}),Object(n.jsx)("li",{children:"How will you feel when you've realized the goals that you have for yourself?"}),Object(n.jsx)("li",{children:"Who or what do you feel grateful for and why?"}),Object(n.jsx)("li",{children:"What did you enjoy about today?"})]})]]}),Object(n.jsxs)("details",{onToggle:this.onToggleShowFeedback,children:[Object(n.jsx)("summary",{children:Object(n.jsx)("p",{className:"link",children:"Need more help?"})}),this.state.showFeedback&&[Object(n.jsxs)("p",{children:["Feel free to"," ",Object(n.jsx)("a",{href:"https://appendeditor.com/contact",target:"_blank",rel:"noopener noreferrer",children:"reach out"})," ","if you have any questions, comments, concerns, or feedback."," ",Object(n.jsx)("span",{role:"img","aria-label":"wave emoji",children:"\ud83d\udc4b"}),Object(n.jsx)("br",{}),"If you find any bugs or have a feature request, please"," ",Object(n.jsx)("a",{href:"https://github.com/TheodoreChu/append-editor/issues",target:"_blank",rel:"noopener noreferrer",children:"open an issue on GitHub"}),"."," ",Object(n.jsx)("span",{role:"img","aria-label":"smile emoji",children:"\ud83d\ude42"}),Object(n.jsx)("br",{}),"You are using version ",Object(n.jsx)("code",{children:"1.2.4"}),". The release notes and change log are available on"," ",Object(n.jsx)("a",{href:"https://github.com/TheodoreChu/append-editor/releases",target:"_blank",rel:"noopener noreferrer",children:"GitHub"}),"."]})]]}),"Click Help",Object(n.jsxs)("button",{className:"inline-text-and-svg",onClick:_,title:"Close Help",children:[Object(n.jsx)("span",{children:"\xa0"}),Object(n.jsx)(M,{fill:"var(--sn-stylekit-info-color)",role:"button"}),Object(n.jsx)("span",{children:"\xa0"})]}),"to close this section.",Object(n.jsx)("hr",{})]})}}]),o}(s.a.Component),X=function(e){var t=e.appendMode,o=e.editMode,i=e.showHelp;return Object(n.jsx)("div",{id:"intro",children:Object(n.jsxs)("details",{children:[Object(n.jsxs)("summary",{children:["Welcome to the Append Editor!"," ",Object(n.jsx)("span",{role:"img","aria-label":"wave emoji",children:"\ud83d\udc4b"})," ","Your note is empty."," ",Object(n.jsx)("span",{role:"img","aria-label":"smile emoji",children:"\ud83d\ude42"})," ","Click here to get started."," ",Object(n.jsx)("span",{role:"img","aria-label":"memo emoji",children:"\ud83d\udcdd"})]}),Object(n.jsx)("p",{children:"To get started:"}),Object(n.jsxs)("ul",{children:[Object(n.jsx)("li",{children:Object(n.jsxs)("p",{children:["Click the Pencil",Object(n.jsxs)("button",{className:"inline-text-and-svg",onClick:W,title:"Toggle Edit Mode",children:[Object(n.jsx)("span",{children:"\xa0"}),Object(n.jsx)(C,{condition:o,role:"button"}),Object(n.jsx)("span",{children:"\xa0"})]}),"to toggle ",Object(n.jsx)("b",{children:"Edit Mode"})]})}),Object(n.jsx)("li",{children:Object(n.jsxs)("p",{children:["Click the Plus",Object(n.jsxs)("button",{className:"inline-text-and-svg",onClick:R,title:"Toggle Append Mode",children:[Object(n.jsx)("span",{children:"\xa0"}),Object(n.jsx)(E,{condition:t,role:"button"}),Object(n.jsx)("span",{children:"\xa0"})]}),"to toggle ",Object(n.jsx)("b",{children:"Append Mode"})]})})]}),Object(n.jsxs)("p",{children:[Object(n.jsx)("b",{children:"View Mode"})," is currently ",Object(n.jsx)("b",{children:"on"}),". When you type in"," ",Object(n.jsx)("b",{children:"Edit Mode"}),", your note will automatically render here. In"," ",Object(n.jsx)("b",{children:"Append Mode"}),", clicking ",Object(n.jsx)("b",{children:"Append"})," will add the text in the textarea to the end of your note. Click the Eye",Object(n.jsxs)("button",{className:"inline-text-and-svg",onClick:G,title:"Toggle View Mode",children:[Object(n.jsx)("span",{children:"\xa0"}),Object(n.jsx)(O,{condition:!0,role:"button"}),Object(n.jsx)("span",{children:"\xa0"})]}),"to turn ",Object(n.jsx)("b",{children:"View Mode"})," off and switch to ",Object(n.jsx)("b",{children:"Edit Only Mode"}),"."]}),Object(n.jsxs)("p",{children:["If you are using the demo at"," ",Object(n.jsx)("a",{href:"https://beta.appendeditor.com",target:"_blank",rel:"nofollow noreferrer noopener",children:"beta.appendeditor.com"}),", then your notes will be lost after you close the page."]}),Object(n.jsxs)("p",{children:["If you want to save your notes, then click Help",Object(n.jsxs)("button",{className:"inline-text-and-svg",onClick:_,title:"Toggle show Help",children:[Object(n.jsx)("span",{children:"\xa0"}),Object(n.jsx)(M,{condition:i,role:"button"}),Object(n.jsx)("span",{children:"\xa0"})]}),"and follow the instructions on how to install the Append Editor in"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/",target:"_blank",rel:"nofollow noreferrer noopener",children:"Standard Notes"}),", a free,"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/knowledge/5/what-is-free-and-open-source-software",target:"_blank",rel:"nofollow noreferrer noopener",children:"open-source"}),", and"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/knowledge/2/what-is-end-to-end-encryption",target:"_blank",rel:"nofollow noreferrer noopener",children:"end-to-end encrypted"})," ","notes app."]}),Object(n.jsxs)("p",{children:["If you like Standard Notes, please check out Standard Notes"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/extensions",target:"_blank",rel:"nofollow noreferrer noopener",children:"Extended"})," ","for more editors, themes, components, and methods to backup up your data."]}),Object(n.jsxs)("p",{children:["Happy note-taking!"," ",Object(n.jsx)("span",{role:"img","aria-label":"smile emoji",children:"\ud83d\ude04"})]})]})})},Q=o(309),J=o.n(Q),$=o(445),ee=o.n($),te=o(446),oe=o.n(te),ne=o(447),ie=o.n(ne),se=o(278),ae=o(889),re=o(890),ce=o(892),le=o(897),de=o(922),pe=o(924),he=o(932),ue=o(934),je=o(939),ge=o(1137),be=o(1158),fe=J()().use(ee.a).use(le).use(ae).use(he).use(ue,{maxDepth:6}).use(re).use(ce,{inlineNotes:!0}).use(de).use(oe.a,{allowDangerousHtml:!0}).use(be).use(pe).use(ge).use(je,{ignoreMissing:!0}).use(ie.a,{createElement:s.a.createElement}),xe=function(e){return fe.processSync(e).result},me=Object(se.throttle)((function(e){return e.length>1e4}),1e3),ve=Object(se.debounce)((function(e){return xe(e)}),500),Oe=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;return Object(d.a)(this,o),(n=t.call(this,e)).onToggleShowHelp=function(){var e=document.getElementById("helpButton");e&&e.click()},n.renderMarkdown=function(e){return function(e,t){return t?xe(e):me(e)?ve(e):xe(e)}(e,n.props.bypassDebounce)},n.state={showHelp:n.props.showHelp},n}return Object(p.a)(o,[{key:"render",value:function(){var e=this.props.text;return Object(n.jsx)("div",{className:"sk-panel main view"+(this.props.printURL?" printURL":""),children:Object(n.jsxs)("div",{className:"sk-panel-content view",id:Ge.view,children:[!e&&[Object(n.jsx)(X,{appendMode:this.props.appendMode,editMode:this.props.editMode,showHelp:this.props.showHelp})],this.state.showHelp&&[Object(n.jsx)(q,{debugMode:this.props.debugMode,printURL:this.props.printURL})],Object(n.jsx)("div",{id:"renderedNote",className:this.props.editingMode===Xe.useDynamicEditor?"":"rendered-note-section",children:this.props.editingMode===Xe.useMonacoEditor&&"markdown"!==this.props.monacoEditorLanguage&&"html"!==this.props.monacoEditorLanguage&&e?this.renderMarkdown("```"+this.props.monacoEditorLanguage+"\n"+e+"\n```"):this.props.editingMode===Xe.useDynamicEditor?Object(n.jsx)(U,{debugMode:this.props.debugMode,onChange:this.props.saveText,readOnly:!0,text:e}):this.renderMarkdown(e)})]})})}}]),o}(s.a.Component),we=o(38),Me=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;return Object(d.a)(this,o),(n=t.call(this,e)).handleInputChange=function(e){var t=e.target,o="checkbox"===t.type?t.checked:t.value,i=t.name;n.setState(Object(we.a)({},i,o),(function(){n.autoSaveCheckBoxes()}))},n.handleTextAreaChange=function(e){var t=e.target.value;n.setState({text:t},(function(){n.autoSaveAppendText()}))},n.saveText=function(e){n.setState({text:e},(function(){n.props.autoSaveAppendText(n.state.text)}))},n.appendTextToNote=function(){n.props.appendTextToNote(),n.setState({text:""});var e=document.getElementById(Ge.appendTextArea);e&&e.focus(),n.state.useMonacoEditor&&n.setState({useMonacoEditor:!1},(function(){n.setState({useMonacoEditor:!0})})),n.state.useDynamicEditor&&n.setState({useDynamicEditor:!1},(function(){n.setState({useDynamicEditor:!0})}))},n.autoSaveAppendText=function(){var e=n.state.text;n.props.autoSaveAppendText(e)},n.autoSaveCheckBoxes=function(){var e=n.state.newLine,t=n.state.newParagraph;n.props.autoSaveCheckBoxes(e,t)},n.onKeyDown=function(e){n.props.keyMap.set(e.key,!0),n.props.debugMode&&(console.log("Keys pressed: "+e.key+"KeyMap for key: "+n.props.keyMap.get(e.key)),console.log("Append Text Value: "+n.state.text)),n.props.onKeyDown(e),n.props.onKeyDownAppendTextArea(e),n.props.onKeyDownTextArea(e),(n.props.keyMap.get("Control")&&n.props.keyMap.get("Enter")||n.props.keyMap.get("Control")&&n.props.keyMap.get("s"))&&(e.preventDefault(),n.appendTextToNote())},n.onKeyUp=function(e){n.props.keyMap.delete(e.key),n.props.onKeyUp(e)},n.state={text:n.props.text,newLine:n.props.appendNewLine,newParagraph:n.props.appendNewParagraph,useMonacoEditor:n.props.editingMode===Xe.useMonacoEditor,useDynamicEditor:n.props.editingMode===Xe.useDynamicEditor},n}return Object(p.a)(o,[{key:"render",value:function(){var e=this.state.text;return Object(n.jsxs)("div",{className:"sk-panel main appendix "+(this.props.editingMode===Xe.useMonacoEditor?"monacoEditor":this.props.editingMode===Xe.useDynamicEditor?"dynamicEditor":"otherEditor"),children:[Object(n.jsx)("div",{className:"sk-panel-content edit"+(this.props.editingMode===Xe.useMonacoEditor?" MonacoEditorContainerParentDiv":""),children:this.state.useMonacoEditor?Object(n.jsx)(A,{fontSize:this.props.fontSize,language:this.props.monacoEditorLanguage,saveText:this.saveText,text:e}):this.state.useDynamicEditor?Object(n.jsx)("div",{id:"appendDynamicEditor",children:Object(n.jsx)(U,{debugMode:this.props.debugMode,onChange:this.saveText,readOnly:!1,text:e})}):Object(n.jsx)("textarea",{id:Ge.appendTextArea,name:"text",className:"sk-input contrast textarea append",placeholder:"Append to your note",rows:this.props.appendRows,spellCheck:"true",value:e,onChange:this.handleTextAreaChange,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp})}),Object(n.jsxs)("div",{className:"sk-panel-row",children:[Object(n.jsxs)("form",{className:"checkBoxForm",children:[Object(n.jsxs)("label",{children:[Object(n.jsx)("input",{id:Ge.newLine,name:"newLine",type:"checkbox",checked:this.state.newLine,onChange:this.handleInputChange}),"New Line"]}),Object(n.jsx)("br",{}),Object(n.jsxs)("label",{children:[Object(n.jsx)("input",{id:Ge.newParagraph,name:"newParagraph",type:"checkbox",checked:this.state.newParagraph,onChange:this.handleInputChange}),"New Paragraph"]})]}),Object(n.jsx)("div",{className:"sk-button-group stretch",children:Object(n.jsx)("button",{type:"button",id:"appendTextButton",onClick:this.appendTextToNote,className:"sk-button info",children:Object(n.jsx)("div",{children:"Append"})})})]})]})}}]),o}(s.a.Component);Me.defaultProps={};var ye,Ce=function(e){var t=e.caption,o=e.className,i=e.condition,s=e.onClick,a=e.title;return Object(n.jsxs)("button",{className:o,onClick:s,title:a,children:[i?Object(n.jsx)(f,{role:"button"}):Object(n.jsx)(x,{role:"button"}),Object(n.jsx)("p",{className:"chevron-button-caption",children:t})]})},Ee=function(e){var t=e.caption,o=e.className,i=e.fill,s=e.onClick,a=e.title;return Object(n.jsxs)("button",{className:o,onClick:s,title:a,children:[Object(n.jsx)(v,{fill:i,role:"button"}),Object(n.jsx)("span",{className:"button-caption",children:t})]})},Se=function(e){var t=e.caption,o=e.className,i=e.condition,s=e.messageOn,a=e.messageOff,r=e.onClick,c=e.title;return Object(n.jsxs)("button",{className:o,onClick:r,title:c,children:[Object(n.jsx)(O,{condition:i,role:"button"}),Object(n.jsxs)("span",{className:"button-caption",children:[t,":",Object(n.jsxs)("b",{children:["\xa0",i?s:a]})]})]})},ke=function(e){var t=e.caption,o=e.className,i=e.fill,s=e.onClick,a=e.title;return Object(n.jsxs)("button",{className:o,onClick:s,title:a,children:[Object(n.jsx)(C,{fill:i,role:"button"}),Object(n.jsx)("span",{className:"button-caption",children:t})]})},Te=function(e){var t=e.caption,o=e.className,i=e.fill,s=e.id,a=e.onClick,r=e.title;return Object(n.jsxs)("button",{className:o,id:s,onClick:a,title:r,children:[Object(n.jsx)(S,{fill:i,role:"button"}),Object(n.jsx)("span",{className:"button-caption",children:t})]})},Le=function(e){var t=e.className,o=e.fill,i=e.id,s=e.onClick,a=e.title;return Object(n.jsx)("button",{className:t,id:i,onClick:s,title:a,children:Object(n.jsx)(T,{fill:o,role:"button"})})},Ne="editingMode",Be="fontEdit",De="fontSize",Ae="fontView",Ve="monacoEditorLanguage",He="resetAllSettings",Ke="saveAsDefault",Ie=new RegExp(/```css\n/gm),Fe=new RegExp(/```css/gm),Pe=new RegExp(/\n```/gm),Ue=new RegExp(/```/gm),ze=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;Object(d.a)(this,o),(n=t.call(this,e)).handleInputChange=function(e){var t=e.target,o="checkbox"===t.type?t.checked:t.value,i=t.name;n.setState(Object(we.a)({},i,o)),n.props.debugMode&&console.log("Settings event name: "+e.target.name+" Value: "+e.target.value)},n.handleSelectChange=function(e){var t=e.target,o=t.value,i=t.name;n.setState(Object(we.a)({},i,o),(function(){n.props.debugMode&&console.log("Saved select. Name: "+e.target.name+" Value: "+e.target.value)}))},n.toggleShowCustomStyles=function(){n.setState({showCustomStyles:!n.state.showCustomStyles})},n.cleanCustomStyles=function(e){return e?e.replace(Ie,"").replace(Fe,"").replace(Pe,"").replace(Ue,""):e},n.saveText=function(e){n.setState({customStyles:e})},n.handleSubmit=function(){if(n.props.debugMode){var e="",t="";""===n.state.fontEdit||void 0===n.state.fontEdit?e="Default":n.state.fontEdit&&(e=n.state.fontEdit),""===n.state.fontView||void 0===n.state.fontView?t="Default":n.state.fontView&&(t=n.state.fontView),console.log("Settings.tsx handleSubmit() triggered: \n - Settings editingMode: "+n.state.editingMode+"\n - Settings fontEdit: "+n.state.fontEdit+"\n - Settings fontView: "+n.state.fontView+"\n - Your chosen font for Edit/Append is: "+e+"\n - Your chosen font for View/Print is: "+t+"\n")}n.setState({customStyles:n.cleanCustomStyles(n.state.customStyles)},(function(){n.props.debugMode&&console.log("Your custom styles: "+n.state.customStyles);var e=n.state,t=e.customStyles,o=e.editingMode,i=e.fontEdit,s=e.fontSize,a=e.fontView,r=e.monacoEditorLanguage,c=e.saveAsDefault;n.props.onConfirm({customStyles:t,editingMode:o,fontEdit:i,fontSize:s,fontView:a,monacoEditorLanguage:r,saveAsDefault:c})}))},n.loadDefaultSettings=function(){var e=n.props.defaultSettings;n.setState(Object(l.a)({},e),(function(){n.refreshCustomStyles()}))},n.refreshCustomStyles=function(){n.setState({showCustomStyles:!n.state.showCustomStyles},(function(){n.setState({showCustomStyles:!n.state.showCustomStyles})}))},n.clearCustomStyles=function(){n.setState({customStyles:""},(function(){n.refreshCustomStyles(),n.props.debugMode&&console.log("customStyles reset: "+n.state.customStyles)}));var e=document.getElementById("customStyles");e&&(e.value="",e.focus())},n.clearFontEdit=function(){n.setState({fontEdit:""});var e=document.getElementById(Be);e&&(e.value="",e.focus())},n.clearFontSize=function(){n.setState({fontSize:""});var e=document.getElementById(De);e&&(e.value="",e.focus())},n.clearFontView=function(){n.setState({fontView:""});var e=document.getElementById(Ae);e&&(e.value="",e.focus())},n.clearEditingMode=function(){n.setState({editingMode:Xe.usePlainText})},n.clearMonacoEditorLanguage=function(){n.setState({monacoEditorLanguage:"markdown"});var e=document.getElementById(Ve);e&&(e.value="markdown",e.focus())},n.clearSaveAsDefault=function(){n.setState({saveAsDefault:!1});var e=document.getElementById(Ke);e.checked=!1,e.focus()},n.clearAllSettings=function(){n.clearSaveAsDefault(),n.clearCustomStyles(),n.clearFontView(),n.clearFontEdit(),n.clearFontSize(),n.clearMonacoEditorLanguage(),n.clearEditingMode();var e=document.getElementById(He);e&&e.focus()},n.onKeyDown=function(e){n.props.keyMap.set(e.key,!0),(n.props.keyMap.get("Control")&&n.props.keyMap.get("s")||n.props.keyMap.get("Control")&&n.props.keyMap.get("Enter"))&&(e.preventDefault(),n.handleSubmit())},n.onKeyUp=function(e){n.props.keyMap.set(e.key,!1)},n.onBlur=function(e){n.props.keyMap.clear()},n.componentWillUnmount=function(){n.props.keyMap.clear()};var i="markdown";n.props.monacoEditorLanguage&&(i=n.props.monacoEditorLanguage);var s="usePlainText";return n.props.editingMode&&(s=n.props.editingMode),n.state={customStyles:n.props.customStyles,editingMode:s,fontEdit:n.props.fontEdit,fontSize:n.props.fontSize,fontView:n.props.fontView,monacoEditorLanguage:i,saveAsDefault:!1,showCustomStyles:!1},n}return Object(p.a)(o,[{key:"render",value:function(){var e=this.props,t=e.title,o=e.onCancel,i=e.confirmText,s=e.cancelText,a=e.helpLink;return Object(n.jsxs)("div",{id:"settings",className:"sk-panel main settings",children:[Object(n.jsx)("div",{className:"sk-panel-content",children:Object(n.jsxs)("div",{className:"sk-panel-section",children:[Object(n.jsxs)("datalist",{id:"fonts",children:[Object(n.jsx)("option",{value:'SFMono-Regular, Consolas, Liberation Mono, Menlo, "Ubuntu Mono", courier, monospace;'}),Object(n.jsx)("option",{value:"Times New Roman"}),Object(n.jsx)("option",{value:"Arial"}),Object(n.jsx)("option",{value:"Arial Black"}),Object(n.jsx)("option",{value:"-apple-system"}),Object(n.jsx)("option",{value:"Bell MT"}),Object(n.jsx)("option",{value:"Baskerville Old Face"}),Object(n.jsx)("option",{value:"Bahnschrift Light"}),Object(n.jsx)("option",{value:"BlinkMacSystemFont"}),Object(n.jsx)("option",{value:"Bodoni MT"}),Object(n.jsx)("option",{value:"Calibri"}),Object(n.jsx)("option",{value:"Calibri Light"}),Object(n.jsx)("option",{value:"Calisto MT"}),Object(n.jsx)("option",{value:"Cambria"}),Object(n.jsx)("option",{value:"Candara"}),Object(n.jsx)("option",{value:"Candara Light"}),Object(n.jsx)("option",{value:"Cantarell"}),Object(n.jsx)("option",{value:"Centaur"}),Object(n.jsx)("option",{value:"Century"}),Object(n.jsx)("option",{value:"Century Gothic"}),Object(n.jsx)("option",{value:"Comic Sans MS"}),Object(n.jsx)("option",{value:"Consolas"}),Object(n.jsx)("option",{value:"Constantia"}),Object(n.jsx)("option",{value:"Courier New"}),Object(n.jsx)("option",{value:"Corbel"}),Object(n.jsx)("option",{value:"Corbel Light"}),Object(n.jsx)("option",{value:"DengXian"}),Object(n.jsx)("option",{value:"Ebrima"}),Object(n.jsx)("option",{value:"Droid Sans"}),Object(n.jsx)("option",{value:"Fira Sans"}),Object(n.jsx)("option",{value:"Gabriola"}),Object(n.jsx)("option",{value:"Garamond"}),Object(n.jsx)("option",{value:"Georgia"}),Object(n.jsx)("option",{value:"Helvetica"}),Object(n.jsx)("option",{value:"Helvetica Neue"}),Object(n.jsx)("option",{value:"Impact"}),Object(n.jsx)("option",{value:"KaTeX_AMS"}),Object(n.jsx)("option",{value:"KaTeX_Caligraphic"}),Object(n.jsx)("option",{value:"KaTeX_Fraktur"}),Object(n.jsx)("option",{value:"KaTeX_Main"}),Object(n.jsx)("option",{value:"KaTeX_Math"}),Object(n.jsx)("option",{value:"KaTeX_SansSerif"}),Object(n.jsx)("option",{value:"KaTeX_Script"}),Object(n.jsx)("option",{value:"KaTeX_Typewriter"}),Object(n.jsx)("option",{value:"Lato"}),Object(n.jsx)("option",{value:"Liberation Mono"}),Object(n.jsx)("option",{value:"Lucida Caligraphy"}),Object(n.jsx)("option",{value:"Lucida Sans"}),Object(n.jsx)("option",{value:"Menlo"}),Object(n.jsx)("option",{value:"Monaco"}),Object(n.jsx)("option",{value:"Monospace"}),Object(n.jsx)("option",{value:"New York"}),Object(n.jsx)("option",{value:"Oxygen"}),Object(n.jsx)("option",{value:"Palatino"}),Object(n.jsx)("option",{value:"Roboto"}),Object(n.jsx)("option",{value:"Sans-Serif"}),Object(n.jsx)("option",{value:"Segoe UI"}),Object(n.jsx)("option",{value:"SFMono-Regular"}),Object(n.jsx)("option",{value:"Serif"}),Object(n.jsx)("option",{value:"Sylfaen"}),Object(n.jsx)("option",{value:"Tahoma"}),Object(n.jsx)("option",{value:"Times New Roman"}),Object(n.jsx)("option",{value:"Trebuchet MS"}),Object(n.jsx)("option",{value:"Ubuntu"}),Object(n.jsx)("option",{value:"Verdana"}),Object(n.jsx)("option",{value:"Yu Gothic"})]}),Object(n.jsxs)("div",{className:"sk-panel-row title-section",children:[Object(n.jsx)("h1",{children:t}),Object(n.jsx)("button",{id:"undoDialog",onClick:o,title:"Close",children:Object(n.jsx)(m,{role:"button"})})]}),Object(n.jsx)("section",{className:"sk-panel-row settings",children:Object(n.jsxs)("div",{className:"text-and-undo-button",children:[Object(n.jsxs)("p",{children:["Need help? Check out the"," ",Object(n.jsx)("a",{href:a,target:"_blank",rel:"noopener noreferrer",children:"documentation"}),". To clear all settings, click undo:\xa0"]}),Object(n.jsx)(Le,{onClick:this.clearAllSettings,title:"Reset all Settings",id:He})]})}),Object(n.jsx)("section",{className:"sk-panel-row settings",children:Object(n.jsxs)("div",{className:"text-and-undo-button",children:[Object(n.jsx)("p",{children:"To load your personal default settings, click:\xa0"}),Object(n.jsx)("button",{onClick:this.loadDefaultSettings,title:"Load personal default settings",children:Object(n.jsx)(k,{role:"button"})})]})}),Object(n.jsx)("section",{className:"sk-panel-row settings",children:Object(n.jsxs)("div",{className:"text-and-undo-button",children:[Object(n.jsx)("p",{children:"Editing Mode: "}),Object(n.jsx)(Le,{onClick:this.clearEditingMode,title:"Reset Editing Mode to Plain Textarea"})]})}),Object(n.jsx)("section",{className:"sk-panel-row settings",children:Object(n.jsxs)("label",{children:[Object(n.jsx)("input",{id:Xe.usePlainText,name:Ne,value:Xe.usePlainText,className:"radio",type:"radio",checked:this.state.editingMode===Xe.usePlainText,onChange:this.handleInputChange}),"Plain Textarea: standard textarea with spellcheck (default, mobile recommended)"]})}),Object(n.jsx)("section",{className:"sk-panel-row settings",children:Object(n.jsxs)("label",{children:[Object(n.jsx)("input",{id:Xe.useCodeMirror,name:Ne,value:Xe.useCodeMirror,type:"radio",className:"radio",checked:this.state.editingMode===Xe.useCodeMirror,onChange:this.handleInputChange}),"CodeMirror: in-line formatting for Markdown"]})}),Object(n.jsx)("section",{className:"sk-panel-row settings",children:Object(n.jsxs)("label",{children:[Object(n.jsx)("input",{id:Xe.useDynamicEditor,name:Ne,value:Xe.useDynamicEditor,type:"radio",className:"radio",checked:this.state.editingMode===Xe.useDynamicEditor,onChange:this.handleInputChange}),"Dynamic: live formatting for Markdown. ",Object(n.jsx)("b",{children:"warning: "}),"existing Markdown may break (not compatible with KaTeX, lists may not render properly; desktop and mobile compatible)"]})}),Object(n.jsx)("section",{className:"sk-panel-row settings",children:Object(n.jsxs)("label",{htmlFor:Xe.useMonacoEditor,children:[Object(n.jsx)("input",{id:Xe.useMonacoEditor,name:Ne,value:Xe.useMonacoEditor,type:"radio",className:"radio",checked:this.state.editingMode===Xe.useMonacoEditor,onChange:this.handleInputChange}),"Monaco: syntax highlighting for Markdown and many other programming languages, intelligent auto-completion, sophisticated search and replace (desktop recommended)"]})}),this.state.editingMode===Xe.useMonacoEditor&&[Object(n.jsxs)("section",{className:"sk-panel-row settings",children:[Object(n.jsxs)("label",{htmlFor:Ve,children:["Monaco Editor Language:"," "]}),Object(n.jsxs)("div",{className:"input-and-undo-button",children:[Object(n.jsx)("label",{children:Object(n.jsxs)("select",{id:Ve,name:Ve,value:this.state.monacoEditorLanguage,onChange:this.handleSelectChange,children:[Object(n.jsx)("option",{children:"abap"}),Object(n.jsx)("option",{children:"aes"}),Object(n.jsx)("option",{children:"apex"}),Object(n.jsx)("option",{children:"azcli"}),Object(n.jsx)("option",{children:"bat"}),Object(n.jsx)("option",{children:"c"}),Object(n.jsx)("option",{children:"cameligo"}),Object(n.jsx)("option",{children:"clojure"}),Object(n.jsx)("option",{children:"coffeescript"}),Object(n.jsx)("option",{children:"cpp"}),Object(n.jsx)("option",{children:"csharp"}),Object(n.jsx)("option",{children:"csp"}),Object(n.jsx)("option",{children:"css"}),Object(n.jsx)("option",{children:"dart"}),Object(n.jsx)("option",{children:"dockerfile"}),Object(n.jsx)("option",{children:"fsharp"}),Object(n.jsx)("option",{children:"go"}),Object(n.jsx)("option",{children:"graphql"}),Object(n.jsx)("option",{children:"handlebars"}),Object(n.jsx)("option",{children:"hcl"}),Object(n.jsx)("option",{children:"html"}),Object(n.jsx)("option",{children:"ini"}),Object(n.jsx)("option",{children:"java"}),Object(n.jsx)("option",{children:"javascript"}),Object(n.jsx)("option",{children:"json"}),Object(n.jsx)("option",{children:"julia"}),Object(n.jsx)("option",{children:"kotlin"}),Object(n.jsx)("option",{children:"less"}),Object(n.jsx)("option",{children:"lexon"}),Object(n.jsx)("option",{children:"lua"}),Object(n.jsx)("option",{children:"markdown"}),Object(n.jsx)("option",{children:"mips"}),Object(n.jsx)("option",{children:"msdax"}),Object(n.jsx)("option",{children:"mysql"}),Object(n.jsx)("option",{children:"objective-c"}),Object(n.jsx)("option",{children:"pascal"}),Object(n.jsx)("option",{children:"pascaligo"}),Object(n.jsx)("option",{children:"perl"}),Object(n.jsx)("option",{children:"pgsql"}),Object(n.jsx)("option",{children:"php"}),Object(n.jsx)("option",{children:"plaintext"}),Object(n.jsx)("option",{children:"postiats"}),Object(n.jsx)("option",{children:"powerquery"}),Object(n.jsx)("option",{children:"powershell"}),Object(n.jsx)("option",{children:"pug"}),Object(n.jsx)("option",{children:"python"}),Object(n.jsx)("option",{children:"r"}),Object(n.jsx)("option",{children:"razor"}),Object(n.jsx)("option",{children:"redis"}),Object(n.jsx)("option",{children:"redshift"}),Object(n.jsx)("option",{children:"restructuredtext"}),Object(n.jsx)("option",{children:"ruby"}),Object(n.jsx)("option",{children:"rust"}),Object(n.jsx)("option",{children:"sb"}),Object(n.jsx)("option",{children:"scala"}),Object(n.jsx)("option",{children:"scheme"}),Object(n.jsx)("option",{children:"scss"}),Object(n.jsx)("option",{children:"shell"}),Object(n.jsx)("option",{children:"sol"}),Object(n.jsx)("option",{children:"sql"}),Object(n.jsx)("option",{children:"st"}),Object(n.jsx)("option",{children:"swift"}),Object(n.jsx)("option",{children:"systemverilog"}),Object(n.jsx)("option",{children:"tcl"}),Object(n.jsx)("option",{children:"twig"}),Object(n.jsx)("option",{children:"typescript"}),Object(n.jsx)("option",{children:"vb"}),Object(n.jsx)("option",{children:"verilog"}),Object(n.jsx)("option",{children:"xml"}),Object(n.jsx)("option",{children:"yaml"})]})}),Object(n.jsx)(Le,{onClick:this.clearMonacoEditorLanguage,title:"Reset Monaco Editor Language to Markdown"})]})]})],Object(n.jsxs)("section",{className:"sk-panel-row settings",children:[Object(n.jsx)("label",{htmlFor:De,children:"Choose a base font size: "}),Object(n.jsxs)("div",{className:"input-and-undo-button",children:[Object(n.jsxs)("select",{id:De,name:De,value:this.state.fontSize,onChange:this.handleSelectChange,children:[Object(n.jsx)("option",{}),Object(n.jsx)("option",{children:"12px"}),Object(n.jsx)("option",{children:"13px"}),Object(n.jsx)("option",{children:"14px"}),Object(n.jsx)("option",{children:"15px"}),Object(n.jsx)("option",{children:"16px"}),Object(n.jsx)("option",{children:"17px"}),Object(n.jsx)("option",{children:"18px"}),Object(n.jsx)("option",{children:"19px"}),Object(n.jsx)("option",{children:"20px"}),Object(n.jsx)("option",{children:"21px"}),Object(n.jsx)("option",{children:"22px"}),Object(n.jsx)("option",{children:"23px"}),Object(n.jsx)("option",{children:"24px"}),Object(n.jsx)("option",{children:"25px"}),Object(n.jsx)("option",{children:"26px"}),Object(n.jsx)("option",{children:"27px"}),Object(n.jsx)("option",{children:"28px"}),Object(n.jsx)("option",{children:"29px"}),Object(n.jsx)("option",{children:"30px"})]}),Object(n.jsx)(Le,{onClick:this.clearFontSize,title:"Reset font size to 16px"})]})]}),this.state.editingMode!==Xe.useMonacoEditor&&[Object(n.jsxs)("section",{className:"sk-panel-row settings",children:[Object(n.jsxs)("label",{htmlFor:Be,children:["Choose a font for Edit/Append:"," "]}),Object(n.jsxs)("div",{className:"input-and-undo-button",children:[Object(n.jsx)("input",{list:"fonts",id:Be,name:Be,value:this.state.fontEdit,onChange:this.handleInputChange,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,type:"text"}),Object(n.jsx)(Le,{onClick:this.clearFontEdit,title:"Reset font for Edit/Append"})]})]})],this.state.editingMode!==Xe.useDynamicEditor&&[Object(n.jsxs)("section",{className:"sk-panel-row settings",children:[Object(n.jsxs)("label",{htmlFor:Ae,children:["Choose a font for View/Print:"," "]}),Object(n.jsxs)("div",{className:"input-and-undo-button",children:[Object(n.jsx)("input",{list:"fonts",id:Ae,name:Ae,value:this.state.fontView,onChange:this.handleInputChange,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,type:"text"}),Object(n.jsx)(Le,{onClick:this.clearFontView,title:"Reset font for View/Print"})]})]})],Object(n.jsxs)("section",{className:"sk-panel-row settings custom-css",children:[Object(n.jsx)(Ce,{caption:"Add custom styles (CSS):",className:"chevron-toggle-button",condition:this.state.showCustomStyles,onClick:this.toggleShowCustomStyles,title:"Toggle show add custom styles (CSS)"}),this.state.showCustomStyles&&[Object(n.jsx)(Le,{className:"custom-css-undo-button",onClick:this.clearCustomStyles,title:"Reset custom styles (CSS)"})]]}),this.state.showCustomStyles&&[Object(n.jsx)("section",{className:"sk-panel-row settings",children:Object(n.jsx)(A,{tabSize:2,language:"css",text:this.state.customStyles,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,saveText:this.saveText})})],Object(n.jsxs)("section",{className:"sk-panel-row settings",children:[Object(n.jsxs)("label",{htmlFor:Ke,children:["Save these settings as your personal default:"," "]}),Object(n.jsxs)("div",{className:"input-and-undo-button",children:[Object(n.jsx)("label",{className:"checkbox-input-label",children:Object(n.jsx)("input",{id:Ke,name:Ke,type:"checkbox",checked:this.state.saveAsDefault,onChange:this.handleInputChange})}),Object(n.jsx)(Le,{onClick:this.clearSaveAsDefault,title:"Clear save as default"})]})]})]})}),Object(n.jsx)("div",{className:"sk-panel-footer",children:Object(n.jsxs)("div",{className:"sk-button-group stretch",children:[Object(n.jsx)("button",{className:"sk-button neutral",onClick:o,children:Object(n.jsx)("div",{children:s})}),Object(n.jsx)("button",{className:"sk-button info",onClick:this.handleSubmit,children:Object(n.jsx)("div",{children:i})})]})})]})}}]),o}(s.a.Component),Re=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;return Object(d.a)(this,o),(n=t.call(this,e)).state={hasError:!1},n}return Object(p.a)(o,[{key:"componentDidCatch",value:function(e,t){console.log("Error:",e,"\nError Info:",t),this.setState({error:e,errorInfo:t})}},{key:"render",value:function(){var e,t;return this.state.hasError?Object(n.jsx)("div",{className:"sk-panel main",children:Object(n.jsx)("div",{className:"sk-panel-content view",children:Object(n.jsxs)("div",{id:"errorBoundary",children:[Object(n.jsx)("h1",{children:"Something went wrong."}),Object(n.jsxs)("p",{children:["Error Name: ",Object(n.jsx)("code",{children:null===(e=this.state.error)||void 0===e?void 0:e.name})]}),Object(n.jsxs)("p",{children:["Error Message: ",Object(n.jsx)("code",{children:null===(t=this.state.error)||void 0===t?void 0:t.message})]}),Object(n.jsx)("p",{children:"Please see the developer console for details."}),Object(n.jsx)("hr",{}),Object(n.jsxs)("p",{children:["Errors such as ",Object(n.jsx)("code",{children:"TypeError"})," and"," ",Object(n.jsx)("code",{children:"Cannot read property 'type' of undefined"})," usually occur when the editor is unable to process and render your notes because it contains incorrect or incomplete HTML. If you are writing in HTML, then please continue to write and refresh the View Mode when the HTML tags are closed."]}),Object(n.jsxs)("p",{children:["If you are using the Dynamic editing mode, then please switch to the Plain Textarea or Monaco editing modes in the Settings",Object(n.jsxs)("button",{className:"inline-text-and-svg",onClick:Y,title:"Open Settings",children:[Object(n.jsx)("span",{children:"\xa0"}),Object(n.jsx)(w,{role:"button"}),Object(n.jsx)("span",{children:"\xa0"})]}),"and remove or fix the text that is causing the error."]}),Object(n.jsxs)("p",{children:["If the error persists or is not related to the content of your note, then please"," ",Object(n.jsx)("a",{href:"https://github.com/TheodoreChu/append-editor/issues",target:"_blank",rel:"noopener noreferrer",children:"report the issue on GitHub"})," ","and we will try to fix it."," ",Object(n.jsx)("span",{role:"img","aria-label":"smile emoji",children:"\ud83d\ude42"})]})]})})}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{hasError:!0}}}]),o}(s.a.Component),We=o(448),_e=o.n(We),Ze=o(449),Ye=o.n(Ze);!function(e){e.chevronToggleButton="menu-button chevron-toggle-button",e.menuButton="menu-button",e.on=" on",e.off=" off"}(ye||(ye={}));var Ge,qe,Xe,Qe=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;return Object(d.a)(this,o),(n=t.call(this,e)).clearTooltipTimer=void 0,n.resetMessageTimer=function(){n.clearTooltipTimer&&clearTimeout(n.clearTooltipTimer),n.clearTooltipTimer=setTimeout((function(){n.setState({displayMessageEdit:!1,displayMessageShare:!1})}),5e3)},n.showMessageEdit=function(){n.setState({displayMessageEdit:!0,displayMessageShare:!1},(function(){n.resetMessageTimer()}))},n.showMessageShare=function(){n.setState({displayMessageEdit:!1,displayMessageShare:!0},(function(){n.resetMessageTimer()}))},n.copyToClipboard=function(e){var t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),n.showMessageShare(),t.remove()},n.copyText=function(){n.props.text?n.setState({message:"Copied Text to clipboard"},(function(){n.copyToClipboard(n.props.text)})):n.setState({message:"No text to copy. Your note is empty"},(function(){n.showMessageShare()}))},n.copyHtml=function(){if(n.props.viewMode)if(n.props.text){var e,t=document.getElementById("renderedNote");(null===t||void 0===t||null===(e=t.firstElementChild)||void 0===e?void 0:e.innerHTML)&&(n.setState({message:"Copied HTML to clipboard"}),n.copyToClipboard(null===t||void 0===t?void 0:t.firstElementChild.innerHTML))}else n.setState({message:"No HTML to copy. Your note is empty"},(function(){n.showMessageShare()}));else n.setState({message:"Unable to copy HTML. Please turn View Mode on"},(function(){return n.showMessageShare()}))},n.formatText=function(){"markdown"!==n.props.monacoEditorLanguage&&n.props.editingMode===Xe.useMonacoEditor?n.setState({message:"Error: Your Monaco Editor language is not Markdown. Formatting is only available for Markdown"},(function(){n.showMessageEdit()})):n.props.text?n.setState({message:"Formatted Markdown text with Prettier"},(function(){try{var e=_e.a.format(n.props.text,{parser:"markdown",plugins:[Ye.a]});n.props.saveText(e),n.props.refreshEdit(),n.props.refreshView(),n.showMessageEdit()}catch(t){n.setState({message:"Error formatting text: "+t},(function(){n.showMessageEdit()})),console.log("Error formatting text: "+t)}})):n.setState({message:"No text to format. Your note is empty"},(function(){n.showMessageEdit()}))},n.uncheckBoxes=function(){var e=n.props.text,t=new RegExp(/- \[x\]/gm);if(t.test(e)){var o=e.replace(t,"- [ ]");n.props.saveText(o),n.props.refreshEdit(),n.props.refreshView(),n.setState({message:"Unchecked all checkboxes"},(function(){n.showMessageEdit()}))}else n.setState({message:"No checked checkboxes found"},(function(){n.showMessageEdit()}))},n.state={message:"",displayMessageEdit:!1,displayMessageShare:!1},n}return Object(p.a)(o,[{key:"render",value:function(){return[Object(n.jsx)("div",{className:"menu-overlay",onClick:this.props.toggleShowMenu}),Object(n.jsxs)("div",{id:"menu",children:[Object(n.jsx)(Ce,{caption:"Appearance",className:ye.chevronToggleButton,condition:this.props.showMenuOptionsView,onClick:this.props.toggleShowMenuOptionsView,title:"Toggle show options for the appearance of the editor"}),this.props.showMenuOptionsView&&[Object(n.jsx)(Se,{caption:"Borderless",className:ye.menuButton+(this.props.borderlessMode?ye.on:ye.off),condition:this.props.borderlessMode,messageOn:"on",messageOff:"off",onClick:this.props.toggleBorderlessMode,title:"Toggle Borderless Mode. Blends borders and margins into the background for a cleaner look"}),Object(n.jsx)(Se,{caption:"Fixed Height",className:ye.menuButton+(this.props.fixedHeightMode?ye.on:ye.off),condition:this.props.fixedHeightMode,messageOn:"on",messageOff:"off",onClick:this.props.toggleFixedHeightMode,title:"Toggle Fixed Height Mode. Limits the height of the content container for easier side-by-side editing"}),Object(n.jsx)(Se,{caption:"Full Width",className:ye.menuButton+(this.props.fullWidthMode?ye.on:ye.off),condition:this.props.fullWidthMode,messageOn:"on",messageOff:"off",onClick:this.props.toggleFullWidthMode,title:"Toggle Full Width Mode for unrestricted editing. Borderless mode plus unset maximum container widths"}),Object(n.jsx)(Se,{caption:"Horizontal Overflow",className:ye.menuButton+(this.props.overflowMode?ye.on:ye.off),condition:this.props.overflowMode,messageOn:"visible",messageOff:"auto",onClick:this.props.toggleOverflowMode,title:"Toggle Horizontal Overflow. Visible is great for editing and viewing large tables and preformatted text. Works best with Full Width mode"})],Object(n.jsx)(Ce,{caption:"Share",className:ye.chevronToggleButton,condition:this.props.showMenuOptionsShare,onClick:this.props.toggleShowMenuOptionsShare,title:"Toggle show options to share your note"}),this.props.showMenuOptionsShare&&[Object(n.jsx)(Ee,{caption:"Copy note text",className:ye.menuButton,fill:"var(--sn-stylekit-success-color)",onClick:this.copyText,title:"Copy the text of your note to your device's clipboard"}),Object(n.jsx)(Ee,{caption:"Copy rendered HTML",className:ye.menuButton,fill:"var(--sn-stylekit-success-color)",onClick:this.copyHtml,title:"Copy the rendered HTML from your note text to your device's clipboard"}),Object(n.jsx)(Te,{caption:"Print rendered note",className:"menu-button off",fill:"var(--sn-stylekit-foreground-color)",id:Ge.printButton,onClick:this.props.onConfirmPrintUrl,title:"Print rendered note. Works best on the web app in Chromium browsers (e.g., MS Edge, Google Chrome). Not available on mobile"}),Object(n.jsx)("div",{className:"notification ".concat(this.state.displayMessageShare?"visible":"hidden"),children:Object(n.jsx)("p",{children:Object(n.jsx)("b",{children:this.state.message})})})],Object(n.jsx)(Ce,{caption:"Actions",className:ye.chevronToggleButton,condition:this.props.showMenuOptionsEdit,onClick:this.props.toggleShowMenuOptionsEdit,title:"Toggle show actions to quickly format and edit your note"}),this.props.showMenuOptionsEdit&&[Object(n.jsx)(ke,{caption:"Format Markdown text",className:ye.menuButton,fill:"var(--sn-stylekit-warning-color)",onClick:this.formatText,title:"Format Markdown text with Prettier. WARNING: this may cause undesired changes to your note text. Use the Note History feature to revert unwanted changes"}),Object(n.jsx)(ke,{caption:"Uncheck all checkboxes",className:ye.menuButton,fill:"var(--sn-stylekit-danger-color)",onClick:this.uncheckBoxes,title:"Uncheck all checkboxes. DANGER: this may cause undesired changes to your note text. Use the Note History feature to revert unwanted changes"}),Object(n.jsx)("div",{className:"notification ".concat(this.state.displayMessageEdit?"visible":"hidden"),children:Object(n.jsx)("p",{children:Object(n.jsx)("b",{children:this.state.message})})})],Object(n.jsx)("div",{className:"extra-space"})]})]}}]),o}(s.a.Component),Je=o(108),$e=o.n(Je);o(1163),o(1168),o(1169),o(1170),o(438),o(1172),o(305),o(304),o(1173);!function(e){e.appendButton="appendButton",e.appendTextArea="appendTextArea",e.appendix="appendix",e.content="content",e.edit="edit",e.editButton="editButton",e.editTextArea="editTextArea",e.header="header",e.helpButton="helpButton",e.menuButton="menuButton",e.newLine="newLine",e.newParagraph="newParagraph",e.printButton="printButton",e.settingsButton="settingsButton",e.view="view",e.viewButton="viewButton"}(Ge||(Ge={})),function(e){e.fixed="fixed",e.fixedHeader="fixed-header",e.focused="focused"}(qe||(qe={})),function(e){e.usePlainText="usePlainText",e.useCodeMirror="useCodeMirror",e.useDynamicEditor="useDynamicEditor",e.useMonacoEditor="useMonacoEditor"}(Xe||(Xe={}));var et={text:"",appendNewLine:!1,appendNewParagraph:!1,appendMode:!1,appendRows:8,appendText:"",bypassDebounce:!1,confirmPrintUrl:!1,customStyles:"",defaultSettings:{customStyles:"",editingMode:"usePlainText",fontEdit:"",fontSize:"",fontView:"",monacoEditorLanguage:"markdown"},fontEdit:"",fontSize:"",fontView:"",monacoEditorLanguage:"markdown",printURL:!0,refreshEdit:!1,refreshView:!1,showAppendix:!0,showHeader:!0,showHelp:!1,showDiff:!1,settingsMode:!1},tt=0,ot=!1,nt=new Map,it=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;return Object(d.a)(this,o),(n=t.call(this,e)).editorKit=void 0,n.refreshEditorTimer=void 0,n.saveTimer=void 0,n.componentDidMount=function(){n.onViewMode(),n.loadDefaultMenuState(),document.addEventListener("scroll",n.onScroll)},n.componentWillUnmount=function(){document.removeEventListener("scroll",n.onScroll)},n.configureEditorKit=function(){var e=new j.EditorKitDelegate({setEditorRawText:function(e){n.setState(Object(l.a)(Object(l.a)({},et),{},{bypassDebounce:!0,text:e}),(function(){me.cancel(),me(e),me.flush(),ve.cancel(),me(e)&&(ve(e),ve.flush()),n.state.savingEditorOptions||(n.loadEditorOptions(),n.loadDefaultSettings(),n.loadMetaData()),setTimeout((function(){n.setState({bypassDebounce:!1})}),1e3)}))},clearUndoHistory:function(){},getElementsBySelector:function(){return[]}});n.editorKit=new j.EditorKit({delegate:e,mode:"plaintext",supportsFilesafe:!1})},n.refreshEditor=function(){me(n.state.text)?(n.refreshEditorTimer&&clearTimeout(n.refreshEditorTimer),n.refreshEditorTimer=setTimeout((function(){n.state.savingEditorOptions||(n.refreshEdit(),n.refreshView(),n.activateStyles())}),20)):(n.refreshEditorTimer&&clearTimeout(n.refreshEditorTimer),n.refreshEditorTimer=setTimeout((function(){n.state.savingEditorOptions||(n.refreshEdit(),n.refreshView(),n.activateStyles())}),10))},n.loadDefaultSettings=function(){try{var e=n.editorKit.internal.componentRelay.getComponentDataValueForKey("defaultSettings"),t=n.editorKit.internal.componentRelay.getComponentDataValueForKey("editingMode");if(void 0!==e){var o=JSON.parse(e);ot,n.setState({customStyles:o.customStyles,editingMode:o.editingMode,fontEdit:o.fontEdit,fontSize:o.fontSize,fontView:o.fontView,monacoEditorLanguage:o.monacoEditorLanguage,defaultSettings:o},(function(){n.refreshEditor()}))}else if(void 0!==t){var i=n.editorKit.internal.componentRelay.getComponentDataValueForKey("customStyles"),s=n.editorKit.internal.componentRelay.getComponentDataValueForKey("fontEdit"),a=n.editorKit.internal.componentRelay.getComponentDataValueForKey("fontSize"),r=n.editorKit.internal.componentRelay.getComponentDataValueForKey("fontView"),c=n.editorKit.internal.componentRelay.getComponentDataValueForKey("monacoEditorLanguage");ot,n.setState({customStyles:i,editingMode:t,fontEdit:s,fontSize:a,fontView:r,monacoEditorLanguage:c,defaultSettings:{customStyles:i,editingMode:t,fontEdit:s,fontSize:a,fontView:r,monacoEditorLanguage:c}},(function(){n.refreshEditor()}))}else n.refreshEditor()}catch(l){console.log("Error loading default settings:",l)}},n.loadEditorOptions=function(){try{var e=n.editorKit.internal.componentRelay.getComponentDataValueForKey("menuOptions");if(void 0!==e){var t=JSON.parse(e);n.setState({borderlessMode:t.borderlessMode,fixedHeightMode:t.fixedHeightMode,fullWidthMode:t.fullWidthMode,overflowMode:t.overflowMode},(function(){n.refreshEditor()}))}}catch(o){console.log("Error loading editor options:",o)}},n.loadMetaData=function(){n.editorKit.internal.componentRelay.streamContextItem((function(e){(e.content.appendEditorCustomStyles||e.content.appendEditorEditingMode||e.content.appendEditorFontEdit||e.content.appendEditorFontSize||e.content.appendEditorFontView||e.content.appendEditorMonacoEditorLanguage)&&n.setState({customStyles:e.content.appendEditorCustomStyles,editingMode:e.content.appendEditorEditingMode,fontEdit:e.content.appendEditorFontEdit,fontSize:e.content.appendEditorFontSize,fontView:e.content.appendEditorFontView,monacoEditorLanguage:e.content.appendEditorMonacoEditorLanguage},(function(){n.refreshEditor()})),(e.content.appendNewLine||e.content.appendNewParagraph)&&n.setState({appendNewLine:e.content.appendNewLine,appendNewParagraph:e.content.appendNewParagraph}),n.setState({appendText:e.content.appendText},(function(){n.state.text||n.state.appendText||n.state.editMode||n.onEditMode()}))}))},n.saveText=function(e){n.saveNote(e),n.setState({text:e},(function(){n.state.editingMode===Xe.useDynamicEditor?n.refreshView():n.state.viewMode&&me(e)&&(n.saveTimer&&clearTimeout(n.saveTimer),n.saveTimer=setTimeout((function(){if(n.state.fixedHeightMode){var e=document.getElementById(Ge.view);if(e){var t=e.scrollTop;n.refreshView();var o=document.getElementById(Ge.view);o&&(o.scrollTop=t)}else n.refreshView()}else n.refreshView()}),550))}))},n.saveNote=function(e){try{n.editorKit.onEditorValueChanged(e)}catch(t){console.log("Error saving note:",t)}},n.appendTextToNote=function(){if(n.state.appendText){var e=n.state.appendText,t="";t=n.state.appendNewParagraph?" \n\n"+e:n.state.appendNewLine?" \n"+e:e,n.setState({text:n.state.text.concat(t),appendText:""},(function(){var e=n.editorKit.internal.note;e&&n.editorKit.internal.componentRelay.saveItemWithPresave(e,(function(){e.content.text=n.state.text,e.content.appendText=n.state.appendText})),n.refreshEdit(),n.state.editingMode===Xe.useDynamicEditor?(n.refreshView(),setTimeout((function(){n.skipToBottom()}),50)):me(n.state.text)?setTimeout((function(){n.refreshView(),n.skipToBottom()}),550):n.skipToBottom()}))}n.state.appendCodeMirror&&n.state.editingMode===Xe.useCodeMirror&&n.state.appendCodeMirror.setValue("")},n.autoSaveAppendText=function(e){n.setState({appendText:e});try{var t=n.editorKit.internal.note;t&&n.editorKit.internal.componentRelay.saveItemWithPresave(t,(function(){t.content.appendText=e}))}catch(o){console.log("Error saving appendText:",o)}},n.autoSaveCheckBoxes=function(e,t){n.setState({appendNewLine:e,appendNewParagraph:t});try{var o=n.editorKit.internal.note;o&&n.editorKit.internal.componentRelay.saveItemWithPresave(o,(function(){o.content.appendNewLine=e,o.content.appendNewParagraph=t}))}catch(i){console.log("Error saving checkboxes:",i)}},n.refreshEdit=function(){n.setState({refreshEdit:!n.state.refreshEdit},(function(){document.getElementById(Ge.editTextArea)&&n.state.editingMode===Xe.useCodeMirror&&n.configureCodeMirror(Ge.editTextArea)}))},n.refreshView=function(){n.setState({refreshView:!n.state.refreshView})},n.configureCodeMirror=function(e){if(e===Ge.editTextArea){ot;var t=document.getElementById(e);if(t){var o=$e.a.fromTextArea(t,{autocorrect:!0,autocapitalize:!0,extraKeys:{Enter:"newlineAndIndentContinueMarkdownList","Alt-F":"findPersistent"},lineNumbers:!1,lineWrapping:!0,mode:"gfm",spellcheck:!0,styleSelectedText:!0,tabindex:0,theme:"default",value:n.state.text});o.setSize("100%","100%"),o.on("change",(function(){var e=o.getValue();o.save(),n.saveText(e)})),o.on("blur",(function(e,t){var o=document.getElementById(Ge.content);o&&o.classList.remove(qe.focused)})),o.on("focus",(function(e,t){var o=document.getElementById(Ge.content);o&&o.classList.add(qe.focused)})),o.on("keydown",(function(e,t){n.onKeyDown(t),n.onKeyDownEditTextArea(t),n.onKeyDownTextArea(t)})),o.on("keyup",(function(e,t){n.onKeyUp(t)})),n.setState({editCodeMirror:o})}}else if(e===Ge.appendTextArea){var i=document.getElementById(Ge.appendTextArea);if(i){var s=$e.a.fromTextArea(i,{autocorrect:!0,autocapitalize:!0,extraKeys:{Enter:"newlineAndIndentContinueMarkdownList","Alt-F":"findPersistent"},lineNumbers:!1,lineWrapping:!0,mode:"gfm",spellcheck:!0,styleSelectedText:!0,tabindex:0,theme:"default",value:n.state.appendText});s.setSize("100%","100%"),s.on("change",(function(){var e=s.getValue();s.save(),n.autoSaveAppendText(e)})),s.on("keydown",(function(e,t){n.onKeyDown(t),n.onKeyDownAppendTextArea(t),n.onKeyDownTextArea(t)})),s.on("keyup",(function(e,t){n.onKeyUp(t)})),n.setState({appendCodeMirror:s})}}},n.onEditMode=function(){n.state.editMode?n.state.editMode&&(n.state.editingMode!==Xe.useMonacoEditor&&n.setState({viewMode:!0}),n.state.editCodeMirror&&n.state.editCodeMirror.toTextArea(),n.setState({editMode:!1},(function(){if(!n.state.appendMode){var e=document.getElementById(Ge.editButton);e&&e.focus()}}))):(n.state.appendMode&&!n.state.appendText&&n.setState({appendMode:!1}),n.setState({editMode:!0},(function(){var e=document.getElementById(Ge.editTextArea);e&&(e.focus(),n.state.editingMode===Xe.useCodeMirror&&n.configureCodeMirror(Ge.editTextArea))})))},n.onAppendMode=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];n.state.appendMode?n.state.appendMode&&(n.state.appendCodeMirror&&n.state.appendCodeMirror.toTextArea(),n.setState({appendMode:!1},(function(){if(n.state.editingMode===Xe.useMonacoEditor&&n.refreshEdit(),o){var e=document.getElementById(Ge.appendButton);e&&e.focus()}}))):(t&&n.setState({editMode:!1}),n.setState({appendMode:!0},(function(){if(e&&n.scrollToBottom(),o){var t=document.getElementById(Ge.appendTextArea);t&&(t.focus(),n.state.editingMode===Xe.useCodeMirror&&n.configureCodeMirror(Ge.appendTextArea))}})))},n.onViewMode=function(){n.state.viewMode||n.setState({viewMode:!0},(function(){n.state.editingMode===Xe.useMonacoEditor&&n.refreshEdit(),n.state.appendMode&&!n.state.editMode&&n.skipToBottom()})),n.state.viewMode&&n.setState({viewMode:!1},(function(){n.state.editingMode===Xe.useMonacoEditor&&n.refreshEdit(),n.state.editMode||n.state.appendMode||n.onEditMode()}))},n.toggleShowHelp=function(){n.state.showHelp?n.setState({showHelp:!1},(function(){n.refreshView();var e=document.getElementById(Ge.helpButton);e&&e.focus()})):n.setState({showHelp:!0},(function(){n.state.viewMode?n.state.viewMode&&n.refreshView():n.onViewMode();var e=document.getElementById(Ge.helpButton);e&&e.focus(),setTimeout((function(){n.scrollToTop()}),50)}))},n.toggleShowMenu=function(){n.setState({showMenu:!n.state.showMenu},(function(){var e=document.getElementById(Ge.menuButton);e&&e.focus()}))},n.loadDefaultMenuState=function(){n.setState({showMenuOptionsEdit:!1,showMenuOptionsShare:!0,showMenuOptionsView:!0})},n.toggleShowMenuOptionsEdit=function(){n.setState({showMenuOptionsEdit:!n.state.showMenuOptionsEdit})},n.toggleShowMenuOptionsShare=function(){n.setState({showMenuOptionsShare:!n.state.showMenuOptionsShare})},n.toggleShowMenuOptionsView=function(){n.setState({showMenuOptionsView:!n.state.showMenuOptionsView})},n.toggleBorderlessMode=function(){n.setState({borderlessMode:!n.state.borderlessMode},(function(){n.activateFixedHeader(),n.saveMenuOptions()}))},n.toggleFixedHeightMode=function(){n.setState({fixedHeightMode:!n.state.fixedHeightMode},(function(){n.activateFixedHeader(),n.saveMenuOptions()}))},n.toggleFullWidthMode=function(){n.setState({fullWidthMode:!n.state.fullWidthMode},(function(){n.activateFixedHeader(),n.saveMenuOptions()}))},n.toggleOverflowMode=function(){n.setState({overflowMode:!n.state.overflowMode},(function(){n.activateFixedHeader(),n.saveMenuOptions()}))},n.saveMenuOptions=function(){var e;e={borderlessMode:n.state.borderlessMode,fixedHeightMode:n.state.fixedHeightMode,fullWidthMode:n.state.fullWidthMode,overflowMode:n.state.overflowMode},n.saveEditorOption("menuOptions",JSON.stringify(e))},n.saveEditorOption=function(e,t){n.setState({savingEditorOptions:!0},(function(){try{n.editorKit.internal.componentRelay.setComponentDataValueForKey(e,t),setTimeout((function(){n.setState({savingEditorOptions:!1},(function(){n.loadDefaultSettings(),n.loadMetaData()}))}),250)}catch(o){console.log("Error saving editor option. Your optionKey:",e,"\n - Your optionValue: ",t,"\n - The error: ",o),n.setState({savingEditorOptions:!1},(function(){n.refreshEditor(),n.loadDefaultSettings(),n.loadMetaData()}))}}))},n.onSettingsMode=function(){n.state.settingsMode?n.state.settingsMode&&n.setState(Object(l.a)(Object(l.a)({},n.state.currentState),{},{settingsMode:!1}),(function(){n.refreshEdit();var e=document.getElementById(Ge.settingsButton);e&&e.focus()})):(n.removeFixedHeader(),n.setState({currentState:n.state},(function(){n.setState({appendMode:!1,editMode:!1,fullWidthMode:!1,fixedHeightMode:!1,settingsMode:!0,showAppendix:!1,showHeader:!1,showMenu:!1,viewMode:!1},(function(){var e=document.getElementById("undoDialog");e&&e.focus()}))})))},n.onSaveSettings=function(e){var t=e.customStyles,o=e.editingMode,i=e.fontEdit,s=e.fontSize,a=e.fontView,r=e.monacoEditorLanguage,c=e.saveAsDefault;n.setState(Object(l.a)(Object(l.a)({},n.state.currentState),{},{customStyles:t,editingMode:o,fontEdit:i,fontSize:s,fontView:a,monacoEditorLanguage:r,showAppendix:!0,showHeader:!0,settingsMode:!1}),(function(){n.refreshEditor();var e=document.getElementById(Ge.settingsButton);e&&e.focus()}));var d=n.editorKit.internal.note;d&&n.editorKit.internal.componentRelay.saveItemWithPresave(d,(function(){d.content.appendEditorCustomStyles=t,d.content.appendEditorEditingMode=o,d.content.appendEditorFontEdit=i,d.content.appendEditorFontSize=s,d.content.appendEditorFontView=a,d.content.appendEditorMonacoEditorLanguage=r})),c&&n.setState({defaultSettings:{customStyles:t,editingMode:o,fontEdit:i,fontSize:s,fontView:a,monacoEditorLanguage:r}},(function(){n.saveEditorOption("defaultSettings",JSON.stringify(n.state.defaultSettings))}))},n.activateStyles=function(){var e=document.getElementById("customStyleSheet");if(e){var t=e.parentNode;t&&t.removeChild(e)}var o="";n.state.fontSize&&(o=".CodeMirror, .DynamicEditor, .MonacoEditorContainer, .ProseMirror, #editTextArea, #appendTextArea, #renderedNote {font-size: "+n.state.fontSize+";}\n");var i="";n.state.fontEdit&&(i=".CodeMirror, .DynamicEditor, .ProseMirror, #editTextArea, #appendTextArea {font-family: "+n.state.fontEdit+";}\n");var s="";if(n.state.fontView&&(s="#renderedNote {font-family: "+n.state.fontView+";}\n"),n.state.customStyles||n.state.fontEdit||n.state.fontSize||n.state.fontView){var a=document.createElement("style");a.setAttribute("id","customStyleSheet"),a.innerHTML=o+i+s+n.state.customStyles,document.body.appendChild(a)}},n.onCancelPrint=function(){n.setState({confirmPrintUrl:!1},(function(){var e=document.getElementById(Ge.printButton);e&&e.focus()}))},n.onConfirmPrintUrl=function(){n.setState({confirmPrintUrl:!0},(function(){var e=document.getElementById("undoDialog");e&&e.focus()}))},n.onPrintUrlTrue=function(){n.setState({confirmPrintUrl:!1,printURL:!0},(function(){n.printRenderedHtml()}))},n.onPrintUrlFalse=function(){n.setState({confirmPrintUrl:!1,printURL:!1},(function(){n.printRenderedHtml()}))},n.printRenderedHtml=function(){window.print();var e=document.getElementById(Ge.printButton);e&&e.focus()},n.goDown=function(){if(document.body.scrollTop=1e7,n.state.editMode){var e=document.getElementById(Ge.editTextArea);e&&(e.scrollTop=1e7)}if(n.state.appendMode){var t=document.getElementById(Ge.appendTextArea);t&&(t.scrollTop=1e7)}if(n.state.fixedHeightMode){var o=document.getElementById(Ge.view);o&&(o.scrollTop=1e7);var i=document.getElementById(Ge.edit);i&&(i.scrollTop=1e7);var s=document.getElementsByClassName("CodeMirror-vscrollbar")[0];s&&(s.scrollTop=1e7)}},n.scrollToBottom=function(){n.goDown();var e=document.getElementById(Ge.appendix);e&&e.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})},n.skipToBottom=function(){n.goDown();var e=document.getElementById(Ge.appendix);e&&e.scrollIntoView({behavior:"auto",block:"end",inline:"nearest"})},n.goUp=function(){if(document.body.scrollTop=0,n.state.editMode){var e=document.getElementById(Ge.editTextArea);e&&(e.scrollTop=0)}if(n.state.appendMode){var t=document.getElementById(Ge.appendTextArea);t&&(t.scrollTop=0)}if(n.state.fixedHeightMode){var o=document.getElementById(Ge.view);o&&(o.scrollTop=0);var i=document.getElementById(Ge.edit);i&&(i.scrollTop=0);var s=document.getElementsByClassName("CodeMirror-vscrollbar")[0];s&&(s.scrollTop=0)}},n.scrollToTop=function(){n.goUp();var e=document.getElementById("top");e&&e.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})},n.skipToTop=function(){n.goUp();var e=document.getElementById("top");e&&e.scrollIntoView({behavior:"auto",block:"start",inline:"nearest"})},n.onKeyDown=function(e){nt.set(e.key,!0),nt.get("Control")&&nt.get("e")?(e.preventDefault(),n.onEditMode()):nt.get("Control")&&!nt.get("Alt")&&(nt.get("u")||nt.get("m"))?(e.preventDefault(),n.onAppendMode()):nt.get("Control")&&!nt.get("Alt")&&nt.get("p")?(e.preventDefault(),n.onViewMode()):nt.get("Control")&&nt.get(".")?(e.preventDefault(),n.setState({appendRows:n.state.appendRows+1})):nt.get("Control")&&nt.get(",")?(e.preventDefault(),n.state.appendRows>5&&n.setState({appendRows:n.state.appendRows-1})):nt.get("Control")&&nt.get("<")?(e.preventDefault(),n.setState({appendMode:!1,editMode:!1,viewMode:!1},(function(){n.onEditMode()}))):nt.get("Control")&&nt.get(">")?(e.preventDefault(),n.setState({appendMode:!1,editMode:!1,viewMode:!1},(function(){n.onAppendMode()}))):nt.get("Control")&&nt.get("[")?(e.preventDefault(),n.skipToTop()):nt.get("Control")&&nt.get("]")?(e.preventDefault(),n.skipToBottom()):nt.get("Control")&&!nt.get("Alt")&&!nt.get("Shift")&&nt.get("w")&&nt.delete("w")},n.onKeyDownAppendTextArea=function(e){if(nt.get("Escape"))e.preventDefault(),nt.delete("Escape"),n.onAppendMode();else if(nt.get("Control")&&nt.get("Enter"))e.preventDefault(),n.state.editingMode===Xe.useCodeMirror&&n.appendTextToNote();else if(nt.get("Control")&&nt.get("s"))e.preventDefault(),n.state.editingMode===Xe.useCodeMirror&&n.appendTextToNote();else if(nt.get("Control")&&!nt.get("Shift")&&nt.get("Alt")&&nt.get("n")){e.preventDefault();var t=document.getElementById(Ge.newLine);t&&t.click()}else if(nt.get("Control")&&!nt.get("Shift")&&nt.get("Alt")&&nt.get("p")){e.preventDefault();var o=document.getElementById(Ge.newParagraph);o&&o.click()}},n.onKeyDownEditTextArea=function(e){nt.get("Escape")&&(e.preventDefault(),nt.set("Escape",!1),n.onEditMode())},n.onKeyDownTextArea=function(e){nt.get("Control")&&nt.get("b")?(e.preventDefault(),document.execCommand("insertText",!1,"**")):nt.get("Control")&&nt.get("h")?(e.preventDefault(),document.execCommand("insertText",!1,"#")):nt.get("Control")&&nt.get("Alt")&&nt.get("i")?(e.preventDefault(),document.execCommand("insertText",!1,"![]()")):nt.get("Control")&&nt.get("i")?(e.preventDefault(),document.execCommand("insertText",!1,"*")):nt.get("Control")&&nt.get("Alt")&&nt.get("k")?(e.preventDefault(),document.execCommand("insertText",!1,"`")):nt.get("Control")&&nt.get("k")?(e.preventDefault(),document.execCommand("insertText",!1,"[]()")):nt.get("Control")&&nt.get("Alt")&&nt.get("l")?(e.preventDefault(),document.execCommand("insertText",!1,"\n1. ")):nt.get("Control")&&nt.get("l")?(e.preventDefault(),document.execCommand("insertText",!1,"\n- ")):nt.get("Control")&&nt.get("Alt")&&nt.get("u")?(e.preventDefault(),document.execCommand("insertText",!1,"~~")):(nt.get("Control")&&nt.get("q")||nt.get("Control")&&nt.get("'")||nt.get("Control")&&nt.get('"'))&&(e.preventDefault(),document.execCommand("insertText",!1,"\n> "))},n.onKeyUp=function(e){nt.delete(e.key)},n.onBlur=function(e){nt.clear()},n.onScroll=function(e){n.state.settingsMode||(window.scrollYtt&&!n.state.showMenu&&(void 0!==n.state.editingMode&&n.state.editingMode!==Xe.usePlainText&&n.state.editingMode!==Xe.useCodeMirror||!n.state.editMode||n.state.appendMode||n.state.settingsMode||n.state.viewMode)&&n.removeFixedHeader(),tt=window.scrollY)},n.activateFixedHeader=function(){var e=document.getElementById(Ge.header),t=document.getElementById(Ge.content);e&&t&&(e.classList.add(qe.fixed),t.classList.add(qe.fixedHeader))},n.removeFixedHeader=function(){var e=document.getElementById(Ge.header),t=document.getElementById(Ge.content);e&&e.classList.remove(qe.fixed),t&&t.classList.remove(qe.fixedHeader)},n.configureEditorKit(),n.state=et,n}return Object(p.a)(o,[{key:"render",value:function(){var e=this;return[Object(n.jsx)("span",{id:"top"}),Object(n.jsxs)("div",{tabIndex:0,className:"sn-component",onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,onBlur:this.onBlur,children:[this.state.showHeader&&[Object(n.jsx)("div",{id:Ge.header,className:"header"+(void 0!==this.state.editingMode&&this.state.editingMode!==Xe.usePlainText&&this.state.editingMode!==Xe.useCodeMirror||!this.state.editMode||this.state.appendMode||this.state.settingsMode||this.state.viewMode?"":" fixed"),children:Object(n.jsxs)("div",{className:"sk-button-group",children:[Object(n.jsx)("button",{type:"button",id:Ge.editButton,onClick:this.onEditMode,title:"Toggle Edit Mode",className:"sk-button "+(this.state.editMode?"on":"off"),children:Object(n.jsx)(C,{condition:this.state.editMode,role:"button"})}),Object(n.jsx)("button",{type:"button",id:Ge.viewButton,onClick:this.onViewMode,title:"Toggle View Mode",className:"sk-button "+(this.state.viewMode?"on":"off"),children:Object(n.jsx)(O,{condition:this.state.viewMode,role:"button"})}),Object(n.jsx)("button",{type:"button",id:Ge.appendButton,onClick:function(){return e.onAppendMode()},title:"Toggle Append Mode",className:"sk-button "+(this.state.appendMode?"on":"off"),children:Object(n.jsx)(E,{condition:this.state.appendMode,role:"button"})}),Object(n.jsx)("div",{className:"sk-button divider",children:Object(n.jsx)("svg",{role:"img","aria-label":"Vertical line divider",width:"1",height:"24",viewBox:"0 0 1 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("rect",{width:"1",height:"24",fill:"var(--sn-stylekit-foreground-color)"})})}),Object(n.jsx)("button",{type:"button",id:Ge.helpButton,onClick:this.toggleShowHelp,title:"Help",className:"sk-button "+(this.state.showHelp?"on":"off"),children:Object(n.jsx)(M,{condition:this.state.showHelp,role:"button"})}),Object(n.jsx)("button",{type:"button",id:Ge.settingsButton,onClick:this.onSettingsMode,title:"Settings",className:"sk-button "+(this.state.settingsMode?"on":"off"),children:Object(n.jsx)(w,{condition:this.state.settingsMode,role:"button"})}),Object(n.jsx)("div",{className:"sk-button divider",children:Object(n.jsx)("svg",{role:"img","aria-label":"Vertical line divider",width:"1",height:"24",viewBox:"0 0 1 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("rect",{width:"1",height:"24",fill:"var(--sn-stylekit-foreground-color)"})})}),Object(n.jsx)("button",{type:"button",id:"scrollToBottomButtonHeader",onClick:this.skipToBottom,title:"Scroll to Bottom",className:"sk-button off",children:Object(n.jsx)("svg",{role:"button","aria-label":"Arrow pointing down for scroll to bottom button",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M6.17622 7.15015L10.0012 10.9751L13.8262 7.15015L15.0012 8.33348L10.0012 13.3335L5.00122 8.33348L6.17622 7.15015Z",fill:"var(--sn-stylekit-foreground-color)"})})}),Object(n.jsx)("button",{type:"button",id:"scrollToTopButtonHeader",onClick:this.skipToTop,title:"Scroll to Top",className:"sk-button off",children:Object(n.jsx)("svg",{role:"button","aria-label":"Arrow pointing up for scroll to top button",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M13.826 13.3335L10.001 9.5085L6.17597 13.3335L5.00097 12.1502L10.001 7.15017L15.001 12.1502L13.826 13.3335Z",fill:"var(--sn-stylekit-foreground-color)"})})}),Object(n.jsx)("button",{type:"button",id:Ge.menuButton,onClick:this.toggleShowMenu,title:"Toggle Menu",className:"sk-button "+(this.state.showMenu?"on":"off"),children:Object(n.jsx)(y,{condition:this.state.showMenu,role:"button"})})]})})],Object(n.jsxs)("div",{id:Ge.content,className:"content"+(void 0!==this.state.editingMode&&this.state.editingMode!==Xe.usePlainText&&this.state.editingMode!==Xe.useCodeMirror||!this.state.editMode||this.state.appendMode||this.state.settingsMode||this.state.viewMode?"":" fixed-header edit-only")+(this.state.borderlessMode?" borderless":"")+(this.state.fixedHeightMode?" fixed-height":"")+(this.state.fullWidthMode?" full-width":"")+(this.state.overflowMode?" overflow":""),children:[this.state.showMenu&&Object(n.jsx)(Re,{children:Object(n.jsx)(Qe,{borderlessMode:this.state.borderlessMode,editingMode:this.state.editingMode,fixedHeightMode:this.state.fixedHeightMode,fullWidthMode:this.state.fullWidthMode,monacoEditorLanguage:this.state.monacoEditorLanguage,onConfirmPrintUrl:this.onConfirmPrintUrl,overflowMode:this.state.overflowMode,refreshEdit:this.refreshEdit,refreshView:this.refreshView,saveText:this.saveText,showMenuOptionsEdit:this.state.showMenuOptionsEdit,showMenuOptionsShare:this.state.showMenuOptionsShare,showMenuOptionsView:this.state.showMenuOptionsView,text:this.state.text,toggleBorderlessMode:this.toggleBorderlessMode,toggleFixedHeightMode:this.toggleFixedHeightMode,toggleFullWidthMode:this.toggleFullWidthMode,toggleOverflowMode:this.toggleOverflowMode,toggleShowMenu:this.toggleShowMenu,toggleShowMenuOptionsEdit:this.toggleShowMenuOptionsEdit,toggleShowMenuOptionsShare:this.toggleShowMenuOptionsShare,toggleShowMenuOptionsView:this.toggleShowMenuOptionsView,viewMode:this.state.viewMode})}),this.state.settingsMode&&Object(n.jsx)(Re,{children:Object(n.jsx)(ze,{cancelText:"Cancel",confirmText:"Save",customStyles:this.state.customStyles,debugMode:ot,defaultSettings:this.state.defaultSettings,editingMode:this.state.editingMode,fontEdit:this.state.fontEdit,fontSize:this.state.fontSize,fontView:this.state.fontView,helpLink:"https://appendeditor.com/#settings",keyMap:nt,onConfirm:this.onSaveSettings,onCancel:this.onSettingsMode,title:"Append Editor Settings",monacoEditorLanguage:this.state.monacoEditorLanguage})}),this.state.editMode&&!this.state.refreshEdit&&Object(n.jsx)(Re,{children:Object(n.jsx)(z,{debugMode:ot,editingMode:this.state.editingMode,fontSize:this.state.fontSize,keyMap:nt,monacoEditorLanguage:this.state.monacoEditorLanguage,onKeyDown:this.onKeyDown,onKeyDownEditTextArea:this.onKeyDownEditTextArea,onKeyDownTextArea:this.onKeyDownTextArea,onKeyUp:this.onKeyUp,saveText:this.saveText,text:this.state.text,viewMode:this.state.viewMode})}),this.state.editMode&&this.state.refreshEdit&&Object(n.jsx)(Re,{children:Object(n.jsx)(z,{debugMode:ot,editingMode:this.state.editingMode,fontSize:this.state.fontSize,keyMap:nt,monacoEditorLanguage:this.state.monacoEditorLanguage,onKeyDown:this.onKeyDown,onKeyDownEditTextArea:this.onKeyDownEditTextArea,onKeyDownTextArea:this.onKeyDownTextArea,onKeyUp:this.onKeyUp,saveText:this.saveText,text:this.state.text,viewMode:this.state.viewMode})}),this.state.viewMode&&!this.state.refreshView&&Object(n.jsx)(Re,{children:Object(n.jsx)(Oe,{appendMode:this.state.appendMode,bypassDebounce:this.state.bypassDebounce,debugMode:ot,editMode:this.state.editMode,editingMode:this.state.editingMode,monacoEditorLanguage:this.state.monacoEditorLanguage,printURL:this.state.printURL,showHelp:this.state.showHelp,saveText:this.saveText,text:this.state.text})}),this.state.viewMode&&this.state.refreshView&&Object(n.jsx)(Re,{children:Object(n.jsx)(Oe,{appendMode:this.state.appendMode,bypassDebounce:this.state.bypassDebounce,debugMode:ot,editMode:this.state.editMode,editingMode:this.state.editingMode,monacoEditorLanguage:this.state.monacoEditorLanguage,printURL:this.state.printURL,showHelp:this.state.showHelp,saveText:this.saveText,text:this.state.text})}),this.state.confirmPrintUrl&&Object(n.jsxs)(Re,{children:[Object(n.jsx)(L,{title:"Would you like to print URLs?",onUndo:this.onCancelPrint,onConfirm:this.onPrintUrlTrue,onCancel:this.onPrintUrlFalse,helpLink:"https://appendeditor.com/#printing",confirmText:"Yes, print URLs",cancelText:"No, thanks"})," "]}),this.state.showDiff&&[Object(n.jsx)(Re,{children:Object(n.jsx)(V,{text:this.state.text,modifiedText:this.state.appendText,saveText:this.saveText})})]]}),this.state.showAppendix&&[Object(n.jsxs)("div",{id:Ge.appendix,className:"appendix"+(this.state.borderlessMode?" borderless":"")+(this.state.fullWidthMode?" full-width":""),children:[this.state.appendMode&&Object(n.jsx)(Re,{children:Object(n.jsx)(Me,{appendTextToNote:this.appendTextToNote,autoSaveAppendText:this.autoSaveAppendText,autoSaveCheckBoxes:this.autoSaveCheckBoxes,debugMode:ot,editingMode:this.state.editingMode,fontSize:this.state.fontSize,keyMap:nt,appendNewLine:this.state.appendNewLine,appendNewParagraph:this.state.appendNewParagraph,monacoEditorLanguage:this.state.monacoEditorLanguage,onKeyDown:this.onKeyDown,onKeyDownAppendTextArea:this.onKeyDownAppendTextArea,onKeyDownTextArea:this.onKeyDownTextArea,onKeyUp:this.onKeyUp,appendRows:this.state.appendRows,text:this.state.appendText})}),Object(n.jsx)("button",{className:"sk-button info",id:"scrollToTopButton",onClick:this.scrollToTop,title:"Scroll to Top",type:"button",children:Object(n.jsx)("div",{children:" \u25b2 "})}),Object(n.jsx)("button",{className:"sk-button info",id:"scrollToBottomButton",onClick:this.scrollToBottom,title:"Scroll to Bottom",type:"button",children:Object(n.jsx)("div",{children:" \u25bc "})})]})]]})]}}]),o}(s.a.Component);o(1174);r.a.render(Object(n.jsx)(s.a.StrictMode,{children:Object(n.jsx)(it,{})}),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()})).catch((function(e){console.error(e.message)})),c()},455:function(e,t,o){}},[[1175,3,4]]]); +//# sourceMappingURL=main.000c5a19.chunk.js.map \ No newline at end of file diff --git a/build/static/js/main.7e0f6b25.chunk.js.map b/build/static/js/main.000c5a19.chunk.js.map similarity index 99% rename from build/static/js/main.7e0f6b25.chunk.js.map rename to build/static/js/main.000c5a19.chunk.js.map index 77cc7bf1..1a2627c9 100644 --- a/build/static/js/main.7e0f6b25.chunk.js.map +++ b/build/static/js/main.000c5a19.chunk.js.map @@ -1 +1 @@ -{"version":3,"sources":["serviceWorker.ts","reportWebVitals.ts","components/Icons.tsx","components/PrintDialog.tsx","components/Monaco.tsx","components/DynamicEditor.tsx","components/EditNote.tsx","lib/clickButton.ts","components/Help.tsx","components/Intro.tsx","lib/renderMarkdown.ts","components/ViewNote.tsx","components/AppendText.tsx","components/Buttons.tsx","components/Menu.tsx","components/Settings.tsx","components/ErrorBoundary.tsx","components/AppendEditor.tsx","index.tsx"],"names":["Boolean","window","location","hostname","match","reportWebVitals","onPerfEntry","Function","then","getCLS","getFID","getFCP","getLCP","getTTFB","infoColor","foregroundColor","ChevronIconDown","fill","role","className","aria-label","width","height","viewBox","xmlns","d","ChevronIconRight","CloseIcon","CopyIcon","EyeIcon","condition","GearIcon","HelpIcon","MenuIcon","PencilIcon","PlusIcon","fill-rule","clip-rule","PrintIcon","RefreshIcon","UndoIcon","PrintDialog","cancelText","confirmText","helpLink","onCancel","onConfirm","onUndo","title","id","onClick","href","target","rel","MonacoEditorContainerID","MonacoDiffEditorContainerID","self","MonacoEnvironment","getWorkerUrl","_moduleId","label","MonacoEditor","editor","fontSize","language","saveText","tabSize","text","theme","viewMode","divEl","useRef","scrollBeyondLastLine","useEffect","current","monaco","create","parseInt","replace","value","join","autoClosingOvertype","formatOnPaste","formatOnType","wordWrap","wrappingStrategy","onKeyDown","e","keyCode","console","log","code","ctrlKey","preventDefault","onKeyUp","onDidChangeModelContent","getValue","dispose","ref","MonacoDiffEditor","diffEditor","modifiedText","originalModel","createModel","modifiedModel","createDiffEditor","originalEditable","readOnly","setModel","original","modified","onDidChangeContent","YouTubeEmbed","videoId","this","props","attrs","matches","isSelected","src","React","DynamicEditor","handleToggleReadOnly","setState","state","handleChange","debounce","debugMode","onChange","template","undefined","placeholder","readOnlyWriteCheckboxes","defaultValue","scrollTo","hash","autoFocus","embeds","keywords","icon","alt","matcher","url","component","EditNote","handleInputChange","event","onBlur","content","document","getElementById","HtmlElementId","classList","remove","HtmlClassName","focused","onFocus","add","onKeyDownEditTextArea","onKeyDownTextArea","keyMap","delete","key","editingMode","EditingModes","useMonacoEditor","useDynamicEditor","edit","monacoEditorLanguage","editTextArea","name","rows","spellCheck","Component","defaultProps","clickAppendButton","appendButton","click","clickEditButton","editButton","clickHelpButton","helpButton","clickMenuButton","menuButton","clickSettingsButton","settingsButton","clickViewButton","viewButton","Help","onToggleShowFeelings","showFeelings","onToggleShowMoreQuestions","showMoreQuestions","onToggleShowFeedback","showFeedback","onToggle","Intro","appendMode","editMode","showHelp","breaks","require","externalLinks","footnotes","gfm","gemoji","math","slug","toc","highlight","rehypeKatex","raw","processor","unified","use","parse","maxDepth","inlineNotes","remark2rehype","allowDangerousHtml","ignoreMissing","rehype2react","createElement","processMarkdown","processSync","result","isLongString","throttle","length","renderLongMarkdown","ViewNote","onToggleShowHelp","renderMarkdown","bypassDebounce","printURL","view","AppendText","type","checked","autoSaveCheckBoxes","handleTextAreaChange","autoSaveAppendText","appendTextToNote","appendTextArea","focus","newLine","newParagraph","set","get","onKeyDownAppendTextArea","appendNewLine","appendNewParagraph","appendRows","ChevronToggleButton","caption","CopyButton","EyeButton","messageOn","messageOff","PencilButton","PrintButton","UndoButton","editingModeID","fontEditID","fontSizeID","fontViewID","monacoEditorLanguageID","resetAllSettingsID","saveAsDefaultID","startRegExp","RegExp","cssRegExp","endRegExp","codeRegExp","Settings","handleSelectChange","toggleShowCustomStyles","showCustomStyles","cleanCustomStyles","customStyles","handleSubmit","fontEditMessage","fontViewMessage","fontEdit","fontView","saveAsDefault","loadDefaultSettings","defaultSettings","refreshCustomStyles","clearCustomStyles","clearFontEdit","clearFontSize","clearFontView","clearEditingMode","usePlainText","clearMonacoEditorLanguage","clearSaveAsDefault","clearAllSettings","resetAllSettings","clear","componentWillUnmount","useCodeMirror","htmlFor","list","ErrorBoundary","hasError","error","errorInfo","message","children","Menu","clearTooltipTimer","resetMessageTimer","clearTimeout","setTimeout","displayMessageEdit","displayMessageShare","showMessageEdit","showMessageShare","copyToClipboard","textField","body","appendChild","select","execCommand","copyText","copyHtml","renderedNote","firstElementChild","innerHTML","formatText","formattedText","prettier","format","parser","plugins","parserMarkdown","refreshEdit","refreshView","uncheckBoxes","checkedBoxes","test","newText","toggleShowMenu","chevronToggleButton","showMenuOptionsView","toggleShowMenuOptionsView","borderlessMode","on","off","toggleBorderlessMode","fixedHeightMode","toggleFixedHeightMode","fullWidthMode","toggleFullWidthMode","overflowMode","toggleOverflowMode","showMenuOptionsShare","toggleShowMenuOptionsShare","printButton","onConfirmPrintUrl","showMenuOptionsEdit","toggleShowMenuOptionsEdit","initialState","appendText","confirmPrintUrl","showAppendix","showHeader","showDiff","settingsMode","last_known_scroll_position","Map","AppendEditor","editorKit","refreshEditorTimer","saveTimer","componentDidMount","onViewMode","loadDefaultMenuState","addEventListener","onScroll","removeEventListener","configureEditorKit","delegate","EditorKitDelegate","setEditorRawText","cancel","flush","savingEditorOptions","loadEditorOptions","loadMetaData","clearUndoHistory","getElementsBySelector","EditorKit","mode","supportsFilesafe","refreshEditor","activateStyles","defaultSettingsString","internal","componentRelay","getComponentDataValueForKey","defaultEditingMode","defaultSettingsObject","JSON","defaultCustomStyles","defaultFontEdit","defaultFontSize","defaultFontView","defaultMonacoEditorLanguage","menuOptionsString","menuOptionsObject","streamContextItem","note","appendEditorCustomStyles","appendEditorEditingMode","appendEditorFontEdit","appendEditorFontSize","appendEditorFontView","appendEditorMonacoEditorLanguage","onEditMode","saveNote","scrollY","scrollTop","refreshedView","onEditorValueChanged","textToAppend","concat","saveItemWithPresave","skipToBottom","appendCodeMirror","setValue","configureCodeMirror","editCodeMirror","CodeMirror","fromTextArea","autocorrect","autocapitalize","extraKeys","Enter","lineNumbers","lineWrapping","spellcheck","styleSelectedText","tabindex","setSize","editCodeMirrorText","save","cm","appendCodeMirrorText","toTextArea","onAppendMode","scrollDown","closeEdit","scrollToBottom","toggleShowHelp","scrollToTop","showMenu","activateFixedHeader","saveMenuOptions","currentMenuOptions","saveEditorOption","stringify","optionKey","optionValue","setComponentDataValueForKey","onSettingsMode","currentState","removeFixedHeader","undoDialog","onSaveSettings","sheetToBeRemoved","sheetParent","parentNode","removeChild","fontSizeStyle","fontEditStyle","fontViewStyle","sheet","setAttribute","onCancelPrint","onPrintUrlTrue","printRenderedHtml","onPrintUrlFalse","print","goDown","codeMirrorEditMode","getElementsByClassName","appendix","scrollIntoView","behavior","block","inline","goUp","top","skipToTop","header","fixed","fixedHeader","tabIndex","ReactDOM","render","StrictMode","navigator","serviceWorker","ready","registration","unregister","catch"],"mappings":"0MAYoBA,QACW,cAA7BC,OAAOC,SAASC,UAEe,UAA7BF,OAAOC,SAASC,UAEhBF,OAAOC,SAASC,SAASC,MACvB,2DChBN,IAYeC,EAZS,SAACC,GACnBA,GAAeA,aAAuBC,UACxC,gCAAqBC,MAAK,YAAkD,IAA/CC,EAA8C,EAA9CA,OAAQC,EAAsC,EAAtCA,OAAQC,EAA8B,EAA9BA,OAAQC,EAAsB,EAAtBA,OAAQC,EAAc,EAAdA,QAC3DJ,EAAOH,GACPI,EAAOJ,GACPK,EAAOL,GACPM,EAAON,GACPO,EAAQP,O,8CCPRQ,EAAY,gCACZC,EAAkB,sCAQXC,EAAmC,SAAC,GAAD,IAAGC,EAAH,EAAGA,KAAMC,EAAT,EAASA,KAAT,OAC9C,sBAAMC,UAAU,oBAAhB,SACE,qBACEC,aAAW,oBACXF,KAAMA,EACNG,MAAM,KACNC,OAAO,KACPC,QAAQ,YACRN,KAAK,OACLO,MAAM,6BAPR,SASE,sBACEC,EAAE,oHAC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MgP,eAIvB,wBACEzV,UAAU,iBACV8B,GAAG,oBACHC,QAASgE,KAAKsV,YACdxZ,MAAM,gBACN6L,KAAK,SALP,SAOE,6CAEF,wBACE1N,UAAU,iBACV8B,GAAG,uBACHC,QAASgE,KAAKoV,eACdtZ,MAAM,mBACN6L,KAAK,SALP,SAOE,yD,GA39D4BrH,IAAMqD,W,QC9KhDuU,IAASC,OACP,cAAC,IAAMC,WAAP,UACE,cAAC,GAAD,MAEFjW,SAASC,eAAe,SlB4HpB,kBAAmBiW,WACrBA,UAAUC,cAAcC,MACrBjf,MAAK,SAACkf,GACLA,EAAaC,gBAEdC,OAAM,SAAC1M,GACNzN,QAAQyN,MAAMA,EAAME,YkBvH5B/S,K","file":"static/js/main.7e0f6b25.chunk.js","sourcesContent":["// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\ntype Config = {\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: Config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n navigator.serviceWorker\n .register(swUrl)\n .then((registration) => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch((error) => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' },\n })\n .then((response) => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then((registration) => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready\n .then((registration) => {\n registration.unregister();\n })\n .catch((error) => {\n console.error(error.message);\n });\n }\n}\n","import { ReportHandler } from 'web-vitals';\n\nconst reportWebVitals = (onPerfEntry?: ReportHandler) => {\n if (onPerfEntry && onPerfEntry instanceof Function) {\n import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\n getCLS(onPerfEntry);\n getFID(onPerfEntry);\n getFCP(onPerfEntry);\n getLCP(onPerfEntry);\n getTTFB(onPerfEntry);\n });\n }\n};\n\nexport default reportWebVitals;\n","import React from 'react';\n\nconst infoColor = 'var(--sn-stylekit-info-color)';\nconst foregroundColor = 'var(--sn-stylekit-foreground-color)';\n\ninterface Icons {\n condition?: boolean;\n fill?: string;\n role: string;\n}\n\nexport const ChevronIconDown: React.FC = ({ fill, role }) => (\n \n \n \n \n \n);\n\nexport const ChevronIconRight: React.FC = ({ fill, role }) => (\n \n \n \n \n \n);\n\nexport const CloseIcon: React.FC = ({ fill, role }) => (\n \n \n \n);\n\nexport const CopyIcon: React.FC = ({ fill, role }) => (\n \n \n \n);\n\nexport const EyeIcon: React.FC = ({ condition, fill, role }) => (\n \n \n \n);\n\nexport const GearIcon: React.FC = ({ condition, fill, role }) => (\n \n \n \n);\n\nexport const HelpIcon: React.FC = ({ condition, fill, role }) => (\n \n \n \n);\n\nexport const MenuIcon: React.FC = ({ condition, fill, role }) => (\n \n \n \n);\n\nexport const PencilIcon: React.FC = ({ condition, fill, role }) => (\n \n \n \n);\n\nexport const PlusIcon: React.FC = ({ condition, fill, role }) => (\n \n \n \n);\n\nexport const PrintIcon: React.FC = ({ fill, role }) => (\n \n \n \n);\n\nexport const RefreshIcon: React.FC = ({ fill, role }) => (\n \n \n \n);\n\nexport const UndoIcon: React.FC = ({ fill, role }) => (\n \n \n \n);\n","// import { Method } from '@testing-library/react';\nimport React from 'react';\nimport { CloseIcon } from './Icons';\n\ninterface PrintDialogTypes {\n cancelText: string;\n confirmText: string;\n helpLink: string;\n onCancel: () => void;\n onConfirm: () => void;\n onUndo: () => void;\n title: string;\n}\n\nconst PrintDialog: React.FC = ({\n cancelText,\n confirmText,\n helpLink,\n onCancel,\n onConfirm,\n onUndo,\n title,\n}) => (\n
\n
\n
\n
\n
\n

{title}

\n \n
\n

\n Need help deciding? Check out the{' '}\n \n documentation\n \n .\n

\n
\n
\n
\n
\n \n \n
\n
\n
\n
\n);\n\nexport default PrintDialog;\n","/**\n * This component is derived from the \"browser-esm-webpack-typescript-react\" found\n * at https://github.com/microsoft/monaco-editor-samples,\n * which is released under MIT, Copyright (c) 2016 Microsoft Corporation.\n * This modified version is released under AGPL-3.0 as indicated in the README.md\n * in the root directory. A copy of AGPL-3.0 is available there.\n * */\nimport React, { useRef, useEffect } from 'react';\nimport * as monaco from 'monaco-editor';\n\nconst debugMode = false;\nconst MonacoEditorContainerID = 'MonacoEditorContainer';\nconst MonacoDiffEditorContainerID = 'MonacoDiffEditorContainer';\n\n/*eslint no-restricted-globals: [\"error\", \"event\", \"monaco\"]*/\n// @ts-ignore\nself.MonacoEnvironment = {\n getWorkerUrl: function (_moduleId: any, label: string) {\n if (label === 'json') {\n return './monaco/json.worker.bundle.js';\n }\n if (label === 'css' || label === 'scss' || label === 'less') {\n return './monaco/css.worker.bundle.js';\n }\n if (label === 'html' || label === 'handlebars' || label === 'razor') {\n return './monaco/html.worker.bundle.js';\n }\n if (label === 'typescript' || label === 'javascript') {\n return './monaco/ts.worker.bundle.js';\n }\n return './monaco/editor.worker.bundle.js';\n },\n};\n\nconst onKeyDown = (keyCode: string, debugMode = false) => {\n if (debugMode) {\n console.log('IKeyboardEvent Up: ' + keyCode);\n }\n};\n\nconst onKeyUp = (keyCode: string, debugMode = false) => {\n if (debugMode) {\n console.log('IKeyboardEvent Up: ' + keyCode);\n }\n};\n\ninterface MonacoEditorTypes {\n fontSize?: string;\n id?: string;\n language?: string;\n onKeyDown?: Function;\n onKeyUp?: Function;\n saveText?: Function;\n tabSize?: number;\n text: string;\n theme?: string;\n viewMode?: boolean;\n}\n\nexport const MonacoEditor: React.FC = ({\n fontSize = '16',\n id = MonacoEditorContainerID,\n language = 'markdown',\n saveText,\n tabSize = 2,\n text,\n theme = 'vs-dark',\n viewMode = false,\n}) => {\n const divEl = useRef(null);\n let editor: monaco.editor.IStandaloneCodeEditor;\n\n if (fontSize === '') {\n fontSize = '16px';\n }\n\n let scrollBeyondLastLine = true;\n if (viewMode) {\n scrollBeyondLastLine = false;\n }\n\n useEffect(() => {\n if (divEl.current) {\n editor = monaco.editor.create(divEl.current, {\n // These are variable: customizable by user or dependent on props\n fontSize: parseInt(fontSize.replace('px', '')),\n language: language,\n tabSize: tabSize,\n theme: theme,\n scrollBeyondLastLine: scrollBeyondLastLine,\n value: [text].join('\\n'),\n\n // These are not customizable\n autoClosingOvertype: 'auto',\n formatOnPaste: true,\n formatOnType: true,\n wordWrap: 'on',\n wrappingStrategy: 'advanced',\n });\n\n // Keyboard Events\n editor.onKeyDown((e: monaco.IKeyboardEvent) => {\n onKeyDown(e.code, debugMode);\n if (e.ctrlKey && e.code === 'KeyS') {\n e.preventDefault();\n }\n });\n editor.onKeyUp((e: monaco.IKeyboardEvent) => {\n onKeyUp(e.code, debugMode);\n });\n\n // Content Change Events\n editor.onDidChangeModelContent(\n (e: monaco.editor.IModelContentChangedEvent) => {\n if (saveText) {\n saveText(editor.getValue());\n }\n }\n );\n }\n return () => {\n editor.dispose();\n };\n }, []);\n return
;\n};\n\ninterface MonacoDiffEditorTypes extends MonacoEditorTypes {\n modifiedText: string;\n}\n\nexport const MonacoDiffEditor: React.FC = ({\n fontSize = '16',\n id = MonacoDiffEditorContainerID,\n language = 'markdown',\n saveText,\n text,\n modifiedText,\n theme = 'vs-dark',\n}) => {\n const divEl = useRef(null);\n let diffEditor: monaco.editor.IStandaloneDiffEditor;\n\n if (fontSize === '') {\n fontSize = '16px';\n }\n\n useEffect(() => {\n if (divEl.current) {\n const originalModel = monaco.editor.createModel(\n [text].join('\\n'),\n language\n );\n const modifiedModel = monaco.editor.createModel(\n [modifiedText].join('\\n'),\n language\n );\n\n diffEditor = monaco.editor.createDiffEditor(divEl.current, {\n // Same settings as above\n // These are variable: customizable by user or dependent on props\n fontSize: parseInt(fontSize.replace('px', '')),\n theme: theme,\n\n // These are not customizable\n autoClosingOvertype: 'auto',\n formatOnPaste: true,\n formatOnType: true,\n wordWrap: 'on',\n wrappingStrategy: 'advanced',\n\n // Specific to Diff Editor\n originalEditable: true, // for left panel\n readOnly: true, // for right panel\n });\n diffEditor.setModel({\n original: originalModel,\n modified: modifiedModel,\n });\n\n // Content Change Events\n originalModel.onDidChangeContent(\n (e: monaco.editor.IModelContentChangedEvent) => {\n if (saveText) {\n saveText(originalModel.getValue());\n }\n }\n );\n }\n return () => {\n diffEditor.dispose();\n };\n }, []);\n return (\n
\n );\n};\n","/**\n * This component is derived from the example found at\n * https://github.com/outline/rich-markdown-editor/blob/develop/example/src/index.js,\n * which is released under BSD-3 License, Copyright (c) 2020 General Outline,\n * Inc (https://www.getoutline.com/) and individual contributors.\n * This modified version is released under AGPL-3.0 as indicated in the README.md\n * in the root directory. A copy of AGPL-3.0 is available there.\n * */\n\nimport * as React from 'react';\nimport debounce from 'lodash/debounce';\nimport RichMarkdownEditor from 'rich-markdown-editor';\n\nclass YouTubeEmbed extends React.Component {\n render() {\n const { attrs } = this.props;\n const videoId = attrs.matches[1];\n\n return (\n \n );\n }\n}\n\ninterface DynamicProps {\n debugMode: boolean;\n onChange: (text: string) => void;\n readOnly: boolean;\n text: string;\n}\n\ninterface DynamicState {\n readOnly: boolean;\n template: boolean;\n value: undefined;\n}\n\nexport default class DynamicEditor extends React.Component<\n DynamicProps,\n DynamicState\n> {\n constructor(props: DynamicProps) {\n super(props);\n this.state = {\n readOnly: this.props.readOnly,\n template: false,\n value: undefined,\n };\n }\n\n handleToggleReadOnly = () => {\n this.setState({ readOnly: !this.state.readOnly });\n };\n\n handleChange = debounce((value) => {\n const text = value();\n if (this.props.debugMode) {\n console.log(text);\n }\n this.props.onChange(text);\n }, 50);\n\n render() {\n return (\n {\n if (this.props.debugMode) {\n console.log('Cancel triggered');\n }\n }}\n autoFocus\n onChange={(value) => this.handleChange(value)}\n embeds={[\n {\n title: 'YouTube',\n keywords: 'youtube video tube google',\n icon: () => (\n \n ),\n //@ts-ignore\n matcher: (url) => {\n return url.match(\n /(?:https?:\\/\\/)?(?:www\\.)?youtu\\.?be(?:\\.com)?\\/?.*(?:watch|embed)?(?:.*v=|v\\/|\\/)([a-zA-Z0-9_-]{11})$/i\n );\n },\n component: YouTubeEmbed,\n },\n ]}\n />\n );\n }\n}\n","import React from 'react';\nimport { EditingModes, HtmlClassName } from './AppendEditor';\nimport { MonacoEditor } from './Monaco';\nimport DynamicEditor from './DynamicEditor';\n\nimport { HtmlElementId } from './AppendEditor';\n\ninterface EditProps {\n debugMode: boolean;\n editingMode?: string;\n fontSize: string;\n keyMap: any;\n monacoEditorLanguage: string;\n onKeyDown: Function;\n onKeyUp: Function;\n onKeyDownEditTextArea: Function;\n onKeyDownTextArea: Function;\n saveText: Function;\n text: string;\n viewMode: boolean | undefined;\n}\n\ninterface EditState {\n text: string;\n}\n\nexport default class EditNote extends React.Component {\n static defaultProps = {\n // none\n };\n\n constructor(props: EditProps) {\n super(props);\n\n this.state = {\n text: this.props.text,\n };\n }\n\n handleInputChange = (event: React.ChangeEvent) => {\n const target = event.target;\n const value = target.value;\n\n this.setState(\n {\n text: value,\n },\n () => {\n this.props.saveText(this.state.text);\n }\n );\n };\n\n saveText = (text: string) => {\n this.setState(\n {\n text,\n },\n () => {\n this.props.saveText(this.state.text);\n }\n );\n };\n\n onBlur = (e: React.FocusEvent) => {\n const content = document.getElementById(HtmlElementId.content);\n if (content) {\n content.classList.remove(HtmlClassName.focused);\n }\n };\n\n onFocus = (e: React.FocusEvent) => {\n const content = document.getElementById(HtmlElementId.content);\n if (content) {\n content.classList.add(HtmlClassName.focused);\n }\n };\n\n onKeyDown = (e: React.KeyboardEvent) => {\n this.props.onKeyDown(e);\n this.props.onKeyDownEditTextArea(e);\n this.props.onKeyDownTextArea(e);\n };\n\n onKeyUp = (event: React.KeyboardEvent) => {\n this.props.keyMap.delete(event.key);\n this.props.onKeyUp(event);\n };\n\n render() {\n const { text } = this.state;\n return (\n \n \n {this.props.editingMode === EditingModes.useMonacoEditor ? (\n \n ) : this.props.editingMode === EditingModes.useDynamicEditor ? (\n
\n \n
\n ) : (\n \n )}\n \n \n );\n }\n}\n","import { HtmlElementId } from '../components/AppendEditor';\n\nexport const clickAppendButton = () => {\n const appendButton = document.getElementById(HtmlElementId.appendButton);\n if (appendButton) {\n appendButton.click();\n }\n};\n\nexport const clickEditButton = () => {\n const editButton = document.getElementById(HtmlElementId.editButton);\n if (editButton) {\n editButton.click();\n }\n};\n\nexport const clickHelpButton = () => {\n const helpButton = document.getElementById(HtmlElementId.helpButton);\n if (helpButton) {\n helpButton.click();\n }\n};\n\nexport const clickMenuButton = () => {\n const menuButton = document.getElementById(HtmlElementId.menuButton);\n if (menuButton) {\n menuButton.click();\n }\n};\n\nexport const clickSettingsButton = () => {\n const settingsButton = document.getElementById(HtmlElementId.settingsButton);\n if (settingsButton) {\n settingsButton.click();\n }\n};\n\nexport const clickViewButton = () => {\n const viewButton = document.getElementById(HtmlElementId.viewButton);\n if (viewButton) {\n viewButton.click();\n }\n};\n","import React from 'react';\nimport { GearIcon, HelpIcon, MenuIcon } from './Icons';\nimport {\n clickHelpButton,\n clickMenuButton,\n clickSettingsButton,\n} from '../lib/clickButton';\n\ninterface HelpProps {\n debugMode: boolean;\n printURL: boolean;\n}\n\ninterface HelpState {\n showFeelings: boolean;\n showMoreQuestions: boolean;\n showFeedback: boolean;\n}\n\nexport default class Help extends React.Component {\n constructor(props: HelpProps) {\n super(props);\n\n this.state = {\n showFeelings: false,\n showMoreQuestions: false,\n showFeedback: false,\n };\n }\n\n onToggleShowFeelings = () => {\n this.setState({\n showFeelings: !this.state.showFeelings,\n });\n };\n\n onToggleShowMoreQuestions = () => {\n this.setState({\n showMoreQuestions: !this.state.showMoreQuestions,\n });\n };\n\n onToggleShowFeedback = () => {\n this.setState({\n showFeedback: !this.state.showFeedback,\n });\n };\n\n render() {\n return (\n
\n
\n

Append Editor Help

\n

\n The Append Editor is an unofficial{' '}\n \n editor\n {' '}\n for{' '}\n \n Standard Notes\n \n , a free,{' '}\n \n open-source\n \n , and{' '}\n \n end-to-end encrypted\n {' '}\n notes app. The Append Editor is also free software licensed under{' '}\n \n AGPL-3.0\n \n . Its source code is available on{' '}\n \n GitHub\n \n .\n

\n

Append Editor Features

\n

\n The Append Editor supports{' '}\n \n Markdown\n {' '}\n with{' '}\n \n KaTeX\n \n , syntax highlighting, in-line HTML, table of contents, footnotes,\n auto-linking,{' '}\n \n emoji codes\n \n , and more.{' '}\n

\n

\n There are four editing modes: Plain Textarea, CodeMirror, Dynamic, and\n Monaco. You can read about each mode and choose which to use in the\n Settings\n \n  \n \n  \n \n . You can also choose default and per-note font sizes, font families,\n and custom styles (CSS).\n

\n

\n The Menu\n \n  \n \n  \n \n has additional options to customize the appearance of the editor,\n share your note, and perform actions to quickly format and edit\n Markdown text.\n

\n

\n A more detailed documentation of the Append Editor is available at{' '}\n \n appendeditor.com\n \n . If you like the Append Editor, please support it by giving it a star\n on{' '}\n \n GitHub\n \n .{' '}\n \n 🙂\n {' '}\n

\n

How to install the Append Editor in Standard Notes

\n
    \n
  1. \n Download, install, and sign in to the Standard Notes{' '}\n \n Desktop\n {' '}\n app.\n
  2. \n
  3. \n In the bottom left corner of the app, click Extensions.\n
  4. \n
  5. \n Click Import Extensions and paste the following link into the\n input box. If you want to use the alpha version, replace{' '}\n beta with alpha:{' '}\n \n \n https://raw.githubusercontent.com/TheodoreChu/append-editor/main/public/beta.ext.json\n \n \n
  6. \n
  7. \n Press Enter or Return on your keyboard.\n
  8. \n
  9. \n The title of your selected note is near the top of the app. Under\n the title, click Editor, click Append Editor, and\n click Continue to begin using the editor. Enjoy!{' '}\n \n 👏\n {' '}\n
  10. \n
\n

\n After you install the editor on the desktop app, it will automatically\n sync to the{' '}\n \n web\n {' '}\n and{' '}\n \n mobile apps\n {' '}\n after you sign in.\n

\n

What to write about

\n

\n The Append Editor is great for writing articles, blog posts,\n checklists, code snippets, documentation, emails, essays, journals,\n lists, logs, notes, tables, todo lists, and much more. Here are some\n questions to help you get started with today's daily journal:\n

{' '}\n
    \n
  • How are you? What's happening?
  • \n
  • What might be affecting your mood?
  • \n
  • Which feelings fit your mood and to what extent?
  • \n
    \n \n {!this.state.showFeelings && [\n

    Show feelings

    ,\n ]}\n {this.state.showFeelings && [\n

    Hide feelings

    ,\n ]}\n
    \n
  • \n Positive Feelings: bold, calm, cheerful, confident,\n content, eager, ecstatic, energized, engaged, enthusiastic,\n excited, grateful, happy, humorous, inspired, joyful, light,\n lively, loving, motivated, optimistic, passionate, peaceful,\n playful, proud, reassured, refreshed, relaxed, relieved,\n satisfied, secure, surprised, thrilled, wonderful\n
  • \n
  • \n Negative Feelings: afraid, angry, annoyed, anxious,\n ashamed, bored, burnt out, confused, demoralized, depressed,\n disappointed, disgusted, distraught, embarrassed, empty,\n exhausted, frustrated, furious, guilty, heavy, insecure,\n irritated, jealous, jittery, lethargic, lonely, nervous, numb,\n resentful, sad, self-conscious, sleepy, stressed, tired, winded,\n worried\n
  • \n
    \n
  • What thoughts are contributing to the way you're feeling?
  • \n
    \n \n {!this.state.showMoreQuestions && [\n

    Show more questions

    ,\n ]}\n {this.state.showMoreQuestions && [\n

    Show fewer questions

    ,\n ]}\n
    \n
    \n {this.state.showMoreQuestions && [\n
    \n
  • \n What do you hope your life will look like in a week? a month? a\n year?\n
  • \n
  • \n What can you do today to make your life the way you want it?\n
  • \n
  • \n How will you feel when you've realized the goals that you have\n for yourself?\n
  • \n
  • Who or what do you feel grateful for and why?
  • \n
  • What did you enjoy about today?
  • \n
    ,\n ]}\n
\n
\n \n

Need more help?

\n
\n {this.state.showFeedback && [\n

\n Feel free to{' '}\n \n reach out\n {' '}\n if you have any questions, comments, concerns, or feedback.{' '}\n \n 👋\n \n
\n If you find any bugs or have a feature request, please{' '}\n \n open an issue on GitHub\n \n .{' '}\n \n 🙂\n \n
\n You are using version 1.2.3. The release notes and\n change log are available on{' '}\n \n GitHub\n \n .\n

,\n ]}\n
\n Click Help\n \n  \n \n  \n \n to close this section.\n
\n
\n );\n }\n}\n","import React from 'react';\nimport { EyeIcon, HelpIcon, PencilIcon, PlusIcon } from './Icons';\nimport {\n clickAppendButton,\n clickEditButton,\n clickHelpButton,\n clickViewButton,\n} from '../lib/clickButton';\n\ninterface IntroProps {\n appendMode: boolean;\n editMode: boolean;\n showHelp: boolean;\n}\n\nconst Intro: React.FC = ({ appendMode, editMode, showHelp }) => (\n
\n
\n \n Welcome to the Append Editor!{' '}\n \n 👋\n {' '}\n Your note is empty.{' '}\n \n 🙂\n {' '}\n Click here to get started.{' '}\n \n 📝\n \n \n

To get started:

\n
    \n
  • \n

    \n Click the Pencil\n \n  \n \n  \n \n to toggle Edit Mode\n

    \n
  • \n
  • \n

    \n Click the Plus\n \n  \n \n  \n \n to toggle Append Mode\n

    \n
  • \n
\n

\n View Mode is currently on. When you type in{' '}\n Edit Mode, your note will automatically render here. In{' '}\n Append Mode, clicking Append will add the text in the\n textarea to the end of your note. Click the Eye\n \n  \n \n  \n \n to turn View Mode off and switch to Edit Only Mode.\n

\n

\n If you are using the demo at{' '}\n \n beta.appendeditor.com\n \n , then your notes will be lost after you close the page.\n

\n

\n If you want to save your notes, then click Help\n \n  \n \n  \n \n and follow the instructions on how to install the Append Editor in{' '}\n \n Standard Notes\n \n , a free,{' '}\n \n open-source\n \n , and{' '}\n \n end-to-end encrypted\n {' '}\n notes app.\n

\n

\n If you like Standard Notes, please check out Standard Notes{' '}\n \n Extended\n {' '}\n for more editors, themes, components, and methods to backup up your\n data.\n

\n

\n Happy note-taking!{' '}\n \n 😄\n \n

\n
\n
\n);\n\nexport default Intro;\n","import React, { ReactNode } from 'react';\nimport unified from 'unified';\nimport parse from 'remark-parse';\nimport remark2rehype from 'remark-rehype';\nimport rehype2react from 'rehype-react';\nimport { debounce, throttle } from 'lodash';\n\n// Remark\nconst breaks = require('remark-breaks');\nconst externalLinks = require('remark-external-links');\nconst footnotes = require('remark-footnotes');\nconst gfm = require('remark-gfm');\nconst gemoji = require('remark-gemoji');\nconst math = require('remark-math');\nconst slug = require('remark-slug');\nconst toc = require('remark-toc');\n\n// Rehype\nconst highlight = require('rehype-highlight');\nconst rehypeKatex = require('rehype-katex');\nconst raw = require('rehype-raw');\n\nconst processor = unified()\n .use(parse)\n .use(gfm)\n .use(breaks)\n .use(slug)\n .use(toc, { maxDepth: 6 })\n .use(externalLinks)\n .use(footnotes, { inlineNotes: true })\n .use(gemoji)\n .use(remark2rehype, { allowDangerousHtml: true })\n .use(raw)\n .use(math)\n .use(rehypeKatex)\n .use(highlight, { ignoreMissing: true })\n .use(rehype2react, { createElement: React.createElement });\n\nexport const processMarkdown = (text: string) => {\n const markdown = processor.processSync(text).result as ReactNode;\n return markdown;\n};\n\n/** Throttle instead of debounce because\n * we want it to work even when typing\n * lots of characters in a short amount of time. */\nexport const isLongString = throttle((text: string) => {\n //console.log('length', text.length);\n if (text.length > 10000) {\n return true;\n } else {\n return false;\n }\n}, 1000);\n\n/** Debounce the rendering of long notes to prevent lagging.\n * There is no max on the debounce to prevent lagging\n * even for very, very long notes */\nexport const renderLongMarkdown = debounce((text: string) => {\n //console.log('renderLongMarkdownText');\n const markdown = processMarkdown(text);\n return markdown;\n}, 500);\n\nexport const renderMarkdown = (text: string, bypassDebounce: boolean) => {\n if (bypassDebounce) {\n //console.log('renderBypassDebounceText');\n const markdown = processMarkdown(text);\n return markdown;\n }\n let textIsLong = false as boolean | undefined;\n textIsLong = isLongString(text);\n //console.log('textIsLong', textIsLong);\n if (textIsLong) {\n return renderLongMarkdown(text);\n } else {\n //console.log('renderShortMarkdownText');\n const markdown = processMarkdown(text);\n return markdown;\n }\n};\n","import React from 'react';\nimport { EditingModes, HtmlElementId } from './AppendEditor';\nimport DynamicEditor from './DynamicEditor';\nimport Help from './Help';\nimport Intro from './Intro';\nimport { renderMarkdown } from '../lib/renderMarkdown';\n\ninterface ViewProps {\n appendMode: boolean;\n bypassDebounce: boolean;\n debugMode: boolean;\n editMode: boolean;\n editingMode?: string;\n monacoEditorLanguage: string;\n printURL: boolean;\n saveText: (text: string) => void;\n showHelp: boolean;\n text: string;\n}\n\ninterface ViewState {\n showHelp: boolean;\n}\n\nexport default class ViewNote extends React.Component {\n constructor(props: ViewProps) {\n super(props);\n\n this.state = {\n showHelp: this.props.showHelp,\n };\n }\n\n onToggleShowHelp = () => {\n const helpButton = document.getElementById('helpButton');\n if (helpButton) {\n helpButton.click();\n }\n };\n\n renderMarkdown = (text: string) => {\n const markdown = renderMarkdown(text, this.props.bypassDebounce);\n return markdown;\n };\n\n render() {\n const { text } = this.props;\n return (\n \n
\n {!text && [\n ,\n ]}\n {this.state.showHelp && [\n ,\n ]}\n \n {this.props.editingMode === EditingModes.useMonacoEditor &&\n this.props.monacoEditorLanguage !== 'markdown' &&\n this.props.monacoEditorLanguage !== 'html' &&\n text ? (\n this.renderMarkdown(\n '```' + this.props.monacoEditorLanguage + '\\n' + text + '\\n```'\n )\n ) : this.props.editingMode === EditingModes.useDynamicEditor ? (\n \n ) : (\n this.renderMarkdown(text)\n )}\n
\n \n \n );\n }\n}\n","import React from 'react';\nimport { EditingModes } from './AppendEditor';\nimport DynamicEditor from './DynamicEditor';\nimport { MonacoEditor } from './Monaco';\n\nimport { HtmlElementId } from './AppendEditor';\n\ninterface AppendProps {\n appendNewLine: boolean;\n appendNewParagraph: boolean;\n appendRows: number;\n appendTextToNote: Function;\n editingMode?: string;\n fontSize: string;\n keyMap: Map;\n debugMode: boolean;\n autoSaveAppendText: Function;\n autoSaveCheckBoxes: Function;\n monacoEditorLanguage: string;\n onKeyDown: Function;\n onKeyUp: Function;\n onKeyDownAppendTextArea: Function;\n onKeyDownTextArea: Function;\n text: string;\n}\n\ninterface AppendState {\n text: string;\n newLine: boolean;\n newParagraph: boolean;\n [x: string]: string | boolean;\n}\n\nexport default class AppendText extends React.Component<\n AppendProps,\n AppendState\n> {\n static defaultProps = {\n // none\n };\n\n constructor(props: AppendProps) {\n super(props);\n\n this.state = {\n text: this.props.text,\n newLine: this.props.appendNewLine,\n newParagraph: this.props.appendNewParagraph,\n useMonacoEditor: this.props.editingMode === EditingModes.useMonacoEditor,\n useDynamicEditor:\n this.props.editingMode === EditingModes.useDynamicEditor,\n };\n }\n\n handleInputChange = (event: React.ChangeEvent) => {\n const target = event.target;\n const value = target.type === 'checkbox' ? target.checked : target.value;\n const name = target.name;\n this.setState(\n {\n [name]: value,\n },\n () => {\n // This callback saves the checkboxes\n this.autoSaveCheckBoxes();\n }\n );\n };\n\n // This is an almost duplicate of the above editor. Here we don't save the checkboxes to improve performance\n handleTextAreaChange = (event: any) => {\n const target = event.target;\n const value = target.value;\n this.setState(\n {\n text: value,\n },\n () => {\n // This callback saves the append text\n this.autoSaveAppendText();\n }\n );\n };\n\n saveText = (text: string) => {\n this.setState(\n {\n text,\n },\n () => {\n this.props.autoSaveAppendText(this.state.text);\n }\n );\n };\n\n appendTextToNote = () => {\n this.props.appendTextToNote();\n this.setState({\n text: '',\n });\n const appendTextArea = document.getElementById(\n HtmlElementId.appendTextArea\n );\n if (appendTextArea) {\n appendTextArea.focus();\n }\n // Refresh Monaco Editor after appending text to note\n if (this.state.useMonacoEditor) {\n this.setState(\n {\n useMonacoEditor: false,\n },\n () => {\n this.setState({\n useMonacoEditor: true,\n });\n }\n );\n }\n // Refresh Dynamic Editor after appending text to note\n if (this.state.useDynamicEditor) {\n this.setState(\n {\n useDynamicEditor: false,\n },\n () => {\n this.setState({\n useDynamicEditor: true,\n });\n }\n );\n }\n };\n\n autoSaveAppendText = () => {\n const text = this.state.text;\n this.props.autoSaveAppendText(text);\n };\n\n autoSaveCheckBoxes = () => {\n const newLine = this.state.newLine;\n const newParagraph = this.state.newParagraph;\n this.props.autoSaveCheckBoxes(newLine, newParagraph);\n };\n\n onKeyDown = (e: React.KeyboardEvent) => {\n this.props.keyMap.set(e.key, true);\n if (this.props.debugMode) {\n console.log(\n 'Keys pressed: ' +\n e.key +\n 'KeyMap for key: ' +\n this.props.keyMap.get(e.key)\n );\n console.log('Append Text Value: ' + this.state.text);\n }\n\n this.props.onKeyDown(e);\n this.props.onKeyDownAppendTextArea(e);\n this.props.onKeyDownTextArea(e);\n // Append Text if Ctrl and 'Enter' are pressed\n if (this.props.keyMap.get('Control') && this.props.keyMap.get('Enter')) {\n e.preventDefault();\n this.appendTextToNote();\n }\n // Append Text if Ctrl and 's' are pressed\n else if (this.props.keyMap.get('Control') && this.props.keyMap.get('s')) {\n e.preventDefault();\n this.appendTextToNote();\n }\n };\n\n onKeyUp = (event: React.KeyboardEvent) => {\n this.props.keyMap.delete(event.key);\n this.props.onKeyUp(event);\n };\n\n render() {\n const { text } = this.state;\n\n return (\n \n \n {this.state.useMonacoEditor ? (\n // We use this.state instead of this.props so we can easily refresh it on Append\n \n ) : this.state.useDynamicEditor ? (\n
\n \n
\n ) : (\n \n )}\n \n
\n
\n \n
\n \n
\n
\n \n
Append
\n \n
\n
\n \n );\n }\n}\n","import React from 'react';\nimport {\n ChevronIconDown,\n ChevronIconRight,\n CopyIcon,\n EyeIcon,\n PencilIcon,\n PrintIcon,\n UndoIcon,\n} from './Icons';\n\ninterface ActionButtonTypes {\n caption?: string;\n className?: string;\n fill?: string;\n id?: string;\n title: string;\n onClick: () => void;\n}\n\ninterface ConditionalButtonTypes extends ActionButtonTypes {\n condition?: boolean | undefined;\n messageOn?: string;\n messageOff?: string;\n}\n\nexport const ChevronToggleButton: React.FC = ({\n caption,\n className,\n condition,\n onClick,\n title,\n}) => (\n \n);\n\nexport const CopyButton: React.FC = ({\n caption,\n className,\n fill,\n onClick,\n title,\n}) => (\n \n);\n\nexport const EyeButton: React.FC = ({\n caption,\n className,\n condition,\n messageOn,\n messageOff,\n onClick,\n title,\n}) => (\n \n);\n\nexport const PencilButton: React.FC = ({\n caption,\n className,\n fill,\n onClick,\n title,\n}) => (\n \n);\n\nexport const PrintButton: React.FC = ({\n caption,\n className,\n fill,\n id,\n onClick,\n title,\n}) => (\n \n);\n\nexport const UndoButton: React.FC = ({\n className,\n fill,\n id,\n onClick,\n title,\n}) => (\n \n);\n","import React from 'react';\nimport prettier from 'prettier';\nimport parserMarkdown from 'prettier/parser-markdown';\nimport { EditingModes } from './AppendEditor';\nimport {\n ChevronToggleButton,\n CopyButton,\n EyeButton,\n PencilButton,\n PrintButton,\n} from './Buttons';\n\n// Import types\nimport { HtmlElementId } from './AppendEditor';\n\nenum HtmlClassName {\n chevronToggleButton = 'menu-button chevron-toggle-button',\n menuButton = 'menu-button',\n on = ' on',\n off = ' off',\n}\n\ninterface MenuProps {\n borderlessMode?: boolean;\n editingMode?: string;\n fixedHeightMode?: boolean;\n fullWidthMode?: boolean;\n monacoEditorLanguage: string;\n onConfirmPrintUrl: () => void;\n overflowMode?: boolean;\n refreshEdit: () => void;\n refreshView: () => void;\n saveText: (text: string) => void;\n showMenuOptionsEdit?: boolean;\n //showMenuOptionsMonacoEditor?: boolean;\n showMenuOptionsShare?: boolean;\n showMenuOptionsView?: boolean;\n text: string;\n toggleBorderlessMode: () => void;\n toggleFixedHeightMode: () => void;\n toggleFullWidthMode: () => void;\n toggleOverflowMode: () => void;\n toggleShowMenu: () => void;\n toggleShowMenuOptionsEdit: () => void;\n //toggleShowMenuOptionsMonacoEditor?: () => void;\n toggleShowMenuOptionsView: () => void;\n toggleShowMenuOptionsShare: () => void;\n viewMode?: boolean;\n}\n\ninterface MenuState {\n message?: string;\n displayMessageShare: boolean;\n displayMessageEdit: boolean;\n}\n\nexport default class Menu extends React.Component {\n clearTooltipTimer: NodeJS.Timeout | undefined;\n constructor(props: MenuProps) {\n super(props);\n this.state = {\n message: '',\n displayMessageEdit: false,\n displayMessageShare: false,\n };\n }\n\n resetMessageTimer = () => {\n if (this.clearTooltipTimer) {\n clearTimeout(this.clearTooltipTimer);\n }\n this.clearTooltipTimer = setTimeout(() => {\n this.setState({\n displayMessageEdit: false,\n displayMessageShare: false,\n });\n }, 5000);\n };\n\n showMessageEdit = () => {\n this.setState(\n {\n displayMessageEdit: true,\n displayMessageShare: false,\n },\n () => {\n this.resetMessageTimer();\n }\n );\n };\n showMessageShare = () => {\n this.setState(\n {\n displayMessageEdit: false,\n displayMessageShare: true,\n },\n () => {\n this.resetMessageTimer();\n }\n );\n };\n\n copyToClipboard = (text: string) => {\n const textField = document.createElement('textarea');\n textField.value = text;\n document.body.appendChild(textField);\n textField.select();\n document.execCommand('copy');\n this.showMessageShare();\n textField.remove();\n };\n\n copyText = () => {\n if (this.props.text) {\n this.setState({ message: 'Copied Text to clipboard' }, () => {\n this.copyToClipboard(this.props.text);\n });\n } else {\n this.setState({ message: 'No text to copy. Your note is empty' }, () => {\n this.showMessageShare();\n });\n }\n };\n\n copyHtml = () => {\n if (!this.props.viewMode) {\n this.setState(\n { message: 'Unable to copy HTML. Please turn View Mode on' },\n () => this.showMessageShare()\n );\n } else if (!this.props.text) {\n this.setState({ message: 'No HTML to copy. Your note is empty' }, () => {\n this.showMessageShare();\n });\n } else {\n const renderedNote = document.getElementById('renderedNote');\n if (renderedNote?.firstElementChild?.innerHTML) {\n this.setState({ message: 'Copied HTML to clipboard' });\n this.copyToClipboard(renderedNote?.firstElementChild.innerHTML);\n }\n }\n };\n\n formatText = () => {\n if (\n this.props.monacoEditorLanguage !== 'markdown' &&\n this.props.editingMode === EditingModes.useMonacoEditor\n ) {\n this.setState(\n {\n message:\n 'Error: Your Monaco Editor language is not Markdown. Formatting is only available for Markdown',\n },\n () => {\n this.showMessageEdit();\n }\n );\n } else if (this.props.text) {\n this.setState(\n { message: 'Formatted Markdown text with Prettier' },\n () => {\n try {\n const formattedText = prettier.format(this.props.text, {\n parser: 'markdown',\n plugins: [parserMarkdown],\n });\n this.props.saveText(formattedText);\n this.props.refreshEdit();\n this.props.refreshView();\n this.showMessageEdit();\n } catch (e) {\n this.setState({ message: 'Error formatting text: ' + e }, () => {\n this.showMessageEdit();\n });\n console.log('Error formatting text: ' + e);\n }\n }\n );\n } else {\n this.setState(\n { message: 'No text to format. Your note is empty' },\n () => {\n this.showMessageEdit();\n }\n );\n }\n };\n\n uncheckBoxes = () => {\n const { text } = this.props;\n const checkedBoxes = new RegExp(/- \\[x\\]/gm);\n if (checkedBoxes.test(text)) {\n const newText = text.replace(checkedBoxes, '- [ ]');\n this.props.saveText(newText);\n this.props.refreshEdit();\n this.props.refreshView();\n this.setState({ message: 'Unchecked all checkboxes' }, () => {\n this.showMessageEdit();\n });\n } else {\n this.setState({ message: 'No checked checkboxes found' }, () => {\n this.showMessageEdit();\n });\n }\n };\n\n render() {\n // You can render any custom fallback UI\n return [\n
,\n
\n \n {this.props.showMenuOptionsView && [\n ,\n ,\n ,\n ,\n ]}\n \n {this.props.showMenuOptionsShare && [\n ,\n ,\n ,\n \n

\n {this.state.message}\n

\n
,\n ]}\n \n {this.props.showMenuOptionsEdit && [\n ,\n ,\n \n

\n {this.state.message}\n

\n
,\n ]}\n
\n ,\n ];\n }\n}\n","import React from 'react';\nimport { MonacoEditor } from './Monaco';\nimport {\n DefaultSettings,\n EditingModes,\n SaveSettingsInterface,\n} from './AppendEditor';\nimport { CloseIcon, RefreshIcon } from './Icons';\nimport { ChevronToggleButton, UndoButton } from './Buttons';\n\nconst customStylesID = 'customStyles';\nconst editingModeID = 'editingMode';\nconst fontEditID = 'fontEdit';\nconst fontSizeID = 'fontSize';\nconst fontViewID = 'fontView';\nconst monacoEditorLanguageID = 'monacoEditorLanguage';\nconst resetAllSettingsID = 'resetAllSettings';\nconst saveAsDefaultID = 'saveAsDefault';\n\ninterface SettingsProps {\n defaultSettings: DefaultSettings;\n customStyles: string;\n editingMode?: string;\n fontEdit: string;\n fontSize: string;\n fontView: string;\n monacoEditorLanguage: string;\n cancelText: string;\n confirmText: string;\n debugMode: boolean;\n keyMap: Map;\n onCancel: () => void;\n onConfirm: (object: SaveSettingsInterface) => void;\n title: string;\n helpLink: string;\n}\n\ninterface SettingsState {\n customStyles: string;\n editingMode: string;\n fontEdit: string;\n fontSize: string;\n fontView: string;\n monacoEditorLanguage: string;\n saveAsDefault: boolean;\n showCustomStyles: boolean;\n [x: string]: string | boolean;\n}\n\nconst startRegExp = new RegExp(/```css\\n/gm);\nconst cssRegExp = new RegExp(/```css/gm);\nconst endRegExp = new RegExp(/\\n```/gm);\nconst codeRegExp = new RegExp(/```/gm);\n\nexport default class Settings extends React.Component<\n SettingsProps,\n SettingsState\n> {\n constructor(props: SettingsProps) {\n super(props);\n let monacoEditorLanguage = 'markdown';\n if (this.props.monacoEditorLanguage) {\n monacoEditorLanguage = this.props.monacoEditorLanguage;\n }\n let editingMode = 'usePlainText';\n if (this.props.editingMode) {\n editingMode = this.props.editingMode;\n }\n this.state = {\n customStyles: this.props.customStyles,\n editingMode,\n fontEdit: this.props.fontEdit,\n fontSize: this.props.fontSize,\n fontView: this.props.fontView,\n monacoEditorLanguage,\n saveAsDefault: false,\n showCustomStyles: false, // false by default for a mobile-first experience\n };\n }\n\n handleInputChange = (event: React.ChangeEvent) => {\n const target = event.target;\n const value = target.type === 'checkbox' ? target.checked : target.value;\n const name = target.name;\n this.setState({\n [name]: value,\n });\n if (this.props.debugMode) {\n console.log(\n 'Settings event name: ' +\n event.target.name +\n ' Value: ' +\n event.target.value\n );\n }\n };\n\n handleSelectChange = (event: React.ChangeEvent) => {\n const target = event.target;\n const value = target.value;\n const name = target.name;\n this.setState(\n {\n [name]: value,\n },\n () => {\n if (this.props.debugMode) {\n console.log(\n 'Saved select. Name: ' +\n event.target.name +\n ' Value: ' +\n event.target.value\n );\n }\n }\n );\n };\n\n toggleShowCustomStyles = () => {\n this.setState({\n showCustomStyles: !this.state.showCustomStyles,\n });\n };\n\n cleanCustomStyles = (text: string) => {\n if (text) {\n return text\n .replace(startRegExp, '')\n .replace(cssRegExp, '')\n .replace(endRegExp, '')\n .replace(codeRegExp, '');\n } else {\n return text;\n }\n };\n\n saveText = (text: string) => {\n this.setState({\n customStyles: text,\n });\n };\n\n handleSubmit = () => {\n if (this.props.debugMode) {\n let fontEditMessage = '';\n let fontViewMessage = '';\n if (this.state.fontEdit === '' || this.state.fontEdit === undefined) {\n fontEditMessage = 'Default';\n } else if (this.state.fontEdit) {\n fontEditMessage = this.state.fontEdit;\n }\n if (this.state.fontView === '' || this.state.fontView === undefined) {\n fontViewMessage = 'Default';\n } else if (this.state.fontView) {\n fontViewMessage = this.state.fontView;\n }\n console.log(\n 'Settings.tsx handleSubmit() triggered: ' +\n '\\n - Settings editingMode: ' +\n this.state.editingMode +\n '\\n - Settings fontEdit: ' +\n this.state.fontEdit +\n '\\n - Settings fontView: ' +\n this.state.fontView +\n '\\n - Your chosen font for Edit/Append is: ' +\n fontEditMessage +\n '\\n - Your chosen font for View/Print is: ' +\n fontViewMessage +\n '\\n'\n );\n }\n this.setState(\n {\n // clean the custom styles prior to saving them\n customStyles: this.cleanCustomStyles(this.state.customStyles),\n },\n () => {\n if (this.props.debugMode) {\n console.log('Your custom styles: ' + this.state.customStyles);\n }\n const {\n customStyles,\n editingMode,\n fontEdit,\n fontSize,\n fontView,\n monacoEditorLanguage,\n saveAsDefault,\n } = this.state;\n this.props.onConfirm({\n customStyles,\n editingMode,\n fontEdit,\n fontSize,\n fontView,\n monacoEditorLanguage,\n saveAsDefault,\n });\n }\n );\n };\n\n loadDefaultSettings = () => {\n const defaultSettings = this.props.defaultSettings;\n this.setState(\n {\n ...defaultSettings,\n },\n () => {\n this.refreshCustomStyles();\n }\n );\n };\n\n refreshCustomStyles = () => {\n this.setState(\n {\n showCustomStyles: !this.state.showCustomStyles,\n },\n () => {\n this.setState({\n showCustomStyles: !this.state.showCustomStyles,\n });\n }\n );\n };\n\n clearCustomStyles = () => {\n this.setState(\n {\n customStyles: '',\n },\n () => {\n this.refreshCustomStyles();\n if (this.props.debugMode) {\n console.log('customStyles reset: ' + this.state.customStyles);\n }\n }\n );\n const customStyles = document.getElementById(\n customStylesID\n ) as HTMLTextAreaElement;\n if (customStyles) {\n customStyles.value = '';\n customStyles.focus();\n }\n };\n\n clearFontEdit = () => {\n this.setState({\n fontEdit: '',\n });\n const fontEdit = document.getElementById(fontEditID) as HTMLTextAreaElement;\n if (fontEdit) {\n fontEdit.value = '';\n fontEdit.focus();\n }\n };\n\n clearFontSize = () => {\n this.setState({\n fontSize: '',\n });\n const fontSize = document.getElementById(fontSizeID) as HTMLSelectElement;\n if (fontSize) {\n fontSize.value = '';\n fontSize.focus();\n }\n };\n\n clearFontView = () => {\n this.setState({\n fontView: '',\n });\n const fontView = document.getElementById(fontViewID) as HTMLTextAreaElement;\n if (fontView) {\n fontView.value = '';\n fontView.focus();\n }\n };\n\n clearEditingMode = () => {\n this.setState({\n editingMode: EditingModes.usePlainText,\n });\n };\n\n clearMonacoEditorLanguage = () => {\n this.setState({\n monacoEditorLanguage: 'markdown',\n });\n const monacoEditorLanguage = document.getElementById(\n monacoEditorLanguageID\n ) as HTMLSelectElement;\n if (monacoEditorLanguage) {\n monacoEditorLanguage.value = 'markdown';\n monacoEditorLanguage.focus();\n }\n };\n\n clearSaveAsDefault = () => {\n this.setState({\n saveAsDefault: false,\n });\n const saveAsDefault = document.getElementById(\n saveAsDefaultID\n ) as HTMLInputElement;\n saveAsDefault.checked = false;\n saveAsDefault.focus();\n };\n\n clearAllSettings = () => {\n // We clear from bottom settings to top settings so the focus afterwards is on top\n this.clearSaveAsDefault();\n this.clearCustomStyles();\n this.clearFontView();\n this.clearFontEdit();\n this.clearFontSize();\n this.clearMonacoEditorLanguage();\n this.clearEditingMode();\n const resetAllSettings = document.getElementById(resetAllSettingsID);\n if (resetAllSettings) {\n resetAllSettings.focus();\n }\n };\n\n onKeyDown = (e: React.KeyboardEvent) => {\n this.props.keyMap.set(e.key, true);\n //console.log(\"Keys pressed: \" + e.key + \"KeyMap for key: \" + keyMap.get(e.key)) + \"KeyMap for Shift: \" + keyMap.get('Shift');\n // Save settings if Control and 's' are pressed\n if (this.props.keyMap.get('Control') && this.props.keyMap.get('s')) {\n e.preventDefault();\n this.handleSubmit();\n }\n // Save settings if Control and Enter are pressed\n else if (\n this.props.keyMap.get('Control') &&\n this.props.keyMap.get('Enter')\n ) {\n e.preventDefault();\n this.handleSubmit();\n }\n };\n\n onKeyUp = (e: React.KeyboardEvent) => {\n this.props.keyMap.set(e.key, false);\n };\n\n onBlur = (e: React.FocusEvent) => {\n this.props.keyMap.clear();\n };\n\n componentWillUnmount = () => {\n this.props.keyMap.clear();\n };\n\n render() {\n //

\n const { title, onCancel, confirmText, cancelText, helpLink } = this.props;\n return (\n
\n
\n
\n \n \n \n
\n

{title}

\n \n
\n
\n
\n

\n Need help? Check out the{' '}\n \n documentation\n \n . To clear all settings, click undo: \n

\n \n
\n
\n
\n
\n

To load your personal default settings, click: 

\n \n \n \n
\n
\n
\n
\n

Editing Mode:

\n \n
\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n {this.state.editingMode === EditingModes.useMonacoEditor && [\n
\n \n
\n \n \n
\n
,\n ]}\n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n {this.state.editingMode !== EditingModes.useMonacoEditor && [\n
\n \n
\n \n \n
\n
,\n ]}\n {this.state.editingMode !== EditingModes.useDynamicEditor && [\n
\n \n
\n \n \n
\n
,\n ]}\n
\n \n {this.state.showCustomStyles && [\n ,\n ]}\n
\n {this.state.showCustomStyles && [\n
\n \n
,\n ]}\n
\n \n
\n \n \n
\n
\n
\n
\n
\n
\n \n \n
\n
\n
\n );\n }\n}\n","import React, { ErrorInfo } from 'react';\nimport { GearIcon } from './Icons';\nimport { clickSettingsButton } from '../lib/clickButton';\n\ninterface ErrorBoundaryState {\n hasError: boolean;\n error?: Error;\n errorInfo?: ErrorInfo;\n}\n\n/**\n * Learn more about Error Boundaries here:\n * https://reactjs.org/docs/error-boundaries.html\n */\n\nexport default class ErrorBoundary extends React.Component<\n any,\n ErrorBoundaryState\n> {\n constructor(props: any) {\n super(props);\n this.state = { hasError: false };\n }\n\n static getDerivedStateFromError(error: Error) {\n // Update state so the next render will show the fallback UI.\n return { hasError: true };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n // You can also log the error to an error reporting service\n console.log('Error:', error, '\\nError Info:', errorInfo);\n this.setState({\n error,\n errorInfo,\n });\n }\n\n render() {\n if (this.state.hasError) {\n // You can render any custom fallback UI\n return (\n
\n
\n
\n

Something went wrong.

\n

\n Error Name: {this.state.error?.name}\n

\n

\n Error Message: {this.state.error?.message}\n

\n

Please see the developer console for details.

\n
\n

\n Errors such as TypeError and{' '}\n Cannot read property 'type' of undefined usually\n occur when the editor is unable to process and render your notes\n because it contains incorrect or incomplete HTML. If you are\n writing in HTML, then please continue to write and refresh the\n View Mode when the HTML tags are closed.\n

\n

\n If you are using the Dynamic editing mode, then please switch to\n the Plain Textarea or Monaco editing modes in the Settings\n \n  \n \n  \n \n and remove or fix the text that is causing the error.\n

\n

\n If the error persists or is not related to the content of your\n note, then please{' '}\n \n report the issue on GitHub\n {' '}\n and we will try to fix it.{' '}\n \n 🙂\n \n

\n
\n
\n
\n );\n }\n\n return this.props.children;\n }\n}\n","import React from 'react';\nimport { EditorKit, EditorKitDelegate } from 'sn-editor-kit';\nimport PrintDialog from './PrintDialog';\nimport EditNote from './EditNote';\nimport ViewNote from './ViewNote';\nimport AppendText from './AppendText';\nimport Settings from './Settings';\nimport { MonacoDiffEditor } from './Monaco';\nimport ErrorBoundary from './ErrorBoundary';\nimport Menu from './Menu';\n\nimport CodeMirror, { Editor } from 'codemirror';\nimport 'codemirror/lib/codemirror';\nimport 'codemirror/mode/gfm/gfm';\n\n// CodeMirror addons\n\n// For markdown\nimport 'codemirror/addon/edit/continuelist';\n\n// For search\nimport 'codemirror/addon/search/jump-to-line';\nimport 'codemirror/addon/search/match-highlighter';\nimport 'codemirror/addon/search/matchesonscrollbar';\nimport 'codemirror/addon/search/search';\nimport 'codemirror/addon/search/searchcursor';\nimport 'codemirror/addon/dialog/dialog';\n\n// For styling selected text\nimport 'codemirror/addon/selection/mark-selection';\nimport {\n EyeIcon,\n GearIcon,\n HelpIcon,\n MenuIcon,\n PencilIcon,\n PlusIcon,\n} from './Icons';\n\nimport { isLongString, renderLongMarkdown } from '../lib/renderMarkdown';\n\nexport enum HtmlElementId {\n appendButton = 'appendButton',\n appendTextArea = 'appendTextArea',\n appendix = 'appendix',\n content = 'content',\n edit = 'edit',\n editButton = 'editButton',\n editTextArea = 'editTextArea',\n header = 'header',\n helpButton = 'helpButton',\n menuButton = 'menuButton',\n newLine = 'newLine',\n newParagraph = 'newParagraph',\n printButton = 'printButton',\n settingsButton = 'settingsButton',\n view = 'view',\n viewButton = 'viewButton',\n}\n\nexport enum HtmlClassName {\n fixed = 'fixed',\n fixedHeader = 'fixed-header',\n focused = 'focused',\n}\n\nexport enum EditingModes {\n usePlainText = 'usePlainText',\n useCodeMirror = 'useCodeMirror',\n useDynamicEditor = 'useDynamicEditor',\n useMonacoEditor = 'useMonacoEditor',\n}\n\nexport type DefaultSettings = {\n customStyles: string;\n editingMode: string;\n fontEdit: string;\n fontSize: string;\n fontView: string;\n monacoEditorLanguage: string;\n};\n\nexport interface SaveSettingsInterface extends DefaultSettings {\n saveAsDefault: boolean;\n}\n\nexport type menuOptions = {\n borderlessMode?: boolean;\n fixedHeightMode?: boolean;\n fullWidthMode?: boolean;\n overflowMode?: boolean;\n showMenuOptionsEdit?: boolean;\n showMenuOptionsShare?: boolean;\n showMenuOptionsView?: boolean;\n};\n\nexport interface AppendInterface {\n text: string;\n appendCodeMirror?: any;\n appendNewLine: boolean;\n appendNewParagraph: boolean;\n appendMode: boolean;\n appendRows: number;\n appendText: string;\n borderlessMode?: boolean;\n bypassDebounce: boolean;\n confirmPrintUrl: boolean;\n currentState?: object;\n customStyles: string;\n defaultSettings: DefaultSettings;\n editMode?: any;\n editingMode?: string;\n editCodeMirror?: any;\n fontEdit: string;\n fontSize: string;\n fontView: string;\n fixedHeightMode?: boolean;\n fullWidthMode?: boolean;\n overflowMode?: boolean;\n keyMap?: Object;\n monacoEditorLanguage: string;\n printURL: boolean;\n refreshEdit: boolean;\n refreshView: boolean;\n saveAsDefault?: boolean;\n savingEditorOptions?: boolean;\n showAppendix: boolean;\n showDiff: boolean;\n showHeader: boolean;\n showHelp: boolean;\n showMenu?: boolean;\n showMenuOptionsEdit?: boolean;\n showMenuOptionsShare?: boolean;\n showMenuOptionsView?: boolean;\n settingsMode: boolean;\n viewMode?: boolean;\n}\n\n/**\n * Some properties are optional so\n * they do not need to be set\n * when switching between notes.\n */\n\nconst initialState = {\n text: '',\n appendNewLine: false,\n appendNewParagraph: false,\n appendMode: false,\n appendRows: 8,\n appendText: '',\n bypassDebounce: false, // We keep this as false in initialState so debounce works in the demo\n confirmPrintUrl: false,\n customStyles: '',\n defaultSettings: {\n customStyles: '',\n editingMode: 'usePlainText',\n fontEdit: '',\n fontSize: '',\n fontView: '',\n monacoEditorLanguage: 'markdown',\n },\n fontEdit: '',\n fontSize: '',\n fontView: '',\n monacoEditorLanguage: 'markdown',\n printURL: true,\n refreshEdit: false,\n refreshView: false,\n showAppendix: true,\n showHeader: true,\n showHelp: false,\n showDiff: false,\n settingsMode: false,\n};\n\nlet last_known_scroll_position = 0;\n\nconst debugMode = false;\n\nlet keyMap = new Map();\n\nexport default class AppendEditor extends React.Component<{}, AppendInterface> {\n editorKit: any;\n refreshEditorTimer: NodeJS.Timeout | undefined;\n saveTimer: NodeJS.Timeout | undefined;\n\n constructor(props: AppendInterface) {\n super(props);\n this.configureEditorKit();\n this.state = initialState;\n }\n\n /**\n * This loads the first time the editor is loaded\n * This does not load every time a new note is loaded */\n componentDidMount = () => {\n if (debugMode) {\n console.log('AppendEditor.tsx: \\n - this.componentDidMount() triggered');\n }\n this.onViewMode();\n this.loadDefaultMenuState();\n document.addEventListener('scroll', this.onScroll);\n };\n\n componentWillUnmount = () => {\n document.removeEventListener('scroll', this.onScroll);\n };\n\n configureEditorKit = () => {\n if (debugMode) {\n console.log('AppendEditor.tsx: \\n - this.configureEditorKit() triggered');\n }\n let delegate = new EditorKitDelegate({\n /** This loads every time a different note is loaded\n * We turn bypassDebounce to true so\n * the editor always renders the markdown for the latest note\n */\n setEditorRawText: (text: string) => {\n this.setState(\n {\n ...initialState,\n bypassDebounce: true,\n text,\n },\n () => {\n if (debugMode) {\n console.log(\n '#################################################################################\\n' +\n 'AppendEditor.tsx:',\n '\\n - loaded text:',\n text +\n '\\n - this.configureEditorKit() callback triggered:' +\n '\\n - this.state.savingsDefaultSettings: ' +\n this.state.savingEditorOptions +\n '\\n - this.state: ' +\n JSON.stringify(this.state, null, ' ')\n );\n }\n /** Clear the debounce from the previous note and componentDidMount\n * Then call and flush the debounce so the correct markdown will render\n * the first time after turning the bypass off */\n isLongString.cancel();\n isLongString(text);\n isLongString.flush();\n renderLongMarkdown.cancel();\n if (isLongString(text)) {\n renderLongMarkdown(text);\n renderLongMarkdown.flush();\n }\n /** This prevents metadata from loading when saving editor options or default settings */\n if (!this.state.savingEditorOptions) {\n this.loadEditorOptions();\n this.loadDefaultSettings();\n this.loadMetaData();\n }\n /** Turn the debounce bypass off\n * This loads every time, even when saving editor options or default settings\n * because bypassDebounce is set to true every time\n */\n setTimeout(() => {\n this.setState({\n bypassDebounce: false,\n });\n }, 1000);\n }\n );\n },\n clearUndoHistory: () => {},\n getElementsBySelector: () => [],\n });\n\n this.editorKit = new EditorKit({\n delegate: delegate,\n mode: 'plaintext',\n supportsFilesafe: false,\n });\n };\n\n /** Expect this to run three times when loading a note:\n * once when loading editor options,\n * once when loading default settings, and\n * once when loading meta data\n * Use the timer to prevent the function from being executed when it is called\n * repeatedly, as when loading a note or saving a menu option */\n refreshEditor = () => {\n if (isLongString(this.state.text)) {\n if (this.refreshEditorTimer) {\n clearTimeout(this.refreshEditorTimer);\n }\n this.refreshEditorTimer = setTimeout(() => {\n if (!this.state.savingEditorOptions) {\n this.refreshEdit();\n this.refreshView();\n this.activateStyles();\n }\n }, 20);\n } else {\n if (this.refreshEditorTimer) {\n clearTimeout(this.refreshEditorTimer);\n }\n this.refreshEditorTimer = setTimeout(() => {\n if (!this.state.savingEditorOptions) {\n this.refreshEdit();\n this.refreshView();\n this.activateStyles();\n }\n }, 10);\n }\n };\n\n loadDefaultSettings = () => {\n try {\n const defaultSettingsString = this.editorKit.internal.componentRelay.getComponentDataValueForKey(\n 'defaultSettings'\n );\n const defaultEditingMode = this.editorKit.internal.componentRelay.getComponentDataValueForKey(\n 'editingMode'\n );\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n loadDefaultSetting() default settings loaded: ' +\n '\\n - defaultSettingsString: ' +\n defaultSettingsString,\n '\\n - typeof:',\n typeof defaultSettingsString,\n '\\n - defaultEditingMode:',\n defaultEditingMode,\n '\\n - typeof:',\n typeof defaultEditingMode\n );\n }\n if (defaultSettingsString !== undefined) {\n const defaultSettingsObject = JSON.parse(\n defaultSettingsString\n ) as DefaultSettings;\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n loadDefaultSetting():',\n 'if (defaultSettingsString !== undefined) triggered',\n '\\n - typeof defaultSettings:',\n typeof defaultSettingsObject\n );\n }\n this.setState(\n {\n customStyles: defaultSettingsObject.customStyles,\n editingMode: defaultSettingsObject.editingMode,\n fontEdit: defaultSettingsObject.fontEdit,\n fontSize: defaultSettingsObject.fontSize,\n fontView: defaultSettingsObject.fontView,\n monacoEditorLanguage: defaultSettingsObject.monacoEditorLanguage,\n defaultSettings: defaultSettingsObject,\n },\n () => {\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n - loadDefaultSettings() this.state.savingEditorOptions: ' +\n this.state.savingEditorOptions +\n '\\n defaultSettingsObject:',\n defaultSettingsObject,\n '\\n JSON.stringify(this.state.defaultSettings):',\n JSON.stringify(this.state.defaultSettings, null, ' ')\n );\n }\n this.refreshEditor();\n }\n );\n } else if (defaultEditingMode !== undefined) {\n /** This else if loads legacy default settings introduced in v1.1.0\n * We only need to check defaultEditingMode because it is never empty if it is defined\n * */\n const defaultCustomStyles = this.editorKit.internal.componentRelay.getComponentDataValueForKey(\n 'customStyles'\n );\n const defaultFontEdit = this.editorKit.internal.componentRelay.getComponentDataValueForKey(\n 'fontEdit'\n );\n const defaultFontSize = this.editorKit.internal.componentRelay.getComponentDataValueForKey(\n 'fontSize'\n );\n const defaultFontView = this.editorKit.internal.componentRelay.getComponentDataValueForKey(\n 'fontView'\n );\n const defaultMonacoEditorLanguage = this.editorKit.internal.componentRelay.getComponentDataValueForKey(\n 'monacoEditorLanguage'\n );\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n loadDefaultSetting():',\n 'else if (defaultEditingMode !== undefined) triggered',\n '\\n - default customStyles: ' + defaultCustomStyles,\n '\\n - typeof:',\n typeof defaultCustomStyles +\n '\\n - default fontSize: ' +\n defaultFontSize +\n '\\n - default fontEdit: ' +\n defaultFontEdit +\n '\\n - default fontView: ' +\n defaultFontView +\n '\\n - default monacoEditorLanguage: ' +\n defaultMonacoEditorLanguage\n );\n }\n this.setState(\n {\n customStyles: defaultCustomStyles,\n editingMode: defaultEditingMode,\n fontEdit: defaultFontEdit,\n fontSize: defaultFontSize,\n fontView: defaultFontView,\n monacoEditorLanguage: defaultMonacoEditorLanguage,\n defaultSettings: {\n customStyles: defaultCustomStyles,\n editingMode: defaultEditingMode,\n fontEdit: defaultFontEdit,\n fontSize: defaultFontSize,\n fontView: defaultFontView,\n monacoEditorLanguage: defaultMonacoEditorLanguage,\n },\n },\n () => {\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n - loadDefaultSettings() this.state.savingEditorOptions: ' +\n this.state.savingEditorOptions\n );\n }\n this.refreshEditor();\n }\n );\n } else {\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: loadDefaultSettings(), else, current state:',\n JSON.stringify(this.state, null, ' ')\n );\n }\n this.refreshEditor();\n }\n } catch (error) {\n // Log outside debug mode\n console.log('Error loading default settings:', error);\n }\n };\n\n loadEditorOptions = () => {\n try {\n const menuOptionsString = this.editorKit.internal.componentRelay.getComponentDataValueForKey(\n 'menuOptions'\n );\n if (menuOptionsString !== undefined) {\n const menuOptionsObject = JSON.parse(menuOptionsString) as menuOptions;\n this.setState(\n {\n borderlessMode: menuOptionsObject.borderlessMode,\n fixedHeightMode: menuOptionsObject.fixedHeightMode,\n fullWidthMode: menuOptionsObject.fullWidthMode,\n overflowMode: menuOptionsObject.overflowMode,\n //showMenuOptionsEdit: menuOptionsObject.showMenuOptionsEdit,\n //showMenuOptionsShare: menuOptionsObject.showMenuOptionsShare,\n //showMenuOptionsView: menuOptionsObject.showMenuOptionsView,\n },\n () => {\n this.refreshEditor();\n }\n );\n }\n } catch (error) {\n // Log outside debug mode\n console.log('Error loading editor options:', error);\n }\n };\n\n // This loads the Settings and Append Text\n loadMetaData = () => {\n this.editorKit.internal.componentRelay.streamContextItem((note: any) => {\n // Load editor settings\n if (\n note.content.appendEditorCustomStyles ||\n note.content.appendEditorEditingMode ||\n note.content.appendEditorFontEdit ||\n note.content.appendEditorFontSize ||\n note.content.appendEditorFontView ||\n note.content.appendEditorMonacoEditorLanguage\n ) {\n this.setState(\n {\n customStyles: note.content.appendEditorCustomStyles,\n editingMode: note.content.appendEditorEditingMode,\n fontEdit: note.content.appendEditorFontEdit,\n fontSize: note.content.appendEditorFontSize,\n fontView: note.content.appendEditorFontView,\n monacoEditorLanguage: note.content.appendEditorMonacoEditorLanguage,\n },\n () => {\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n - loadMetaData() this.state.savingEditorOptions: ' +\n this.state.savingEditorOptions\n );\n }\n this.refreshEditor();\n if (debugMode) {\n console.log(\n 'editorKit metadata loaded: ' +\n '\\n - loaded customStyles: ' +\n this.state.customStyles +\n '\\n - loaded editingMode: ' +\n this.state.editingMode +\n '\\n - loaded fontEdit: ' +\n this.state.fontEdit +\n '\\n - loaded fontSize: ' +\n this.state.fontSize +\n '\\n - loaded fontView: ' +\n this.state.fontView +\n '\\n - loaded monacoEditorLanguage: ' +\n this.state.monacoEditorLanguage\n );\n }\n }\n );\n }\n // Load append settings\n if (note.content.appendNewLine || note.content.appendNewParagraph) {\n this.setState({\n appendNewLine: note.content.appendNewLine,\n appendNewParagraph: note.content.appendNewParagraph,\n });\n }\n // Finally, load appendText\n this.setState(\n {\n appendText: note.content.appendText,\n },\n () => {\n /**If both text and appendText are empty,\n * such as when creating a new note,\n * and editMode is off,\n * then open the edit mode\n */\n if (\n !this.state.text &&\n !this.state.appendText &&\n !this.state.editMode\n ) {\n this.onEditMode();\n }\n }\n );\n if (debugMode) {\n console.log(\n ' - loaded append text: ' +\n this.state.appendText +\n '\\n - loaded append newline: ' +\n this.state.appendNewLine +\n '\\n - loaded append new paragraph: ' +\n this.state.appendNewParagraph +\n '\\n - loaded editorKit internal appendText: ' +\n this.editorKit.internal.note.content.appendText\n );\n }\n });\n };\n\n saveText = (text: string) => {\n this.saveNote(text);\n this.setState(\n {\n text: text,\n },\n () => {\n if (this.state.editingMode === EditingModes.useDynamicEditor) {\n this.refreshView();\n } else if (this.state.viewMode && isLongString(text)) {\n /** If the note text is long, then rendering its markdown will debounce\n * If the we stop editing for 550 milliseconds, then\n * automatically refresh the view to force the latest markdown to render\n * We use 550 because the debounce is 500.\n */\n if (this.saveTimer) {\n clearTimeout(this.saveTimer);\n }\n this.saveTimer = setTimeout(() => {\n if (this.state.fixedHeightMode) {\n /** This keeps the vertical scroll when refreshing view */\n const view = document.getElementById(HtmlElementId.view);\n if (view) {\n let scrollY = view.scrollTop;\n this.refreshView();\n /** We have to find the new view because\n * the previous one doesn't exist anymore */\n const refreshedView = document.getElementById(\n HtmlElementId.view\n );\n if (refreshedView) {\n refreshedView.scrollTop = scrollY;\n }\n } else {\n this.refreshView();\n }\n } else {\n this.refreshView();\n }\n }, 550);\n }\n if (debugMode) {\n console.log('AppendEditor.tsx: saved text:', this.state.text);\n }\n }\n );\n };\n\n saveNote = (text: string) => {\n // This will work in an SN context, but breaks the standalone editor, so we need to catch the error\n try {\n this.editorKit.onEditorValueChanged(text);\n } catch (error) {\n // Log outside debug mode\n console.log('Error saving note:', error);\n }\n };\n\n // Entry operations\n\n appendTextToNote = () => {\n // Do nothing if there's no append text\n if (this.state.appendText) {\n /*\n * We usually use this.editText() to save the main text\n * However, we want to save the main text and clear the appendText\n * Consecutive calls to the component manager does not work well,\n * so we want to do both with one call to the component manager\n * This means we need multiple versions of this function depending on what we want to save */\n const { appendText } = this.state;\n let textToAppend = '';\n // We test for new paragraph first even though new line is on top and is on by default\n if (this.state.appendNewParagraph) {\n textToAppend = ' \\n\\n' + appendText;\n } else if (this.state.appendNewLine) {\n textToAppend = ' \\n' + appendText;\n } else {\n textToAppend = appendText;\n }\n this.setState(\n {\n text: this.state.text.concat(textToAppend),\n appendText: '',\n },\n () => {\n let note = this.editorKit.internal.note;\n if (note) {\n this.editorKit.internal.componentRelay.saveItemWithPresave(\n note,\n () => {\n note.content.text = this.state.text; // this.editorKit.internal.note.content.text\n note.content.appendText = this.state.appendText; // this.editorKit.internal.note.content.appendText\n }\n );\n }\n this.refreshEdit();\n // Refresh view mode if using dynamic\n if (this.state.editingMode === EditingModes.useDynamicEditor) {\n this.refreshView();\n setTimeout(() => {\n this.skipToBottom();\n }, 50);\n } else if (isLongString(this.state.text)) {\n setTimeout(() => {\n this.refreshView();\n this.skipToBottom();\n }, 550);\n } else {\n this.skipToBottom();\n }\n }\n );\n }\n // Refresh appendCodeMirror\n if (\n this.state.appendCodeMirror &&\n this.state.editingMode === EditingModes.useCodeMirror\n ) {\n this.state.appendCodeMirror.setValue('');\n }\n };\n\n autoSaveAppendText = (text: string) => {\n // This code is similar to this.onAppend();, but we only save the appendText and not the main text\n this.setState({\n appendText: text,\n });\n // This will work in an SN context, but breaks the standalone editor, so we need to catch the error\n try {\n let note = this.editorKit.internal.note;\n if (note) {\n this.editorKit.internal.componentRelay.saveItemWithPresave(note, () => {\n note.content.appendText = text;\n });\n }\n } catch (error) {\n // Log outside debug mode\n console.log('Error saving appendText:', error);\n }\n };\n\n autoSaveCheckBoxes = (newLine: boolean, newParagraph: boolean) => {\n // Here we save the appendText, appendNewLine, and appendNewParagraph\n // We have an additional function for this because we only call it when the user clicks a checkbox\n this.setState({\n appendNewLine: newLine,\n appendNewParagraph: newParagraph,\n });\n // This will work in an SN context, but breaks the standalone editor, so we need to catch the error\n try {\n let note = this.editorKit.internal.note;\n if (note) {\n this.editorKit.internal.componentRelay.saveItemWithPresave(note, () => {\n note.content.appendNewLine = newLine;\n note.content.appendNewParagraph = newParagraph;\n });\n }\n } catch (error) {\n // Log outside debug mode\n console.log('Error saving checkboxes:', error);\n }\n };\n\n refreshEdit = () => {\n this.setState(\n {\n refreshEdit: !this.state.refreshEdit,\n },\n () => {\n // We could also check for this.state.editMode,\n // but it might not be loaded yet.\n // Checking for editTextArea checks whether editMode has loaded\n const editTextArea = document.getElementById(\n HtmlElementId.editTextArea\n );\n if (\n editTextArea &&\n this.state.editingMode === EditingModes.useCodeMirror\n ) {\n this.configureCodeMirror(HtmlElementId.editTextArea);\n }\n }\n );\n };\n\n refreshView = () => {\n this.setState({\n refreshView: !this.state.refreshView,\n });\n };\n\n configureCodeMirror = (id: string) => {\n if (id === HtmlElementId.editTextArea) {\n if (debugMode) {\n console.log('this.state.text: ' + this.state.text);\n }\n const editTextArea = document.getElementById(id) as HTMLTextAreaElement;\n if (editTextArea) {\n const editCodeMirror = CodeMirror.fromTextArea(editTextArea, {\n autocorrect: true,\n autocapitalize: true,\n extraKeys: {\n Enter: 'newlineAndIndentContinueMarkdownList',\n 'Alt-F': 'findPersistent',\n },\n lineNumbers: false,\n lineWrapping: true,\n mode: 'gfm',\n spellcheck: true,\n //@ts-ignore\n styleSelectedText: true,\n tabindex: 0,\n theme: 'default',\n value: this.state.text,\n });\n editCodeMirror.setSize('100%', '100%');\n editCodeMirror.on('change', () => {\n const editCodeMirrorText = editCodeMirror.getValue();\n if (debugMode) {\n console.log('editCodeMirror value: ' + editCodeMirrorText);\n }\n editCodeMirror.save();\n this.saveText(editCodeMirrorText);\n });\n editCodeMirror.on('blur', (cm: Editor, event: FocusEvent) => {\n const content = document.getElementById(HtmlElementId.content);\n if (content) {\n content.classList.remove(HtmlClassName.focused);\n }\n });\n editCodeMirror.on('focus', (cm: Editor, event: FocusEvent) => {\n const content = document.getElementById(HtmlElementId.content);\n if (content) {\n content.classList.add(HtmlClassName.focused);\n }\n });\n editCodeMirror.on('keydown', (cm: Editor, event: KeyboardEvent) => {\n this.onKeyDown(event);\n this.onKeyDownEditTextArea(event);\n this.onKeyDownTextArea(event);\n });\n editCodeMirror.on('keyup', (cm: Editor, event: KeyboardEvent) => {\n this.onKeyUp(event);\n });\n this.setState({\n editCodeMirror: editCodeMirror,\n });\n }\n } else if (id === HtmlElementId.appendTextArea) {\n const appendTextArea = document.getElementById(\n HtmlElementId.appendTextArea\n ) as HTMLTextAreaElement;\n if (appendTextArea) {\n const appendCodeMirror = CodeMirror.fromTextArea(appendTextArea, {\n autocorrect: true,\n autocapitalize: true,\n extraKeys: {\n Enter: 'newlineAndIndentContinueMarkdownList',\n 'Alt-F': 'findPersistent',\n },\n lineNumbers: false,\n lineWrapping: true,\n mode: 'gfm',\n spellcheck: true,\n //@ts-ignore\n styleSelectedText: true,\n tabindex: 0,\n theme: 'default',\n value: this.state.appendText,\n });\n appendCodeMirror.setSize('100%', '100%');\n appendCodeMirror.on('change', () => {\n const appendCodeMirrorText = appendCodeMirror.getValue();\n appendCodeMirror.save();\n this.autoSaveAppendText(appendCodeMirrorText);\n });\n appendCodeMirror.on('keydown', (cm: Editor, event: KeyboardEvent) => {\n this.onKeyDown(event);\n this.onKeyDownAppendTextArea(event);\n this.onKeyDownTextArea(event);\n });\n appendCodeMirror.on('keyup', (cm: Editor, event: KeyboardEvent) => {\n this.onKeyUp(event);\n });\n this.setState({\n appendCodeMirror: appendCodeMirror,\n });\n }\n }\n };\n\n // Event Handlers\n onEditMode = () => {\n // if Append box is empty, close it and open Edit mode\n // if Edit mode is on, then close it, open View mode, and Append mode\n if (!this.state.editMode) {\n if (this.state.appendMode && !this.state.appendText) {\n this.setState({\n appendMode: false,\n });\n }\n this.setState(\n {\n editMode: true,\n },\n () => {\n const editTextArea = document.getElementById(\n HtmlElementId.editTextArea\n );\n if (editTextArea) {\n editTextArea.focus();\n if (this.state.editingMode === EditingModes.useCodeMirror) {\n this.configureCodeMirror(HtmlElementId.editTextArea);\n }\n }\n }\n );\n } else if (this.state.editMode) {\n /**If edit mode is on and Monaco Editor is off,\n * then turn edit mode off and turn view mode on.\n * This automatically renders the text. We do not\n * do this when Monaco is on because refreshing edit Mode\n * with Monaco Editor off allows us to resize the Monaco Editor.\n */\n if (!(this.state.editingMode === EditingModes.useMonacoEditor)) {\n this.setState({\n viewMode: true,\n });\n }\n if (this.state.editCodeMirror) {\n this.state.editCodeMirror.toTextArea();\n }\n this.setState(\n {\n editMode: false,\n },\n () => {\n // if not using append mode, focus on editButton\n if (!this.state.appendMode) {\n const editButton = document.getElementById(\n HtmlElementId.editButton\n );\n if (editButton) {\n editButton.focus();\n }\n }\n }\n );\n }\n };\n\n onAppendMode = (scrollDown = true, closeEdit = true, focus = true) => {\n if (!this.state.appendMode) {\n if (closeEdit) {\n this.setState({\n editMode: false,\n });\n }\n this.setState(\n {\n appendMode: true,\n },\n () => {\n if (scrollDown) {\n this.scrollToBottom();\n }\n if (focus) {\n const appendTextArea = document.getElementById(\n HtmlElementId.appendTextArea\n );\n if (appendTextArea) {\n appendTextArea.focus();\n if (this.state.editingMode === EditingModes.useCodeMirror) {\n this.configureCodeMirror(HtmlElementId.appendTextArea);\n }\n }\n }\n }\n );\n } else if (this.state.appendMode) {\n if (this.state.appendCodeMirror) {\n this.state.appendCodeMirror.toTextArea();\n }\n this.setState(\n {\n appendMode: false,\n },\n () => {\n if (this.state.editingMode === EditingModes.useMonacoEditor) {\n this.refreshEdit();\n }\n if (focus) {\n const appendButton = document.getElementById(\n HtmlElementId.appendButton\n );\n if (appendButton) {\n appendButton.focus();\n }\n }\n }\n );\n }\n };\n\n onViewMode = () => {\n if (!this.state.viewMode) {\n this.setState(\n {\n viewMode: true,\n },\n () => {\n if (this.state.editingMode === EditingModes.useMonacoEditor) {\n this.refreshEdit();\n }\n if (this.state.appendMode && !this.state.editMode) {\n this.skipToBottom();\n }\n }\n );\n }\n if (this.state.viewMode) {\n this.setState(\n {\n viewMode: false,\n },\n () => {\n if (this.state.editingMode === EditingModes.useMonacoEditor) {\n this.refreshEdit();\n }\n if (!this.state.editMode && !this.state.appendMode) {\n this.onEditMode();\n }\n }\n );\n }\n };\n\n toggleShowHelp = () => {\n if (!this.state.showHelp) {\n this.setState(\n {\n showHelp: true,\n },\n () => {\n if (!this.state.viewMode) {\n this.onViewMode();\n } else if (this.state.viewMode) {\n this.refreshView();\n }\n const helpButton = document.getElementById(HtmlElementId.helpButton);\n if (helpButton) {\n helpButton.focus();\n }\n setTimeout(() => {\n this.scrollToTop();\n }, 50);\n }\n );\n } else {\n this.setState(\n {\n showHelp: false,\n },\n () => {\n this.refreshView();\n const helpButton = document.getElementById(HtmlElementId.helpButton);\n if (helpButton) {\n helpButton.focus();\n }\n }\n );\n }\n };\n\n toggleShowMenu = () => {\n this.setState(\n {\n showMenu: !this.state.showMenu,\n },\n () => {\n const menuButton = document.getElementById(HtmlElementId.menuButton);\n if (menuButton) {\n menuButton.focus();\n }\n }\n );\n };\n\n loadDefaultMenuState = () => {\n this.setState({\n showMenuOptionsEdit: false,\n showMenuOptionsShare: true,\n showMenuOptionsView: true,\n });\n };\n\n toggleShowMenuOptionsEdit = () => {\n this.setState({ showMenuOptionsEdit: !this.state.showMenuOptionsEdit });\n };\n\n toggleShowMenuOptionsShare = () => {\n this.setState({ showMenuOptionsShare: !this.state.showMenuOptionsShare });\n };\n\n toggleShowMenuOptionsView = () => {\n this.setState({ showMenuOptionsView: !this.state.showMenuOptionsView });\n };\n\n toggleBorderlessMode = () => {\n this.setState(\n {\n borderlessMode: !this.state.borderlessMode,\n },\n () => {\n this.activateFixedHeader();\n this.saveMenuOptions();\n }\n );\n };\n\n toggleFixedHeightMode = () => {\n this.setState(\n {\n fixedHeightMode: !this.state.fixedHeightMode,\n },\n () => {\n this.activateFixedHeader();\n this.saveMenuOptions();\n }\n );\n };\n\n toggleFullWidthMode = () => {\n this.setState(\n {\n fullWidthMode: !this.state.fullWidthMode,\n },\n () => {\n this.activateFixedHeader();\n this.saveMenuOptions();\n }\n );\n };\n\n toggleOverflowMode = () => {\n this.setState(\n {\n overflowMode: !this.state.overflowMode,\n },\n () => {\n this.activateFixedHeader();\n this.saveMenuOptions();\n }\n );\n };\n\n saveMenuOptions = () => {\n let currentMenuOptions: menuOptions;\n currentMenuOptions = {\n borderlessMode: this.state.borderlessMode,\n fixedHeightMode: this.state.fixedHeightMode,\n fullWidthMode: this.state.fullWidthMode,\n overflowMode: this.state.overflowMode,\n /**These are turned off to prevent excess re-rendering of the note when opening/closing the menu */\n //showMenuOptionsEdit: this.state.showMenuOptionsEdit,\n //showMenuOptionsShare: this.state.showMenuOptionsShare,\n //showMenuOptionsView: this.state.showMenuOptionsView,\n };\n this.saveEditorOption('menuOptions', JSON.stringify(currentMenuOptions));\n };\n\n saveEditorOption = (\n optionKey: string,\n optionValue: string | boolean | undefined\n ) => {\n this.setState(\n {\n savingEditorOptions: true,\n },\n () => {\n try {\n this.editorKit.internal.componentRelay.setComponentDataValueForKey(\n optionKey,\n optionValue\n );\n /** this.configureEditorKit() is triggered\n * every time setComponentDataValueForKey is triggered, but\n * savingEditorOptions prevents the callback from triggering.\n * Then, after the timeout, the new default settings or options can\n * take into effect immediately.\n * However, if you switch the note within the timeout, you will get an error.\n * I have tried 150 and 200 but they both are not long enough. 250 is short enough\n * to work, but not long enough to be easily noticeable.\n * We do not load editor options because they are optional and persist through\n * this.configureEditorKit().\n * */\n setTimeout(() => {\n this.setState(\n {\n savingEditorOptions: false,\n },\n () => {\n this.loadDefaultSettings();\n this.loadMetaData();\n }\n );\n }, 250);\n } catch (error) {\n console.log(\n 'Error saving editor option. Your optionKey:',\n optionKey,\n '\\n - Your optionValue: ',\n optionValue,\n '\\n - The error: ',\n error\n );\n this.setState(\n {\n savingEditorOptions: false,\n },\n () => {\n /** We use refreshEditor() if there's an error (such as in the demo)\n * But not in the actual editor because loadDefaultSettings and loadMetaData\n * will run refreshEditor() twice, and if there's no issue saving editor options,\n * then there's probably no issue loading default settings and metadata.\n * */\n this.refreshEditor();\n this.loadDefaultSettings();\n this.loadMetaData();\n }\n );\n }\n }\n );\n };\n\n onSettingsMode = () => {\n // Here we save the current state. We reload the current state if we cancel and after we save\n if (!this.state.settingsMode) {\n this.removeFixedHeader();\n this.setState(\n {\n currentState: this.state,\n },\n () => {\n /** Turn everything off and turn Settings on */\n this.setState(\n {\n appendMode: false,\n editMode: false,\n fullWidthMode: false,\n fixedHeightMode: false,\n settingsMode: true,\n showAppendix: false, // Hides the scroll up/down buttons\n showHeader: false,\n showMenu: false,\n viewMode: false,\n },\n () => {\n const undoDialog = document.getElementById('undoDialog');\n if (undoDialog) {\n undoDialog.focus();\n }\n }\n );\n }\n );\n } else if (this.state.settingsMode) {\n this.setState(\n {\n ...this.state.currentState,\n settingsMode: false,\n },\n () => {\n this.refreshEdit();\n const settingsButton = document.getElementById(\n HtmlElementId.settingsButton\n );\n if (settingsButton) {\n settingsButton.focus();\n }\n }\n );\n }\n };\n\n /** Restore current state but change the items that are saved from the Settings.\n * It's important to restore the current state to restore items that were turned off, such as\n * fixedHeight and fullWidth.\n */\n onSaveSettings = ({\n customStyles,\n editingMode,\n fontEdit,\n fontSize,\n fontView,\n monacoEditorLanguage,\n saveAsDefault,\n }: SaveSettingsInterface) => {\n this.setState(\n {\n ...this.state.currentState,\n customStyles,\n editingMode,\n fontEdit,\n fontSize,\n fontView,\n monacoEditorLanguage,\n showAppendix: true,\n showHeader: true,\n settingsMode: false,\n },\n () => {\n this.refreshEditor();\n const settingsButton = document.getElementById(\n HtmlElementId.settingsButton\n );\n if (settingsButton) {\n settingsButton.focus();\n }\n }\n );\n let note = this.editorKit.internal.note;\n if (note) {\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n - onSaveSettings() this.editorKit.internal.componentRelay.saveItemWithPresave() triggered'\n );\n }\n this.editorKit.internal.componentRelay.saveItemWithPresave(note, () => {\n note.content.appendEditorCustomStyles = customStyles;\n note.content.appendEditorEditingMode = editingMode;\n note.content.appendEditorFontEdit = fontEdit;\n note.content.appendEditorFontSize = fontSize;\n note.content.appendEditorFontView = fontView;\n note.content.appendEditorMonacoEditorLanguage = monacoEditorLanguage;\n });\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n - onSaveSettings() this.editorKit.internal.componentRelay.saveItemWithPresave() completed'\n );\n }\n }\n if (saveAsDefault) {\n this.setState(\n {\n defaultSettings: {\n customStyles,\n editingMode,\n fontEdit,\n fontSize,\n fontView,\n monacoEditorLanguage,\n },\n },\n () => {\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n - onSaveSettings() this.state.savingEditorOptions: ' +\n this.state.savingEditorOptions +\n '\\n JSON.stringify(this.state.defaultSettings):',\n JSON.stringify(this.state.defaultSettings)\n );\n }\n this.saveEditorOption(\n 'defaultSettings',\n JSON.stringify(this.state.defaultSettings)\n );\n }\n );\n }\n };\n\n activateStyles = () => {\n if (debugMode) {\n console.log('AppendEditor.tsx: \\n - this.activateStyles() triggered');\n }\n const sheetToBeRemoved = document.getElementById('customStyleSheet');\n if (sheetToBeRemoved) {\n const sheetParent = sheetToBeRemoved.parentNode;\n if (sheetParent) {\n sheetParent.removeChild(sheetToBeRemoved);\n }\n }\n // Follow the order that appears in the Settings to make the Settings cascade\n let fontSizeStyle = '';\n if (this.state.fontSize) {\n fontSizeStyle =\n '.CodeMirror, .DynamicEditor, .MonacoEditorContainer, .ProseMirror, #editTextArea, #appendTextArea, #renderedNote {font-size: ' +\n this.state.fontSize +\n ';}\\n';\n }\n let fontEditStyle = '';\n if (this.state.fontEdit) {\n fontEditStyle =\n '.CodeMirror, .DynamicEditor, .ProseMirror, #editTextArea, #appendTextArea {font-family: ' +\n this.state.fontEdit +\n ';}\\n';\n }\n let fontViewStyle = '';\n if (this.state.fontView) {\n fontViewStyle =\n '#renderedNote {font-family: ' + this.state.fontView + ';}\\n';\n }\n if (\n this.state.customStyles ||\n this.state.fontEdit ||\n this.state.fontSize ||\n this.state.fontView\n ) {\n const sheet = document.createElement('style');\n sheet.setAttribute('id', 'customStyleSheet');\n // Follow the order that appears in the Settings to make the Settings cascade\n sheet.innerHTML =\n fontSizeStyle + fontEditStyle + fontViewStyle + this.state.customStyles;\n document.body.appendChild(sheet);\n }\n };\n\n onCancelPrint = () => {\n this.setState(\n {\n confirmPrintUrl: false,\n },\n () => {\n const printButton = document.getElementById(HtmlElementId.printButton);\n if (printButton) {\n printButton.focus();\n }\n }\n );\n };\n\n onConfirmPrintUrl = () => {\n this.setState(\n {\n confirmPrintUrl: true,\n },\n () => {\n const undoDialog = document.getElementById('undoDialog');\n if (undoDialog) {\n undoDialog.focus();\n }\n }\n );\n };\n\n onPrintUrlTrue = () => {\n this.setState(\n {\n confirmPrintUrl: false,\n printURL: true,\n },\n () => {\n this.printRenderedHtml();\n }\n );\n };\n\n onPrintUrlFalse = () => {\n this.setState(\n {\n confirmPrintUrl: false,\n printURL: false,\n },\n () => {\n this.printRenderedHtml();\n }\n );\n };\n\n printRenderedHtml = () => {\n window.print();\n const printButton = document.getElementById(HtmlElementId.printButton);\n if (printButton) {\n printButton.focus();\n }\n };\n\n goDown = () => {\n document.body.scrollTop = 10000000; // for Safari\n if (this.state.editMode) {\n const editTextArea = document.getElementById(HtmlElementId.editTextArea);\n if (editTextArea) {\n editTextArea.scrollTop = 10000000;\n }\n }\n if (this.state.appendMode) {\n const appendTextArea = document.getElementById(\n HtmlElementId.appendTextArea\n );\n if (appendTextArea) {\n appendTextArea.scrollTop = 10000000;\n }\n }\n if (this.state.fixedHeightMode) {\n const view = document.getElementById(HtmlElementId.view);\n if (view) {\n view.scrollTop = 10000000;\n }\n /** Need edit for Dynamic */\n const edit = document.getElementById(HtmlElementId.edit);\n if (edit) {\n edit.scrollTop = 10000000;\n }\n /** Scroll down for CodeMirror */\n const codeMirrorList = document.getElementsByClassName(\n 'CodeMirror-vscrollbar'\n );\n const codeMirrorEditMode = codeMirrorList[0];\n if (codeMirrorEditMode) {\n codeMirrorEditMode.scrollTop = 10000000;\n }\n }\n };\n\n scrollToBottom = () => {\n this.goDown();\n const appendix = document.getElementById(HtmlElementId.appendix);\n if (appendix) {\n appendix.scrollIntoView({\n behavior: 'smooth',\n block: 'end', // Bottom\n inline: 'nearest',\n });\n }\n };\n\n // Skip to Bottom is fast \"auto\" behavior instead of \"smooth\" behavior\n skipToBottom = () => {\n this.goDown();\n const appendix = document.getElementById(HtmlElementId.appendix);\n if (appendix) {\n appendix.scrollIntoView({\n behavior: 'auto',\n block: 'end', // Bottom\n inline: 'nearest',\n });\n }\n };\n\n goUp = () => {\n document.body.scrollTop = 0; // for Safari\n if (this.state.editMode) {\n const editTextArea = document.getElementById(HtmlElementId.editTextArea);\n if (editTextArea) {\n editTextArea.scrollTop = 0;\n }\n }\n if (this.state.appendMode) {\n const appendTextArea = document.getElementById(\n HtmlElementId.appendTextArea\n );\n if (appendTextArea) {\n appendTextArea.scrollTop = 0;\n }\n }\n if (this.state.fixedHeightMode) {\n const view = document.getElementById(HtmlElementId.view);\n if (view) {\n view.scrollTop = 0;\n }\n /** Need edit for Dynamic */\n const edit = document.getElementById(HtmlElementId.edit);\n if (edit) {\n edit.scrollTop = 0;\n }\n /** Scroll up for CodeMirror */\n const codeMirrorList = document.getElementsByClassName(\n 'CodeMirror-vscrollbar'\n );\n const codeMirrorEditMode = codeMirrorList[0];\n if (codeMirrorEditMode) {\n codeMirrorEditMode.scrollTop = 0;\n }\n }\n };\n\n scrollToTop = () => {\n this.goUp();\n const top = document.getElementById('top');\n if (top) {\n top.scrollIntoView({\n behavior: 'smooth',\n block: 'start', // Top\n inline: 'nearest',\n });\n }\n };\n\n // Need both content and appendix for mobile\n // Skip to Bottom is fast \"auto\" behavior instead of \"smooth\" behavior\n skipToTop = () => {\n this.goUp();\n const top = document.getElementById('top');\n if (top) {\n top.scrollIntoView({\n behavior: 'auto',\n block: 'start', // Top\n inline: 'nearest',\n });\n }\n };\n\n onKeyDown = (e: React.KeyboardEvent | KeyboardEvent) => {\n keyMap.set(e.key, true);\n // Click the top Append if 'Control' and 'e' are pressed\n if (keyMap.get('Control') && keyMap.get('e')) {\n e.preventDefault();\n this.onEditMode();\n }\n // Click the top Append if 'Control' and 'u' are pressed\n else if (\n keyMap.get('Control') &&\n !keyMap.get('Alt') &&\n (keyMap.get('u') || keyMap.get('m'))\n ) {\n e.preventDefault();\n this.onAppendMode();\n }\n // Click view if 'Control' and 'p' are pressed\n else if (keyMap.get('Control') && !keyMap.get('Alt') && keyMap.get('p')) {\n e.preventDefault();\n this.onViewMode();\n } else if (keyMap.get('Control') && keyMap.get('.')) {\n e.preventDefault();\n this.setState({\n appendRows: this.state.appendRows + 1,\n });\n } else if (keyMap.get('Control') && keyMap.get(',')) {\n e.preventDefault();\n if (this.state.appendRows > 5) {\n this.setState({\n appendRows: this.state.appendRows - 1,\n });\n }\n } else if (keyMap.get('Control') && keyMap.get('<')) {\n // Edit only mode\n e.preventDefault();\n this.setState(\n {\n appendMode: false,\n editMode: false,\n viewMode: false,\n },\n () => {\n this.onEditMode();\n }\n );\n } else if (keyMap.get('Control') && keyMap.get('>')) {\n // Append only mode\n e.preventDefault();\n this.setState(\n {\n appendMode: false,\n editMode: false,\n viewMode: false,\n },\n () => {\n this.onAppendMode();\n }\n );\n } else if (keyMap.get('Control') && keyMap.get('[')) {\n e.preventDefault();\n this.skipToTop();\n } else if (keyMap.get('Control') && keyMap.get(']')) {\n e.preventDefault();\n this.skipToBottom();\n } else if (\n keyMap.get('Control') &&\n !keyMap.get('Alt') &&\n !keyMap.get('Shift') &&\n keyMap.get('w')\n ) {\n keyMap.delete('w');\n }\n };\n\n onKeyDownAppendTextArea = (e: React.KeyboardEvent | KeyboardEvent) => {\n // Close Append Mode if 'Escape' is pressed\n if (keyMap.get('Escape')) {\n e.preventDefault();\n keyMap.delete('Escape');\n this.onAppendMode();\n }\n // Save note if Control and Enter are pressed\n else if (keyMap.get('Control') && keyMap.get('Enter')) {\n e.preventDefault();\n if (this.state.editingMode === EditingModes.useCodeMirror) {\n this.appendTextToNote();\n }\n }\n // Save note if Control and S are pressed\n else if (keyMap.get('Control') && keyMap.get('s')) {\n e.preventDefault();\n if (this.state.editingMode === EditingModes.useCodeMirror) {\n this.appendTextToNote();\n }\n }\n // Toggle Append New Line if Ctrl + Alt + N are pressed\n else if (\n keyMap.get('Control') &&\n !keyMap.get('Shift') &&\n keyMap.get('Alt') &&\n keyMap.get('n')\n ) {\n e.preventDefault();\n const newLine = document.getElementById(HtmlElementId.newLine);\n if (newLine) {\n newLine.click();\n }\n }\n // Toggle Append New Line if Ctrl + Alt + P are pressed\n else if (\n keyMap.get('Control') &&\n !keyMap.get('Shift') &&\n keyMap.get('Alt') &&\n keyMap.get('p')\n ) {\n e.preventDefault();\n const newParagraph = document.getElementById(HtmlElementId.newParagraph);\n if (newParagraph) {\n newParagraph.click();\n }\n }\n };\n\n onKeyDownEditTextArea = (e: React.KeyboardEvent | KeyboardEvent) => {\n // Close EditMode if 'Escape' is pressed\n if (keyMap.get('Escape')) {\n e.preventDefault();\n keyMap.set('Escape', false);\n this.onEditMode();\n }\n };\n\n onKeyDownTextArea = (e: React.KeyboardEvent | KeyboardEvent) => {\n // Add two stars if Control + b are pressed\n if (keyMap.get('Control') && keyMap.get('b')) {\n e.preventDefault();\n document.execCommand('insertText', false, '**');\n }\n // Add header when pressing Control + H\n else if (keyMap.get('Control') && keyMap.get('h')) {\n e.preventDefault();\n document.execCommand('insertText', false, '#');\n }\n // Add image code if Control + Alt and i are pressed\n else if (keyMap.get('Control') && keyMap.get('Alt') && keyMap.get('i')) {\n e.preventDefault();\n document.execCommand('insertText', false, '![]()');\n }\n // Add one stars if Control + i is pressed\n else if (keyMap.get('Control') && keyMap.get('i')) {\n e.preventDefault();\n document.execCommand('insertText', false, '*');\n }\n // Add inline code if Control + Alt and k are pressed\n else if (keyMap.get('Control') && keyMap.get('Alt') && keyMap.get('k')) {\n e.preventDefault();\n document.execCommand('insertText', false, '`');\n }\n // Add link if Control + k are pressed\n else if (keyMap.get('Control') && keyMap.get('k')) {\n e.preventDefault();\n document.execCommand('insertText', false, '[]()');\n }\n // Add ordered list item if Control + Alt + l are pressed\n else if (keyMap.get('Control') && keyMap.get('Alt') && keyMap.get('l')) {\n e.preventDefault();\n document.execCommand('insertText', false, '\\n1. ');\n }\n // Add unordered list item if Control + l are pressed\n else if (keyMap.get('Control') && keyMap.get('l')) {\n e.preventDefault();\n document.execCommand('insertText', false, '\\n- ');\n }\n // Add strike through if Control + Alt + u are pressed\n else if (keyMap.get('Control') && keyMap.get('Alt') && keyMap.get('u')) {\n e.preventDefault();\n document.execCommand('insertText', false, '~~');\n }\n // Add quote Control + q, Control + ' or Control + \" are pressed\n else if (\n (keyMap.get('Control') && keyMap.get('q')) ||\n (keyMap.get('Control') && keyMap.get(\"'\")) ||\n (keyMap.get('Control') && keyMap.get('\"'))\n ) {\n e.preventDefault();\n document.execCommand('insertText', false, '\\n> ');\n }\n };\n\n onKeyUp = (e: React.KeyboardEvent | KeyboardEvent) => {\n keyMap.delete(e.key);\n };\n\n onBlur = (e: React.FocusEvent) => {\n keyMap.clear();\n };\n\n onScroll = (e: Event) => {\n if (!this.state.settingsMode) {\n if (window.scrollY < last_known_scroll_position) {\n // If scrolling up, fix header\n this.activateFixedHeader();\n } else if (\n // If scrolling down, unfix header\n window.scrollY > last_known_scroll_position &&\n !this.state.showMenu\n ) {\n if (\n // If NOT using Edit Only mode with PlainText and CodeMirror\n !(\n (this.state.editingMode === undefined ||\n this.state.editingMode === EditingModes.usePlainText ||\n this.state.editingMode === EditingModes.useCodeMirror) &&\n this.state.editMode &&\n !this.state.appendMode &&\n !this.state.settingsMode &&\n !this.state.viewMode\n )\n ) {\n this.removeFixedHeader();\n }\n }\n last_known_scroll_position = window.scrollY;\n }\n };\n\n activateFixedHeader = () => {\n const header = document.getElementById(HtmlElementId.header);\n const content = document.getElementById(HtmlElementId.content);\n // Activate only if we have both\n if (header && content) {\n header.classList.add(HtmlClassName.fixed);\n content.classList.add(HtmlClassName.fixedHeader);\n }\n };\n\n removeFixedHeader = () => {\n const header = document.getElementById(HtmlElementId.header);\n const content = document.getElementById(HtmlElementId.content);\n /** Remove both even if you don't have both\n * This is needed for loading settings\n */\n if (header) {\n header.classList.remove(HtmlClassName.fixed);\n }\n if (content) {\n content.classList.remove(HtmlClassName.fixedHeader);\n }\n };\n\n render() {\n return [\n ,\n \n {this.state.showHeader && [\n \n
\n \n \n \n \n \n \n this.onAppendMode()}\n title=\"Toggle Append Mode\"\n className={\n 'sk-button ' + (this.state.appendMode ? 'on' : 'off')\n }\n >\n \n \n
\n \n \n \n
\n \n \n \n \n \n \n
\n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n ,\n ]}\n \n {this.state.showMenu && (\n \n \n \n )}\n {this.state.settingsMode && (\n \n \n \n )}\n {this.state.editMode && !this.state.refreshEdit && (\n \n \n \n )}\n {this.state.editMode && this.state.refreshEdit && (\n \n \n \n )}\n {this.state.viewMode && !this.state.refreshView && (\n \n \n \n )}\n {this.state.viewMode && this.state.refreshView && (\n \n \n \n )}\n {this.state.confirmPrintUrl && (\n \n {' '}\n \n )}\n\n {this.state.showDiff && [\n \n \n ,\n ]}\n \n {this.state.showAppendix && [\n \n {this.state.appendMode && (\n \n \n \n )}\n \n
\n \n \n
\n \n ,\n ]}\n ,\n ];\n }\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.scss';\nimport * as serviceWorker from './serviceWorker';\nimport reportWebVitals from './reportWebVitals';\n\nimport AppendEditor from './components/AppendEditor';\nimport './stylesheets/main.scss';\nReactDOM.render(\n \n \n ,\n document.getElementById('root')\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n\n// If you want to start measuring performance in your app, pass a function\n// to log results (for example: reportWebVitals(console.log))\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\nreportWebVitals();\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["serviceWorker.ts","reportWebVitals.ts","components/Icons.tsx","components/PrintDialog.tsx","components/Monaco.tsx","components/DynamicEditor.tsx","components/EditNote.tsx","lib/clickButton.ts","components/Help.tsx","components/Intro.tsx","lib/renderMarkdown.ts","components/ViewNote.tsx","components/AppendText.tsx","components/Buttons.tsx","components/Menu.tsx","components/Settings.tsx","components/ErrorBoundary.tsx","components/AppendEditor.tsx","index.tsx"],"names":["Boolean","window","location","hostname","match","reportWebVitals","onPerfEntry","Function","then","getCLS","getFID","getFCP","getLCP","getTTFB","infoColor","foregroundColor","ChevronIconDown","fill","role","className","aria-label","width","height","viewBox","xmlns","d","ChevronIconRight","CloseIcon","CopyIcon","EyeIcon","condition","GearIcon","HelpIcon","MenuIcon","PencilIcon","PlusIcon","fill-rule","clip-rule","PrintIcon","RefreshIcon","UndoIcon","PrintDialog","cancelText","confirmText","helpLink","onCancel","onConfirm","onUndo","title","id","onClick","href","target","rel","MonacoEditorContainerID","MonacoDiffEditorContainerID","self","MonacoEnvironment","getWorkerUrl","_moduleId","label","MonacoEditor","editor","fontSize","language","saveText","tabSize","text","theme","viewMode","divEl","useRef","scrollBeyondLastLine","useEffect","current","monaco","create","parseInt","replace","value","join","autoClosingOvertype","formatOnPaste","formatOnType","wordWrap","wrappingStrategy","onKeyDown","e","keyCode","console","log","code","ctrlKey","preventDefault","onKeyUp","onDidChangeModelContent","getValue","dispose","ref","MonacoDiffEditor","diffEditor","modifiedText","originalModel","createModel","modifiedModel","createDiffEditor","originalEditable","readOnly","setModel","original","modified","onDidChangeContent","YouTubeEmbed","videoId","this","props","attrs","matches","isSelected","src","React","DynamicEditor","handleToggleReadOnly","setState","state","handleChange","debounce","debugMode","onChange","template","undefined","placeholder","readOnlyWriteCheckboxes","defaultValue","scrollTo","hash","autoFocus","embeds","keywords","icon","alt","matcher","url","component","EditNote","handleInputChange","event","onBlur","content","document","getElementById","HtmlElementId","classList","remove","HtmlClassName","focused","onFocus","add","onKeyDownEditTextArea","onKeyDownTextArea","keyMap","delete","key","editingMode","EditingModes","useMonacoEditor","useDynamicEditor","edit","monacoEditorLanguage","editTextArea","name","rows","spellCheck","Component","defaultProps","clickAppendButton","appendButton","click","clickEditButton","editButton","clickHelpButton","helpButton","clickMenuButton","menuButton","clickSettingsButton","settingsButton","clickViewButton","viewButton","Help","onToggleShowFeelings","showFeelings","onToggleShowMoreQuestions","showMoreQuestions","onToggleShowFeedback","showFeedback","onToggle","Intro","appendMode","editMode","showHelp","breaks","require","externalLinks","footnotes","gfm","gemoji","math","slug","toc","highlight","rehypeKatex","raw","processor","unified","use","parse","maxDepth","inlineNotes","remark2rehype","allowDangerousHtml","ignoreMissing","rehype2react","createElement","processMarkdown","processSync","result","isLongString","throttle","length","renderLongMarkdown","ViewNote","onToggleShowHelp","renderMarkdown","bypassDebounce","printURL","view","AppendText","type","checked","autoSaveCheckBoxes","handleTextAreaChange","autoSaveAppendText","appendTextToNote","appendTextArea","focus","newLine","newParagraph","set","get","onKeyDownAppendTextArea","appendNewLine","appendNewParagraph","appendRows","ChevronToggleButton","caption","CopyButton","EyeButton","messageOn","messageOff","PencilButton","PrintButton","UndoButton","editingModeID","fontEditID","fontSizeID","fontViewID","monacoEditorLanguageID","resetAllSettingsID","saveAsDefaultID","startRegExp","RegExp","cssRegExp","endRegExp","codeRegExp","Settings","handleSelectChange","toggleShowCustomStyles","showCustomStyles","cleanCustomStyles","customStyles","handleSubmit","fontEditMessage","fontViewMessage","fontEdit","fontView","saveAsDefault","loadDefaultSettings","defaultSettings","refreshCustomStyles","clearCustomStyles","clearFontEdit","clearFontSize","clearFontView","clearEditingMode","usePlainText","clearMonacoEditorLanguage","clearSaveAsDefault","clearAllSettings","resetAllSettings","clear","componentWillUnmount","useCodeMirror","htmlFor","list","ErrorBoundary","hasError","error","errorInfo","message","children","Menu","clearTooltipTimer","resetMessageTimer","clearTimeout","setTimeout","displayMessageEdit","displayMessageShare","showMessageEdit","showMessageShare","copyToClipboard","textField","body","appendChild","select","execCommand","copyText","copyHtml","renderedNote","firstElementChild","innerHTML","formatText","formattedText","prettier","format","parser","plugins","parserMarkdown","refreshEdit","refreshView","uncheckBoxes","checkedBoxes","test","newText","toggleShowMenu","chevronToggleButton","showMenuOptionsView","toggleShowMenuOptionsView","borderlessMode","on","off","toggleBorderlessMode","fixedHeightMode","toggleFixedHeightMode","fullWidthMode","toggleFullWidthMode","overflowMode","toggleOverflowMode","showMenuOptionsShare","toggleShowMenuOptionsShare","printButton","onConfirmPrintUrl","showMenuOptionsEdit","toggleShowMenuOptionsEdit","initialState","appendText","confirmPrintUrl","showAppendix","showHeader","showDiff","settingsMode","last_known_scroll_position","Map","AppendEditor","editorKit","refreshEditorTimer","saveTimer","componentDidMount","onViewMode","loadDefaultMenuState","addEventListener","onScroll","removeEventListener","configureEditorKit","delegate","EditorKitDelegate","setEditorRawText","cancel","flush","savingEditorOptions","loadEditorOptions","loadMetaData","clearUndoHistory","getElementsBySelector","EditorKit","mode","supportsFilesafe","refreshEditor","activateStyles","defaultSettingsString","internal","componentRelay","getComponentDataValueForKey","defaultEditingMode","defaultSettingsObject","JSON","defaultCustomStyles","defaultFontEdit","defaultFontSize","defaultFontView","defaultMonacoEditorLanguage","menuOptionsString","menuOptionsObject","streamContextItem","note","appendEditorCustomStyles","appendEditorEditingMode","appendEditorFontEdit","appendEditorFontSize","appendEditorFontView","appendEditorMonacoEditorLanguage","onEditMode","saveNote","scrollY","scrollTop","refreshedView","onEditorValueChanged","textToAppend","concat","saveItemWithPresave","skipToBottom","appendCodeMirror","setValue","configureCodeMirror","editCodeMirror","CodeMirror","fromTextArea","autocorrect","autocapitalize","extraKeys","Enter","lineNumbers","lineWrapping","spellcheck","styleSelectedText","tabindex","setSize","editCodeMirrorText","save","cm","appendCodeMirrorText","toTextArea","onAppendMode","scrollDown","closeEdit","scrollToBottom","toggleShowHelp","scrollToTop","showMenu","activateFixedHeader","saveMenuOptions","currentMenuOptions","saveEditorOption","stringify","optionKey","optionValue","setComponentDataValueForKey","onSettingsMode","currentState","removeFixedHeader","undoDialog","onSaveSettings","sheetToBeRemoved","sheetParent","parentNode","removeChild","fontSizeStyle","fontEditStyle","fontViewStyle","sheet","setAttribute","onCancelPrint","onPrintUrlTrue","printRenderedHtml","onPrintUrlFalse","print","goDown","codeMirrorEditMode","getElementsByClassName","appendix","scrollIntoView","behavior","block","inline","goUp","top","skipToTop","header","fixed","fixedHeader","tabIndex","ReactDOM","render","StrictMode","navigator","serviceWorker","ready","registration","unregister","catch"],"mappings":"0MAYoBA,QACW,cAA7BC,OAAOC,SAASC,UAEe,UAA7BF,OAAOC,SAASC,UAEhBF,OAAOC,SAASC,SAASC,MACvB,2DChBN,IAYeC,EAZS,SAACC,GACnBA,GAAeA,aAAuBC,UACxC,gCAAqBC,MAAK,YAAkD,IAA/CC,EAA8C,EAA9CA,OAAQC,EAAsC,EAAtCA,OAAQC,EAA8B,EAA9BA,OAAQC,EAAsB,EAAtBA,OAAQC,EAAc,EAAdA,QAC3DJ,EAAOH,GACPI,EAAOJ,GACPK,EAAOL,GACPM,EAAON,GACPO,EAAQP,O,8CCPRQ,EAAY,gCACZC,EAAkB,sCAQXC,EAAmC,SAAC,GAAD,IAAGC,EAAH,EAAGA,KAAMC,EAAT,EAASA,KAAT,OAC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AAK5B,UAChBmK,wBAAyBvI,KAAKuI,wBAC9B1F,kBAAmB7C,KAAK6C,kBACxBjE,QAASoB,KAAKpB,QACd8J,WAAY1I,KAAKU,MAAMgI,WACvBzL,KAAM+C,KAAKU,MAAMgP,eAIvB,wBACEzV,UAAU,iBACV8B,GAAG,oBACHC,QAASgE,KAAKsV,YACdxZ,MAAM,gBACN6L,KAAK,SALP,SAOE,6CAEF,wBACE1N,UAAU,iBACV8B,GAAG,uBACHC,QAASgE,KAAKoV,eACdtZ,MAAM,mBACN6L,KAAK,SALP,SAOE,yD,GA39D4BrH,IAAMqD,W,QC9KhDuU,IAASC,OACP,cAAC,IAAMC,WAAP,UACE,cAAC,GAAD,MAEFjW,SAASC,eAAe,SlB4HpB,kBAAmBiW,WACrBA,UAAUC,cAAcC,MACrBjf,MAAK,SAACkf,GACLA,EAAaC,gBAEdC,OAAM,SAAC1M,GACNzN,QAAQyN,MAAMA,EAAME,YkBvH5B/S,K","file":"static/js/main.000c5a19.chunk.js","sourcesContent":["// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\ntype Config = {\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: Config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n navigator.serviceWorker\n .register(swUrl)\n .then((registration) => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch((error) => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' },\n })\n .then((response) => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then((registration) => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready\n .then((registration) => {\n registration.unregister();\n })\n .catch((error) => {\n console.error(error.message);\n });\n }\n}\n","import { ReportHandler } from 'web-vitals';\n\nconst reportWebVitals = (onPerfEntry?: ReportHandler) => {\n if (onPerfEntry && onPerfEntry instanceof Function) {\n import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\n getCLS(onPerfEntry);\n getFID(onPerfEntry);\n getFCP(onPerfEntry);\n getLCP(onPerfEntry);\n getTTFB(onPerfEntry);\n });\n }\n};\n\nexport default reportWebVitals;\n","import React from 'react';\n\nconst infoColor = 'var(--sn-stylekit-info-color)';\nconst foregroundColor = 'var(--sn-stylekit-foreground-color)';\n\ninterface Icons {\n condition?: boolean;\n fill?: string;\n role: string;\n}\n\nexport const ChevronIconDown: React.FC = ({ fill, role }) => (\n \n \n \n \n \n);\n\nexport const ChevronIconRight: React.FC = ({ fill, role }) => (\n \n \n \n \n \n);\n\nexport const CloseIcon: React.FC = ({ fill, role }) => (\n \n \n \n);\n\nexport const CopyIcon: React.FC = ({ fill, role }) => (\n \n \n \n);\n\nexport const EyeIcon: React.FC = ({ condition, fill, role }) => (\n \n \n \n);\n\nexport const GearIcon: React.FC = ({ condition, fill, role }) => (\n \n \n \n);\n\nexport const HelpIcon: React.FC = ({ condition, fill, role }) => (\n \n \n \n);\n\nexport const MenuIcon: React.FC = ({ condition, fill, role }) => (\n \n \n \n);\n\nexport const PencilIcon: React.FC = ({ condition, fill, role }) => (\n \n \n \n);\n\nexport const PlusIcon: React.FC = ({ condition, fill, role }) => (\n \n \n \n);\n\nexport const PrintIcon: React.FC = ({ fill, role }) => (\n \n \n \n);\n\nexport const RefreshIcon: React.FC = ({ fill, role }) => (\n \n \n \n);\n\nexport const UndoIcon: React.FC = ({ fill, role }) => (\n \n \n \n);\n","// import { Method } from '@testing-library/react';\nimport React from 'react';\nimport { CloseIcon } from './Icons';\n\ninterface PrintDialogTypes {\n cancelText: string;\n confirmText: string;\n helpLink: string;\n onCancel: () => void;\n onConfirm: () => void;\n onUndo: () => void;\n title: string;\n}\n\nconst PrintDialog: React.FC = ({\n cancelText,\n confirmText,\n helpLink,\n onCancel,\n onConfirm,\n onUndo,\n title,\n}) => (\n
\n
\n
\n
\n
\n

{title}

\n \n
\n

\n Need help deciding? Check out the{' '}\n \n documentation\n \n .\n

\n
\n
\n
\n
\n \n \n
\n
\n
\n
\n);\n\nexport default PrintDialog;\n","/**\n * This component is derived from the \"browser-esm-webpack-typescript-react\" found\n * at https://github.com/microsoft/monaco-editor-samples,\n * which is released under MIT, Copyright (c) 2016 Microsoft Corporation.\n * This modified version is released under AGPL-3.0 as indicated in the README.md\n * in the root directory. A copy of AGPL-3.0 is available there.\n * */\nimport React, { useRef, useEffect } from 'react';\nimport * as monaco from 'monaco-editor';\n\nconst debugMode = false;\nconst MonacoEditorContainerID = 'MonacoEditorContainer';\nconst MonacoDiffEditorContainerID = 'MonacoDiffEditorContainer';\n\n/*eslint no-restricted-globals: [\"error\", \"event\", \"monaco\"]*/\n// @ts-ignore\nself.MonacoEnvironment = {\n getWorkerUrl: function (_moduleId: any, label: string) {\n if (label === 'json') {\n return './monaco/json.worker.bundle.js';\n }\n if (label === 'css' || label === 'scss' || label === 'less') {\n return './monaco/css.worker.bundle.js';\n }\n if (label === 'html' || label === 'handlebars' || label === 'razor') {\n return './monaco/html.worker.bundle.js';\n }\n if (label === 'typescript' || label === 'javascript') {\n return './monaco/ts.worker.bundle.js';\n }\n return './monaco/editor.worker.bundle.js';\n },\n};\n\nconst onKeyDown = (keyCode: string, debugMode = false) => {\n if (debugMode) {\n console.log('IKeyboardEvent Up: ' + keyCode);\n }\n};\n\nconst onKeyUp = (keyCode: string, debugMode = false) => {\n if (debugMode) {\n console.log('IKeyboardEvent Up: ' + keyCode);\n }\n};\n\ninterface MonacoEditorTypes {\n fontSize?: string;\n id?: string;\n language?: string;\n onKeyDown?: Function;\n onKeyUp?: Function;\n saveText?: Function;\n tabSize?: number;\n text: string;\n theme?: string;\n viewMode?: boolean;\n}\n\nexport const MonacoEditor: React.FC = ({\n fontSize = '16',\n id = MonacoEditorContainerID,\n language = 'markdown',\n saveText,\n tabSize = 2,\n text,\n theme = 'vs-dark',\n viewMode = false,\n}) => {\n const divEl = useRef(null);\n let editor: monaco.editor.IStandaloneCodeEditor;\n\n if (fontSize === '') {\n fontSize = '16px';\n }\n\n let scrollBeyondLastLine = true;\n if (viewMode) {\n scrollBeyondLastLine = false;\n }\n\n useEffect(() => {\n if (divEl.current) {\n editor = monaco.editor.create(divEl.current, {\n // These are variable: customizable by user or dependent on props\n fontSize: parseInt(fontSize.replace('px', '')),\n language: language,\n tabSize: tabSize,\n theme: theme,\n scrollBeyondLastLine: scrollBeyondLastLine,\n value: [text].join('\\n'),\n\n // These are not customizable\n autoClosingOvertype: 'auto',\n formatOnPaste: true,\n formatOnType: true,\n wordWrap: 'on',\n wrappingStrategy: 'advanced',\n });\n\n // Keyboard Events\n editor.onKeyDown((e: monaco.IKeyboardEvent) => {\n onKeyDown(e.code, debugMode);\n if (e.ctrlKey && e.code === 'KeyS') {\n e.preventDefault();\n }\n });\n editor.onKeyUp((e: monaco.IKeyboardEvent) => {\n onKeyUp(e.code, debugMode);\n });\n\n // Content Change Events\n editor.onDidChangeModelContent(\n (e: monaco.editor.IModelContentChangedEvent) => {\n if (saveText) {\n saveText(editor.getValue());\n }\n }\n );\n }\n return () => {\n editor.dispose();\n };\n }, []);\n return
;\n};\n\ninterface MonacoDiffEditorTypes extends MonacoEditorTypes {\n modifiedText: string;\n}\n\nexport const MonacoDiffEditor: React.FC = ({\n fontSize = '16',\n id = MonacoDiffEditorContainerID,\n language = 'markdown',\n saveText,\n text,\n modifiedText,\n theme = 'vs-dark',\n}) => {\n const divEl = useRef(null);\n let diffEditor: monaco.editor.IStandaloneDiffEditor;\n\n if (fontSize === '') {\n fontSize = '16px';\n }\n\n useEffect(() => {\n if (divEl.current) {\n const originalModel = monaco.editor.createModel(\n [text].join('\\n'),\n language\n );\n const modifiedModel = monaco.editor.createModel(\n [modifiedText].join('\\n'),\n language\n );\n\n diffEditor = monaco.editor.createDiffEditor(divEl.current, {\n // Same settings as above\n // These are variable: customizable by user or dependent on props\n fontSize: parseInt(fontSize.replace('px', '')),\n theme: theme,\n\n // These are not customizable\n autoClosingOvertype: 'auto',\n formatOnPaste: true,\n formatOnType: true,\n wordWrap: 'on',\n wrappingStrategy: 'advanced',\n\n // Specific to Diff Editor\n originalEditable: true, // for left panel\n readOnly: true, // for right panel\n });\n diffEditor.setModel({\n original: originalModel,\n modified: modifiedModel,\n });\n\n // Content Change Events\n originalModel.onDidChangeContent(\n (e: monaco.editor.IModelContentChangedEvent) => {\n if (saveText) {\n saveText(originalModel.getValue());\n }\n }\n );\n }\n return () => {\n diffEditor.dispose();\n };\n }, []);\n return (\n
\n );\n};\n","/**\n * This component is derived from the example found at\n * https://github.com/outline/rich-markdown-editor/blob/develop/example/src/index.js,\n * which is released under BSD-3 License, Copyright (c) 2020 General Outline,\n * Inc (https://www.getoutline.com/) and individual contributors.\n * This modified version is released under AGPL-3.0 as indicated in the README.md\n * in the root directory. A copy of AGPL-3.0 is available there.\n * */\n\nimport * as React from 'react';\nimport debounce from 'lodash/debounce';\nimport RichMarkdownEditor from 'rich-markdown-editor';\n\nclass YouTubeEmbed extends React.Component {\n render() {\n const { attrs } = this.props;\n const videoId = attrs.matches[1];\n\n return (\n \n );\n }\n}\n\ninterface DynamicProps {\n debugMode: boolean;\n onChange: (text: string) => void;\n readOnly: boolean;\n text: string;\n}\n\ninterface DynamicState {\n readOnly: boolean;\n template: boolean;\n value: undefined;\n}\n\nexport default class DynamicEditor extends React.Component<\n DynamicProps,\n DynamicState\n> {\n constructor(props: DynamicProps) {\n super(props);\n this.state = {\n readOnly: this.props.readOnly,\n template: false,\n value: undefined,\n };\n }\n\n handleToggleReadOnly = () => {\n this.setState({ readOnly: !this.state.readOnly });\n };\n\n handleChange = debounce((value) => {\n const text = value();\n if (this.props.debugMode) {\n console.log(text);\n }\n this.props.onChange(text);\n }, 50);\n\n render() {\n return (\n {\n if (this.props.debugMode) {\n console.log('Cancel triggered');\n }\n }}\n autoFocus\n onChange={(value) => this.handleChange(value)}\n embeds={[\n {\n title: 'YouTube',\n keywords: 'youtube video tube google',\n icon: () => (\n \n ),\n //@ts-ignore\n matcher: (url) => {\n return url.match(\n /(?:https?:\\/\\/)?(?:www\\.)?youtu\\.?be(?:\\.com)?\\/?.*(?:watch|embed)?(?:.*v=|v\\/|\\/)([a-zA-Z0-9_-]{11})$/i\n );\n },\n component: YouTubeEmbed,\n },\n ]}\n />\n );\n }\n}\n","import React from 'react';\nimport { EditingModes, HtmlClassName } from './AppendEditor';\nimport { MonacoEditor } from './Monaco';\nimport DynamicEditor from './DynamicEditor';\n\nimport { HtmlElementId } from './AppendEditor';\n\ninterface EditProps {\n debugMode: boolean;\n editingMode?: string;\n fontSize: string;\n keyMap: any;\n monacoEditorLanguage: string;\n onKeyDown: Function;\n onKeyUp: Function;\n onKeyDownEditTextArea: Function;\n onKeyDownTextArea: Function;\n saveText: Function;\n text: string;\n viewMode: boolean | undefined;\n}\n\ninterface EditState {\n text: string;\n}\n\nexport default class EditNote extends React.Component {\n static defaultProps = {\n // none\n };\n\n constructor(props: EditProps) {\n super(props);\n\n this.state = {\n text: this.props.text,\n };\n }\n\n handleInputChange = (event: React.ChangeEvent) => {\n const target = event.target;\n const value = target.value;\n\n this.setState(\n {\n text: value,\n },\n () => {\n this.props.saveText(this.state.text);\n }\n );\n };\n\n saveText = (text: string) => {\n this.setState(\n {\n text,\n },\n () => {\n this.props.saveText(this.state.text);\n }\n );\n };\n\n onBlur = (e: React.FocusEvent) => {\n const content = document.getElementById(HtmlElementId.content);\n if (content) {\n content.classList.remove(HtmlClassName.focused);\n }\n };\n\n onFocus = (e: React.FocusEvent) => {\n const content = document.getElementById(HtmlElementId.content);\n if (content) {\n content.classList.add(HtmlClassName.focused);\n }\n };\n\n onKeyDown = (e: React.KeyboardEvent) => {\n this.props.onKeyDown(e);\n this.props.onKeyDownEditTextArea(e);\n this.props.onKeyDownTextArea(e);\n };\n\n onKeyUp = (event: React.KeyboardEvent) => {\n this.props.keyMap.delete(event.key);\n this.props.onKeyUp(event);\n };\n\n render() {\n const { text } = this.state;\n return (\n \n \n {this.props.editingMode === EditingModes.useMonacoEditor ? (\n \n ) : this.props.editingMode === EditingModes.useDynamicEditor ? (\n
\n \n
\n ) : (\n \n )}\n \n \n );\n }\n}\n","import { HtmlElementId } from '../components/AppendEditor';\n\nexport const clickAppendButton = () => {\n const appendButton = document.getElementById(HtmlElementId.appendButton);\n if (appendButton) {\n appendButton.click();\n }\n};\n\nexport const clickEditButton = () => {\n const editButton = document.getElementById(HtmlElementId.editButton);\n if (editButton) {\n editButton.click();\n }\n};\n\nexport const clickHelpButton = () => {\n const helpButton = document.getElementById(HtmlElementId.helpButton);\n if (helpButton) {\n helpButton.click();\n }\n};\n\nexport const clickMenuButton = () => {\n const menuButton = document.getElementById(HtmlElementId.menuButton);\n if (menuButton) {\n menuButton.click();\n }\n};\n\nexport const clickSettingsButton = () => {\n const settingsButton = document.getElementById(HtmlElementId.settingsButton);\n if (settingsButton) {\n settingsButton.click();\n }\n};\n\nexport const clickViewButton = () => {\n const viewButton = document.getElementById(HtmlElementId.viewButton);\n if (viewButton) {\n viewButton.click();\n }\n};\n","import React from 'react';\nimport { GearIcon, HelpIcon, MenuIcon } from './Icons';\nimport {\n clickHelpButton,\n clickMenuButton,\n clickSettingsButton,\n} from '../lib/clickButton';\n\ninterface HelpProps {\n debugMode: boolean;\n printURL: boolean;\n}\n\ninterface HelpState {\n showFeelings: boolean;\n showMoreQuestions: boolean;\n showFeedback: boolean;\n}\n\nexport default class Help extends React.Component {\n constructor(props: HelpProps) {\n super(props);\n\n this.state = {\n showFeelings: false,\n showMoreQuestions: false,\n showFeedback: false,\n };\n }\n\n onToggleShowFeelings = () => {\n this.setState({\n showFeelings: !this.state.showFeelings,\n });\n };\n\n onToggleShowMoreQuestions = () => {\n this.setState({\n showMoreQuestions: !this.state.showMoreQuestions,\n });\n };\n\n onToggleShowFeedback = () => {\n this.setState({\n showFeedback: !this.state.showFeedback,\n });\n };\n\n render() {\n return (\n
\n
\n

Append Editor Help

\n

\n The Append Editor is an unofficial{' '}\n \n editor\n {' '}\n for{' '}\n \n Standard Notes\n \n , a free,{' '}\n \n open-source\n \n , and{' '}\n \n end-to-end encrypted\n {' '}\n notes app. The Append Editor is also free software licensed under{' '}\n \n AGPL-3.0\n \n . Its source code is available on{' '}\n \n GitHub\n \n .\n

\n

Append Editor Features

\n

\n The Append Editor supports{' '}\n \n Markdown\n {' '}\n with{' '}\n \n KaTeX\n \n , syntax highlighting, in-line HTML, table of contents, footnotes,\n auto-linking,{' '}\n \n emoji codes\n \n , and more.{' '}\n

\n

\n There are four editing modes: Plain Textarea, CodeMirror, Dynamic, and\n Monaco. You can read about each mode and choose which to use in the\n Settings\n \n  \n \n  \n \n . You can also choose default and per-note font sizes, font families,\n and custom styles (CSS).\n

\n

\n The Menu\n \n  \n \n  \n \n has additional options to customize the appearance of the editor,\n share your note, and perform actions to quickly format and edit\n Markdown text.\n

\n

\n A more detailed documentation of the Append Editor is available at{' '}\n \n appendeditor.com\n \n . If you like the Append Editor, please support it by giving it a star\n on{' '}\n \n GitHub\n \n .{' '}\n \n 🙂\n {' '}\n

\n

How to install the Append Editor in Standard Notes

\n
    \n
  1. \n Download, install, and sign in to the Standard Notes{' '}\n \n Desktop\n {' '}\n app.\n
  2. \n
  3. \n In the bottom left corner of the app, click Extensions.\n
  4. \n
  5. \n Click Import Extensions and paste the following link into the\n input box. If you want to use the alpha version, replace{' '}\n beta with alpha:{' '}\n \n \n https://raw.githubusercontent.com/TheodoreChu/append-editor/main/public/beta.ext.json\n \n \n
  6. \n
  7. \n Press Enter or Return on your keyboard.\n
  8. \n
  9. \n The title of your selected note is near the top of the app. Under\n the title, click Editor, click Append Editor, and\n click Continue to begin using the editor. Enjoy!{' '}\n \n 👏\n {' '}\n
  10. \n
\n

\n After you install the editor on the desktop app, it will automatically\n sync to the{' '}\n \n web\n {' '}\n and{' '}\n \n mobile apps\n {' '}\n after you sign in.\n

\n

What to write about

\n

\n The Append Editor is great for writing articles, blog posts,\n checklists, code snippets, documentation, emails, essays, journals,\n lists, logs, notes, tables, todo lists, and much more. Here are some\n questions to help you get started with today's daily journal:\n

{' '}\n
    \n
  • How are you? What's happening?
  • \n
  • What might be affecting your mood?
  • \n
  • Which feelings fit your mood and to what extent?
  • \n
    \n \n {!this.state.showFeelings && [\n

    Show feelings

    ,\n ]}\n {this.state.showFeelings && [\n

    Hide feelings

    ,\n ]}\n
    \n
  • \n Positive Feelings: bold, calm, cheerful, confident,\n content, eager, ecstatic, energized, engaged, enthusiastic,\n excited, grateful, happy, humorous, inspired, joyful, light,\n lively, loving, motivated, optimistic, passionate, peaceful,\n playful, proud, reassured, refreshed, relaxed, relieved,\n satisfied, secure, surprised, thrilled, wonderful\n
  • \n
  • \n Negative Feelings: afraid, angry, annoyed, anxious,\n ashamed, bored, burnt out, confused, demoralized, depressed,\n disappointed, disgusted, distraught, embarrassed, empty,\n exhausted, frustrated, furious, guilty, heavy, insecure,\n irritated, jealous, jittery, lethargic, lonely, nervous, numb,\n resentful, sad, self-conscious, sleepy, stressed, tired, winded,\n worried\n
  • \n
    \n
  • What thoughts are contributing to the way you're feeling?
  • \n
    \n \n {!this.state.showMoreQuestions && [\n

    Show more questions

    ,\n ]}\n {this.state.showMoreQuestions && [\n

    Show fewer questions

    ,\n ]}\n
    \n
    \n {this.state.showMoreQuestions && [\n
    \n
  • \n What do you hope your life will look like in a week? a month? a\n year?\n
  • \n
  • \n What can you do today to make your life the way you want it?\n
  • \n
  • \n How will you feel when you've realized the goals that you have\n for yourself?\n
  • \n
  • Who or what do you feel grateful for and why?
  • \n
  • What did you enjoy about today?
  • \n
    ,\n ]}\n
\n
\n \n

Need more help?

\n
\n {this.state.showFeedback && [\n

\n Feel free to{' '}\n \n reach out\n {' '}\n if you have any questions, comments, concerns, or feedback.{' '}\n \n 👋\n \n
\n If you find any bugs or have a feature request, please{' '}\n \n open an issue on GitHub\n \n .{' '}\n \n 🙂\n \n
\n You are using version 1.2.4. The release notes and\n change log are available on{' '}\n \n GitHub\n \n .\n

,\n ]}\n
\n Click Help\n \n  \n \n  \n \n to close this section.\n
\n
\n );\n }\n}\n","import React from 'react';\nimport { EyeIcon, HelpIcon, PencilIcon, PlusIcon } from './Icons';\nimport {\n clickAppendButton,\n clickEditButton,\n clickHelpButton,\n clickViewButton,\n} from '../lib/clickButton';\n\ninterface IntroProps {\n appendMode: boolean;\n editMode: boolean;\n showHelp: boolean;\n}\n\nconst Intro: React.FC = ({ appendMode, editMode, showHelp }) => (\n
\n
\n \n Welcome to the Append Editor!{' '}\n \n 👋\n {' '}\n Your note is empty.{' '}\n \n 🙂\n {' '}\n Click here to get started.{' '}\n \n 📝\n \n \n

To get started:

\n
    \n
  • \n

    \n Click the Pencil\n \n  \n \n  \n \n to toggle Edit Mode\n

    \n
  • \n
  • \n

    \n Click the Plus\n \n  \n \n  \n \n to toggle Append Mode\n

    \n
  • \n
\n

\n View Mode is currently on. When you type in{' '}\n Edit Mode, your note will automatically render here. In{' '}\n Append Mode, clicking Append will add the text in the\n textarea to the end of your note. Click the Eye\n \n  \n \n  \n \n to turn View Mode off and switch to Edit Only Mode.\n

\n

\n If you are using the demo at{' '}\n \n beta.appendeditor.com\n \n , then your notes will be lost after you close the page.\n

\n

\n If you want to save your notes, then click Help\n \n  \n \n  \n \n and follow the instructions on how to install the Append Editor in{' '}\n \n Standard Notes\n \n , a free,{' '}\n \n open-source\n \n , and{' '}\n \n end-to-end encrypted\n {' '}\n notes app.\n

\n

\n If you like Standard Notes, please check out Standard Notes{' '}\n \n Extended\n {' '}\n for more editors, themes, components, and methods to backup up your\n data.\n

\n

\n Happy note-taking!{' '}\n \n 😄\n \n

\n
\n
\n);\n\nexport default Intro;\n","import React, { ReactNode } from 'react';\nimport unified from 'unified';\nimport parse from 'remark-parse';\nimport remark2rehype from 'remark-rehype';\nimport rehype2react from 'rehype-react';\nimport { debounce, throttle } from 'lodash';\n\n// Remark\nconst breaks = require('remark-breaks');\nconst externalLinks = require('remark-external-links');\nconst footnotes = require('remark-footnotes');\nconst gfm = require('remark-gfm');\nconst gemoji = require('remark-gemoji');\nconst math = require('remark-math');\nconst slug = require('remark-slug');\nconst toc = require('remark-toc');\n\n// Rehype\nconst highlight = require('rehype-highlight');\nconst rehypeKatex = require('rehype-katex');\nconst raw = require('rehype-raw');\n\nconst processor = unified()\n .use(parse)\n .use(gfm)\n .use(breaks)\n .use(slug)\n .use(toc, { maxDepth: 6 })\n .use(externalLinks)\n .use(footnotes, { inlineNotes: true })\n .use(gemoji)\n .use(remark2rehype, { allowDangerousHtml: true })\n .use(raw)\n .use(math)\n .use(rehypeKatex)\n .use(highlight, { ignoreMissing: true })\n .use(rehype2react, { createElement: React.createElement });\n\nexport const processMarkdown = (text: string) => {\n const markdown = processor.processSync(text).result as ReactNode;\n return markdown;\n};\n\n/** Throttle instead of debounce because\n * we want it to work even when typing\n * lots of characters in a short amount of time. */\nexport const isLongString = throttle((text: string) => {\n //console.log('length', text.length);\n if (text.length > 10000) {\n return true;\n } else {\n return false;\n }\n}, 1000);\n\n/** Debounce the rendering of long notes to prevent lagging.\n * There is no max on the debounce to prevent lagging\n * even for very, very long notes */\nexport const renderLongMarkdown = debounce((text: string) => {\n //console.log('renderLongMarkdownText');\n const markdown = processMarkdown(text);\n return markdown;\n}, 500);\n\nexport const renderMarkdown = (text: string, bypassDebounce: boolean) => {\n if (bypassDebounce) {\n //console.log('renderBypassDebounceText');\n const markdown = processMarkdown(text);\n return markdown;\n }\n let textIsLong = false as boolean | undefined;\n textIsLong = isLongString(text);\n //console.log('textIsLong', textIsLong);\n if (textIsLong) {\n return renderLongMarkdown(text);\n } else {\n //console.log('renderShortMarkdownText');\n const markdown = processMarkdown(text);\n return markdown;\n }\n};\n","import React from 'react';\nimport { EditingModes, HtmlElementId } from './AppendEditor';\nimport DynamicEditor from './DynamicEditor';\nimport Help from './Help';\nimport Intro from './Intro';\nimport { renderMarkdown } from '../lib/renderMarkdown';\n\ninterface ViewProps {\n appendMode: boolean;\n bypassDebounce: boolean;\n debugMode: boolean;\n editMode: boolean;\n editingMode?: string;\n monacoEditorLanguage: string;\n printURL: boolean;\n saveText: (text: string) => void;\n showHelp: boolean;\n text: string;\n}\n\ninterface ViewState {\n showHelp: boolean;\n}\n\nexport default class ViewNote extends React.Component {\n constructor(props: ViewProps) {\n super(props);\n\n this.state = {\n showHelp: this.props.showHelp,\n };\n }\n\n onToggleShowHelp = () => {\n const helpButton = document.getElementById('helpButton');\n if (helpButton) {\n helpButton.click();\n }\n };\n\n renderMarkdown = (text: string) => {\n const markdown = renderMarkdown(text, this.props.bypassDebounce);\n return markdown;\n };\n\n render() {\n const { text } = this.props;\n return (\n \n
\n {!text && [\n ,\n ]}\n {this.state.showHelp && [\n ,\n ]}\n \n {this.props.editingMode === EditingModes.useMonacoEditor &&\n this.props.monacoEditorLanguage !== 'markdown' &&\n this.props.monacoEditorLanguage !== 'html' &&\n text ? (\n this.renderMarkdown(\n '```' + this.props.monacoEditorLanguage + '\\n' + text + '\\n```'\n )\n ) : this.props.editingMode === EditingModes.useDynamicEditor ? (\n \n ) : (\n this.renderMarkdown(text)\n )}\n
\n \n \n );\n }\n}\n","import React from 'react';\nimport { EditingModes } from './AppendEditor';\nimport DynamicEditor from './DynamicEditor';\nimport { MonacoEditor } from './Monaco';\n\nimport { HtmlElementId } from './AppendEditor';\n\ninterface AppendProps {\n appendNewLine: boolean;\n appendNewParagraph: boolean;\n appendRows: number;\n appendTextToNote: Function;\n editingMode?: string;\n fontSize: string;\n keyMap: Map;\n debugMode: boolean;\n autoSaveAppendText: Function;\n autoSaveCheckBoxes: Function;\n monacoEditorLanguage: string;\n onKeyDown: Function;\n onKeyUp: Function;\n onKeyDownAppendTextArea: Function;\n onKeyDownTextArea: Function;\n text: string;\n}\n\ninterface AppendState {\n text: string;\n newLine: boolean;\n newParagraph: boolean;\n [x: string]: string | boolean;\n}\n\nexport default class AppendText extends React.Component<\n AppendProps,\n AppendState\n> {\n static defaultProps = {\n // none\n };\n\n constructor(props: AppendProps) {\n super(props);\n\n this.state = {\n text: this.props.text,\n newLine: this.props.appendNewLine,\n newParagraph: this.props.appendNewParagraph,\n useMonacoEditor: this.props.editingMode === EditingModes.useMonacoEditor,\n useDynamicEditor:\n this.props.editingMode === EditingModes.useDynamicEditor,\n };\n }\n\n handleInputChange = (event: React.ChangeEvent) => {\n const target = event.target;\n const value = target.type === 'checkbox' ? target.checked : target.value;\n const name = target.name;\n this.setState(\n {\n [name]: value,\n },\n () => {\n // This callback saves the checkboxes\n this.autoSaveCheckBoxes();\n }\n );\n };\n\n // This is an almost duplicate of the above editor. Here we don't save the checkboxes to improve performance\n handleTextAreaChange = (event: any) => {\n const target = event.target;\n const value = target.value;\n this.setState(\n {\n text: value,\n },\n () => {\n // This callback saves the append text\n this.autoSaveAppendText();\n }\n );\n };\n\n saveText = (text: string) => {\n this.setState(\n {\n text,\n },\n () => {\n this.props.autoSaveAppendText(this.state.text);\n }\n );\n };\n\n appendTextToNote = () => {\n this.props.appendTextToNote();\n this.setState({\n text: '',\n });\n const appendTextArea = document.getElementById(\n HtmlElementId.appendTextArea\n );\n if (appendTextArea) {\n appendTextArea.focus();\n }\n // Refresh Monaco Editor after appending text to note\n if (this.state.useMonacoEditor) {\n this.setState(\n {\n useMonacoEditor: false,\n },\n () => {\n this.setState({\n useMonacoEditor: true,\n });\n }\n );\n }\n // Refresh Dynamic Editor after appending text to note\n if (this.state.useDynamicEditor) {\n this.setState(\n {\n useDynamicEditor: false,\n },\n () => {\n this.setState({\n useDynamicEditor: true,\n });\n }\n );\n }\n };\n\n autoSaveAppendText = () => {\n const text = this.state.text;\n this.props.autoSaveAppendText(text);\n };\n\n autoSaveCheckBoxes = () => {\n const newLine = this.state.newLine;\n const newParagraph = this.state.newParagraph;\n this.props.autoSaveCheckBoxes(newLine, newParagraph);\n };\n\n onKeyDown = (e: React.KeyboardEvent) => {\n this.props.keyMap.set(e.key, true);\n if (this.props.debugMode) {\n console.log(\n 'Keys pressed: ' +\n e.key +\n 'KeyMap for key: ' +\n this.props.keyMap.get(e.key)\n );\n console.log('Append Text Value: ' + this.state.text);\n }\n\n this.props.onKeyDown(e);\n this.props.onKeyDownAppendTextArea(e);\n this.props.onKeyDownTextArea(e);\n // Append Text if Ctrl and 'Enter' are pressed\n if (this.props.keyMap.get('Control') && this.props.keyMap.get('Enter')) {\n e.preventDefault();\n this.appendTextToNote();\n }\n // Append Text if Ctrl and 's' are pressed\n else if (this.props.keyMap.get('Control') && this.props.keyMap.get('s')) {\n e.preventDefault();\n this.appendTextToNote();\n }\n };\n\n onKeyUp = (event: React.KeyboardEvent) => {\n this.props.keyMap.delete(event.key);\n this.props.onKeyUp(event);\n };\n\n render() {\n const { text } = this.state;\n\n return (\n \n \n {this.state.useMonacoEditor ? (\n // We use this.state instead of this.props so we can easily refresh it on Append\n \n ) : this.state.useDynamicEditor ? (\n
\n \n
\n ) : (\n \n )}\n \n
\n
\n \n
\n \n
\n
\n \n
Append
\n \n
\n
\n \n );\n }\n}\n","import React from 'react';\nimport {\n ChevronIconDown,\n ChevronIconRight,\n CopyIcon,\n EyeIcon,\n PencilIcon,\n PrintIcon,\n UndoIcon,\n} from './Icons';\n\ninterface ActionButtonTypes {\n caption?: string;\n className?: string;\n fill?: string;\n id?: string;\n title: string;\n onClick: () => void;\n}\n\ninterface ConditionalButtonTypes extends ActionButtonTypes {\n condition?: boolean | undefined;\n messageOn?: string;\n messageOff?: string;\n}\n\nexport const ChevronToggleButton: React.FC = ({\n caption,\n className,\n condition,\n onClick,\n title,\n}) => (\n \n);\n\nexport const CopyButton: React.FC = ({\n caption,\n className,\n fill,\n onClick,\n title,\n}) => (\n \n);\n\nexport const EyeButton: React.FC = ({\n caption,\n className,\n condition,\n messageOn,\n messageOff,\n onClick,\n title,\n}) => (\n \n);\n\nexport const PencilButton: React.FC = ({\n caption,\n className,\n fill,\n onClick,\n title,\n}) => (\n \n);\n\nexport const PrintButton: React.FC = ({\n caption,\n className,\n fill,\n id,\n onClick,\n title,\n}) => (\n \n);\n\nexport const UndoButton: React.FC = ({\n className,\n fill,\n id,\n onClick,\n title,\n}) => (\n \n);\n","import React from 'react';\nimport prettier from 'prettier';\nimport parserMarkdown from 'prettier/parser-markdown';\nimport { EditingModes } from './AppendEditor';\nimport {\n ChevronToggleButton,\n CopyButton,\n EyeButton,\n PencilButton,\n PrintButton,\n} from './Buttons';\n\n// Import types\nimport { HtmlElementId } from './AppendEditor';\n\nenum HtmlClassName {\n chevronToggleButton = 'menu-button chevron-toggle-button',\n menuButton = 'menu-button',\n on = ' on',\n off = ' off',\n}\n\ninterface MenuProps {\n borderlessMode?: boolean;\n editingMode?: string;\n fixedHeightMode?: boolean;\n fullWidthMode?: boolean;\n monacoEditorLanguage: string;\n onConfirmPrintUrl: () => void;\n overflowMode?: boolean;\n refreshEdit: () => void;\n refreshView: () => void;\n saveText: (text: string) => void;\n showMenuOptionsEdit?: boolean;\n //showMenuOptionsMonacoEditor?: boolean;\n showMenuOptionsShare?: boolean;\n showMenuOptionsView?: boolean;\n text: string;\n toggleBorderlessMode: () => void;\n toggleFixedHeightMode: () => void;\n toggleFullWidthMode: () => void;\n toggleOverflowMode: () => void;\n toggleShowMenu: () => void;\n toggleShowMenuOptionsEdit: () => void;\n //toggleShowMenuOptionsMonacoEditor?: () => void;\n toggleShowMenuOptionsView: () => void;\n toggleShowMenuOptionsShare: () => void;\n viewMode?: boolean;\n}\n\ninterface MenuState {\n message?: string;\n displayMessageShare: boolean;\n displayMessageEdit: boolean;\n}\n\nexport default class Menu extends React.Component {\n clearTooltipTimer: NodeJS.Timeout | undefined;\n constructor(props: MenuProps) {\n super(props);\n this.state = {\n message: '',\n displayMessageEdit: false,\n displayMessageShare: false,\n };\n }\n\n resetMessageTimer = () => {\n if (this.clearTooltipTimer) {\n clearTimeout(this.clearTooltipTimer);\n }\n this.clearTooltipTimer = setTimeout(() => {\n this.setState({\n displayMessageEdit: false,\n displayMessageShare: false,\n });\n }, 5000);\n };\n\n showMessageEdit = () => {\n this.setState(\n {\n displayMessageEdit: true,\n displayMessageShare: false,\n },\n () => {\n this.resetMessageTimer();\n }\n );\n };\n showMessageShare = () => {\n this.setState(\n {\n displayMessageEdit: false,\n displayMessageShare: true,\n },\n () => {\n this.resetMessageTimer();\n }\n );\n };\n\n copyToClipboard = (text: string) => {\n const textField = document.createElement('textarea');\n textField.value = text;\n document.body.appendChild(textField);\n textField.select();\n document.execCommand('copy');\n this.showMessageShare();\n textField.remove();\n };\n\n copyText = () => {\n if (this.props.text) {\n this.setState({ message: 'Copied Text to clipboard' }, () => {\n this.copyToClipboard(this.props.text);\n });\n } else {\n this.setState({ message: 'No text to copy. Your note is empty' }, () => {\n this.showMessageShare();\n });\n }\n };\n\n copyHtml = () => {\n if (!this.props.viewMode) {\n this.setState(\n { message: 'Unable to copy HTML. Please turn View Mode on' },\n () => this.showMessageShare()\n );\n } else if (!this.props.text) {\n this.setState({ message: 'No HTML to copy. Your note is empty' }, () => {\n this.showMessageShare();\n });\n } else {\n const renderedNote = document.getElementById('renderedNote');\n if (renderedNote?.firstElementChild?.innerHTML) {\n this.setState({ message: 'Copied HTML to clipboard' });\n this.copyToClipboard(renderedNote?.firstElementChild.innerHTML);\n }\n }\n };\n\n formatText = () => {\n if (\n this.props.monacoEditorLanguage !== 'markdown' &&\n this.props.editingMode === EditingModes.useMonacoEditor\n ) {\n this.setState(\n {\n message:\n 'Error: Your Monaco Editor language is not Markdown. Formatting is only available for Markdown',\n },\n () => {\n this.showMessageEdit();\n }\n );\n } else if (this.props.text) {\n this.setState(\n { message: 'Formatted Markdown text with Prettier' },\n () => {\n try {\n const formattedText = prettier.format(this.props.text, {\n parser: 'markdown',\n plugins: [parserMarkdown],\n });\n this.props.saveText(formattedText);\n this.props.refreshEdit();\n this.props.refreshView();\n this.showMessageEdit();\n } catch (e) {\n this.setState({ message: 'Error formatting text: ' + e }, () => {\n this.showMessageEdit();\n });\n console.log('Error formatting text: ' + e);\n }\n }\n );\n } else {\n this.setState(\n { message: 'No text to format. Your note is empty' },\n () => {\n this.showMessageEdit();\n }\n );\n }\n };\n\n uncheckBoxes = () => {\n const { text } = this.props;\n const checkedBoxes = new RegExp(/- \\[x\\]/gm);\n if (checkedBoxes.test(text)) {\n const newText = text.replace(checkedBoxes, '- [ ]');\n this.props.saveText(newText);\n this.props.refreshEdit();\n this.props.refreshView();\n this.setState({ message: 'Unchecked all checkboxes' }, () => {\n this.showMessageEdit();\n });\n } else {\n this.setState({ message: 'No checked checkboxes found' }, () => {\n this.showMessageEdit();\n });\n }\n };\n\n render() {\n // You can render any custom fallback UI\n return [\n
,\n
\n \n {this.props.showMenuOptionsView && [\n ,\n ,\n ,\n ,\n ]}\n \n {this.props.showMenuOptionsShare && [\n ,\n ,\n ,\n \n

\n {this.state.message}\n

\n
,\n ]}\n \n {this.props.showMenuOptionsEdit && [\n ,\n ,\n \n

\n {this.state.message}\n

\n
,\n ]}\n
\n ,\n ];\n }\n}\n","import React from 'react';\nimport { MonacoEditor } from './Monaco';\nimport {\n DefaultSettings,\n EditingModes,\n SaveSettingsInterface,\n} from './AppendEditor';\nimport { CloseIcon, RefreshIcon } from './Icons';\nimport { ChevronToggleButton, UndoButton } from './Buttons';\n\nconst customStylesID = 'customStyles';\nconst editingModeID = 'editingMode';\nconst fontEditID = 'fontEdit';\nconst fontSizeID = 'fontSize';\nconst fontViewID = 'fontView';\nconst monacoEditorLanguageID = 'monacoEditorLanguage';\nconst resetAllSettingsID = 'resetAllSettings';\nconst saveAsDefaultID = 'saveAsDefault';\n\ninterface SettingsProps {\n defaultSettings: DefaultSettings;\n customStyles: string;\n editingMode?: string;\n fontEdit: string;\n fontSize: string;\n fontView: string;\n monacoEditorLanguage: string;\n cancelText: string;\n confirmText: string;\n debugMode: boolean;\n keyMap: Map;\n onCancel: () => void;\n onConfirm: (object: SaveSettingsInterface) => void;\n title: string;\n helpLink: string;\n}\n\ninterface SettingsState {\n customStyles: string;\n editingMode: string;\n fontEdit: string;\n fontSize: string;\n fontView: string;\n monacoEditorLanguage: string;\n saveAsDefault: boolean;\n showCustomStyles: boolean;\n [x: string]: string | boolean;\n}\n\nconst startRegExp = new RegExp(/```css\\n/gm);\nconst cssRegExp = new RegExp(/```css/gm);\nconst endRegExp = new RegExp(/\\n```/gm);\nconst codeRegExp = new RegExp(/```/gm);\n\nexport default class Settings extends React.Component<\n SettingsProps,\n SettingsState\n> {\n constructor(props: SettingsProps) {\n super(props);\n let monacoEditorLanguage = 'markdown';\n if (this.props.monacoEditorLanguage) {\n monacoEditorLanguage = this.props.monacoEditorLanguage;\n }\n let editingMode = 'usePlainText';\n if (this.props.editingMode) {\n editingMode = this.props.editingMode;\n }\n this.state = {\n customStyles: this.props.customStyles,\n editingMode,\n fontEdit: this.props.fontEdit,\n fontSize: this.props.fontSize,\n fontView: this.props.fontView,\n monacoEditorLanguage,\n saveAsDefault: false,\n showCustomStyles: false, // false by default for a mobile-first experience\n };\n }\n\n handleInputChange = (event: React.ChangeEvent) => {\n const target = event.target;\n const value = target.type === 'checkbox' ? target.checked : target.value;\n const name = target.name;\n this.setState({\n [name]: value,\n });\n if (this.props.debugMode) {\n console.log(\n 'Settings event name: ' +\n event.target.name +\n ' Value: ' +\n event.target.value\n );\n }\n };\n\n handleSelectChange = (event: React.ChangeEvent) => {\n const target = event.target;\n const value = target.value;\n const name = target.name;\n this.setState(\n {\n [name]: value,\n },\n () => {\n if (this.props.debugMode) {\n console.log(\n 'Saved select. Name: ' +\n event.target.name +\n ' Value: ' +\n event.target.value\n );\n }\n }\n );\n };\n\n toggleShowCustomStyles = () => {\n this.setState({\n showCustomStyles: !this.state.showCustomStyles,\n });\n };\n\n cleanCustomStyles = (text: string) => {\n if (text) {\n return text\n .replace(startRegExp, '')\n .replace(cssRegExp, '')\n .replace(endRegExp, '')\n .replace(codeRegExp, '');\n } else {\n return text;\n }\n };\n\n saveText = (text: string) => {\n this.setState({\n customStyles: text,\n });\n };\n\n handleSubmit = () => {\n if (this.props.debugMode) {\n let fontEditMessage = '';\n let fontViewMessage = '';\n if (this.state.fontEdit === '' || this.state.fontEdit === undefined) {\n fontEditMessage = 'Default';\n } else if (this.state.fontEdit) {\n fontEditMessage = this.state.fontEdit;\n }\n if (this.state.fontView === '' || this.state.fontView === undefined) {\n fontViewMessage = 'Default';\n } else if (this.state.fontView) {\n fontViewMessage = this.state.fontView;\n }\n console.log(\n 'Settings.tsx handleSubmit() triggered: ' +\n '\\n - Settings editingMode: ' +\n this.state.editingMode +\n '\\n - Settings fontEdit: ' +\n this.state.fontEdit +\n '\\n - Settings fontView: ' +\n this.state.fontView +\n '\\n - Your chosen font for Edit/Append is: ' +\n fontEditMessage +\n '\\n - Your chosen font for View/Print is: ' +\n fontViewMessage +\n '\\n'\n );\n }\n this.setState(\n {\n // clean the custom styles prior to saving them\n customStyles: this.cleanCustomStyles(this.state.customStyles),\n },\n () => {\n if (this.props.debugMode) {\n console.log('Your custom styles: ' + this.state.customStyles);\n }\n const {\n customStyles,\n editingMode,\n fontEdit,\n fontSize,\n fontView,\n monacoEditorLanguage,\n saveAsDefault,\n } = this.state;\n this.props.onConfirm({\n customStyles,\n editingMode,\n fontEdit,\n fontSize,\n fontView,\n monacoEditorLanguage,\n saveAsDefault,\n });\n }\n );\n };\n\n loadDefaultSettings = () => {\n const defaultSettings = this.props.defaultSettings;\n this.setState(\n {\n ...defaultSettings,\n },\n () => {\n this.refreshCustomStyles();\n }\n );\n };\n\n refreshCustomStyles = () => {\n this.setState(\n {\n showCustomStyles: !this.state.showCustomStyles,\n },\n () => {\n this.setState({\n showCustomStyles: !this.state.showCustomStyles,\n });\n }\n );\n };\n\n clearCustomStyles = () => {\n this.setState(\n {\n customStyles: '',\n },\n () => {\n this.refreshCustomStyles();\n if (this.props.debugMode) {\n console.log('customStyles reset: ' + this.state.customStyles);\n }\n }\n );\n const customStyles = document.getElementById(\n customStylesID\n ) as HTMLTextAreaElement;\n if (customStyles) {\n customStyles.value = '';\n customStyles.focus();\n }\n };\n\n clearFontEdit = () => {\n this.setState({\n fontEdit: '',\n });\n const fontEdit = document.getElementById(fontEditID) as HTMLTextAreaElement;\n if (fontEdit) {\n fontEdit.value = '';\n fontEdit.focus();\n }\n };\n\n clearFontSize = () => {\n this.setState({\n fontSize: '',\n });\n const fontSize = document.getElementById(fontSizeID) as HTMLSelectElement;\n if (fontSize) {\n fontSize.value = '';\n fontSize.focus();\n }\n };\n\n clearFontView = () => {\n this.setState({\n fontView: '',\n });\n const fontView = document.getElementById(fontViewID) as HTMLTextAreaElement;\n if (fontView) {\n fontView.value = '';\n fontView.focus();\n }\n };\n\n clearEditingMode = () => {\n this.setState({\n editingMode: EditingModes.usePlainText,\n });\n };\n\n clearMonacoEditorLanguage = () => {\n this.setState({\n monacoEditorLanguage: 'markdown',\n });\n const monacoEditorLanguage = document.getElementById(\n monacoEditorLanguageID\n ) as HTMLSelectElement;\n if (monacoEditorLanguage) {\n monacoEditorLanguage.value = 'markdown';\n monacoEditorLanguage.focus();\n }\n };\n\n clearSaveAsDefault = () => {\n this.setState({\n saveAsDefault: false,\n });\n const saveAsDefault = document.getElementById(\n saveAsDefaultID\n ) as HTMLInputElement;\n saveAsDefault.checked = false;\n saveAsDefault.focus();\n };\n\n clearAllSettings = () => {\n // We clear from bottom settings to top settings so the focus afterwards is on top\n this.clearSaveAsDefault();\n this.clearCustomStyles();\n this.clearFontView();\n this.clearFontEdit();\n this.clearFontSize();\n this.clearMonacoEditorLanguage();\n this.clearEditingMode();\n const resetAllSettings = document.getElementById(resetAllSettingsID);\n if (resetAllSettings) {\n resetAllSettings.focus();\n }\n };\n\n onKeyDown = (e: React.KeyboardEvent) => {\n this.props.keyMap.set(e.key, true);\n //console.log(\"Keys pressed: \" + e.key + \"KeyMap for key: \" + keyMap.get(e.key)) + \"KeyMap for Shift: \" + keyMap.get('Shift');\n // Save settings if Control and 's' are pressed\n if (this.props.keyMap.get('Control') && this.props.keyMap.get('s')) {\n e.preventDefault();\n this.handleSubmit();\n }\n // Save settings if Control and Enter are pressed\n else if (\n this.props.keyMap.get('Control') &&\n this.props.keyMap.get('Enter')\n ) {\n e.preventDefault();\n this.handleSubmit();\n }\n };\n\n onKeyUp = (e: React.KeyboardEvent) => {\n this.props.keyMap.set(e.key, false);\n };\n\n onBlur = (e: React.FocusEvent) => {\n this.props.keyMap.clear();\n };\n\n componentWillUnmount = () => {\n this.props.keyMap.clear();\n };\n\n render() {\n //

\n const { title, onCancel, confirmText, cancelText, helpLink } = this.props;\n return (\n
\n
\n
\n \n \n \n
\n

{title}

\n \n
\n
\n
\n

\n Need help? Check out the{' '}\n \n documentation\n \n . To clear all settings, click undo: \n

\n \n
\n
\n
\n
\n

To load your personal default settings, click: 

\n \n \n \n
\n
\n
\n
\n

Editing Mode:

\n \n
\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n {this.state.editingMode === EditingModes.useMonacoEditor && [\n
\n \n
\n \n \n
\n
,\n ]}\n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n {this.state.editingMode !== EditingModes.useMonacoEditor && [\n
\n \n
\n \n \n
\n
,\n ]}\n {this.state.editingMode !== EditingModes.useDynamicEditor && [\n
\n \n
\n \n \n
\n
,\n ]}\n
\n \n {this.state.showCustomStyles && [\n ,\n ]}\n
\n {this.state.showCustomStyles && [\n
\n \n
,\n ]}\n
\n \n
\n \n \n
\n
\n
\n
\n
\n
\n \n \n
\n
\n
\n );\n }\n}\n","import React, { ErrorInfo } from 'react';\nimport { GearIcon } from './Icons';\nimport { clickSettingsButton } from '../lib/clickButton';\n\ninterface ErrorBoundaryState {\n hasError: boolean;\n error?: Error;\n errorInfo?: ErrorInfo;\n}\n\n/**\n * Learn more about Error Boundaries here:\n * https://reactjs.org/docs/error-boundaries.html\n */\n\nexport default class ErrorBoundary extends React.Component<\n any,\n ErrorBoundaryState\n> {\n constructor(props: any) {\n super(props);\n this.state = { hasError: false };\n }\n\n static getDerivedStateFromError(error: Error) {\n // Update state so the next render will show the fallback UI.\n return { hasError: true };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n // You can also log the error to an error reporting service\n console.log('Error:', error, '\\nError Info:', errorInfo);\n this.setState({\n error,\n errorInfo,\n });\n }\n\n render() {\n if (this.state.hasError) {\n // You can render any custom fallback UI\n return (\n
\n
\n
\n

Something went wrong.

\n

\n Error Name: {this.state.error?.name}\n

\n

\n Error Message: {this.state.error?.message}\n

\n

Please see the developer console for details.

\n
\n

\n Errors such as TypeError and{' '}\n Cannot read property 'type' of undefined usually\n occur when the editor is unable to process and render your notes\n because it contains incorrect or incomplete HTML. If you are\n writing in HTML, then please continue to write and refresh the\n View Mode when the HTML tags are closed.\n

\n

\n If you are using the Dynamic editing mode, then please switch to\n the Plain Textarea or Monaco editing modes in the Settings\n \n  \n \n  \n \n and remove or fix the text that is causing the error.\n

\n

\n If the error persists or is not related to the content of your\n note, then please{' '}\n \n report the issue on GitHub\n {' '}\n and we will try to fix it.{' '}\n \n 🙂\n \n

\n
\n
\n
\n );\n }\n\n return this.props.children;\n }\n}\n","import React from 'react';\nimport { EditorKit, EditorKitDelegate } from 'sn-editor-kit';\nimport PrintDialog from './PrintDialog';\nimport EditNote from './EditNote';\nimport ViewNote from './ViewNote';\nimport AppendText from './AppendText';\nimport Settings from './Settings';\nimport { MonacoDiffEditor } from './Monaco';\nimport ErrorBoundary from './ErrorBoundary';\nimport Menu from './Menu';\n\nimport CodeMirror, { Editor } from 'codemirror';\nimport 'codemirror/lib/codemirror';\nimport 'codemirror/mode/gfm/gfm';\n\n// CodeMirror addons\n\n// For markdown\nimport 'codemirror/addon/edit/continuelist';\n\n// For search\nimport 'codemirror/addon/search/jump-to-line';\nimport 'codemirror/addon/search/match-highlighter';\nimport 'codemirror/addon/search/matchesonscrollbar';\nimport 'codemirror/addon/search/search';\nimport 'codemirror/addon/search/searchcursor';\nimport 'codemirror/addon/dialog/dialog';\n\n// For styling selected text\nimport 'codemirror/addon/selection/mark-selection';\nimport {\n EyeIcon,\n GearIcon,\n HelpIcon,\n MenuIcon,\n PencilIcon,\n PlusIcon,\n} from './Icons';\n\nimport { isLongString, renderLongMarkdown } from '../lib/renderMarkdown';\n\nexport enum HtmlElementId {\n appendButton = 'appendButton',\n appendTextArea = 'appendTextArea',\n appendix = 'appendix',\n content = 'content',\n edit = 'edit',\n editButton = 'editButton',\n editTextArea = 'editTextArea',\n header = 'header',\n helpButton = 'helpButton',\n menuButton = 'menuButton',\n newLine = 'newLine',\n newParagraph = 'newParagraph',\n printButton = 'printButton',\n settingsButton = 'settingsButton',\n view = 'view',\n viewButton = 'viewButton',\n}\n\nexport enum HtmlClassName {\n fixed = 'fixed',\n fixedHeader = 'fixed-header',\n focused = 'focused',\n}\n\nexport enum EditingModes {\n usePlainText = 'usePlainText',\n useCodeMirror = 'useCodeMirror',\n useDynamicEditor = 'useDynamicEditor',\n useMonacoEditor = 'useMonacoEditor',\n}\n\nexport type DefaultSettings = {\n customStyles: string;\n editingMode: string;\n fontEdit: string;\n fontSize: string;\n fontView: string;\n monacoEditorLanguage: string;\n};\n\nexport interface SaveSettingsInterface extends DefaultSettings {\n saveAsDefault: boolean;\n}\n\nexport type menuOptions = {\n borderlessMode?: boolean;\n fixedHeightMode?: boolean;\n fullWidthMode?: boolean;\n overflowMode?: boolean;\n showMenuOptionsEdit?: boolean;\n showMenuOptionsShare?: boolean;\n showMenuOptionsView?: boolean;\n};\n\nexport interface AppendInterface {\n text: string;\n appendCodeMirror?: any;\n appendNewLine: boolean;\n appendNewParagraph: boolean;\n appendMode: boolean;\n appendRows: number;\n appendText: string;\n borderlessMode?: boolean;\n bypassDebounce: boolean;\n confirmPrintUrl: boolean;\n currentState?: object;\n customStyles: string;\n defaultSettings: DefaultSettings;\n editMode?: any;\n editingMode?: string;\n editCodeMirror?: any;\n fontEdit: string;\n fontSize: string;\n fontView: string;\n fixedHeightMode?: boolean;\n fullWidthMode?: boolean;\n overflowMode?: boolean;\n keyMap?: Object;\n monacoEditorLanguage: string;\n printURL: boolean;\n refreshEdit: boolean;\n refreshView: boolean;\n saveAsDefault?: boolean;\n savingEditorOptions?: boolean;\n showAppendix: boolean;\n showDiff: boolean;\n showHeader: boolean;\n showHelp: boolean;\n showMenu?: boolean;\n showMenuOptionsEdit?: boolean;\n showMenuOptionsShare?: boolean;\n showMenuOptionsView?: boolean;\n settingsMode: boolean;\n viewMode?: boolean;\n}\n\n/**\n * Some properties are optional so\n * they do not need to be set\n * when switching between notes.\n */\n\nconst initialState = {\n text: '',\n appendNewLine: false,\n appendNewParagraph: false,\n appendMode: false,\n appendRows: 8,\n appendText: '',\n bypassDebounce: false, // We keep this as false in initialState so debounce works in the demo\n confirmPrintUrl: false,\n customStyles: '',\n defaultSettings: {\n customStyles: '',\n editingMode: 'usePlainText',\n fontEdit: '',\n fontSize: '',\n fontView: '',\n monacoEditorLanguage: 'markdown',\n },\n fontEdit: '',\n fontSize: '',\n fontView: '',\n monacoEditorLanguage: 'markdown',\n printURL: true,\n refreshEdit: false,\n refreshView: false,\n showAppendix: true,\n showHeader: true,\n showHelp: false,\n showDiff: false,\n settingsMode: false,\n};\n\nlet last_known_scroll_position = 0;\n\nconst debugMode = false;\n\nlet keyMap = new Map();\n\nexport default class AppendEditor extends React.Component<{}, AppendInterface> {\n editorKit: any;\n refreshEditorTimer: NodeJS.Timeout | undefined;\n saveTimer: NodeJS.Timeout | undefined;\n\n constructor(props: AppendInterface) {\n super(props);\n this.configureEditorKit();\n this.state = initialState;\n }\n\n /**\n * This loads the first time the editor is loaded\n * This does not load every time a new note is loaded */\n componentDidMount = () => {\n if (debugMode) {\n console.log('AppendEditor.tsx: \\n - this.componentDidMount() triggered');\n }\n this.onViewMode();\n this.loadDefaultMenuState();\n document.addEventListener('scroll', this.onScroll);\n };\n\n componentWillUnmount = () => {\n document.removeEventListener('scroll', this.onScroll);\n };\n\n configureEditorKit = () => {\n if (debugMode) {\n console.log('AppendEditor.tsx: \\n - this.configureEditorKit() triggered');\n }\n let delegate = new EditorKitDelegate({\n /** This loads every time a different note is loaded\n * We turn bypassDebounce to true so\n * the editor always renders the markdown for the latest note\n */\n setEditorRawText: (text: string) => {\n this.setState(\n {\n ...initialState,\n bypassDebounce: true,\n text,\n },\n () => {\n if (debugMode) {\n console.log(\n '#################################################################################\\n' +\n 'AppendEditor.tsx:',\n '\\n - loaded text:',\n text +\n '\\n - this.configureEditorKit() callback triggered:' +\n '\\n - this.state.savingsDefaultSettings: ' +\n this.state.savingEditorOptions +\n '\\n - this.state: ' +\n JSON.stringify(this.state, null, ' ')\n );\n }\n /** Clear the debounce from the previous note and componentDidMount\n * Then call and flush the debounce so the correct markdown will render\n * the first time after turning the bypass off */\n isLongString.cancel();\n isLongString(text);\n isLongString.flush();\n renderLongMarkdown.cancel();\n if (isLongString(text)) {\n renderLongMarkdown(text);\n renderLongMarkdown.flush();\n }\n /** This prevents metadata from loading when saving editor options or default settings */\n if (!this.state.savingEditorOptions) {\n this.loadEditorOptions();\n this.loadDefaultSettings();\n this.loadMetaData();\n }\n /** Turn the debounce bypass off\n * This loads every time, even when saving editor options or default settings\n * because bypassDebounce is set to true every time\n */\n setTimeout(() => {\n this.setState({\n bypassDebounce: false,\n });\n }, 1000);\n }\n );\n },\n clearUndoHistory: () => {},\n getElementsBySelector: () => [],\n });\n\n this.editorKit = new EditorKit({\n delegate: delegate,\n mode: 'plaintext',\n supportsFilesafe: false,\n });\n };\n\n /** Expect this to run three times when loading a note:\n * once when loading editor options,\n * once when loading default settings, and\n * once when loading meta data\n * Use the timer to prevent the function from being executed when it is called\n * repeatedly, as when loading a note or saving a menu option */\n refreshEditor = () => {\n if (isLongString(this.state.text)) {\n if (this.refreshEditorTimer) {\n clearTimeout(this.refreshEditorTimer);\n }\n this.refreshEditorTimer = setTimeout(() => {\n if (!this.state.savingEditorOptions) {\n this.refreshEdit();\n this.refreshView();\n this.activateStyles();\n }\n }, 20);\n } else {\n if (this.refreshEditorTimer) {\n clearTimeout(this.refreshEditorTimer);\n }\n this.refreshEditorTimer = setTimeout(() => {\n if (!this.state.savingEditorOptions) {\n this.refreshEdit();\n this.refreshView();\n this.activateStyles();\n }\n }, 10);\n }\n };\n\n loadDefaultSettings = () => {\n try {\n const defaultSettingsString = this.editorKit.internal.componentRelay.getComponentDataValueForKey(\n 'defaultSettings'\n );\n const defaultEditingMode = this.editorKit.internal.componentRelay.getComponentDataValueForKey(\n 'editingMode'\n );\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n loadDefaultSetting() default settings loaded: ' +\n '\\n - defaultSettingsString: ' +\n defaultSettingsString,\n '\\n - typeof:',\n typeof defaultSettingsString,\n '\\n - defaultEditingMode:',\n defaultEditingMode,\n '\\n - typeof:',\n typeof defaultEditingMode\n );\n }\n if (defaultSettingsString !== undefined) {\n const defaultSettingsObject = JSON.parse(\n defaultSettingsString\n ) as DefaultSettings;\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n loadDefaultSetting():',\n 'if (defaultSettingsString !== undefined) triggered',\n '\\n - typeof defaultSettings:',\n typeof defaultSettingsObject\n );\n }\n this.setState(\n {\n customStyles: defaultSettingsObject.customStyles,\n editingMode: defaultSettingsObject.editingMode,\n fontEdit: defaultSettingsObject.fontEdit,\n fontSize: defaultSettingsObject.fontSize,\n fontView: defaultSettingsObject.fontView,\n monacoEditorLanguage: defaultSettingsObject.monacoEditorLanguage,\n defaultSettings: defaultSettingsObject,\n },\n () => {\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n - loadDefaultSettings() this.state.savingEditorOptions: ' +\n this.state.savingEditorOptions +\n '\\n defaultSettingsObject:',\n defaultSettingsObject,\n '\\n JSON.stringify(this.state.defaultSettings):',\n JSON.stringify(this.state.defaultSettings, null, ' ')\n );\n }\n this.refreshEditor();\n }\n );\n } else if (defaultEditingMode !== undefined) {\n /** This else if loads legacy default settings introduced in v1.1.0\n * We only need to check defaultEditingMode because it is never empty if it is defined\n * */\n const defaultCustomStyles = this.editorKit.internal.componentRelay.getComponentDataValueForKey(\n 'customStyles'\n );\n const defaultFontEdit = this.editorKit.internal.componentRelay.getComponentDataValueForKey(\n 'fontEdit'\n );\n const defaultFontSize = this.editorKit.internal.componentRelay.getComponentDataValueForKey(\n 'fontSize'\n );\n const defaultFontView = this.editorKit.internal.componentRelay.getComponentDataValueForKey(\n 'fontView'\n );\n const defaultMonacoEditorLanguage = this.editorKit.internal.componentRelay.getComponentDataValueForKey(\n 'monacoEditorLanguage'\n );\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n loadDefaultSetting():',\n 'else if (defaultEditingMode !== undefined) triggered',\n '\\n - default customStyles: ' + defaultCustomStyles,\n '\\n - typeof:',\n typeof defaultCustomStyles +\n '\\n - default fontSize: ' +\n defaultFontSize +\n '\\n - default fontEdit: ' +\n defaultFontEdit +\n '\\n - default fontView: ' +\n defaultFontView +\n '\\n - default monacoEditorLanguage: ' +\n defaultMonacoEditorLanguage\n );\n }\n this.setState(\n {\n customStyles: defaultCustomStyles,\n editingMode: defaultEditingMode,\n fontEdit: defaultFontEdit,\n fontSize: defaultFontSize,\n fontView: defaultFontView,\n monacoEditorLanguage: defaultMonacoEditorLanguage,\n defaultSettings: {\n customStyles: defaultCustomStyles,\n editingMode: defaultEditingMode,\n fontEdit: defaultFontEdit,\n fontSize: defaultFontSize,\n fontView: defaultFontView,\n monacoEditorLanguage: defaultMonacoEditorLanguage,\n },\n },\n () => {\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n - loadDefaultSettings() this.state.savingEditorOptions: ' +\n this.state.savingEditorOptions\n );\n }\n this.refreshEditor();\n }\n );\n } else {\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: loadDefaultSettings(), else, current state:',\n JSON.stringify(this.state, null, ' ')\n );\n }\n this.refreshEditor();\n }\n } catch (error) {\n // Log outside debug mode\n console.log('Error loading default settings:', error);\n }\n };\n\n loadEditorOptions = () => {\n try {\n const menuOptionsString = this.editorKit.internal.componentRelay.getComponentDataValueForKey(\n 'menuOptions'\n );\n if (menuOptionsString !== undefined) {\n const menuOptionsObject = JSON.parse(menuOptionsString) as menuOptions;\n this.setState(\n {\n borderlessMode: menuOptionsObject.borderlessMode,\n fixedHeightMode: menuOptionsObject.fixedHeightMode,\n fullWidthMode: menuOptionsObject.fullWidthMode,\n overflowMode: menuOptionsObject.overflowMode,\n //showMenuOptionsEdit: menuOptionsObject.showMenuOptionsEdit,\n //showMenuOptionsShare: menuOptionsObject.showMenuOptionsShare,\n //showMenuOptionsView: menuOptionsObject.showMenuOptionsView,\n },\n () => {\n this.refreshEditor();\n }\n );\n }\n } catch (error) {\n // Log outside debug mode\n console.log('Error loading editor options:', error);\n }\n };\n\n // This loads the Settings and Append Text\n loadMetaData = () => {\n this.editorKit.internal.componentRelay.streamContextItem((note: any) => {\n // Load editor settings\n if (\n note.content.appendEditorCustomStyles ||\n note.content.appendEditorEditingMode ||\n note.content.appendEditorFontEdit ||\n note.content.appendEditorFontSize ||\n note.content.appendEditorFontView ||\n note.content.appendEditorMonacoEditorLanguage\n ) {\n this.setState(\n {\n customStyles: note.content.appendEditorCustomStyles,\n editingMode: note.content.appendEditorEditingMode,\n fontEdit: note.content.appendEditorFontEdit,\n fontSize: note.content.appendEditorFontSize,\n fontView: note.content.appendEditorFontView,\n monacoEditorLanguage: note.content.appendEditorMonacoEditorLanguage,\n },\n () => {\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n - loadMetaData() this.state.savingEditorOptions: ' +\n this.state.savingEditorOptions\n );\n }\n this.refreshEditor();\n if (debugMode) {\n console.log(\n 'editorKit metadata loaded: ' +\n '\\n - loaded customStyles: ' +\n this.state.customStyles +\n '\\n - loaded editingMode: ' +\n this.state.editingMode +\n '\\n - loaded fontEdit: ' +\n this.state.fontEdit +\n '\\n - loaded fontSize: ' +\n this.state.fontSize +\n '\\n - loaded fontView: ' +\n this.state.fontView +\n '\\n - loaded monacoEditorLanguage: ' +\n this.state.monacoEditorLanguage\n );\n }\n }\n );\n }\n // Load append settings\n if (note.content.appendNewLine || note.content.appendNewParagraph) {\n this.setState({\n appendNewLine: note.content.appendNewLine,\n appendNewParagraph: note.content.appendNewParagraph,\n });\n }\n // Finally, load appendText\n this.setState(\n {\n appendText: note.content.appendText,\n },\n () => {\n /**If both text and appendText are empty,\n * such as when creating a new note,\n * and editMode is off,\n * then open the edit mode\n */\n if (\n !this.state.text &&\n !this.state.appendText &&\n !this.state.editMode\n ) {\n this.onEditMode();\n }\n }\n );\n if (debugMode) {\n console.log(\n ' - loaded append text: ' +\n this.state.appendText +\n '\\n - loaded append newline: ' +\n this.state.appendNewLine +\n '\\n - loaded append new paragraph: ' +\n this.state.appendNewParagraph +\n '\\n - loaded editorKit internal appendText: ' +\n this.editorKit.internal.note.content.appendText\n );\n }\n });\n };\n\n saveText = (text: string) => {\n this.saveNote(text);\n this.setState(\n {\n text: text,\n },\n () => {\n if (this.state.editingMode === EditingModes.useDynamicEditor) {\n this.refreshView();\n } else if (this.state.viewMode && isLongString(text)) {\n /** If the note text is long, then rendering its markdown will debounce\n * If the we stop editing for 550 milliseconds, then\n * automatically refresh the view to force the latest markdown to render\n * We use 550 because the debounce is 500.\n */\n if (this.saveTimer) {\n clearTimeout(this.saveTimer);\n }\n this.saveTimer = setTimeout(() => {\n if (this.state.fixedHeightMode) {\n /** This keeps the vertical scroll when refreshing view */\n const view = document.getElementById(HtmlElementId.view);\n if (view) {\n let scrollY = view.scrollTop;\n this.refreshView();\n /** We have to find the new view because\n * the previous one doesn't exist anymore */\n const refreshedView = document.getElementById(\n HtmlElementId.view\n );\n if (refreshedView) {\n refreshedView.scrollTop = scrollY;\n }\n } else {\n this.refreshView();\n }\n } else {\n this.refreshView();\n }\n }, 550);\n }\n if (debugMode) {\n console.log('AppendEditor.tsx: saved text:', this.state.text);\n }\n }\n );\n };\n\n saveNote = (text: string) => {\n // This will work in an SN context, but breaks the standalone editor, so we need to catch the error\n try {\n this.editorKit.onEditorValueChanged(text);\n } catch (error) {\n // Log outside debug mode\n console.log('Error saving note:', error);\n }\n };\n\n // Entry operations\n\n appendTextToNote = () => {\n // Do nothing if there's no append text\n if (this.state.appendText) {\n /*\n * We usually use this.editText() to save the main text\n * However, we want to save the main text and clear the appendText\n * Consecutive calls to the component manager does not work well,\n * so we want to do both with one call to the component manager\n * This means we need multiple versions of this function depending on what we want to save */\n const { appendText } = this.state;\n let textToAppend = '';\n // We test for new paragraph first even though new line is on top and is on by default\n if (this.state.appendNewParagraph) {\n textToAppend = ' \\n\\n' + appendText;\n } else if (this.state.appendNewLine) {\n textToAppend = ' \\n' + appendText;\n } else {\n textToAppend = appendText;\n }\n this.setState(\n {\n text: this.state.text.concat(textToAppend),\n appendText: '',\n },\n () => {\n let note = this.editorKit.internal.note;\n if (note) {\n this.editorKit.internal.componentRelay.saveItemWithPresave(\n note,\n () => {\n note.content.text = this.state.text; // this.editorKit.internal.note.content.text\n note.content.appendText = this.state.appendText; // this.editorKit.internal.note.content.appendText\n }\n );\n }\n this.refreshEdit();\n // Refresh view mode if using dynamic\n if (this.state.editingMode === EditingModes.useDynamicEditor) {\n this.refreshView();\n setTimeout(() => {\n this.skipToBottom();\n }, 50);\n } else if (isLongString(this.state.text)) {\n setTimeout(() => {\n this.refreshView();\n this.skipToBottom();\n }, 550);\n } else {\n this.skipToBottom();\n }\n }\n );\n }\n // Refresh appendCodeMirror\n if (\n this.state.appendCodeMirror &&\n this.state.editingMode === EditingModes.useCodeMirror\n ) {\n this.state.appendCodeMirror.setValue('');\n }\n };\n\n autoSaveAppendText = (text: string) => {\n // This code is similar to this.onAppend();, but we only save the appendText and not the main text\n this.setState({\n appendText: text,\n });\n // This will work in an SN context, but breaks the standalone editor, so we need to catch the error\n try {\n let note = this.editorKit.internal.note;\n if (note) {\n this.editorKit.internal.componentRelay.saveItemWithPresave(note, () => {\n note.content.appendText = text;\n });\n }\n } catch (error) {\n // Log outside debug mode\n console.log('Error saving appendText:', error);\n }\n };\n\n autoSaveCheckBoxes = (newLine: boolean, newParagraph: boolean) => {\n // Here we save the appendText, appendNewLine, and appendNewParagraph\n // We have an additional function for this because we only call it when the user clicks a checkbox\n this.setState({\n appendNewLine: newLine,\n appendNewParagraph: newParagraph,\n });\n // This will work in an SN context, but breaks the standalone editor, so we need to catch the error\n try {\n let note = this.editorKit.internal.note;\n if (note) {\n this.editorKit.internal.componentRelay.saveItemWithPresave(note, () => {\n note.content.appendNewLine = newLine;\n note.content.appendNewParagraph = newParagraph;\n });\n }\n } catch (error) {\n // Log outside debug mode\n console.log('Error saving checkboxes:', error);\n }\n };\n\n refreshEdit = () => {\n this.setState(\n {\n refreshEdit: !this.state.refreshEdit,\n },\n () => {\n // We could also check for this.state.editMode,\n // but it might not be loaded yet.\n // Checking for editTextArea checks whether editMode has loaded\n const editTextArea = document.getElementById(\n HtmlElementId.editTextArea\n );\n if (\n editTextArea &&\n this.state.editingMode === EditingModes.useCodeMirror\n ) {\n this.configureCodeMirror(HtmlElementId.editTextArea);\n }\n }\n );\n };\n\n refreshView = () => {\n this.setState({\n refreshView: !this.state.refreshView,\n });\n };\n\n configureCodeMirror = (id: string) => {\n if (id === HtmlElementId.editTextArea) {\n if (debugMode) {\n console.log('this.state.text: ' + this.state.text);\n }\n const editTextArea = document.getElementById(id) as HTMLTextAreaElement;\n if (editTextArea) {\n const editCodeMirror = CodeMirror.fromTextArea(editTextArea, {\n autocorrect: true,\n autocapitalize: true,\n extraKeys: {\n Enter: 'newlineAndIndentContinueMarkdownList',\n 'Alt-F': 'findPersistent',\n },\n lineNumbers: false,\n lineWrapping: true,\n mode: 'gfm',\n spellcheck: true,\n //@ts-ignore\n styleSelectedText: true,\n tabindex: 0,\n theme: 'default',\n value: this.state.text,\n });\n editCodeMirror.setSize('100%', '100%');\n editCodeMirror.on('change', () => {\n const editCodeMirrorText = editCodeMirror.getValue();\n if (debugMode) {\n console.log('editCodeMirror value: ' + editCodeMirrorText);\n }\n editCodeMirror.save();\n this.saveText(editCodeMirrorText);\n });\n editCodeMirror.on('blur', (cm: Editor, event: FocusEvent) => {\n const content = document.getElementById(HtmlElementId.content);\n if (content) {\n content.classList.remove(HtmlClassName.focused);\n }\n });\n editCodeMirror.on('focus', (cm: Editor, event: FocusEvent) => {\n const content = document.getElementById(HtmlElementId.content);\n if (content) {\n content.classList.add(HtmlClassName.focused);\n }\n });\n editCodeMirror.on('keydown', (cm: Editor, event: KeyboardEvent) => {\n this.onKeyDown(event);\n this.onKeyDownEditTextArea(event);\n this.onKeyDownTextArea(event);\n });\n editCodeMirror.on('keyup', (cm: Editor, event: KeyboardEvent) => {\n this.onKeyUp(event);\n });\n this.setState({\n editCodeMirror: editCodeMirror,\n });\n }\n } else if (id === HtmlElementId.appendTextArea) {\n const appendTextArea = document.getElementById(\n HtmlElementId.appendTextArea\n ) as HTMLTextAreaElement;\n if (appendTextArea) {\n const appendCodeMirror = CodeMirror.fromTextArea(appendTextArea, {\n autocorrect: true,\n autocapitalize: true,\n extraKeys: {\n Enter: 'newlineAndIndentContinueMarkdownList',\n 'Alt-F': 'findPersistent',\n },\n lineNumbers: false,\n lineWrapping: true,\n mode: 'gfm',\n spellcheck: true,\n //@ts-ignore\n styleSelectedText: true,\n tabindex: 0,\n theme: 'default',\n value: this.state.appendText,\n });\n appendCodeMirror.setSize('100%', '100%');\n appendCodeMirror.on('change', () => {\n const appendCodeMirrorText = appendCodeMirror.getValue();\n appendCodeMirror.save();\n this.autoSaveAppendText(appendCodeMirrorText);\n });\n appendCodeMirror.on('keydown', (cm: Editor, event: KeyboardEvent) => {\n this.onKeyDown(event);\n this.onKeyDownAppendTextArea(event);\n this.onKeyDownTextArea(event);\n });\n appendCodeMirror.on('keyup', (cm: Editor, event: KeyboardEvent) => {\n this.onKeyUp(event);\n });\n this.setState({\n appendCodeMirror: appendCodeMirror,\n });\n }\n }\n };\n\n // Event Handlers\n onEditMode = () => {\n // if Append box is empty, close it and open Edit mode\n // if Edit mode is on, then close it, open View mode, and Append mode\n if (!this.state.editMode) {\n if (this.state.appendMode && !this.state.appendText) {\n this.setState({\n appendMode: false,\n });\n }\n this.setState(\n {\n editMode: true,\n },\n () => {\n const editTextArea = document.getElementById(\n HtmlElementId.editTextArea\n );\n if (editTextArea) {\n editTextArea.focus();\n if (this.state.editingMode === EditingModes.useCodeMirror) {\n this.configureCodeMirror(HtmlElementId.editTextArea);\n }\n }\n }\n );\n } else if (this.state.editMode) {\n /**If edit mode is on and Monaco Editor is off,\n * then turn edit mode off and turn view mode on.\n * This automatically renders the text. We do not\n * do this when Monaco is on because refreshing edit Mode\n * with Monaco Editor off allows us to resize the Monaco Editor.\n */\n if (!(this.state.editingMode === EditingModes.useMonacoEditor)) {\n this.setState({\n viewMode: true,\n });\n }\n if (this.state.editCodeMirror) {\n this.state.editCodeMirror.toTextArea();\n }\n this.setState(\n {\n editMode: false,\n },\n () => {\n // if not using append mode, focus on editButton\n if (!this.state.appendMode) {\n const editButton = document.getElementById(\n HtmlElementId.editButton\n );\n if (editButton) {\n editButton.focus();\n }\n }\n }\n );\n }\n };\n\n onAppendMode = (scrollDown = true, closeEdit = true, focus = true) => {\n if (!this.state.appendMode) {\n if (closeEdit) {\n this.setState({\n editMode: false,\n });\n }\n this.setState(\n {\n appendMode: true,\n },\n () => {\n if (scrollDown) {\n this.scrollToBottom();\n }\n if (focus) {\n const appendTextArea = document.getElementById(\n HtmlElementId.appendTextArea\n );\n if (appendTextArea) {\n appendTextArea.focus();\n if (this.state.editingMode === EditingModes.useCodeMirror) {\n this.configureCodeMirror(HtmlElementId.appendTextArea);\n }\n }\n }\n }\n );\n } else if (this.state.appendMode) {\n if (this.state.appendCodeMirror) {\n this.state.appendCodeMirror.toTextArea();\n }\n this.setState(\n {\n appendMode: false,\n },\n () => {\n if (this.state.editingMode === EditingModes.useMonacoEditor) {\n this.refreshEdit();\n }\n if (focus) {\n const appendButton = document.getElementById(\n HtmlElementId.appendButton\n );\n if (appendButton) {\n appendButton.focus();\n }\n }\n }\n );\n }\n };\n\n onViewMode = () => {\n if (!this.state.viewMode) {\n this.setState(\n {\n viewMode: true,\n },\n () => {\n if (this.state.editingMode === EditingModes.useMonacoEditor) {\n this.refreshEdit();\n }\n if (this.state.appendMode && !this.state.editMode) {\n this.skipToBottom();\n }\n }\n );\n }\n if (this.state.viewMode) {\n this.setState(\n {\n viewMode: false,\n },\n () => {\n if (this.state.editingMode === EditingModes.useMonacoEditor) {\n this.refreshEdit();\n }\n if (!this.state.editMode && !this.state.appendMode) {\n this.onEditMode();\n }\n }\n );\n }\n };\n\n toggleShowHelp = () => {\n if (!this.state.showHelp) {\n this.setState(\n {\n showHelp: true,\n },\n () => {\n if (!this.state.viewMode) {\n this.onViewMode();\n } else if (this.state.viewMode) {\n this.refreshView();\n }\n const helpButton = document.getElementById(HtmlElementId.helpButton);\n if (helpButton) {\n helpButton.focus();\n }\n setTimeout(() => {\n this.scrollToTop();\n }, 50);\n }\n );\n } else {\n this.setState(\n {\n showHelp: false,\n },\n () => {\n this.refreshView();\n const helpButton = document.getElementById(HtmlElementId.helpButton);\n if (helpButton) {\n helpButton.focus();\n }\n }\n );\n }\n };\n\n toggleShowMenu = () => {\n this.setState(\n {\n showMenu: !this.state.showMenu,\n },\n () => {\n const menuButton = document.getElementById(HtmlElementId.menuButton);\n if (menuButton) {\n menuButton.focus();\n }\n }\n );\n };\n\n loadDefaultMenuState = () => {\n this.setState({\n showMenuOptionsEdit: false,\n showMenuOptionsShare: true,\n showMenuOptionsView: true,\n });\n };\n\n toggleShowMenuOptionsEdit = () => {\n this.setState({ showMenuOptionsEdit: !this.state.showMenuOptionsEdit });\n };\n\n toggleShowMenuOptionsShare = () => {\n this.setState({ showMenuOptionsShare: !this.state.showMenuOptionsShare });\n };\n\n toggleShowMenuOptionsView = () => {\n this.setState({ showMenuOptionsView: !this.state.showMenuOptionsView });\n };\n\n toggleBorderlessMode = () => {\n this.setState(\n {\n borderlessMode: !this.state.borderlessMode,\n },\n () => {\n this.activateFixedHeader();\n this.saveMenuOptions();\n }\n );\n };\n\n toggleFixedHeightMode = () => {\n this.setState(\n {\n fixedHeightMode: !this.state.fixedHeightMode,\n },\n () => {\n this.activateFixedHeader();\n this.saveMenuOptions();\n }\n );\n };\n\n toggleFullWidthMode = () => {\n this.setState(\n {\n fullWidthMode: !this.state.fullWidthMode,\n },\n () => {\n this.activateFixedHeader();\n this.saveMenuOptions();\n }\n );\n };\n\n toggleOverflowMode = () => {\n this.setState(\n {\n overflowMode: !this.state.overflowMode,\n },\n () => {\n this.activateFixedHeader();\n this.saveMenuOptions();\n }\n );\n };\n\n saveMenuOptions = () => {\n let currentMenuOptions: menuOptions;\n currentMenuOptions = {\n borderlessMode: this.state.borderlessMode,\n fixedHeightMode: this.state.fixedHeightMode,\n fullWidthMode: this.state.fullWidthMode,\n overflowMode: this.state.overflowMode,\n /**These are turned off to prevent excess re-rendering of the note when opening/closing the menu */\n //showMenuOptionsEdit: this.state.showMenuOptionsEdit,\n //showMenuOptionsShare: this.state.showMenuOptionsShare,\n //showMenuOptionsView: this.state.showMenuOptionsView,\n };\n this.saveEditorOption('menuOptions', JSON.stringify(currentMenuOptions));\n };\n\n saveEditorOption = (\n optionKey: string,\n optionValue: string | boolean | undefined\n ) => {\n this.setState(\n {\n savingEditorOptions: true,\n },\n () => {\n try {\n this.editorKit.internal.componentRelay.setComponentDataValueForKey(\n optionKey,\n optionValue\n );\n /** this.configureEditorKit() is triggered\n * every time setComponentDataValueForKey is triggered, but\n * savingEditorOptions prevents the callback from triggering.\n * Then, after the timeout, the new default settings or options can\n * take into effect immediately.\n * However, if you switch the note within the timeout, you will get an error.\n * I have tried 150 and 200 but they both are not long enough. 250 is short enough\n * to work, but not long enough to be easily noticeable.\n * We do not load editor options because they are optional and persist through\n * this.configureEditorKit().\n * */\n setTimeout(() => {\n this.setState(\n {\n savingEditorOptions: false,\n },\n () => {\n this.loadDefaultSettings();\n this.loadMetaData();\n }\n );\n }, 250);\n } catch (error) {\n console.log(\n 'Error saving editor option. Your optionKey:',\n optionKey,\n '\\n - Your optionValue: ',\n optionValue,\n '\\n - The error: ',\n error\n );\n this.setState(\n {\n savingEditorOptions: false,\n },\n () => {\n /** We use refreshEditor() if there's an error (such as in the demo)\n * But not in the actual editor because loadDefaultSettings and loadMetaData\n * will run refreshEditor() twice, and if there's no issue saving editor options,\n * then there's probably no issue loading default settings and metadata.\n * */\n this.refreshEditor();\n this.loadDefaultSettings();\n this.loadMetaData();\n }\n );\n }\n }\n );\n };\n\n onSettingsMode = () => {\n // Here we save the current state. We reload the current state if we cancel and after we save\n if (!this.state.settingsMode) {\n this.removeFixedHeader();\n this.setState(\n {\n currentState: this.state,\n },\n () => {\n /** Turn everything off and turn Settings on */\n this.setState(\n {\n appendMode: false,\n editMode: false,\n fullWidthMode: false,\n fixedHeightMode: false,\n settingsMode: true,\n showAppendix: false, // Hides the scroll up/down buttons\n showHeader: false,\n showMenu: false,\n viewMode: false,\n },\n () => {\n const undoDialog = document.getElementById('undoDialog');\n if (undoDialog) {\n undoDialog.focus();\n }\n }\n );\n }\n );\n } else if (this.state.settingsMode) {\n this.setState(\n {\n ...this.state.currentState,\n settingsMode: false,\n },\n () => {\n this.refreshEdit();\n const settingsButton = document.getElementById(\n HtmlElementId.settingsButton\n );\n if (settingsButton) {\n settingsButton.focus();\n }\n }\n );\n }\n };\n\n /** Restore current state but change the items that are saved from the Settings.\n * It's important to restore the current state to restore items that were turned off, such as\n * fixedHeight and fullWidth.\n */\n onSaveSettings = ({\n customStyles,\n editingMode,\n fontEdit,\n fontSize,\n fontView,\n monacoEditorLanguage,\n saveAsDefault,\n }: SaveSettingsInterface) => {\n this.setState(\n {\n ...this.state.currentState,\n customStyles,\n editingMode,\n fontEdit,\n fontSize,\n fontView,\n monacoEditorLanguage,\n showAppendix: true,\n showHeader: true,\n settingsMode: false,\n },\n () => {\n this.refreshEditor();\n const settingsButton = document.getElementById(\n HtmlElementId.settingsButton\n );\n if (settingsButton) {\n settingsButton.focus();\n }\n }\n );\n let note = this.editorKit.internal.note;\n if (note) {\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n - onSaveSettings() this.editorKit.internal.componentRelay.saveItemWithPresave() triggered'\n );\n }\n this.editorKit.internal.componentRelay.saveItemWithPresave(note, () => {\n note.content.appendEditorCustomStyles = customStyles;\n note.content.appendEditorEditingMode = editingMode;\n note.content.appendEditorFontEdit = fontEdit;\n note.content.appendEditorFontSize = fontSize;\n note.content.appendEditorFontView = fontView;\n note.content.appendEditorMonacoEditorLanguage = monacoEditorLanguage;\n });\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n - onSaveSettings() this.editorKit.internal.componentRelay.saveItemWithPresave() completed'\n );\n }\n }\n if (saveAsDefault) {\n this.setState(\n {\n defaultSettings: {\n customStyles,\n editingMode,\n fontEdit,\n fontSize,\n fontView,\n monacoEditorLanguage,\n },\n },\n () => {\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n - onSaveSettings() this.state.savingEditorOptions: ' +\n this.state.savingEditorOptions +\n '\\n JSON.stringify(this.state.defaultSettings):',\n JSON.stringify(this.state.defaultSettings)\n );\n }\n this.saveEditorOption(\n 'defaultSettings',\n JSON.stringify(this.state.defaultSettings)\n );\n }\n );\n }\n };\n\n activateStyles = () => {\n if (debugMode) {\n console.log('AppendEditor.tsx: \\n - this.activateStyles() triggered');\n }\n const sheetToBeRemoved = document.getElementById('customStyleSheet');\n if (sheetToBeRemoved) {\n const sheetParent = sheetToBeRemoved.parentNode;\n if (sheetParent) {\n sheetParent.removeChild(sheetToBeRemoved);\n }\n }\n // Follow the order that appears in the Settings to make the Settings cascade\n let fontSizeStyle = '';\n if (this.state.fontSize) {\n fontSizeStyle =\n '.CodeMirror, .DynamicEditor, .MonacoEditorContainer, .ProseMirror, #editTextArea, #appendTextArea, #renderedNote {font-size: ' +\n this.state.fontSize +\n ';}\\n';\n }\n let fontEditStyle = '';\n if (this.state.fontEdit) {\n fontEditStyle =\n '.CodeMirror, .DynamicEditor, .ProseMirror, #editTextArea, #appendTextArea {font-family: ' +\n this.state.fontEdit +\n ';}\\n';\n }\n let fontViewStyle = '';\n if (this.state.fontView) {\n fontViewStyle =\n '#renderedNote {font-family: ' + this.state.fontView + ';}\\n';\n }\n if (\n this.state.customStyles ||\n this.state.fontEdit ||\n this.state.fontSize ||\n this.state.fontView\n ) {\n const sheet = document.createElement('style');\n sheet.setAttribute('id', 'customStyleSheet');\n // Follow the order that appears in the Settings to make the Settings cascade\n sheet.innerHTML =\n fontSizeStyle + fontEditStyle + fontViewStyle + this.state.customStyles;\n document.body.appendChild(sheet);\n }\n };\n\n onCancelPrint = () => {\n this.setState(\n {\n confirmPrintUrl: false,\n },\n () => {\n const printButton = document.getElementById(HtmlElementId.printButton);\n if (printButton) {\n printButton.focus();\n }\n }\n );\n };\n\n onConfirmPrintUrl = () => {\n this.setState(\n {\n confirmPrintUrl: true,\n },\n () => {\n const undoDialog = document.getElementById('undoDialog');\n if (undoDialog) {\n undoDialog.focus();\n }\n }\n );\n };\n\n onPrintUrlTrue = () => {\n this.setState(\n {\n confirmPrintUrl: false,\n printURL: true,\n },\n () => {\n this.printRenderedHtml();\n }\n );\n };\n\n onPrintUrlFalse = () => {\n this.setState(\n {\n confirmPrintUrl: false,\n printURL: false,\n },\n () => {\n this.printRenderedHtml();\n }\n );\n };\n\n printRenderedHtml = () => {\n window.print();\n const printButton = document.getElementById(HtmlElementId.printButton);\n if (printButton) {\n printButton.focus();\n }\n };\n\n goDown = () => {\n document.body.scrollTop = 10000000; // for Safari\n if (this.state.editMode) {\n const editTextArea = document.getElementById(HtmlElementId.editTextArea);\n if (editTextArea) {\n editTextArea.scrollTop = 10000000;\n }\n }\n if (this.state.appendMode) {\n const appendTextArea = document.getElementById(\n HtmlElementId.appendTextArea\n );\n if (appendTextArea) {\n appendTextArea.scrollTop = 10000000;\n }\n }\n if (this.state.fixedHeightMode) {\n const view = document.getElementById(HtmlElementId.view);\n if (view) {\n view.scrollTop = 10000000;\n }\n /** Need edit for Dynamic */\n const edit = document.getElementById(HtmlElementId.edit);\n if (edit) {\n edit.scrollTop = 10000000;\n }\n /** Scroll down for CodeMirror */\n const codeMirrorList = document.getElementsByClassName(\n 'CodeMirror-vscrollbar'\n );\n const codeMirrorEditMode = codeMirrorList[0];\n if (codeMirrorEditMode) {\n codeMirrorEditMode.scrollTop = 10000000;\n }\n }\n };\n\n scrollToBottom = () => {\n this.goDown();\n const appendix = document.getElementById(HtmlElementId.appendix);\n if (appendix) {\n appendix.scrollIntoView({\n behavior: 'smooth',\n block: 'end', // Bottom\n inline: 'nearest',\n });\n }\n };\n\n // Skip to Bottom is fast \"auto\" behavior instead of \"smooth\" behavior\n skipToBottom = () => {\n this.goDown();\n const appendix = document.getElementById(HtmlElementId.appendix);\n if (appendix) {\n appendix.scrollIntoView({\n behavior: 'auto',\n block: 'end', // Bottom\n inline: 'nearest',\n });\n }\n };\n\n goUp = () => {\n document.body.scrollTop = 0; // for Safari\n if (this.state.editMode) {\n const editTextArea = document.getElementById(HtmlElementId.editTextArea);\n if (editTextArea) {\n editTextArea.scrollTop = 0;\n }\n }\n if (this.state.appendMode) {\n const appendTextArea = document.getElementById(\n HtmlElementId.appendTextArea\n );\n if (appendTextArea) {\n appendTextArea.scrollTop = 0;\n }\n }\n if (this.state.fixedHeightMode) {\n const view = document.getElementById(HtmlElementId.view);\n if (view) {\n view.scrollTop = 0;\n }\n /** Need edit for Dynamic */\n const edit = document.getElementById(HtmlElementId.edit);\n if (edit) {\n edit.scrollTop = 0;\n }\n /** Scroll up for CodeMirror */\n const codeMirrorList = document.getElementsByClassName(\n 'CodeMirror-vscrollbar'\n );\n const codeMirrorEditMode = codeMirrorList[0];\n if (codeMirrorEditMode) {\n codeMirrorEditMode.scrollTop = 0;\n }\n }\n };\n\n scrollToTop = () => {\n this.goUp();\n const top = document.getElementById('top');\n if (top) {\n top.scrollIntoView({\n behavior: 'smooth',\n block: 'start', // Top\n inline: 'nearest',\n });\n }\n };\n\n // Need both content and appendix for mobile\n // Skip to Bottom is fast \"auto\" behavior instead of \"smooth\" behavior\n skipToTop = () => {\n this.goUp();\n const top = document.getElementById('top');\n if (top) {\n top.scrollIntoView({\n behavior: 'auto',\n block: 'start', // Top\n inline: 'nearest',\n });\n }\n };\n\n onKeyDown = (e: React.KeyboardEvent | KeyboardEvent) => {\n keyMap.set(e.key, true);\n // Click the top Append if 'Control' and 'e' are pressed\n if (keyMap.get('Control') && keyMap.get('e')) {\n e.preventDefault();\n this.onEditMode();\n }\n // Click the top Append if 'Control' and 'u' are pressed\n else if (\n keyMap.get('Control') &&\n !keyMap.get('Alt') &&\n (keyMap.get('u') || keyMap.get('m'))\n ) {\n e.preventDefault();\n this.onAppendMode();\n }\n // Click view if 'Control' and 'p' are pressed\n else if (keyMap.get('Control') && !keyMap.get('Alt') && keyMap.get('p')) {\n e.preventDefault();\n this.onViewMode();\n } else if (keyMap.get('Control') && keyMap.get('.')) {\n e.preventDefault();\n this.setState({\n appendRows: this.state.appendRows + 1,\n });\n } else if (keyMap.get('Control') && keyMap.get(',')) {\n e.preventDefault();\n if (this.state.appendRows > 5) {\n this.setState({\n appendRows: this.state.appendRows - 1,\n });\n }\n } else if (keyMap.get('Control') && keyMap.get('<')) {\n // Edit only mode\n e.preventDefault();\n this.setState(\n {\n appendMode: false,\n editMode: false,\n viewMode: false,\n },\n () => {\n this.onEditMode();\n }\n );\n } else if (keyMap.get('Control') && keyMap.get('>')) {\n // Append only mode\n e.preventDefault();\n this.setState(\n {\n appendMode: false,\n editMode: false,\n viewMode: false,\n },\n () => {\n this.onAppendMode();\n }\n );\n } else if (keyMap.get('Control') && keyMap.get('[')) {\n e.preventDefault();\n this.skipToTop();\n } else if (keyMap.get('Control') && keyMap.get(']')) {\n e.preventDefault();\n this.skipToBottom();\n } else if (\n keyMap.get('Control') &&\n !keyMap.get('Alt') &&\n !keyMap.get('Shift') &&\n keyMap.get('w')\n ) {\n keyMap.delete('w');\n }\n };\n\n onKeyDownAppendTextArea = (e: React.KeyboardEvent | KeyboardEvent) => {\n // Close Append Mode if 'Escape' is pressed\n if (keyMap.get('Escape')) {\n e.preventDefault();\n keyMap.delete('Escape');\n this.onAppendMode();\n }\n // Save note if Control and Enter are pressed\n else if (keyMap.get('Control') && keyMap.get('Enter')) {\n e.preventDefault();\n if (this.state.editingMode === EditingModes.useCodeMirror) {\n this.appendTextToNote();\n }\n }\n // Save note if Control and S are pressed\n else if (keyMap.get('Control') && keyMap.get('s')) {\n e.preventDefault();\n if (this.state.editingMode === EditingModes.useCodeMirror) {\n this.appendTextToNote();\n }\n }\n // Toggle Append New Line if Ctrl + Alt + N are pressed\n else if (\n keyMap.get('Control') &&\n !keyMap.get('Shift') &&\n keyMap.get('Alt') &&\n keyMap.get('n')\n ) {\n e.preventDefault();\n const newLine = document.getElementById(HtmlElementId.newLine);\n if (newLine) {\n newLine.click();\n }\n }\n // Toggle Append New Line if Ctrl + Alt + P are pressed\n else if (\n keyMap.get('Control') &&\n !keyMap.get('Shift') &&\n keyMap.get('Alt') &&\n keyMap.get('p')\n ) {\n e.preventDefault();\n const newParagraph = document.getElementById(HtmlElementId.newParagraph);\n if (newParagraph) {\n newParagraph.click();\n }\n }\n };\n\n onKeyDownEditTextArea = (e: React.KeyboardEvent | KeyboardEvent) => {\n // Close EditMode if 'Escape' is pressed\n if (keyMap.get('Escape')) {\n e.preventDefault();\n keyMap.set('Escape', false);\n this.onEditMode();\n }\n };\n\n onKeyDownTextArea = (e: React.KeyboardEvent | KeyboardEvent) => {\n // Add two stars if Control + b are pressed\n if (keyMap.get('Control') && keyMap.get('b')) {\n e.preventDefault();\n document.execCommand('insertText', false, '**');\n }\n // Add header when pressing Control + H\n else if (keyMap.get('Control') && keyMap.get('h')) {\n e.preventDefault();\n document.execCommand('insertText', false, '#');\n }\n // Add image code if Control + Alt and i are pressed\n else if (keyMap.get('Control') && keyMap.get('Alt') && keyMap.get('i')) {\n e.preventDefault();\n document.execCommand('insertText', false, '![]()');\n }\n // Add one stars if Control + i is pressed\n else if (keyMap.get('Control') && keyMap.get('i')) {\n e.preventDefault();\n document.execCommand('insertText', false, '*');\n }\n // Add inline code if Control + Alt and k are pressed\n else if (keyMap.get('Control') && keyMap.get('Alt') && keyMap.get('k')) {\n e.preventDefault();\n document.execCommand('insertText', false, '`');\n }\n // Add link if Control + k are pressed\n else if (keyMap.get('Control') && keyMap.get('k')) {\n e.preventDefault();\n document.execCommand('insertText', false, '[]()');\n }\n // Add ordered list item if Control + Alt + l are pressed\n else if (keyMap.get('Control') && keyMap.get('Alt') && keyMap.get('l')) {\n e.preventDefault();\n document.execCommand('insertText', false, '\\n1. ');\n }\n // Add unordered list item if Control + l are pressed\n else if (keyMap.get('Control') && keyMap.get('l')) {\n e.preventDefault();\n document.execCommand('insertText', false, '\\n- ');\n }\n // Add strike through if Control + Alt + u are pressed\n else if (keyMap.get('Control') && keyMap.get('Alt') && keyMap.get('u')) {\n e.preventDefault();\n document.execCommand('insertText', false, '~~');\n }\n // Add quote Control + q, Control + ' or Control + \" are pressed\n else if (\n (keyMap.get('Control') && keyMap.get('q')) ||\n (keyMap.get('Control') && keyMap.get(\"'\")) ||\n (keyMap.get('Control') && keyMap.get('\"'))\n ) {\n e.preventDefault();\n document.execCommand('insertText', false, '\\n> ');\n }\n };\n\n onKeyUp = (e: React.KeyboardEvent | KeyboardEvent) => {\n keyMap.delete(e.key);\n };\n\n onBlur = (e: React.FocusEvent) => {\n keyMap.clear();\n };\n\n onScroll = (e: Event) => {\n if (!this.state.settingsMode) {\n if (window.scrollY < last_known_scroll_position) {\n // If scrolling up, fix header\n this.activateFixedHeader();\n } else if (\n // If scrolling down, unfix header\n window.scrollY > last_known_scroll_position &&\n !this.state.showMenu\n ) {\n if (\n // If NOT using Edit Only mode with PlainText and CodeMirror\n !(\n (this.state.editingMode === undefined ||\n this.state.editingMode === EditingModes.usePlainText ||\n this.state.editingMode === EditingModes.useCodeMirror) &&\n this.state.editMode &&\n !this.state.appendMode &&\n !this.state.settingsMode &&\n !this.state.viewMode\n )\n ) {\n this.removeFixedHeader();\n }\n }\n last_known_scroll_position = window.scrollY;\n }\n };\n\n activateFixedHeader = () => {\n const header = document.getElementById(HtmlElementId.header);\n const content = document.getElementById(HtmlElementId.content);\n // Activate only if we have both\n if (header && content) {\n header.classList.add(HtmlClassName.fixed);\n content.classList.add(HtmlClassName.fixedHeader);\n }\n };\n\n removeFixedHeader = () => {\n const header = document.getElementById(HtmlElementId.header);\n const content = document.getElementById(HtmlElementId.content);\n /** Remove both even if you don't have both\n * This is needed for loading settings\n */\n if (header) {\n header.classList.remove(HtmlClassName.fixed);\n }\n if (content) {\n content.classList.remove(HtmlClassName.fixedHeader);\n }\n };\n\n render() {\n return [\n ,\n \n {this.state.showHeader && [\n \n
\n \n \n \n \n \n \n this.onAppendMode()}\n title=\"Toggle Append Mode\"\n className={\n 'sk-button ' + (this.state.appendMode ? 'on' : 'off')\n }\n >\n \n \n
\n \n \n \n
\n \n \n \n \n \n \n
\n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n ,\n ]}\n \n {this.state.showMenu && (\n \n \n \n )}\n {this.state.settingsMode && (\n \n \n \n )}\n {this.state.editMode && !this.state.refreshEdit && (\n \n \n \n )}\n {this.state.editMode && this.state.refreshEdit && (\n \n \n \n )}\n {this.state.viewMode && !this.state.refreshView && (\n \n \n \n )}\n {this.state.viewMode && this.state.refreshView && (\n \n \n \n )}\n {this.state.confirmPrintUrl && (\n \n {' '}\n \n )}\n\n {this.state.showDiff && [\n \n \n ,\n ]}\n \n {this.state.showAppendix && [\n \n {this.state.appendMode && (\n \n \n \n )}\n \n
\n \n \n
\n \n ,\n ]}\n ,\n ];\n }\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.scss';\nimport * as serviceWorker from './serviceWorker';\nimport reportWebVitals from './reportWebVitals';\n\nimport AppendEditor from './components/AppendEditor';\nimport './stylesheets/main.scss';\nReactDOM.render(\n \n \n ,\n document.getElementById('root')\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n\n// If you want to start measuring performance in your app, pass a function\n// to log results (for example: reportWebVitals(console.log))\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\nreportWebVitals();\n"],"sourceRoot":""} \ No newline at end of file diff --git a/package.json b/package.json index 140fa911..79d835c0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "append-editor", - "version": "1.2.3", + "version": "1.2.4", "description": "Append to your notes", "keywords": [ "Append Editor", diff --git a/public/alpha.ext.json b/public/alpha.ext.json index 61ab5f90..3f0881ac 100644 --- a/public/alpha.ext.json +++ b/public/alpha.ext.json @@ -3,10 +3,10 @@ "name": "Append Editor - Alpha", "content_type": "SN|Component", "area": "editor-editor", - "version": "1.2.3", + "version": "1.2.4", "description": "Append to your notes", "url": "https://alpha.appendeditor.com", - "download_url": "https://github.com/TheodoreChu/append-editor/releases/download/v1.2.3/append-editor-build-v1.2.3.zip", + "download_url": "https://github.com/TheodoreChu/append-editor/releases/download/v1.2.4/append-editor-build-v1.2.4.zip", "latest_url": "https://raw.githubusercontent.com/TheodoreChu/append-editor/main/public/alpha.ext.json", "marketing_url": "https://appendeditor.com", "thumbnail_url": "" diff --git a/public/beta.ext.json b/public/beta.ext.json index 7ba9642f..69b7921f 100644 --- a/public/beta.ext.json +++ b/public/beta.ext.json @@ -3,10 +3,10 @@ "name": "Append Editor - Beta", "content_type": "SN|Component", "area": "editor-editor", - "version": "1.2.3", + "version": "1.2.4", "description": "Append to your notes", "url": "https://beta.appendeditor.com", - "download_url": "https://github.com/TheodoreChu/append-editor/releases/download/v1.2.3/append-editor-build-v1.2.3.zip", + "download_url": "https://github.com/TheodoreChu/append-editor/releases/download/v1.2.4/append-editor-build-v1.2.4.zip", "latest_url": "https://raw.githubusercontent.com/TheodoreChu/append-editor/main/public/beta.ext.json", "marketing_url": "https://appendeditor.com", "thumbnail_url": "" diff --git a/public/package.json b/public/package.json index 6d3dea3b..35b69e6b 100644 --- a/public/package.json +++ b/public/package.json @@ -1,6 +1,6 @@ { "name": "append-editor", - "version": "1.2.3", + "version": "1.2.4", "description": "Append to your notes", "keywords": [ "Append Editor", diff --git a/public/sample.ext.json b/public/sample.ext.json index 5e4f9761..cb579116 100644 --- a/public/sample.ext.json +++ b/public/sample.ext.json @@ -3,7 +3,7 @@ "name": "Append Editor - Develop Local", "content_type": "SN|Component", "area": "editor-editor", - "version": "1.2.3", + "version": "1.2.4", "description": "Append to your notes", "url": "http://localhost:3000/index.html", "download_url": "", diff --git a/src/components/Help.tsx b/src/components/Help.tsx index 1a9a3000..edcbe1e8 100644 --- a/src/components/Help.tsx +++ b/src/components/Help.tsx @@ -346,7 +346,7 @@ export default class Help extends React.Component { 🙂
- You are using version 1.2.3. The release notes and + You are using version 1.2.4. The release notes and change log are available on{' '}