ghost 5.40.2 → 5.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +1 -1
  3. package/components/tryghost-adapter-cache-memory-ttl-5.42.0.tgz +0 -0
  4. package/components/tryghost-adapter-cache-redis-5.42.0.tgz +0 -0
  5. package/components/{tryghost-adapter-manager-5.40.2.tgz → tryghost-adapter-manager-5.42.0.tgz} +0 -0
  6. package/components/tryghost-api-framework-5.42.0.tgz +0 -0
  7. package/components/{tryghost-api-version-compatibility-service-5.40.2.tgz → tryghost-api-version-compatibility-service-5.42.0.tgz} +0 -0
  8. package/components/{tryghost-audience-feedback-5.40.2.tgz → tryghost-audience-feedback-5.42.0.tgz} +0 -0
  9. package/components/tryghost-bootstrap-socket-5.42.0.tgz +0 -0
  10. package/components/tryghost-constants-5.42.0.tgz +0 -0
  11. package/components/tryghost-custom-theme-settings-service-5.42.0.tgz +0 -0
  12. package/components/{tryghost-data-generator-5.40.2.tgz → tryghost-data-generator-5.42.0.tgz} +0 -0
  13. package/components/tryghost-domain-events-5.42.0.tgz +0 -0
  14. package/components/tryghost-dynamic-routing-events-5.42.0.tgz +0 -0
  15. package/components/tryghost-email-analytics-provider-mailgun-5.42.0.tgz +0 -0
  16. package/components/{tryghost-email-analytics-service-5.40.2.tgz → tryghost-email-analytics-service-5.42.0.tgz} +0 -0
  17. package/components/tryghost-email-content-generator-5.42.0.tgz +0 -0
  18. package/components/tryghost-email-events-5.42.0.tgz +0 -0
  19. package/components/tryghost-email-service-5.42.0.tgz +0 -0
  20. package/components/tryghost-email-suppression-list-5.42.0.tgz +0 -0
  21. package/components/tryghost-event-aware-cache-wrapper-5.42.0.tgz +0 -0
  22. package/components/{tryghost-express-dynamic-redirects-5.40.2.tgz → tryghost-express-dynamic-redirects-5.42.0.tgz} +0 -0
  23. package/components/tryghost-external-media-inliner-5.42.0.tgz +0 -0
  24. package/components/{tryghost-extract-api-key-5.40.2.tgz → tryghost-extract-api-key-5.42.0.tgz} +0 -0
  25. package/components/tryghost-html-to-plaintext-5.42.0.tgz +0 -0
  26. package/components/tryghost-i18n-5.42.0.tgz +0 -0
  27. package/components/tryghost-importer-handler-content-files-5.42.0.tgz +0 -0
  28. package/components/{tryghost-importer-revue-5.40.2.tgz → tryghost-importer-revue-5.42.0.tgz} +0 -0
  29. package/components/{tryghost-job-manager-5.40.2.tgz → tryghost-job-manager-5.42.0.tgz} +0 -0
  30. package/components/{tryghost-link-redirects-5.40.2.tgz → tryghost-link-redirects-5.42.0.tgz} +0 -0
  31. package/components/{tryghost-link-replacer-5.40.2.tgz → tryghost-link-replacer-5.42.0.tgz} +0 -0
  32. package/components/{tryghost-link-tracking-5.40.2.tgz → tryghost-link-tracking-5.42.0.tgz} +0 -0
  33. package/components/tryghost-magic-link-5.42.0.tgz +0 -0
  34. package/components/tryghost-mailgun-client-5.42.0.tgz +0 -0
  35. package/components/tryghost-member-attribution-5.42.0.tgz +0 -0
  36. package/components/{tryghost-member-events-5.40.2.tgz → tryghost-member-events-5.42.0.tgz} +0 -0
  37. package/components/tryghost-members-api-5.42.0.tgz +0 -0
  38. package/components/{tryghost-members-csv-5.40.2.tgz → tryghost-members-csv-5.42.0.tgz} +0 -0
  39. package/components/tryghost-members-events-service-5.42.0.tgz +0 -0
  40. package/components/{tryghost-members-importer-5.40.2.tgz → tryghost-members-importer-5.42.0.tgz} +0 -0
  41. package/components/{tryghost-members-offers-5.40.2.tgz → tryghost-members-offers-5.42.0.tgz} +0 -0
  42. package/components/tryghost-members-payments-5.42.0.tgz +0 -0
  43. package/components/tryghost-members-ssr-5.42.0.tgz +0 -0
  44. package/components/{tryghost-members-stripe-service-5.40.2.tgz → tryghost-members-stripe-service-5.42.0.tgz} +0 -0
  45. package/components/{tryghost-mentions-email-report-5.40.2.tgz → tryghost-mentions-email-report-5.42.0.tgz} +0 -0
  46. package/components/tryghost-milestones-5.42.0.tgz +0 -0
  47. package/components/tryghost-minifier-5.42.0.tgz +0 -0
  48. package/components/tryghost-mw-api-version-mismatch-5.42.0.tgz +0 -0
  49. package/components/tryghost-mw-cache-control-5.42.0.tgz +0 -0
  50. package/components/tryghost-mw-error-handler-5.42.0.tgz +0 -0
  51. package/components/tryghost-mw-session-from-token-5.42.0.tgz +0 -0
  52. package/components/tryghost-mw-update-user-last-seen-5.42.0.tgz +0 -0
  53. package/components/tryghost-mw-version-match-5.42.0.tgz +0 -0
  54. package/components/tryghost-mw-vhost-5.42.0.tgz +0 -0
  55. package/components/tryghost-oembed-service-5.42.0.tgz +0 -0
  56. package/components/tryghost-package-json-5.42.0.tgz +0 -0
  57. package/components/tryghost-posts-service-5.42.0.tgz +0 -0
  58. package/components/{tryghost-referrers-5.40.2.tgz → tryghost-referrers-5.42.0.tgz} +0 -0
  59. package/components/{tryghost-security-5.40.2.tgz → tryghost-security-5.42.0.tgz} +0 -0
  60. package/components/tryghost-session-service-5.42.0.tgz +0 -0
  61. package/components/tryghost-settings-path-manager-5.42.0.tgz +0 -0
  62. package/components/tryghost-slack-notifications-5.42.0.tgz +0 -0
  63. package/components/tryghost-staff-service-5.42.0.tgz +0 -0
  64. package/components/{tryghost-stats-service-5.40.2.tgz → tryghost-stats-service-5.42.0.tgz} +0 -0
  65. package/components/tryghost-tiers-5.42.0.tgz +0 -0
  66. package/components/{tryghost-update-check-service-5.40.2.tgz → tryghost-update-check-service-5.42.0.tgz} +0 -0
  67. package/components/tryghost-verification-trigger-5.42.0.tgz +0 -0
  68. package/components/tryghost-version-notifications-data-service-5.42.0.tgz +0 -0
  69. package/components/{tryghost-webmentions-5.40.2.tgz → tryghost-webmentions-5.42.0.tgz} +0 -0
  70. package/content/themes/casper/default.hbs +1 -1
  71. package/content/themes/casper/package.json +2 -2
  72. package/core/built/admin/assets/chunk.143.5883751093d1b6e535c0.js +35 -0
  73. package/core/built/admin/assets/{chunk.178.ca167199fe31a5836b26.js → chunk.178.bc2da086492043bfc5c8.js} +4 -4
  74. package/core/built/admin/assets/{chunk.462.b66cfed1f66c8d2678b2.js → chunk.580.ca53e3417715b59cfb59.js} +5958 -5228
  75. package/core/built/admin/assets/{chunk.462.b66cfed1f66c8d2678b2.js.LICENSE.txt → chunk.580.ca53e3417715b59cfb59.js.LICENSE.txt} +18 -0
  76. package/core/built/admin/assets/codemirror/{codemirror-3f3b9966a7237652dd31484694e38ad5.js → codemirror-31d641cdd0cb3388688402609608cb10.js} +1 -1
  77. package/core/built/admin/assets/ghost-0b2e282fd281b16ee656b554d7bc4863.css +1 -0
  78. package/core/built/admin/assets/{ghost-467b96c17c6bc0d06fa88e85074fbecf.js → ghost-744b6bcb745893e43bbdfaed2b931347.js} +4503 -4435
  79. package/core/built/admin/assets/ghost-dark-c05706ed6261cfa7944426e1ef933462.css +1 -0
  80. package/core/built/admin/assets/simplemde/{simplemde-9cd5549b68db674742d6ec2ecd72ac30.js → simplemde-d16ff9bcc5bf6ad4916fb0034a30adb1.js} +47 -47
  81. package/core/built/admin/assets/{vendor-d08b4de6f990b9cd7b5a92d61952a5bb.js → vendor-fcd4f09ebc985b1bd9ea37bdf7954c18.js} +140 -141
  82. package/core/built/admin/index.html +6 -6
  83. package/core/frontend/helpers/ghost_head.js +2 -1
  84. package/core/server/api/endpoints/posts.js +1 -1
  85. package/core/server/api/endpoints/utils/serializers/input/settings.js +2 -0
  86. package/core/server/data/migrations/versions/5.40/2023-03-21-19-02-add-self-serve-integration-api-key.js +1 -1
  87. package/core/server/data/migrations/versions/5.41/2023-03-27-15-00-add-newsletter-colors.js +22 -0
  88. package/core/server/data/migrations/versions/5.41/2023-03-27-17-51-fix-self-serve-integration-api-key-type.js +36 -0
  89. package/core/server/data/migrations/versions/5.42/2023-04-04-07-03-add-portal-terms-settings.js +16 -0
  90. package/core/server/data/schema/default-settings/default-settings.json +12 -0
  91. package/core/server/data/schema/schema.js +3 -0
  92. package/core/server/models/newsletter.js +3 -0
  93. package/core/server/services/i18n.js +31 -9
  94. package/core/server/services/members/api.js +10 -10
  95. package/core/server/services/members/middleware.js +1 -1
  96. package/core/server/services/members/utils.js +1 -0
  97. package/core/server/services/mentions-email-report/service.js +7 -2
  98. package/core/server/services/posts/posts-service.js +2 -1
  99. package/core/shared/config/defaults.json +1 -1
  100. package/core/shared/config/env/config.testing-browser.json +2 -1
  101. package/core/shared/config/env/config.testing-mysql.json +1 -1
  102. package/core/shared/config/env/config.testing.json +1 -1
  103. package/core/shared/labs.js +2 -1
  104. package/core/shared/settings-cache/public.js +2 -0
  105. package/package.json +146 -145
  106. package/yarn.lock +2212 -1199
  107. package/components/tryghost-adapter-cache-memory-ttl-5.40.2.tgz +0 -0
  108. package/components/tryghost-adapter-cache-redis-5.40.2.tgz +0 -0
  109. package/components/tryghost-api-framework-5.40.2.tgz +0 -0
  110. package/components/tryghost-bootstrap-socket-5.40.2.tgz +0 -0
  111. package/components/tryghost-constants-5.40.2.tgz +0 -0
  112. package/components/tryghost-custom-theme-settings-service-5.40.2.tgz +0 -0
  113. package/components/tryghost-domain-events-5.40.2.tgz +0 -0
  114. package/components/tryghost-dynamic-routing-events-5.40.2.tgz +0 -0
  115. package/components/tryghost-email-analytics-provider-mailgun-5.40.2.tgz +0 -0
  116. package/components/tryghost-email-content-generator-5.40.2.tgz +0 -0
  117. package/components/tryghost-email-events-5.40.2.tgz +0 -0
  118. package/components/tryghost-email-service-5.40.2.tgz +0 -0
  119. package/components/tryghost-email-suppression-list-5.40.2.tgz +0 -0
  120. package/components/tryghost-event-aware-cache-wrapper-5.40.2.tgz +0 -0
  121. package/components/tryghost-external-media-inliner-5.40.2.tgz +0 -0
  122. package/components/tryghost-html-to-plaintext-5.40.2.tgz +0 -0
  123. package/components/tryghost-i18n-5.40.2.tgz +0 -0
  124. package/components/tryghost-importer-handler-content-files-5.40.2.tgz +0 -0
  125. package/components/tryghost-magic-link-5.40.2.tgz +0 -0
  126. package/components/tryghost-mailgun-client-5.40.2.tgz +0 -0
  127. package/components/tryghost-member-attribution-5.40.2.tgz +0 -0
  128. package/components/tryghost-members-api-5.40.2.tgz +0 -0
  129. package/components/tryghost-members-events-service-5.40.2.tgz +0 -0
  130. package/components/tryghost-members-payments-5.40.2.tgz +0 -0
  131. package/components/tryghost-members-ssr-5.40.2.tgz +0 -0
  132. package/components/tryghost-milestones-5.40.2.tgz +0 -0
  133. package/components/tryghost-minifier-5.40.2.tgz +0 -0
  134. package/components/tryghost-mw-api-version-mismatch-5.40.2.tgz +0 -0
  135. package/components/tryghost-mw-cache-control-5.40.2.tgz +0 -0
  136. package/components/tryghost-mw-error-handler-5.40.2.tgz +0 -0
  137. package/components/tryghost-mw-session-from-token-5.40.2.tgz +0 -0
  138. package/components/tryghost-mw-update-user-last-seen-5.40.2.tgz +0 -0
  139. package/components/tryghost-mw-version-match-5.40.2.tgz +0 -0
  140. package/components/tryghost-mw-vhost-5.40.2.tgz +0 -0
  141. package/components/tryghost-oembed-service-5.40.2.tgz +0 -0
  142. package/components/tryghost-package-json-5.40.2.tgz +0 -0
  143. package/components/tryghost-posts-service-5.40.2.tgz +0 -0
  144. package/components/tryghost-session-service-5.40.2.tgz +0 -0
  145. package/components/tryghost-settings-path-manager-5.40.2.tgz +0 -0
  146. package/components/tryghost-slack-notifications-5.40.2.tgz +0 -0
  147. package/components/tryghost-staff-service-5.40.2.tgz +0 -0
  148. package/components/tryghost-tiers-5.40.2.tgz +0 -0
  149. package/components/tryghost-verification-trigger-5.40.2.tgz +0 -0
  150. package/components/tryghost-version-notifications-data-service-5.40.2.tgz +0 -0
  151. package/core/built/admin/assets/chunk.143.712450fcbf0ea1950e24.js +0 -49
  152. package/core/built/admin/assets/chunk.808.2e76eb12fa4d7be8cb23.js +0 -5
  153. package/core/built/admin/assets/ghost-68ea49029c6d45b4aa090f4e218917aa.css +0 -1
  154. package/core/built/admin/assets/ghost-dark-c9b38252afc29364507e8c92e4ba9933.css +0 -1
@@ -1757,22 +1757,22 @@ else{var n=Array(e.options.tabSize+1).join(" ")
1757
1757
  e.replaceSelection(n)}}},{codemirror:10}],18:[function(e,t,n){"use strict"
1758
1758
  var r=e("codemirror")
1759
1759
  e("codemirror/addon/edit/continuelist.js"),e("./codemirror/tablist"),e("codemirror/addon/display/fullscreen.js"),e("codemirror/mode/markdown/markdown.js"),e("codemirror/addon/mode/overlay.js"),e("codemirror/addon/display/placeholder.js"),e("codemirror/addon/selection/mark-selection.js"),e("codemirror/mode/gfm/gfm.js"),e("codemirror/mode/xml/xml.js")
1760
- var i=e("codemirror-spell-checker"),o=navigator.userAgent,a=navigator.platform,l=!/Edge\/(\d+)/.exec(o)&&/AppleWebKit/.test(o)&&/Mobile\/\w+/.test(o)||/Mac/.test(a),s=/win/i.test(a),u={toggleBold:y,toggleItalic:x,drawLink:D,toggleHeadingSmaller:k,toggleHeadingBigger:S,drawImage:F,toggleBlockquote:C,toggleOrderedList:N,toggleUnorderedList:A,toggleCodeBlock:w,togglePreview:P,toggleStrikethrough:b,toggleHeading1:L,toggleHeading2:T,toggleHeading3:M,cleanBlock:E,drawTable:O,drawHorizontalRule:I,undo:B,redo:H,toggleSideBySide:W,toggleFullScreen:v},c={toggleBold:"Cmd-B",toggleItalic:"Cmd-I",drawLink:"Cmd-K",toggleHeadingSmaller:"Cmd-H",toggleHeadingBigger:"Shift-Cmd-H",cleanBlock:"Cmd-E",drawImage:"Cmd-Alt-I",toggleBlockquote:"Cmd-'",toggleOrderedList:"Cmd-Alt-L",toggleUnorderedList:"Cmd-L",toggleCodeBlock:"Cmd-Alt-C",togglePreview:"Cmd-P",toggleSideBySide:"F9",toggleFullScreen:"F11"},f=function(e){for(var t in u)if(u[t]===e)return t
1761
- return null}
1762
- function d(e){return l?e.replace("Ctrl","Cmd"):e.replace("Cmd","Ctrl")}function h(e,t,n){e=e||{}
1760
+ var i=e("codemirror-spell-checker"),o=navigator.userAgent,a=navigator.platform,l=!/Edge\/(\d+)/.exec(o)&&/AppleWebKit/.test(o)&&/Mobile\/\w+/.test(o)||/Mac/.test(a),s=/win/i.test(a),u={toggleBold:v,toggleItalic:y,drawLink:E,toggleHeadingSmaller:C,toggleHeadingBigger:k,drawImage:D,toggleBlockquote:w,toggleOrderedList:A,toggleUnorderedList:M,toggleCodeBlock:b,togglePreview:W,toggleStrikethrough:x,toggleHeading1:S,toggleHeading2:L,toggleHeading3:T,cleanBlock:N,drawTable:F,drawHorizontalRule:O,undo:I,redo:B,toggleSideBySide:H,toggleFullScreen:g},c={toggleBold:"Cmd-B",toggleItalic:"Cmd-I",drawLink:"Cmd-K",toggleHeadingSmaller:"Cmd-H",toggleHeadingBigger:"Shift-Cmd-H",cleanBlock:"Cmd-E",drawImage:"Cmd-Alt-I",toggleBlockquote:"Cmd-'",toggleOrderedList:"Cmd-Alt-L",toggleUnorderedList:"Cmd-L",toggleCodeBlock:"Cmd-Alt-C",togglePreview:"Cmd-P",toggleSideBySide:"F9",toggleFullScreen:"F11"}
1761
+ function f(e){return l?e.replace("Ctrl","Cmd"):e.replace("Cmd","Ctrl")}function d(e,t,n){e=e||{}
1763
1762
  var r=document.createElement("a")
1764
1763
  return t=null==t||t,e.title&&t&&(r.title=function(e,t,n){var r,i=e
1765
- return t&&n[r=f(t)]&&(i+=" ("+d(n[r])+")"),i}(e.title,e.action,n),l&&!e.useCtrlOnMac&&(r.title=r.title.replace("Ctrl","⌘")),l&&(r.title=r.title.replace("Alt","⌥"))),r.tabIndex=-1,r.className=e.className,r}function p(){var e=document.createElement("i")
1766
- return e.className="separator",e.innerHTML="|",e}function m(e,t){t=t||e.getCursor("start")
1764
+ return t&&n[r=function(e){for(var t in u)if(u[t]===e)return t
1765
+ return null}(t)]&&(i+=" ("+f(n[r])+")"),i}(e.title,e.action,n),l&&!e.useCtrlOnMac&&(r.title=r.title.replace("Ctrl","⌘")),l&&(r.title=r.title.replace("Alt","⌥"))),r.tabIndex=-1,r.className=e.className,r}function h(){var e=document.createElement("i")
1766
+ return e.className="separator",e.innerHTML="|",e}function p(e,t){t=t||e.getCursor("start")
1767
1767
  var n=e.getTokenAt(t)
1768
1768
  if(!n.type)return{}
1769
1769
  for(var r,i,o=n.type.split(" "),a={},l=0;l<o.length;l++)"strong"===(r=o[l])?a.bold=!0:"variable-2"===r?(i=e.getLine(t.line),/^\s*\d+\.\s/.test(i)?a["ordered-list"]=!0:a["unordered-list"]=!0):"atom"===r?a.quote=!0:"em"===r?a.italic=!0:"quote"===r?a.quote=!0:"strikethrough"===r?a.strikethrough=!0:"comment"===r?a.code=!0:"link"===r?a.link=!0:"tag"===r?a.image=!0:r.match(/^header(\-[1-6])?$/)&&(a[r.replace("header","heading")]=!0)
1770
- return a}var g=""
1771
- function v(e){var t=e.codemirror
1772
- t.setOption("fullScreen",!t.getOption("fullScreen")),t.getOption("fullScreen")?(g=document.body.style.overflow,document.body.style.overflow="hidden"):document.body.style.overflow=g
1770
+ return a}var m=""
1771
+ function g(e){var t=e.codemirror
1772
+ t.setOption("fullScreen",!t.getOption("fullScreen")),t.getOption("fullScreen")?(m=document.body.style.overflow,document.body.style.overflow="hidden"):document.body.style.overflow=m
1773
1773
  var n=t.getWrapperElement();/fullscreen/.test(n.previousSibling.className)?n.previousSibling.className=n.previousSibling.className.replace(/\s*fullscreen\b/,""):n.previousSibling.className+=" fullscreen"
1774
1774
  var r=e.toolbarElements.fullscreen;/active/.test(r.className)?r.className=r.className.replace(/\s*active\s*/g,""):r.className+=" active"
1775
- var i=t.getWrapperElement().nextSibling;/editor-preview-active-side/.test(i.className)&&W(e)}function y(e){_(e,"bold",e.options.blockStyles.bold)}function x(e){_(e,"italic",e.options.blockStyles.italic)}function b(e){_(e,"strikethrough","~~")}function w(e){var t=e.options.blockStyles.code
1775
+ var i=t.getWrapperElement().nextSibling;/editor-preview-active-side/.test(i.className)&&H(e)}function v(e){j(e,"bold",e.options.blockStyles.bold)}function y(e){j(e,"italic",e.options.blockStyles.italic)}function x(e){j(e,"strikethrough","~~")}function b(e){var t=e.options.blockStyles.code
1776
1776
  function n(e){if("object"!=typeof e)throw"fencing_line() takes a 'line' object (not a line number, or line text). Got: "+typeof e+": "+e
1777
1777
  return e.styles&&e.styles[2]&&-1!==e.styles[2].indexOf("formatting-code-block")}function r(e){return e.state.base.base||e.state.base}function i(e,t,i,o,a){i=i||e.getLineHandle(t),o=o||e.getTokenAt({line:t,ch:1}),a=a||!!i.text&&e.getTokenAt({line:t,ch:i.text.length-1})
1778
1778
  var l=o.type?o.type.split(" "):[]
@@ -1788,54 +1788,54 @@ k&&r(k).indentedCode&&s.replaceRange("\n",{line:a+1,ch:0})
1788
1788
  for(var S=o;S<=a;S++)s.indentLine(S,"subtract")
1789
1789
  s.focus()}else{var L=u.line===c.line&&u.ch===c.ch&&0===u.ch,T=u.line!==c.line
1790
1790
  L||T?function(e,t,n,r){var i=t.line+1,o=n.line+1,a=t.line!==n.line,l=r+"\n",s="\n"+r
1791
- a&&o++,a&&0===n.ch&&(s=r+"\n",o--),R(e,!1,[l,s]),e.setSelection({line:i,ch:0},{line:o,ch:0})}(s,u,c,t):R(s,!1,["`","`"])}}function C(e){j(e.codemirror,"quote")}function k(e){z(e.codemirror,"smaller")}function S(e){z(e.codemirror,"bigger")}function L(e){z(e.codemirror,void 0,1)}function T(e){z(e.codemirror,void 0,2)}function M(e){z(e.codemirror,void 0,3)}function A(e){j(e.codemirror,"unordered-list")}function N(e){j(e.codemirror,"ordered-list")}function E(e){!function(e){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className))for(var t,n=e.getCursor("start"),r=e.getCursor("end"),i=n.line;i<=r.line;i++)t=(t=e.getLine(i)).replace(/^[ ]*([# ]+|\*|\-|[> ]+|[0-9]+(.|\)))[ ]*/,""),e.replaceRange(t,{line:i,ch:0},{line:i,ch:99999999999999})}(e.codemirror)}function D(e){var t=e.codemirror,n=m(t),r=e.options,i="http://"
1791
+ a&&o++,a&&0===n.ch&&(s=r+"\n",o--),P(e,!1,[l,s]),e.setSelection({line:i,ch:0},{line:o,ch:0})}(s,u,c,t):P(s,!1,["`","`"])}}function w(e){z(e.codemirror,"quote")}function C(e){R(e.codemirror,"smaller")}function k(e){R(e.codemirror,"bigger")}function S(e){R(e.codemirror,void 0,1)}function L(e){R(e.codemirror,void 0,2)}function T(e){R(e.codemirror,void 0,3)}function M(e){z(e.codemirror,"unordered-list")}function A(e){z(e.codemirror,"ordered-list")}function N(e){!function(e){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className))for(var t,n=e.getCursor("start"),r=e.getCursor("end"),i=n.line;i<=r.line;i++)t=(t=e.getLine(i)).replace(/^[ ]*([# ]+|\*|\-|[> ]+|[0-9]+(.|\)))[ ]*/,""),e.replaceRange(t,{line:i,ch:0},{line:i,ch:99999999999999})}(e.codemirror)}function E(e){var t=e.codemirror,n=p(t),r=e.options,i="http://"
1792
1792
  if(r.promptURLs&&!(i=prompt(r.promptTexts.link)))return!1
1793
- R(t,n.link,r.insertTexts.link,i)}function F(e){var t=e.codemirror,n=m(t),r=e.options,i="http://"
1793
+ P(t,n.link,r.insertTexts.link,i)}function D(e){var t=e.codemirror,n=p(t),r=e.options,i="http://"
1794
1794
  if(r.promptURLs&&!(i=prompt(r.promptTexts.image)))return!1
1795
- R(t,n.image,r.insertTexts.image,i)}function O(e){var t=e.codemirror,n=m(t),r=e.options
1796
- R(t,n.table,r.insertTexts.table)}function I(e){var t=e.codemirror,n=m(t),r=e.options
1797
- R(t,n.image,r.insertTexts.horizontalRule)}function B(e){var t=e.codemirror
1798
- t.undo(),t.focus()}function H(e){var t=e.codemirror
1799
- t.redo(),t.focus()}function W(e){var t=e.codemirror,n=t.getWrapperElement(),r=n.nextSibling,i=e.toolbarElements["side-by-side"],o=!1;/editor-preview-active-side/.test(r.className)?(r.className=r.className.replace(/\s*editor-preview-active-side\s*/g,""),i.className=i.className.replace(/\s*active\s*/g,""),n.className=n.className.replace(/\s*CodeMirror-sided\s*/g," ")):(setTimeout((function(){t.getOption("fullScreen")||v(e),r.className+=" editor-preview-active-side"}),1),i.className+=" active",n.className+=" CodeMirror-sided",o=!0)
1795
+ P(t,n.image,r.insertTexts.image,i)}function F(e){var t=e.codemirror,n=p(t),r=e.options
1796
+ P(t,n.table,r.insertTexts.table)}function O(e){var t=e.codemirror,n=p(t),r=e.options
1797
+ P(t,n.image,r.insertTexts.horizontalRule)}function I(e){var t=e.codemirror
1798
+ t.undo(),t.focus()}function B(e){var t=e.codemirror
1799
+ t.redo(),t.focus()}function H(e){var t=e.codemirror,n=t.getWrapperElement(),r=n.nextSibling,i=e.toolbarElements["side-by-side"],o=!1;/editor-preview-active-side/.test(r.className)?(r.className=r.className.replace(/\s*editor-preview-active-side\s*/g,""),i.className=i.className.replace(/\s*active\s*/g,""),n.className=n.className.replace(/\s*CodeMirror-sided\s*/g," ")):(setTimeout((function(){t.getOption("fullScreen")||g(e),r.className+=" editor-preview-active-side"}),1),i.className+=" active",n.className+=" CodeMirror-sided",o=!0)
1800
1800
  var a=n.lastChild
1801
1801
  if(/editor-preview-active/.test(a.className)){a.className=a.className.replace(/\s*editor-preview-active\s*/g,"")
1802
1802
  var l=e.toolbarElements.preview,s=n.previousSibling
1803
- l.className=l.className.replace(/\s*active\s*/g,""),s.className=s.className.replace(/\s*disabled-for-preview*/g,"")}t.sideBySideRenderingFunction||(t.sideBySideRenderingFunction=function(){r.innerHTML=e.options.previewRender(e.value(),r)}),o?(r.innerHTML=e.options.previewRender(e.value(),r),t.on("update",t.sideBySideRenderingFunction)):t.off("update",t.sideBySideRenderingFunction),t.refresh()}function P(e){var t=e.codemirror,n=t.getWrapperElement(),r=n.previousSibling,i=!!e.options.toolbar&&e.toolbarElements.preview,o=n.lastChild
1803
+ l.className=l.className.replace(/\s*active\s*/g,""),s.className=s.className.replace(/\s*disabled-for-preview*/g,"")}t.sideBySideRenderingFunction||(t.sideBySideRenderingFunction=function(){r.innerHTML=e.options.previewRender(e.value(),r)}),o?(r.innerHTML=e.options.previewRender(e.value(),r),t.on("update",t.sideBySideRenderingFunction)):t.off("update",t.sideBySideRenderingFunction),t.refresh()}function W(e){var t=e.codemirror,n=t.getWrapperElement(),r=n.previousSibling,i=!!e.options.toolbar&&e.toolbarElements.preview,o=n.lastChild
1804
1804
  o&&/editor-preview/.test(o.className)||((o=document.createElement("div")).className="editor-preview",n.appendChild(o)),/editor-preview-active/.test(o.className)?(o.className=o.className.replace(/\s*editor-preview-active\s*/g,""),i&&(i.className=i.className.replace(/\s*active\s*/g,""),r.className=r.className.replace(/\s*disabled-for-preview*/g,""))):(setTimeout((function(){o.className+=" editor-preview-active"}),1),i&&(i.className+=" active",r.className+=" disabled-for-preview")),o.innerHTML=e.options.previewRender(e.value(),o)
1805
- var a=t.getWrapperElement().nextSibling;/editor-preview-active-side/.test(a.className)&&W(e)}function R(e,t,n,r){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){var i,o=n[0],a=n[1],l=e.getCursor("start"),s=e.getCursor("end")
1806
- r&&(a=a.replace("#url#",r)),t?(o=(i=e.getLine(l.line)).slice(0,l.ch),a=i.slice(l.ch),e.replaceRange(o+a,{line:l.line,ch:0})):(i=e.getSelection(),e.replaceSelection(o+i+a),l.ch+=o.length,l!==s&&(s.ch+=o.length)),e.setSelection(l,s),e.focus()}}function z(e,t,n){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){for(var r=e.getCursor("start"),i=e.getCursor("end"),o=r.line;o<=i.line;o++)!function(r){var i=e.getLine(r),o=i.search(/[^#]/)
1805
+ var a=t.getWrapperElement().nextSibling;/editor-preview-active-side/.test(a.className)&&H(e)}function P(e,t,n,r){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){var i,o=n[0],a=n[1],l=e.getCursor("start"),s=e.getCursor("end")
1806
+ r&&(a=a.replace("#url#",r)),t?(o=(i=e.getLine(l.line)).slice(0,l.ch),a=i.slice(l.ch),e.replaceRange(o+a,{line:l.line,ch:0})):(i=e.getSelection(),e.replaceSelection(o+i+a),l.ch+=o.length,l!==s&&(s.ch+=o.length)),e.setSelection(l,s),e.focus()}}function R(e,t,n){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){for(var r=e.getCursor("start"),i=e.getCursor("end"),o=r.line;o<=i.line;o++)!function(r){var i=e.getLine(r),o=i.search(/[^#]/)
1807
1807
  i=void 0!==t?o<=0?"bigger"==t?"###### "+i:"# "+i:6==o&&"smaller"==t?i.substr(7):1==o&&"bigger"==t?i.substr(2):"bigger"==t?i.substr(1):"#"+i:1==n?o<=0?"# "+i:o==n?i.substr(o+1):"# "+i.substr(o+1):2==n?o<=0?"## "+i:o==n?i.substr(o+1):"## "+i.substr(o+1):o<=0?"### "+i:o==n?i.substr(o+1):"### "+i.substr(o+1),e.replaceRange(i,{line:r,ch:0},{line:r,ch:99999999999999})}(o)
1808
- e.focus()}}function j(e,t){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){for(var n=m(e),r=e.getCursor("start"),i=e.getCursor("end"),o={quote:/^(\s*)\>\s+/,"unordered-list":/^(\s*)(\*|\-|\+)\s+/,"ordered-list":/^(\s*)\d+\.\s+/},a={quote:"> ","unordered-list":"* ","ordered-list":"1. "},l=r.line;l<=i.line;l++)!function(r){var i=e.getLine(r)
1808
+ e.focus()}}function z(e,t){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){for(var n=p(e),r=e.getCursor("start"),i=e.getCursor("end"),o={quote:/^(\s*)\>\s+/,"unordered-list":/^(\s*)(\*|\-|\+)\s+/,"ordered-list":/^(\s*)\d+\.\s+/},a={quote:"> ","unordered-list":"* ","ordered-list":"1. "},l=r.line;l<=i.line;l++)!function(r){var i=e.getLine(r)
1809
1809
  i=n[t]?i.replace(o[t],"$1"):a[t]+i,e.replaceRange(i,{line:r,ch:0},{line:r,ch:99999999999999})}(l)
1810
- e.focus()}}function _(e,t,n,r){if(!/editor-preview-active/.test(e.codemirror.getWrapperElement().lastChild.className)){r=void 0===r?n:r
1811
- var i,o=e.codemirror,a=m(o),l=n,s=r,u=o.getCursor("start"),c=o.getCursor("end")
1812
- a[t]?(l=(i=o.getLine(u.line)).slice(0,u.ch),s=i.slice(u.ch),"bold"==t?(l=l.replace(/(\*\*|__)(?![\s\S]*(\*\*|__))/,""),s=s.replace(/(\*\*|__)/,"")):"italic"==t?(l=l.replace(/(\*|_)(?![\s\S]*(\*|_))/,""),s=s.replace(/(\*|_)/,"")):"strikethrough"==t&&(l=l.replace(/(\*\*|~~)(?![\s\S]*(\*\*|~~))/,""),s=s.replace(/(\*\*|~~)/,"")),o.replaceRange(l+s,{line:u.line,ch:0},{line:u.line,ch:99999999999999}),"bold"==t||"strikethrough"==t?(u.ch-=2,u!==c&&(c.ch-=2)):"italic"==t&&(u.ch-=1,u!==c&&(c.ch-=1))):(i=o.getSelection(),"bold"==t?i=(i=i.split("**").join("")).split("__").join(""):"italic"==t?i=(i=i.split("*").join("")).split("_").join(""):"strikethrough"==t&&(i=i.split("~~").join("")),o.replaceSelection(l+i+s),u.ch+=n.length,c.ch=u.ch+i.length),o.setSelection(u,c),o.focus()}}function U(e,t){for(var n in t)t.hasOwnProperty(n)&&(t[n]instanceof Array?e[n]=t[n].concat(e[n]instanceof Array?e[n]:[]):null!==t[n]&&"object"==typeof t[n]&&t[n].constructor===Object?e[n]=U(e[n]||{},t[n]):e[n]=t[n])
1813
- return e}function q(e){for(var t=1;t<arguments.length;t++)e=U(e,arguments[t])
1814
- return e}function G(e){var t=e.match(/[a-zA-Z0-9_\u0392-\u03c9\u0410-\u04F9]+|[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af]+/g),n=0
1810
+ e.focus()}}function j(e,t,n,r){if(!/editor-preview-active/.test(e.codemirror.getWrapperElement().lastChild.className)){r=void 0===r?n:r
1811
+ var i,o=e.codemirror,a=p(o),l=n,s=r,u=o.getCursor("start"),c=o.getCursor("end")
1812
+ a[t]?(l=(i=o.getLine(u.line)).slice(0,u.ch),s=i.slice(u.ch),"bold"==t?(l=l.replace(/(\*\*|__)(?![\s\S]*(\*\*|__))/,""),s=s.replace(/(\*\*|__)/,"")):"italic"==t?(l=l.replace(/(\*|_)(?![\s\S]*(\*|_))/,""),s=s.replace(/(\*|_)/,"")):"strikethrough"==t&&(l=l.replace(/(\*\*|~~)(?![\s\S]*(\*\*|~~))/,""),s=s.replace(/(\*\*|~~)/,"")),o.replaceRange(l+s,{line:u.line,ch:0},{line:u.line,ch:99999999999999}),"bold"==t||"strikethrough"==t?(u.ch-=2,u!==c&&(c.ch-=2)):"italic"==t&&(u.ch-=1,u!==c&&(c.ch-=1))):(i=o.getSelection(),"bold"==t?i=(i=i.split("**").join("")).split("__").join(""):"italic"==t?i=(i=i.split("*").join("")).split("_").join(""):"strikethrough"==t&&(i=i.split("~~").join("")),o.replaceSelection(l+i+s),u.ch+=n.length,c.ch=u.ch+i.length),o.setSelection(u,c),o.focus()}}function _(e,t){for(var n in t)t.hasOwnProperty(n)&&(t[n]instanceof Array?e[n]=t[n].concat(e[n]instanceof Array?e[n]:[]):null!==t[n]&&"object"==typeof t[n]&&t[n].constructor===Object?e[n]=_(e[n]||{},t[n]):e[n]=t[n])
1813
+ return e}function U(e){for(var t=1;t<arguments.length;t++)e=_(e,arguments[t])
1814
+ return e}function q(e){var t=e.match(/[a-zA-Z0-9_\u0392-\u03c9\u0410-\u04F9]+|[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af]+/g),n=0
1815
1815
  if(null===t)return n
1816
1816
  for(var r=0;r<t.length;r++)t[r].charCodeAt(0)>=19968?n+=t[r].length:n+=1
1817
- return n}var V={bold:{name:"bold",action:y,className:"fa fa-bold",title:"Bold",default:!0},italic:{name:"italic",action:x,className:"fa fa-italic",title:"Italic",default:!0},strikethrough:{name:"strikethrough",action:b,className:"fa fa-strikethrough",title:"Strikethrough"},heading:{name:"heading",action:k,className:"fa fa-header",title:"Heading",default:!0},"heading-smaller":{name:"heading-smaller",action:k,className:"fa fa-header fa-header-x fa-header-smaller",title:"Smaller Heading"},"heading-bigger":{name:"heading-bigger",action:S,className:"fa fa-header fa-header-x fa-header-bigger",title:"Bigger Heading"},"heading-1":{name:"heading-1",action:L,className:"fa fa-header fa-header-x fa-header-1",title:"Big Heading"},"heading-2":{name:"heading-2",action:T,className:"fa fa-header fa-header-x fa-header-2",title:"Medium Heading"},"heading-3":{name:"heading-3",action:M,className:"fa fa-header fa-header-x fa-header-3",title:"Small Heading"},"separator-1":{name:"separator-1"},code:{name:"code",action:w,className:"fa fa-code",title:"Code"},quote:{name:"quote",action:C,className:"fa fa-quote-left",title:"Quote",default:!0},"unordered-list":{name:"unordered-list",action:A,className:"fa fa-list-ul",title:"Generic List",default:!0},"ordered-list":{name:"ordered-list",action:N,className:"fa fa-list-ol",title:"Numbered List",default:!0},"clean-block":{name:"clean-block",action:E,className:"fa fa-eraser fa-clean-block",title:"Clean block"},"separator-2":{name:"separator-2"},link:{name:"link",action:D,className:"fa fa-link",title:"Create Link",default:!0},image:{name:"image",action:F,className:"fa fa-picture-o",title:"Insert Image",default:!0},table:{name:"table",action:O,className:"fa fa-table",title:"Insert Table"},"horizontal-rule":{name:"horizontal-rule",action:I,className:"fa fa-minus",title:"Insert Horizontal Line"},"separator-3":{name:"separator-3"},preview:{name:"preview",action:P,className:"fa fa-eye no-disable",title:"Toggle Preview",default:!0},"side-by-side":{name:"side-by-side",action:W,className:"fa fa-columns no-disable no-mobile",title:"Toggle Side by Side",default:!0},fullscreen:{name:"fullscreen",action:v,className:"fa fa-arrows-alt no-disable no-mobile",title:"Toggle Fullscreen",default:!0},"separator-4":{name:"separator-4"},guide:{name:"guide",action:"https://simplemde.com/markdown-guide",className:"fa fa-question-circle",title:"Markdown Guide",default:!0},"separator-5":{name:"separator-5"},undo:{name:"undo",action:B,className:"fa fa-undo no-disable",title:"Undo"},redo:{name:"redo",action:H,className:"fa fa-repeat no-disable",title:"Redo"}},$={link:["[","](#url#)"],image:["![](","#url#)"],table:["","\n\n| Column 1 | Column 2 | Column 3 |\n| -------- | -------- | -------- |\n| Text | Text | Text |\n\n"],horizontalRule:["","\n\n-----\n\n"]},X={link:"URL for the link:",image:"URL of the image:"},K={bold:"**",code:"```",italic:"*"}
1818
- function Y(e){(e=e||{}).parent=this
1817
+ return n}var G={bold:{name:"bold",action:v,className:"fa fa-bold",title:"Bold",default:!0},italic:{name:"italic",action:y,className:"fa fa-italic",title:"Italic",default:!0},strikethrough:{name:"strikethrough",action:x,className:"fa fa-strikethrough",title:"Strikethrough"},heading:{name:"heading",action:C,className:"fa fa-header",title:"Heading",default:!0},"heading-smaller":{name:"heading-smaller",action:C,className:"fa fa-header fa-header-x fa-header-smaller",title:"Smaller Heading"},"heading-bigger":{name:"heading-bigger",action:k,className:"fa fa-header fa-header-x fa-header-bigger",title:"Bigger Heading"},"heading-1":{name:"heading-1",action:S,className:"fa fa-header fa-header-x fa-header-1",title:"Big Heading"},"heading-2":{name:"heading-2",action:L,className:"fa fa-header fa-header-x fa-header-2",title:"Medium Heading"},"heading-3":{name:"heading-3",action:T,className:"fa fa-header fa-header-x fa-header-3",title:"Small Heading"},"separator-1":{name:"separator-1"},code:{name:"code",action:b,className:"fa fa-code",title:"Code"},quote:{name:"quote",action:w,className:"fa fa-quote-left",title:"Quote",default:!0},"unordered-list":{name:"unordered-list",action:M,className:"fa fa-list-ul",title:"Generic List",default:!0},"ordered-list":{name:"ordered-list",action:A,className:"fa fa-list-ol",title:"Numbered List",default:!0},"clean-block":{name:"clean-block",action:N,className:"fa fa-eraser fa-clean-block",title:"Clean block"},"separator-2":{name:"separator-2"},link:{name:"link",action:E,className:"fa fa-link",title:"Create Link",default:!0},image:{name:"image",action:D,className:"fa fa-picture-o",title:"Insert Image",default:!0},table:{name:"table",action:F,className:"fa fa-table",title:"Insert Table"},"horizontal-rule":{name:"horizontal-rule",action:O,className:"fa fa-minus",title:"Insert Horizontal Line"},"separator-3":{name:"separator-3"},preview:{name:"preview",action:W,className:"fa fa-eye no-disable",title:"Toggle Preview",default:!0},"side-by-side":{name:"side-by-side",action:H,className:"fa fa-columns no-disable no-mobile",title:"Toggle Side by Side",default:!0},fullscreen:{name:"fullscreen",action:g,className:"fa fa-arrows-alt no-disable no-mobile",title:"Toggle Fullscreen",default:!0},"separator-4":{name:"separator-4"},guide:{name:"guide",action:"https://simplemde.com/markdown-guide",className:"fa fa-question-circle",title:"Markdown Guide",default:!0},"separator-5":{name:"separator-5"},undo:{name:"undo",action:I,className:"fa fa-undo no-disable",title:"Undo"},redo:{name:"redo",action:B,className:"fa fa-repeat no-disable",title:"Redo"}},V={link:["[","](#url#)"],image:["![](","#url#)"],table:["","\n\n| Column 1 | Column 2 | Column 3 |\n| -------- | -------- | -------- |\n| Text | Text | Text |\n\n"],horizontalRule:["","\n\n-----\n\n"]},$={link:"URL for the link:",image:"URL of the image:"},X={bold:"**",code:"```",italic:"*"}
1818
+ function K(e){(e=e||{}).parent=this
1819
1819
  var t=!0
1820
1820
  if(!1===e.autoDownloadFontAwesome&&(t=!1),!0!==e.autoDownloadFontAwesome)for(var n=document.styleSheets,r=0;r<n.length;r++)n[r].href&&n[r].href.indexOf("//maxcdn.bootstrapcdn.com/font-awesome/")>-1&&(t=!1)
1821
1821
  if(t){var i=document.createElement("link")
1822
1822
  i.rel="stylesheet",i.href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css",document.getElementsByTagName("head")[0].appendChild(i)}if(e.element)this.element=e.element
1823
1823
  else if(null===e.element)return void console.log("SimpleMDE: Error. No element was found.")
1824
- if(void 0===e.toolbar)for(var o in e.toolbar=[],V)V.hasOwnProperty(o)&&(-1!=o.indexOf("separator-")&&e.toolbar.push("|"),(!0===V[o].default||e.showIcons&&e.showIcons.constructor===Array&&-1!=e.showIcons.indexOf(o))&&e.toolbar.push(o))
1825
- e.hasOwnProperty("status")||(e.status=["autosave","lines","words","cursor"]),e.previewRender||(e.previewRender=function(e){return this.parent.markdown(e)}),e.parsingConfig=q({highlightFormatting:!0},e.parsingConfig||{}),e.insertTexts=q({},$,e.insertTexts||{}),e.promptTexts=X,e.blockStyles=q({},K,e.blockStyles||{}),e.shortcuts=q({},c,e.shortcuts||{}),null!=e.autosave&&null!=e.autosave.unique_id&&""!=e.autosave.unique_id&&(e.autosave.uniqueId=e.autosave.unique_id),this.options=e,this.render(),!e.initialValue||this.options.autosave&&!0===this.options.autosave.foundSavedValue||this.value(e.initialValue)}function Z(){if("object"!=typeof localStorage)return!1
1826
- try{localStorage.setItem("smde_localStorage",1),localStorage.removeItem("smde_localStorage")}catch(e){return!1}return!0}Y.prototype.markdown=function(e){},Y.prototype.render=function(e){if(e||(e=this.element||document.getElementsByTagName("textarea")[0]),!this._rendered||this._rendered!==e){this.element=e
1824
+ if(void 0===e.toolbar)for(var o in e.toolbar=[],G)G.hasOwnProperty(o)&&(-1!=o.indexOf("separator-")&&e.toolbar.push("|"),(!0===G[o].default||e.showIcons&&e.showIcons.constructor===Array&&-1!=e.showIcons.indexOf(o))&&e.toolbar.push(o))
1825
+ e.hasOwnProperty("status")||(e.status=["autosave","lines","words","cursor"]),e.previewRender||(e.previewRender=function(e){return this.parent.markdown(e)}),e.parsingConfig=U({highlightFormatting:!0},e.parsingConfig||{}),e.insertTexts=U({},V,e.insertTexts||{}),e.promptTexts=$,e.blockStyles=U({},X,e.blockStyles||{}),e.shortcuts=U({},c,e.shortcuts||{}),null!=e.autosave&&null!=e.autosave.unique_id&&""!=e.autosave.unique_id&&(e.autosave.uniqueId=e.autosave.unique_id),this.options=e,this.render(),!e.initialValue||this.options.autosave&&!0===this.options.autosave.foundSavedValue||this.value(e.initialValue)}function Y(){if("object"!=typeof localStorage)return!1
1826
+ try{localStorage.setItem("smde_localStorage",1),localStorage.removeItem("smde_localStorage")}catch(e){return!1}return!0}K.prototype.markdown=function(e){},K.prototype.render=function(e){if(e||(e=this.element||document.getElementsByTagName("textarea")[0]),!this._rendered||this._rendered!==e){this.element=e
1827
1827
  var t,n,o=this.options,a=this,l={}
1828
- for(var c in o.shortcuts)null!==o.shortcuts[c]&&null!==u[c]&&function(e){l[d(o.shortcuts[e])]=function(){u[e](a)}}(c)
1829
- if(l.Enter="newlineAndIndentContinueMarkdownList",l.Tab="tabAndIndentMarkdownList",l["Shift-Tab"]="shiftTabAndUnindentMarkdownList",l.Esc=function(e){e.getOption("fullScreen")&&v(a)},s&&(l.Home="goLineLeftSmart",l.End="goLineRight"),document.addEventListener("keydown",(function(e){27==(e=e||window.event).keyCode&&a.codemirror.getOption("fullScreen")&&v(a)}),!1),!1!==o.spellChecker?(t="spell-checker",(n=o.parsingConfig).name="gfm",n.gitHubSpice=!1,i({codeMirrorInstance:r})):((t=o.parsingConfig).name="gfm",t.gitHubSpice=!1),this.codemirror=r.fromTextArea(e,{mode:t,backdrop:n,theme:"paper",tabSize:null!=o.tabSize?o.tabSize:2,indentUnit:null!=o.tabSize?o.tabSize:2,indentWithTabs:!1!==o.indentWithTabs,lineNumbers:!1,autofocus:!0===o.autofocus,extraKeys:l,lineWrapping:!1!==o.lineWrapping,allowDropFileTypes:["text/plain"],placeholder:o.placeholder||e.getAttribute("placeholder")||"",styleSelectedText:null==o.styleSelectedText||o.styleSelectedText}),!0===o.forceSync){var f=this.codemirror
1830
- f.on("change",(function(){f.save()}))}this.gui={},!1!==o.toolbar&&(this.gui.toolbar=this.createToolbar()),!1!==o.status&&(this.gui.statusbar=this.createStatusbar()),null!=o.autosave&&!0===o.autosave.enabled&&this.autosave(),this.gui.sideBySide=this.createSideBySide(),this._rendered=this.element
1828
+ for(var c in o.shortcuts)null!==o.shortcuts[c]&&null!==u[c]&&function(e){l[f(o.shortcuts[e])]=function(){u[e](a)}}(c)
1829
+ if(l.Enter="newlineAndIndentContinueMarkdownList",l.Tab="tabAndIndentMarkdownList",l["Shift-Tab"]="shiftTabAndUnindentMarkdownList",l.Esc=function(e){e.getOption("fullScreen")&&g(a)},s&&(l.Home="goLineLeftSmart",l.End="goLineRight"),document.addEventListener("keydown",(function(e){27==(e=e||window.event).keyCode&&a.codemirror.getOption("fullScreen")&&g(a)}),!1),!1!==o.spellChecker?(t="spell-checker",(n=o.parsingConfig).name="gfm",n.gitHubSpice=!1,i({codeMirrorInstance:r})):((t=o.parsingConfig).name="gfm",t.gitHubSpice=!1),this.codemirror=r.fromTextArea(e,{mode:t,backdrop:n,theme:"paper",tabSize:null!=o.tabSize?o.tabSize:2,indentUnit:null!=o.tabSize?o.tabSize:2,indentWithTabs:!1!==o.indentWithTabs,lineNumbers:!1,autofocus:!0===o.autofocus,extraKeys:l,lineWrapping:!1!==o.lineWrapping,allowDropFileTypes:["text/plain"],placeholder:o.placeholder||e.getAttribute("placeholder")||"",styleSelectedText:null==o.styleSelectedText||o.styleSelectedText}),!0===o.forceSync){var d=this.codemirror
1830
+ d.on("change",(function(){d.save()}))}this.gui={},!1!==o.toolbar&&(this.gui.toolbar=this.createToolbar()),!1!==o.status&&(this.gui.statusbar=this.createStatusbar()),null!=o.autosave&&!0===o.autosave.enabled&&this.autosave(),this.gui.sideBySide=this.createSideBySide(),this._rendered=this.element
1831
1831
  var h=this.codemirror
1832
- setTimeout(function(){h.refresh()}.bind(h),0)}},Y.prototype.autosave=function(){if(Z()){var e=this
1832
+ setTimeout(function(){h.refresh()}.bind(h),0)}},K.prototype.autosave=function(){if(Y()){var e=this
1833
1833
  if(null==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return void console.log("SimpleMDE: You must set a uniqueId to use the autosave feature")
1834
1834
  null!=e.element.form&&null!=e.element.form&&e.element.form.addEventListener("submit",(function(){localStorage.removeItem("smde_"+e.options.autosave.uniqueId)})),!0!==this.options.autosave.loaded&&("string"==typeof localStorage.getItem("smde_"+this.options.autosave.uniqueId)&&""!=localStorage.getItem("smde_"+this.options.autosave.uniqueId)&&(this.codemirror.setValue(localStorage.getItem("smde_"+this.options.autosave.uniqueId)),this.options.autosave.foundSavedValue=!0),this.options.autosave.loaded=!0),localStorage.setItem("smde_"+this.options.autosave.uniqueId,e.value())
1835
1835
  var t=document.getElementById("autosaved")
1836
1836
  if(null!=t&&null!=t&&""!=t){var n=new Date,r=n.getHours(),i=n.getMinutes(),o="am",a=r
1837
- a>=12&&(a=r-12,o="pm"),0==a&&(a=12),i=i<10?"0"+i:i,t.innerHTML="Autosaved: "+a+":"+i+" "+o}this.autosaveTimeoutId=setTimeout((function(){e.autosave()}),this.options.autosave.delay||1e4)}else console.log("SimpleMDE: localStorage not available, cannot autosave")},Y.prototype.clearAutosavedValue=function(){if(Z()){if(null==this.options.autosave||null==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return void console.log("SimpleMDE: You must set a uniqueId to clear the autosave value")
1838
- localStorage.removeItem("smde_"+this.options.autosave.uniqueId)}else console.log("SimpleMDE: localStorage not available, cannot autosave")},Y.prototype.createSideBySide=function(){var e=this.codemirror,t=e.getWrapperElement(),n=t.nextSibling
1837
+ a>=12&&(a=r-12,o="pm"),0==a&&(a=12),i=i<10?"0"+i:i,t.innerHTML="Autosaved: "+a+":"+i+" "+o}this.autosaveTimeoutId=setTimeout((function(){e.autosave()}),this.options.autosave.delay||1e4)}else console.log("SimpleMDE: localStorage not available, cannot autosave")},K.prototype.clearAutosavedValue=function(){if(Y()){if(null==this.options.autosave||null==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return void console.log("SimpleMDE: You must set a uniqueId to clear the autosave value")
1838
+ localStorage.removeItem("smde_"+this.options.autosave.uniqueId)}else console.log("SimpleMDE: localStorage not available, cannot autosave")},K.prototype.createSideBySide=function(){var e=this.codemirror,t=e.getWrapperElement(),n=t.nextSibling
1839
1839
  n&&/editor-preview-side/.test(n.className)||((n=document.createElement("div")).className="editor-preview-side",t.parentNode.insertBefore(n,t.nextSibling))
1840
1840
  var r=!1,i=!1
1841
1841
  return e.on("scroll",(function(e){if(r)r=!1
@@ -1844,31 +1844,31 @@ var t=e.getScrollInfo().height-e.getScrollInfo().clientHeight,o=parseFloat(e.get
1844
1844
  n.scrollTop=a}})),n.onscroll=function(){if(i)i=!1
1845
1845
  else{r=!0
1846
1846
  var t=n.scrollHeight-n.clientHeight,o=parseFloat(n.scrollTop)/t,a=(e.getScrollInfo().height-e.getScrollInfo().clientHeight)*o
1847
- e.scrollTo(0,a)}},n},Y.prototype.createToolbar=function(e){if((e=e||this.options.toolbar)&&0!==e.length){var t
1848
- for(t=0;t<e.length;t++)null!=V[e[t]]&&(e[t]=V[e[t]])
1847
+ e.scrollTo(0,a)}},n},K.prototype.createToolbar=function(e){if((e=e||this.options.toolbar)&&0!==e.length){var t
1848
+ for(t=0;t<e.length;t++)null!=G[e[t]]&&(e[t]=G[e[t]])
1849
1849
  var n=document.createElement("div")
1850
1850
  n.className="editor-toolbar"
1851
1851
  var r,i,o=this,a={}
1852
1852
  for(o.toolbar=e,t=0;t<e.length;t++)if(("guide"!=e[t].name||!1!==o.options.toolbarGuideIcon)&&!(o.options.hideIcons&&-1!=o.options.hideIcons.indexOf(e[t].name)||("fullscreen"==e[t].name||"side-by-side"==e[t].name)&&(r=void 0,i=void 0,i=!1,r=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(r)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(r.substr(0,4)))&&(i=!0),i))){if("|"===e[t]){for(var l=!1,s=t+1;s<e.length;s++)"|"===e[s]||o.options.hideIcons&&-1!=o.options.hideIcons.indexOf(e[s].name)||(l=!0)
1853
1853
  if(!l)continue}!function(e){var t
1854
- t="|"===e?p():h(e,o.options.toolbarTips,o.options.shortcuts),e.action&&("function"==typeof e.action?t.onclick=function(t){t.preventDefault(),e.action(o)}:"string"==typeof e.action&&(t.href=e.action,t.target="_blank")),a[e.name||e]=t,n.appendChild(t)}(e[t])}o.toolbarElements=a
1854
+ t="|"===e?h():d(e,o.options.toolbarTips,o.options.shortcuts),e.action&&("function"==typeof e.action?t.onclick=function(t){t.preventDefault(),e.action(o)}:"string"==typeof e.action&&(t.href=e.action,t.target="_blank")),a[e.name||e]=t,n.appendChild(t)}(e[t])}o.toolbarElements=a
1855
1855
  var u=this.codemirror
1856
- u.on("cursorActivity",(function(){var e=m(u)
1856
+ u.on("cursorActivity",(function(){var e=p(u)
1857
1857
  for(var t in a)!function(t){var n=a[t]
1858
1858
  e[t]?n.className+=" active":"fullscreen"!=t&&"side-by-side"!=t&&"spellcheck"!=t&&"hemmingway"!=t&&(n.className=n.className.replace(/\s*active\s*/g,""))}(t)}))
1859
1859
  var c=u.getWrapperElement()
1860
- return c.parentNode.insertBefore(n,c),n}},Y.prototype.createStatusbar=function(e){e=e||this.options.status
1860
+ return c.parentNode.insertBefore(n,c),n}},K.prototype.createStatusbar=function(e){e=e||this.options.status
1861
1861
  var t=this.options,n=this.codemirror
1862
1862
  if(e&&0!==e.length){var r,i,o,a=[]
1863
1863
  for(r=0;r<e.length;r++)if(i=void 0,o=void 0,"object"==typeof e[r])a.push({className:e[r].className,defaultValue:e[r].defaultValue,onUpdate:e[r].onUpdate})
1864
1864
  else{var l=e[r]
1865
- "words"===l?(o=function(e){e.innerHTML=G(n.getValue())},i=function(e){e.innerHTML=G(n.getValue())}):"lines"===l?(o=function(e){e.innerHTML=n.lineCount()},i=function(e){e.innerHTML=n.lineCount()}):"cursor"===l?(o=function(e){e.innerHTML="0:0"},i=function(e){var t=n.getCursor()
1865
+ "words"===l?(o=function(e){e.innerHTML=q(n.getValue())},i=function(e){e.innerHTML=q(n.getValue())}):"lines"===l?(o=function(e){e.innerHTML=n.lineCount()},i=function(e){e.innerHTML=n.lineCount()}):"cursor"===l?(o=function(e){e.innerHTML="0:0"},i=function(e){var t=n.getCursor()
1866
1866
  e.innerHTML=t.line+":"+t.ch}):"autosave"===l&&(o=function(e){null!=t.autosave&&!0===t.autosave.enabled&&e.setAttribute("id","autosaved")}),a.push({className:l,defaultValue:o,onUpdate:i})}var s=document.createElement("div")
1867
1867
  for(s.className="editor-statusbar",r=0;r<a.length;r++){var u=a[r],c=document.createElement("span")
1868
1868
  c.className=u.className,"function"==typeof u.defaultValue&&u.defaultValue(c),"function"==typeof u.onUpdate&&this.codemirror.on("update",function(e,t){return function(){t.onUpdate(e)}}(c,u)),s.appendChild(c)}var f=this.codemirror.getWrapperElement()
1869
- return f.parentNode.insertBefore(s,f.nextSibling),s}},Y.prototype.value=function(e){return void 0===e?this.codemirror.getValue():(this.codemirror.getDoc().setValue(e),this)},Y.toggleBold=y,Y.toggleItalic=x,Y.toggleStrikethrough=b,Y.toggleBlockquote=C,Y.toggleHeadingSmaller=k,Y.toggleHeadingBigger=S,Y.toggleHeading1=L,Y.toggleHeading2=T,Y.toggleHeading3=M,Y.toggleCodeBlock=w,Y.toggleUnorderedList=A,Y.toggleOrderedList=N,Y.cleanBlock=E,Y.drawLink=D,Y.drawImage=F,Y.drawTable=O,Y.drawHorizontalRule=I,Y.undo=B,Y.redo=H,Y.togglePreview=P,Y.toggleSideBySide=W,Y.toggleFullScreen=v,Y.prototype.toggleBold=function(){y(this)},Y.prototype.toggleItalic=function(){x(this)},Y.prototype.toggleStrikethrough=function(){b(this)},Y.prototype.toggleBlockquote=function(){C(this)},Y.prototype.toggleHeadingSmaller=function(){k(this)},Y.prototype.toggleHeadingBigger=function(){S(this)},Y.prototype.toggleHeading1=function(){L(this)},Y.prototype.toggleHeading2=function(){T(this)},Y.prototype.toggleHeading3=function(){M(this)},Y.prototype.toggleCodeBlock=function(){w(this)},Y.prototype.toggleUnorderedList=function(){A(this)},Y.prototype.toggleOrderedList=function(){N(this)},Y.prototype.cleanBlock=function(){E(this)},Y.prototype.drawLink=function(){D(this)},Y.prototype.drawImage=function(){F(this)},Y.prototype.drawTable=function(){O(this)},Y.prototype.drawHorizontalRule=function(){I(this)},Y.prototype.undo=function(){B(this)},Y.prototype.redo=function(){H(this)},Y.prototype.togglePreview=function(){P(this)},Y.prototype.toggleSideBySide=function(){W(this)},Y.prototype.toggleFullScreen=function(){v(this)},Y.prototype.isPreviewActive=function(){var e=this.codemirror.getWrapperElement().lastChild
1870
- return/editor-preview-active/.test(e.className)},Y.prototype.isSideBySideActive=function(){var e=this.codemirror.getWrapperElement().nextSibling
1871
- return/editor-preview-active-side/.test(e.className)},Y.prototype.isFullscreenActive=function(){return this.codemirror.getOption("fullScreen")},Y.prototype.getState=function(){return m(this.codemirror)},Y.prototype.toTextArea=function(){var e=this.codemirror,t=e.getWrapperElement()
1872
- t.parentNode&&(this.gui.toolbar&&t.parentNode.removeChild(this.gui.toolbar),this.gui.statusbar&&t.parentNode.removeChild(this.gui.statusbar),this.gui.sideBySide&&t.parentNode.removeChild(this.gui.sideBySide)),e.toTextArea(),this.autosaveTimeoutId&&(clearTimeout(this.autosaveTimeoutId),this.autosaveTimeoutId=void 0,this.clearAutosavedValue())},t.exports=Y},{"./codemirror/tablist":17,codemirror:10,"codemirror-spell-checker":4,"codemirror/addon/display/fullscreen.js":5,"codemirror/addon/display/placeholder.js":6,"codemirror/addon/edit/continuelist.js":7,"codemirror/addon/mode/overlay.js":8,"codemirror/addon/selection/mark-selection.js":9,"codemirror/mode/gfm/gfm.js":11,"codemirror/mode/markdown/markdown.js":12,"codemirror/mode/xml/xml.js":14}]},{},[18])(18)}))
1869
+ return f.parentNode.insertBefore(s,f.nextSibling),s}},K.prototype.value=function(e){return void 0===e?this.codemirror.getValue():(this.codemirror.getDoc().setValue(e),this)},K.toggleBold=v,K.toggleItalic=y,K.toggleStrikethrough=x,K.toggleBlockquote=w,K.toggleHeadingSmaller=C,K.toggleHeadingBigger=k,K.toggleHeading1=S,K.toggleHeading2=L,K.toggleHeading3=T,K.toggleCodeBlock=b,K.toggleUnorderedList=M,K.toggleOrderedList=A,K.cleanBlock=N,K.drawLink=E,K.drawImage=D,K.drawTable=F,K.drawHorizontalRule=O,K.undo=I,K.redo=B,K.togglePreview=W,K.toggleSideBySide=H,K.toggleFullScreen=g,K.prototype.toggleBold=function(){v(this)},K.prototype.toggleItalic=function(){y(this)},K.prototype.toggleStrikethrough=function(){x(this)},K.prototype.toggleBlockquote=function(){w(this)},K.prototype.toggleHeadingSmaller=function(){C(this)},K.prototype.toggleHeadingBigger=function(){k(this)},K.prototype.toggleHeading1=function(){S(this)},K.prototype.toggleHeading2=function(){L(this)},K.prototype.toggleHeading3=function(){T(this)},K.prototype.toggleCodeBlock=function(){b(this)},K.prototype.toggleUnorderedList=function(){M(this)},K.prototype.toggleOrderedList=function(){A(this)},K.prototype.cleanBlock=function(){N(this)},K.prototype.drawLink=function(){E(this)},K.prototype.drawImage=function(){D(this)},K.prototype.drawTable=function(){F(this)},K.prototype.drawHorizontalRule=function(){O(this)},K.prototype.undo=function(){I(this)},K.prototype.redo=function(){B(this)},K.prototype.togglePreview=function(){W(this)},K.prototype.toggleSideBySide=function(){H(this)},K.prototype.toggleFullScreen=function(){g(this)},K.prototype.isPreviewActive=function(){var e=this.codemirror.getWrapperElement().lastChild
1870
+ return/editor-preview-active/.test(e.className)},K.prototype.isSideBySideActive=function(){var e=this.codemirror.getWrapperElement().nextSibling
1871
+ return/editor-preview-active-side/.test(e.className)},K.prototype.isFullscreenActive=function(){return this.codemirror.getOption("fullScreen")},K.prototype.getState=function(){return p(this.codemirror)},K.prototype.toTextArea=function(){var e=this.codemirror,t=e.getWrapperElement()
1872
+ t.parentNode&&(this.gui.toolbar&&t.parentNode.removeChild(this.gui.toolbar),this.gui.statusbar&&t.parentNode.removeChild(this.gui.statusbar),this.gui.sideBySide&&t.parentNode.removeChild(this.gui.sideBySide)),e.toTextArea(),this.autosaveTimeoutId&&(clearTimeout(this.autosaveTimeoutId),this.autosaveTimeoutId=void 0,this.clearAutosavedValue())},t.exports=K},{"./codemirror/tablist":17,codemirror:10,"codemirror-spell-checker":4,"codemirror/addon/display/fullscreen.js":5,"codemirror/addon/display/placeholder.js":6,"codemirror/addon/edit/continuelist.js":7,"codemirror/addon/mode/overlay.js":8,"codemirror/addon/selection/mark-selection.js":9,"codemirror/mode/gfm/gfm.js":11,"codemirror/mode/markdown/markdown.js":12,"codemirror/mode/xml/xml.js":14}]},{},[18])(18)}))
1873
1873
 
1874
- //# sourceMappingURL=simplemde-9cd5549b68db674742d6ec2ecd72ac30.map
1874
+ //# sourceMappingURL=simplemde-d16ff9bcc5bf6ad4916fb0034a30adb1.map