@lotte-innovate/ui-component-test 0.1.76 → 0.1.77

Sign up to get free protection for your applications and to get access to all the features.
Files changed (478) hide show
  1. package/README.md +9 -11
  2. package/dist/globals.css +2 -2
  3. package/dist/lib/_virtual/index.mjs +1 -1
  4. package/dist/lib/_virtual/index2.mjs +1 -1
  5. package/dist/lib/_virtual/index3.mjs +1 -1
  6. package/dist/lib/_virtual/react-is.development.mjs +2 -0
  7. package/dist/lib/_virtual/react-is.development.mjs.map +1 -0
  8. package/dist/lib/_virtual/react-is.production.min.mjs +2 -0
  9. package/dist/lib/_virtual/react-is.production.min.mjs.map +1 -0
  10. package/dist/lib/components/Editor/index.d.ts +10 -5
  11. package/dist/lib/components/Editor/index.js +50 -6
  12. package/dist/lib/components/Footer/index.js +8 -1
  13. package/dist/lib/components/Gnb/GnbInfo.js +1 -0
  14. package/dist/lib/components/Gnb/GnbLogo.js +3 -4
  15. package/dist/lib/components/Gnb/GnbMenu.js +1 -0
  16. package/dist/lib/components/Gnb/GnbRoot.js +4 -2
  17. package/dist/lib/components/Grid/Pagination.d.ts +2 -0
  18. package/dist/lib/components/Grid/Pagination.js +17 -0
  19. package/dist/lib/components/Grid/index.d.ts +1 -2
  20. package/dist/lib/components/Grid/index.js +40 -47
  21. package/dist/lib/components/Grid/useGrid.d.ts +1 -1
  22. package/dist/lib/components/Grid/useGrid.js +19 -11
  23. package/dist/lib/components/Slider/index.d.ts +2 -1
  24. package/dist/lib/components/index.d.ts +2 -1
  25. package/dist/lib/components/index.js +3 -1
  26. package/dist/lib/dist/lib/components/BarChart/index.mjs.map +1 -1
  27. package/dist/lib/dist/lib/components/Breadcrumb/BreadcrumbEllipsis.mjs.map +1 -1
  28. package/dist/lib/dist/lib/components/Breadcrumb/BreadcrumbItem.mjs.map +1 -1
  29. package/dist/lib/dist/lib/components/Breadcrumb/BreadcrumbLink.mjs.map +1 -1
  30. package/dist/lib/dist/lib/components/Breadcrumb/BreadcrumbList.mjs.map +1 -1
  31. package/dist/lib/dist/lib/components/Breadcrumb/BreadcrumbPage.mjs.map +1 -1
  32. package/dist/lib/dist/lib/components/Breadcrumb/BreadcrumbSeparator.mjs.map +1 -1
  33. package/dist/lib/dist/lib/components/BubbleChart/index.mjs.map +1 -1
  34. package/dist/lib/dist/lib/components/ContextMenu/ContextMenuGroup.mjs.map +1 -1
  35. package/dist/lib/dist/lib/components/ContextMenu/ContextMenuSeparator.mjs.map +1 -1
  36. package/dist/lib/dist/lib/components/ContextMenu/ContextMenuTrigger.mjs.map +1 -1
  37. package/dist/lib/dist/lib/components/Dialog/DialogTrigger.mjs.map +1 -1
  38. package/dist/lib/dist/lib/components/DoughnutChart/index.mjs.map +1 -1
  39. package/dist/lib/dist/lib/components/DropdownMenu/DropdonMenuRadioGroup.mjs.map +1 -1
  40. package/dist/lib/dist/lib/components/DropdownMenu/DropdownMenuSeparator.mjs.map +1 -1
  41. package/dist/lib/dist/lib/components/DropdownMenu/DropdownMenuSub.mjs.map +1 -1
  42. package/dist/lib/dist/lib/components/Editor/index.mjs +1 -1
  43. package/dist/lib/dist/lib/components/Footer/index.mjs +1 -1
  44. package/dist/lib/dist/lib/components/Gnb/GnbInfo.mjs +1 -0
  45. package/dist/lib/dist/lib/components/Gnb/GnbInfo.mjs.map +1 -1
  46. package/dist/lib/dist/lib/components/Gnb/GnbLogo.mjs +1 -1
  47. package/dist/lib/dist/lib/components/Gnb/GnbLogo.mjs.map +1 -1
  48. package/dist/lib/dist/lib/components/Gnb/GnbMenu.mjs +2 -1
  49. package/dist/lib/dist/lib/components/Gnb/GnbMenu.mjs.map +1 -1
  50. package/dist/lib/dist/lib/components/Gnb/GnbRoot.mjs +1 -1
  51. package/dist/lib/dist/lib/components/Grid/Pagination.mjs +2 -0
  52. package/dist/lib/dist/lib/components/Grid/Pagination.mjs.map +1 -0
  53. package/dist/lib/dist/lib/components/Grid/index.mjs +3 -0
  54. package/dist/lib/dist/lib/components/Grid/index.mjs.map +1 -0
  55. package/dist/lib/dist/lib/components/Grid/useGrid.mjs +3 -0
  56. package/dist/lib/dist/lib/components/Grid/useGrid.mjs.map +1 -0
  57. package/dist/lib/dist/lib/components/HoverCard/HoverCardTrigger.mjs.map +1 -1
  58. package/dist/lib/dist/lib/components/LineChart/index.mjs.map +1 -1
  59. package/dist/lib/dist/lib/components/Menubar/MenubarMenu.mjs.map +1 -1
  60. package/dist/lib/dist/lib/components/Menubar/MenubarSeparator.mjs.map +1 -1
  61. package/dist/lib/dist/lib/components/Menubar/MenubarSub.mjs.map +1 -1
  62. package/dist/lib/dist/lib/components/NavigationMenu/NavigationMenuIndicator.mjs.map +1 -1
  63. package/dist/lib/dist/lib/components/NavigationMenu/NavigationMenuItem.mjs.map +1 -1
  64. package/dist/lib/dist/lib/components/PieChart/index.mjs.map +1 -1
  65. package/dist/lib/dist/lib/components/Popover/PopoverTrigger.mjs.map +1 -1
  66. package/dist/lib/dist/lib/components/RadarChart/index.mjs.map +1 -1
  67. package/dist/lib/dist/lib/components/SegmentedControl/SegmentedControlItem.mjs.map +1 -1
  68. package/dist/lib/dist/lib/constants.mjs +1 -1
  69. package/dist/lib/dist/lib/constants.mjs.map +1 -1
  70. package/dist/lib/dist/lib/index.mjs +1 -1
  71. package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/ScriptLoader2.mjs +2 -0
  72. package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/ScriptLoader2.mjs.map +1 -0
  73. package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/TinyMCE.mjs +2 -0
  74. package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/TinyMCE.mjs.map +1 -0
  75. package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/Utils.mjs +2 -0
  76. package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/Utils.mjs.map +1 -0
  77. package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/components/Editor.mjs +2 -0
  78. package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/components/Editor.mjs.map +1 -0
  79. package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/components/EditorPropTypes.mjs +2 -0
  80. package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/components/EditorPropTypes.mjs.map +1 -0
  81. package/dist/lib/node_modules/marked/lib/marked.esm.mjs +2 -0
  82. package/dist/lib/node_modules/marked/lib/marked.esm.mjs.map +1 -0
  83. package/dist/lib/node_modules/object-assign/index.mjs +7 -0
  84. package/dist/lib/node_modules/object-assign/index.mjs.map +1 -0
  85. package/dist/lib/node_modules/prop-types/checkPropTypes.mjs +2 -0
  86. package/dist/lib/node_modules/prop-types/checkPropTypes.mjs.map +1 -0
  87. package/dist/lib/node_modules/prop-types/factoryWithThrowingShims.mjs +2 -0
  88. package/dist/lib/node_modules/prop-types/factoryWithThrowingShims.mjs.map +1 -0
  89. package/dist/lib/node_modules/prop-types/factoryWithTypeCheckers.mjs +2 -0
  90. package/dist/lib/node_modules/prop-types/factoryWithTypeCheckers.mjs.map +1 -0
  91. package/dist/lib/node_modules/prop-types/index.mjs +2 -0
  92. package/dist/lib/node_modules/prop-types/index.mjs.map +1 -0
  93. package/dist/lib/node_modules/prop-types/lib/ReactPropTypesSecret.mjs +2 -0
  94. package/dist/lib/node_modules/prop-types/lib/ReactPropTypesSecret.mjs.map +1 -0
  95. package/dist/lib/node_modules/prop-types/lib/has.mjs +2 -0
  96. package/dist/lib/node_modules/prop-types/lib/has.mjs.map +1 -0
  97. package/dist/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.mjs +10 -0
  98. package/dist/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.mjs.map +1 -0
  99. package/dist/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.mjs +10 -0
  100. package/dist/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.mjs.map +1 -0
  101. package/dist/lib/node_modules/prop-types/node_modules/react-is/index.mjs +2 -0
  102. package/dist/lib/node_modules/prop-types/node_modules/react-is/index.mjs.map +1 -0
  103. package/dist/lib/tsconfig.tsbuildinfo +1 -1
  104. package/dist/lib/types.d.ts +2 -1
  105. package/dist/tsconfig.tsbuildinfo +1 -1
  106. package/package.json +6 -6
  107. package/dist/lib/_virtual/_commonjsHelpers.mjs +0 -2
  108. package/dist/lib/_virtual/_commonjsHelpers.mjs.map +0 -1
  109. package/dist/lib/_virtual/_interop_require_default.mjs +0 -2
  110. package/dist/lib/_virtual/_interop_require_default.mjs.map +0 -1
  111. package/dist/lib/_virtual/_interop_require_wildcard.mjs +0 -2
  112. package/dist/lib/_virtual/_interop_require_wildcard.mjs.map +0 -1
  113. package/dist/lib/_virtual/action-async-storage.external.mjs +0 -2
  114. package/dist/lib/_virtual/action-async-storage.external.mjs.map +0 -1
  115. package/dist/lib/_virtual/add-base-path.mjs +0 -2
  116. package/dist/lib/_virtual/add-base-path.mjs.map +0 -1
  117. package/dist/lib/_virtual/add-locale.mjs +0 -2
  118. package/dist/lib/_virtual/add-locale.mjs.map +0 -1
  119. package/dist/lib/_virtual/add-locale2.mjs +0 -2
  120. package/dist/lib/_virtual/add-locale2.mjs.map +0 -1
  121. package/dist/lib/_virtual/add-path-prefix.mjs +0 -2
  122. package/dist/lib/_virtual/add-path-prefix.mjs.map +0 -1
  123. package/dist/lib/_virtual/amp-context.shared-runtime.mjs +0 -2
  124. package/dist/lib/_virtual/amp-context.shared-runtime.mjs.map +0 -1
  125. package/dist/lib/_virtual/amp-mode.mjs +0 -2
  126. package/dist/lib/_virtual/amp-mode.mjs.map +0 -1
  127. package/dist/lib/_virtual/app-paths.mjs +0 -2
  128. package/dist/lib/_virtual/app-paths.mjs.map +0 -1
  129. package/dist/lib/_virtual/app-router-context.shared-runtime.mjs +0 -2
  130. package/dist/lib/_virtual/app-router-context.shared-runtime.mjs.map +0 -1
  131. package/dist/lib/_virtual/async-local-storage.mjs +0 -2
  132. package/dist/lib/_virtual/async-local-storage.mjs.map +0 -1
  133. package/dist/lib/_virtual/bailout-to-client-rendering.mjs +0 -2
  134. package/dist/lib/_virtual/bailout-to-client-rendering.mjs.map +0 -1
  135. package/dist/lib/_virtual/bailout-to-csr.mjs +0 -2
  136. package/dist/lib/_virtual/bailout-to-csr.mjs.map +0 -1
  137. package/dist/lib/_virtual/client-hook-in-server-component-error.mjs +0 -2
  138. package/dist/lib/_virtual/client-hook-in-server-component-error.mjs.map +0 -1
  139. package/dist/lib/_virtual/detect-domain-locale.mjs +0 -2
  140. package/dist/lib/_virtual/detect-domain-locale.mjs.map +0 -1
  141. package/dist/lib/_virtual/detect-domain-locale2.mjs +0 -2
  142. package/dist/lib/_virtual/detect-domain-locale2.mjs.map +0 -1
  143. package/dist/lib/_virtual/ensure-leading-slash.mjs +0 -2
  144. package/dist/lib/_virtual/ensure-leading-slash.mjs.map +0 -1
  145. package/dist/lib/_virtual/escape-regexp.mjs +0 -2
  146. package/dist/lib/_virtual/escape-regexp.mjs.map +0 -1
  147. package/dist/lib/_virtual/format-url.mjs +0 -2
  148. package/dist/lib/_virtual/format-url.mjs.map +0 -1
  149. package/dist/lib/_virtual/get-domain-locale.mjs +0 -2
  150. package/dist/lib/_virtual/get-domain-locale.mjs.map +0 -1
  151. package/dist/lib/_virtual/get-img-props.mjs +0 -2
  152. package/dist/lib/_virtual/get-img-props.mjs.map +0 -1
  153. package/dist/lib/_virtual/get-segment-value.mjs +0 -2
  154. package/dist/lib/_virtual/get-segment-value.mjs.map +0 -1
  155. package/dist/lib/_virtual/has-base-path.mjs +0 -2
  156. package/dist/lib/_virtual/has-base-path.mjs.map +0 -1
  157. package/dist/lib/_virtual/head-manager-context.shared-runtime.mjs +0 -2
  158. package/dist/lib/_virtual/head-manager-context.shared-runtime.mjs.map +0 -1
  159. package/dist/lib/_virtual/head.mjs +0 -2
  160. package/dist/lib/_virtual/head.mjs.map +0 -1
  161. package/dist/lib/_virtual/hooks-client-context.shared-runtime.mjs +0 -2
  162. package/dist/lib/_virtual/hooks-client-context.shared-runtime.mjs.map +0 -1
  163. package/dist/lib/_virtual/image-blur-svg.mjs +0 -2
  164. package/dist/lib/_virtual/image-blur-svg.mjs.map +0 -1
  165. package/dist/lib/_virtual/image-component.mjs +0 -2
  166. package/dist/lib/_virtual/image-component.mjs.map +0 -1
  167. package/dist/lib/_virtual/image-config-context.shared-runtime.mjs +0 -2
  168. package/dist/lib/_virtual/image-config-context.shared-runtime.mjs.map +0 -1
  169. package/dist/lib/_virtual/image-config.mjs +0 -2
  170. package/dist/lib/_virtual/image-config.mjs.map +0 -1
  171. package/dist/lib/_virtual/image-external.mjs +0 -2
  172. package/dist/lib/_virtual/image-external.mjs.map +0 -1
  173. package/dist/lib/_virtual/image-loader.mjs +0 -2
  174. package/dist/lib/_virtual/image-loader.mjs.map +0 -1
  175. package/dist/lib/_virtual/image.mjs +0 -2
  176. package/dist/lib/_virtual/image.mjs.map +0 -1
  177. package/dist/lib/_virtual/index4.mjs +0 -2
  178. package/dist/lib/_virtual/index4.mjs.map +0 -1
  179. package/dist/lib/_virtual/index5.mjs +0 -2
  180. package/dist/lib/_virtual/index5.mjs.map +0 -1
  181. package/dist/lib/_virtual/index6.mjs +0 -2
  182. package/dist/lib/_virtual/index6.mjs.map +0 -1
  183. package/dist/lib/_virtual/index7.mjs +0 -2
  184. package/dist/lib/_virtual/index7.mjs.map +0 -1
  185. package/dist/lib/_virtual/index8.mjs +0 -2
  186. package/dist/lib/_virtual/index8.mjs.map +0 -1
  187. package/dist/lib/_virtual/index9.mjs +0 -2
  188. package/dist/lib/_virtual/index9.mjs.map +0 -1
  189. package/dist/lib/_virtual/interception-routes.mjs +0 -2
  190. package/dist/lib/_virtual/interception-routes.mjs.map +0 -1
  191. package/dist/lib/_virtual/interpolate-as.mjs +0 -2
  192. package/dist/lib/_virtual/interpolate-as.mjs.map +0 -1
  193. package/dist/lib/_virtual/is-dynamic.mjs +0 -2
  194. package/dist/lib/_virtual/is-dynamic.mjs.map +0 -1
  195. package/dist/lib/_virtual/is-local-url.mjs +0 -2
  196. package/dist/lib/_virtual/is-local-url.mjs.map +0 -1
  197. package/dist/lib/_virtual/link.mjs +0 -2
  198. package/dist/lib/_virtual/link.mjs.map +0 -1
  199. package/dist/lib/_virtual/link2.mjs +0 -2
  200. package/dist/lib/_virtual/link2.mjs.map +0 -1
  201. package/dist/lib/_virtual/match-remote-pattern.mjs +0 -2
  202. package/dist/lib/_virtual/match-remote-pattern.mjs.map +0 -1
  203. package/dist/lib/_virtual/navigation.mjs +0 -2
  204. package/dist/lib/_virtual/navigation.mjs.map +0 -1
  205. package/dist/lib/_virtual/navigation2.mjs +0 -2
  206. package/dist/lib/_virtual/navigation2.mjs.map +0 -1
  207. package/dist/lib/_virtual/normalize-locale-path.mjs +0 -2
  208. package/dist/lib/_virtual/normalize-locale-path.mjs.map +0 -1
  209. package/dist/lib/_virtual/normalize-locale-path2.mjs +0 -2
  210. package/dist/lib/_virtual/normalize-locale-path2.mjs.map +0 -1
  211. package/dist/lib/_virtual/normalize-trailing-slash.mjs +0 -2
  212. package/dist/lib/_virtual/normalize-trailing-slash.mjs.map +0 -1
  213. package/dist/lib/_virtual/not-found.mjs +0 -2
  214. package/dist/lib/_virtual/not-found.mjs.map +0 -1
  215. package/dist/lib/_virtual/omit.mjs +0 -2
  216. package/dist/lib/_virtual/omit.mjs.map +0 -1
  217. package/dist/lib/_virtual/parse-path.mjs +0 -2
  218. package/dist/lib/_virtual/parse-path.mjs.map +0 -1
  219. package/dist/lib/_virtual/path-has-prefix.mjs +0 -2
  220. package/dist/lib/_virtual/path-has-prefix.mjs.map +0 -1
  221. package/dist/lib/_virtual/querystring.mjs +0 -2
  222. package/dist/lib/_virtual/querystring.mjs.map +0 -1
  223. package/dist/lib/_virtual/redirect-status-code.mjs +0 -2
  224. package/dist/lib/_virtual/redirect-status-code.mjs.map +0 -1
  225. package/dist/lib/_virtual/redirect.mjs +0 -2
  226. package/dist/lib/_virtual/redirect.mjs.map +0 -1
  227. package/dist/lib/_virtual/remove-trailing-slash.mjs +0 -2
  228. package/dist/lib/_virtual/remove-trailing-slash.mjs.map +0 -1
  229. package/dist/lib/_virtual/request-async-storage.external.mjs +0 -2
  230. package/dist/lib/_virtual/request-async-storage.external.mjs.map +0 -1
  231. package/dist/lib/_virtual/request-idle-callback.mjs +0 -2
  232. package/dist/lib/_virtual/request-idle-callback.mjs.map +0 -1
  233. package/dist/lib/_virtual/resolve-href.mjs +0 -2
  234. package/dist/lib/_virtual/resolve-href.mjs.map +0 -1
  235. package/dist/lib/_virtual/route-matcher.mjs +0 -2
  236. package/dist/lib/_virtual/route-matcher.mjs.map +0 -1
  237. package/dist/lib/_virtual/route-regex.mjs +0 -2
  238. package/dist/lib/_virtual/route-regex.mjs.map +0 -1
  239. package/dist/lib/_virtual/router-context.shared-runtime.mjs +0 -2
  240. package/dist/lib/_virtual/router-context.shared-runtime.mjs.map +0 -1
  241. package/dist/lib/_virtual/router-reducer-types.mjs +0 -2
  242. package/dist/lib/_virtual/router-reducer-types.mjs.map +0 -1
  243. package/dist/lib/_virtual/segment.mjs +0 -2
  244. package/dist/lib/_virtual/segment.mjs.map +0 -1
  245. package/dist/lib/_virtual/server-inserted-html.shared-runtime.mjs +0 -2
  246. package/dist/lib/_virtual/server-inserted-html.shared-runtime.mjs.map +0 -1
  247. package/dist/lib/_virtual/side-effect.mjs +0 -2
  248. package/dist/lib/_virtual/side-effect.mjs.map +0 -1
  249. package/dist/lib/_virtual/sorted-routes.mjs +0 -2
  250. package/dist/lib/_virtual/sorted-routes.mjs.map +0 -1
  251. package/dist/lib/_virtual/static-generation-async-storage.external.mjs +0 -2
  252. package/dist/lib/_virtual/static-generation-async-storage.external.mjs.map +0 -1
  253. package/dist/lib/_virtual/toastui-editor-plugin-color-syntax.mjs +0 -2
  254. package/dist/lib/_virtual/toastui-editor-plugin-color-syntax.mjs.map +0 -1
  255. package/dist/lib/_virtual/toastui-editor-plugin-color-syntax2.mjs +0 -2
  256. package/dist/lib/_virtual/toastui-editor-plugin-color-syntax2.mjs.map +0 -1
  257. package/dist/lib/_virtual/toastui-editor-viewer.mjs +0 -2
  258. package/dist/lib/_virtual/toastui-editor-viewer.mjs.map +0 -1
  259. package/dist/lib/_virtual/toastui-editor-viewer2.mjs +0 -2
  260. package/dist/lib/_virtual/toastui-editor-viewer2.mjs.map +0 -1
  261. package/dist/lib/_virtual/tui-color-picker.mjs +0 -2
  262. package/dist/lib/_virtual/tui-color-picker.mjs.map +0 -1
  263. package/dist/lib/_virtual/use-intersection.mjs +0 -2
  264. package/dist/lib/_virtual/use-intersection.mjs.map +0 -1
  265. package/dist/lib/_virtual/utils.mjs +0 -2
  266. package/dist/lib/_virtual/utils.mjs.map +0 -1
  267. package/dist/lib/_virtual/warn-once.mjs +0 -2
  268. package/dist/lib/_virtual/warn-once.mjs.map +0 -1
  269. package/dist/lib/dist/lib/components/Timeline/TimelineConnector.mjs +0 -2
  270. package/dist/lib/dist/lib/components/Timeline/TimelineConnector.mjs.map +0 -1
  271. package/dist/lib/dist/lib/components/Timeline/TimelineContent.mjs +0 -2
  272. package/dist/lib/dist/lib/components/Timeline/TimelineContent.mjs.map +0 -1
  273. package/dist/lib/dist/lib/components/Timeline/TimelineDescription.mjs +0 -2
  274. package/dist/lib/dist/lib/components/Timeline/TimelineDescription.mjs.map +0 -1
  275. package/dist/lib/dist/lib/components/Timeline/TimelineHeader.mjs +0 -2
  276. package/dist/lib/dist/lib/components/Timeline/TimelineHeader.mjs.map +0 -1
  277. package/dist/lib/dist/lib/components/Timeline/TimelineIcon.mjs +0 -2
  278. package/dist/lib/dist/lib/components/Timeline/TimelineIcon.mjs.map +0 -1
  279. package/dist/lib/dist/lib/components/Timeline/TimelineItem.mjs +0 -2
  280. package/dist/lib/dist/lib/components/Timeline/TimelineItem.mjs.map +0 -1
  281. package/dist/lib/dist/lib/components/Timeline/TimelineRoot.mjs +0 -3
  282. package/dist/lib/dist/lib/components/Timeline/TimelineRoot.mjs.map +0 -1
  283. package/dist/lib/dist/lib/components/Timeline/TimelineTime.mjs +0 -2
  284. package/dist/lib/dist/lib/components/Timeline/TimelineTime.mjs.map +0 -1
  285. package/dist/lib/dist/lib/components/Timeline/TimelineTitle.mjs +0 -2
  286. package/dist/lib/dist/lib/components/Timeline/TimelineTitle.mjs.map +0 -1
  287. package/dist/lib/dist/lib/components/Timeline/index.mjs +0 -2
  288. package/dist/lib/dist/lib/components/Timeline/index.mjs.map +0 -1
  289. package/dist/lib/node_modules/@swc/helpers/cjs/_interop_require_default.mjs +0 -2
  290. package/dist/lib/node_modules/@swc/helpers/cjs/_interop_require_default.mjs.map +0 -1
  291. package/dist/lib/node_modules/@swc/helpers/cjs/_interop_require_wildcard.mjs +0 -2
  292. package/dist/lib/node_modules/@swc/helpers/cjs/_interop_require_wildcard.mjs.map +0 -1
  293. package/dist/lib/node_modules/@toast-ui/editor/dist/esm/index.mjs +0 -37
  294. package/dist/lib/node_modules/@toast-ui/editor/dist/esm/index.mjs.map +0 -1
  295. package/dist/lib/node_modules/@toast-ui/editor/dist/toastui-editor-viewer.mjs +0 -24
  296. package/dist/lib/node_modules/@toast-ui/editor/dist/toastui-editor-viewer.mjs.map +0 -1
  297. package/dist/lib/node_modules/@toast-ui/editor-plugin-color-syntax/dist/toastui-editor-plugin-color-syntax.mjs +0 -8
  298. package/dist/lib/node_modules/@toast-ui/editor-plugin-color-syntax/dist/toastui-editor-plugin-color-syntax.mjs.map +0 -1
  299. package/dist/lib/node_modules/@toast-ui/react-editor/dist/esm/index.mjs +0 -22
  300. package/dist/lib/node_modules/@toast-ui/react-editor/dist/esm/index.mjs.map +0 -1
  301. package/dist/lib/node_modules/next/dist/client/add-base-path.mjs +0 -2
  302. package/dist/lib/node_modules/next/dist/client/add-base-path.mjs.map +0 -1
  303. package/dist/lib/node_modules/next/dist/client/add-locale.mjs +0 -2
  304. package/dist/lib/node_modules/next/dist/client/add-locale.mjs.map +0 -1
  305. package/dist/lib/node_modules/next/dist/client/components/action-async-storage.external.mjs +0 -2
  306. package/dist/lib/node_modules/next/dist/client/components/action-async-storage.external.mjs.map +0 -1
  307. package/dist/lib/node_modules/next/dist/client/components/async-local-storage.mjs +0 -2
  308. package/dist/lib/node_modules/next/dist/client/components/async-local-storage.mjs.map +0 -1
  309. package/dist/lib/node_modules/next/dist/client/components/bailout-to-client-rendering.mjs +0 -2
  310. package/dist/lib/node_modules/next/dist/client/components/bailout-to-client-rendering.mjs.map +0 -1
  311. package/dist/lib/node_modules/next/dist/client/components/client-hook-in-server-component-error.mjs +0 -2
  312. package/dist/lib/node_modules/next/dist/client/components/client-hook-in-server-component-error.mjs.map +0 -1
  313. package/dist/lib/node_modules/next/dist/client/components/navigation.mjs +0 -2
  314. package/dist/lib/node_modules/next/dist/client/components/navigation.mjs.map +0 -1
  315. package/dist/lib/node_modules/next/dist/client/components/not-found.mjs +0 -2
  316. package/dist/lib/node_modules/next/dist/client/components/not-found.mjs.map +0 -1
  317. package/dist/lib/node_modules/next/dist/client/components/redirect-status-code.mjs +0 -2
  318. package/dist/lib/node_modules/next/dist/client/components/redirect-status-code.mjs.map +0 -1
  319. package/dist/lib/node_modules/next/dist/client/components/redirect.mjs +0 -2
  320. package/dist/lib/node_modules/next/dist/client/components/redirect.mjs.map +0 -1
  321. package/dist/lib/node_modules/next/dist/client/components/request-async-storage.external.mjs +0 -2
  322. package/dist/lib/node_modules/next/dist/client/components/request-async-storage.external.mjs.map +0 -1
  323. package/dist/lib/node_modules/next/dist/client/components/router-reducer/reducers/get-segment-value.mjs +0 -2
  324. package/dist/lib/node_modules/next/dist/client/components/router-reducer/reducers/get-segment-value.mjs.map +0 -1
  325. package/dist/lib/node_modules/next/dist/client/components/router-reducer/router-reducer-types.mjs +0 -2
  326. package/dist/lib/node_modules/next/dist/client/components/router-reducer/router-reducer-types.mjs.map +0 -1
  327. package/dist/lib/node_modules/next/dist/client/components/static-generation-async-storage.external.mjs +0 -2
  328. package/dist/lib/node_modules/next/dist/client/components/static-generation-async-storage.external.mjs.map +0 -1
  329. package/dist/lib/node_modules/next/dist/client/detect-domain-locale.mjs +0 -2
  330. package/dist/lib/node_modules/next/dist/client/detect-domain-locale.mjs.map +0 -1
  331. package/dist/lib/node_modules/next/dist/client/get-domain-locale.mjs +0 -2
  332. package/dist/lib/node_modules/next/dist/client/get-domain-locale.mjs.map +0 -1
  333. package/dist/lib/node_modules/next/dist/client/has-base-path.mjs +0 -2
  334. package/dist/lib/node_modules/next/dist/client/has-base-path.mjs.map +0 -1
  335. package/dist/lib/node_modules/next/dist/client/image-component.mjs +0 -2
  336. package/dist/lib/node_modules/next/dist/client/image-component.mjs.map +0 -1
  337. package/dist/lib/node_modules/next/dist/client/link.mjs +0 -2
  338. package/dist/lib/node_modules/next/dist/client/link.mjs.map +0 -1
  339. package/dist/lib/node_modules/next/dist/client/normalize-locale-path.mjs +0 -2
  340. package/dist/lib/node_modules/next/dist/client/normalize-locale-path.mjs.map +0 -1
  341. package/dist/lib/node_modules/next/dist/client/normalize-trailing-slash.mjs +0 -2
  342. package/dist/lib/node_modules/next/dist/client/normalize-trailing-slash.mjs.map +0 -1
  343. package/dist/lib/node_modules/next/dist/client/request-idle-callback.mjs +0 -2
  344. package/dist/lib/node_modules/next/dist/client/request-idle-callback.mjs.map +0 -1
  345. package/dist/lib/node_modules/next/dist/client/resolve-href.mjs +0 -2
  346. package/dist/lib/node_modules/next/dist/client/resolve-href.mjs.map +0 -1
  347. package/dist/lib/node_modules/next/dist/client/use-intersection.mjs +0 -2
  348. package/dist/lib/node_modules/next/dist/client/use-intersection.mjs.map +0 -1
  349. package/dist/lib/node_modules/next/dist/compiled/micromatch/index.mjs +0 -23
  350. package/dist/lib/node_modules/next/dist/compiled/micromatch/index.mjs.map +0 -1
  351. package/dist/lib/node_modules/next/dist/server/future/helpers/interception-routes.mjs +0 -2
  352. package/dist/lib/node_modules/next/dist/server/future/helpers/interception-routes.mjs.map +0 -1
  353. package/dist/lib/node_modules/next/dist/shared/lib/amp-context.shared-runtime.mjs +0 -2
  354. package/dist/lib/node_modules/next/dist/shared/lib/amp-context.shared-runtime.mjs.map +0 -1
  355. package/dist/lib/node_modules/next/dist/shared/lib/amp-mode.mjs +0 -2
  356. package/dist/lib/node_modules/next/dist/shared/lib/amp-mode.mjs.map +0 -1
  357. package/dist/lib/node_modules/next/dist/shared/lib/app-router-context.shared-runtime.mjs +0 -2
  358. package/dist/lib/node_modules/next/dist/shared/lib/app-router-context.shared-runtime.mjs.map +0 -1
  359. package/dist/lib/node_modules/next/dist/shared/lib/escape-regexp.mjs +0 -2
  360. package/dist/lib/node_modules/next/dist/shared/lib/escape-regexp.mjs.map +0 -1
  361. package/dist/lib/node_modules/next/dist/shared/lib/get-img-props.mjs +0 -2
  362. package/dist/lib/node_modules/next/dist/shared/lib/get-img-props.mjs.map +0 -1
  363. package/dist/lib/node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.mjs +0 -2
  364. package/dist/lib/node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.mjs.map +0 -1
  365. package/dist/lib/node_modules/next/dist/shared/lib/head.mjs +0 -2
  366. package/dist/lib/node_modules/next/dist/shared/lib/head.mjs.map +0 -1
  367. package/dist/lib/node_modules/next/dist/shared/lib/hooks-client-context.shared-runtime.mjs +0 -2
  368. package/dist/lib/node_modules/next/dist/shared/lib/hooks-client-context.shared-runtime.mjs.map +0 -1
  369. package/dist/lib/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.mjs +0 -2
  370. package/dist/lib/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.mjs.map +0 -1
  371. package/dist/lib/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.mjs +0 -2
  372. package/dist/lib/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.mjs.map +0 -1
  373. package/dist/lib/node_modules/next/dist/shared/lib/image-blur-svg.mjs +0 -2
  374. package/dist/lib/node_modules/next/dist/shared/lib/image-blur-svg.mjs.map +0 -1
  375. package/dist/lib/node_modules/next/dist/shared/lib/image-config-context.shared-runtime.mjs +0 -2
  376. package/dist/lib/node_modules/next/dist/shared/lib/image-config-context.shared-runtime.mjs.map +0 -1
  377. package/dist/lib/node_modules/next/dist/shared/lib/image-config.mjs +0 -2
  378. package/dist/lib/node_modules/next/dist/shared/lib/image-config.mjs.map +0 -1
  379. package/dist/lib/node_modules/next/dist/shared/lib/image-external.mjs +0 -2
  380. package/dist/lib/node_modules/next/dist/shared/lib/image-external.mjs.map +0 -1
  381. package/dist/lib/node_modules/next/dist/shared/lib/image-loader.mjs +0 -2
  382. package/dist/lib/node_modules/next/dist/shared/lib/image-loader.mjs.map +0 -1
  383. package/dist/lib/node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.mjs +0 -2
  384. package/dist/lib/node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.mjs.map +0 -1
  385. package/dist/lib/node_modules/next/dist/shared/lib/match-remote-pattern.mjs +0 -2
  386. package/dist/lib/node_modules/next/dist/shared/lib/match-remote-pattern.mjs.map +0 -1
  387. package/dist/lib/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.mjs +0 -2
  388. package/dist/lib/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.mjs.map +0 -1
  389. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/add-locale.mjs +0 -2
  390. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/add-locale.mjs.map +0 -1
  391. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.mjs +0 -2
  392. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.mjs.map +0 -1
  393. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/app-paths.mjs +0 -2
  394. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/app-paths.mjs.map +0 -1
  395. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/format-url.mjs +0 -2
  396. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/format-url.mjs.map +0 -1
  397. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/index.mjs +0 -2
  398. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/index.mjs.map +0 -1
  399. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/interpolate-as.mjs +0 -2
  400. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/interpolate-as.mjs.map +0 -1
  401. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/is-dynamic.mjs +0 -2
  402. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/is-dynamic.mjs.map +0 -1
  403. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/is-local-url.mjs +0 -2
  404. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/is-local-url.mjs.map +0 -1
  405. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/omit.mjs +0 -2
  406. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/omit.mjs.map +0 -1
  407. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/parse-path.mjs +0 -2
  408. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/parse-path.mjs.map +0 -1
  409. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.mjs +0 -2
  410. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.mjs.map +0 -1
  411. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/querystring.mjs +0 -2
  412. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/querystring.mjs.map +0 -1
  413. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.mjs +0 -2
  414. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.mjs.map +0 -1
  415. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/route-matcher.mjs +0 -2
  416. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/route-matcher.mjs.map +0 -1
  417. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/route-regex.mjs +0 -2
  418. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/route-regex.mjs.map +0 -1
  419. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/sorted-routes.mjs +0 -2
  420. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/sorted-routes.mjs.map +0 -1
  421. package/dist/lib/node_modules/next/dist/shared/lib/router-context.shared-runtime.mjs +0 -2
  422. package/dist/lib/node_modules/next/dist/shared/lib/router-context.shared-runtime.mjs.map +0 -1
  423. package/dist/lib/node_modules/next/dist/shared/lib/segment.mjs +0 -2
  424. package/dist/lib/node_modules/next/dist/shared/lib/segment.mjs.map +0 -1
  425. package/dist/lib/node_modules/next/dist/shared/lib/server-inserted-html.shared-runtime.mjs +0 -2
  426. package/dist/lib/node_modules/next/dist/shared/lib/server-inserted-html.shared-runtime.mjs.map +0 -1
  427. package/dist/lib/node_modules/next/dist/shared/lib/side-effect.mjs +0 -2
  428. package/dist/lib/node_modules/next/dist/shared/lib/side-effect.mjs.map +0 -1
  429. package/dist/lib/node_modules/next/dist/shared/lib/utils/warn-once.mjs +0 -2
  430. package/dist/lib/node_modules/next/dist/shared/lib/utils/warn-once.mjs.map +0 -1
  431. package/dist/lib/node_modules/next/dist/shared/lib/utils.mjs +0 -2
  432. package/dist/lib/node_modules/next/dist/shared/lib/utils.mjs.map +0 -1
  433. package/dist/lib/node_modules/next/image.mjs +0 -2
  434. package/dist/lib/node_modules/next/image.mjs.map +0 -1
  435. package/dist/lib/node_modules/next/link.mjs +0 -2
  436. package/dist/lib/node_modules/next/link.mjs.map +0 -1
  437. package/dist/lib/node_modules/next/navigation.mjs +0 -2
  438. package/dist/lib/node_modules/next/navigation.mjs.map +0 -1
  439. package/dist/lib/node_modules/orderedmap/dist/index.mjs +0 -2
  440. package/dist/lib/node_modules/orderedmap/dist/index.mjs.map +0 -1
  441. package/dist/lib/node_modules/orderedmap/dist/index2.mjs +0 -2
  442. package/dist/lib/node_modules/orderedmap/dist/index2.mjs.map +0 -1
  443. package/dist/lib/node_modules/prosemirror-commands/dist/index.mjs +0 -2
  444. package/dist/lib/node_modules/prosemirror-commands/dist/index.mjs.map +0 -1
  445. package/dist/lib/node_modules/prosemirror-history/dist/index.mjs +0 -2
  446. package/dist/lib/node_modules/prosemirror-history/dist/index.mjs.map +0 -1
  447. package/dist/lib/node_modules/prosemirror-inputrules/dist/index.mjs +0 -2
  448. package/dist/lib/node_modules/prosemirror-inputrules/dist/index.mjs.map +0 -1
  449. package/dist/lib/node_modules/prosemirror-inputrules/dist/index2.mjs +0 -2
  450. package/dist/lib/node_modules/prosemirror-inputrules/dist/index2.mjs.map +0 -1
  451. package/dist/lib/node_modules/prosemirror-keymap/dist/index.mjs +0 -2
  452. package/dist/lib/node_modules/prosemirror-keymap/dist/index.mjs.map +0 -1
  453. package/dist/lib/node_modules/prosemirror-keymap/dist/index2.mjs +0 -2
  454. package/dist/lib/node_modules/prosemirror-keymap/dist/index2.mjs.map +0 -1
  455. package/dist/lib/node_modules/prosemirror-model/dist/index.mjs +0 -2
  456. package/dist/lib/node_modules/prosemirror-model/dist/index.mjs.map +0 -1
  457. package/dist/lib/node_modules/prosemirror-model/dist/index2.mjs +0 -2
  458. package/dist/lib/node_modules/prosemirror-model/dist/index2.mjs.map +0 -1
  459. package/dist/lib/node_modules/prosemirror-state/dist/index.mjs +0 -2
  460. package/dist/lib/node_modules/prosemirror-state/dist/index.mjs.map +0 -1
  461. package/dist/lib/node_modules/prosemirror-state/dist/index2.mjs +0 -2
  462. package/dist/lib/node_modules/prosemirror-state/dist/index2.mjs.map +0 -1
  463. package/dist/lib/node_modules/prosemirror-transform/dist/index.mjs +0 -2
  464. package/dist/lib/node_modules/prosemirror-transform/dist/index.mjs.map +0 -1
  465. package/dist/lib/node_modules/prosemirror-transform/dist/index2.mjs +0 -2
  466. package/dist/lib/node_modules/prosemirror-transform/dist/index2.mjs.map +0 -1
  467. package/dist/lib/node_modules/prosemirror-view/dist/index.mjs +0 -2
  468. package/dist/lib/node_modules/prosemirror-view/dist/index.mjs.map +0 -1
  469. package/dist/lib/node_modules/prosemirror-view/dist/index2.mjs +0 -2
  470. package/dist/lib/node_modules/prosemirror-view/dist/index2.mjs.map +0 -1
  471. package/dist/lib/node_modules/rope-sequence/dist/index.mjs +0 -2
  472. package/dist/lib/node_modules/rope-sequence/dist/index.mjs.map +0 -1
  473. package/dist/lib/node_modules/tui-color-picker/dist/tui-color-picker.mjs +0 -10
  474. package/dist/lib/node_modules/tui-color-picker/dist/tui-color-picker.mjs.map +0 -1
  475. package/dist/lib/node_modules/w3c-keyname/index.mjs +0 -2
  476. package/dist/lib/node_modules/w3c-keyname/index.mjs.map +0 -1
  477. package/dist/lib/node_modules/w3c-keyname/index2.mjs +0 -2
  478. package/dist/lib/node_modules/w3c-keyname/index2.mjs.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../../../node_modules/@toast-ui/editor/dist/esm/index.js"],"sourcesContent":["/**\n * @toast-ui/editor\n * @version 3.2.2 | Fri Feb 17 2023\n * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>\n * @license MIT\n */\n\nimport { Fragment, Schema, Slice, NodeRange, Mark as Mark$1, DOMParser, Node as Node$3 } from 'prosemirror-model';\nimport { DecorationSet, Decoration, EditorView } from 'prosemirror-view';\nimport { ReplaceAroundStep, liftTarget, canSplit, StepMap } from 'prosemirror-transform';\nimport { TextSelection, Plugin, PluginKey, EditorState, AllSelection, Selection, SelectionRange, NodeSelection } from 'prosemirror-state';\nimport { keymap } from 'prosemirror-keymap';\nimport { deleteSelection, selectAll, baseKeymap, chainCommands, joinForward, newlineInCode, setBlockType, wrapIn, toggleMark as toggleMark$1, exitCode } from 'prosemirror-commands';\nimport { InputRule, inputRules, undoInputRule } from 'prosemirror-inputrules';\nimport { undo, redo, history, undoDepth } from 'prosemirror-history';\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics$1 = function(d, b) {\r\n extendStatics$1 = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics$1(d, b);\r\n};\r\n\r\nfunction __extends$1(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics$1(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nvar __assign$1 = function() {\r\n __assign$1 = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign$1.apply(this, arguments);\r\n};\r\n\r\nfunction __spreadArray$1(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nfunction __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n}\n\n/**\n * @fileoverview Execute the provided callback once for each property of object which actually exist.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n/**\n * Execute the provided callback once for each property of object which actually exist.\n * If the callback function returns false, the loop will be stopped.\n * Callback function(iteratee) is invoked with three arguments:\n * 1) The value of the property\n * 2) The name of the property\n * 3) The object being traversed\n * @param {Object} obj The object that will be traversed\n * @param {function} iteratee Callback function\n * @param {Object} [context] Context(this) of callback function\n * @memberof module:collection\n * @example\n * // ES6\n * import forEachOwnProperties from 'tui-code-snippet/collection/forEachOwnProperties';\n * \n * // CommonJS\n * const forEachOwnProperties = require('tui-code-snippet/collection/forEachOwnProperties'); \n *\n * let sum = 0;\n *\n * forEachOwnProperties({a:1,b:2,c:3}, function(value){\n * sum += value;\n * });\n * alert(sum); // 6\n */\nfunction forEachOwnProperties$2(obj, iteratee, context) {\n var key;\n\n context = context || null;\n\n for (key in obj) {\n if (obj.hasOwnProperty(key)) {\n if (iteratee.call(context, obj[key], key, obj) === false) {\n break;\n }\n }\n }\n}\n\nvar forEachOwnProperties_1 = forEachOwnProperties$2;\n\n/**\n * @fileoverview Extend the target object from other objects.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n/**\n * @module object\n */\n\n/**\n * Extend the target object from other objects.\n * @param {object} target - Object that will be extended\n * @param {...object} objects - Objects as sources\n * @returns {object} Extended object\n * @memberof module:object\n */\nfunction extend(target, objects) { // eslint-disable-line no-unused-vars\n var hasOwnProp = Object.prototype.hasOwnProperty;\n var source, prop, i, len;\n\n for (i = 1, len = arguments.length; i < len; i += 1) {\n source = arguments[i];\n for (prop in source) {\n if (hasOwnProp.call(source, prop)) {\n target[prop] = source[prop];\n }\n }\n }\n\n return target;\n}\n\nvar extend_1 = extend;\n\n/**\n * @fileoverview Check whether the given variable is a string or not.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n/**\n * Check whether the given variable is a string or not.\n * If the given variable is a string, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is string?\n * @memberof module:type\n */\nfunction isString$3(obj) {\n return typeof obj === 'string' || obj instanceof String;\n}\n\nvar isString_1 = isString$3;\n\n/**\n * @fileoverview Check whether the given variable is an instance of Array or not.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n/**\n * Check whether the given variable is an instance of Array or not.\n * If the given variable is an instance of Array, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is array instance?\n * @memberof module:type\n */\nfunction isArray$3(obj) {\n return obj instanceof Array;\n}\n\nvar isArray_1 = isArray$3;\n\n/**\n * @fileoverview Execute the provided callback once for each element present in the array(or Array-like object) in ascending order.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n/**\n * Execute the provided callback once for each element present\n * in the array(or Array-like object) in ascending order.\n * If the callback function returns false, the loop will be stopped.\n * Callback function(iteratee) is invoked with three arguments:\n * 1) The value of the element\n * 2) The index of the element\n * 3) The array(or Array-like object) being traversed\n * @param {Array|Arguments|NodeList} arr The array(or Array-like object) that will be traversed\n * @param {function} iteratee Callback function\n * @param {Object} [context] Context(this) of callback function\n * @memberof module:collection\n * @example\n * // ES6\n * import forEachArray from 'tui-code-snippet/collection/forEachArray';\n * \n * // CommonJS\n * const forEachArray = require('tui-code-snippet/collection/forEachArray'); \n *\n * let sum = 0;\n *\n * forEachArray([1,2,3], function(value){\n * sum += value;\n * });\n * alert(sum); // 6\n */\nfunction forEachArray$3(arr, iteratee, context) {\n var index = 0;\n var len = arr.length;\n\n context = context || null;\n\n for (; index < len; index += 1) {\n if (iteratee.call(context, arr[index], index, arr) === false) {\n break;\n }\n }\n}\n\nvar forEachArray_1 = forEachArray$3;\n\n/**\n * @fileoverview Execute the provided callback once for each property of object(or element of array) which actually exist.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\nvar isArray$2 = isArray_1;\nvar forEachArray$2 = forEachArray_1;\nvar forEachOwnProperties$1 = forEachOwnProperties_1;\n\n/**\n * @module collection\n */\n\n/**\n * Execute the provided callback once for each property of object(or element of array) which actually exist.\n * If the object is Array-like object(ex-arguments object), It needs to transform to Array.(see 'ex2' of example).\n * If the callback function returns false, the loop will be stopped.\n * Callback function(iteratee) is invoked with three arguments:\n * 1) The value of the property(or The value of the element)\n * 2) The name of the property(or The index of the element)\n * 3) The object being traversed\n * @param {Object} obj The object that will be traversed\n * @param {function} iteratee Callback function\n * @param {Object} [context] Context(this) of callback function\n * @memberof module:collection\n * @example\n * // ES6\n * import forEach from 'tui-code-snippet/collection/forEach'; \n * \n * // CommonJS\n * const forEach = require('tui-code-snippet/collection/forEach'); \n *\n * let sum = 0;\n *\n * forEach([1,2,3], function(value){\n * sum += value;\n * });\n * alert(sum); // 6\n *\n * // In case of Array-like object\n * const array = Array.prototype.slice.call(arrayLike); // change to array\n * forEach(array, function(value){\n * sum += value;\n * });\n */\nfunction forEach$4(obj, iteratee, context) {\n if (isArray$2(obj)) {\n forEachArray$2(obj, iteratee, context);\n } else {\n forEachOwnProperties$1(obj, iteratee, context);\n }\n}\n\nvar forEach_1 = forEach$4;\n\n/**\n * @fileoverview Setting element style\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\nvar isString$2 = isString_1;\nvar forEach$3 = forEach_1;\n\n/**\n * Setting element style\n * @param {(HTMLElement|SVGElement)} element - element to setting style\n * @param {(string|object)} key - style prop name or {prop: value} pair object\n * @param {string} [value] - style value\n * @memberof module:domUtil\n */\nfunction css(element, key, value) {\n var style = element.style;\n\n if (isString$2(key)) {\n style[key] = value;\n\n return;\n }\n\n forEach$3(key, function(v, k) {\n style[k] = v;\n });\n}\n\nvar css_1 = css;\n\n/* eslint-disable complexity */\n\nvar isArray$1 = isArray_1;\n\n/**\n * @module array\n */\n\n/**\n * Returns the first index at which a given element can be found in the array\n * from start index(default 0), or -1 if it is not present.\n * It compares searchElement to elements of the Array using strict equality\n * (the same method used by the ===, or triple-equals, operator).\n * @param {*} searchElement Element to locate in the array\n * @param {Array} array Array that will be traversed.\n * @param {number} startIndex Start index in array for searching (default 0)\n * @returns {number} the First index at which a given element, or -1 if it is not present\n * @memberof module:array\n * @example\n * // ES6\n * import inArray from 'tui-code-snippet/array/inArray';\n * \n * // CommonJS\n * const inArray = require('tui-code-snippet/array/inArray');\n *\n * const arr = ['one', 'two', 'three', 'four'];\n * const idx1 = inArray('one', arr, 3); // -1\n * const idx2 = inArray('one', arr); // 0\n */\nfunction inArray$4(searchElement, array, startIndex) {\n var i;\n var length;\n startIndex = startIndex || 0;\n\n if (!isArray$1(array)) {\n return -1;\n }\n\n if (Array.prototype.indexOf) {\n return Array.prototype.indexOf.call(array, searchElement, startIndex);\n }\n\n length = array.length;\n for (i = startIndex; startIndex >= 0 && i < length; i += 1) {\n if (array[i] === searchElement) {\n return i;\n }\n }\n\n return -1;\n}\n\nvar inArray_1 = inArray$4;\n\n/**\n * @fileoverview Check whether the given variable is undefined or not.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n/**\n * Check whether the given variable is undefined or not.\n * If the given variable is undefined, returns true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is undefined?\n * @memberof module:type\n */\nfunction isUndefined$4(obj) {\n return obj === undefined; // eslint-disable-line no-undefined\n}\n\nvar isUndefined_1 = isUndefined$4;\n\n/**\n * @fileoverview Get HTML element's design classes.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\nvar isUndefined$3 = isUndefined_1;\n\n/**\n * Get HTML element's design classes.\n * @param {(HTMLElement|SVGElement)} element target element\n * @returns {string} element css class name\n * @memberof module:domUtil\n */\nfunction getClass$3(element) {\n if (!element || !element.className) {\n return '';\n }\n\n if (isUndefined$3(element.className.baseVal)) {\n return element.className;\n }\n\n return element.className.baseVal;\n}\n\nvar getClass_1 = getClass$3;\n\n/**\n * @fileoverview Set className value\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\nvar isArray = isArray_1;\nvar isUndefined$2 = isUndefined_1;\n\n/**\n * Set className value\n * @param {(HTMLElement|SVGElement)} element - target element\n * @param {(string|string[])} cssClass - class names\n * @private\n */\nfunction setClassName$2(element, cssClass) {\n cssClass = isArray(cssClass) ? cssClass.join(' ') : cssClass;\n\n cssClass = cssClass.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n if (isUndefined$2(element.className.baseVal)) {\n element.className = cssClass;\n\n return;\n }\n\n element.className.baseVal = cssClass;\n}\n\nvar _setClassName = setClassName$2;\n\n/**\n * @fileoverview Add css class to element\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\nvar forEach$2 = forEach_1;\nvar inArray$3 = inArray_1;\nvar getClass$2 = getClass_1;\nvar setClassName$1 = _setClassName;\n\n/**\n * domUtil module\n * @module domUtil\n */\n\n/**\n * Add css class to element\n * @param {(HTMLElement|SVGElement)} element - target element\n * @param {...string} cssClass - css classes to add\n * @memberof module:domUtil\n */\nfunction addClass(element) {\n var cssClass = Array.prototype.slice.call(arguments, 1);\n var classList = element.classList;\n var newClass = [];\n var origin;\n\n if (classList) {\n forEach$2(cssClass, function(name) {\n element.classList.add(name);\n });\n\n return;\n }\n\n origin = getClass$2(element);\n\n if (origin) {\n cssClass = [].concat(origin.split(/\\s+/), cssClass);\n }\n\n forEach$2(cssClass, function(cls) {\n if (inArray$3(cls, newClass) < 0) {\n newClass.push(cls);\n }\n });\n\n setClassName$1(element, newClass);\n}\n\nvar addClass_1 = addClass;\n\n/**\n * @fileoverview Remove css class from element\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\nvar forEachArray$1 = forEachArray_1;\nvar inArray$2 = inArray_1;\nvar getClass$1 = getClass_1;\nvar setClassName = _setClassName;\n\n/**\n * Remove css class from element\n * @param {(HTMLElement|SVGElement)} element - target element\n * @param {...string} cssClass - css classes to remove\n * @memberof module:domUtil\n */\nfunction removeClass(element) {\n var cssClass = Array.prototype.slice.call(arguments, 1);\n var classList = element.classList;\n var origin, newClass;\n\n if (classList) {\n forEachArray$1(cssClass, function(name) {\n classList.remove(name);\n });\n\n return;\n }\n\n origin = getClass$1(element).split(/\\s+/);\n newClass = [];\n forEachArray$1(origin, function(name) {\n if (inArray$2(name, cssClass) < 0) {\n newClass.push(name);\n }\n });\n\n setClassName(element, newClass);\n}\n\nvar removeClass_1 = removeClass;\n\n/**\n * @fileoverview Check whether the given variable is a number or not.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n/**\n * Check whether the given variable is a number or not.\n * If the given variable is a number, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is number?\n * @memberof module:type\n */\nfunction isNumber(obj) {\n return typeof obj === 'number' || obj instanceof Number;\n}\n\nvar isNumber_1 = isNumber;\n\n/**\n * @fileoverview Check whether the given variable is null or not.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n/**\n * Check whether the given variable is null or not.\n * If the given variable(arguments[0]) is null, returns true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is null?\n * @memberof module:type\n */\nfunction isNull$1(obj) {\n return obj === null;\n}\n\nvar isNull_1 = isNull$1;\n\n/**\n * @fileoverview Request image ping.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\nvar forEachOwnProperties = forEachOwnProperties_1;\n\n/**\n * @module request\n */\n\n/**\n * Request image ping.\n * @param {String} url url for ping request\n * @param {Object} trackingInfo infos for make query string\n * @returns {HTMLElement}\n * @memberof module:request\n * @example\n * // ES6\n * import imagePing from 'tui-code-snippet/request/imagePing';\n * \n * // CommonJS\n * const imagePing = require('tui-code-snippet/request/imagePing');\n *\n * imagePing('https://www.google-analytics.com/collect', {\n * v: 1,\n * t: 'event',\n * tid: 'trackingid',\n * cid: 'cid',\n * dp: 'dp',\n * dh: 'dh'\n * });\n */\nfunction imagePing$1(url, trackingInfo) {\n var trackingElement = document.createElement('img');\n var queryString = '';\n forEachOwnProperties(trackingInfo, function(value, key) {\n queryString += '&' + key + '=' + value;\n });\n queryString = queryString.substring(1);\n\n trackingElement.src = url + '?' + queryString;\n\n trackingElement.style.display = 'none';\n document.body.appendChild(trackingElement);\n document.body.removeChild(trackingElement);\n\n return trackingElement;\n}\n\nvar imagePing_1 = imagePing$1;\n\n/**\n * @fileoverview Send hostname on DOMContentLoaded.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\nvar isUndefined$1 = isUndefined_1;\nvar imagePing = imagePing_1;\n\nvar ms7days = 7 * 24 * 60 * 60 * 1000;\n\n/**\n * Check if the date has passed 7 days\n * @param {number} date - milliseconds\n * @returns {boolean}\n * @private\n */\nfunction isExpired(date) {\n var now = new Date().getTime();\n\n return now - date > ms7days;\n}\n\n/**\n * Send hostname on DOMContentLoaded.\n * To prevent hostname set tui.usageStatistics to false.\n * @param {string} appName - application name\n * @param {string} trackingId - GA tracking ID\n * @ignore\n */\nfunction sendHostname(appName, trackingId) {\n var url = 'https://www.google-analytics.com/collect';\n var hostname = location.hostname;\n var hitType = 'event';\n var eventCategory = 'use';\n var applicationKeyForStorage = 'TOAST UI ' + appName + ' for ' + hostname + ': Statistics';\n var date = window.localStorage.getItem(applicationKeyForStorage);\n\n // skip if the flag is defined and is set to false explicitly\n if (!isUndefined$1(window.tui) && window.tui.usageStatistics === false) {\n return;\n }\n\n // skip if not pass seven days old\n if (date && !isExpired(date)) {\n return;\n }\n\n window.localStorage.setItem(applicationKeyForStorage, new Date().getTime());\n\n setTimeout(function() {\n if (document.readyState === 'interactive' || document.readyState === 'complete') {\n imagePing(url, {\n v: 1,\n t: hitType,\n tid: trackingId,\n cid: hostname,\n dp: hostname,\n dh: appName,\n el: appName,\n ec: eventCategory\n });\n }\n }, 1000);\n}\n\nvar sendHostname_1 = sendHostname;\n\n/Mac/.test(navigator.platform);\nvar reSpaceMoreThanOne = /[\\u0020]+/g;\nvar reEscapeChars$1 = /[>(){}[\\]+-.!#|]/g;\nvar reEscapeHTML = /<([a-zA-Z_][a-zA-Z0-9\\-._]*)(\\s|[^\\\\>])*\\/?>|<(\\/)([a-zA-Z_][a-zA-Z0-9\\-._]*)\\s*\\/?>|<!--[^-]+-->|<([a-zA-Z_][a-zA-Z0-9\\-.:/]*)>/g;\nvar reEscapeBackSlash = /\\\\[!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~\\\\]/g;\nvar reEscapePairedChars = /[*_~`]/g;\nvar reMdImageSyntax = /!\\[.*\\]\\(.*\\)/g;\nvar reEscapedCharInLinkSyntax = /[[\\]]/g;\nvar reEscapeBackSlashInSentence = /(?:^|[^\\\\])\\\\(?!\\\\)/g;\nvar XMLSPECIAL$1 = '[&<>\"]';\nvar reXmlSpecial$1 = new RegExp(XMLSPECIAL$1, 'g');\nfunction replaceUnsafeChar$1(char) {\n switch (char) {\n case '&':\n return '&amp;';\n case '<':\n return '&lt;';\n case '>':\n return '&gt;';\n case '\"':\n return '&quot;';\n default:\n return char;\n }\n}\nfunction escapeXml$1(text) {\n if (reXmlSpecial$1.test(text)) {\n return text.replace(reXmlSpecial$1, replaceUnsafeChar$1);\n }\n return text;\n}\nfunction sendHostName() {\n sendHostname_1('editor', 'UA-129966929-1');\n}\nfunction includes(arr, targetItem) {\n return arr.indexOf(targetItem) !== -1;\n}\nvar availableLinkAttributes = ['rel', 'target', 'hreflang', 'type'];\nvar reMarkdownTextToEscapeMap = {\n codeblock: /(^ {4}[^\\n]+\\n*)+/,\n thematicBreak: /^ *((\\* *){3,}|(- *){3,} *|(_ *){3,}) */,\n atxHeading: /^(#{1,6}) +[\\s\\S]+/,\n seTextheading: /^([^\\n]+)\\n *(=|-){2,} */,\n blockquote: /^( *>[^\\n]+.*)+/,\n list: /^ *(\\*+|-+|\\d+\\.) [\\s\\S]+/,\n def: /^ *\\[([^\\]]+)\\]: *<?([^\\s>]+)>?(?: +[\"(]([^\\n]+)[\")])? */,\n link: /!?\\[.*\\]\\(.*\\)/,\n reflink: /!?\\[.*\\]\\s*\\[([^\\]]*)\\]/,\n verticalBar: /\\u007C/,\n fencedCodeblock: /^((`|~){3,})/,\n};\nfunction sanitizeLinkAttribute(attribute) {\n if (!attribute) {\n return null;\n }\n var linkAttributes = {};\n availableLinkAttributes.forEach(function (key) {\n if (!isUndefined_1(attribute[key])) {\n linkAttributes[key] = attribute[key];\n }\n });\n return linkAttributes;\n}\nfunction repeat$1(text, count) {\n var result = '';\n for (var i = 0; i < count; i += 1) {\n result += text;\n }\n return result;\n}\nfunction isNeedEscapeText(text) {\n var needEscape = false;\n forEachOwnProperties_1(reMarkdownTextToEscapeMap, function (reMarkdownTextToEscape) {\n if (reMarkdownTextToEscape.test(text)) {\n needEscape = true;\n }\n return !needEscape;\n });\n return needEscape;\n}\nfunction escapeTextForLink(text) {\n var imageSyntaxRanges = [];\n var result = reMdImageSyntax.exec(text);\n while (result) {\n imageSyntaxRanges.push([result.index, result.index + result[0].length]);\n result = reMdImageSyntax.exec(text);\n }\n return text.replace(reEscapedCharInLinkSyntax, function (matched, offset) {\n var isDelimiter = imageSyntaxRanges.some(function (range) { return offset > range[0] && offset < range[1]; });\n return isDelimiter ? matched : \"\\\\\" + matched;\n });\n}\nfunction escape$1(text) {\n var aheadReplacer = function (matched) { return \"\\\\\" + matched; };\n var behindReplacer = function (matched) { return matched + \"\\\\\"; };\n var escapedText = text.replace(reSpaceMoreThanOne, ' ');\n if (reEscapeBackSlash.test(escapedText)) {\n escapedText = escapedText.replace(reEscapeBackSlash, aheadReplacer);\n }\n if (reEscapeBackSlashInSentence.test(escapedText)) {\n escapedText = escapedText.replace(reEscapeBackSlashInSentence, behindReplacer);\n }\n escapedText = escapedText.replace(reEscapePairedChars, aheadReplacer);\n if (reEscapeHTML.test(escapedText)) {\n escapedText = escapedText.replace(reEscapeHTML, aheadReplacer);\n }\n if (isNeedEscapeText(escapedText)) {\n escapedText = escapedText.replace(reEscapeChars$1, aheadReplacer);\n }\n return escapedText;\n}\nfunction quote(text) {\n var result;\n if (text.indexOf('\"') === -1) {\n result = '\"\"';\n }\n else {\n result = text.indexOf(\"'\") === -1 ? \"''\" : '()';\n }\n return result[0] + text + result[1];\n}\nfunction isNil(value) {\n return isNull_1(value) || isUndefined_1(value);\n}\nfunction shallowEqual(o1, o2) {\n if (o1 === null && o1 === o2) {\n return true;\n }\n if (typeof o1 !== 'object' || typeof o2 !== 'object' || isNil(o1) || isNil(o2)) {\n return o1 === o2;\n }\n for (var key in o1) {\n if (o1[key] !== o2[key]) {\n return false;\n }\n }\n for (var key in o2) {\n if (!(key in o1)) {\n return false;\n }\n }\n return true;\n}\nfunction last$1(arr) {\n return arr[arr.length - 1];\n}\nfunction between$1(value, min, max) {\n return value >= min && value <= max;\n}\nfunction isObject$1(obj) {\n return typeof obj === 'object' && obj !== null;\n}\nfunction deepMergedCopy(targetObj, obj) {\n var resultObj = __assign$1({}, targetObj);\n if (targetObj && obj) {\n Object.keys(obj).forEach(function (prop) {\n if (isObject$1(resultObj[prop])) {\n if (Array.isArray(obj[prop])) {\n resultObj[prop] = deepCopyArray(obj[prop]);\n }\n else if (resultObj.hasOwnProperty(prop)) {\n resultObj[prop] = deepMergedCopy(resultObj[prop], obj[prop]);\n }\n else {\n resultObj[prop] = deepCopy(obj[prop]);\n }\n }\n else {\n resultObj[prop] = obj[prop];\n }\n });\n }\n return resultObj;\n}\nfunction deepCopyArray(items) {\n return items.map(function (item) {\n if (isObject$1(item)) {\n return Array.isArray(item) ? deepCopyArray(item) : deepCopy(item);\n }\n return item;\n });\n}\nfunction deepCopy(obj) {\n var keys = Object.keys(obj);\n if (!keys.length) {\n return obj;\n }\n return keys.reduce(function (acc, prop) {\n if (isObject$1(obj[prop])) {\n acc[prop] = Array.isArray(obj[prop]) ? deepCopyArray(obj[prop]) : deepCopy(obj[prop]);\n }\n else {\n acc[prop] = obj[prop];\n }\n return acc;\n }, {});\n}\nfunction assign(targetObj, obj) {\n if (obj === void 0) { obj = {}; }\n Object.keys(obj).forEach(function (prop) {\n if (targetObj.hasOwnProperty(prop) && typeof targetObj[prop] === 'object') {\n if (Array.isArray(obj[prop])) {\n targetObj[prop] = obj[prop];\n }\n else {\n assign(targetObj[prop], obj[prop]);\n }\n }\n else {\n targetObj[prop] = obj[prop];\n }\n });\n return targetObj;\n}\nfunction getSortedNumPair(valueA, valueB) {\n return valueA > valueB ? [valueB, valueA] : [valueA, valueB];\n}\n\n/**\n * @fileoverview Transform the Array-like object to Array.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\nvar forEachArray = forEachArray_1;\n\n/**\n * Transform the Array-like object to Array.\n * In low IE (below 8), Array.prototype.slice.call is not perfect. So, try-catch statement is used.\n * @param {*} arrayLike Array-like object\n * @returns {Array} Array\n * @memberof module:collection\n * @example\n * // ES6\n * import toArray from 'tui-code-snippet/collection/toArray'; \n * \n * // CommonJS\n * const toArray = require('tui-code-snippet/collection/toArray'); \n *\n * const arrayLike = {\n * 0: 'one',\n * 1: 'two',\n * 2: 'three',\n * 3: 'four',\n * length: 4\n * };\n * const result = toArray(arrayLike);\n *\n * alert(result instanceof Array); // true\n * alert(result); // one,two,three,four\n */\nfunction toArray$1(arrayLike) {\n var arr;\n try {\n arr = Array.prototype.slice.call(arrayLike);\n } catch (e) {\n arr = [];\n forEachArray(arrayLike, function(value) {\n arr.push(value);\n });\n }\n\n return arr;\n}\n\nvar toArray_1 = toArray$1;\n\nfunction createParagraph(schema, content) {\n var paragraph = schema.nodes.paragraph;\n if (!content) {\n return paragraph.createAndFill();\n }\n return paragraph.create(null, isString_1(content) ? schema.text(content) : content);\n}\nfunction createTextNode$1(schema, text, marks) {\n return schema.text(text, marks);\n}\nfunction createTextSelection(tr, from, to) {\n if (to === void 0) { to = from; }\n var contentSize = tr.doc.content.size;\n var size = contentSize > 0 ? contentSize - 1 : 1;\n return TextSelection.create(tr.doc, Math.min(from, size), Math.min(to, size));\n}\nfunction addParagraph(tr, _a, schema) {\n var pos = _a.pos;\n tr.replaceWith(pos, pos, createParagraph(schema));\n return tr.setSelection(createTextSelection(tr, pos + 1));\n}\nfunction replaceTextNode(_a) {\n var state = _a.state, from = _a.from, startIndex = _a.startIndex, endIndex = _a.endIndex, createText = _a.createText;\n var tr = state.tr, doc = state.doc, schema = state.schema;\n for (var i = startIndex; i <= endIndex; i += 1) {\n var _b = doc.child(i), nodeSize = _b.nodeSize, textContent = _b.textContent, content = _b.content;\n var text = createText(textContent);\n var node = text ? createTextNode$1(schema, text) : Fragment.empty;\n var mappedFrom = tr.mapping.map(from);\n var mappedTo = mappedFrom + content.size;\n tr.replaceWith(mappedFrom, mappedTo, node);\n from += nodeSize;\n }\n return tr;\n}\nfunction splitAndExtendBlock(tr, pos, text, node) {\n var textLen = text.length;\n tr.split(pos)\n .delete(pos - textLen, pos)\n .insert(tr.mapping.map(pos), node)\n .setSelection(createTextSelection(tr, tr.mapping.map(pos) - textLen));\n}\n\nfunction getMdStartLine(mdNode) {\n return mdNode.sourcepos[0][0];\n}\nfunction getMdEndLine(mdNode) {\n return mdNode.sourcepos[1][0];\n}\nfunction getMdStartCh(mdNode) {\n return mdNode.sourcepos[0][1];\n}\nfunction getMdEndCh(mdNode) {\n return mdNode.sourcepos[1][1];\n}\nfunction isHTMLNode(mdNode) {\n var type = mdNode.type;\n return type === 'htmlBlock' || type === 'htmlInline';\n}\nfunction isStyledInlineNode(mdNode) {\n var type = mdNode.type;\n return (type === 'strike' ||\n type === 'strong' ||\n type === 'emph' ||\n type === 'code' ||\n type === 'link' ||\n type === 'image');\n}\nfunction isCodeBlockNode(mdNode) {\n return mdNode && mdNode.type === 'codeBlock';\n}\nfunction isListNode$1(mdNode) {\n return mdNode && (mdNode.type === 'item' || mdNode.type === 'list');\n}\nfunction isOrderedListNode(mdNode) {\n return isListNode$1(mdNode) && mdNode.listData.type === 'ordered';\n}\nfunction isBulletListNode(mdNode) {\n return isListNode$1(mdNode) && mdNode.listData.type !== 'ordered';\n}\nfunction isTableCellNode(mdNode) {\n return mdNode && (mdNode.type === 'tableCell' || mdNode.type === 'tableDelimCell');\n}\nfunction isInlineNode$1(mdNode) {\n switch (mdNode.type) {\n case 'code':\n case 'text':\n case 'emph':\n case 'strong':\n case 'strike':\n case 'link':\n case 'image':\n case 'htmlInline':\n case 'linebreak':\n case 'softbreak':\n case 'customInline':\n return true;\n default:\n return false;\n }\n}\nfunction findClosestNode(mdNode, condition, includeSelf) {\n if (includeSelf === void 0) { includeSelf = true; }\n mdNode = includeSelf ? mdNode : mdNode.parent;\n while (mdNode && mdNode.type !== 'document') {\n if (condition(mdNode)) {\n return mdNode;\n }\n mdNode = mdNode.parent;\n }\n return null;\n}\nfunction traverseParentNodes(mdNode, iteratee, includeSelf) {\n if (includeSelf === void 0) { includeSelf = true; }\n mdNode = includeSelf ? mdNode : mdNode.parent;\n while (mdNode && mdNode.type !== 'document') {\n iteratee(mdNode);\n mdNode = mdNode.parent;\n }\n}\nfunction addOffsetPos(originPos, offset) {\n return [originPos[0], originPos[1] + offset];\n}\nfunction setOffsetPos(originPos, newOffset) {\n return [originPos[0], newOffset];\n}\nfunction getInlineMarkdownText(mdNode) {\n var text = mdNode.firstChild.literal;\n switch (mdNode.type) {\n case 'emph':\n return \"*\" + text + \"*\";\n case 'strong':\n return \"**\" + text + \"**\";\n case 'strike':\n return \"~~\" + text + \"~~\";\n case 'code':\n return \"`\" + text + \"`\";\n case 'link':\n case 'image':\n /* eslint-disable no-case-declarations */\n var _a = mdNode, destination = _a.destination, title = _a.title;\n var delim = mdNode.type === 'link' ? '' : '!';\n return delim + \"[\" + text + \"](\" + destination + (title ? \" \\\"\" + title + \"\\\"\" : '') + \")\";\n default:\n return null;\n }\n}\nfunction isContainer$2(node) {\n switch (node.type) {\n case 'document':\n case 'blockQuote':\n case 'list':\n case 'item':\n case 'paragraph':\n case 'heading':\n case 'emph':\n case 'strong':\n case 'strike':\n case 'link':\n case 'image':\n case 'table':\n case 'tableHead':\n case 'tableBody':\n case 'tableRow':\n case 'tableCell':\n case 'tableDelimRow':\n case 'customInline':\n return true;\n default:\n return false;\n }\n}\nfunction getChildrenText$1(node) {\n var buffer = [];\n var walker = node.walker();\n var event = null;\n while ((event = walker.next())) {\n var childNode = event.node;\n if (childNode.type === 'text') {\n buffer.push(childNode.literal);\n }\n }\n return buffer.join('');\n}\n\nvar widgetRules = [];\nvar widgetRuleMap = {};\nvar reWidgetPrefix = /\\$\\$widget\\d+\\s/;\nfunction unwrapWidgetSyntax(text) {\n var index = text.search(reWidgetPrefix);\n if (index !== -1) {\n var rest = text.substring(index);\n var replaced = rest.replace(reWidgetPrefix, '').replace('$$', '');\n text = text.substring(0, index);\n text += unwrapWidgetSyntax(replaced);\n }\n return text;\n}\nfunction createWidgetContent(info, text) {\n return \"$$\" + info + \" \" + text + \"$$\";\n}\nfunction widgetToDOM(info, text) {\n var _a = widgetRuleMap[info], rule = _a.rule, toDOM = _a.toDOM;\n var matches = unwrapWidgetSyntax(text).match(rule);\n if (matches) {\n text = matches[0];\n }\n return toDOM(text);\n}\nfunction getWidgetRules() {\n return widgetRules;\n}\nfunction setWidgetRules(rules) {\n widgetRules = rules;\n widgetRules.forEach(function (rule, index) {\n widgetRuleMap[\"widget\" + index] = rule;\n });\n}\nfunction mergeNodes(nodes, text, schema, ruleIndex) {\n return nodes.concat(createNodesWithWidget(text, schema, ruleIndex));\n}\n/**\n * create nodes with plain text and replace text matched to the widget rules with the widget node\n * For example, in case the text and widget rules as below\n *\n * text: $test plain text #test\n * widget rules: [{ rule: /$.+/ }, { rule: /#.+/ }]\n *\n * The creating node process is recursive and is as follows.\n *\n * in first widget rule(/$.+/)\n * $test -> widget node\n * plain text -> match with next widget rule\n * #test -> match with next widget rule\n *\n * in second widget rule(/#.+/)\n * plain text -> text node(no rule for matching)\n * #test -> widget node\n */\nfunction createNodesWithWidget(text, schema, ruleIndex) {\n if (ruleIndex === void 0) { ruleIndex = 0; }\n var nodes = [];\n var rule = (widgetRules[ruleIndex] || {}).rule;\n var nextRuleIndex = ruleIndex + 1;\n text = unwrapWidgetSyntax(text);\n if (rule && rule.test(text)) {\n var index = void 0;\n while ((index = text.search(rule)) !== -1) {\n var prev = text.substring(0, index);\n // get widget node on first splitted text using next widget rule\n if (prev) {\n nodes = mergeNodes(nodes, prev, schema, nextRuleIndex);\n }\n // build widget node using current widget rule\n text = text.substring(index);\n var literal = text.match(rule)[0];\n var info = \"widget\" + ruleIndex;\n nodes.push(schema.nodes.widget.create({ info: info }, schema.text(createWidgetContent(info, literal))));\n text = text.substring(literal.length);\n }\n // get widget node on last splitted text using next widget rule\n if (text) {\n nodes = mergeNodes(nodes, text, schema, nextRuleIndex);\n }\n }\n else if (text) {\n nodes =\n ruleIndex < widgetRules.length - 1\n ? mergeNodes(nodes, text, schema, nextRuleIndex)\n : [schema.text(text)];\n }\n return nodes;\n}\nfunction getWidgetContent(widgetNode) {\n var event;\n var text = '';\n var walker = widgetNode.walker();\n while ((event = walker.next())) {\n var node = event.node, entering = event.entering;\n if (entering) {\n if (node !== widgetNode && node.type !== 'text') {\n text += getInlineMarkdownText(node);\n // skip the children\n walker.resumeAt(widgetNode, false);\n walker.next();\n }\n else if (node.type === 'text') {\n text += node.literal;\n }\n }\n }\n return text;\n}\n\nfunction getDefaultCommands() {\n return {\n deleteSelection: function () { return deleteSelection; },\n selectAll: function () { return selectAll; },\n undo: function () { return undo; },\n redo: function () { return redo; },\n };\n}\n\nfunction placeholder(options) {\n return new Plugin({\n props: {\n decorations: function (state) {\n var doc = state.doc;\n if (options.text &&\n doc.childCount === 1 &&\n doc.firstChild.isTextblock &&\n doc.firstChild.content.size === 0) {\n var placeHolder = document.createElement('span');\n addClass_1(placeHolder, 'placeholder');\n if (options.className) {\n addClass_1(placeHolder, options.className);\n }\n placeHolder.textContent = options.text;\n return DecorationSet.create(doc, [Decoration.widget(1, placeHolder)]);\n }\n return null;\n },\n },\n });\n}\n\n/**\n * @fileoverview Check element has specific css class\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\nvar inArray$1 = inArray_1;\nvar getClass = getClass_1;\n\n/**\n * Check element has specific css class\n * @param {(HTMLElement|SVGElement)} element - target element\n * @param {string} cssClass - css class\n * @returns {boolean}\n * @memberof module:domUtil\n */\nfunction hasClass(element, cssClass) {\n var origin;\n\n if (element.classList) {\n return element.classList.contains(cssClass);\n }\n\n origin = getClass(element).split(/\\s+/);\n\n return inArray$1(cssClass, origin) > -1;\n}\n\nvar hasClass_1 = hasClass;\n\n/**\n * @fileoverview Check element match selector\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\nvar inArray = inArray_1;\nvar toArray = toArray_1;\n\nvar elProto = Element.prototype;\nvar matchSelector = elProto.matches ||\n elProto.webkitMatchesSelector ||\n elProto.mozMatchesSelector ||\n elProto.msMatchesSelector ||\n function(selector) {\n var doc = this.document || this.ownerDocument;\n\n return inArray(this, toArray(doc.querySelectorAll(selector))) > -1;\n };\n\n/**\n * Check element match selector\n * @param {HTMLElement} element - element to check\n * @param {string} selector - selector to check\n * @returns {boolean} is selector matched to element?\n * @memberof module:domUtil\n */\nfunction matches(element, selector) {\n return matchSelector.call(element, selector);\n}\n\nvar matches_1 = matches;\n\nvar TAG_NAME = '[A-Za-z][A-Za-z0-9-]*';\nvar ATTRIBUTE_NAME = '[a-zA-Z_:][a-zA-Z0-9:._-]*';\nvar UNQUOTED_VALUE = '[^\"\\'=<>`\\\\x00-\\\\x20]+';\nvar SINGLE_QUOTED_VALUE = \"'[^']*'\";\nvar DOUBLE_QUOTED_VALUE = '\"[^\"]*\"';\nvar ATTRIBUTE_VALUE = \"(?:\" + UNQUOTED_VALUE + \"|\" + SINGLE_QUOTED_VALUE + \"|\" + DOUBLE_QUOTED_VALUE + \")\";\nvar ATTRIBUTE_VALUE_SPEC = \"\" + '(?:\\\\s*=\\\\s*' + ATTRIBUTE_VALUE + \")\";\nvar ATTRIBUTE$1 = \"\" + '(?:\\\\s+' + ATTRIBUTE_NAME + ATTRIBUTE_VALUE_SPEC + \"?)\";\nvar OPEN_TAG = \"<(\" + TAG_NAME + \")(\" + ATTRIBUTE$1 + \")*\\\\s*/?>\";\nvar CLOSE_TAG = \"</(\" + TAG_NAME + \")\\\\s*[>]\";\nvar HTML_TAG = \"(?:\" + OPEN_TAG + \"|\" + CLOSE_TAG + \")\";\nvar reHTMLTag = new RegExp(\"^\" + HTML_TAG, 'i');\nvar reBR = /<br\\s*\\/*>/i;\nvar reHTMLComment = /<! ---->|<!--(?:-?[^>-])(?:-?[^-])*-->/;\nvar ALTERNATIVE_TAG_FOR_BR = '</p><p>';\n\nfunction isPositionInBox(style, offsetX, offsetY) {\n var left = parseInt(style.left, 10);\n var top = parseInt(style.top, 10);\n var width = parseInt(style.width, 10) + parseInt(style.paddingLeft, 10) + parseInt(style.paddingRight, 10);\n var height = parseInt(style.height, 10) + parseInt(style.paddingTop, 10) + parseInt(style.paddingBottom, 10);\n return offsetX >= left && offsetX <= left + width && offsetY >= top && offsetY <= top + height;\n}\nvar CLS_PREFIX = 'toastui-editor-';\nfunction cls() {\n var names = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n names[_i] = arguments[_i];\n }\n var result = [];\n for (var _a = 0, names_1 = names; _a < names_1.length; _a++) {\n var name_1 = names_1[_a];\n var className = void 0;\n if (Array.isArray(name_1)) {\n className = name_1[0] ? name_1[1] : null;\n }\n else {\n className = name_1;\n }\n if (className) {\n result.push(\"\" + CLS_PREFIX + className);\n }\n }\n return result.join(' ');\n}\nfunction clsWithMdPrefix() {\n var names = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n names[_i] = arguments[_i];\n }\n return names.map(function (className) { return CLS_PREFIX + \"md-\" + className; }).join(' ');\n}\nfunction isTextNode(node) {\n return (node === null || node === void 0 ? void 0 : node.nodeType) === Node.TEXT_NODE;\n}\nfunction isElemNode(node) {\n return node && node.nodeType === Node.ELEMENT_NODE;\n}\nfunction findNodes(element, selector) {\n var nodeList = toArray_1(element.querySelectorAll(selector));\n if (nodeList.length) {\n return nodeList;\n }\n return [];\n}\nfunction appendNodes(node, nodesToAppend) {\n nodesToAppend = isArray_1(nodesToAppend) ? toArray_1(nodesToAppend) : [nodesToAppend];\n nodesToAppend.forEach(function (nodeToAppend) {\n node.appendChild(nodeToAppend);\n });\n}\nfunction insertBeforeNode(insertedNode, node) {\n if (node.parentNode) {\n node.parentNode.insertBefore(insertedNode, node);\n }\n}\nfunction removeNode$1(node) {\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n}\nfunction unwrapNode(node) {\n var result = [];\n while (node.firstChild) {\n result.push(node.firstChild);\n if (node.parentNode) {\n node.parentNode.insertBefore(node.firstChild, node);\n }\n }\n removeNode$1(node);\n return result;\n}\nfunction toggleClass(element, className, state) {\n if (isUndefined_1(state)) {\n state = !hasClass_1(element, className);\n }\n var toggleFn = state ? addClass_1 : removeClass_1;\n toggleFn(element, className);\n}\nfunction createElementWith(contents, target) {\n var container = document.createElement('div');\n if (isString_1(contents)) {\n container.innerHTML = contents;\n }\n else {\n container.appendChild(contents);\n }\n var firstChild = container.firstChild;\n if (target) {\n target.appendChild(firstChild);\n }\n return firstChild;\n}\nfunction getOuterWidth(el) {\n var computed = window.getComputedStyle(el);\n return (['margin-left', 'margin-right'].reduce(function (acc, type) { return acc + parseInt(computed.getPropertyValue(type), 10); }, 0) + el.offsetWidth);\n}\nfunction closest(node, found) {\n var condition;\n if (isString_1(found)) {\n condition = function (target) { return matches_1(target, found); };\n }\n else {\n condition = function (target) { return target === found; };\n }\n while (node && node !== document) {\n if (isElemNode(node) && condition(node)) {\n return node;\n }\n node = node.parentNode;\n }\n return null;\n}\nfunction getTotalOffset(el, root) {\n var offsetTop = 0;\n var offsetLeft = 0;\n while (el && el !== root) {\n var top_1 = el.offsetTop, left = el.offsetLeft, offsetParent = el.offsetParent;\n offsetTop += top_1;\n offsetLeft += left;\n if (offsetParent === root.offsetParent) {\n break;\n }\n el = el.offsetParent;\n }\n return { offsetTop: offsetTop, offsetLeft: offsetLeft };\n}\nfunction setAttributes(attributes, element) {\n Object.keys(attributes).forEach(function (attrName) {\n if (isNil(attributes[attrName])) {\n element.removeAttribute(attrName);\n }\n else {\n element.setAttribute(attrName, attributes[attrName]);\n }\n });\n}\nfunction replaceBRWithEmptyBlock(html) {\n // remove br in paragraph to compatible with markdown\n var replacedHTML = html.replace(/<p><br\\s*\\/*><\\/p>/gi, '<p></p>');\n var reHTMLTag = new RegExp(HTML_TAG, 'ig');\n var htmlTagMatched = replacedHTML.match(reHTMLTag);\n htmlTagMatched === null || htmlTagMatched === void 0 ? void 0 : htmlTagMatched.forEach(function (htmlTag, index) {\n if (reBR.test(htmlTag)) {\n var alternativeTag = ALTERNATIVE_TAG_FOR_BR;\n if (index) {\n var prevTag = htmlTagMatched[index - 1];\n var openTagMatched = prevTag.match(OPEN_TAG);\n if (openTagMatched && !/br/i.test(openTagMatched[1])) {\n var tagName = openTagMatched[1];\n alternativeTag = \"</\" + tagName + \"><\" + tagName + \">\";\n }\n }\n replacedHTML = replacedHTML.replace(reBR, alternativeTag);\n }\n });\n return replacedHTML;\n}\nfunction removeProseMirrorHackNodes(html) {\n var reProseMirrorImage = /<img class=\"ProseMirror-separator\" alt=\"\">/g;\n var reProseMirrorTrailingBreak = / class=\"ProseMirror-trailingBreak\"/g;\n var resultHTML = html;\n resultHTML = resultHTML.replace(reProseMirrorImage, '');\n resultHTML = resultHTML.replace(reProseMirrorTrailingBreak, '');\n return resultHTML;\n}\n\nvar pluginKey$1 = new PluginKey('widget');\nvar MARGIN = 5;\nvar PopupWidget = /** @class */ (function () {\n function PopupWidget(view, eventEmitter) {\n var _this = this;\n this.popup = null;\n this.removeWidget = function () {\n if (_this.popup) {\n _this.rootEl.removeChild(_this.popup);\n _this.popup = null;\n }\n };\n this.rootEl = view.dom.parentElement;\n this.eventEmitter = eventEmitter;\n this.eventEmitter.listen('blur', this.removeWidget);\n this.eventEmitter.listen('loadUI', function () {\n _this.rootEl = closest(view.dom.parentElement, \".\" + cls('defaultUI'));\n });\n this.eventEmitter.listen('removePopupWidget', this.removeWidget);\n }\n PopupWidget.prototype.update = function (view) {\n var widget = pluginKey$1.getState(view.state);\n this.removeWidget();\n if (widget) {\n var node = widget.node, style = widget.style;\n var _a = view.coordsAtPos(widget.pos), top_1 = _a.top, left = _a.left, bottom = _a.bottom;\n var height = bottom - top_1;\n var rect = this.rootEl.getBoundingClientRect();\n var relTopPos = top_1 - rect.top;\n css_1(node, { opacity: '0' });\n this.rootEl.appendChild(node);\n css_1(node, {\n position: 'absolute',\n left: left - rect.left + MARGIN + \"px\",\n top: (style === 'bottom' ? relTopPos + height - MARGIN : relTopPos - height) + \"px\",\n opacity: '1',\n });\n this.popup = node;\n view.focus();\n }\n };\n PopupWidget.prototype.destroy = function () {\n this.eventEmitter.removeEventHandler('blur', this.removeWidget);\n };\n return PopupWidget;\n}());\nfunction addWidget(eventEmitter) {\n return new Plugin({\n key: pluginKey$1,\n state: {\n init: function () {\n return null;\n },\n apply: function (tr) {\n return tr.getMeta('widget');\n },\n },\n view: function (editorView) {\n return new PopupWidget(editorView, eventEmitter);\n },\n });\n}\n\nfunction addDefaultImageBlobHook(eventEmitter) {\n eventEmitter.listen('addImageBlobHook', function (blob, callback) {\n var reader = new FileReader();\n reader.onload = function (_a) {\n var target = _a.target;\n return callback(target.result);\n };\n reader.readAsDataURL(blob);\n });\n}\nfunction emitImageBlobHook(eventEmitter, blob, type) {\n var hook = function (imageUrl, altText) {\n eventEmitter.emit('command', 'addImage', {\n imageUrl: imageUrl,\n altText: altText || blob.name || 'image',\n });\n };\n eventEmitter.emit('addImageBlobHook', blob, hook, type);\n}\nfunction pasteImageOnly(items) {\n var images = toArray_1(items).filter(function (_a) {\n var type = _a.type;\n return type.indexOf('image') !== -1;\n });\n if (images.length === 1) {\n var item = images[0];\n if (item) {\n return item.getAsFile();\n }\n }\n return null;\n}\n\nfunction dropImage(_a) {\n var eventEmitter = _a.eventEmitter;\n return new Plugin({\n props: {\n handleDOMEvents: {\n drop: function (_, ev) {\n var _a;\n var items = (_a = ev.dataTransfer) === null || _a === void 0 ? void 0 : _a.files;\n if (items) {\n forEachArray_1(items, function (item) {\n if (item.type.indexOf('image') !== -1) {\n ev.preventDefault();\n ev.stopPropagation();\n emitImageBlobHook(eventEmitter, item, ev.type);\n return false;\n }\n return true;\n });\n }\n return true;\n },\n },\n },\n });\n}\n\nvar Node$2 = /** @class */ (function () {\n function Node() {\n }\n Object.defineProperty(Node.prototype, \"type\", {\n get: function () {\n return 'node';\n },\n enumerable: false,\n configurable: true\n });\n Node.prototype.setContext = function (context) {\n this.context = context;\n };\n return Node;\n}());\n\nfunction widgetNodeView(pmNode) {\n var dom = document.createElement('span');\n var node = widgetToDOM(pmNode.attrs.info, pmNode.textContent);\n dom.className = 'tui-widget';\n dom.appendChild(node);\n return { dom: dom };\n}\nfunction isWidgetNode(pmNode) {\n return pmNode.type.name === 'widget';\n}\nvar Widget = /** @class */ (function (_super) {\n __extends$1(Widget, _super);\n function Widget() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Widget.prototype, \"name\", {\n get: function () {\n return 'widget';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Widget.prototype, \"schema\", {\n get: function () {\n return {\n attrs: {\n info: { default: null },\n },\n group: 'inline',\n inline: true,\n content: 'text*',\n selectable: false,\n atom: true,\n toDOM: function () {\n return ['span', { class: 'tui-widget' }, 0];\n },\n parseDOM: [\n {\n tag: 'span.tui-widget',\n getAttrs: function (dom) {\n var text = dom.textContent;\n var _a = text.match(/\\$\\$(widget\\d+)/), info = _a[1];\n return { info: info };\n },\n },\n ],\n };\n },\n enumerable: false,\n configurable: true\n });\n return Widget;\n}(Node$2));\n\nvar EditorBase = /** @class */ (function () {\n function EditorBase(eventEmitter) {\n this.timer = null;\n this.el = document.createElement('div');\n this.el.className = 'toastui-editor';\n this.eventEmitter = eventEmitter;\n this.placeholder = { text: '' };\n }\n EditorBase.prototype.createState = function () {\n return EditorState.create({\n schema: this.schema,\n plugins: this.createPlugins(),\n });\n };\n EditorBase.prototype.initEvent = function () {\n var _a = this, eventEmitter = _a.eventEmitter, view = _a.view, editorType = _a.editorType;\n view.dom.addEventListener('focus', function () { return eventEmitter.emit('focus', editorType); });\n view.dom.addEventListener('blur', function () { return eventEmitter.emit('blur', editorType); });\n };\n EditorBase.prototype.emitChangeEvent = function (tr) {\n this.eventEmitter.emit('caretChange', this.editorType);\n if (tr.docChanged) {\n this.eventEmitter.emit('change', this.editorType);\n }\n };\n Object.defineProperty(EditorBase.prototype, \"defaultPlugins\", {\n get: function () {\n var rules = this.createInputRules();\n var plugins = __spreadArray$1(__spreadArray$1([], this.keymaps), [\n keymap(__assign$1({ 'Shift-Enter': baseKeymap.Enter }, baseKeymap)),\n history(),\n placeholder(this.placeholder),\n addWidget(this.eventEmitter),\n dropImage(this.context),\n ]);\n return rules ? plugins.concat(rules) : plugins;\n },\n enumerable: false,\n configurable: true\n });\n EditorBase.prototype.createInputRules = function () {\n var widgetRules = getWidgetRules();\n var rules = widgetRules.map(function (_a) {\n var rule = _a.rule;\n return new InputRule(rule, function (state, match, start, end) {\n var schema = state.schema, tr = state.tr, doc = state.doc;\n var allMatched = match.input.match(new RegExp(rule, 'g'));\n var pos = doc.resolve(start);\n var parent = pos.parent;\n var count = 0;\n if (isWidgetNode(parent)) {\n parent = pos.node(pos.depth - 1);\n }\n parent.forEach(function (child) { return isWidgetNode(child) && (count += 1); });\n // replace the content only if the count of matched rules in whole text is greater than current widget node count\n if (allMatched.length > count) {\n var content = last$1(allMatched);\n var nodes = createNodesWithWidget(content, schema);\n // adjust start position based on widget content\n return tr.replaceWith(end - content.length + 1, end, nodes);\n }\n return null;\n });\n });\n return rules.length ? inputRules({ rules: rules }) : null;\n };\n EditorBase.prototype.clearTimer = function () {\n if (this.timer) {\n clearTimeout(this.timer);\n this.timer = null;\n }\n };\n EditorBase.prototype.createSchema = function () {\n return new Schema({\n nodes: this.specs.nodes,\n marks: this.specs.marks,\n });\n };\n EditorBase.prototype.createKeymaps = function (useCommandShortcut) {\n var _a = getDefaultCommands(), undo = _a.undo, redo = _a.redo;\n var allKeymaps = this.specs.keymaps(useCommandShortcut);\n var historyKeymap = {\n 'Mod-z': undo(),\n 'Shift-Mod-z': redo(),\n };\n return useCommandShortcut ? allKeymaps.concat(keymap(historyKeymap)) : allKeymaps;\n };\n EditorBase.prototype.createCommands = function () {\n return this.specs.commands(this.view);\n };\n EditorBase.prototype.createPluginProps = function () {\n var _this = this;\n return this.extraPlugins.map(function (plugin) { return plugin(_this.eventEmitter); });\n };\n EditorBase.prototype.focus = function () {\n var _this = this;\n this.clearTimer();\n // prevent the error for IE11\n this.timer = setTimeout(function () {\n _this.view.focus();\n _this.view.dispatch(_this.view.state.tr.scrollIntoView());\n });\n };\n EditorBase.prototype.blur = function () {\n this.view.dom.blur();\n };\n EditorBase.prototype.destroy = function () {\n var _this = this;\n this.clearTimer();\n this.view.destroy();\n Object.keys(this).forEach(function (prop) {\n delete _this[prop];\n });\n };\n EditorBase.prototype.moveCursorToStart = function (focus) {\n var tr = this.view.state.tr;\n this.view.dispatch(tr.setSelection(createTextSelection(tr, 1)).scrollIntoView());\n if (focus) {\n this.focus();\n }\n };\n EditorBase.prototype.moveCursorToEnd = function (focus) {\n var tr = this.view.state.tr;\n this.view.dispatch(tr.setSelection(createTextSelection(tr, tr.doc.content.size - 1)).scrollIntoView());\n if (focus) {\n this.focus();\n }\n };\n EditorBase.prototype.setScrollTop = function (top) {\n this.view.dom.scrollTop = top;\n };\n EditorBase.prototype.getScrollTop = function () {\n return this.view.dom.scrollTop;\n };\n EditorBase.prototype.setPlaceholder = function (text) {\n this.placeholder.text = text;\n this.view.dispatch(this.view.state.tr.scrollIntoView());\n };\n EditorBase.prototype.setHeight = function (height) {\n css_1(this.el, { height: height + \"px\" });\n };\n EditorBase.prototype.setMinHeight = function (minHeight) {\n css_1(this.el, { minHeight: minHeight + \"px\" });\n };\n EditorBase.prototype.getElement = function () {\n return this.el;\n };\n return EditorBase;\n}());\n\n/**\n * @fileoverview Check whether the given variable is a function or not.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n/**\n * Check whether the given variable is a function or not.\n * If the given variable is a function, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is function?\n * @memberof module:type\n */\nfunction isFunction(obj) {\n return obj instanceof Function;\n}\n\nvar isFunction_1 = isFunction;\n\nvar defaultCommandShortcuts = [\n 'Enter',\n 'Shift-Enter',\n 'Mod-Enter',\n 'Tab',\n 'Shift-Tab',\n 'Delete',\n 'Backspace',\n 'Mod-Delete',\n 'Mod-Backspace',\n 'ArrowUp',\n 'ArrowDown',\n 'ArrowLeft',\n 'ArrowRight',\n 'Mod-d',\n 'Mod-D',\n 'Alt-ArrowUp',\n 'Alt-ArrowDown',\n];\nfunction execCommand(view, command, payload) {\n view.focus();\n return command(payload)(view.state, view.dispatch, view);\n}\nvar SpecManager = /** @class */ (function () {\n function SpecManager(specs) {\n this.specs = specs;\n }\n Object.defineProperty(SpecManager.prototype, \"nodes\", {\n get: function () {\n return this.specs\n .filter(function (spec) { return spec.type === 'node'; })\n .reduce(function (nodes, _a) {\n var _b;\n var name = _a.name, schema = _a.schema;\n return __assign$1(__assign$1({}, nodes), (_b = {}, _b[name] = schema, _b));\n }, {});\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(SpecManager.prototype, \"marks\", {\n get: function () {\n return this.specs\n .filter(function (spec) { return spec.type === 'mark'; })\n .reduce(function (marks, _a) {\n var _b;\n var name = _a.name, schema = _a.schema;\n return __assign$1(__assign$1({}, marks), (_b = {}, _b[name] = schema, _b));\n }, {});\n },\n enumerable: false,\n configurable: true\n });\n SpecManager.prototype.commands = function (view, addedCommands) {\n var specCommands = this.specs\n .filter(function (_a) {\n var commands = _a.commands;\n return commands;\n })\n .reduce(function (allCommands, spec) {\n var commands = {};\n var specCommand = spec.commands();\n if (isFunction_1(specCommand)) {\n commands[spec.name] = function (payload) { return execCommand(view, specCommand, payload); };\n }\n else {\n Object.keys(specCommand).forEach(function (name) {\n commands[name] = function (payload) { return execCommand(view, specCommand[name], payload); };\n });\n }\n return __assign$1(__assign$1({}, allCommands), commands);\n }, {});\n var defaultCommands = getDefaultCommands();\n Object.keys(defaultCommands).forEach(function (name) {\n specCommands[name] = function (payload) { return execCommand(view, defaultCommands[name], payload); };\n });\n if (addedCommands) {\n Object.keys(addedCommands).forEach(function (name) {\n specCommands[name] = function (payload) { return execCommand(view, addedCommands[name], payload); };\n });\n }\n return specCommands;\n };\n SpecManager.prototype.keymaps = function (useCommandShortcut) {\n var specKeymaps = this.specs.filter(function (spec) { return spec.keymaps; }).map(function (spec) { return spec.keymaps(); });\n return specKeymaps.map(function (keys) {\n if (!useCommandShortcut) {\n Object.keys(keys).forEach(function (key) {\n if (!includes(defaultCommandShortcuts, key)) {\n delete keys[key];\n }\n });\n }\n return keymap(keys);\n });\n };\n SpecManager.prototype.setContext = function (context) {\n this.specs.forEach(function (spec) {\n spec.setContext(context);\n });\n };\n return SpecManager;\n}());\n\nfunction resolveSelectionPos(selection) {\n var from = selection.from, to = selection.to;\n if (selection instanceof AllSelection) {\n return [from + 1, to - 1];\n }\n return [from, to];\n}\nfunction getMdLine(resolvedPos) {\n return resolvedPos.index(0) + 1;\n}\nfunction getWidgetNodePos(node, chPos, direction) {\n if (direction === void 0) { direction = 1; }\n var additionalPos = 0;\n node.forEach(function (child, pos) {\n // add or subtract widget node tag\n if (isWidgetNode(child) && pos + 2 < chPos) {\n additionalPos += 2 * direction;\n }\n });\n return additionalPos;\n}\nfunction getEditorToMdPos(doc, from, to) {\n if (to === void 0) { to = from; }\n var collapsed = from === to;\n var startResolvedPos = doc.resolve(from);\n var startLine = getMdLine(startResolvedPos);\n var endLine = startLine;\n var startOffset = startResolvedPos.start(1);\n var endOffset = startOffset;\n if (!collapsed) {\n // prevent the end offset from pointing to the root document position\n var endResolvedPos = doc.resolve(to === doc.content.size ? to - 1 : to);\n endOffset = endResolvedPos.start(1);\n endLine = getMdLine(endResolvedPos);\n // To resolve the end offset excluding document tag size\n if (endResolvedPos.pos === doc.content.size) {\n to = doc.content.size - 2;\n }\n }\n var startCh = Math.max(from - startOffset + 1, 1);\n var endCh = Math.max(to - endOffset + 1, 1);\n return [\n [startLine, startCh + getWidgetNodePos(doc.child(startLine - 1), startCh, -1)],\n [endLine, endCh + getWidgetNodePos(doc.child(endLine - 1), endCh, -1)],\n ];\n}\nfunction getStartPosListPerLine(doc, endIndex) {\n var startPosListPerLine = [];\n for (var i = 0, pos = 0; i < endIndex; i += 1) {\n var child = doc.child(i);\n startPosListPerLine[i] = pos;\n pos += child.nodeSize;\n }\n return startPosListPerLine;\n}\nfunction getMdToEditorPos(doc, startPos, endPos) {\n var startPosListPerLine = getStartPosListPerLine(doc, endPos[0]);\n var startIndex = startPos[0] - 1;\n var endIndex = endPos[0] - 1;\n var startNode = doc.child(startIndex);\n var endNode = doc.child(endIndex);\n // calculate the position corresponding to the line\n var from = startPosListPerLine[startIndex];\n var to = startPosListPerLine[endIndex];\n // calculate the position corresponding to the character offset of the line\n from += startPos[1] + getWidgetNodePos(startNode, startPos[1] - 1);\n to += endPos[1] + getWidgetNodePos(endNode, endPos[1] - 1);\n return [from, Math.min(to, doc.content.size)];\n}\nfunction getRangeInfo(selection) {\n var $from = selection.$from, $to = selection.$to;\n var from = selection.from, to = selection.to;\n var doc = $from.doc;\n if (selection instanceof AllSelection) {\n $from = doc.resolve(from + 1);\n $to = doc.resolve(to - 1);\n }\n if ($from.depth === 0) {\n $from = doc.resolve(from - 1);\n $to = $from;\n }\n return {\n startFromOffset: $from.start(1),\n endFromOffset: $to.start(1),\n startToOffset: $from.end(1),\n endToOffset: $to.end(1),\n startIndex: $from.index(0),\n endIndex: $to.index(0),\n from: $from.pos,\n to: $to.pos,\n };\n}\nfunction getNodeContentOffsetRange(doc, targetIndex) {\n var startOffset = 1;\n var endOffset = 1;\n for (var i = 0, offset = 0; i < doc.childCount; i += 1) {\n var nodeSize = doc.child(i).nodeSize;\n // calculate content start, end offset(not node offset)\n startOffset = offset + 1;\n endOffset = offset + nodeSize - 1;\n if (i === targetIndex) {\n break;\n }\n offset += nodeSize;\n }\n return { startOffset: startOffset, endOffset: endOffset };\n}\n\nvar HEADING = 'heading';\nvar BLOCK_QUOTE = 'blockQuote';\nvar LIST_ITEM = 'listItem';\nvar TABLE = 'table';\nvar TABLE_CELL = 'tableCell';\nvar CODE_BLOCK = 'codeBlock';\nvar THEMATIC_BREAK = 'thematicBreak';\nvar LINK = 'link';\nvar CODE = 'code';\nvar META = 'meta';\nvar DELIM = 'delimiter';\nvar TASK_DELIM = 'taskDelimiter';\nvar TEXT = 'markedText';\nvar HTML = 'html';\nvar CUSTOM_BLOCK = 'customBlock';\nvar delimSize = {\n strong: 2,\n emph: 1,\n strike: 2,\n};\nfunction markInfo(start, end, type, attrs) {\n return { start: start, end: end, spec: { type: type, attrs: attrs } };\n}\nfunction heading$1(_a, start, end) {\n var level = _a.level, headingType = _a.headingType;\n var marks = [markInfo(start, end, HEADING, { level: level })];\n if (headingType === 'atx') {\n marks.push(markInfo(start, addOffsetPos(start, level), DELIM));\n }\n else {\n marks.push(markInfo(setOffsetPos(end, 0), end, HEADING, { seText: true }));\n }\n return marks;\n}\nfunction emphasisAndStrikethrough(_a, start, end) {\n var type = _a.type;\n var startDelimPos = addOffsetPos(start, delimSize[type]);\n var endDelimPos = addOffsetPos(end, -delimSize[type]);\n return [\n markInfo(startDelimPos, endDelimPos, type),\n markInfo(start, startDelimPos, DELIM),\n markInfo(endDelimPos, end, DELIM),\n ];\n}\nfunction markLink(start, end, linkTextStart, lastChildCh) {\n return [\n markInfo(start, end, LINK),\n markInfo(setOffsetPos(start, linkTextStart[1] + 1), setOffsetPos(end, lastChildCh), LINK, {\n desc: true,\n }),\n markInfo(setOffsetPos(end, lastChildCh + 2), addOffsetPos(end, -1), LINK, { url: true }),\n ];\n}\nfunction image$1(_a, start, end) {\n var lastChild = _a.lastChild;\n var lastChildCh = lastChild ? getMdEndCh(lastChild) + 1 : 3; // 3: length of '![]'\n var linkTextEnd = addOffsetPos(start, 1);\n return __spreadArray$1([markInfo(start, linkTextEnd, META)], markLink(start, end, linkTextEnd, lastChildCh));\n}\nfunction link(_a, start, end) {\n var lastChild = _a.lastChild, extendedAutolink = _a.extendedAutolink;\n var lastChildCh = lastChild ? getMdEndCh(lastChild) + 1 : 2; // 2: length of '[]'\n return extendedAutolink\n ? [markInfo(start, end, LINK, { desc: true })]\n : markLink(start, end, start, lastChildCh);\n}\nfunction code(_a, start, end) {\n var tickCount = _a.tickCount;\n var openDelimEnd = addOffsetPos(start, tickCount);\n var closeDelimStart = addOffsetPos(end, -tickCount);\n return [\n markInfo(start, end, CODE),\n markInfo(start, openDelimEnd, CODE, { start: true }),\n markInfo(openDelimEnd, closeDelimStart, CODE, { marked: true }),\n markInfo(closeDelimStart, end, CODE, { end: true }),\n ];\n}\nfunction lineBackground(parent, start, end, prefix) {\n var defaultBackground = {\n start: start,\n end: end,\n spec: {\n attrs: { className: prefix + \"-line-background\", codeStart: start[0], codeEnd: end[0] },\n },\n lineBackground: true,\n };\n return parent.type !== 'item' && parent.type !== 'blockQuote'\n ? [\n __assign$1(__assign$1({}, defaultBackground), { end: start, spec: { attrs: { className: prefix + \"-line-background start\" } } }),\n __assign$1(__assign$1({}, defaultBackground), { start: [Math.min(start[0] + 1, end[0]), start[1]] }),\n ]\n : null;\n}\nfunction codeBlock$1(node, start, end, endLine) {\n var fenceOffset = node.fenceOffset, fenceLength = node.fenceLength, fenceChar = node.fenceChar, info = node.info, infoPadding = node.infoPadding, parent = node.parent;\n var fenceEnd = fenceOffset + fenceLength;\n var marks = [markInfo(setOffsetPos(start, 1), end, CODE_BLOCK)];\n if (fenceChar) {\n marks.push(markInfo(start, addOffsetPos(start, fenceEnd), DELIM));\n }\n if (info) {\n marks.push(markInfo(addOffsetPos(start, fenceLength), addOffsetPos(start, fenceLength + infoPadding + info.length), META));\n }\n var codeBlockEnd = \"^(\\\\s{0,4})(\" + fenceChar + \"{\" + fenceLength + \",})\";\n var reCodeBlockEnd = new RegExp(codeBlockEnd);\n if (reCodeBlockEnd.test(endLine)) {\n marks.push(markInfo(setOffsetPos(end, 1), end, DELIM));\n }\n var lineBackgroundMarkInfo = lineBackground(parent, start, end, 'code-block');\n return lineBackgroundMarkInfo ? marks.concat(lineBackgroundMarkInfo) : marks;\n}\nfunction customBlock$2(node, start, end) {\n var _a = node, offset = _a.offset, syntaxLength = _a.syntaxLength, info = _a.info, parent = _a.parent;\n var syntaxEnd = offset + syntaxLength;\n var marks = [markInfo(setOffsetPos(start, 1), end, CUSTOM_BLOCK)];\n marks.push(markInfo(start, addOffsetPos(start, syntaxEnd), DELIM));\n if (info) {\n marks.push(markInfo(addOffsetPos(start, syntaxEnd), addOffsetPos(start, syntaxLength + info.length), META));\n }\n marks.push(markInfo(setOffsetPos(end, 1), end, DELIM));\n var lineBackgroundMarkInfo = lineBackground(parent, start, end, 'custom-block');\n return lineBackgroundMarkInfo ? marks.concat(lineBackgroundMarkInfo) : marks;\n}\nfunction markListItemChildren(node, markType) {\n var marks = [];\n while (node) {\n var type = node.type;\n if (type === 'paragraph' || type === 'codeBlock') {\n marks.push(markInfo([getMdStartLine(node), getMdStartCh(node) - 1], [getMdEndLine(node), getMdEndCh(node) + 1], markType));\n }\n node = node.next;\n }\n return marks;\n}\nfunction markParagraphInBlockQuote(node) {\n var marks = [];\n while (node) {\n marks.push(markInfo([getMdStartLine(node), getMdStartCh(node)], [getMdEndLine(node), getMdEndCh(node) + 1], TEXT));\n node = node.next;\n }\n return marks;\n}\nfunction blockQuote$2(node, start, end) {\n var marks = node.parent && node.parent.type !== 'blockQuote' ? [markInfo(start, end, BLOCK_QUOTE)] : [];\n if (node.firstChild) {\n var childMarks = [];\n if (node.firstChild.type === 'paragraph') {\n childMarks = markParagraphInBlockQuote(node.firstChild.firstChild);\n }\n else if (node.firstChild.type === 'list') {\n childMarks = markListItemChildren(node.firstChild, TEXT);\n }\n marks = __spreadArray$1(__spreadArray$1([], marks), childMarks);\n }\n return marks;\n}\nfunction getSpecOfListItemStyle(node) {\n var depth = 0;\n while (node.parent.parent && node.parent.parent.type === 'item') {\n node = node.parent.parent;\n depth += 1;\n }\n var attrs = [{ odd: true }, { even: true }][depth % 2];\n return [LIST_ITEM, __assign$1(__assign$1({}, attrs), { listStyle: true })];\n}\nfunction item$1(node, start) {\n var _a = node.listData, padding = _a.padding, task = _a.task;\n var spec = getSpecOfListItemStyle(node);\n var marks = [markInfo.apply(void 0, __spreadArray$1([start, addOffsetPos(start, padding)], spec))];\n if (task) {\n marks.push(markInfo(addOffsetPos(start, padding), addOffsetPos(start, padding + 3), TASK_DELIM));\n marks.push(markInfo(addOffsetPos(start, padding + 1), addOffsetPos(start, padding + 2), META));\n }\n return marks.concat(markListItemChildren(node.firstChild, TEXT));\n}\nvar markNodeFuncMap = {\n heading: heading$1,\n strong: emphasisAndStrikethrough,\n emph: emphasisAndStrikethrough,\n strike: emphasisAndStrikethrough,\n link: link,\n image: image$1,\n code: code,\n codeBlock: codeBlock$1,\n blockQuote: blockQuote$2,\n item: item$1,\n customBlock: customBlock$2,\n};\nvar simpleMarkClassNameMap = {\n thematicBreak: THEMATIC_BREAK,\n table: TABLE,\n tableCell: TABLE_CELL,\n htmlInline: HTML,\n};\nfunction getMarkInfo(node, start, end, endLine) {\n var type = node.type;\n if (isFunction_1(markNodeFuncMap[type])) {\n // @ts-ignore\n return markNodeFuncMap[type](node, start, end, endLine);\n }\n if (simpleMarkClassNameMap[type]) {\n return [markInfo(start, end, simpleMarkClassNameMap[type])];\n }\n return null;\n}\n\nvar removingBackgroundIndexMap = {};\nfunction syntaxHighlight(_a) {\n var schema = _a.schema, toastMark = _a.toastMark;\n return new Plugin({\n appendTransaction: function (transactions, _, newState) {\n var tr = transactions[0];\n var newTr = newState.tr;\n if (tr.docChanged) {\n var markInfo_1 = [];\n var editResult = tr.getMeta('editResult');\n editResult.forEach(function (result) {\n var nodes = result.nodes, removedNodeRange = result.removedNodeRange;\n if (nodes.length) {\n markInfo_1 = markInfo_1.concat(getMarkForRemoving(newTr, nodes));\n for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) {\n var parent_1 = nodes_1[_i];\n var walker = parent_1.walker();\n var event_1 = walker.next();\n while (event_1) {\n var node = event_1.node, entering = event_1.entering;\n if (entering) {\n markInfo_1 = markInfo_1.concat(getMarkForAdding(node, toastMark));\n }\n event_1 = walker.next();\n }\n }\n }\n else if (removedNodeRange) {\n var maxIndex = newTr.doc.childCount - 1;\n var _a = removedNodeRange.line, startLine = _a[0], endLine = _a[1];\n var startIndex = Math.min(startLine, maxIndex);\n var endIndex = Math.min(endLine, maxIndex);\n // cache the index to remove code block, custom block background when there are no adding nodes\n for (var i = startIndex; i <= endIndex; i += 1) {\n removingBackgroundIndexMap[i] = true;\n }\n }\n });\n appendMarkTr(newTr, schema, markInfo_1);\n }\n return newTr.setMeta('widget', tr.getMeta('widget'));\n },\n });\n}\nfunction isDifferentBlock(doc, index, attrs) {\n return Object.keys(attrs).some(function (name) { return attrs[name] !== doc.child(index).attrs[name]; });\n}\nfunction addLineBackground(tr, doc, paragraph, blockPosInfo, attrs) {\n if (attrs === void 0) { attrs = {}; }\n var startIndex = blockPosInfo.startIndex, endIndex = blockPosInfo.endIndex, from = blockPosInfo.from, to = blockPosInfo.to;\n var shouldChangeBlockType = false;\n for (var i = startIndex; i <= endIndex; i += 1) {\n // prevent to remove background of the node that need to have background\n delete removingBackgroundIndexMap[i];\n shouldChangeBlockType = isDifferentBlock(doc, i, attrs);\n }\n if (shouldChangeBlockType) {\n tr.setBlockType(from, to, paragraph, attrs);\n }\n}\nfunction appendMarkTr(tr, schema, marks) {\n var doc = tr.doc;\n var paragraph = schema.nodes.paragraph;\n // get start position per line for lazy calculation\n var startPosListPerLine = getStartPosListPerLine(doc, doc.childCount);\n marks.forEach(function (_a) {\n var start = _a.start, end = _a.end, spec = _a.spec, lineBackground = _a.lineBackground;\n var startIndex = Math.min(start[0], doc.childCount) - 1;\n var endIndex = Math.min(end[0], doc.childCount) - 1;\n var startNode = doc.child(startIndex);\n var endNode = doc.child(endIndex);\n // calculate the position corresponding to the line\n var from = startPosListPerLine[startIndex];\n var to = startPosListPerLine[endIndex];\n // calculate the position corresponding to the character offset of the line\n from += start[1] + getWidgetNodePos(startNode, start[1] - 1);\n to += end[1] + getWidgetNodePos(endNode, end[1] - 1);\n if (spec) {\n if (lineBackground) {\n var posInfo = { from: from, to: to, startIndex: startIndex, endIndex: endIndex };\n addLineBackground(tr, doc, paragraph, posInfo, spec.attrs);\n }\n else {\n tr.addMark(from, to, schema.mark(spec.type, spec.attrs));\n }\n }\n else {\n tr.removeMark(from, to);\n }\n });\n removeBlockBackground(tr, startPosListPerLine, paragraph);\n}\nfunction removeBlockBackground(tr, startPosListPerLine, paragraph) {\n Object.keys(removingBackgroundIndexMap).forEach(function (index) {\n var startIndex = Number(index);\n // get the end position of the current line with the next node start position.\n var endIndex = Math.min(Number(index) + 1, tr.doc.childCount - 1);\n var from = startPosListPerLine[startIndex];\n // subtract '1' for getting end position of the line\n var to = startPosListPerLine[endIndex] - 1;\n if (startIndex === endIndex) {\n to += 2;\n }\n tr.setBlockType(from, to, paragraph);\n });\n}\nfunction cacheIndexToRemoveBackground(doc, start, end) {\n var skipLines = [];\n removingBackgroundIndexMap = {};\n for (var i = start[0] - 1; i < end[0]; i += 1) {\n var node = doc.child(i);\n var codeEnd = node.attrs.codeEnd;\n var codeStart = node.attrs.codeStart;\n if (codeStart && codeEnd && !includes(skipLines, codeStart)) {\n skipLines.push(codeStart);\n codeEnd = Math.min(codeEnd, doc.childCount);\n // should subtract '1' to markdown line position\n // because markdown parser has '1'(not zero) as the start number\n var startIndex = codeStart - 1;\n var endIndex = end[0];\n for (var index = startIndex; index < endIndex; index += 1) {\n removingBackgroundIndexMap[index] = true;\n }\n }\n }\n}\nfunction getMarkForRemoving(_a, nodes) {\n var doc = _a.doc;\n var start = nodes[0].sourcepos[0];\n var _b = last$1(nodes).sourcepos, end = _b[1];\n var startPos = [start[0], start[1]];\n var endPos = [end[0], end[1] + 1];\n var marks = [];\n cacheIndexToRemoveBackground(doc, start, end);\n marks.push({ start: startPos, end: endPos });\n return marks;\n}\nfunction getMarkForAdding(node, toastMark) {\n var lineTexts = toastMark.getLineTexts();\n var startPos = [getMdStartLine(node), getMdStartCh(node)];\n var endPos = [getMdEndLine(node), getMdEndCh(node) + 1];\n var markInfo = getMarkInfo(node, startPos, endPos, lineTexts[endPos[0] - 1]);\n return markInfo !== null && markInfo !== void 0 ? markInfo : [];\n}\n\nvar defaultToolbarStateKeys = [\n 'taskList',\n 'orderedList',\n 'bulletList',\n 'table',\n 'strong',\n 'emph',\n 'strike',\n 'heading',\n 'thematicBreak',\n 'blockQuote',\n 'code',\n 'codeBlock',\n 'indent',\n 'outdent',\n];\nfunction getToolbarStateType$1(mdNode) {\n var type = mdNode.type;\n if (isListNode$1(mdNode)) {\n if (mdNode.listData.task) {\n return 'taskList';\n }\n return mdNode.listData.type === 'ordered' ? 'orderedList' : 'bulletList';\n }\n if (type.indexOf('table') !== -1) {\n return 'table';\n }\n if (!includes(defaultToolbarStateKeys, type)) {\n return null;\n }\n return type;\n}\nfunction getToolbarState$1(targetNode) {\n var toolbarState = {\n indent: { active: false, disabled: true },\n outdent: { active: false, disabled: true },\n };\n var listEnabled = true;\n traverseParentNodes(targetNode, function (mdNode) {\n var type = getToolbarStateType$1(mdNode);\n if (!type) {\n return;\n }\n if (type === 'bulletList' || type === 'orderedList') {\n // to apply the nearlist list state in the nested list\n if (listEnabled) {\n toolbarState[type] = { active: true };\n toolbarState.indent.disabled = false;\n toolbarState.outdent.disabled = false;\n listEnabled = false;\n }\n }\n else {\n toolbarState[type] = { active: true };\n }\n });\n return toolbarState;\n}\nfunction previewHighlight(_a) {\n var toastMark = _a.toastMark, eventEmitter = _a.eventEmitter;\n return new Plugin({\n view: function () {\n return {\n update: function (view, prevState) {\n var state = view.state;\n var doc = state.doc, selection = state.selection;\n if (prevState && prevState.doc.eq(doc) && prevState.selection.eq(selection)) {\n return;\n }\n var from = selection.from;\n var startChOffset = state.doc.resolve(from).start();\n var line = state.doc.content.findIndex(from).index + 1;\n var ch = from - startChOffset;\n if (from === startChOffset) {\n ch += 1;\n }\n var cursorPos = [line, ch];\n var mdNode = toastMark.findNodeAtPosition(cursorPos);\n var toolbarState = getToolbarState$1(mdNode);\n eventEmitter.emit('changeToolbarState', {\n cursorPos: cursorPos,\n mdNode: mdNode,\n toolbarState: toolbarState,\n });\n eventEmitter.emit('setFocusedNode', mdNode);\n },\n };\n },\n });\n}\n\nvar Doc$1 = /** @class */ (function (_super) {\n __extends$1(Doc, _super);\n function Doc() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Doc.prototype, \"name\", {\n get: function () {\n return 'doc';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Doc.prototype, \"schema\", {\n get: function () {\n return {\n content: 'block+',\n };\n },\n enumerable: false,\n configurable: true\n });\n return Doc;\n}(Node$2));\n\nvar Mark = /** @class */ (function () {\n function Mark() {\n }\n Object.defineProperty(Mark.prototype, \"type\", {\n get: function () {\n return 'mark';\n },\n enumerable: false,\n configurable: true\n });\n Mark.prototype.setContext = function (context) {\n this.context = context;\n };\n return Mark;\n}());\n\nfunction getTextByMdLine(doc, mdLine) {\n return getTextContent(doc, mdLine - 1);\n}\nfunction getTextContent(doc, index) {\n return doc.child(index).textContent;\n}\n\nvar reBlockQuote = /^\\s*> ?/;\nvar BlockQuote$1 = /** @class */ (function (_super) {\n __extends$1(BlockQuote, _super);\n function BlockQuote() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(BlockQuote.prototype, \"name\", {\n get: function () {\n return 'blockQuote';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BlockQuote.prototype, \"schema\", {\n get: function () {\n return {\n toDOM: function () {\n return ['span', { class: clsWithMdPrefix('block-quote') }, 0];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n BlockQuote.prototype.createBlockQuoteText = function (text, isBlockQuote) {\n return isBlockQuote ? text.replace(reBlockQuote, '').trim() : \"> \" + text.trim();\n };\n BlockQuote.prototype.extendBlockQuote = function () {\n var _this = this;\n return function (_a, dispatch) {\n var selection = _a.selection, doc = _a.doc, tr = _a.tr, schema = _a.schema;\n var _b = getRangeInfo(selection), endFromOffset = _b.endFromOffset, endToOffset = _b.endToOffset, endIndex = _b.endIndex, to = _b.to;\n var textContent = getTextContent(doc, endIndex);\n var isBlockQuote = reBlockQuote.test(textContent);\n if (isBlockQuote && to > endFromOffset && selection.empty) {\n var isEmpty = !textContent.replace(reBlockQuote, '').trim();\n if (isEmpty) {\n tr.deleteRange(endFromOffset, endToOffset).split(tr.mapping.map(endToOffset));\n }\n else {\n var slicedText = textContent.slice(to - endFromOffset).trim();\n var node = createTextNode$1(schema, _this.createBlockQuoteText(slicedText));\n splitAndExtendBlock(tr, endToOffset, slicedText, node);\n }\n dispatch(tr);\n return true;\n }\n return false;\n };\n };\n BlockQuote.prototype.commands = function () {\n var _this = this;\n return function () { return function (state, dispatch) {\n var selection = state.selection, doc = state.doc;\n var _a = getRangeInfo(selection), startFromOffset = _a.startFromOffset, endToOffset = _a.endToOffset, startIndex = _a.startIndex, endIndex = _a.endIndex;\n var isBlockQuote = reBlockQuote.test(getTextContent(doc, startIndex));\n var tr = replaceTextNode({\n state: state,\n startIndex: startIndex,\n endIndex: endIndex,\n from: startFromOffset,\n createText: function (textContent) { return _this.createBlockQuoteText(textContent, isBlockQuote); },\n });\n dispatch(tr.setSelection(createTextSelection(tr, tr.mapping.map(endToOffset))));\n return true;\n }; };\n };\n BlockQuote.prototype.keymaps = function () {\n var blockQuoteCommand = this.commands()();\n return {\n 'alt-q': blockQuoteCommand,\n 'alt-Q': blockQuoteCommand,\n Enter: this.extendBlockQuote(),\n };\n };\n return BlockQuote;\n}(Mark));\n\nvar reList = /(^\\s*)([-*+] |[\\d]+\\. )/;\nvar reOrderedList = /(^\\s*)([\\d])+\\.( \\[[ xX]])? /;\nvar reOrderedListGroup = /^(\\s*)((\\d+)([.)]\\s(?:\\[(?:x|\\s)\\]\\s)?))(.*)/;\nvar reCanBeTaskList = /(^\\s*)([-*+]|[\\d]+\\.)( \\[[ xX]])? /;\nvar reBulletListGroup = /^(\\s*)([-*+]+(\\s(?:\\[(?:x|\\s)\\]\\s)?))(.*)/;\nvar reTaskList = /(^\\s*)([-*+] |[\\d]+\\. )(\\[[ xX]] )/;\nvar reBulletTaskList = /(^\\s*)([-*+])( \\[[ xX]]) /;\nfunction getListType(text) {\n return reOrderedList.test(text) ? 'ordered' : 'bullet';\n}\nfunction getListDepth(mdNode) {\n var depth = 0;\n while (mdNode && mdNode.type !== 'document') {\n if (mdNode.type === 'list') {\n depth += 1;\n }\n mdNode = mdNode.parent;\n }\n return depth;\n}\nfunction findSameDepthList(toastMark, currentLine, depth, backward) {\n var lineTexts = toastMark.getLineTexts();\n var lineLen = lineTexts.length;\n var result = [];\n var line = currentLine;\n while (backward ? line < lineLen : line > 1) {\n line = backward ? line + 1 : line - 1;\n var mdNode = toastMark.findFirstNodeAtLine(line);\n var currentListDepth = getListDepth(mdNode);\n if (currentListDepth === depth) {\n result.push({ line: line, depth: depth, mdNode: mdNode });\n }\n else if (currentListDepth < depth) {\n break;\n }\n }\n return result;\n}\nfunction getSameDepthItems(_a) {\n var toastMark = _a.toastMark, mdNode = _a.mdNode, line = _a.line;\n var depth = getListDepth(mdNode);\n var forwardList = findSameDepthList(toastMark, line, depth, false).reverse();\n var backwardList = findSameDepthList(toastMark, line, depth, true);\n return forwardList.concat([{ line: line, depth: depth, mdNode: mdNode }]).concat(backwardList);\n}\nfunction textToBullet(text) {\n if (!reList.test(text)) {\n return \"* \" + text;\n }\n var type = getListType(text);\n if (type === 'bullet' && reCanBeTaskList.test(text)) {\n text = text.replace(reBulletTaskList, '$1$2 ');\n }\n else if (type === 'ordered') {\n text = text.replace(reOrderedList, '$1* ');\n }\n return text;\n}\nfunction textToOrdered(text, ordinalNum) {\n if (!reList.test(text)) {\n return ordinalNum + \". \" + text;\n }\n var type = getListType(text);\n if (type === 'bullet' || (type === 'ordered' && reCanBeTaskList.test(text))) {\n text = text.replace(reCanBeTaskList, \"$1\" + ordinalNum + \". \");\n }\n else if (type === 'ordered') {\n // eslint-disable-next-line prefer-destructuring\n var start = reOrderedListGroup.exec(text)[3];\n if (Number(start) !== ordinalNum) {\n text = text.replace(reOrderedList, \"$1\" + ordinalNum + \". \");\n }\n }\n return text;\n}\nfunction getChangedInfo(doc, sameDepthItems, type, start) {\n if (start === void 0) { start = 0; }\n var firstIndex = Number.MAX_VALUE;\n var lastIndex = 0;\n var changedResults = sameDepthItems.map(function (_a, index) {\n var line = _a.line;\n firstIndex = Math.min(line - 1, firstIndex);\n lastIndex = Math.max(line - 1, lastIndex);\n var text = getTextByMdLine(doc, line);\n text = type === 'bullet' ? textToBullet(text) : textToOrdered(text, index + 1 + start);\n return { text: text, line: line };\n });\n return { changedResults: changedResults, firstIndex: firstIndex, lastIndex: lastIndex };\n}\nfunction getBulletOrOrdered(type, context) {\n var sameDepthListInfo = getSameDepthItems(context);\n return getChangedInfo(context.doc, sameDepthListInfo, type);\n}\nvar otherListToList = {\n bullet: function (context) {\n return getBulletOrOrdered('bullet', context);\n },\n ordered: function (context) {\n return getBulletOrOrdered('ordered', context);\n },\n task: function (_a) {\n var mdNode = _a.mdNode, doc = _a.doc, line = _a.line;\n var text = getTextByMdLine(doc, line);\n if (mdNode.listData.task) {\n text = text.replace(reTaskList, '$1$2');\n }\n else if (isListNode$1(mdNode)) {\n text = text.replace(reList, '$1$2[ ] ');\n }\n return { changedResults: [{ text: text, line: line }] };\n },\n};\nvar otherNodeToList = {\n bullet: function (_a) {\n var doc = _a.doc, line = _a.line;\n var lineText = getTextByMdLine(doc, line);\n var changedResults = [{ text: \"* \" + lineText, line: line }];\n return { changedResults: changedResults };\n },\n ordered: function (_a) {\n var toastMark = _a.toastMark, doc = _a.doc, line = _a.line, startLine = _a.startLine;\n var lineText = getTextByMdLine(doc, line);\n var firstOrderedListNum = 1;\n var firstOrderedListLine = startLine;\n var skipped = 0;\n for (var i = startLine - 1; i > 0; i -= 1) {\n var mdNode = toastMark.findFirstNodeAtLine(i);\n var text = getTextByMdLine(doc, i);\n var canBeListNode = text && !!findClosestNode(mdNode, function (targetNode) { return isListNode$1(targetNode); });\n var searchResult = reOrderedListGroup.exec(getTextByMdLine(doc, i));\n if (!searchResult && !canBeListNode) {\n break;\n }\n if (!searchResult && canBeListNode) {\n skipped += 1;\n continue;\n }\n var _b = searchResult, indent = _b[1], start = _b[3];\n // basis on one depth list\n if (!indent) {\n firstOrderedListNum = Number(start);\n firstOrderedListLine = i;\n break;\n }\n }\n var ordinalNum = firstOrderedListNum + line - firstOrderedListLine - skipped;\n var changedResults = [{ text: ordinalNum + \". \" + lineText, line: line }];\n return { changedResults: changedResults };\n },\n task: function (_a) {\n var doc = _a.doc, line = _a.line;\n var lineText = getTextByMdLine(doc, line);\n var changedResults = [{ text: \"* [ ] \" + lineText, line: line }];\n return { changedResults: changedResults };\n },\n};\nvar extendList = {\n bullet: function (_a) {\n var line = _a.line, doc = _a.doc;\n var lineText = getTextByMdLine(doc, line);\n var _b = reBulletListGroup.exec(lineText), indent = _b[1], delimiter = _b[2];\n return { listSyntax: \"\" + indent + delimiter };\n },\n ordered: function (_a) {\n var toastMark = _a.toastMark, line = _a.line, mdNode = _a.mdNode, doc = _a.doc;\n var depth = getListDepth(mdNode);\n var lineText = getTextByMdLine(doc, line);\n var _b = reOrderedListGroup.exec(lineText), indent = _b[1], start = _b[3], delimiter = _b[4];\n var ordinalNum = Number(start) + 1;\n var listSyntax = \"\" + indent + ordinalNum + delimiter;\n var backwardList = findSameDepthList(toastMark, line, depth, true);\n var filteredList = backwardList.filter(function (info) {\n var searchResult = reOrderedListGroup.exec(getTextByMdLine(doc, info.line));\n return (searchResult &&\n searchResult[1].length === indent.length &&\n !!findClosestNode(info.mdNode, function (targetNode) { return isOrderedListNode(targetNode); }));\n });\n return __assign$1({ listSyntax: listSyntax }, getChangedInfo(doc, filteredList, 'ordered', ordinalNum));\n },\n};\nfunction getReorderedListInfo(doc, schema, line, ordinalNum, prevIndentLength) {\n var nodes = [];\n var lineText = getTextByMdLine(doc, line);\n var searchResult = reOrderedListGroup.exec(lineText);\n while (searchResult) {\n var indent = searchResult[1], delimiter = searchResult[4], text = searchResult[5];\n var indentLength = indent.length;\n if (indentLength === prevIndentLength) {\n nodes.push(createTextNode$1(schema, \"\" + indent + ordinalNum + delimiter + text));\n ordinalNum += 1;\n line += 1;\n }\n else if (indentLength > prevIndentLength) {\n var nestedListInfo = getReorderedListInfo(doc, schema, line, 1, indentLength);\n line = nestedListInfo.line;\n nodes = nodes.concat(nestedListInfo.nodes);\n }\n if (indentLength < prevIndentLength || line > doc.childCount) {\n break;\n }\n lineText = getTextByMdLine(doc, line);\n searchResult = reOrderedListGroup.exec(lineText);\n }\n return { nodes: nodes, line: line };\n}\n\nvar reStartSpace = /(^\\s{1,4})(.*)/;\nfunction isBlockUnit(from, to, text) {\n return from < to || reList.test(text) || reBlockQuote.test(text);\n}\nfunction isInTableCellNode(doc, schema, selection) {\n var $pos = selection.$from;\n if ($pos.depth === 0) {\n $pos = doc.resolve($pos.pos - 1);\n }\n var node = $pos.node(1);\n var startOffset = $pos.start(1);\n var contentSize = node.content.size;\n return (node.rangeHasMark(0, contentSize, schema.marks.table) &&\n $pos.pos - startOffset !== contentSize &&\n $pos.pos !== startOffset);\n}\nfunction createSelection(tr, posInfo) {\n var from = posInfo.from, to = posInfo.to;\n if (posInfo.type === 'indent') {\n var softTabLen = 4;\n from += softTabLen;\n to += (posInfo.lineLen + 1) * softTabLen;\n }\n else {\n var spaceLenList = posInfo.spaceLenList;\n from -= spaceLenList[0];\n for (var i = 0; i < spaceLenList.length; i += 1) {\n to -= spaceLenList[i];\n }\n }\n return createTextSelection(tr, from, to);\n}\nvar Paragraph$1 = /** @class */ (function (_super) {\n __extends$1(Paragraph, _super);\n function Paragraph() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Paragraph.prototype, \"name\", {\n get: function () {\n return 'paragraph';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Paragraph.prototype, \"schema\", {\n get: function () {\n return {\n content: 'inline*',\n attrs: {\n className: { default: null },\n codeStart: { default: null },\n codeEnd: { default: null },\n },\n selectable: false,\n group: 'block',\n parseDOM: [{ tag: 'div' }],\n toDOM: function (_a) {\n var attrs = _a.attrs;\n return attrs.className\n ? ['div', { class: clsWithMdPrefix(attrs.className) }, 0]\n : ['div', 0];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n Paragraph.prototype.reorderList = function (startLine, endLine) {\n var _a = this.context, view = _a.view, toastMark = _a.toastMark, schema = _a.schema;\n var _b = view.state, tr = _b.tr, selection = _b.selection, doc = _b.doc;\n var mdNode = toastMark.findFirstNodeAtLine(startLine);\n var topListNode = mdNode;\n while (mdNode && !isBulletListNode(mdNode) && mdNode.parent.type !== 'document') {\n mdNode = mdNode.parent;\n if (isOrderedListNode(mdNode)) {\n topListNode = mdNode;\n break;\n }\n }\n if (topListNode) {\n startLine = topListNode.sourcepos[0][0];\n }\n var _c = reOrderedListGroup.exec(getTextByMdLine(doc, startLine)), indent = _c[1], start = _c[3];\n var indentLen = indent.length;\n var _d = getReorderedListInfo(doc, schema, startLine, Number(start), indentLen), line = _d.line, nodes = _d.nodes;\n endLine = Math.max(endLine, line - 1);\n var startOffset = getNodeContentOffsetRange(doc, startLine - 1).startOffset;\n for (var i = startLine - 1; i <= endLine - 1; i += 1) {\n var _e = doc.child(i), nodeSize = _e.nodeSize, content = _e.content;\n var mappedFrom = tr.mapping.map(startOffset);\n var mappedTo = mappedFrom + content.size;\n tr.replaceWith(mappedFrom, mappedTo, nodes[i - startLine + 1]);\n startOffset += nodeSize;\n }\n var newSelection = createTextSelection(tr, selection.from, selection.to);\n view.dispatch(tr.setSelection(newSelection));\n };\n Paragraph.prototype.indent = function (tabKey) {\n var _this = this;\n if (tabKey === void 0) { tabKey = false; }\n return function () { return function (state, dispatch) {\n var schema = state.schema, selection = state.selection, doc = state.doc;\n var _a = getRangeInfo(selection), from = _a.from, to = _a.to, startFromOffset = _a.startFromOffset, startIndex = _a.startIndex, endIndex = _a.endIndex;\n if (tabKey && isInTableCellNode(doc, schema, selection)) {\n return false;\n }\n var startLineText = getTextContent(doc, startIndex);\n if ((tabKey && isBlockUnit(from, to, startLineText)) ||\n (!tabKey && reList.test(startLineText))) {\n var tr = replaceTextNode({\n state: state,\n from: startFromOffset,\n startIndex: startIndex,\n endIndex: endIndex,\n createText: function (textContent) { return \" \" + textContent; },\n });\n var posInfo = {\n type: 'indent',\n from: from,\n to: to,\n lineLen: endIndex - startIndex,\n };\n dispatch(tr.setSelection(createSelection(tr, posInfo)));\n if (reOrderedListGroup.test(startLineText)) {\n _this.reorderList(startIndex + 1, endIndex + 1);\n }\n }\n else if (tabKey) {\n dispatch(state.tr.insert(to, createTextNode$1(schema, ' ')));\n }\n return true;\n }; };\n };\n Paragraph.prototype.outdent = function (tabKey) {\n var _this = this;\n if (tabKey === void 0) { tabKey = false; }\n return function () { return function (state, dispatch) {\n var selection = state.selection, doc = state.doc, schema = state.schema;\n var _a = getRangeInfo(selection), from = _a.from, to = _a.to, startFromOffset = _a.startFromOffset, startIndex = _a.startIndex, endIndex = _a.endIndex;\n if (tabKey && isInTableCellNode(doc, schema, selection)) {\n return false;\n }\n var startLineText = getTextContent(doc, startIndex);\n if ((tabKey && isBlockUnit(from, to, startLineText)) ||\n (!tabKey && reList.test(startLineText))) {\n var spaceLenList_1 = [];\n var tr = replaceTextNode({\n state: state,\n from: startFromOffset,\n startIndex: startIndex,\n endIndex: endIndex,\n createText: function (textContent) {\n var searchResult = reStartSpace.exec(textContent);\n spaceLenList_1.push(searchResult ? searchResult[1].length : 0);\n return textContent.replace(reStartSpace, '$2');\n },\n });\n var posInfo = { type: 'outdent', from: from, to: to, spaceLenList: spaceLenList_1 };\n dispatch(tr.setSelection(createSelection(tr, posInfo)));\n if (reOrderedListGroup.test(startLineText)) {\n _this.reorderList(startIndex + 1, endIndex + 1);\n }\n }\n else if (tabKey) {\n var startText = startLineText.slice(0, to - startFromOffset);\n var startTextWithoutSpace = startText.replace(/\\s{1,4}$/, '');\n var deletStart = to - (startText.length - startTextWithoutSpace.length);\n dispatch(state.tr.delete(deletStart, to));\n }\n return true;\n }; };\n };\n Paragraph.prototype.deleteLines = function () {\n var _this = this;\n return function (state, dispatch) {\n var view = _this.context.view;\n var _a = getRangeInfo(state.selection), startFromOffset = _a.startFromOffset, endToOffset = _a.endToOffset;\n var deleteRange = function () {\n dispatch(state.tr.deleteRange(startFromOffset, endToOffset));\n return true;\n };\n return chainCommands(deleteRange, joinForward)(state, dispatch, view);\n };\n };\n Paragraph.prototype.moveDown = function () {\n return function (state, dispatch) {\n var doc = state.doc, tr = state.tr, selection = state.selection, schema = state.schema;\n var _a = getRangeInfo(selection), startFromOffset = _a.startFromOffset, endToOffset = _a.endToOffset, endIndex = _a.endIndex;\n if (endIndex < doc.content.childCount - 1) {\n var _b = doc.child(endIndex + 1), nodeSize = _b.nodeSize, textContent = _b.textContent;\n tr.delete(endToOffset, endToOffset + nodeSize)\n .split(startFromOffset)\n // subtract 2(start, end tag length) to insert prev line\n .insert(tr.mapping.map(startFromOffset) - 2, createTextNode$1(schema, textContent));\n dispatch(tr);\n return true;\n }\n return false;\n };\n };\n Paragraph.prototype.moveUp = function () {\n return function (state, dispatch) {\n var tr = state.tr, doc = state.doc, selection = state.selection, schema = state.schema;\n var _a = getRangeInfo(selection), startFromOffset = _a.startFromOffset, endToOffset = _a.endToOffset, startIndex = _a.startIndex;\n if (startIndex > 0) {\n var _b = doc.child(startIndex - 1), nodeSize = _b.nodeSize, textContent = _b.textContent;\n tr.delete(startFromOffset - nodeSize, startFromOffset)\n .split(tr.mapping.map(endToOffset))\n .insert(tr.mapping.map(endToOffset), createTextNode$1(schema, textContent));\n dispatch(tr);\n return true;\n }\n return false;\n };\n };\n Paragraph.prototype.commands = function () {\n return {\n indent: this.indent(),\n outdent: this.outdent(),\n };\n };\n Paragraph.prototype.keymaps = function () {\n return {\n Tab: this.indent(true)(),\n 'Shift-Tab': this.outdent(true)(),\n 'Mod-d': this.deleteLines(),\n 'Mod-D': this.deleteLines(),\n 'Alt-ArrowUp': this.moveUp(),\n 'Alt-ArrowDown': this.moveDown(),\n };\n };\n return Paragraph;\n}(Node$2));\n\nvar Text$1 = /** @class */ (function (_super) {\n __extends$1(Text, _super);\n function Text() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Text.prototype, \"name\", {\n get: function () {\n return 'text';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Text.prototype, \"schema\", {\n get: function () {\n return {\n group: 'inline',\n };\n },\n enumerable: false,\n configurable: true\n });\n return Text;\n}(Node$2));\n\nvar reHeading = /^#{1,6}\\s/;\nvar Heading$1 = /** @class */ (function (_super) {\n __extends$1(Heading, _super);\n function Heading() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Heading.prototype, \"name\", {\n get: function () {\n return 'heading';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Heading.prototype, \"schema\", {\n get: function () {\n return {\n attrs: {\n level: { default: 1 },\n seText: { default: false },\n },\n toDOM: function (_a) {\n var attrs = _a.attrs;\n var level = attrs.level, seText = attrs.seText;\n var classNames = \"heading|heading\" + level;\n if (seText) {\n classNames += '|delimiter|setext';\n }\n return ['span', { class: clsWithMdPrefix.apply(void 0, classNames.split('|')) }, 0];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n Heading.prototype.createHeadingText = function (level, text, curHeadingSyntax) {\n var textContent = text.replace(curHeadingSyntax, '').trim();\n var headingText = '';\n while (level > 0) {\n headingText += '#';\n level -= 1;\n }\n return headingText + \" \" + textContent;\n };\n Heading.prototype.commands = function () {\n var _this = this;\n return function (payload) { return function (state, dispatch) {\n var level = payload.level;\n var _a = getRangeInfo(state.selection), startFromOffset = _a.startFromOffset, endToOffset = _a.endToOffset, startIndex = _a.startIndex, endIndex = _a.endIndex;\n var tr = replaceTextNode({\n state: state,\n from: startFromOffset,\n startIndex: startIndex,\n endIndex: endIndex,\n createText: function (textContent) {\n var matchedHeading = textContent.match(reHeading);\n var curHeadingSyntax = matchedHeading ? matchedHeading[0] : '';\n return _this.createHeadingText(level, textContent, curHeadingSyntax);\n },\n });\n dispatch(tr.setSelection(createTextSelection(tr, tr.mapping.map(endToOffset))));\n return true;\n }; };\n };\n return Heading;\n}(Mark));\n\nvar fencedCodeBlockSyntax = '```';\nvar CodeBlock$1 = /** @class */ (function (_super) {\n __extends$1(CodeBlock, _super);\n function CodeBlock() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(CodeBlock.prototype, \"name\", {\n get: function () {\n return 'codeBlock';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CodeBlock.prototype, \"schema\", {\n get: function () {\n return {\n toDOM: function () {\n return ['span', { class: clsWithMdPrefix('code-block') }, 0];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n CodeBlock.prototype.commands = function () {\n return function () { return function (state, dispatch) {\n var selection = state.selection, schema = state.schema, tr = state.tr;\n var _a = getRangeInfo(selection), startFromOffset = _a.startFromOffset, endToOffset = _a.endToOffset;\n var fencedNode = createTextNode$1(schema, fencedCodeBlockSyntax);\n // add fenced start block\n tr.insert(startFromOffset, fencedNode).split(startFromOffset + fencedCodeBlockSyntax.length);\n // add fenced end block\n tr.split(tr.mapping.map(endToOffset)).insert(tr.mapping.map(endToOffset), fencedNode);\n dispatch(tr.setSelection(\n // subtract fenced syntax length and open, close tag(2)\n createTextSelection(tr, tr.mapping.map(endToOffset) - (fencedCodeBlockSyntax.length + 2))));\n return true;\n }; };\n };\n CodeBlock.prototype.keepIndentation = function () {\n var _this = this;\n return function (_a, dispatch) {\n var selection = _a.selection, tr = _a.tr, doc = _a.doc, schema = _a.schema;\n var toastMark = _this.context.toastMark;\n var _b = getRangeInfo(selection), startFromOffset = _b.startFromOffset, endToOffset = _b.endToOffset, endIndex = _b.endIndex, from = _b.from, to = _b.to;\n var textContent = getTextContent(doc, endIndex);\n if (from === to && textContent.trim()) {\n var matched = textContent.match(/^\\s+/);\n var mdNode = toastMark.findFirstNodeAtLine(endIndex + 1);\n if (isCodeBlockNode(mdNode) && matched) {\n var spaces = matched[0];\n var slicedText = textContent.slice(to - startFromOffset);\n var node = createTextNode$1(schema, spaces + slicedText);\n splitAndExtendBlock(tr, endToOffset, slicedText, node);\n dispatch(tr);\n return true;\n }\n }\n return false;\n };\n };\n CodeBlock.prototype.keymaps = function () {\n var codeBlockCommand = this.commands()();\n return {\n 'Shift-Mod-p': codeBlockCommand,\n 'Shift-Mod-P': codeBlockCommand,\n Enter: this.keepIndentation(),\n };\n };\n return CodeBlock;\n}(Mark));\n\nvar reEmptyTable = /\\||\\s/g;\nfunction createTableHeader(columnCount) {\n return [createTableRow(columnCount), createTableRow(columnCount, true)];\n}\nfunction createTableBody$1(columnCount, rowCount) {\n var bodyRows = [];\n for (var i = 0; i < rowCount; i += 1) {\n bodyRows.push(createTableRow(columnCount));\n }\n return bodyRows;\n}\nfunction createTableRow(columnCount, delim) {\n var row = '|';\n for (var i = 0; i < columnCount; i += 1) {\n row += delim ? ' --- |' : ' |';\n }\n return row;\n}\nfunction createTargetTypes(moveNext) {\n return moveNext\n ? { type: 'next', parentType: 'tableHead', childType: 'firstChild' }\n : { type: 'prev', parentType: 'tableBody', childType: 'lastChild' };\n}\nvar Table$1 = /** @class */ (function (_super) {\n __extends$1(Table, _super);\n function Table() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Table.prototype, \"name\", {\n get: function () {\n return 'table';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Table.prototype, \"schema\", {\n get: function () {\n return {\n toDOM: function () {\n return ['span', { class: clsWithMdPrefix('table') }, 0];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n Table.prototype.extendTable = function () {\n var _this = this;\n return function (_a, dispatch) {\n var selection = _a.selection, doc = _a.doc, tr = _a.tr, schema = _a.schema;\n if (!selection.empty) {\n return false;\n }\n var _b = getRangeInfo(selection), endFromOffset = _b.endFromOffset, endToOffset = _b.endToOffset, endIndex = _b.endIndex, to = _b.to;\n var textContent = getTextContent(doc, endIndex);\n // should add `1` to line for the markdown parser\n // because markdown parser has `1`(not zero) as the start number\n var mdPos = [endIndex + 1, to - endFromOffset + 1];\n var mdNode = _this.context.toastMark.findNodeAtPosition(mdPos);\n var cellNode = findClosestNode(mdNode, function (node) {\n return isTableCellNode(node) &&\n (node.parent.type === 'tableDelimRow' || node.parent.parent.type === 'tableBody');\n });\n if (cellNode) {\n var isEmpty = !textContent.replace(reEmptyTable, '').trim();\n var parent_1 = cellNode.parent;\n var columnCount = parent_1.parent.parent.columns.length;\n var row = createTableRow(columnCount);\n if (isEmpty) {\n tr.deleteRange(endFromOffset, endToOffset).split(tr.mapping.map(endToOffset));\n }\n else {\n tr\n .split(endToOffset)\n .insert(tr.mapping.map(endToOffset), createTextNode$1(schema, row))\n // should subtract `2` to selection end position considering ` |` text\n .setSelection(createTextSelection(tr, tr.mapping.map(endToOffset) - 2));\n }\n dispatch(tr);\n return true;\n }\n return false;\n };\n };\n Table.prototype.moveTableCell = function (moveNext) {\n var _this = this;\n return function (_a, dispatch) {\n var selection = _a.selection, tr = _a.tr;\n var _b = getRangeInfo(selection), endFromOffset = _b.endFromOffset, endIndex = _b.endIndex, to = _b.to;\n var mdPos = [endIndex + 1, to - endFromOffset];\n var mdNode = _this.context.toastMark.findNodeAtPosition(mdPos);\n var cellNode = findClosestNode(mdNode, function (node) { return isTableCellNode(node); });\n if (cellNode) {\n var parent_2 = cellNode.parent;\n var _c = createTargetTypes(moveNext), type = _c.type, parentType = _c.parentType, childType = _c.childType;\n var chOffset = getMdEndCh(cellNode);\n if (cellNode[type]) {\n chOffset = getMdEndCh(cellNode[type]) - 1;\n }\n else {\n var row = !parent_2[type] && parent_2.parent.type === parentType\n ? parent_2.parent[type][childType]\n : parent_2[type];\n if (type === 'next') {\n // if there is next row, the base offset would be end position of the next row's first child.\n // Otherwise, the base offset is zero.\n var baseOffset = row ? getMdEndCh(row[childType]) : 0;\n // calculate tag(open, close) position('2') for selection\n chOffset += baseOffset + 2;\n }\n else if (type === 'prev') {\n // if there is prev row, the target position would be '-4' for calculating ' |' characters and tag(open, close)\n // Otherwise, the target position is zero.\n chOffset = row ? -4 : 0;\n }\n }\n dispatch(tr.setSelection(createTextSelection(tr, endFromOffset + chOffset)));\n return true;\n }\n return false;\n };\n };\n Table.prototype.addTable = function () {\n return function (payload) { return function (_a, dispatch) {\n var selection = _a.selection, tr = _a.tr, schema = _a.schema;\n var _b = payload, columnCount = _b.columnCount, rowCount = _b.rowCount;\n var endToOffset = getRangeInfo(selection).endToOffset;\n var headerRows = createTableHeader(columnCount);\n var bodyRows = createTableBody$1(columnCount, rowCount - 1);\n var rows = __spreadArray$1(__spreadArray$1([], headerRows), bodyRows);\n rows.forEach(function (row) {\n tr.split(tr.mapping.map(endToOffset)).insert(tr.mapping.map(endToOffset), createTextNode$1(schema, row));\n });\n // should add `4` to selection position considering `| ` text and start block tag length\n dispatch(tr.setSelection(createTextSelection(tr, endToOffset + 4)));\n return true;\n }; };\n };\n Table.prototype.commands = function () {\n return { addTable: this.addTable() };\n };\n Table.prototype.keymaps = function () {\n return {\n Enter: this.extendTable(),\n Tab: this.moveTableCell(true),\n 'Shift-Tab': this.moveTableCell(false),\n };\n };\n return Table;\n}(Mark));\n\nvar thematicBreakSyntax = '***';\nvar ThematicBreak$1 = /** @class */ (function (_super) {\n __extends$1(ThematicBreak, _super);\n function ThematicBreak() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(ThematicBreak.prototype, \"name\", {\n get: function () {\n return 'thematicBreak';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ThematicBreak.prototype, \"schema\", {\n get: function () {\n return {\n toDOM: function () {\n return ['span', { class: clsWithMdPrefix('thematic-break') }, 0];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n ThematicBreak.prototype.hr = function () {\n return function () { return function (state, dispatch) {\n var selection = state.selection, schema = state.schema, tr = state.tr;\n var _a = getRangeInfo(selection), from = _a.from, to = _a.to, endToOffset = _a.endToOffset;\n var node = createTextNode$1(schema, thematicBreakSyntax);\n tr\n .split(from)\n .replaceWith(tr.mapping.map(from), tr.mapping.map(to), node)\n .split(tr.mapping.map(to)).setSelection(createTextSelection(tr, tr.mapping.map(endToOffset)));\n dispatch(tr);\n return true;\n }; };\n };\n ThematicBreak.prototype.commands = function () {\n return { hr: this.hr() };\n };\n ThematicBreak.prototype.keymaps = function () {\n var lineCommand = this.hr()();\n return { 'Mod-l': lineCommand, 'Mod-L': lineCommand };\n };\n return ThematicBreak;\n}(Mark));\n\nfunction cannotBeListNode(_a, line) {\n var type = _a.type, sourcepos = _a.sourcepos;\n // eslint-disable-next-line prefer-destructuring\n var startLine = sourcepos[0][0];\n return line <= startLine && (type === 'codeBlock' || type === 'heading' || type.match('table'));\n}\nvar ListItem$1 = /** @class */ (function (_super) {\n __extends$1(ListItem, _super);\n function ListItem() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(ListItem.prototype, \"name\", {\n get: function () {\n return 'listItem';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ListItem.prototype, \"schema\", {\n get: function () {\n return {\n attrs: {\n odd: { default: false },\n even: { default: false },\n listStyle: { default: false },\n },\n toDOM: function (_a) {\n var attrs = _a.attrs;\n var odd = attrs.odd, even = attrs.even, listStyle = attrs.listStyle;\n var classNames = 'list-item';\n if (listStyle) {\n classNames += '|list-item-style';\n }\n if (odd) {\n classNames += '|list-item-odd';\n }\n if (even) {\n classNames += '|list-item-even';\n }\n return ['span', { class: clsWithMdPrefix.apply(void 0, classNames.split('|')) }, 0];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n ListItem.prototype.extendList = function () {\n var _this = this;\n return function (_a, dispatch) {\n var selection = _a.selection, doc = _a.doc, schema = _a.schema, tr = _a.tr;\n var toastMark = _this.context.toastMark;\n var _b = getRangeInfo(selection), to = _b.to, startFromOffset = _b.startFromOffset, endFromOffset = _b.endFromOffset, endIndex = _b.endIndex, endToOffset = _b.endToOffset;\n var textContent = getTextContent(doc, endIndex);\n var isList = reList.test(textContent);\n if (!isList || selection.from === startFromOffset || !selection.empty) {\n return false;\n }\n var isEmpty = !textContent.replace(reCanBeTaskList, '').trim();\n if (isEmpty) {\n tr.deleteRange(endFromOffset, endToOffset).split(tr.mapping.map(endToOffset));\n }\n else {\n var commandType = getListType(textContent);\n // should add `1` to line for the markdown parser\n // because markdown parser has `1`(not zero) as the start number\n var mdNode = toastMark.findFirstNodeAtLine(endIndex + 1);\n var slicedText = textContent.slice(to - endFromOffset);\n var context = { toastMark: toastMark, mdNode: mdNode, doc: doc, line: endIndex + 1 };\n var _c = extendList[commandType](context), listSyntax = _c.listSyntax, changedResults = _c.changedResults;\n // change ordinal number of backward ordered list\n if (changedResults === null || changedResults === void 0 ? void 0 : changedResults.length) {\n // split the block\n tr.split(to);\n // set first ordered list info\n changedResults.unshift({ text: listSyntax + slicedText, line: endIndex + 1 });\n _this.changeToListPerLine(tr, changedResults, {\n from: to,\n // don't subtract 1 because the line has increased through 'split' command.\n startLine: changedResults[0].line,\n endLine: last$1(changedResults).line,\n });\n var pos = tr.mapping.map(endToOffset) - slicedText.length;\n tr.setSelection(createTextSelection(tr, pos));\n }\n else {\n var node = createTextNode$1(schema, listSyntax + slicedText);\n splitAndExtendBlock(tr, endToOffset, slicedText, node);\n }\n }\n dispatch(tr);\n return true;\n };\n };\n ListItem.prototype.toList = function (commandType) {\n var _this = this;\n return function () { return function (_a, dispatch) {\n var doc = _a.doc, tr = _a.tr, selection = _a.selection;\n var toastMark = _this.context.toastMark;\n var rangeInfo = getRangeInfo(selection);\n // should add `1` to line for the markdown parser\n // because markdown parser has `1`(not zero) as the start number\n var startLine = rangeInfo.startIndex + 1;\n var endLine = rangeInfo.endIndex + 1;\n var endToOffset = rangeInfo.endToOffset;\n var skipLines = [];\n for (var line = startLine; line <= endLine; line += 1) {\n var mdNode = toastMark.findFirstNodeAtLine(line);\n if (mdNode && cannotBeListNode(mdNode, line)) {\n break;\n }\n // to skip unnecessary processing\n if (skipLines.indexOf(line) !== -1) {\n continue;\n }\n var context = { toastMark: toastMark, mdNode: mdNode, doc: doc, line: line, startLine: startLine };\n var changedResults = (isListNode$1(mdNode)\n ? otherListToList[commandType](context)\n : otherNodeToList[commandType](context)).changedResults;\n var endOffset = _this.changeToListPerLine(tr, changedResults, {\n from: getNodeContentOffsetRange(doc, changedResults[0].line - 1).startOffset,\n startLine: changedResults[0].line,\n endLine: last$1(changedResults).line,\n indexDiff: 1,\n });\n endToOffset = Math.max(endOffset, endToOffset);\n if (changedResults) {\n skipLines = skipLines.concat(changedResults.map(function (info) { return info.line; }));\n }\n }\n dispatch(tr.setSelection(createTextSelection(tr, tr.mapping.map(endToOffset))));\n return true;\n }; };\n };\n ListItem.prototype.changeToListPerLine = function (tr, changedResults, _a) {\n var from = _a.from, startLine = _a.startLine, endLine = _a.endLine, _b = _a.indexDiff, indexDiff = _b === void 0 ? 0 : _b;\n var maxEndOffset = 0;\n var _loop_1 = function (i) {\n var _c = tr.doc.child(i), nodeSize = _c.nodeSize, content = _c.content;\n var mappedFrom = tr.mapping.map(from);\n var mappedTo = mappedFrom + content.size;\n var changedResult = changedResults.filter(function (result) { return result.line - indexDiff === i; })[0];\n if (changedResult) {\n tr.replaceWith(mappedFrom, mappedTo, createTextNode$1(this_1.context.schema, changedResult.text));\n maxEndOffset = Math.max(maxEndOffset, from + content.size);\n }\n from += nodeSize;\n };\n var this_1 = this;\n for (var i = startLine - indexDiff; i <= endLine - indexDiff; i += 1) {\n _loop_1(i);\n }\n return maxEndOffset;\n };\n ListItem.prototype.toggleTask = function () {\n var _this = this;\n return function (_a, dispatch) {\n var selection = _a.selection, tr = _a.tr, doc = _a.doc, schema = _a.schema;\n var toastMark = _this.context.toastMark;\n var _b = getRangeInfo(selection), startIndex = _b.startIndex, endIndex = _b.endIndex;\n var newTr = null;\n for (var i = startIndex; i <= endIndex; i += 1) {\n var mdNode = toastMark.findFirstNodeAtLine(i + 1);\n if (isListNode$1(mdNode) && mdNode.listData.task) {\n var _c = mdNode.listData, checked = _c.checked, padding = _c.padding;\n var stateChar = checked ? ' ' : 'x';\n var mdPos = mdNode.sourcepos[0];\n var startOffset = getNodeContentOffsetRange(doc, mdPos[0] - 1).startOffset;\n startOffset += mdPos[1] + padding;\n newTr = tr.replaceWith(startOffset, startOffset + 1, schema.text(stateChar));\n }\n }\n if (newTr) {\n dispatch(newTr);\n return true;\n }\n return false;\n };\n };\n ListItem.prototype.commands = function () {\n return {\n bulletList: this.toList('bullet'),\n orderedList: this.toList('ordered'),\n taskList: this.toList('task'),\n };\n };\n ListItem.prototype.keymaps = function () {\n var bulletCommand = this.toList('bullet')();\n var orderedCommand = this.toList('ordered')();\n var taskCommand = this.toList('task')();\n var togleTaskCommand = this.toggleTask();\n return {\n 'Mod-u': bulletCommand,\n 'Mod-U': bulletCommand,\n 'Mod-o': orderedCommand,\n 'Mod-O': orderedCommand,\n 'alt-t': taskCommand,\n 'alt-T': taskCommand,\n 'Shift-Ctrl-x': togleTaskCommand,\n 'Shift-Ctrl-X': togleTaskCommand,\n Enter: this.extendList(),\n };\n };\n return ListItem;\n}(Mark));\n\nfunction toggleMark(condition, syntax) {\n return function () { return function (_a, dispatch) {\n var tr = _a.tr, selection = _a.selection;\n var conditionFn = !isFunction_1(condition)\n ? function (text) { return condition.test(text); }\n : condition;\n var syntaxLen = syntax.length;\n var doc = tr.doc;\n var _b = resolveSelectionPos(selection), from = _b[0], to = _b[1];\n var prevPos = Math.max(from - syntaxLen, 1);\n var nextPos = Math.min(to + syntaxLen, doc.content.size - 1);\n var slice = selection.content();\n var textContent = slice.content.textBetween(0, slice.content.size, '\\n');\n var prevText = doc.textBetween(prevPos, from, '\\n');\n var nextText = doc.textBetween(to, nextPos, '\\n');\n textContent = \"\" + prevText + textContent + nextText;\n if (prevText && nextText && conditionFn(textContent)) {\n tr.delete(nextPos - syntaxLen, nextPos).delete(prevPos, prevPos + syntaxLen);\n }\n else {\n tr.insertText(syntax, to).insertText(syntax, from);\n var newSelection = selection.empty\n ? createTextSelection(tr, from + syntaxLen)\n : createTextSelection(tr, from + syntaxLen, to + syntaxLen);\n tr.setSelection(newSelection);\n }\n dispatch(tr);\n return true;\n }; };\n}\n\nvar reStrong = /^(\\*{2}|_{2}).*([\\s\\S]*)\\1$/m;\nvar strongSyntax = '**';\nvar Strong$1 = /** @class */ (function (_super) {\n __extends$1(Strong, _super);\n function Strong() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Strong.prototype, \"name\", {\n get: function () {\n return 'strong';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Strong.prototype, \"schema\", {\n get: function () {\n return {\n toDOM: function () {\n return ['span', { class: clsWithMdPrefix('strong') }, 0];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n Strong.prototype.bold = function () {\n return toggleMark(reStrong, strongSyntax);\n };\n Strong.prototype.commands = function () {\n return { bold: this.bold() };\n };\n Strong.prototype.keymaps = function () {\n var boldCommand = this.bold()();\n return { 'Mod-b': boldCommand, 'Mod-B': boldCommand };\n };\n return Strong;\n}(Mark));\n\nvar reStrike = /^(~{2}).*([\\s\\S]*)\\1$/m;\nvar strikeSyntax = '~~';\nvar Strike$1 = /** @class */ (function (_super) {\n __extends$1(Strike, _super);\n function Strike() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Strike.prototype, \"name\", {\n get: function () {\n return 'strike';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Strike.prototype, \"schema\", {\n get: function () {\n return {\n toDOM: function () {\n return ['span', { class: clsWithMdPrefix('strike') }, 0];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n Strike.prototype.commands = function () {\n return toggleMark(reStrike, strikeSyntax);\n };\n Strike.prototype.keymaps = function () {\n var strikeCommand = this.commands()();\n return { 'Mod-s': strikeCommand, 'Mod-S': strikeCommand };\n };\n return Strike;\n}(Mark));\n\nvar reEmph = /^(\\*|_).*([\\s\\S]*)\\1$/m;\nvar emphSyntax = '*';\nvar Emph$1 = /** @class */ (function (_super) {\n __extends$1(Emph, _super);\n function Emph() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Emph.prototype, \"name\", {\n get: function () {\n return 'emph';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Emph.prototype, \"schema\", {\n get: function () {\n return {\n toDOM: function () {\n return ['span', { class: clsWithMdPrefix('emph') }, 0];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n Emph.prototype.italic = function () {\n return toggleMark(reEmph, emphSyntax);\n };\n Emph.prototype.commands = function () {\n return { italic: this.italic() };\n };\n Emph.prototype.keymaps = function () {\n var italicCommand = this.italic()();\n return { 'Mod-i': italicCommand, 'Mod-I': italicCommand };\n };\n return Emph;\n}(Mark));\n\nvar reCode = /^(`).*([\\s\\S]*)\\1$/m;\nvar codeSyntax = '`';\nvar Code$1 = /** @class */ (function (_super) {\n __extends$1(Code, _super);\n function Code() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Code.prototype, \"name\", {\n get: function () {\n return 'code';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Code.prototype, \"schema\", {\n get: function () {\n return {\n attrs: {\n start: { default: false },\n end: { default: false },\n marked: { default: false },\n },\n toDOM: function (mark) {\n var _a = mark.attrs, start = _a.start, end = _a.end, marked = _a.marked;\n var classNames = 'code';\n if (start) {\n classNames += '|delimiter|start';\n }\n if (end) {\n classNames += '|delimiter|end';\n }\n if (marked) {\n classNames += '|marked-text';\n }\n return ['span', { class: clsWithMdPrefix.apply(void 0, classNames.split('|')) }, 0];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n Code.prototype.commands = function () {\n return toggleMark(reCode, codeSyntax);\n };\n Code.prototype.keymaps = function () {\n var codeCommand = this.commands()();\n return { 'Shift-Mod-c': codeCommand, 'Shift-Mod-C': codeCommand };\n };\n return Code;\n}(Mark));\n\nvar Link$1 = /** @class */ (function (_super) {\n __extends$1(Link, _super);\n function Link() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Link.prototype, \"name\", {\n get: function () {\n return 'link';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Link.prototype, \"schema\", {\n get: function () {\n return {\n attrs: {\n url: { default: false },\n desc: { default: false },\n },\n toDOM: function (_a) {\n var attrs = _a.attrs;\n var url = attrs.url, desc = attrs.desc;\n var classNames = 'link';\n if (url) {\n classNames += '|link-url|marked-text';\n }\n if (desc) {\n classNames += '|link-desc|marked-text';\n }\n return ['span', { class: clsWithMdPrefix.apply(void 0, classNames.split('|')) }, 0];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n Link.prototype.addLinkOrImage = function (commandType) {\n return function (payload) { return function (_a, dispatch) {\n var selection = _a.selection, tr = _a.tr, schema = _a.schema;\n var _b = resolveSelectionPos(selection), from = _b[0], to = _b[1];\n var _c = payload, linkText = _c.linkText, altText = _c.altText, linkUrl = _c.linkUrl, imageUrl = _c.imageUrl;\n var text = linkText;\n var url = linkUrl;\n var syntax = '';\n if (commandType === 'image') {\n text = altText;\n url = imageUrl;\n syntax = '!';\n }\n text = escapeTextForLink(text);\n syntax += \"[\" + text + \"](\" + url + \")\";\n dispatch(tr.replaceWith(from, to, createTextNode$1(schema, syntax)));\n return true;\n }; };\n };\n Link.prototype.commands = function () {\n return {\n addImage: this.addLinkOrImage('image'),\n addLink: this.addLinkOrImage('link'),\n };\n };\n return Link;\n}(Mark));\n\nvar TaskDelimiter = /** @class */ (function (_super) {\n __extends$1(TaskDelimiter, _super);\n function TaskDelimiter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(TaskDelimiter.prototype, \"name\", {\n get: function () {\n return 'taskDelimiter';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TaskDelimiter.prototype, \"schema\", {\n get: function () {\n return {\n toDOM: function () {\n return ['span', { class: clsWithMdPrefix('delimiter', 'list-item') }, 0];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n return TaskDelimiter;\n}(Mark));\nvar Delimiter = /** @class */ (function (_super) {\n __extends$1(Delimiter, _super);\n function Delimiter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Delimiter.prototype, \"name\", {\n get: function () {\n return 'delimiter';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Delimiter.prototype, \"schema\", {\n get: function () {\n return {\n toDOM: function () {\n return ['span', { class: clsWithMdPrefix('delimiter') }, 0];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n return Delimiter;\n}(Mark));\nvar Meta = /** @class */ (function (_super) {\n __extends$1(Meta, _super);\n function Meta() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Meta.prototype, \"name\", {\n get: function () {\n return 'meta';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Meta.prototype, \"schema\", {\n get: function () {\n return {\n toDOM: function () {\n return ['span', { class: clsWithMdPrefix('meta') }, 0];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n return Meta;\n}(Mark));\nvar MarkedText = /** @class */ (function (_super) {\n __extends$1(MarkedText, _super);\n function MarkedText() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(MarkedText.prototype, \"name\", {\n get: function () {\n return 'markedText';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MarkedText.prototype, \"schema\", {\n get: function () {\n return {\n toDOM: function () {\n return ['span', { class: clsWithMdPrefix('marked-text') }, 0];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n return MarkedText;\n}(Mark));\nvar TableCell = /** @class */ (function (_super) {\n __extends$1(TableCell, _super);\n function TableCell() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(TableCell.prototype, \"name\", {\n get: function () {\n return 'tableCell';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TableCell.prototype, \"schema\", {\n get: function () {\n return {\n toDOM: function () {\n return ['span', { class: clsWithMdPrefix('table-cell') }, 0];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n return TableCell;\n}(Mark));\n\nvar Html = /** @class */ (function (_super) {\n __extends$1(Html, _super);\n function Html() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Html.prototype, \"name\", {\n get: function () {\n return 'html';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Html.prototype, \"schema\", {\n get: function () {\n return {\n toDOM: function () {\n return ['span', { class: clsWithMdPrefix('html') }, 0];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n return Html;\n}(Mark));\n\nvar customBlockSyntax = '$$';\nvar CustomBlock$1 = /** @class */ (function (_super) {\n __extends$1(CustomBlock, _super);\n function CustomBlock() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(CustomBlock.prototype, \"name\", {\n get: function () {\n return 'customBlock';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CustomBlock.prototype, \"schema\", {\n get: function () {\n return {\n toDOM: function () {\n return ['span', { class: clsWithMdPrefix('custom-block') }, 0];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n CustomBlock.prototype.commands = function () {\n return function (payload) { return function (state, dispatch) {\n var selection = state.selection, schema = state.schema, tr = state.tr;\n var _a = getRangeInfo(selection), startFromOffset = _a.startFromOffset, endToOffset = _a.endToOffset;\n if (!(payload === null || payload === void 0 ? void 0 : payload.info)) {\n return false;\n }\n var customBlock = \"\" + customBlockSyntax + payload.info;\n var startNode = createTextNode$1(schema, customBlock);\n var endNode = createTextNode$1(schema, customBlockSyntax);\n tr.insert(startFromOffset, startNode).split(startFromOffset + customBlock.length);\n tr.split(tr.mapping.map(endToOffset)).insert(tr.mapping.map(endToOffset), endNode);\n dispatch(tr.setSelection(createTextSelection(tr, tr.mapping.map(endToOffset) - (customBlockSyntax.length + 2))));\n return true;\n }; };\n };\n return CustomBlock;\n}(Mark));\n\nvar reTaskMarkerKey = /x|backspace/i;\nvar reTaskMarker = /^\\[(\\s*)(x?)(\\s*)\\](?:\\s+)/i;\nfunction smartTask(_a) {\n var schema = _a.schema, toastMark = _a.toastMark;\n return new Plugin({\n props: {\n handleDOMEvents: {\n keyup: function (view, ev) {\n var _a;\n var _b = view.state, doc = _b.doc, tr = _b.tr, selection = _b.selection;\n if (selection.empty && reTaskMarkerKey.test(ev.key)) {\n var _c = getRangeInfo(selection), startIndex = _c.startIndex, startFromOffset = _c.startFromOffset, from = _c.from;\n // should add `1` to line for the markdown parser\n // because markdown parser has `1`(not zero) as the start number\n var mdPos = [startIndex + 1, from - startFromOffset + 1];\n var mdNode = toastMark.findNodeAtPosition(mdPos);\n var paraNode = findClosestNode(mdNode, function (node) { var _a; return node.type === 'paragraph' && ((_a = node.parent) === null || _a === void 0 ? void 0 : _a.type) === 'item'; });\n if ((_a = paraNode === null || paraNode === void 0 ? void 0 : paraNode.firstChild) === null || _a === void 0 ? void 0 : _a.literal) {\n var firstChild = paraNode.firstChild;\n var matched = firstChild.literal.match(reTaskMarker);\n if (matched) {\n var startMdPos = firstChild.sourcepos[0];\n var startSpaces = matched[1], stateChar = matched[2], lastSpaces = matched[3];\n var spaces = startSpaces.length + lastSpaces.length;\n var startOffset = getNodeContentOffsetRange(doc, startMdPos[0] - 1).startOffset;\n var startPos = startMdPos[1] + startOffset;\n if (stateChar) {\n var addedPos = spaces ? spaces + 1 : 0;\n tr.replaceWith(startPos, addedPos + startPos, schema.text(stateChar));\n view.dispatch(tr);\n }\n else if (!spaces) {\n tr.insertText(' ', startPos);\n view.dispatch(tr);\n }\n }\n }\n }\n return false;\n },\n },\n },\n });\n}\n\nvar EVENT_TYPE = 'cut';\nvar reLineEnding$2 = /\\r\\n|\\n|\\r/;\nvar MdEditor = /** @class */ (function (_super) {\n __extends$1(MdEditor, _super);\n function MdEditor(eventEmitter, options) {\n var _this = _super.call(this, eventEmitter) || this;\n var toastMark = options.toastMark, _a = options.useCommandShortcut, useCommandShortcut = _a === void 0 ? true : _a, _b = options.mdPlugins, mdPlugins = _b === void 0 ? [] : _b;\n _this.editorType = 'markdown';\n _this.el.classList.add('md-mode');\n _this.toastMark = toastMark;\n _this.extraPlugins = mdPlugins;\n _this.specs = _this.createSpecs();\n _this.schema = _this.createSchema();\n _this.context = _this.createContext();\n _this.keymaps = _this.createKeymaps(useCommandShortcut);\n _this.view = _this.createView();\n _this.commands = _this.createCommands();\n _this.specs.setContext(__assign$1(__assign$1({}, _this.context), { view: _this.view }));\n _this.createClipboard();\n // To prevent unnecessary focus setting during initial rendering\n _this.eventEmitter.listen('changePreviewTabWrite', function (isMarkdownTabMounted) {\n return _this.toggleActive(true, isMarkdownTabMounted);\n });\n _this.eventEmitter.listen('changePreviewTabPreview', function () { return _this.toggleActive(false); });\n _this.initEvent();\n return _this;\n }\n MdEditor.prototype.toggleActive = function (active, isMarkdownTabMounted) {\n toggleClass(this.el, 'active', active);\n if (active) {\n if (!isMarkdownTabMounted) {\n this.focus();\n }\n }\n else {\n this.blur();\n }\n };\n MdEditor.prototype.createClipboard = function () {\n var _this = this;\n this.clipboard = document.createElement('textarea');\n this.clipboard.className = cls('pseudo-clipboard');\n this.clipboard.addEventListener('paste', function (ev) {\n var clipboardData = ev.clipboardData || window.clipboardData;\n var items = clipboardData && clipboardData.items;\n if (items) {\n var containRtfItem = toArray_1(items).some(function (item) { return item.kind === 'string' && item.type === 'text/rtf'; });\n // if it contains rtf, it's most likely copy paste from office -> no image\n if (!containRtfItem) {\n var imageBlob = pasteImageOnly(items);\n if (imageBlob) {\n ev.preventDefault();\n emitImageBlobHook(_this.eventEmitter, imageBlob, ev.type);\n }\n }\n }\n });\n // process the pasted data in input event for IE11\n this.clipboard.addEventListener('input', function (ev) {\n var text = ev.target.value;\n _this.replaceSelection(text);\n ev.preventDefault();\n ev.target.value = '';\n });\n this.el.insertBefore(this.clipboard, this.view.dom);\n };\n MdEditor.prototype.createContext = function () {\n return {\n toastMark: this.toastMark,\n schema: this.schema,\n eventEmitter: this.eventEmitter,\n };\n };\n MdEditor.prototype.createSpecs = function () {\n return new SpecManager([\n new Doc$1(),\n new Paragraph$1(),\n new Widget(),\n new Text$1(),\n new Heading$1(),\n new BlockQuote$1(),\n new CodeBlock$1(),\n new CustomBlock$1(),\n new Table$1(),\n new TableCell(),\n new ThematicBreak$1(),\n new ListItem$1(),\n new Strong$1(),\n new Strike$1(),\n new Emph$1(),\n new Code$1(),\n new Link$1(),\n new Delimiter(),\n new TaskDelimiter(),\n new MarkedText(),\n new Meta(),\n new Html(),\n ]);\n };\n MdEditor.prototype.createPlugins = function () {\n return __spreadArray$1([\n syntaxHighlight(this.context),\n previewHighlight(this.context),\n smartTask(this.context)\n ], this.createPluginProps()).concat(this.defaultPlugins);\n };\n MdEditor.prototype.createView = function () {\n var _this = this;\n return new EditorView(this.el, {\n state: this.createState(),\n dispatchTransaction: function (tr) {\n _this.updateMarkdown(tr);\n var state = _this.view.state.applyTransaction(tr).state;\n _this.view.updateState(state);\n _this.emitChangeEvent(tr);\n },\n handleKeyDown: function (_, ev) {\n if ((ev.metaKey || ev.ctrlKey) && ev.key.toUpperCase() === 'V') {\n _this.clipboard.focus();\n }\n _this.eventEmitter.emit('keydown', _this.editorType, ev);\n return false;\n },\n handleDOMEvents: {\n copy: function (_, ev) { return _this.captureCopy(ev); },\n cut: function (_, ev) { return _this.captureCopy(ev, EVENT_TYPE); },\n scroll: function () {\n _this.eventEmitter.emit('scroll', 'editor');\n return true;\n },\n keyup: function (_, ev) {\n _this.eventEmitter.emit('keyup', _this.editorType, ev);\n return false;\n },\n },\n nodeViews: {\n widget: widgetNodeView,\n },\n });\n };\n MdEditor.prototype.createCommands = function () {\n return this.specs.commands(this.view);\n };\n MdEditor.prototype.captureCopy = function (ev, type) {\n ev.preventDefault();\n var _a = this.view.state, selection = _a.selection, tr = _a.tr;\n if (selection.empty) {\n return true;\n }\n var text = this.getChanged(selection.content());\n if (ev.clipboardData) {\n ev.clipboardData.setData('text/plain', text);\n }\n else {\n window.clipboardData.setData('Text', text);\n }\n if (type === EVENT_TYPE) {\n this.view.dispatch(tr.deleteSelection().scrollIntoView().setMeta('uiEvent', EVENT_TYPE));\n }\n return true;\n };\n MdEditor.prototype.updateMarkdown = function (tr) {\n var _this = this;\n if (tr.docChanged) {\n tr.steps.forEach(function (step, index) {\n if (step.slice && !(step instanceof ReplaceAroundStep)) {\n var doc = tr.docs[index];\n var _a = [step.from, step.to], from = _a[0], to = _a[1];\n var _b = getEditorToMdPos(doc, from, to), startPos = _b[0], endPos = _b[1];\n var changed = _this.getChanged(step.slice);\n if (startPos[0] === endPos[0] && startPos[1] === endPos[1] && changed === '') {\n changed = '\\n';\n }\n var editResult = _this.toastMark.editMarkdown(startPos, endPos, changed);\n _this.eventEmitter.emit('updatePreview', editResult);\n tr.setMeta('editResult', editResult).scrollIntoView();\n }\n });\n }\n };\n MdEditor.prototype.getChanged = function (slice) {\n var changed = '';\n var from = 0;\n var to = slice.content.size;\n slice.content.nodesBetween(from, to, function (node, pos) {\n if (node.isText) {\n changed += node.text.slice(Math.max(from, pos) - pos, to - pos);\n }\n else if (node.isBlock && pos > 0) {\n changed += '\\n';\n }\n });\n return changed;\n };\n MdEditor.prototype.setSelection = function (start, end) {\n if (end === void 0) { end = start; }\n var tr = this.view.state.tr;\n var _a = getMdToEditorPos(tr.doc, start, end), from = _a[0], to = _a[1];\n this.view.dispatch(tr.setSelection(createTextSelection(tr, from, to)).scrollIntoView());\n };\n MdEditor.prototype.replaceSelection = function (text, start, end) {\n var newTr;\n var _a = this.view.state, tr = _a.tr, schema = _a.schema, doc = _a.doc;\n var lineTexts = text.split(reLineEnding$2);\n var nodes = lineTexts.map(function (lineText) {\n return createParagraph(schema, createNodesWithWidget(lineText, schema));\n });\n var slice = new Slice(Fragment.from(nodes), 1, 1);\n this.focus();\n if (start && end) {\n var _b = getMdToEditorPos(doc, start, end), from = _b[0], to = _b[1];\n newTr = tr.replaceRange(from, to, slice);\n }\n else {\n newTr = tr.replaceSelection(slice);\n }\n this.view.dispatch(newTr.scrollIntoView());\n };\n MdEditor.prototype.deleteSelection = function (start, end) {\n var newTr;\n var _a = this.view.state, tr = _a.tr, doc = _a.doc;\n if (start && end) {\n var _b = getMdToEditorPos(doc, start, end), from = _b[0], to = _b[1];\n newTr = tr.deleteRange(from, to);\n }\n else {\n newTr = tr.deleteSelection();\n }\n this.view.dispatch(newTr.scrollIntoView());\n };\n MdEditor.prototype.getSelectedText = function (start, end) {\n var _a = this.view.state, doc = _a.doc, selection = _a.selection;\n var from = selection.from, to = selection.to;\n if (start && end) {\n var pos = getMdToEditorPos(doc, start, end);\n from = pos[0];\n to = pos[1];\n }\n return doc.textBetween(from, to, '\\n');\n };\n MdEditor.prototype.getSelection = function () {\n var _a = this.view.state.selection, from = _a.from, to = _a.to;\n return getEditorToMdPos(this.view.state.tr.doc, from, to);\n };\n MdEditor.prototype.setMarkdown = function (markdown, cursorToEnd) {\n if (cursorToEnd === void 0) { cursorToEnd = true; }\n var lineTexts = markdown.split(reLineEnding$2);\n var _a = this.view.state, tr = _a.tr, doc = _a.doc, schema = _a.schema;\n var nodes = lineTexts.map(function (lineText) {\n return createParagraph(schema, createNodesWithWidget(lineText, schema));\n });\n this.view.dispatch(tr.replaceWith(0, doc.content.size, nodes));\n if (cursorToEnd) {\n this.moveCursorToEnd(true);\n }\n };\n MdEditor.prototype.addWidget = function (node, style, mdPos) {\n var _a = this.view.state, tr = _a.tr, doc = _a.doc, selection = _a.selection;\n var pos = mdPos ? getMdToEditorPos(doc, mdPos, mdPos)[0] : selection.to;\n this.view.dispatch(tr.setMeta('widget', { pos: pos, node: node, style: style }));\n };\n MdEditor.prototype.replaceWithWidget = function (start, end, text) {\n var _a = this.view.state, tr = _a.tr, schema = _a.schema, doc = _a.doc;\n var pos = getMdToEditorPos(doc, start, end);\n var nodes = createNodesWithWidget(text, schema);\n this.view.dispatch(tr.replaceWith(pos[0], pos[1], nodes));\n };\n MdEditor.prototype.getRangeInfoOfNode = function (pos) {\n var _a = this.view.state, doc = _a.doc, selection = _a.selection;\n var mdPos = pos || getEditorToMdPos(doc, selection.from)[0];\n var mdNode = this.toastMark.findNodeAtPosition(mdPos);\n if (mdNode.type === 'text' && mdNode.parent.type !== 'paragraph') {\n mdNode = mdNode.parent;\n }\n // add 1 sync for prosemirror position\n mdNode.sourcepos[1][1] += 1;\n return { range: mdNode.sourcepos, type: mdNode.type };\n };\n MdEditor.prototype.getMarkdown = function () {\n return this.toastMark\n .getLineTexts()\n .map(function (lineText) { return unwrapWidgetSyntax(lineText); })\n .join('\\n');\n };\n MdEditor.prototype.getToastMark = function () {\n return this.toastMark;\n };\n return MdEditor;\n}(EditorBase));\n\n/**\n * @fileoverview Get event collection for specific HTML element\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\nvar EVENT_KEY = '_feEventKey';\n\n/**\n * Get event collection for specific HTML element\n * @param {HTMLElement} element - HTML element\n * @param {string} type - event type\n * @returns {array}\n * @private\n */\nfunction safeEvent$2(element, type) {\n var events = element[EVENT_KEY];\n var handlers;\n\n if (!events) {\n events = element[EVENT_KEY] = {};\n }\n\n handlers = events[type];\n if (!handlers) {\n handlers = events[type] = [];\n }\n\n return handlers;\n}\n\nvar _safeEvent = safeEvent$2;\n\n/**\n * @fileoverview Unbind DOM events\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\nvar isString$1 = isString_1;\nvar forEach$1 = forEach_1;\n\nvar safeEvent$1 = _safeEvent;\n\n/**\n * Unbind DOM events\n * If a handler function is not passed, remove all events of that type.\n * @param {HTMLElement} element - element to unbind events\n * @param {(string|object)} types - Space splitted events names or eventName:handler object\n * @param {function} [handler] - handler function\n * @memberof module:domEvent\n * @example\n * // Following the example of domEvent#on\n * \n * // Unbind one event from an element.\n * off(div, 'click', toggle);\n * \n * // Unbind multiple events with a same handler from multiple elements at once.\n * // Use event names splitted by a space.\n * off(element, 'mouseenter mouseleave', changeColor);\n * \n * // Unbind multiple events with different handlers from an element at once.\n * // Use an object which of key is an event name and value is a handler function.\n * off(div, {\n * keydown: highlight,\n * keyup: dehighlight\n * });\n * \n * // Unbind events without handlers.\n * off(div, 'drag');\n */\nfunction off(element, types, handler) {\n if (isString$1(types)) {\n forEach$1(types.split(/\\s+/g), function(type) {\n unbindEvent(element, type, handler);\n });\n\n return;\n }\n\n forEach$1(types, function(func, type) {\n unbindEvent(element, type, func);\n });\n}\n\n/**\n * Unbind DOM events\n * If a handler function is not passed, remove all events of that type.\n * @param {HTMLElement} element - element to unbind events\n * @param {string} type - events name\n * @param {function} [handler] - handler function\n * @private\n */\nfunction unbindEvent(element, type, handler) {\n var events = safeEvent$1(element, type);\n var index;\n\n if (!handler) {\n forEach$1(events, function(item) {\n removeHandler(element, type, item.wrappedHandler);\n });\n events.splice(0, events.length);\n } else {\n forEach$1(events, function(item, idx) {\n if (handler === item.handler) {\n removeHandler(element, type, item.wrappedHandler);\n index = idx;\n\n return false;\n }\n\n return true;\n });\n events.splice(index, 1);\n }\n}\n\n/**\n * Remove an event handler\n * @param {HTMLElement} element - An element to remove an event\n * @param {string} type - event type\n * @param {function} handler - event handler\n * @private\n */\nfunction removeHandler(element, type, handler) {\n if ('removeEventListener' in element) {\n element.removeEventListener(type, handler);\n } else if ('detachEvent' in element) {\n element.detachEvent('on' + type, handler);\n }\n}\n\nvar off_1 = off;\n\n/**\n * @fileoverview Bind DOM events\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\nvar isString = isString_1;\nvar forEach = forEach_1;\n\nvar safeEvent = _safeEvent;\n\n/**\n * Bind DOM events.\n * @param {HTMLElement} element - element to bind events\n * @param {(string|object)} types - Space splitted events names or eventName:handler object\n * @param {(function|object)} handler - handler function or context for handler method\n * @param {object} [context] context - context for handler method.\n * @memberof module:domEvent\n * @example\n * const div = document.querySelector('div');\n * \n * // Bind one event to an element.\n * on(div, 'click', toggle);\n * \n * // Bind multiple events with a same handler to multiple elements at once.\n * // Use event names splitted by a space.\n * on(div, 'mouseenter mouseleave', changeColor);\n * \n * // Bind multiple events with different handlers to an element at once.\n * // Use an object which of key is an event name and value is a handler function.\n * on(div, {\n * keydown: highlight,\n * keyup: dehighlight\n * });\n * \n * // Set a context for handler method.\n * const name = 'global';\n * const repository = {name: 'CodeSnippet'};\n * on(div, 'drag', function() {\n * console.log(this.name);\n * }, repository);\n * // Result when you drag a div: \"CodeSnippet\"\n */\nfunction on(element, types, handler, context) {\n if (isString(types)) {\n forEach(types.split(/\\s+/g), function(type) {\n bindEvent(element, type, handler, context);\n });\n\n return;\n }\n\n forEach(types, function(func, type) {\n bindEvent(element, type, func, handler);\n });\n}\n\n/**\n * Bind DOM events\n * @param {HTMLElement} element - element to bind events\n * @param {string} type - events name\n * @param {function} handler - handler function or context for handler method\n * @param {object} [context] context - context for handler method.\n * @private\n */\nfunction bindEvent(element, type, handler, context) {\n /**\n * Event handler\n * @param {Event} e - event object\n */\n function eventHandler(e) {\n handler.call(context || element, e || window.event);\n }\n\n if ('addEventListener' in element) {\n element.addEventListener(type, eventHandler);\n } else if ('attachEvent' in element) {\n element.attachEvent('on' + type, eventHandler);\n }\n memorizeHandler(element, type, handler, eventHandler);\n}\n\n/**\n * Memorize DOM event handler for unbinding.\n * @param {HTMLElement} element - element to bind events\n * @param {string} type - events name\n * @param {function} handler - handler function that user passed at on() use\n * @param {function} wrappedHandler - handler function that wrapped by domevent for implementing some features\n * @private\n */\nfunction memorizeHandler(element, type, handler, wrappedHandler) {\n var events = safeEvent(element, type);\n var existInEvents = false;\n\n forEach(events, function(obj) {\n if (obj.handler === handler) {\n existInEvents = true;\n\n return false;\n }\n\n return true;\n });\n\n if (!existInEvents) {\n events.push({\n handler: handler,\n wrappedHandler: wrappedHandler\n });\n }\n}\n\nvar on_1 = on;\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nfunction __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nvar __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\n\r\nfunction __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\n\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nvar encodeCache = {};\n\n\n// Create a lookup array where anything but characters in `chars` string\n// and alphanumeric chars is percent-encoded.\n//\nfunction getEncodeCache(exclude) {\n var i, ch, cache = encodeCache[exclude];\n if (cache) { return cache; }\n\n cache = encodeCache[exclude] = [];\n\n for (i = 0; i < 128; i++) {\n ch = String.fromCharCode(i);\n\n if (/^[0-9a-z]$/i.test(ch)) {\n // always allow unencoded alphanumeric characters\n cache.push(ch);\n } else {\n cache.push('%' + ('0' + i.toString(16).toUpperCase()).slice(-2));\n }\n }\n\n for (i = 0; i < exclude.length; i++) {\n cache[exclude.charCodeAt(i)] = exclude[i];\n }\n\n return cache;\n}\n\n\n// Encode unsafe characters with percent-encoding, skipping already\n// encoded sequences.\n//\n// - string - string to encode\n// - exclude - list of characters to ignore (in addition to a-zA-Z0-9)\n// - keepEscaped - don't encode '%' in a correct escape sequence (default: true)\n//\nfunction encode$1(string, exclude, keepEscaped) {\n var i, l, code, nextCode, cache,\n result = '';\n\n if (typeof exclude !== 'string') {\n // encode(string, keepEscaped)\n keepEscaped = exclude;\n exclude = encode$1.defaultChars;\n }\n\n if (typeof keepEscaped === 'undefined') {\n keepEscaped = true;\n }\n\n cache = getEncodeCache(exclude);\n\n for (i = 0, l = string.length; i < l; i++) {\n code = string.charCodeAt(i);\n\n if (keepEscaped && code === 0x25 /* % */ && i + 2 < l) {\n if (/^[0-9a-f]{2}$/i.test(string.slice(i + 1, i + 3))) {\n result += string.slice(i, i + 3);\n i += 2;\n continue;\n }\n }\n\n if (code < 128) {\n result += cache[code];\n continue;\n }\n\n if (code >= 0xD800 && code <= 0xDFFF) {\n if (code >= 0xD800 && code <= 0xDBFF && i + 1 < l) {\n nextCode = string.charCodeAt(i + 1);\n if (nextCode >= 0xDC00 && nextCode <= 0xDFFF) {\n result += encodeURIComponent(string[i] + string[i + 1]);\n i++;\n continue;\n }\n }\n result += '%EF%BF%BD';\n continue;\n }\n\n result += encodeURIComponent(string[i]);\n }\n\n return result;\n}\n\nencode$1.defaultChars = \";/?:@&=+$,-_.!~*'()#\";\nencode$1.componentChars = \"-_.!~*'()\";\n\n\nvar encode_1 = encode$1;\n\nvar lib = {};\n\nvar decode = {};\n\nvar Aacute$1 = \"Á\";\nvar aacute$1 = \"á\";\nvar Abreve = \"Ă\";\nvar abreve = \"ă\";\nvar ac = \"∾\";\nvar acd = \"∿\";\nvar acE = \"∾̳\";\nvar Acirc$1 = \"Â\";\nvar acirc$1 = \"â\";\nvar acute$1 = \"´\";\nvar Acy = \"А\";\nvar acy = \"а\";\nvar AElig$1 = \"Æ\";\nvar aelig$1 = \"æ\";\nvar af = \"⁡\";\nvar Afr = \"𝔄\";\nvar afr = \"𝔞\";\nvar Agrave$1 = \"À\";\nvar agrave$1 = \"à\";\nvar alefsym = \"ℵ\";\nvar aleph = \"ℵ\";\nvar Alpha = \"Α\";\nvar alpha = \"α\";\nvar Amacr = \"Ā\";\nvar amacr = \"ā\";\nvar amalg = \"⨿\";\nvar amp$2 = \"&\";\nvar AMP$1 = \"&\";\nvar andand = \"⩕\";\nvar And = \"⩓\";\nvar and = \"∧\";\nvar andd = \"⩜\";\nvar andslope = \"⩘\";\nvar andv = \"⩚\";\nvar ang = \"∠\";\nvar ange = \"⦤\";\nvar angle = \"∠\";\nvar angmsdaa = \"⦨\";\nvar angmsdab = \"⦩\";\nvar angmsdac = \"⦪\";\nvar angmsdad = \"⦫\";\nvar angmsdae = \"⦬\";\nvar angmsdaf = \"⦭\";\nvar angmsdag = \"⦮\";\nvar angmsdah = \"⦯\";\nvar angmsd = \"∡\";\nvar angrt = \"∟\";\nvar angrtvb = \"⊾\";\nvar angrtvbd = \"⦝\";\nvar angsph = \"∢\";\nvar angst = \"Å\";\nvar angzarr = \"⍼\";\nvar Aogon = \"Ą\";\nvar aogon = \"ą\";\nvar Aopf = \"𝔸\";\nvar aopf = \"𝕒\";\nvar apacir = \"⩯\";\nvar ap = \"≈\";\nvar apE = \"⩰\";\nvar ape = \"≊\";\nvar apid = \"≋\";\nvar apos$1 = \"'\";\nvar ApplyFunction = \"⁡\";\nvar approx = \"≈\";\nvar approxeq = \"≊\";\nvar Aring$1 = \"Å\";\nvar aring$1 = \"å\";\nvar Ascr = \"𝒜\";\nvar ascr = \"𝒶\";\nvar Assign = \"≔\";\nvar ast = \"*\";\nvar asymp = \"≈\";\nvar asympeq = \"≍\";\nvar Atilde$1 = \"Ã\";\nvar atilde$1 = \"ã\";\nvar Auml$1 = \"Ä\";\nvar auml$1 = \"ä\";\nvar awconint = \"∳\";\nvar awint = \"⨑\";\nvar backcong = \"≌\";\nvar backepsilon = \"϶\";\nvar backprime = \"‵\";\nvar backsim = \"∽\";\nvar backsimeq = \"⋍\";\nvar Backslash = \"∖\";\nvar Barv = \"⫧\";\nvar barvee = \"⊽\";\nvar barwed = \"⌅\";\nvar Barwed = \"⌆\";\nvar barwedge = \"⌅\";\nvar bbrk = \"⎵\";\nvar bbrktbrk = \"⎶\";\nvar bcong = \"≌\";\nvar Bcy = \"Б\";\nvar bcy = \"б\";\nvar bdquo = \"„\";\nvar becaus = \"∵\";\nvar because = \"∵\";\nvar Because = \"∵\";\nvar bemptyv = \"⦰\";\nvar bepsi = \"϶\";\nvar bernou = \"ℬ\";\nvar Bernoullis = \"ℬ\";\nvar Beta = \"Β\";\nvar beta = \"β\";\nvar beth = \"ℶ\";\nvar between = \"≬\";\nvar Bfr = \"𝔅\";\nvar bfr = \"𝔟\";\nvar bigcap = \"⋂\";\nvar bigcirc = \"◯\";\nvar bigcup = \"⋃\";\nvar bigodot = \"⨀\";\nvar bigoplus = \"⨁\";\nvar bigotimes = \"⨂\";\nvar bigsqcup = \"⨆\";\nvar bigstar = \"★\";\nvar bigtriangledown = \"▽\";\nvar bigtriangleup = \"△\";\nvar biguplus = \"⨄\";\nvar bigvee = \"⋁\";\nvar bigwedge = \"⋀\";\nvar bkarow = \"⤍\";\nvar blacklozenge = \"⧫\";\nvar blacksquare = \"▪\";\nvar blacktriangle = \"▴\";\nvar blacktriangledown = \"▾\";\nvar blacktriangleleft = \"◂\";\nvar blacktriangleright = \"▸\";\nvar blank = \"␣\";\nvar blk12 = \"▒\";\nvar blk14 = \"░\";\nvar blk34 = \"▓\";\nvar block = \"█\";\nvar bne = \"=⃥\";\nvar bnequiv = \"≡⃥\";\nvar bNot = \"⫭\";\nvar bnot = \"⌐\";\nvar Bopf = \"𝔹\";\nvar bopf = \"𝕓\";\nvar bot = \"⊥\";\nvar bottom = \"⊥\";\nvar bowtie = \"⋈\";\nvar boxbox = \"⧉\";\nvar boxdl = \"┐\";\nvar boxdL = \"╕\";\nvar boxDl = \"╖\";\nvar boxDL = \"╗\";\nvar boxdr = \"┌\";\nvar boxdR = \"╒\";\nvar boxDr = \"╓\";\nvar boxDR = \"╔\";\nvar boxh = \"─\";\nvar boxH = \"═\";\nvar boxhd = \"┬\";\nvar boxHd = \"╤\";\nvar boxhD = \"╥\";\nvar boxHD = \"╦\";\nvar boxhu = \"┴\";\nvar boxHu = \"╧\";\nvar boxhU = \"╨\";\nvar boxHU = \"╩\";\nvar boxminus = \"⊟\";\nvar boxplus = \"⊞\";\nvar boxtimes = \"⊠\";\nvar boxul = \"┘\";\nvar boxuL = \"╛\";\nvar boxUl = \"╜\";\nvar boxUL = \"╝\";\nvar boxur = \"└\";\nvar boxuR = \"╘\";\nvar boxUr = \"╙\";\nvar boxUR = \"╚\";\nvar boxv = \"│\";\nvar boxV = \"║\";\nvar boxvh = \"┼\";\nvar boxvH = \"╪\";\nvar boxVh = \"╫\";\nvar boxVH = \"╬\";\nvar boxvl = \"┤\";\nvar boxvL = \"╡\";\nvar boxVl = \"╢\";\nvar boxVL = \"╣\";\nvar boxvr = \"├\";\nvar boxvR = \"╞\";\nvar boxVr = \"╟\";\nvar boxVR = \"╠\";\nvar bprime = \"‵\";\nvar breve = \"˘\";\nvar Breve = \"˘\";\nvar brvbar$1 = \"¦\";\nvar bscr = \"𝒷\";\nvar Bscr = \"ℬ\";\nvar bsemi = \"⁏\";\nvar bsim = \"∽\";\nvar bsime = \"⋍\";\nvar bsolb = \"⧅\";\nvar bsol = \"\\\\\";\nvar bsolhsub = \"⟈\";\nvar bull = \"•\";\nvar bullet = \"•\";\nvar bump = \"≎\";\nvar bumpE = \"⪮\";\nvar bumpe = \"≏\";\nvar Bumpeq = \"≎\";\nvar bumpeq = \"≏\";\nvar Cacute = \"Ć\";\nvar cacute = \"ć\";\nvar capand = \"⩄\";\nvar capbrcup = \"⩉\";\nvar capcap = \"⩋\";\nvar cap = \"∩\";\nvar Cap = \"⋒\";\nvar capcup = \"⩇\";\nvar capdot = \"⩀\";\nvar CapitalDifferentialD = \"ⅅ\";\nvar caps = \"∩︀\";\nvar caret = \"⁁\";\nvar caron = \"ˇ\";\nvar Cayleys = \"ℭ\";\nvar ccaps = \"⩍\";\nvar Ccaron = \"Č\";\nvar ccaron = \"č\";\nvar Ccedil$1 = \"Ç\";\nvar ccedil$1 = \"ç\";\nvar Ccirc = \"Ĉ\";\nvar ccirc = \"ĉ\";\nvar Cconint = \"∰\";\nvar ccups = \"⩌\";\nvar ccupssm = \"⩐\";\nvar Cdot = \"Ċ\";\nvar cdot = \"ċ\";\nvar cedil$1 = \"¸\";\nvar Cedilla = \"¸\";\nvar cemptyv = \"⦲\";\nvar cent$1 = \"¢\";\nvar centerdot = \"·\";\nvar CenterDot = \"·\";\nvar cfr = \"𝔠\";\nvar Cfr = \"ℭ\";\nvar CHcy = \"Ч\";\nvar chcy = \"ч\";\nvar check = \"✓\";\nvar checkmark = \"✓\";\nvar Chi = \"Χ\";\nvar chi = \"χ\";\nvar circ = \"ˆ\";\nvar circeq = \"≗\";\nvar circlearrowleft = \"↺\";\nvar circlearrowright = \"↻\";\nvar circledast = \"⊛\";\nvar circledcirc = \"⊚\";\nvar circleddash = \"⊝\";\nvar CircleDot = \"⊙\";\nvar circledR = \"®\";\nvar circledS = \"Ⓢ\";\nvar CircleMinus = \"⊖\";\nvar CirclePlus = \"⊕\";\nvar CircleTimes = \"⊗\";\nvar cir = \"○\";\nvar cirE = \"⧃\";\nvar cire = \"≗\";\nvar cirfnint = \"⨐\";\nvar cirmid = \"⫯\";\nvar cirscir = \"⧂\";\nvar ClockwiseContourIntegral = \"∲\";\nvar CloseCurlyDoubleQuote = \"”\";\nvar CloseCurlyQuote = \"’\";\nvar clubs = \"♣\";\nvar clubsuit = \"♣\";\nvar colon = \":\";\nvar Colon = \"∷\";\nvar Colone = \"⩴\";\nvar colone = \"≔\";\nvar coloneq = \"≔\";\nvar comma = \",\";\nvar commat = \"@\";\nvar comp = \"∁\";\nvar compfn = \"∘\";\nvar complement = \"∁\";\nvar complexes = \"ℂ\";\nvar cong = \"≅\";\nvar congdot = \"⩭\";\nvar Congruent = \"≡\";\nvar conint = \"∮\";\nvar Conint = \"∯\";\nvar ContourIntegral = \"∮\";\nvar copf = \"𝕔\";\nvar Copf = \"ℂ\";\nvar coprod = \"∐\";\nvar Coproduct = \"∐\";\nvar copy$1 = \"©\";\nvar COPY$1 = \"©\";\nvar copysr = \"℗\";\nvar CounterClockwiseContourIntegral = \"∳\";\nvar crarr = \"↵\";\nvar cross = \"✗\";\nvar Cross = \"⨯\";\nvar Cscr = \"𝒞\";\nvar cscr = \"𝒸\";\nvar csub = \"⫏\";\nvar csube = \"⫑\";\nvar csup = \"⫐\";\nvar csupe = \"⫒\";\nvar ctdot = \"⋯\";\nvar cudarrl = \"⤸\";\nvar cudarrr = \"⤵\";\nvar cuepr = \"⋞\";\nvar cuesc = \"⋟\";\nvar cularr = \"↶\";\nvar cularrp = \"⤽\";\nvar cupbrcap = \"⩈\";\nvar cupcap = \"⩆\";\nvar CupCap = \"≍\";\nvar cup = \"∪\";\nvar Cup = \"⋓\";\nvar cupcup = \"⩊\";\nvar cupdot = \"⊍\";\nvar cupor = \"⩅\";\nvar cups = \"∪︀\";\nvar curarr = \"↷\";\nvar curarrm = \"⤼\";\nvar curlyeqprec = \"⋞\";\nvar curlyeqsucc = \"⋟\";\nvar curlyvee = \"⋎\";\nvar curlywedge = \"⋏\";\nvar curren$1 = \"¤\";\nvar curvearrowleft = \"↶\";\nvar curvearrowright = \"↷\";\nvar cuvee = \"⋎\";\nvar cuwed = \"⋏\";\nvar cwconint = \"∲\";\nvar cwint = \"∱\";\nvar cylcty = \"⌭\";\nvar dagger = \"†\";\nvar Dagger = \"‡\";\nvar daleth = \"ℸ\";\nvar darr = \"↓\";\nvar Darr = \"↡\";\nvar dArr = \"⇓\";\nvar dash = \"‐\";\nvar Dashv = \"⫤\";\nvar dashv = \"⊣\";\nvar dbkarow = \"⤏\";\nvar dblac = \"˝\";\nvar Dcaron = \"Ď\";\nvar dcaron = \"ď\";\nvar Dcy = \"Д\";\nvar dcy = \"д\";\nvar ddagger = \"‡\";\nvar ddarr = \"⇊\";\nvar DD = \"ⅅ\";\nvar dd = \"ⅆ\";\nvar DDotrahd = \"⤑\";\nvar ddotseq = \"⩷\";\nvar deg$1 = \"°\";\nvar Del = \"∇\";\nvar Delta = \"Δ\";\nvar delta = \"δ\";\nvar demptyv = \"⦱\";\nvar dfisht = \"⥿\";\nvar Dfr = \"𝔇\";\nvar dfr = \"𝔡\";\nvar dHar = \"⥥\";\nvar dharl = \"⇃\";\nvar dharr = \"⇂\";\nvar DiacriticalAcute = \"´\";\nvar DiacriticalDot = \"˙\";\nvar DiacriticalDoubleAcute = \"˝\";\nvar DiacriticalGrave = \"`\";\nvar DiacriticalTilde = \"˜\";\nvar diam = \"⋄\";\nvar diamond = \"⋄\";\nvar Diamond = \"⋄\";\nvar diamondsuit = \"♦\";\nvar diams = \"♦\";\nvar die = \"¨\";\nvar DifferentialD = \"ⅆ\";\nvar digamma = \"ϝ\";\nvar disin = \"⋲\";\nvar div = \"÷\";\nvar divide$1 = \"÷\";\nvar divideontimes = \"⋇\";\nvar divonx = \"⋇\";\nvar DJcy = \"Ђ\";\nvar djcy = \"ђ\";\nvar dlcorn = \"⌞\";\nvar dlcrop = \"⌍\";\nvar dollar = \"$\";\nvar Dopf = \"𝔻\";\nvar dopf = \"𝕕\";\nvar Dot = \"¨\";\nvar dot = \"˙\";\nvar DotDot = \"⃜\";\nvar doteq = \"≐\";\nvar doteqdot = \"≑\";\nvar DotEqual = \"≐\";\nvar dotminus = \"∸\";\nvar dotplus = \"∔\";\nvar dotsquare = \"⊡\";\nvar doublebarwedge = \"⌆\";\nvar DoubleContourIntegral = \"∯\";\nvar DoubleDot = \"¨\";\nvar DoubleDownArrow = \"⇓\";\nvar DoubleLeftArrow = \"⇐\";\nvar DoubleLeftRightArrow = \"⇔\";\nvar DoubleLeftTee = \"⫤\";\nvar DoubleLongLeftArrow = \"⟸\";\nvar DoubleLongLeftRightArrow = \"⟺\";\nvar DoubleLongRightArrow = \"⟹\";\nvar DoubleRightArrow = \"⇒\";\nvar DoubleRightTee = \"⊨\";\nvar DoubleUpArrow = \"⇑\";\nvar DoubleUpDownArrow = \"⇕\";\nvar DoubleVerticalBar = \"∥\";\nvar DownArrowBar = \"⤓\";\nvar downarrow = \"↓\";\nvar DownArrow = \"↓\";\nvar Downarrow = \"⇓\";\nvar DownArrowUpArrow = \"⇵\";\nvar DownBreve = \"̑\";\nvar downdownarrows = \"⇊\";\nvar downharpoonleft = \"⇃\";\nvar downharpoonright = \"⇂\";\nvar DownLeftRightVector = \"⥐\";\nvar DownLeftTeeVector = \"⥞\";\nvar DownLeftVectorBar = \"⥖\";\nvar DownLeftVector = \"↽\";\nvar DownRightTeeVector = \"⥟\";\nvar DownRightVectorBar = \"⥗\";\nvar DownRightVector = \"⇁\";\nvar DownTeeArrow = \"↧\";\nvar DownTee = \"⊤\";\nvar drbkarow = \"⤐\";\nvar drcorn = \"⌟\";\nvar drcrop = \"⌌\";\nvar Dscr = \"𝒟\";\nvar dscr = \"𝒹\";\nvar DScy = \"Ѕ\";\nvar dscy = \"ѕ\";\nvar dsol = \"⧶\";\nvar Dstrok = \"Đ\";\nvar dstrok = \"đ\";\nvar dtdot = \"⋱\";\nvar dtri = \"▿\";\nvar dtrif = \"▾\";\nvar duarr = \"⇵\";\nvar duhar = \"⥯\";\nvar dwangle = \"⦦\";\nvar DZcy = \"Џ\";\nvar dzcy = \"џ\";\nvar dzigrarr = \"⟿\";\nvar Eacute$1 = \"É\";\nvar eacute$1 = \"é\";\nvar easter = \"⩮\";\nvar Ecaron = \"Ě\";\nvar ecaron = \"ě\";\nvar Ecirc$1 = \"Ê\";\nvar ecirc$1 = \"ê\";\nvar ecir = \"≖\";\nvar ecolon = \"≕\";\nvar Ecy = \"Э\";\nvar ecy = \"э\";\nvar eDDot = \"⩷\";\nvar Edot = \"Ė\";\nvar edot = \"ė\";\nvar eDot = \"≑\";\nvar ee = \"ⅇ\";\nvar efDot = \"≒\";\nvar Efr = \"𝔈\";\nvar efr = \"𝔢\";\nvar eg = \"⪚\";\nvar Egrave$1 = \"È\";\nvar egrave$1 = \"è\";\nvar egs = \"⪖\";\nvar egsdot = \"⪘\";\nvar el = \"⪙\";\nvar Element$1 = \"∈\";\nvar elinters = \"⏧\";\nvar ell = \"ℓ\";\nvar els = \"⪕\";\nvar elsdot = \"⪗\";\nvar Emacr = \"Ē\";\nvar emacr = \"ē\";\nvar empty = \"∅\";\nvar emptyset = \"∅\";\nvar EmptySmallSquare = \"◻\";\nvar emptyv = \"∅\";\nvar EmptyVerySmallSquare = \"▫\";\nvar emsp13 = \" \";\nvar emsp14 = \" \";\nvar emsp = \" \";\nvar ENG = \"Ŋ\";\nvar eng = \"ŋ\";\nvar ensp = \" \";\nvar Eogon = \"Ę\";\nvar eogon = \"ę\";\nvar Eopf = \"𝔼\";\nvar eopf = \"𝕖\";\nvar epar = \"⋕\";\nvar eparsl = \"⧣\";\nvar eplus = \"⩱\";\nvar epsi = \"ε\";\nvar Epsilon = \"Ε\";\nvar epsilon = \"ε\";\nvar epsiv = \"ϵ\";\nvar eqcirc = \"≖\";\nvar eqcolon = \"≕\";\nvar eqsim = \"≂\";\nvar eqslantgtr = \"⪖\";\nvar eqslantless = \"⪕\";\nvar Equal = \"⩵\";\nvar equals = \"=\";\nvar EqualTilde = \"≂\";\nvar equest = \"≟\";\nvar Equilibrium = \"⇌\";\nvar equiv = \"≡\";\nvar equivDD = \"⩸\";\nvar eqvparsl = \"⧥\";\nvar erarr = \"⥱\";\nvar erDot = \"≓\";\nvar escr = \"ℯ\";\nvar Escr = \"ℰ\";\nvar esdot = \"≐\";\nvar Esim = \"⩳\";\nvar esim = \"≂\";\nvar Eta = \"Η\";\nvar eta = \"η\";\nvar ETH$1 = \"Ð\";\nvar eth$1 = \"ð\";\nvar Euml$1 = \"Ë\";\nvar euml$1 = \"ë\";\nvar euro = \"€\";\nvar excl = \"!\";\nvar exist = \"∃\";\nvar Exists = \"∃\";\nvar expectation = \"ℰ\";\nvar exponentiale = \"ⅇ\";\nvar ExponentialE = \"ⅇ\";\nvar fallingdotseq = \"≒\";\nvar Fcy = \"Ф\";\nvar fcy = \"ф\";\nvar female = \"♀\";\nvar ffilig = \"ffi\";\nvar fflig = \"ff\";\nvar ffllig = \"ffl\";\nvar Ffr = \"𝔉\";\nvar ffr = \"𝔣\";\nvar filig = \"fi\";\nvar FilledSmallSquare = \"◼\";\nvar FilledVerySmallSquare = \"▪\";\nvar fjlig = \"fj\";\nvar flat = \"♭\";\nvar fllig = \"fl\";\nvar fltns = \"▱\";\nvar fnof = \"ƒ\";\nvar Fopf = \"𝔽\";\nvar fopf = \"𝕗\";\nvar forall = \"∀\";\nvar ForAll = \"∀\";\nvar fork = \"⋔\";\nvar forkv = \"⫙\";\nvar Fouriertrf = \"ℱ\";\nvar fpartint = \"⨍\";\nvar frac12$1 = \"½\";\nvar frac13 = \"⅓\";\nvar frac14$1 = \"¼\";\nvar frac15 = \"⅕\";\nvar frac16 = \"⅙\";\nvar frac18 = \"⅛\";\nvar frac23 = \"⅔\";\nvar frac25 = \"⅖\";\nvar frac34$1 = \"¾\";\nvar frac35 = \"⅗\";\nvar frac38 = \"⅜\";\nvar frac45 = \"⅘\";\nvar frac56 = \"⅚\";\nvar frac58 = \"⅝\";\nvar frac78 = \"⅞\";\nvar frasl = \"⁄\";\nvar frown = \"⌢\";\nvar fscr = \"𝒻\";\nvar Fscr = \"ℱ\";\nvar gacute = \"ǵ\";\nvar Gamma = \"Γ\";\nvar gamma = \"γ\";\nvar Gammad = \"Ϝ\";\nvar gammad = \"ϝ\";\nvar gap = \"⪆\";\nvar Gbreve = \"Ğ\";\nvar gbreve = \"ğ\";\nvar Gcedil = \"Ģ\";\nvar Gcirc = \"Ĝ\";\nvar gcirc = \"ĝ\";\nvar Gcy = \"Г\";\nvar gcy = \"г\";\nvar Gdot = \"Ġ\";\nvar gdot = \"ġ\";\nvar ge = \"≥\";\nvar gE = \"≧\";\nvar gEl = \"⪌\";\nvar gel = \"⋛\";\nvar geq = \"≥\";\nvar geqq = \"≧\";\nvar geqslant = \"⩾\";\nvar gescc = \"⪩\";\nvar ges = \"⩾\";\nvar gesdot = \"⪀\";\nvar gesdoto = \"⪂\";\nvar gesdotol = \"⪄\";\nvar gesl = \"⋛︀\";\nvar gesles = \"⪔\";\nvar Gfr = \"𝔊\";\nvar gfr = \"𝔤\";\nvar gg = \"≫\";\nvar Gg = \"⋙\";\nvar ggg = \"⋙\";\nvar gimel = \"ℷ\";\nvar GJcy = \"Ѓ\";\nvar gjcy = \"ѓ\";\nvar gla = \"⪥\";\nvar gl = \"≷\";\nvar glE = \"⪒\";\nvar glj = \"⪤\";\nvar gnap = \"⪊\";\nvar gnapprox = \"⪊\";\nvar gne = \"⪈\";\nvar gnE = \"≩\";\nvar gneq = \"⪈\";\nvar gneqq = \"≩\";\nvar gnsim = \"⋧\";\nvar Gopf = \"𝔾\";\nvar gopf = \"𝕘\";\nvar grave = \"`\";\nvar GreaterEqual = \"≥\";\nvar GreaterEqualLess = \"⋛\";\nvar GreaterFullEqual = \"≧\";\nvar GreaterGreater = \"⪢\";\nvar GreaterLess = \"≷\";\nvar GreaterSlantEqual = \"⩾\";\nvar GreaterTilde = \"≳\";\nvar Gscr = \"𝒢\";\nvar gscr = \"ℊ\";\nvar gsim = \"≳\";\nvar gsime = \"⪎\";\nvar gsiml = \"⪐\";\nvar gtcc = \"⪧\";\nvar gtcir = \"⩺\";\nvar gt$2 = \">\";\nvar GT$1 = \">\";\nvar Gt = \"≫\";\nvar gtdot = \"⋗\";\nvar gtlPar = \"⦕\";\nvar gtquest = \"⩼\";\nvar gtrapprox = \"⪆\";\nvar gtrarr = \"⥸\";\nvar gtrdot = \"⋗\";\nvar gtreqless = \"⋛\";\nvar gtreqqless = \"⪌\";\nvar gtrless = \"≷\";\nvar gtrsim = \"≳\";\nvar gvertneqq = \"≩︀\";\nvar gvnE = \"≩︀\";\nvar Hacek = \"ˇ\";\nvar hairsp = \" \";\nvar half = \"½\";\nvar hamilt = \"ℋ\";\nvar HARDcy = \"Ъ\";\nvar hardcy = \"ъ\";\nvar harrcir = \"⥈\";\nvar harr = \"↔\";\nvar hArr = \"⇔\";\nvar harrw = \"↭\";\nvar Hat = \"^\";\nvar hbar = \"ℏ\";\nvar Hcirc = \"Ĥ\";\nvar hcirc = \"ĥ\";\nvar hearts = \"♥\";\nvar heartsuit = \"♥\";\nvar hellip = \"…\";\nvar hercon = \"⊹\";\nvar hfr = \"𝔥\";\nvar Hfr = \"ℌ\";\nvar HilbertSpace = \"ℋ\";\nvar hksearow = \"⤥\";\nvar hkswarow = \"⤦\";\nvar hoarr = \"⇿\";\nvar homtht = \"∻\";\nvar hookleftarrow = \"↩\";\nvar hookrightarrow = \"↪\";\nvar hopf = \"𝕙\";\nvar Hopf = \"ℍ\";\nvar horbar = \"―\";\nvar HorizontalLine = \"─\";\nvar hscr = \"𝒽\";\nvar Hscr = \"ℋ\";\nvar hslash = \"ℏ\";\nvar Hstrok = \"Ħ\";\nvar hstrok = \"ħ\";\nvar HumpDownHump = \"≎\";\nvar HumpEqual = \"≏\";\nvar hybull = \"⁃\";\nvar hyphen = \"‐\";\nvar Iacute$1 = \"Í\";\nvar iacute$1 = \"í\";\nvar ic = \"⁣\";\nvar Icirc$1 = \"Î\";\nvar icirc$1 = \"î\";\nvar Icy = \"И\";\nvar icy = \"и\";\nvar Idot = \"İ\";\nvar IEcy = \"Е\";\nvar iecy = \"е\";\nvar iexcl$1 = \"¡\";\nvar iff = \"⇔\";\nvar ifr = \"𝔦\";\nvar Ifr = \"ℑ\";\nvar Igrave$1 = \"Ì\";\nvar igrave$1 = \"ì\";\nvar ii = \"ⅈ\";\nvar iiiint = \"⨌\";\nvar iiint = \"∭\";\nvar iinfin = \"⧜\";\nvar iiota = \"℩\";\nvar IJlig = \"IJ\";\nvar ijlig = \"ij\";\nvar Imacr = \"Ī\";\nvar imacr = \"ī\";\nvar image = \"ℑ\";\nvar ImaginaryI = \"ⅈ\";\nvar imagline = \"ℐ\";\nvar imagpart = \"ℑ\";\nvar imath = \"ı\";\nvar Im = \"ℑ\";\nvar imof = \"⊷\";\nvar imped = \"Ƶ\";\nvar Implies = \"⇒\";\nvar incare = \"℅\";\nvar infin = \"∞\";\nvar infintie = \"⧝\";\nvar inodot = \"ı\";\nvar intcal = \"⊺\";\nvar int = \"∫\";\nvar Int = \"∬\";\nvar integers = \"ℤ\";\nvar Integral = \"∫\";\nvar intercal = \"⊺\";\nvar Intersection = \"⋂\";\nvar intlarhk = \"⨗\";\nvar intprod = \"⨼\";\nvar InvisibleComma = \"⁣\";\nvar InvisibleTimes = \"⁢\";\nvar IOcy = \"Ё\";\nvar iocy = \"ё\";\nvar Iogon = \"Į\";\nvar iogon = \"į\";\nvar Iopf = \"𝕀\";\nvar iopf = \"𝕚\";\nvar Iota = \"Ι\";\nvar iota = \"ι\";\nvar iprod = \"⨼\";\nvar iquest$1 = \"¿\";\nvar iscr = \"𝒾\";\nvar Iscr = \"ℐ\";\nvar isin = \"∈\";\nvar isindot = \"⋵\";\nvar isinE = \"⋹\";\nvar isins = \"⋴\";\nvar isinsv = \"⋳\";\nvar isinv = \"∈\";\nvar it = \"⁢\";\nvar Itilde = \"Ĩ\";\nvar itilde = \"ĩ\";\nvar Iukcy = \"І\";\nvar iukcy = \"і\";\nvar Iuml$1 = \"Ï\";\nvar iuml$1 = \"ï\";\nvar Jcirc = \"Ĵ\";\nvar jcirc = \"ĵ\";\nvar Jcy = \"Й\";\nvar jcy = \"й\";\nvar Jfr = \"𝔍\";\nvar jfr = \"𝔧\";\nvar jmath = \"ȷ\";\nvar Jopf = \"𝕁\";\nvar jopf = \"𝕛\";\nvar Jscr = \"𝒥\";\nvar jscr = \"𝒿\";\nvar Jsercy = \"Ј\";\nvar jsercy = \"ј\";\nvar Jukcy = \"Є\";\nvar jukcy = \"є\";\nvar Kappa = \"Κ\";\nvar kappa = \"κ\";\nvar kappav = \"ϰ\";\nvar Kcedil = \"Ķ\";\nvar kcedil = \"ķ\";\nvar Kcy = \"К\";\nvar kcy = \"к\";\nvar Kfr = \"𝔎\";\nvar kfr = \"𝔨\";\nvar kgreen = \"ĸ\";\nvar KHcy = \"Х\";\nvar khcy = \"х\";\nvar KJcy = \"Ќ\";\nvar kjcy = \"ќ\";\nvar Kopf = \"𝕂\";\nvar kopf = \"𝕜\";\nvar Kscr = \"𝒦\";\nvar kscr = \"𝓀\";\nvar lAarr = \"⇚\";\nvar Lacute = \"Ĺ\";\nvar lacute = \"ĺ\";\nvar laemptyv = \"⦴\";\nvar lagran = \"ℒ\";\nvar Lambda = \"Λ\";\nvar lambda = \"λ\";\nvar lang = \"⟨\";\nvar Lang = \"⟪\";\nvar langd = \"⦑\";\nvar langle = \"⟨\";\nvar lap = \"⪅\";\nvar Laplacetrf = \"ℒ\";\nvar laquo$1 = \"«\";\nvar larrb = \"⇤\";\nvar larrbfs = \"⤟\";\nvar larr = \"←\";\nvar Larr = \"↞\";\nvar lArr = \"⇐\";\nvar larrfs = \"⤝\";\nvar larrhk = \"↩\";\nvar larrlp = \"↫\";\nvar larrpl = \"⤹\";\nvar larrsim = \"⥳\";\nvar larrtl = \"↢\";\nvar latail = \"⤙\";\nvar lAtail = \"⤛\";\nvar lat = \"⪫\";\nvar late = \"⪭\";\nvar lates = \"⪭︀\";\nvar lbarr = \"⤌\";\nvar lBarr = \"⤎\";\nvar lbbrk = \"❲\";\nvar lbrace = \"{\";\nvar lbrack = \"[\";\nvar lbrke = \"⦋\";\nvar lbrksld = \"⦏\";\nvar lbrkslu = \"⦍\";\nvar Lcaron = \"Ľ\";\nvar lcaron = \"ľ\";\nvar Lcedil = \"Ļ\";\nvar lcedil = \"ļ\";\nvar lceil = \"⌈\";\nvar lcub = \"{\";\nvar Lcy = \"Л\";\nvar lcy = \"л\";\nvar ldca = \"⤶\";\nvar ldquo = \"“\";\nvar ldquor = \"„\";\nvar ldrdhar = \"⥧\";\nvar ldrushar = \"⥋\";\nvar ldsh = \"↲\";\nvar le = \"≤\";\nvar lE = \"≦\";\nvar LeftAngleBracket = \"⟨\";\nvar LeftArrowBar = \"⇤\";\nvar leftarrow = \"←\";\nvar LeftArrow = \"←\";\nvar Leftarrow = \"⇐\";\nvar LeftArrowRightArrow = \"⇆\";\nvar leftarrowtail = \"↢\";\nvar LeftCeiling = \"⌈\";\nvar LeftDoubleBracket = \"⟦\";\nvar LeftDownTeeVector = \"⥡\";\nvar LeftDownVectorBar = \"⥙\";\nvar LeftDownVector = \"⇃\";\nvar LeftFloor = \"⌊\";\nvar leftharpoondown = \"↽\";\nvar leftharpoonup = \"↼\";\nvar leftleftarrows = \"⇇\";\nvar leftrightarrow = \"↔\";\nvar LeftRightArrow = \"↔\";\nvar Leftrightarrow = \"⇔\";\nvar leftrightarrows = \"⇆\";\nvar leftrightharpoons = \"⇋\";\nvar leftrightsquigarrow = \"↭\";\nvar LeftRightVector = \"⥎\";\nvar LeftTeeArrow = \"↤\";\nvar LeftTee = \"⊣\";\nvar LeftTeeVector = \"⥚\";\nvar leftthreetimes = \"⋋\";\nvar LeftTriangleBar = \"⧏\";\nvar LeftTriangle = \"⊲\";\nvar LeftTriangleEqual = \"⊴\";\nvar LeftUpDownVector = \"⥑\";\nvar LeftUpTeeVector = \"⥠\";\nvar LeftUpVectorBar = \"⥘\";\nvar LeftUpVector = \"↿\";\nvar LeftVectorBar = \"⥒\";\nvar LeftVector = \"↼\";\nvar lEg = \"⪋\";\nvar leg = \"⋚\";\nvar leq = \"≤\";\nvar leqq = \"≦\";\nvar leqslant = \"⩽\";\nvar lescc = \"⪨\";\nvar les = \"⩽\";\nvar lesdot = \"⩿\";\nvar lesdoto = \"⪁\";\nvar lesdotor = \"⪃\";\nvar lesg = \"⋚︀\";\nvar lesges = \"⪓\";\nvar lessapprox = \"⪅\";\nvar lessdot = \"⋖\";\nvar lesseqgtr = \"⋚\";\nvar lesseqqgtr = \"⪋\";\nvar LessEqualGreater = \"⋚\";\nvar LessFullEqual = \"≦\";\nvar LessGreater = \"≶\";\nvar lessgtr = \"≶\";\nvar LessLess = \"⪡\";\nvar lesssim = \"≲\";\nvar LessSlantEqual = \"⩽\";\nvar LessTilde = \"≲\";\nvar lfisht = \"⥼\";\nvar lfloor = \"⌊\";\nvar Lfr = \"𝔏\";\nvar lfr = \"𝔩\";\nvar lg = \"≶\";\nvar lgE = \"⪑\";\nvar lHar = \"⥢\";\nvar lhard = \"↽\";\nvar lharu = \"↼\";\nvar lharul = \"⥪\";\nvar lhblk = \"▄\";\nvar LJcy = \"Љ\";\nvar ljcy = \"љ\";\nvar llarr = \"⇇\";\nvar ll = \"≪\";\nvar Ll = \"⋘\";\nvar llcorner = \"⌞\";\nvar Lleftarrow = \"⇚\";\nvar llhard = \"⥫\";\nvar lltri = \"◺\";\nvar Lmidot = \"Ŀ\";\nvar lmidot = \"ŀ\";\nvar lmoustache = \"⎰\";\nvar lmoust = \"⎰\";\nvar lnap = \"⪉\";\nvar lnapprox = \"⪉\";\nvar lne = \"⪇\";\nvar lnE = \"≨\";\nvar lneq = \"⪇\";\nvar lneqq = \"≨\";\nvar lnsim = \"⋦\";\nvar loang = \"⟬\";\nvar loarr = \"⇽\";\nvar lobrk = \"⟦\";\nvar longleftarrow = \"⟵\";\nvar LongLeftArrow = \"⟵\";\nvar Longleftarrow = \"⟸\";\nvar longleftrightarrow = \"⟷\";\nvar LongLeftRightArrow = \"⟷\";\nvar Longleftrightarrow = \"⟺\";\nvar longmapsto = \"⟼\";\nvar longrightarrow = \"⟶\";\nvar LongRightArrow = \"⟶\";\nvar Longrightarrow = \"⟹\";\nvar looparrowleft = \"↫\";\nvar looparrowright = \"↬\";\nvar lopar = \"⦅\";\nvar Lopf = \"𝕃\";\nvar lopf = \"𝕝\";\nvar loplus = \"⨭\";\nvar lotimes = \"⨴\";\nvar lowast = \"∗\";\nvar lowbar = \"_\";\nvar LowerLeftArrow = \"↙\";\nvar LowerRightArrow = \"↘\";\nvar loz = \"◊\";\nvar lozenge = \"◊\";\nvar lozf = \"⧫\";\nvar lpar = \"(\";\nvar lparlt = \"⦓\";\nvar lrarr = \"⇆\";\nvar lrcorner = \"⌟\";\nvar lrhar = \"⇋\";\nvar lrhard = \"⥭\";\nvar lrm = \"‎\";\nvar lrtri = \"⊿\";\nvar lsaquo = \"‹\";\nvar lscr = \"𝓁\";\nvar Lscr = \"ℒ\";\nvar lsh = \"↰\";\nvar Lsh = \"↰\";\nvar lsim = \"≲\";\nvar lsime = \"⪍\";\nvar lsimg = \"⪏\";\nvar lsqb = \"[\";\nvar lsquo = \"‘\";\nvar lsquor = \"‚\";\nvar Lstrok = \"Ł\";\nvar lstrok = \"ł\";\nvar ltcc = \"⪦\";\nvar ltcir = \"⩹\";\nvar lt$2 = \"<\";\nvar LT$1 = \"<\";\nvar Lt = \"≪\";\nvar ltdot = \"⋖\";\nvar lthree = \"⋋\";\nvar ltimes = \"⋉\";\nvar ltlarr = \"⥶\";\nvar ltquest = \"⩻\";\nvar ltri = \"◃\";\nvar ltrie = \"⊴\";\nvar ltrif = \"◂\";\nvar ltrPar = \"⦖\";\nvar lurdshar = \"⥊\";\nvar luruhar = \"⥦\";\nvar lvertneqq = \"≨︀\";\nvar lvnE = \"≨︀\";\nvar macr$1 = \"¯\";\nvar male = \"♂\";\nvar malt = \"✠\";\nvar maltese = \"✠\";\nvar map = \"↦\";\nvar mapsto = \"↦\";\nvar mapstodown = \"↧\";\nvar mapstoleft = \"↤\";\nvar mapstoup = \"↥\";\nvar marker = \"▮\";\nvar mcomma = \"⨩\";\nvar Mcy = \"М\";\nvar mcy = \"м\";\nvar mdash = \"—\";\nvar mDDot = \"∺\";\nvar measuredangle = \"∡\";\nvar MediumSpace = \" \";\nvar Mellintrf = \"ℳ\";\nvar Mfr = \"𝔐\";\nvar mfr = \"𝔪\";\nvar mho = \"℧\";\nvar micro$1 = \"µ\";\nvar midast = \"*\";\nvar midcir = \"⫰\";\nvar mid = \"∣\";\nvar middot$1 = \"·\";\nvar minusb = \"⊟\";\nvar minus = \"−\";\nvar minusd = \"∸\";\nvar minusdu = \"⨪\";\nvar MinusPlus = \"∓\";\nvar mlcp = \"⫛\";\nvar mldr = \"…\";\nvar mnplus = \"∓\";\nvar models = \"⊧\";\nvar Mopf = \"𝕄\";\nvar mopf = \"𝕞\";\nvar mp = \"∓\";\nvar mscr = \"𝓂\";\nvar Mscr = \"ℳ\";\nvar mstpos = \"∾\";\nvar Mu = \"Μ\";\nvar mu = \"μ\";\nvar multimap = \"⊸\";\nvar mumap = \"⊸\";\nvar nabla = \"∇\";\nvar Nacute = \"Ń\";\nvar nacute = \"ń\";\nvar nang = \"∠⃒\";\nvar nap = \"≉\";\nvar napE = \"⩰̸\";\nvar napid = \"≋̸\";\nvar napos = \"ʼn\";\nvar napprox = \"≉\";\nvar natural = \"♮\";\nvar naturals = \"ℕ\";\nvar natur = \"♮\";\nvar nbsp$1 = \" \";\nvar nbump = \"≎̸\";\nvar nbumpe = \"≏̸\";\nvar ncap = \"⩃\";\nvar Ncaron = \"Ň\";\nvar ncaron = \"ň\";\nvar Ncedil = \"Ņ\";\nvar ncedil = \"ņ\";\nvar ncong = \"≇\";\nvar ncongdot = \"⩭̸\";\nvar ncup = \"⩂\";\nvar Ncy = \"Н\";\nvar ncy = \"н\";\nvar ndash = \"–\";\nvar nearhk = \"⤤\";\nvar nearr = \"↗\";\nvar neArr = \"⇗\";\nvar nearrow = \"↗\";\nvar ne = \"≠\";\nvar nedot = \"≐̸\";\nvar NegativeMediumSpace = \"​\";\nvar NegativeThickSpace = \"​\";\nvar NegativeThinSpace = \"​\";\nvar NegativeVeryThinSpace = \"​\";\nvar nequiv = \"≢\";\nvar nesear = \"⤨\";\nvar nesim = \"≂̸\";\nvar NestedGreaterGreater = \"≫\";\nvar NestedLessLess = \"≪\";\nvar NewLine = \"\\n\";\nvar nexist = \"∄\";\nvar nexists = \"∄\";\nvar Nfr = \"𝔑\";\nvar nfr = \"𝔫\";\nvar ngE = \"≧̸\";\nvar nge = \"≱\";\nvar ngeq = \"≱\";\nvar ngeqq = \"≧̸\";\nvar ngeqslant = \"⩾̸\";\nvar nges = \"⩾̸\";\nvar nGg = \"⋙̸\";\nvar ngsim = \"≵\";\nvar nGt = \"≫⃒\";\nvar ngt = \"≯\";\nvar ngtr = \"≯\";\nvar nGtv = \"≫̸\";\nvar nharr = \"↮\";\nvar nhArr = \"⇎\";\nvar nhpar = \"⫲\";\nvar ni = \"∋\";\nvar nis = \"⋼\";\nvar nisd = \"⋺\";\nvar niv = \"∋\";\nvar NJcy = \"Њ\";\nvar njcy = \"њ\";\nvar nlarr = \"↚\";\nvar nlArr = \"⇍\";\nvar nldr = \"‥\";\nvar nlE = \"≦̸\";\nvar nle = \"≰\";\nvar nleftarrow = \"↚\";\nvar nLeftarrow = \"⇍\";\nvar nleftrightarrow = \"↮\";\nvar nLeftrightarrow = \"⇎\";\nvar nleq = \"≰\";\nvar nleqq = \"≦̸\";\nvar nleqslant = \"⩽̸\";\nvar nles = \"⩽̸\";\nvar nless = \"≮\";\nvar nLl = \"⋘̸\";\nvar nlsim = \"≴\";\nvar nLt = \"≪⃒\";\nvar nlt = \"≮\";\nvar nltri = \"⋪\";\nvar nltrie = \"⋬\";\nvar nLtv = \"≪̸\";\nvar nmid = \"∤\";\nvar NoBreak = \"⁠\";\nvar NonBreakingSpace = \" \";\nvar nopf = \"𝕟\";\nvar Nopf = \"ℕ\";\nvar Not = \"⫬\";\nvar not$1 = \"¬\";\nvar NotCongruent = \"≢\";\nvar NotCupCap = \"≭\";\nvar NotDoubleVerticalBar = \"∦\";\nvar NotElement = \"∉\";\nvar NotEqual = \"≠\";\nvar NotEqualTilde = \"≂̸\";\nvar NotExists = \"∄\";\nvar NotGreater = \"≯\";\nvar NotGreaterEqual = \"≱\";\nvar NotGreaterFullEqual = \"≧̸\";\nvar NotGreaterGreater = \"≫̸\";\nvar NotGreaterLess = \"≹\";\nvar NotGreaterSlantEqual = \"⩾̸\";\nvar NotGreaterTilde = \"≵\";\nvar NotHumpDownHump = \"≎̸\";\nvar NotHumpEqual = \"≏̸\";\nvar notin = \"∉\";\nvar notindot = \"⋵̸\";\nvar notinE = \"⋹̸\";\nvar notinva = \"∉\";\nvar notinvb = \"⋷\";\nvar notinvc = \"⋶\";\nvar NotLeftTriangleBar = \"⧏̸\";\nvar NotLeftTriangle = \"⋪\";\nvar NotLeftTriangleEqual = \"⋬\";\nvar NotLess = \"≮\";\nvar NotLessEqual = \"≰\";\nvar NotLessGreater = \"≸\";\nvar NotLessLess = \"≪̸\";\nvar NotLessSlantEqual = \"⩽̸\";\nvar NotLessTilde = \"≴\";\nvar NotNestedGreaterGreater = \"⪢̸\";\nvar NotNestedLessLess = \"⪡̸\";\nvar notni = \"∌\";\nvar notniva = \"∌\";\nvar notnivb = \"⋾\";\nvar notnivc = \"⋽\";\nvar NotPrecedes = \"⊀\";\nvar NotPrecedesEqual = \"⪯̸\";\nvar NotPrecedesSlantEqual = \"⋠\";\nvar NotReverseElement = \"∌\";\nvar NotRightTriangleBar = \"⧐̸\";\nvar NotRightTriangle = \"⋫\";\nvar NotRightTriangleEqual = \"⋭\";\nvar NotSquareSubset = \"⊏̸\";\nvar NotSquareSubsetEqual = \"⋢\";\nvar NotSquareSuperset = \"⊐̸\";\nvar NotSquareSupersetEqual = \"⋣\";\nvar NotSubset = \"⊂⃒\";\nvar NotSubsetEqual = \"⊈\";\nvar NotSucceeds = \"⊁\";\nvar NotSucceedsEqual = \"⪰̸\";\nvar NotSucceedsSlantEqual = \"⋡\";\nvar NotSucceedsTilde = \"≿̸\";\nvar NotSuperset = \"⊃⃒\";\nvar NotSupersetEqual = \"⊉\";\nvar NotTilde = \"≁\";\nvar NotTildeEqual = \"≄\";\nvar NotTildeFullEqual = \"≇\";\nvar NotTildeTilde = \"≉\";\nvar NotVerticalBar = \"∤\";\nvar nparallel = \"∦\";\nvar npar = \"∦\";\nvar nparsl = \"⫽⃥\";\nvar npart = \"∂̸\";\nvar npolint = \"⨔\";\nvar npr = \"⊀\";\nvar nprcue = \"⋠\";\nvar nprec = \"⊀\";\nvar npreceq = \"⪯̸\";\nvar npre = \"⪯̸\";\nvar nrarrc = \"⤳̸\";\nvar nrarr = \"↛\";\nvar nrArr = \"⇏\";\nvar nrarrw = \"↝̸\";\nvar nrightarrow = \"↛\";\nvar nRightarrow = \"⇏\";\nvar nrtri = \"⋫\";\nvar nrtrie = \"⋭\";\nvar nsc = \"⊁\";\nvar nsccue = \"⋡\";\nvar nsce = \"⪰̸\";\nvar Nscr = \"𝒩\";\nvar nscr = \"𝓃\";\nvar nshortmid = \"∤\";\nvar nshortparallel = \"∦\";\nvar nsim = \"≁\";\nvar nsime = \"≄\";\nvar nsimeq = \"≄\";\nvar nsmid = \"∤\";\nvar nspar = \"∦\";\nvar nsqsube = \"⋢\";\nvar nsqsupe = \"⋣\";\nvar nsub = \"⊄\";\nvar nsubE = \"⫅̸\";\nvar nsube = \"⊈\";\nvar nsubset = \"⊂⃒\";\nvar nsubseteq = \"⊈\";\nvar nsubseteqq = \"⫅̸\";\nvar nsucc = \"⊁\";\nvar nsucceq = \"⪰̸\";\nvar nsup = \"⊅\";\nvar nsupE = \"⫆̸\";\nvar nsupe = \"⊉\";\nvar nsupset = \"⊃⃒\";\nvar nsupseteq = \"⊉\";\nvar nsupseteqq = \"⫆̸\";\nvar ntgl = \"≹\";\nvar Ntilde$1 = \"Ñ\";\nvar ntilde$1 = \"ñ\";\nvar ntlg = \"≸\";\nvar ntriangleleft = \"⋪\";\nvar ntrianglelefteq = \"⋬\";\nvar ntriangleright = \"⋫\";\nvar ntrianglerighteq = \"⋭\";\nvar Nu = \"Ν\";\nvar nu = \"ν\";\nvar num = \"#\";\nvar numero = \"№\";\nvar numsp = \" \";\nvar nvap = \"≍⃒\";\nvar nvdash = \"⊬\";\nvar nvDash = \"⊭\";\nvar nVdash = \"⊮\";\nvar nVDash = \"⊯\";\nvar nvge = \"≥⃒\";\nvar nvgt = \">⃒\";\nvar nvHarr = \"⤄\";\nvar nvinfin = \"⧞\";\nvar nvlArr = \"⤂\";\nvar nvle = \"≤⃒\";\nvar nvlt = \"<⃒\";\nvar nvltrie = \"⊴⃒\";\nvar nvrArr = \"⤃\";\nvar nvrtrie = \"⊵⃒\";\nvar nvsim = \"∼⃒\";\nvar nwarhk = \"⤣\";\nvar nwarr = \"↖\";\nvar nwArr = \"⇖\";\nvar nwarrow = \"↖\";\nvar nwnear = \"⤧\";\nvar Oacute$1 = \"Ó\";\nvar oacute$1 = \"ó\";\nvar oast = \"⊛\";\nvar Ocirc$1 = \"Ô\";\nvar ocirc$1 = \"ô\";\nvar ocir = \"⊚\";\nvar Ocy = \"О\";\nvar ocy = \"о\";\nvar odash = \"⊝\";\nvar Odblac = \"Ő\";\nvar odblac = \"ő\";\nvar odiv = \"⨸\";\nvar odot = \"⊙\";\nvar odsold = \"⦼\";\nvar OElig = \"Œ\";\nvar oelig = \"œ\";\nvar ofcir = \"⦿\";\nvar Ofr = \"𝔒\";\nvar ofr = \"𝔬\";\nvar ogon = \"˛\";\nvar Ograve$1 = \"Ò\";\nvar ograve$1 = \"ò\";\nvar ogt = \"⧁\";\nvar ohbar = \"⦵\";\nvar ohm = \"Ω\";\nvar oint = \"∮\";\nvar olarr = \"↺\";\nvar olcir = \"⦾\";\nvar olcross = \"⦻\";\nvar oline = \"‾\";\nvar olt = \"⧀\";\nvar Omacr = \"Ō\";\nvar omacr = \"ō\";\nvar Omega = \"Ω\";\nvar omega = \"ω\";\nvar Omicron = \"Ο\";\nvar omicron = \"ο\";\nvar omid = \"⦶\";\nvar ominus = \"⊖\";\nvar Oopf = \"𝕆\";\nvar oopf = \"𝕠\";\nvar opar = \"⦷\";\nvar OpenCurlyDoubleQuote = \"“\";\nvar OpenCurlyQuote = \"‘\";\nvar operp = \"⦹\";\nvar oplus = \"⊕\";\nvar orarr = \"↻\";\nvar Or = \"⩔\";\nvar or = \"∨\";\nvar ord = \"⩝\";\nvar order = \"ℴ\";\nvar orderof = \"ℴ\";\nvar ordf$1 = \"ª\";\nvar ordm$1 = \"º\";\nvar origof = \"⊶\";\nvar oror = \"⩖\";\nvar orslope = \"⩗\";\nvar orv = \"⩛\";\nvar oS = \"Ⓢ\";\nvar Oscr = \"𝒪\";\nvar oscr = \"ℴ\";\nvar Oslash$1 = \"Ø\";\nvar oslash$1 = \"ø\";\nvar osol = \"⊘\";\nvar Otilde$1 = \"Õ\";\nvar otilde$1 = \"õ\";\nvar otimesas = \"⨶\";\nvar Otimes = \"⨷\";\nvar otimes = \"⊗\";\nvar Ouml$1 = \"Ö\";\nvar ouml$1 = \"ö\";\nvar ovbar = \"⌽\";\nvar OverBar = \"‾\";\nvar OverBrace = \"⏞\";\nvar OverBracket = \"⎴\";\nvar OverParenthesis = \"⏜\";\nvar para$1 = \"¶\";\nvar parallel = \"∥\";\nvar par = \"∥\";\nvar parsim = \"⫳\";\nvar parsl = \"⫽\";\nvar part = \"∂\";\nvar PartialD = \"∂\";\nvar Pcy = \"П\";\nvar pcy = \"п\";\nvar percnt = \"%\";\nvar period = \".\";\nvar permil = \"‰\";\nvar perp = \"⊥\";\nvar pertenk = \"‱\";\nvar Pfr = \"𝔓\";\nvar pfr = \"𝔭\";\nvar Phi = \"Φ\";\nvar phi = \"φ\";\nvar phiv = \"ϕ\";\nvar phmmat = \"ℳ\";\nvar phone = \"☎\";\nvar Pi = \"Π\";\nvar pi = \"π\";\nvar pitchfork = \"⋔\";\nvar piv = \"ϖ\";\nvar planck = \"ℏ\";\nvar planckh = \"ℎ\";\nvar plankv = \"ℏ\";\nvar plusacir = \"⨣\";\nvar plusb = \"⊞\";\nvar pluscir = \"⨢\";\nvar plus = \"+\";\nvar plusdo = \"∔\";\nvar plusdu = \"⨥\";\nvar pluse = \"⩲\";\nvar PlusMinus = \"±\";\nvar plusmn$1 = \"±\";\nvar plussim = \"⨦\";\nvar plustwo = \"⨧\";\nvar pm = \"±\";\nvar Poincareplane = \"ℌ\";\nvar pointint = \"⨕\";\nvar popf = \"𝕡\";\nvar Popf = \"ℙ\";\nvar pound$1 = \"£\";\nvar prap = \"⪷\";\nvar Pr = \"⪻\";\nvar pr = \"≺\";\nvar prcue = \"≼\";\nvar precapprox = \"⪷\";\nvar prec = \"≺\";\nvar preccurlyeq = \"≼\";\nvar Precedes = \"≺\";\nvar PrecedesEqual = \"⪯\";\nvar PrecedesSlantEqual = \"≼\";\nvar PrecedesTilde = \"≾\";\nvar preceq = \"⪯\";\nvar precnapprox = \"⪹\";\nvar precneqq = \"⪵\";\nvar precnsim = \"⋨\";\nvar pre = \"⪯\";\nvar prE = \"⪳\";\nvar precsim = \"≾\";\nvar prime = \"′\";\nvar Prime = \"″\";\nvar primes = \"ℙ\";\nvar prnap = \"⪹\";\nvar prnE = \"⪵\";\nvar prnsim = \"⋨\";\nvar prod = \"∏\";\nvar Product = \"∏\";\nvar profalar = \"⌮\";\nvar profline = \"⌒\";\nvar profsurf = \"⌓\";\nvar prop = \"∝\";\nvar Proportional = \"∝\";\nvar Proportion = \"∷\";\nvar propto = \"∝\";\nvar prsim = \"≾\";\nvar prurel = \"⊰\";\nvar Pscr = \"𝒫\";\nvar pscr = \"𝓅\";\nvar Psi = \"Ψ\";\nvar psi = \"ψ\";\nvar puncsp = \" \";\nvar Qfr = \"𝔔\";\nvar qfr = \"𝔮\";\nvar qint = \"⨌\";\nvar qopf = \"𝕢\";\nvar Qopf = \"ℚ\";\nvar qprime = \"⁗\";\nvar Qscr = \"𝒬\";\nvar qscr = \"𝓆\";\nvar quaternions = \"ℍ\";\nvar quatint = \"⨖\";\nvar quest = \"?\";\nvar questeq = \"≟\";\nvar quot$2 = \"\\\"\";\nvar QUOT$1 = \"\\\"\";\nvar rAarr = \"⇛\";\nvar race = \"∽̱\";\nvar Racute = \"Ŕ\";\nvar racute = \"ŕ\";\nvar radic = \"√\";\nvar raemptyv = \"⦳\";\nvar rang = \"⟩\";\nvar Rang = \"⟫\";\nvar rangd = \"⦒\";\nvar range = \"⦥\";\nvar rangle = \"⟩\";\nvar raquo$1 = \"»\";\nvar rarrap = \"⥵\";\nvar rarrb = \"⇥\";\nvar rarrbfs = \"⤠\";\nvar rarrc = \"⤳\";\nvar rarr = \"→\";\nvar Rarr = \"↠\";\nvar rArr = \"⇒\";\nvar rarrfs = \"⤞\";\nvar rarrhk = \"↪\";\nvar rarrlp = \"↬\";\nvar rarrpl = \"⥅\";\nvar rarrsim = \"⥴\";\nvar Rarrtl = \"⤖\";\nvar rarrtl = \"↣\";\nvar rarrw = \"↝\";\nvar ratail = \"⤚\";\nvar rAtail = \"⤜\";\nvar ratio = \"∶\";\nvar rationals = \"ℚ\";\nvar rbarr = \"⤍\";\nvar rBarr = \"⤏\";\nvar RBarr = \"⤐\";\nvar rbbrk = \"❳\";\nvar rbrace = \"}\";\nvar rbrack = \"]\";\nvar rbrke = \"⦌\";\nvar rbrksld = \"⦎\";\nvar rbrkslu = \"⦐\";\nvar Rcaron = \"Ř\";\nvar rcaron = \"ř\";\nvar Rcedil = \"Ŗ\";\nvar rcedil = \"ŗ\";\nvar rceil = \"⌉\";\nvar rcub = \"}\";\nvar Rcy = \"Р\";\nvar rcy = \"р\";\nvar rdca = \"⤷\";\nvar rdldhar = \"⥩\";\nvar rdquo = \"”\";\nvar rdquor = \"”\";\nvar rdsh = \"↳\";\nvar real = \"ℜ\";\nvar realine = \"ℛ\";\nvar realpart = \"ℜ\";\nvar reals = \"ℝ\";\nvar Re = \"ℜ\";\nvar rect = \"▭\";\nvar reg$1 = \"®\";\nvar REG$1 = \"®\";\nvar ReverseElement = \"∋\";\nvar ReverseEquilibrium = \"⇋\";\nvar ReverseUpEquilibrium = \"⥯\";\nvar rfisht = \"⥽\";\nvar rfloor = \"⌋\";\nvar rfr = \"𝔯\";\nvar Rfr = \"ℜ\";\nvar rHar = \"⥤\";\nvar rhard = \"⇁\";\nvar rharu = \"⇀\";\nvar rharul = \"⥬\";\nvar Rho = \"Ρ\";\nvar rho = \"ρ\";\nvar rhov = \"ϱ\";\nvar RightAngleBracket = \"⟩\";\nvar RightArrowBar = \"⇥\";\nvar rightarrow = \"→\";\nvar RightArrow = \"→\";\nvar Rightarrow = \"⇒\";\nvar RightArrowLeftArrow = \"⇄\";\nvar rightarrowtail = \"↣\";\nvar RightCeiling = \"⌉\";\nvar RightDoubleBracket = \"⟧\";\nvar RightDownTeeVector = \"⥝\";\nvar RightDownVectorBar = \"⥕\";\nvar RightDownVector = \"⇂\";\nvar RightFloor = \"⌋\";\nvar rightharpoondown = \"⇁\";\nvar rightharpoonup = \"⇀\";\nvar rightleftarrows = \"⇄\";\nvar rightleftharpoons = \"⇌\";\nvar rightrightarrows = \"⇉\";\nvar rightsquigarrow = \"↝\";\nvar RightTeeArrow = \"↦\";\nvar RightTee = \"⊢\";\nvar RightTeeVector = \"⥛\";\nvar rightthreetimes = \"⋌\";\nvar RightTriangleBar = \"⧐\";\nvar RightTriangle = \"⊳\";\nvar RightTriangleEqual = \"⊵\";\nvar RightUpDownVector = \"⥏\";\nvar RightUpTeeVector = \"⥜\";\nvar RightUpVectorBar = \"⥔\";\nvar RightUpVector = \"↾\";\nvar RightVectorBar = \"⥓\";\nvar RightVector = \"⇀\";\nvar ring = \"˚\";\nvar risingdotseq = \"≓\";\nvar rlarr = \"⇄\";\nvar rlhar = \"⇌\";\nvar rlm = \"‏\";\nvar rmoustache = \"⎱\";\nvar rmoust = \"⎱\";\nvar rnmid = \"⫮\";\nvar roang = \"⟭\";\nvar roarr = \"⇾\";\nvar robrk = \"⟧\";\nvar ropar = \"⦆\";\nvar ropf = \"𝕣\";\nvar Ropf = \"ℝ\";\nvar roplus = \"⨮\";\nvar rotimes = \"⨵\";\nvar RoundImplies = \"⥰\";\nvar rpar = \")\";\nvar rpargt = \"⦔\";\nvar rppolint = \"⨒\";\nvar rrarr = \"⇉\";\nvar Rrightarrow = \"⇛\";\nvar rsaquo = \"›\";\nvar rscr = \"𝓇\";\nvar Rscr = \"ℛ\";\nvar rsh = \"↱\";\nvar Rsh = \"↱\";\nvar rsqb = \"]\";\nvar rsquo = \"’\";\nvar rsquor = \"’\";\nvar rthree = \"⋌\";\nvar rtimes = \"⋊\";\nvar rtri = \"▹\";\nvar rtrie = \"⊵\";\nvar rtrif = \"▸\";\nvar rtriltri = \"⧎\";\nvar RuleDelayed = \"⧴\";\nvar ruluhar = \"⥨\";\nvar rx = \"℞\";\nvar Sacute = \"Ś\";\nvar sacute = \"ś\";\nvar sbquo = \"‚\";\nvar scap = \"⪸\";\nvar Scaron = \"Š\";\nvar scaron = \"š\";\nvar Sc = \"⪼\";\nvar sc = \"≻\";\nvar sccue = \"≽\";\nvar sce = \"⪰\";\nvar scE = \"⪴\";\nvar Scedil = \"Ş\";\nvar scedil = \"ş\";\nvar Scirc = \"Ŝ\";\nvar scirc = \"ŝ\";\nvar scnap = \"⪺\";\nvar scnE = \"⪶\";\nvar scnsim = \"⋩\";\nvar scpolint = \"⨓\";\nvar scsim = \"≿\";\nvar Scy = \"С\";\nvar scy = \"с\";\nvar sdotb = \"⊡\";\nvar sdot = \"⋅\";\nvar sdote = \"⩦\";\nvar searhk = \"⤥\";\nvar searr = \"↘\";\nvar seArr = \"⇘\";\nvar searrow = \"↘\";\nvar sect$1 = \"§\";\nvar semi = \";\";\nvar seswar = \"⤩\";\nvar setminus = \"∖\";\nvar setmn = \"∖\";\nvar sext = \"✶\";\nvar Sfr = \"𝔖\";\nvar sfr = \"𝔰\";\nvar sfrown = \"⌢\";\nvar sharp = \"♯\";\nvar SHCHcy = \"Щ\";\nvar shchcy = \"щ\";\nvar SHcy = \"Ш\";\nvar shcy = \"ш\";\nvar ShortDownArrow = \"↓\";\nvar ShortLeftArrow = \"←\";\nvar shortmid = \"∣\";\nvar shortparallel = \"∥\";\nvar ShortRightArrow = \"→\";\nvar ShortUpArrow = \"↑\";\nvar shy$1 = \"­\";\nvar Sigma = \"Σ\";\nvar sigma = \"σ\";\nvar sigmaf = \"ς\";\nvar sigmav = \"ς\";\nvar sim = \"∼\";\nvar simdot = \"⩪\";\nvar sime = \"≃\";\nvar simeq = \"≃\";\nvar simg = \"⪞\";\nvar simgE = \"⪠\";\nvar siml = \"⪝\";\nvar simlE = \"⪟\";\nvar simne = \"≆\";\nvar simplus = \"⨤\";\nvar simrarr = \"⥲\";\nvar slarr = \"←\";\nvar SmallCircle = \"∘\";\nvar smallsetminus = \"∖\";\nvar smashp = \"⨳\";\nvar smeparsl = \"⧤\";\nvar smid = \"∣\";\nvar smile = \"⌣\";\nvar smt = \"⪪\";\nvar smte = \"⪬\";\nvar smtes = \"⪬︀\";\nvar SOFTcy = \"Ь\";\nvar softcy = \"ь\";\nvar solbar = \"⌿\";\nvar solb = \"⧄\";\nvar sol = \"/\";\nvar Sopf = \"𝕊\";\nvar sopf = \"𝕤\";\nvar spades = \"♠\";\nvar spadesuit = \"♠\";\nvar spar = \"∥\";\nvar sqcap = \"⊓\";\nvar sqcaps = \"⊓︀\";\nvar sqcup = \"⊔\";\nvar sqcups = \"⊔︀\";\nvar Sqrt = \"√\";\nvar sqsub = \"⊏\";\nvar sqsube = \"⊑\";\nvar sqsubset = \"⊏\";\nvar sqsubseteq = \"⊑\";\nvar sqsup = \"⊐\";\nvar sqsupe = \"⊒\";\nvar sqsupset = \"⊐\";\nvar sqsupseteq = \"⊒\";\nvar square = \"□\";\nvar Square = \"□\";\nvar SquareIntersection = \"⊓\";\nvar SquareSubset = \"⊏\";\nvar SquareSubsetEqual = \"⊑\";\nvar SquareSuperset = \"⊐\";\nvar SquareSupersetEqual = \"⊒\";\nvar SquareUnion = \"⊔\";\nvar squarf = \"▪\";\nvar squ = \"□\";\nvar squf = \"▪\";\nvar srarr = \"→\";\nvar Sscr = \"𝒮\";\nvar sscr = \"𝓈\";\nvar ssetmn = \"∖\";\nvar ssmile = \"⌣\";\nvar sstarf = \"⋆\";\nvar Star = \"⋆\";\nvar star = \"☆\";\nvar starf = \"★\";\nvar straightepsilon = \"ϵ\";\nvar straightphi = \"ϕ\";\nvar strns = \"¯\";\nvar sub = \"⊂\";\nvar Sub = \"⋐\";\nvar subdot = \"⪽\";\nvar subE = \"⫅\";\nvar sube = \"⊆\";\nvar subedot = \"⫃\";\nvar submult = \"⫁\";\nvar subnE = \"⫋\";\nvar subne = \"⊊\";\nvar subplus = \"⪿\";\nvar subrarr = \"⥹\";\nvar subset = \"⊂\";\nvar Subset = \"⋐\";\nvar subseteq = \"⊆\";\nvar subseteqq = \"⫅\";\nvar SubsetEqual = \"⊆\";\nvar subsetneq = \"⊊\";\nvar subsetneqq = \"⫋\";\nvar subsim = \"⫇\";\nvar subsub = \"⫕\";\nvar subsup = \"⫓\";\nvar succapprox = \"⪸\";\nvar succ = \"≻\";\nvar succcurlyeq = \"≽\";\nvar Succeeds = \"≻\";\nvar SucceedsEqual = \"⪰\";\nvar SucceedsSlantEqual = \"≽\";\nvar SucceedsTilde = \"≿\";\nvar succeq = \"⪰\";\nvar succnapprox = \"⪺\";\nvar succneqq = \"⪶\";\nvar succnsim = \"⋩\";\nvar succsim = \"≿\";\nvar SuchThat = \"∋\";\nvar sum = \"∑\";\nvar Sum = \"∑\";\nvar sung = \"♪\";\nvar sup1$1 = \"¹\";\nvar sup2$1 = \"²\";\nvar sup3$1 = \"³\";\nvar sup = \"⊃\";\nvar Sup = \"⋑\";\nvar supdot = \"⪾\";\nvar supdsub = \"⫘\";\nvar supE = \"⫆\";\nvar supe = \"⊇\";\nvar supedot = \"⫄\";\nvar Superset = \"⊃\";\nvar SupersetEqual = \"⊇\";\nvar suphsol = \"⟉\";\nvar suphsub = \"⫗\";\nvar suplarr = \"⥻\";\nvar supmult = \"⫂\";\nvar supnE = \"⫌\";\nvar supne = \"⊋\";\nvar supplus = \"⫀\";\nvar supset = \"⊃\";\nvar Supset = \"⋑\";\nvar supseteq = \"⊇\";\nvar supseteqq = \"⫆\";\nvar supsetneq = \"⊋\";\nvar supsetneqq = \"⫌\";\nvar supsim = \"⫈\";\nvar supsub = \"⫔\";\nvar supsup = \"⫖\";\nvar swarhk = \"⤦\";\nvar swarr = \"↙\";\nvar swArr = \"⇙\";\nvar swarrow = \"↙\";\nvar swnwar = \"⤪\";\nvar szlig$1 = \"ß\";\nvar Tab = \"\\t\";\nvar target = \"⌖\";\nvar Tau = \"Τ\";\nvar tau = \"τ\";\nvar tbrk = \"⎴\";\nvar Tcaron = \"Ť\";\nvar tcaron = \"ť\";\nvar Tcedil = \"Ţ\";\nvar tcedil = \"ţ\";\nvar Tcy = \"Т\";\nvar tcy = \"т\";\nvar tdot = \"⃛\";\nvar telrec = \"⌕\";\nvar Tfr = \"𝔗\";\nvar tfr = \"𝔱\";\nvar there4 = \"∴\";\nvar therefore = \"∴\";\nvar Therefore = \"∴\";\nvar Theta = \"Θ\";\nvar theta = \"θ\";\nvar thetasym = \"ϑ\";\nvar thetav = \"ϑ\";\nvar thickapprox = \"≈\";\nvar thicksim = \"∼\";\nvar ThickSpace = \"  \";\nvar ThinSpace = \" \";\nvar thinsp = \" \";\nvar thkap = \"≈\";\nvar thksim = \"∼\";\nvar THORN$1 = \"Þ\";\nvar thorn$1 = \"þ\";\nvar tilde = \"˜\";\nvar Tilde = \"∼\";\nvar TildeEqual = \"≃\";\nvar TildeFullEqual = \"≅\";\nvar TildeTilde = \"≈\";\nvar timesbar = \"⨱\";\nvar timesb = \"⊠\";\nvar times$1 = \"×\";\nvar timesd = \"⨰\";\nvar tint = \"∭\";\nvar toea = \"⤨\";\nvar topbot = \"⌶\";\nvar topcir = \"⫱\";\nvar top = \"⊤\";\nvar Topf = \"𝕋\";\nvar topf = \"𝕥\";\nvar topfork = \"⫚\";\nvar tosa = \"⤩\";\nvar tprime = \"‴\";\nvar trade = \"™\";\nvar TRADE = \"™\";\nvar triangle = \"▵\";\nvar triangledown = \"▿\";\nvar triangleleft = \"◃\";\nvar trianglelefteq = \"⊴\";\nvar triangleq = \"≜\";\nvar triangleright = \"▹\";\nvar trianglerighteq = \"⊵\";\nvar tridot = \"◬\";\nvar trie = \"≜\";\nvar triminus = \"⨺\";\nvar TripleDot = \"⃛\";\nvar triplus = \"⨹\";\nvar trisb = \"⧍\";\nvar tritime = \"⨻\";\nvar trpezium = \"⏢\";\nvar Tscr = \"𝒯\";\nvar tscr = \"𝓉\";\nvar TScy = \"Ц\";\nvar tscy = \"ц\";\nvar TSHcy = \"Ћ\";\nvar tshcy = \"ћ\";\nvar Tstrok = \"Ŧ\";\nvar tstrok = \"ŧ\";\nvar twixt = \"≬\";\nvar twoheadleftarrow = \"↞\";\nvar twoheadrightarrow = \"↠\";\nvar Uacute$1 = \"Ú\";\nvar uacute$1 = \"ú\";\nvar uarr = \"↑\";\nvar Uarr = \"↟\";\nvar uArr = \"⇑\";\nvar Uarrocir = \"⥉\";\nvar Ubrcy = \"Ў\";\nvar ubrcy = \"ў\";\nvar Ubreve = \"Ŭ\";\nvar ubreve = \"ŭ\";\nvar Ucirc$1 = \"Û\";\nvar ucirc$1 = \"û\";\nvar Ucy = \"У\";\nvar ucy = \"у\";\nvar udarr = \"⇅\";\nvar Udblac = \"Ű\";\nvar udblac = \"ű\";\nvar udhar = \"⥮\";\nvar ufisht = \"⥾\";\nvar Ufr = \"𝔘\";\nvar ufr = \"𝔲\";\nvar Ugrave$1 = \"Ù\";\nvar ugrave$1 = \"ù\";\nvar uHar = \"⥣\";\nvar uharl = \"↿\";\nvar uharr = \"↾\";\nvar uhblk = \"▀\";\nvar ulcorn = \"⌜\";\nvar ulcorner = \"⌜\";\nvar ulcrop = \"⌏\";\nvar ultri = \"◸\";\nvar Umacr = \"Ū\";\nvar umacr = \"ū\";\nvar uml$1 = \"¨\";\nvar UnderBar = \"_\";\nvar UnderBrace = \"⏟\";\nvar UnderBracket = \"⎵\";\nvar UnderParenthesis = \"⏝\";\nvar Union = \"⋃\";\nvar UnionPlus = \"⊎\";\nvar Uogon = \"Ų\";\nvar uogon = \"ų\";\nvar Uopf = \"𝕌\";\nvar uopf = \"𝕦\";\nvar UpArrowBar = \"⤒\";\nvar uparrow = \"↑\";\nvar UpArrow = \"↑\";\nvar Uparrow = \"⇑\";\nvar UpArrowDownArrow = \"⇅\";\nvar updownarrow = \"↕\";\nvar UpDownArrow = \"↕\";\nvar Updownarrow = \"⇕\";\nvar UpEquilibrium = \"⥮\";\nvar upharpoonleft = \"↿\";\nvar upharpoonright = \"↾\";\nvar uplus = \"⊎\";\nvar UpperLeftArrow = \"↖\";\nvar UpperRightArrow = \"↗\";\nvar upsi = \"υ\";\nvar Upsi = \"ϒ\";\nvar upsih = \"ϒ\";\nvar Upsilon = \"Υ\";\nvar upsilon = \"υ\";\nvar UpTeeArrow = \"↥\";\nvar UpTee = \"⊥\";\nvar upuparrows = \"⇈\";\nvar urcorn = \"⌝\";\nvar urcorner = \"⌝\";\nvar urcrop = \"⌎\";\nvar Uring = \"Ů\";\nvar uring = \"ů\";\nvar urtri = \"◹\";\nvar Uscr = \"𝒰\";\nvar uscr = \"𝓊\";\nvar utdot = \"⋰\";\nvar Utilde = \"Ũ\";\nvar utilde = \"ũ\";\nvar utri = \"▵\";\nvar utrif = \"▴\";\nvar uuarr = \"⇈\";\nvar Uuml$1 = \"Ü\";\nvar uuml$1 = \"ü\";\nvar uwangle = \"⦧\";\nvar vangrt = \"⦜\";\nvar varepsilon = \"ϵ\";\nvar varkappa = \"ϰ\";\nvar varnothing = \"∅\";\nvar varphi = \"ϕ\";\nvar varpi = \"ϖ\";\nvar varpropto = \"∝\";\nvar varr = \"↕\";\nvar vArr = \"⇕\";\nvar varrho = \"ϱ\";\nvar varsigma = \"ς\";\nvar varsubsetneq = \"⊊︀\";\nvar varsubsetneqq = \"⫋︀\";\nvar varsupsetneq = \"⊋︀\";\nvar varsupsetneqq = \"⫌︀\";\nvar vartheta = \"ϑ\";\nvar vartriangleleft = \"⊲\";\nvar vartriangleright = \"⊳\";\nvar vBar = \"⫨\";\nvar Vbar = \"⫫\";\nvar vBarv = \"⫩\";\nvar Vcy = \"В\";\nvar vcy = \"в\";\nvar vdash = \"⊢\";\nvar vDash = \"⊨\";\nvar Vdash = \"⊩\";\nvar VDash = \"⊫\";\nvar Vdashl = \"⫦\";\nvar veebar = \"⊻\";\nvar vee = \"∨\";\nvar Vee = \"⋁\";\nvar veeeq = \"≚\";\nvar vellip = \"⋮\";\nvar verbar = \"|\";\nvar Verbar = \"‖\";\nvar vert = \"|\";\nvar Vert = \"‖\";\nvar VerticalBar = \"∣\";\nvar VerticalLine = \"|\";\nvar VerticalSeparator = \"❘\";\nvar VerticalTilde = \"≀\";\nvar VeryThinSpace = \" \";\nvar Vfr = \"𝔙\";\nvar vfr = \"𝔳\";\nvar vltri = \"⊲\";\nvar vnsub = \"⊂⃒\";\nvar vnsup = \"⊃⃒\";\nvar Vopf = \"𝕍\";\nvar vopf = \"𝕧\";\nvar vprop = \"∝\";\nvar vrtri = \"⊳\";\nvar Vscr = \"𝒱\";\nvar vscr = \"𝓋\";\nvar vsubnE = \"⫋︀\";\nvar vsubne = \"⊊︀\";\nvar vsupnE = \"⫌︀\";\nvar vsupne = \"⊋︀\";\nvar Vvdash = \"⊪\";\nvar vzigzag = \"⦚\";\nvar Wcirc = \"Ŵ\";\nvar wcirc = \"ŵ\";\nvar wedbar = \"⩟\";\nvar wedge = \"∧\";\nvar Wedge = \"⋀\";\nvar wedgeq = \"≙\";\nvar weierp = \"℘\";\nvar Wfr = \"𝔚\";\nvar wfr = \"𝔴\";\nvar Wopf = \"𝕎\";\nvar wopf = \"𝕨\";\nvar wp = \"℘\";\nvar wr = \"≀\";\nvar wreath = \"≀\";\nvar Wscr = \"𝒲\";\nvar wscr = \"𝓌\";\nvar xcap = \"⋂\";\nvar xcirc = \"◯\";\nvar xcup = \"⋃\";\nvar xdtri = \"▽\";\nvar Xfr = \"𝔛\";\nvar xfr = \"𝔵\";\nvar xharr = \"⟷\";\nvar xhArr = \"⟺\";\nvar Xi = \"Ξ\";\nvar xi = \"ξ\";\nvar xlarr = \"⟵\";\nvar xlArr = \"⟸\";\nvar xmap = \"⟼\";\nvar xnis = \"⋻\";\nvar xodot = \"⨀\";\nvar Xopf = \"𝕏\";\nvar xopf = \"𝕩\";\nvar xoplus = \"⨁\";\nvar xotime = \"⨂\";\nvar xrarr = \"⟶\";\nvar xrArr = \"⟹\";\nvar Xscr = \"𝒳\";\nvar xscr = \"𝓍\";\nvar xsqcup = \"⨆\";\nvar xuplus = \"⨄\";\nvar xutri = \"△\";\nvar xvee = \"⋁\";\nvar xwedge = \"⋀\";\nvar Yacute$1 = \"Ý\";\nvar yacute$1 = \"ý\";\nvar YAcy = \"Я\";\nvar yacy = \"я\";\nvar Ycirc = \"Ŷ\";\nvar ycirc = \"ŷ\";\nvar Ycy = \"Ы\";\nvar ycy = \"ы\";\nvar yen$1 = \"¥\";\nvar Yfr = \"𝔜\";\nvar yfr = \"𝔶\";\nvar YIcy = \"Ї\";\nvar yicy = \"ї\";\nvar Yopf = \"𝕐\";\nvar yopf = \"𝕪\";\nvar Yscr = \"𝒴\";\nvar yscr = \"𝓎\";\nvar YUcy = \"Ю\";\nvar yucy = \"ю\";\nvar yuml$1 = \"ÿ\";\nvar Yuml = \"Ÿ\";\nvar Zacute = \"Ź\";\nvar zacute = \"ź\";\nvar Zcaron = \"Ž\";\nvar zcaron = \"ž\";\nvar Zcy = \"З\";\nvar zcy = \"з\";\nvar Zdot = \"Ż\";\nvar zdot = \"ż\";\nvar zeetrf = \"ℨ\";\nvar ZeroWidthSpace = \"​\";\nvar Zeta = \"Ζ\";\nvar zeta = \"ζ\";\nvar zfr = \"𝔷\";\nvar Zfr = \"ℨ\";\nvar ZHcy = \"Ж\";\nvar zhcy = \"ж\";\nvar zigrarr = \"⇝\";\nvar zopf = \"𝕫\";\nvar Zopf = \"ℤ\";\nvar Zscr = \"𝒵\";\nvar zscr = \"𝓏\";\nvar zwj = \"‍\";\nvar zwnj = \"‌\";\nvar require$$1$1 = {\n\tAacute: Aacute$1,\n\taacute: aacute$1,\n\tAbreve: Abreve,\n\tabreve: abreve,\n\tac: ac,\n\tacd: acd,\n\tacE: acE,\n\tAcirc: Acirc$1,\n\tacirc: acirc$1,\n\tacute: acute$1,\n\tAcy: Acy,\n\tacy: acy,\n\tAElig: AElig$1,\n\taelig: aelig$1,\n\taf: af,\n\tAfr: Afr,\n\tafr: afr,\n\tAgrave: Agrave$1,\n\tagrave: agrave$1,\n\talefsym: alefsym,\n\taleph: aleph,\n\tAlpha: Alpha,\n\talpha: alpha,\n\tAmacr: Amacr,\n\tamacr: amacr,\n\tamalg: amalg,\n\tamp: amp$2,\n\tAMP: AMP$1,\n\tandand: andand,\n\tAnd: And,\n\tand: and,\n\tandd: andd,\n\tandslope: andslope,\n\tandv: andv,\n\tang: ang,\n\tange: ange,\n\tangle: angle,\n\tangmsdaa: angmsdaa,\n\tangmsdab: angmsdab,\n\tangmsdac: angmsdac,\n\tangmsdad: angmsdad,\n\tangmsdae: angmsdae,\n\tangmsdaf: angmsdaf,\n\tangmsdag: angmsdag,\n\tangmsdah: angmsdah,\n\tangmsd: angmsd,\n\tangrt: angrt,\n\tangrtvb: angrtvb,\n\tangrtvbd: angrtvbd,\n\tangsph: angsph,\n\tangst: angst,\n\tangzarr: angzarr,\n\tAogon: Aogon,\n\taogon: aogon,\n\tAopf: Aopf,\n\taopf: aopf,\n\tapacir: apacir,\n\tap: ap,\n\tapE: apE,\n\tape: ape,\n\tapid: apid,\n\tapos: apos$1,\n\tApplyFunction: ApplyFunction,\n\tapprox: approx,\n\tapproxeq: approxeq,\n\tAring: Aring$1,\n\taring: aring$1,\n\tAscr: Ascr,\n\tascr: ascr,\n\tAssign: Assign,\n\tast: ast,\n\tasymp: asymp,\n\tasympeq: asympeq,\n\tAtilde: Atilde$1,\n\tatilde: atilde$1,\n\tAuml: Auml$1,\n\tauml: auml$1,\n\tawconint: awconint,\n\tawint: awint,\n\tbackcong: backcong,\n\tbackepsilon: backepsilon,\n\tbackprime: backprime,\n\tbacksim: backsim,\n\tbacksimeq: backsimeq,\n\tBackslash: Backslash,\n\tBarv: Barv,\n\tbarvee: barvee,\n\tbarwed: barwed,\n\tBarwed: Barwed,\n\tbarwedge: barwedge,\n\tbbrk: bbrk,\n\tbbrktbrk: bbrktbrk,\n\tbcong: bcong,\n\tBcy: Bcy,\n\tbcy: bcy,\n\tbdquo: bdquo,\n\tbecaus: becaus,\n\tbecause: because,\n\tBecause: Because,\n\tbemptyv: bemptyv,\n\tbepsi: bepsi,\n\tbernou: bernou,\n\tBernoullis: Bernoullis,\n\tBeta: Beta,\n\tbeta: beta,\n\tbeth: beth,\n\tbetween: between,\n\tBfr: Bfr,\n\tbfr: bfr,\n\tbigcap: bigcap,\n\tbigcirc: bigcirc,\n\tbigcup: bigcup,\n\tbigodot: bigodot,\n\tbigoplus: bigoplus,\n\tbigotimes: bigotimes,\n\tbigsqcup: bigsqcup,\n\tbigstar: bigstar,\n\tbigtriangledown: bigtriangledown,\n\tbigtriangleup: bigtriangleup,\n\tbiguplus: biguplus,\n\tbigvee: bigvee,\n\tbigwedge: bigwedge,\n\tbkarow: bkarow,\n\tblacklozenge: blacklozenge,\n\tblacksquare: blacksquare,\n\tblacktriangle: blacktriangle,\n\tblacktriangledown: blacktriangledown,\n\tblacktriangleleft: blacktriangleleft,\n\tblacktriangleright: blacktriangleright,\n\tblank: blank,\n\tblk12: blk12,\n\tblk14: blk14,\n\tblk34: blk34,\n\tblock: block,\n\tbne: bne,\n\tbnequiv: bnequiv,\n\tbNot: bNot,\n\tbnot: bnot,\n\tBopf: Bopf,\n\tbopf: bopf,\n\tbot: bot,\n\tbottom: bottom,\n\tbowtie: bowtie,\n\tboxbox: boxbox,\n\tboxdl: boxdl,\n\tboxdL: boxdL,\n\tboxDl: boxDl,\n\tboxDL: boxDL,\n\tboxdr: boxdr,\n\tboxdR: boxdR,\n\tboxDr: boxDr,\n\tboxDR: boxDR,\n\tboxh: boxh,\n\tboxH: boxH,\n\tboxhd: boxhd,\n\tboxHd: boxHd,\n\tboxhD: boxhD,\n\tboxHD: boxHD,\n\tboxhu: boxhu,\n\tboxHu: boxHu,\n\tboxhU: boxhU,\n\tboxHU: boxHU,\n\tboxminus: boxminus,\n\tboxplus: boxplus,\n\tboxtimes: boxtimes,\n\tboxul: boxul,\n\tboxuL: boxuL,\n\tboxUl: boxUl,\n\tboxUL: boxUL,\n\tboxur: boxur,\n\tboxuR: boxuR,\n\tboxUr: boxUr,\n\tboxUR: boxUR,\n\tboxv: boxv,\n\tboxV: boxV,\n\tboxvh: boxvh,\n\tboxvH: boxvH,\n\tboxVh: boxVh,\n\tboxVH: boxVH,\n\tboxvl: boxvl,\n\tboxvL: boxvL,\n\tboxVl: boxVl,\n\tboxVL: boxVL,\n\tboxvr: boxvr,\n\tboxvR: boxvR,\n\tboxVr: boxVr,\n\tboxVR: boxVR,\n\tbprime: bprime,\n\tbreve: breve,\n\tBreve: Breve,\n\tbrvbar: brvbar$1,\n\tbscr: bscr,\n\tBscr: Bscr,\n\tbsemi: bsemi,\n\tbsim: bsim,\n\tbsime: bsime,\n\tbsolb: bsolb,\n\tbsol: bsol,\n\tbsolhsub: bsolhsub,\n\tbull: bull,\n\tbullet: bullet,\n\tbump: bump,\n\tbumpE: bumpE,\n\tbumpe: bumpe,\n\tBumpeq: Bumpeq,\n\tbumpeq: bumpeq,\n\tCacute: Cacute,\n\tcacute: cacute,\n\tcapand: capand,\n\tcapbrcup: capbrcup,\n\tcapcap: capcap,\n\tcap: cap,\n\tCap: Cap,\n\tcapcup: capcup,\n\tcapdot: capdot,\n\tCapitalDifferentialD: CapitalDifferentialD,\n\tcaps: caps,\n\tcaret: caret,\n\tcaron: caron,\n\tCayleys: Cayleys,\n\tccaps: ccaps,\n\tCcaron: Ccaron,\n\tccaron: ccaron,\n\tCcedil: Ccedil$1,\n\tccedil: ccedil$1,\n\tCcirc: Ccirc,\n\tccirc: ccirc,\n\tCconint: Cconint,\n\tccups: ccups,\n\tccupssm: ccupssm,\n\tCdot: Cdot,\n\tcdot: cdot,\n\tcedil: cedil$1,\n\tCedilla: Cedilla,\n\tcemptyv: cemptyv,\n\tcent: cent$1,\n\tcenterdot: centerdot,\n\tCenterDot: CenterDot,\n\tcfr: cfr,\n\tCfr: Cfr,\n\tCHcy: CHcy,\n\tchcy: chcy,\n\tcheck: check,\n\tcheckmark: checkmark,\n\tChi: Chi,\n\tchi: chi,\n\tcirc: circ,\n\tcirceq: circeq,\n\tcirclearrowleft: circlearrowleft,\n\tcirclearrowright: circlearrowright,\n\tcircledast: circledast,\n\tcircledcirc: circledcirc,\n\tcircleddash: circleddash,\n\tCircleDot: CircleDot,\n\tcircledR: circledR,\n\tcircledS: circledS,\n\tCircleMinus: CircleMinus,\n\tCirclePlus: CirclePlus,\n\tCircleTimes: CircleTimes,\n\tcir: cir,\n\tcirE: cirE,\n\tcire: cire,\n\tcirfnint: cirfnint,\n\tcirmid: cirmid,\n\tcirscir: cirscir,\n\tClockwiseContourIntegral: ClockwiseContourIntegral,\n\tCloseCurlyDoubleQuote: CloseCurlyDoubleQuote,\n\tCloseCurlyQuote: CloseCurlyQuote,\n\tclubs: clubs,\n\tclubsuit: clubsuit,\n\tcolon: colon,\n\tColon: Colon,\n\tColone: Colone,\n\tcolone: colone,\n\tcoloneq: coloneq,\n\tcomma: comma,\n\tcommat: commat,\n\tcomp: comp,\n\tcompfn: compfn,\n\tcomplement: complement,\n\tcomplexes: complexes,\n\tcong: cong,\n\tcongdot: congdot,\n\tCongruent: Congruent,\n\tconint: conint,\n\tConint: Conint,\n\tContourIntegral: ContourIntegral,\n\tcopf: copf,\n\tCopf: Copf,\n\tcoprod: coprod,\n\tCoproduct: Coproduct,\n\tcopy: copy$1,\n\tCOPY: COPY$1,\n\tcopysr: copysr,\n\tCounterClockwiseContourIntegral: CounterClockwiseContourIntegral,\n\tcrarr: crarr,\n\tcross: cross,\n\tCross: Cross,\n\tCscr: Cscr,\n\tcscr: cscr,\n\tcsub: csub,\n\tcsube: csube,\n\tcsup: csup,\n\tcsupe: csupe,\n\tctdot: ctdot,\n\tcudarrl: cudarrl,\n\tcudarrr: cudarrr,\n\tcuepr: cuepr,\n\tcuesc: cuesc,\n\tcularr: cularr,\n\tcularrp: cularrp,\n\tcupbrcap: cupbrcap,\n\tcupcap: cupcap,\n\tCupCap: CupCap,\n\tcup: cup,\n\tCup: Cup,\n\tcupcup: cupcup,\n\tcupdot: cupdot,\n\tcupor: cupor,\n\tcups: cups,\n\tcurarr: curarr,\n\tcurarrm: curarrm,\n\tcurlyeqprec: curlyeqprec,\n\tcurlyeqsucc: curlyeqsucc,\n\tcurlyvee: curlyvee,\n\tcurlywedge: curlywedge,\n\tcurren: curren$1,\n\tcurvearrowleft: curvearrowleft,\n\tcurvearrowright: curvearrowright,\n\tcuvee: cuvee,\n\tcuwed: cuwed,\n\tcwconint: cwconint,\n\tcwint: cwint,\n\tcylcty: cylcty,\n\tdagger: dagger,\n\tDagger: Dagger,\n\tdaleth: daleth,\n\tdarr: darr,\n\tDarr: Darr,\n\tdArr: dArr,\n\tdash: dash,\n\tDashv: Dashv,\n\tdashv: dashv,\n\tdbkarow: dbkarow,\n\tdblac: dblac,\n\tDcaron: Dcaron,\n\tdcaron: dcaron,\n\tDcy: Dcy,\n\tdcy: dcy,\n\tddagger: ddagger,\n\tddarr: ddarr,\n\tDD: DD,\n\tdd: dd,\n\tDDotrahd: DDotrahd,\n\tddotseq: ddotseq,\n\tdeg: deg$1,\n\tDel: Del,\n\tDelta: Delta,\n\tdelta: delta,\n\tdemptyv: demptyv,\n\tdfisht: dfisht,\n\tDfr: Dfr,\n\tdfr: dfr,\n\tdHar: dHar,\n\tdharl: dharl,\n\tdharr: dharr,\n\tDiacriticalAcute: DiacriticalAcute,\n\tDiacriticalDot: DiacriticalDot,\n\tDiacriticalDoubleAcute: DiacriticalDoubleAcute,\n\tDiacriticalGrave: DiacriticalGrave,\n\tDiacriticalTilde: DiacriticalTilde,\n\tdiam: diam,\n\tdiamond: diamond,\n\tDiamond: Diamond,\n\tdiamondsuit: diamondsuit,\n\tdiams: diams,\n\tdie: die,\n\tDifferentialD: DifferentialD,\n\tdigamma: digamma,\n\tdisin: disin,\n\tdiv: div,\n\tdivide: divide$1,\n\tdivideontimes: divideontimes,\n\tdivonx: divonx,\n\tDJcy: DJcy,\n\tdjcy: djcy,\n\tdlcorn: dlcorn,\n\tdlcrop: dlcrop,\n\tdollar: dollar,\n\tDopf: Dopf,\n\tdopf: dopf,\n\tDot: Dot,\n\tdot: dot,\n\tDotDot: DotDot,\n\tdoteq: doteq,\n\tdoteqdot: doteqdot,\n\tDotEqual: DotEqual,\n\tdotminus: dotminus,\n\tdotplus: dotplus,\n\tdotsquare: dotsquare,\n\tdoublebarwedge: doublebarwedge,\n\tDoubleContourIntegral: DoubleContourIntegral,\n\tDoubleDot: DoubleDot,\n\tDoubleDownArrow: DoubleDownArrow,\n\tDoubleLeftArrow: DoubleLeftArrow,\n\tDoubleLeftRightArrow: DoubleLeftRightArrow,\n\tDoubleLeftTee: DoubleLeftTee,\n\tDoubleLongLeftArrow: DoubleLongLeftArrow,\n\tDoubleLongLeftRightArrow: DoubleLongLeftRightArrow,\n\tDoubleLongRightArrow: DoubleLongRightArrow,\n\tDoubleRightArrow: DoubleRightArrow,\n\tDoubleRightTee: DoubleRightTee,\n\tDoubleUpArrow: DoubleUpArrow,\n\tDoubleUpDownArrow: DoubleUpDownArrow,\n\tDoubleVerticalBar: DoubleVerticalBar,\n\tDownArrowBar: DownArrowBar,\n\tdownarrow: downarrow,\n\tDownArrow: DownArrow,\n\tDownarrow: Downarrow,\n\tDownArrowUpArrow: DownArrowUpArrow,\n\tDownBreve: DownBreve,\n\tdowndownarrows: downdownarrows,\n\tdownharpoonleft: downharpoonleft,\n\tdownharpoonright: downharpoonright,\n\tDownLeftRightVector: DownLeftRightVector,\n\tDownLeftTeeVector: DownLeftTeeVector,\n\tDownLeftVectorBar: DownLeftVectorBar,\n\tDownLeftVector: DownLeftVector,\n\tDownRightTeeVector: DownRightTeeVector,\n\tDownRightVectorBar: DownRightVectorBar,\n\tDownRightVector: DownRightVector,\n\tDownTeeArrow: DownTeeArrow,\n\tDownTee: DownTee,\n\tdrbkarow: drbkarow,\n\tdrcorn: drcorn,\n\tdrcrop: drcrop,\n\tDscr: Dscr,\n\tdscr: dscr,\n\tDScy: DScy,\n\tdscy: dscy,\n\tdsol: dsol,\n\tDstrok: Dstrok,\n\tdstrok: dstrok,\n\tdtdot: dtdot,\n\tdtri: dtri,\n\tdtrif: dtrif,\n\tduarr: duarr,\n\tduhar: duhar,\n\tdwangle: dwangle,\n\tDZcy: DZcy,\n\tdzcy: dzcy,\n\tdzigrarr: dzigrarr,\n\tEacute: Eacute$1,\n\teacute: eacute$1,\n\teaster: easter,\n\tEcaron: Ecaron,\n\tecaron: ecaron,\n\tEcirc: Ecirc$1,\n\tecirc: ecirc$1,\n\tecir: ecir,\n\tecolon: ecolon,\n\tEcy: Ecy,\n\tecy: ecy,\n\teDDot: eDDot,\n\tEdot: Edot,\n\tedot: edot,\n\teDot: eDot,\n\tee: ee,\n\tefDot: efDot,\n\tEfr: Efr,\n\tefr: efr,\n\teg: eg,\n\tEgrave: Egrave$1,\n\tegrave: egrave$1,\n\tegs: egs,\n\tegsdot: egsdot,\n\tel: el,\n\tElement: Element$1,\n\telinters: elinters,\n\tell: ell,\n\tels: els,\n\telsdot: elsdot,\n\tEmacr: Emacr,\n\temacr: emacr,\n\tempty: empty,\n\temptyset: emptyset,\n\tEmptySmallSquare: EmptySmallSquare,\n\temptyv: emptyv,\n\tEmptyVerySmallSquare: EmptyVerySmallSquare,\n\temsp13: emsp13,\n\temsp14: emsp14,\n\temsp: emsp,\n\tENG: ENG,\n\teng: eng,\n\tensp: ensp,\n\tEogon: Eogon,\n\teogon: eogon,\n\tEopf: Eopf,\n\teopf: eopf,\n\tepar: epar,\n\teparsl: eparsl,\n\teplus: eplus,\n\tepsi: epsi,\n\tEpsilon: Epsilon,\n\tepsilon: epsilon,\n\tepsiv: epsiv,\n\teqcirc: eqcirc,\n\teqcolon: eqcolon,\n\teqsim: eqsim,\n\teqslantgtr: eqslantgtr,\n\teqslantless: eqslantless,\n\tEqual: Equal,\n\tequals: equals,\n\tEqualTilde: EqualTilde,\n\tequest: equest,\n\tEquilibrium: Equilibrium,\n\tequiv: equiv,\n\tequivDD: equivDD,\n\teqvparsl: eqvparsl,\n\terarr: erarr,\n\terDot: erDot,\n\tescr: escr,\n\tEscr: Escr,\n\tesdot: esdot,\n\tEsim: Esim,\n\tesim: esim,\n\tEta: Eta,\n\teta: eta,\n\tETH: ETH$1,\n\teth: eth$1,\n\tEuml: Euml$1,\n\teuml: euml$1,\n\teuro: euro,\n\texcl: excl,\n\texist: exist,\n\tExists: Exists,\n\texpectation: expectation,\n\texponentiale: exponentiale,\n\tExponentialE: ExponentialE,\n\tfallingdotseq: fallingdotseq,\n\tFcy: Fcy,\n\tfcy: fcy,\n\tfemale: female,\n\tffilig: ffilig,\n\tfflig: fflig,\n\tffllig: ffllig,\n\tFfr: Ffr,\n\tffr: ffr,\n\tfilig: filig,\n\tFilledSmallSquare: FilledSmallSquare,\n\tFilledVerySmallSquare: FilledVerySmallSquare,\n\tfjlig: fjlig,\n\tflat: flat,\n\tfllig: fllig,\n\tfltns: fltns,\n\tfnof: fnof,\n\tFopf: Fopf,\n\tfopf: fopf,\n\tforall: forall,\n\tForAll: ForAll,\n\tfork: fork,\n\tforkv: forkv,\n\tFouriertrf: Fouriertrf,\n\tfpartint: fpartint,\n\tfrac12: frac12$1,\n\tfrac13: frac13,\n\tfrac14: frac14$1,\n\tfrac15: frac15,\n\tfrac16: frac16,\n\tfrac18: frac18,\n\tfrac23: frac23,\n\tfrac25: frac25,\n\tfrac34: frac34$1,\n\tfrac35: frac35,\n\tfrac38: frac38,\n\tfrac45: frac45,\n\tfrac56: frac56,\n\tfrac58: frac58,\n\tfrac78: frac78,\n\tfrasl: frasl,\n\tfrown: frown,\n\tfscr: fscr,\n\tFscr: Fscr,\n\tgacute: gacute,\n\tGamma: Gamma,\n\tgamma: gamma,\n\tGammad: Gammad,\n\tgammad: gammad,\n\tgap: gap,\n\tGbreve: Gbreve,\n\tgbreve: gbreve,\n\tGcedil: Gcedil,\n\tGcirc: Gcirc,\n\tgcirc: gcirc,\n\tGcy: Gcy,\n\tgcy: gcy,\n\tGdot: Gdot,\n\tgdot: gdot,\n\tge: ge,\n\tgE: gE,\n\tgEl: gEl,\n\tgel: gel,\n\tgeq: geq,\n\tgeqq: geqq,\n\tgeqslant: geqslant,\n\tgescc: gescc,\n\tges: ges,\n\tgesdot: gesdot,\n\tgesdoto: gesdoto,\n\tgesdotol: gesdotol,\n\tgesl: gesl,\n\tgesles: gesles,\n\tGfr: Gfr,\n\tgfr: gfr,\n\tgg: gg,\n\tGg: Gg,\n\tggg: ggg,\n\tgimel: gimel,\n\tGJcy: GJcy,\n\tgjcy: gjcy,\n\tgla: gla,\n\tgl: gl,\n\tglE: glE,\n\tglj: glj,\n\tgnap: gnap,\n\tgnapprox: gnapprox,\n\tgne: gne,\n\tgnE: gnE,\n\tgneq: gneq,\n\tgneqq: gneqq,\n\tgnsim: gnsim,\n\tGopf: Gopf,\n\tgopf: gopf,\n\tgrave: grave,\n\tGreaterEqual: GreaterEqual,\n\tGreaterEqualLess: GreaterEqualLess,\n\tGreaterFullEqual: GreaterFullEqual,\n\tGreaterGreater: GreaterGreater,\n\tGreaterLess: GreaterLess,\n\tGreaterSlantEqual: GreaterSlantEqual,\n\tGreaterTilde: GreaterTilde,\n\tGscr: Gscr,\n\tgscr: gscr,\n\tgsim: gsim,\n\tgsime: gsime,\n\tgsiml: gsiml,\n\tgtcc: gtcc,\n\tgtcir: gtcir,\n\tgt: gt$2,\n\tGT: GT$1,\n\tGt: Gt,\n\tgtdot: gtdot,\n\tgtlPar: gtlPar,\n\tgtquest: gtquest,\n\tgtrapprox: gtrapprox,\n\tgtrarr: gtrarr,\n\tgtrdot: gtrdot,\n\tgtreqless: gtreqless,\n\tgtreqqless: gtreqqless,\n\tgtrless: gtrless,\n\tgtrsim: gtrsim,\n\tgvertneqq: gvertneqq,\n\tgvnE: gvnE,\n\tHacek: Hacek,\n\thairsp: hairsp,\n\thalf: half,\n\thamilt: hamilt,\n\tHARDcy: HARDcy,\n\thardcy: hardcy,\n\tharrcir: harrcir,\n\tharr: harr,\n\thArr: hArr,\n\tharrw: harrw,\n\tHat: Hat,\n\thbar: hbar,\n\tHcirc: Hcirc,\n\thcirc: hcirc,\n\thearts: hearts,\n\theartsuit: heartsuit,\n\thellip: hellip,\n\thercon: hercon,\n\thfr: hfr,\n\tHfr: Hfr,\n\tHilbertSpace: HilbertSpace,\n\thksearow: hksearow,\n\thkswarow: hkswarow,\n\thoarr: hoarr,\n\thomtht: homtht,\n\thookleftarrow: hookleftarrow,\n\thookrightarrow: hookrightarrow,\n\thopf: hopf,\n\tHopf: Hopf,\n\thorbar: horbar,\n\tHorizontalLine: HorizontalLine,\n\thscr: hscr,\n\tHscr: Hscr,\n\thslash: hslash,\n\tHstrok: Hstrok,\n\thstrok: hstrok,\n\tHumpDownHump: HumpDownHump,\n\tHumpEqual: HumpEqual,\n\thybull: hybull,\n\thyphen: hyphen,\n\tIacute: Iacute$1,\n\tiacute: iacute$1,\n\tic: ic,\n\tIcirc: Icirc$1,\n\ticirc: icirc$1,\n\tIcy: Icy,\n\ticy: icy,\n\tIdot: Idot,\n\tIEcy: IEcy,\n\tiecy: iecy,\n\tiexcl: iexcl$1,\n\tiff: iff,\n\tifr: ifr,\n\tIfr: Ifr,\n\tIgrave: Igrave$1,\n\tigrave: igrave$1,\n\tii: ii,\n\tiiiint: iiiint,\n\tiiint: iiint,\n\tiinfin: iinfin,\n\tiiota: iiota,\n\tIJlig: IJlig,\n\tijlig: ijlig,\n\tImacr: Imacr,\n\timacr: imacr,\n\timage: image,\n\tImaginaryI: ImaginaryI,\n\timagline: imagline,\n\timagpart: imagpart,\n\timath: imath,\n\tIm: Im,\n\timof: imof,\n\timped: imped,\n\tImplies: Implies,\n\tincare: incare,\n\t\"in\": \"∈\",\n\tinfin: infin,\n\tinfintie: infintie,\n\tinodot: inodot,\n\tintcal: intcal,\n\tint: int,\n\tInt: Int,\n\tintegers: integers,\n\tIntegral: Integral,\n\tintercal: intercal,\n\tIntersection: Intersection,\n\tintlarhk: intlarhk,\n\tintprod: intprod,\n\tInvisibleComma: InvisibleComma,\n\tInvisibleTimes: InvisibleTimes,\n\tIOcy: IOcy,\n\tiocy: iocy,\n\tIogon: Iogon,\n\tiogon: iogon,\n\tIopf: Iopf,\n\tiopf: iopf,\n\tIota: Iota,\n\tiota: iota,\n\tiprod: iprod,\n\tiquest: iquest$1,\n\tiscr: iscr,\n\tIscr: Iscr,\n\tisin: isin,\n\tisindot: isindot,\n\tisinE: isinE,\n\tisins: isins,\n\tisinsv: isinsv,\n\tisinv: isinv,\n\tit: it,\n\tItilde: Itilde,\n\titilde: itilde,\n\tIukcy: Iukcy,\n\tiukcy: iukcy,\n\tIuml: Iuml$1,\n\tiuml: iuml$1,\n\tJcirc: Jcirc,\n\tjcirc: jcirc,\n\tJcy: Jcy,\n\tjcy: jcy,\n\tJfr: Jfr,\n\tjfr: jfr,\n\tjmath: jmath,\n\tJopf: Jopf,\n\tjopf: jopf,\n\tJscr: Jscr,\n\tjscr: jscr,\n\tJsercy: Jsercy,\n\tjsercy: jsercy,\n\tJukcy: Jukcy,\n\tjukcy: jukcy,\n\tKappa: Kappa,\n\tkappa: kappa,\n\tkappav: kappav,\n\tKcedil: Kcedil,\n\tkcedil: kcedil,\n\tKcy: Kcy,\n\tkcy: kcy,\n\tKfr: Kfr,\n\tkfr: kfr,\n\tkgreen: kgreen,\n\tKHcy: KHcy,\n\tkhcy: khcy,\n\tKJcy: KJcy,\n\tkjcy: kjcy,\n\tKopf: Kopf,\n\tkopf: kopf,\n\tKscr: Kscr,\n\tkscr: kscr,\n\tlAarr: lAarr,\n\tLacute: Lacute,\n\tlacute: lacute,\n\tlaemptyv: laemptyv,\n\tlagran: lagran,\n\tLambda: Lambda,\n\tlambda: lambda,\n\tlang: lang,\n\tLang: Lang,\n\tlangd: langd,\n\tlangle: langle,\n\tlap: lap,\n\tLaplacetrf: Laplacetrf,\n\tlaquo: laquo$1,\n\tlarrb: larrb,\n\tlarrbfs: larrbfs,\n\tlarr: larr,\n\tLarr: Larr,\n\tlArr: lArr,\n\tlarrfs: larrfs,\n\tlarrhk: larrhk,\n\tlarrlp: larrlp,\n\tlarrpl: larrpl,\n\tlarrsim: larrsim,\n\tlarrtl: larrtl,\n\tlatail: latail,\n\tlAtail: lAtail,\n\tlat: lat,\n\tlate: late,\n\tlates: lates,\n\tlbarr: lbarr,\n\tlBarr: lBarr,\n\tlbbrk: lbbrk,\n\tlbrace: lbrace,\n\tlbrack: lbrack,\n\tlbrke: lbrke,\n\tlbrksld: lbrksld,\n\tlbrkslu: lbrkslu,\n\tLcaron: Lcaron,\n\tlcaron: lcaron,\n\tLcedil: Lcedil,\n\tlcedil: lcedil,\n\tlceil: lceil,\n\tlcub: lcub,\n\tLcy: Lcy,\n\tlcy: lcy,\n\tldca: ldca,\n\tldquo: ldquo,\n\tldquor: ldquor,\n\tldrdhar: ldrdhar,\n\tldrushar: ldrushar,\n\tldsh: ldsh,\n\tle: le,\n\tlE: lE,\n\tLeftAngleBracket: LeftAngleBracket,\n\tLeftArrowBar: LeftArrowBar,\n\tleftarrow: leftarrow,\n\tLeftArrow: LeftArrow,\n\tLeftarrow: Leftarrow,\n\tLeftArrowRightArrow: LeftArrowRightArrow,\n\tleftarrowtail: leftarrowtail,\n\tLeftCeiling: LeftCeiling,\n\tLeftDoubleBracket: LeftDoubleBracket,\n\tLeftDownTeeVector: LeftDownTeeVector,\n\tLeftDownVectorBar: LeftDownVectorBar,\n\tLeftDownVector: LeftDownVector,\n\tLeftFloor: LeftFloor,\n\tleftharpoondown: leftharpoondown,\n\tleftharpoonup: leftharpoonup,\n\tleftleftarrows: leftleftarrows,\n\tleftrightarrow: leftrightarrow,\n\tLeftRightArrow: LeftRightArrow,\n\tLeftrightarrow: Leftrightarrow,\n\tleftrightarrows: leftrightarrows,\n\tleftrightharpoons: leftrightharpoons,\n\tleftrightsquigarrow: leftrightsquigarrow,\n\tLeftRightVector: LeftRightVector,\n\tLeftTeeArrow: LeftTeeArrow,\n\tLeftTee: LeftTee,\n\tLeftTeeVector: LeftTeeVector,\n\tleftthreetimes: leftthreetimes,\n\tLeftTriangleBar: LeftTriangleBar,\n\tLeftTriangle: LeftTriangle,\n\tLeftTriangleEqual: LeftTriangleEqual,\n\tLeftUpDownVector: LeftUpDownVector,\n\tLeftUpTeeVector: LeftUpTeeVector,\n\tLeftUpVectorBar: LeftUpVectorBar,\n\tLeftUpVector: LeftUpVector,\n\tLeftVectorBar: LeftVectorBar,\n\tLeftVector: LeftVector,\n\tlEg: lEg,\n\tleg: leg,\n\tleq: leq,\n\tleqq: leqq,\n\tleqslant: leqslant,\n\tlescc: lescc,\n\tles: les,\n\tlesdot: lesdot,\n\tlesdoto: lesdoto,\n\tlesdotor: lesdotor,\n\tlesg: lesg,\n\tlesges: lesges,\n\tlessapprox: lessapprox,\n\tlessdot: lessdot,\n\tlesseqgtr: lesseqgtr,\n\tlesseqqgtr: lesseqqgtr,\n\tLessEqualGreater: LessEqualGreater,\n\tLessFullEqual: LessFullEqual,\n\tLessGreater: LessGreater,\n\tlessgtr: lessgtr,\n\tLessLess: LessLess,\n\tlesssim: lesssim,\n\tLessSlantEqual: LessSlantEqual,\n\tLessTilde: LessTilde,\n\tlfisht: lfisht,\n\tlfloor: lfloor,\n\tLfr: Lfr,\n\tlfr: lfr,\n\tlg: lg,\n\tlgE: lgE,\n\tlHar: lHar,\n\tlhard: lhard,\n\tlharu: lharu,\n\tlharul: lharul,\n\tlhblk: lhblk,\n\tLJcy: LJcy,\n\tljcy: ljcy,\n\tllarr: llarr,\n\tll: ll,\n\tLl: Ll,\n\tllcorner: llcorner,\n\tLleftarrow: Lleftarrow,\n\tllhard: llhard,\n\tlltri: lltri,\n\tLmidot: Lmidot,\n\tlmidot: lmidot,\n\tlmoustache: lmoustache,\n\tlmoust: lmoust,\n\tlnap: lnap,\n\tlnapprox: lnapprox,\n\tlne: lne,\n\tlnE: lnE,\n\tlneq: lneq,\n\tlneqq: lneqq,\n\tlnsim: lnsim,\n\tloang: loang,\n\tloarr: loarr,\n\tlobrk: lobrk,\n\tlongleftarrow: longleftarrow,\n\tLongLeftArrow: LongLeftArrow,\n\tLongleftarrow: Longleftarrow,\n\tlongleftrightarrow: longleftrightarrow,\n\tLongLeftRightArrow: LongLeftRightArrow,\n\tLongleftrightarrow: Longleftrightarrow,\n\tlongmapsto: longmapsto,\n\tlongrightarrow: longrightarrow,\n\tLongRightArrow: LongRightArrow,\n\tLongrightarrow: Longrightarrow,\n\tlooparrowleft: looparrowleft,\n\tlooparrowright: looparrowright,\n\tlopar: lopar,\n\tLopf: Lopf,\n\tlopf: lopf,\n\tloplus: loplus,\n\tlotimes: lotimes,\n\tlowast: lowast,\n\tlowbar: lowbar,\n\tLowerLeftArrow: LowerLeftArrow,\n\tLowerRightArrow: LowerRightArrow,\n\tloz: loz,\n\tlozenge: lozenge,\n\tlozf: lozf,\n\tlpar: lpar,\n\tlparlt: lparlt,\n\tlrarr: lrarr,\n\tlrcorner: lrcorner,\n\tlrhar: lrhar,\n\tlrhard: lrhard,\n\tlrm: lrm,\n\tlrtri: lrtri,\n\tlsaquo: lsaquo,\n\tlscr: lscr,\n\tLscr: Lscr,\n\tlsh: lsh,\n\tLsh: Lsh,\n\tlsim: lsim,\n\tlsime: lsime,\n\tlsimg: lsimg,\n\tlsqb: lsqb,\n\tlsquo: lsquo,\n\tlsquor: lsquor,\n\tLstrok: Lstrok,\n\tlstrok: lstrok,\n\tltcc: ltcc,\n\tltcir: ltcir,\n\tlt: lt$2,\n\tLT: LT$1,\n\tLt: Lt,\n\tltdot: ltdot,\n\tlthree: lthree,\n\tltimes: ltimes,\n\tltlarr: ltlarr,\n\tltquest: ltquest,\n\tltri: ltri,\n\tltrie: ltrie,\n\tltrif: ltrif,\n\tltrPar: ltrPar,\n\tlurdshar: lurdshar,\n\tluruhar: luruhar,\n\tlvertneqq: lvertneqq,\n\tlvnE: lvnE,\n\tmacr: macr$1,\n\tmale: male,\n\tmalt: malt,\n\tmaltese: maltese,\n\t\"Map\": \"⤅\",\n\tmap: map,\n\tmapsto: mapsto,\n\tmapstodown: mapstodown,\n\tmapstoleft: mapstoleft,\n\tmapstoup: mapstoup,\n\tmarker: marker,\n\tmcomma: mcomma,\n\tMcy: Mcy,\n\tmcy: mcy,\n\tmdash: mdash,\n\tmDDot: mDDot,\n\tmeasuredangle: measuredangle,\n\tMediumSpace: MediumSpace,\n\tMellintrf: Mellintrf,\n\tMfr: Mfr,\n\tmfr: mfr,\n\tmho: mho,\n\tmicro: micro$1,\n\tmidast: midast,\n\tmidcir: midcir,\n\tmid: mid,\n\tmiddot: middot$1,\n\tminusb: minusb,\n\tminus: minus,\n\tminusd: minusd,\n\tminusdu: minusdu,\n\tMinusPlus: MinusPlus,\n\tmlcp: mlcp,\n\tmldr: mldr,\n\tmnplus: mnplus,\n\tmodels: models,\n\tMopf: Mopf,\n\tmopf: mopf,\n\tmp: mp,\n\tmscr: mscr,\n\tMscr: Mscr,\n\tmstpos: mstpos,\n\tMu: Mu,\n\tmu: mu,\n\tmultimap: multimap,\n\tmumap: mumap,\n\tnabla: nabla,\n\tNacute: Nacute,\n\tnacute: nacute,\n\tnang: nang,\n\tnap: nap,\n\tnapE: napE,\n\tnapid: napid,\n\tnapos: napos,\n\tnapprox: napprox,\n\tnatural: natural,\n\tnaturals: naturals,\n\tnatur: natur,\n\tnbsp: nbsp$1,\n\tnbump: nbump,\n\tnbumpe: nbumpe,\n\tncap: ncap,\n\tNcaron: Ncaron,\n\tncaron: ncaron,\n\tNcedil: Ncedil,\n\tncedil: ncedil,\n\tncong: ncong,\n\tncongdot: ncongdot,\n\tncup: ncup,\n\tNcy: Ncy,\n\tncy: ncy,\n\tndash: ndash,\n\tnearhk: nearhk,\n\tnearr: nearr,\n\tneArr: neArr,\n\tnearrow: nearrow,\n\tne: ne,\n\tnedot: nedot,\n\tNegativeMediumSpace: NegativeMediumSpace,\n\tNegativeThickSpace: NegativeThickSpace,\n\tNegativeThinSpace: NegativeThinSpace,\n\tNegativeVeryThinSpace: NegativeVeryThinSpace,\n\tnequiv: nequiv,\n\tnesear: nesear,\n\tnesim: nesim,\n\tNestedGreaterGreater: NestedGreaterGreater,\n\tNestedLessLess: NestedLessLess,\n\tNewLine: NewLine,\n\tnexist: nexist,\n\tnexists: nexists,\n\tNfr: Nfr,\n\tnfr: nfr,\n\tngE: ngE,\n\tnge: nge,\n\tngeq: ngeq,\n\tngeqq: ngeqq,\n\tngeqslant: ngeqslant,\n\tnges: nges,\n\tnGg: nGg,\n\tngsim: ngsim,\n\tnGt: nGt,\n\tngt: ngt,\n\tngtr: ngtr,\n\tnGtv: nGtv,\n\tnharr: nharr,\n\tnhArr: nhArr,\n\tnhpar: nhpar,\n\tni: ni,\n\tnis: nis,\n\tnisd: nisd,\n\tniv: niv,\n\tNJcy: NJcy,\n\tnjcy: njcy,\n\tnlarr: nlarr,\n\tnlArr: nlArr,\n\tnldr: nldr,\n\tnlE: nlE,\n\tnle: nle,\n\tnleftarrow: nleftarrow,\n\tnLeftarrow: nLeftarrow,\n\tnleftrightarrow: nleftrightarrow,\n\tnLeftrightarrow: nLeftrightarrow,\n\tnleq: nleq,\n\tnleqq: nleqq,\n\tnleqslant: nleqslant,\n\tnles: nles,\n\tnless: nless,\n\tnLl: nLl,\n\tnlsim: nlsim,\n\tnLt: nLt,\n\tnlt: nlt,\n\tnltri: nltri,\n\tnltrie: nltrie,\n\tnLtv: nLtv,\n\tnmid: nmid,\n\tNoBreak: NoBreak,\n\tNonBreakingSpace: NonBreakingSpace,\n\tnopf: nopf,\n\tNopf: Nopf,\n\tNot: Not,\n\tnot: not$1,\n\tNotCongruent: NotCongruent,\n\tNotCupCap: NotCupCap,\n\tNotDoubleVerticalBar: NotDoubleVerticalBar,\n\tNotElement: NotElement,\n\tNotEqual: NotEqual,\n\tNotEqualTilde: NotEqualTilde,\n\tNotExists: NotExists,\n\tNotGreater: NotGreater,\n\tNotGreaterEqual: NotGreaterEqual,\n\tNotGreaterFullEqual: NotGreaterFullEqual,\n\tNotGreaterGreater: NotGreaterGreater,\n\tNotGreaterLess: NotGreaterLess,\n\tNotGreaterSlantEqual: NotGreaterSlantEqual,\n\tNotGreaterTilde: NotGreaterTilde,\n\tNotHumpDownHump: NotHumpDownHump,\n\tNotHumpEqual: NotHumpEqual,\n\tnotin: notin,\n\tnotindot: notindot,\n\tnotinE: notinE,\n\tnotinva: notinva,\n\tnotinvb: notinvb,\n\tnotinvc: notinvc,\n\tNotLeftTriangleBar: NotLeftTriangleBar,\n\tNotLeftTriangle: NotLeftTriangle,\n\tNotLeftTriangleEqual: NotLeftTriangleEqual,\n\tNotLess: NotLess,\n\tNotLessEqual: NotLessEqual,\n\tNotLessGreater: NotLessGreater,\n\tNotLessLess: NotLessLess,\n\tNotLessSlantEqual: NotLessSlantEqual,\n\tNotLessTilde: NotLessTilde,\n\tNotNestedGreaterGreater: NotNestedGreaterGreater,\n\tNotNestedLessLess: NotNestedLessLess,\n\tnotni: notni,\n\tnotniva: notniva,\n\tnotnivb: notnivb,\n\tnotnivc: notnivc,\n\tNotPrecedes: NotPrecedes,\n\tNotPrecedesEqual: NotPrecedesEqual,\n\tNotPrecedesSlantEqual: NotPrecedesSlantEqual,\n\tNotReverseElement: NotReverseElement,\n\tNotRightTriangleBar: NotRightTriangleBar,\n\tNotRightTriangle: NotRightTriangle,\n\tNotRightTriangleEqual: NotRightTriangleEqual,\n\tNotSquareSubset: NotSquareSubset,\n\tNotSquareSubsetEqual: NotSquareSubsetEqual,\n\tNotSquareSuperset: NotSquareSuperset,\n\tNotSquareSupersetEqual: NotSquareSupersetEqual,\n\tNotSubset: NotSubset,\n\tNotSubsetEqual: NotSubsetEqual,\n\tNotSucceeds: NotSucceeds,\n\tNotSucceedsEqual: NotSucceedsEqual,\n\tNotSucceedsSlantEqual: NotSucceedsSlantEqual,\n\tNotSucceedsTilde: NotSucceedsTilde,\n\tNotSuperset: NotSuperset,\n\tNotSupersetEqual: NotSupersetEqual,\n\tNotTilde: NotTilde,\n\tNotTildeEqual: NotTildeEqual,\n\tNotTildeFullEqual: NotTildeFullEqual,\n\tNotTildeTilde: NotTildeTilde,\n\tNotVerticalBar: NotVerticalBar,\n\tnparallel: nparallel,\n\tnpar: npar,\n\tnparsl: nparsl,\n\tnpart: npart,\n\tnpolint: npolint,\n\tnpr: npr,\n\tnprcue: nprcue,\n\tnprec: nprec,\n\tnpreceq: npreceq,\n\tnpre: npre,\n\tnrarrc: nrarrc,\n\tnrarr: nrarr,\n\tnrArr: nrArr,\n\tnrarrw: nrarrw,\n\tnrightarrow: nrightarrow,\n\tnRightarrow: nRightarrow,\n\tnrtri: nrtri,\n\tnrtrie: nrtrie,\n\tnsc: nsc,\n\tnsccue: nsccue,\n\tnsce: nsce,\n\tNscr: Nscr,\n\tnscr: nscr,\n\tnshortmid: nshortmid,\n\tnshortparallel: nshortparallel,\n\tnsim: nsim,\n\tnsime: nsime,\n\tnsimeq: nsimeq,\n\tnsmid: nsmid,\n\tnspar: nspar,\n\tnsqsube: nsqsube,\n\tnsqsupe: nsqsupe,\n\tnsub: nsub,\n\tnsubE: nsubE,\n\tnsube: nsube,\n\tnsubset: nsubset,\n\tnsubseteq: nsubseteq,\n\tnsubseteqq: nsubseteqq,\n\tnsucc: nsucc,\n\tnsucceq: nsucceq,\n\tnsup: nsup,\n\tnsupE: nsupE,\n\tnsupe: nsupe,\n\tnsupset: nsupset,\n\tnsupseteq: nsupseteq,\n\tnsupseteqq: nsupseteqq,\n\tntgl: ntgl,\n\tNtilde: Ntilde$1,\n\tntilde: ntilde$1,\n\tntlg: ntlg,\n\tntriangleleft: ntriangleleft,\n\tntrianglelefteq: ntrianglelefteq,\n\tntriangleright: ntriangleright,\n\tntrianglerighteq: ntrianglerighteq,\n\tNu: Nu,\n\tnu: nu,\n\tnum: num,\n\tnumero: numero,\n\tnumsp: numsp,\n\tnvap: nvap,\n\tnvdash: nvdash,\n\tnvDash: nvDash,\n\tnVdash: nVdash,\n\tnVDash: nVDash,\n\tnvge: nvge,\n\tnvgt: nvgt,\n\tnvHarr: nvHarr,\n\tnvinfin: nvinfin,\n\tnvlArr: nvlArr,\n\tnvle: nvle,\n\tnvlt: nvlt,\n\tnvltrie: nvltrie,\n\tnvrArr: nvrArr,\n\tnvrtrie: nvrtrie,\n\tnvsim: nvsim,\n\tnwarhk: nwarhk,\n\tnwarr: nwarr,\n\tnwArr: nwArr,\n\tnwarrow: nwarrow,\n\tnwnear: nwnear,\n\tOacute: Oacute$1,\n\toacute: oacute$1,\n\toast: oast,\n\tOcirc: Ocirc$1,\n\tocirc: ocirc$1,\n\tocir: ocir,\n\tOcy: Ocy,\n\tocy: ocy,\n\todash: odash,\n\tOdblac: Odblac,\n\todblac: odblac,\n\todiv: odiv,\n\todot: odot,\n\todsold: odsold,\n\tOElig: OElig,\n\toelig: oelig,\n\tofcir: ofcir,\n\tOfr: Ofr,\n\tofr: ofr,\n\togon: ogon,\n\tOgrave: Ograve$1,\n\tograve: ograve$1,\n\togt: ogt,\n\tohbar: ohbar,\n\tohm: ohm,\n\toint: oint,\n\tolarr: olarr,\n\tolcir: olcir,\n\tolcross: olcross,\n\toline: oline,\n\tolt: olt,\n\tOmacr: Omacr,\n\tomacr: omacr,\n\tOmega: Omega,\n\tomega: omega,\n\tOmicron: Omicron,\n\tomicron: omicron,\n\tomid: omid,\n\tominus: ominus,\n\tOopf: Oopf,\n\toopf: oopf,\n\topar: opar,\n\tOpenCurlyDoubleQuote: OpenCurlyDoubleQuote,\n\tOpenCurlyQuote: OpenCurlyQuote,\n\toperp: operp,\n\toplus: oplus,\n\torarr: orarr,\n\tOr: Or,\n\tor: or,\n\tord: ord,\n\torder: order,\n\torderof: orderof,\n\tordf: ordf$1,\n\tordm: ordm$1,\n\torigof: origof,\n\toror: oror,\n\torslope: orslope,\n\torv: orv,\n\toS: oS,\n\tOscr: Oscr,\n\toscr: oscr,\n\tOslash: Oslash$1,\n\toslash: oslash$1,\n\tosol: osol,\n\tOtilde: Otilde$1,\n\totilde: otilde$1,\n\totimesas: otimesas,\n\tOtimes: Otimes,\n\totimes: otimes,\n\tOuml: Ouml$1,\n\touml: ouml$1,\n\tovbar: ovbar,\n\tOverBar: OverBar,\n\tOverBrace: OverBrace,\n\tOverBracket: OverBracket,\n\tOverParenthesis: OverParenthesis,\n\tpara: para$1,\n\tparallel: parallel,\n\tpar: par,\n\tparsim: parsim,\n\tparsl: parsl,\n\tpart: part,\n\tPartialD: PartialD,\n\tPcy: Pcy,\n\tpcy: pcy,\n\tpercnt: percnt,\n\tperiod: period,\n\tpermil: permil,\n\tperp: perp,\n\tpertenk: pertenk,\n\tPfr: Pfr,\n\tpfr: pfr,\n\tPhi: Phi,\n\tphi: phi,\n\tphiv: phiv,\n\tphmmat: phmmat,\n\tphone: phone,\n\tPi: Pi,\n\tpi: pi,\n\tpitchfork: pitchfork,\n\tpiv: piv,\n\tplanck: planck,\n\tplanckh: planckh,\n\tplankv: plankv,\n\tplusacir: plusacir,\n\tplusb: plusb,\n\tpluscir: pluscir,\n\tplus: plus,\n\tplusdo: plusdo,\n\tplusdu: plusdu,\n\tpluse: pluse,\n\tPlusMinus: PlusMinus,\n\tplusmn: plusmn$1,\n\tplussim: plussim,\n\tplustwo: plustwo,\n\tpm: pm,\n\tPoincareplane: Poincareplane,\n\tpointint: pointint,\n\tpopf: popf,\n\tPopf: Popf,\n\tpound: pound$1,\n\tprap: prap,\n\tPr: Pr,\n\tpr: pr,\n\tprcue: prcue,\n\tprecapprox: precapprox,\n\tprec: prec,\n\tpreccurlyeq: preccurlyeq,\n\tPrecedes: Precedes,\n\tPrecedesEqual: PrecedesEqual,\n\tPrecedesSlantEqual: PrecedesSlantEqual,\n\tPrecedesTilde: PrecedesTilde,\n\tpreceq: preceq,\n\tprecnapprox: precnapprox,\n\tprecneqq: precneqq,\n\tprecnsim: precnsim,\n\tpre: pre,\n\tprE: prE,\n\tprecsim: precsim,\n\tprime: prime,\n\tPrime: Prime,\n\tprimes: primes,\n\tprnap: prnap,\n\tprnE: prnE,\n\tprnsim: prnsim,\n\tprod: prod,\n\tProduct: Product,\n\tprofalar: profalar,\n\tprofline: profline,\n\tprofsurf: profsurf,\n\tprop: prop,\n\tProportional: Proportional,\n\tProportion: Proportion,\n\tpropto: propto,\n\tprsim: prsim,\n\tprurel: prurel,\n\tPscr: Pscr,\n\tpscr: pscr,\n\tPsi: Psi,\n\tpsi: psi,\n\tpuncsp: puncsp,\n\tQfr: Qfr,\n\tqfr: qfr,\n\tqint: qint,\n\tqopf: qopf,\n\tQopf: Qopf,\n\tqprime: qprime,\n\tQscr: Qscr,\n\tqscr: qscr,\n\tquaternions: quaternions,\n\tquatint: quatint,\n\tquest: quest,\n\tquesteq: questeq,\n\tquot: quot$2,\n\tQUOT: QUOT$1,\n\trAarr: rAarr,\n\trace: race,\n\tRacute: Racute,\n\tracute: racute,\n\tradic: radic,\n\traemptyv: raemptyv,\n\trang: rang,\n\tRang: Rang,\n\trangd: rangd,\n\trange: range,\n\trangle: rangle,\n\traquo: raquo$1,\n\trarrap: rarrap,\n\trarrb: rarrb,\n\trarrbfs: rarrbfs,\n\trarrc: rarrc,\n\trarr: rarr,\n\tRarr: Rarr,\n\trArr: rArr,\n\trarrfs: rarrfs,\n\trarrhk: rarrhk,\n\trarrlp: rarrlp,\n\trarrpl: rarrpl,\n\trarrsim: rarrsim,\n\tRarrtl: Rarrtl,\n\trarrtl: rarrtl,\n\trarrw: rarrw,\n\tratail: ratail,\n\trAtail: rAtail,\n\tratio: ratio,\n\trationals: rationals,\n\trbarr: rbarr,\n\trBarr: rBarr,\n\tRBarr: RBarr,\n\trbbrk: rbbrk,\n\trbrace: rbrace,\n\trbrack: rbrack,\n\trbrke: rbrke,\n\trbrksld: rbrksld,\n\trbrkslu: rbrkslu,\n\tRcaron: Rcaron,\n\trcaron: rcaron,\n\tRcedil: Rcedil,\n\trcedil: rcedil,\n\trceil: rceil,\n\trcub: rcub,\n\tRcy: Rcy,\n\trcy: rcy,\n\trdca: rdca,\n\trdldhar: rdldhar,\n\trdquo: rdquo,\n\trdquor: rdquor,\n\trdsh: rdsh,\n\treal: real,\n\trealine: realine,\n\trealpart: realpart,\n\treals: reals,\n\tRe: Re,\n\trect: rect,\n\treg: reg$1,\n\tREG: REG$1,\n\tReverseElement: ReverseElement,\n\tReverseEquilibrium: ReverseEquilibrium,\n\tReverseUpEquilibrium: ReverseUpEquilibrium,\n\trfisht: rfisht,\n\trfloor: rfloor,\n\trfr: rfr,\n\tRfr: Rfr,\n\trHar: rHar,\n\trhard: rhard,\n\trharu: rharu,\n\trharul: rharul,\n\tRho: Rho,\n\trho: rho,\n\trhov: rhov,\n\tRightAngleBracket: RightAngleBracket,\n\tRightArrowBar: RightArrowBar,\n\trightarrow: rightarrow,\n\tRightArrow: RightArrow,\n\tRightarrow: Rightarrow,\n\tRightArrowLeftArrow: RightArrowLeftArrow,\n\trightarrowtail: rightarrowtail,\n\tRightCeiling: RightCeiling,\n\tRightDoubleBracket: RightDoubleBracket,\n\tRightDownTeeVector: RightDownTeeVector,\n\tRightDownVectorBar: RightDownVectorBar,\n\tRightDownVector: RightDownVector,\n\tRightFloor: RightFloor,\n\trightharpoondown: rightharpoondown,\n\trightharpoonup: rightharpoonup,\n\trightleftarrows: rightleftarrows,\n\trightleftharpoons: rightleftharpoons,\n\trightrightarrows: rightrightarrows,\n\trightsquigarrow: rightsquigarrow,\n\tRightTeeArrow: RightTeeArrow,\n\tRightTee: RightTee,\n\tRightTeeVector: RightTeeVector,\n\trightthreetimes: rightthreetimes,\n\tRightTriangleBar: RightTriangleBar,\n\tRightTriangle: RightTriangle,\n\tRightTriangleEqual: RightTriangleEqual,\n\tRightUpDownVector: RightUpDownVector,\n\tRightUpTeeVector: RightUpTeeVector,\n\tRightUpVectorBar: RightUpVectorBar,\n\tRightUpVector: RightUpVector,\n\tRightVectorBar: RightVectorBar,\n\tRightVector: RightVector,\n\tring: ring,\n\trisingdotseq: risingdotseq,\n\trlarr: rlarr,\n\trlhar: rlhar,\n\trlm: rlm,\n\trmoustache: rmoustache,\n\trmoust: rmoust,\n\trnmid: rnmid,\n\troang: roang,\n\troarr: roarr,\n\trobrk: robrk,\n\tropar: ropar,\n\tropf: ropf,\n\tRopf: Ropf,\n\troplus: roplus,\n\trotimes: rotimes,\n\tRoundImplies: RoundImplies,\n\trpar: rpar,\n\trpargt: rpargt,\n\trppolint: rppolint,\n\trrarr: rrarr,\n\tRrightarrow: Rrightarrow,\n\trsaquo: rsaquo,\n\trscr: rscr,\n\tRscr: Rscr,\n\trsh: rsh,\n\tRsh: Rsh,\n\trsqb: rsqb,\n\trsquo: rsquo,\n\trsquor: rsquor,\n\trthree: rthree,\n\trtimes: rtimes,\n\trtri: rtri,\n\trtrie: rtrie,\n\trtrif: rtrif,\n\trtriltri: rtriltri,\n\tRuleDelayed: RuleDelayed,\n\truluhar: ruluhar,\n\trx: rx,\n\tSacute: Sacute,\n\tsacute: sacute,\n\tsbquo: sbquo,\n\tscap: scap,\n\tScaron: Scaron,\n\tscaron: scaron,\n\tSc: Sc,\n\tsc: sc,\n\tsccue: sccue,\n\tsce: sce,\n\tscE: scE,\n\tScedil: Scedil,\n\tscedil: scedil,\n\tScirc: Scirc,\n\tscirc: scirc,\n\tscnap: scnap,\n\tscnE: scnE,\n\tscnsim: scnsim,\n\tscpolint: scpolint,\n\tscsim: scsim,\n\tScy: Scy,\n\tscy: scy,\n\tsdotb: sdotb,\n\tsdot: sdot,\n\tsdote: sdote,\n\tsearhk: searhk,\n\tsearr: searr,\n\tseArr: seArr,\n\tsearrow: searrow,\n\tsect: sect$1,\n\tsemi: semi,\n\tseswar: seswar,\n\tsetminus: setminus,\n\tsetmn: setmn,\n\tsext: sext,\n\tSfr: Sfr,\n\tsfr: sfr,\n\tsfrown: sfrown,\n\tsharp: sharp,\n\tSHCHcy: SHCHcy,\n\tshchcy: shchcy,\n\tSHcy: SHcy,\n\tshcy: shcy,\n\tShortDownArrow: ShortDownArrow,\n\tShortLeftArrow: ShortLeftArrow,\n\tshortmid: shortmid,\n\tshortparallel: shortparallel,\n\tShortRightArrow: ShortRightArrow,\n\tShortUpArrow: ShortUpArrow,\n\tshy: shy$1,\n\tSigma: Sigma,\n\tsigma: sigma,\n\tsigmaf: sigmaf,\n\tsigmav: sigmav,\n\tsim: sim,\n\tsimdot: simdot,\n\tsime: sime,\n\tsimeq: simeq,\n\tsimg: simg,\n\tsimgE: simgE,\n\tsiml: siml,\n\tsimlE: simlE,\n\tsimne: simne,\n\tsimplus: simplus,\n\tsimrarr: simrarr,\n\tslarr: slarr,\n\tSmallCircle: SmallCircle,\n\tsmallsetminus: smallsetminus,\n\tsmashp: smashp,\n\tsmeparsl: smeparsl,\n\tsmid: smid,\n\tsmile: smile,\n\tsmt: smt,\n\tsmte: smte,\n\tsmtes: smtes,\n\tSOFTcy: SOFTcy,\n\tsoftcy: softcy,\n\tsolbar: solbar,\n\tsolb: solb,\n\tsol: sol,\n\tSopf: Sopf,\n\tsopf: sopf,\n\tspades: spades,\n\tspadesuit: spadesuit,\n\tspar: spar,\n\tsqcap: sqcap,\n\tsqcaps: sqcaps,\n\tsqcup: sqcup,\n\tsqcups: sqcups,\n\tSqrt: Sqrt,\n\tsqsub: sqsub,\n\tsqsube: sqsube,\n\tsqsubset: sqsubset,\n\tsqsubseteq: sqsubseteq,\n\tsqsup: sqsup,\n\tsqsupe: sqsupe,\n\tsqsupset: sqsupset,\n\tsqsupseteq: sqsupseteq,\n\tsquare: square,\n\tSquare: Square,\n\tSquareIntersection: SquareIntersection,\n\tSquareSubset: SquareSubset,\n\tSquareSubsetEqual: SquareSubsetEqual,\n\tSquareSuperset: SquareSuperset,\n\tSquareSupersetEqual: SquareSupersetEqual,\n\tSquareUnion: SquareUnion,\n\tsquarf: squarf,\n\tsqu: squ,\n\tsquf: squf,\n\tsrarr: srarr,\n\tSscr: Sscr,\n\tsscr: sscr,\n\tssetmn: ssetmn,\n\tssmile: ssmile,\n\tsstarf: sstarf,\n\tStar: Star,\n\tstar: star,\n\tstarf: starf,\n\tstraightepsilon: straightepsilon,\n\tstraightphi: straightphi,\n\tstrns: strns,\n\tsub: sub,\n\tSub: Sub,\n\tsubdot: subdot,\n\tsubE: subE,\n\tsube: sube,\n\tsubedot: subedot,\n\tsubmult: submult,\n\tsubnE: subnE,\n\tsubne: subne,\n\tsubplus: subplus,\n\tsubrarr: subrarr,\n\tsubset: subset,\n\tSubset: Subset,\n\tsubseteq: subseteq,\n\tsubseteqq: subseteqq,\n\tSubsetEqual: SubsetEqual,\n\tsubsetneq: subsetneq,\n\tsubsetneqq: subsetneqq,\n\tsubsim: subsim,\n\tsubsub: subsub,\n\tsubsup: subsup,\n\tsuccapprox: succapprox,\n\tsucc: succ,\n\tsucccurlyeq: succcurlyeq,\n\tSucceeds: Succeeds,\n\tSucceedsEqual: SucceedsEqual,\n\tSucceedsSlantEqual: SucceedsSlantEqual,\n\tSucceedsTilde: SucceedsTilde,\n\tsucceq: succeq,\n\tsuccnapprox: succnapprox,\n\tsuccneqq: succneqq,\n\tsuccnsim: succnsim,\n\tsuccsim: succsim,\n\tSuchThat: SuchThat,\n\tsum: sum,\n\tSum: Sum,\n\tsung: sung,\n\tsup1: sup1$1,\n\tsup2: sup2$1,\n\tsup3: sup3$1,\n\tsup: sup,\n\tSup: Sup,\n\tsupdot: supdot,\n\tsupdsub: supdsub,\n\tsupE: supE,\n\tsupe: supe,\n\tsupedot: supedot,\n\tSuperset: Superset,\n\tSupersetEqual: SupersetEqual,\n\tsuphsol: suphsol,\n\tsuphsub: suphsub,\n\tsuplarr: suplarr,\n\tsupmult: supmult,\n\tsupnE: supnE,\n\tsupne: supne,\n\tsupplus: supplus,\n\tsupset: supset,\n\tSupset: Supset,\n\tsupseteq: supseteq,\n\tsupseteqq: supseteqq,\n\tsupsetneq: supsetneq,\n\tsupsetneqq: supsetneqq,\n\tsupsim: supsim,\n\tsupsub: supsub,\n\tsupsup: supsup,\n\tswarhk: swarhk,\n\tswarr: swarr,\n\tswArr: swArr,\n\tswarrow: swarrow,\n\tswnwar: swnwar,\n\tszlig: szlig$1,\n\tTab: Tab,\n\ttarget: target,\n\tTau: Tau,\n\ttau: tau,\n\ttbrk: tbrk,\n\tTcaron: Tcaron,\n\ttcaron: tcaron,\n\tTcedil: Tcedil,\n\ttcedil: tcedil,\n\tTcy: Tcy,\n\ttcy: tcy,\n\ttdot: tdot,\n\ttelrec: telrec,\n\tTfr: Tfr,\n\ttfr: tfr,\n\tthere4: there4,\n\ttherefore: therefore,\n\tTherefore: Therefore,\n\tTheta: Theta,\n\ttheta: theta,\n\tthetasym: thetasym,\n\tthetav: thetav,\n\tthickapprox: thickapprox,\n\tthicksim: thicksim,\n\tThickSpace: ThickSpace,\n\tThinSpace: ThinSpace,\n\tthinsp: thinsp,\n\tthkap: thkap,\n\tthksim: thksim,\n\tTHORN: THORN$1,\n\tthorn: thorn$1,\n\ttilde: tilde,\n\tTilde: Tilde,\n\tTildeEqual: TildeEqual,\n\tTildeFullEqual: TildeFullEqual,\n\tTildeTilde: TildeTilde,\n\ttimesbar: timesbar,\n\ttimesb: timesb,\n\ttimes: times$1,\n\ttimesd: timesd,\n\ttint: tint,\n\ttoea: toea,\n\ttopbot: topbot,\n\ttopcir: topcir,\n\ttop: top,\n\tTopf: Topf,\n\ttopf: topf,\n\ttopfork: topfork,\n\ttosa: tosa,\n\ttprime: tprime,\n\ttrade: trade,\n\tTRADE: TRADE,\n\ttriangle: triangle,\n\ttriangledown: triangledown,\n\ttriangleleft: triangleleft,\n\ttrianglelefteq: trianglelefteq,\n\ttriangleq: triangleq,\n\ttriangleright: triangleright,\n\ttrianglerighteq: trianglerighteq,\n\ttridot: tridot,\n\ttrie: trie,\n\ttriminus: triminus,\n\tTripleDot: TripleDot,\n\ttriplus: triplus,\n\ttrisb: trisb,\n\ttritime: tritime,\n\ttrpezium: trpezium,\n\tTscr: Tscr,\n\ttscr: tscr,\n\tTScy: TScy,\n\ttscy: tscy,\n\tTSHcy: TSHcy,\n\ttshcy: tshcy,\n\tTstrok: Tstrok,\n\ttstrok: tstrok,\n\ttwixt: twixt,\n\ttwoheadleftarrow: twoheadleftarrow,\n\ttwoheadrightarrow: twoheadrightarrow,\n\tUacute: Uacute$1,\n\tuacute: uacute$1,\n\tuarr: uarr,\n\tUarr: Uarr,\n\tuArr: uArr,\n\tUarrocir: Uarrocir,\n\tUbrcy: Ubrcy,\n\tubrcy: ubrcy,\n\tUbreve: Ubreve,\n\tubreve: ubreve,\n\tUcirc: Ucirc$1,\n\tucirc: ucirc$1,\n\tUcy: Ucy,\n\tucy: ucy,\n\tudarr: udarr,\n\tUdblac: Udblac,\n\tudblac: udblac,\n\tudhar: udhar,\n\tufisht: ufisht,\n\tUfr: Ufr,\n\tufr: ufr,\n\tUgrave: Ugrave$1,\n\tugrave: ugrave$1,\n\tuHar: uHar,\n\tuharl: uharl,\n\tuharr: uharr,\n\tuhblk: uhblk,\n\tulcorn: ulcorn,\n\tulcorner: ulcorner,\n\tulcrop: ulcrop,\n\tultri: ultri,\n\tUmacr: Umacr,\n\tumacr: umacr,\n\tuml: uml$1,\n\tUnderBar: UnderBar,\n\tUnderBrace: UnderBrace,\n\tUnderBracket: UnderBracket,\n\tUnderParenthesis: UnderParenthesis,\n\tUnion: Union,\n\tUnionPlus: UnionPlus,\n\tUogon: Uogon,\n\tuogon: uogon,\n\tUopf: Uopf,\n\tuopf: uopf,\n\tUpArrowBar: UpArrowBar,\n\tuparrow: uparrow,\n\tUpArrow: UpArrow,\n\tUparrow: Uparrow,\n\tUpArrowDownArrow: UpArrowDownArrow,\n\tupdownarrow: updownarrow,\n\tUpDownArrow: UpDownArrow,\n\tUpdownarrow: Updownarrow,\n\tUpEquilibrium: UpEquilibrium,\n\tupharpoonleft: upharpoonleft,\n\tupharpoonright: upharpoonright,\n\tuplus: uplus,\n\tUpperLeftArrow: UpperLeftArrow,\n\tUpperRightArrow: UpperRightArrow,\n\tupsi: upsi,\n\tUpsi: Upsi,\n\tupsih: upsih,\n\tUpsilon: Upsilon,\n\tupsilon: upsilon,\n\tUpTeeArrow: UpTeeArrow,\n\tUpTee: UpTee,\n\tupuparrows: upuparrows,\n\turcorn: urcorn,\n\turcorner: urcorner,\n\turcrop: urcrop,\n\tUring: Uring,\n\turing: uring,\n\turtri: urtri,\n\tUscr: Uscr,\n\tuscr: uscr,\n\tutdot: utdot,\n\tUtilde: Utilde,\n\tutilde: utilde,\n\tutri: utri,\n\tutrif: utrif,\n\tuuarr: uuarr,\n\tUuml: Uuml$1,\n\tuuml: uuml$1,\n\tuwangle: uwangle,\n\tvangrt: vangrt,\n\tvarepsilon: varepsilon,\n\tvarkappa: varkappa,\n\tvarnothing: varnothing,\n\tvarphi: varphi,\n\tvarpi: varpi,\n\tvarpropto: varpropto,\n\tvarr: varr,\n\tvArr: vArr,\n\tvarrho: varrho,\n\tvarsigma: varsigma,\n\tvarsubsetneq: varsubsetneq,\n\tvarsubsetneqq: varsubsetneqq,\n\tvarsupsetneq: varsupsetneq,\n\tvarsupsetneqq: varsupsetneqq,\n\tvartheta: vartheta,\n\tvartriangleleft: vartriangleleft,\n\tvartriangleright: vartriangleright,\n\tvBar: vBar,\n\tVbar: Vbar,\n\tvBarv: vBarv,\n\tVcy: Vcy,\n\tvcy: vcy,\n\tvdash: vdash,\n\tvDash: vDash,\n\tVdash: Vdash,\n\tVDash: VDash,\n\tVdashl: Vdashl,\n\tveebar: veebar,\n\tvee: vee,\n\tVee: Vee,\n\tveeeq: veeeq,\n\tvellip: vellip,\n\tverbar: verbar,\n\tVerbar: Verbar,\n\tvert: vert,\n\tVert: Vert,\n\tVerticalBar: VerticalBar,\n\tVerticalLine: VerticalLine,\n\tVerticalSeparator: VerticalSeparator,\n\tVerticalTilde: VerticalTilde,\n\tVeryThinSpace: VeryThinSpace,\n\tVfr: Vfr,\n\tvfr: vfr,\n\tvltri: vltri,\n\tvnsub: vnsub,\n\tvnsup: vnsup,\n\tVopf: Vopf,\n\tvopf: vopf,\n\tvprop: vprop,\n\tvrtri: vrtri,\n\tVscr: Vscr,\n\tvscr: vscr,\n\tvsubnE: vsubnE,\n\tvsubne: vsubne,\n\tvsupnE: vsupnE,\n\tvsupne: vsupne,\n\tVvdash: Vvdash,\n\tvzigzag: vzigzag,\n\tWcirc: Wcirc,\n\twcirc: wcirc,\n\twedbar: wedbar,\n\twedge: wedge,\n\tWedge: Wedge,\n\twedgeq: wedgeq,\n\tweierp: weierp,\n\tWfr: Wfr,\n\twfr: wfr,\n\tWopf: Wopf,\n\twopf: wopf,\n\twp: wp,\n\twr: wr,\n\twreath: wreath,\n\tWscr: Wscr,\n\twscr: wscr,\n\txcap: xcap,\n\txcirc: xcirc,\n\txcup: xcup,\n\txdtri: xdtri,\n\tXfr: Xfr,\n\txfr: xfr,\n\txharr: xharr,\n\txhArr: xhArr,\n\tXi: Xi,\n\txi: xi,\n\txlarr: xlarr,\n\txlArr: xlArr,\n\txmap: xmap,\n\txnis: xnis,\n\txodot: xodot,\n\tXopf: Xopf,\n\txopf: xopf,\n\txoplus: xoplus,\n\txotime: xotime,\n\txrarr: xrarr,\n\txrArr: xrArr,\n\tXscr: Xscr,\n\txscr: xscr,\n\txsqcup: xsqcup,\n\txuplus: xuplus,\n\txutri: xutri,\n\txvee: xvee,\n\txwedge: xwedge,\n\tYacute: Yacute$1,\n\tyacute: yacute$1,\n\tYAcy: YAcy,\n\tyacy: yacy,\n\tYcirc: Ycirc,\n\tycirc: ycirc,\n\tYcy: Ycy,\n\tycy: ycy,\n\tyen: yen$1,\n\tYfr: Yfr,\n\tyfr: yfr,\n\tYIcy: YIcy,\n\tyicy: yicy,\n\tYopf: Yopf,\n\tyopf: yopf,\n\tYscr: Yscr,\n\tyscr: yscr,\n\tYUcy: YUcy,\n\tyucy: yucy,\n\tyuml: yuml$1,\n\tYuml: Yuml,\n\tZacute: Zacute,\n\tzacute: zacute,\n\tZcaron: Zcaron,\n\tzcaron: zcaron,\n\tZcy: Zcy,\n\tzcy: zcy,\n\tZdot: Zdot,\n\tzdot: zdot,\n\tzeetrf: zeetrf,\n\tZeroWidthSpace: ZeroWidthSpace,\n\tZeta: Zeta,\n\tzeta: zeta,\n\tzfr: zfr,\n\tZfr: Zfr,\n\tZHcy: ZHcy,\n\tzhcy: zhcy,\n\tzigrarr: zigrarr,\n\tzopf: zopf,\n\tZopf: Zopf,\n\tZscr: Zscr,\n\tzscr: zscr,\n\tzwj: zwj,\n\tzwnj: zwnj\n};\n\nvar Aacute = \"Á\";\nvar aacute = \"á\";\nvar Acirc = \"Â\";\nvar acirc = \"â\";\nvar acute = \"´\";\nvar AElig = \"Æ\";\nvar aelig = \"æ\";\nvar Agrave = \"À\";\nvar agrave = \"à\";\nvar amp$1 = \"&\";\nvar AMP = \"&\";\nvar Aring = \"Å\";\nvar aring = \"å\";\nvar Atilde = \"Ã\";\nvar atilde = \"ã\";\nvar Auml = \"Ä\";\nvar auml = \"ä\";\nvar brvbar = \"¦\";\nvar Ccedil = \"Ç\";\nvar ccedil = \"ç\";\nvar cedil = \"¸\";\nvar cent = \"¢\";\nvar copy = \"©\";\nvar COPY = \"©\";\nvar curren = \"¤\";\nvar deg = \"°\";\nvar divide = \"÷\";\nvar Eacute = \"É\";\nvar eacute = \"é\";\nvar Ecirc = \"Ê\";\nvar ecirc = \"ê\";\nvar Egrave = \"È\";\nvar egrave = \"è\";\nvar ETH = \"Ð\";\nvar eth = \"ð\";\nvar Euml = \"Ë\";\nvar euml = \"ë\";\nvar frac12 = \"½\";\nvar frac14 = \"¼\";\nvar frac34 = \"¾\";\nvar gt$1 = \">\";\nvar GT = \">\";\nvar Iacute = \"Í\";\nvar iacute = \"í\";\nvar Icirc = \"Î\";\nvar icirc = \"î\";\nvar iexcl = \"¡\";\nvar Igrave = \"Ì\";\nvar igrave = \"ì\";\nvar iquest = \"¿\";\nvar Iuml = \"Ï\";\nvar iuml = \"ï\";\nvar laquo = \"«\";\nvar lt$1 = \"<\";\nvar LT = \"<\";\nvar macr = \"¯\";\nvar micro = \"µ\";\nvar middot = \"·\";\nvar nbsp = \" \";\nvar not = \"¬\";\nvar Ntilde = \"Ñ\";\nvar ntilde = \"ñ\";\nvar Oacute = \"Ó\";\nvar oacute = \"ó\";\nvar Ocirc = \"Ô\";\nvar ocirc = \"ô\";\nvar Ograve = \"Ò\";\nvar ograve = \"ò\";\nvar ordf = \"ª\";\nvar ordm = \"º\";\nvar Oslash = \"Ø\";\nvar oslash = \"ø\";\nvar Otilde = \"Õ\";\nvar otilde = \"õ\";\nvar Ouml = \"Ö\";\nvar ouml = \"ö\";\nvar para = \"¶\";\nvar plusmn = \"±\";\nvar pound = \"£\";\nvar quot$1 = \"\\\"\";\nvar QUOT = \"\\\"\";\nvar raquo = \"»\";\nvar reg = \"®\";\nvar REG = \"®\";\nvar sect = \"§\";\nvar shy = \"­\";\nvar sup1 = \"¹\";\nvar sup2 = \"²\";\nvar sup3 = \"³\";\nvar szlig = \"ß\";\nvar THORN = \"Þ\";\nvar thorn = \"þ\";\nvar times = \"×\";\nvar Uacute = \"Ú\";\nvar uacute = \"ú\";\nvar Ucirc = \"Û\";\nvar ucirc = \"û\";\nvar Ugrave = \"Ù\";\nvar ugrave = \"ù\";\nvar uml = \"¨\";\nvar Uuml = \"Ü\";\nvar uuml = \"ü\";\nvar Yacute = \"Ý\";\nvar yacute = \"ý\";\nvar yen = \"¥\";\nvar yuml = \"ÿ\";\nvar require$$1 = {\n\tAacute: Aacute,\n\taacute: aacute,\n\tAcirc: Acirc,\n\tacirc: acirc,\n\tacute: acute,\n\tAElig: AElig,\n\taelig: aelig,\n\tAgrave: Agrave,\n\tagrave: agrave,\n\tamp: amp$1,\n\tAMP: AMP,\n\tAring: Aring,\n\taring: aring,\n\tAtilde: Atilde,\n\tatilde: atilde,\n\tAuml: Auml,\n\tauml: auml,\n\tbrvbar: brvbar,\n\tCcedil: Ccedil,\n\tccedil: ccedil,\n\tcedil: cedil,\n\tcent: cent,\n\tcopy: copy,\n\tCOPY: COPY,\n\tcurren: curren,\n\tdeg: deg,\n\tdivide: divide,\n\tEacute: Eacute,\n\teacute: eacute,\n\tEcirc: Ecirc,\n\tecirc: ecirc,\n\tEgrave: Egrave,\n\tegrave: egrave,\n\tETH: ETH,\n\teth: eth,\n\tEuml: Euml,\n\teuml: euml,\n\tfrac12: frac12,\n\tfrac14: frac14,\n\tfrac34: frac34,\n\tgt: gt$1,\n\tGT: GT,\n\tIacute: Iacute,\n\tiacute: iacute,\n\tIcirc: Icirc,\n\ticirc: icirc,\n\tiexcl: iexcl,\n\tIgrave: Igrave,\n\tigrave: igrave,\n\tiquest: iquest,\n\tIuml: Iuml,\n\tiuml: iuml,\n\tlaquo: laquo,\n\tlt: lt$1,\n\tLT: LT,\n\tmacr: macr,\n\tmicro: micro,\n\tmiddot: middot,\n\tnbsp: nbsp,\n\tnot: not,\n\tNtilde: Ntilde,\n\tntilde: ntilde,\n\tOacute: Oacute,\n\toacute: oacute,\n\tOcirc: Ocirc,\n\tocirc: ocirc,\n\tOgrave: Ograve,\n\tograve: ograve,\n\tordf: ordf,\n\tordm: ordm,\n\tOslash: Oslash,\n\toslash: oslash,\n\tOtilde: Otilde,\n\totilde: otilde,\n\tOuml: Ouml,\n\touml: ouml,\n\tpara: para,\n\tplusmn: plusmn,\n\tpound: pound,\n\tquot: quot$1,\n\tQUOT: QUOT,\n\traquo: raquo,\n\treg: reg,\n\tREG: REG,\n\tsect: sect,\n\tshy: shy,\n\tsup1: sup1,\n\tsup2: sup2,\n\tsup3: sup3,\n\tszlig: szlig,\n\tTHORN: THORN,\n\tthorn: thorn,\n\ttimes: times,\n\tUacute: Uacute,\n\tuacute: uacute,\n\tUcirc: Ucirc,\n\tucirc: ucirc,\n\tUgrave: Ugrave,\n\tugrave: ugrave,\n\tuml: uml,\n\tUuml: Uuml,\n\tuuml: uuml,\n\tYacute: Yacute,\n\tyacute: yacute,\n\tyen: yen,\n\tyuml: yuml\n};\n\nvar amp = \"&\";\nvar apos = \"'\";\nvar gt = \">\";\nvar lt = \"<\";\nvar quot = \"\\\"\";\nvar require$$0$1 = {\n\tamp: amp,\n\tapos: apos,\n\tgt: gt,\n\tlt: lt,\n\tquot: quot\n};\n\nvar decode_codepoint = {};\n\nvar require$$0 = {\n\t\"0\": 65533,\n\t\"128\": 8364,\n\t\"130\": 8218,\n\t\"131\": 402,\n\t\"132\": 8222,\n\t\"133\": 8230,\n\t\"134\": 8224,\n\t\"135\": 8225,\n\t\"136\": 710,\n\t\"137\": 8240,\n\t\"138\": 352,\n\t\"139\": 8249,\n\t\"140\": 338,\n\t\"142\": 381,\n\t\"145\": 8216,\n\t\"146\": 8217,\n\t\"147\": 8220,\n\t\"148\": 8221,\n\t\"149\": 8226,\n\t\"150\": 8211,\n\t\"151\": 8212,\n\t\"152\": 732,\n\t\"153\": 8482,\n\t\"154\": 353,\n\t\"155\": 8250,\n\t\"156\": 339,\n\t\"158\": 382,\n\t\"159\": 376\n};\n\nvar __importDefault$2 = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(decode_codepoint, \"__esModule\", { value: true });\nvar decode_json_1 = __importDefault$2(require$$0);\n// Adapted from https://github.com/mathiasbynens/he/blob/master/src/he.js#L94-L119\nvar fromCodePoint$2 = \n// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\nString.fromCodePoint ||\n function (codePoint) {\n var output = \"\";\n if (codePoint > 0xffff) {\n codePoint -= 0x10000;\n output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800);\n codePoint = 0xdc00 | (codePoint & 0x3ff);\n }\n output += String.fromCharCode(codePoint);\n return output;\n };\nfunction decodeCodePoint(codePoint) {\n if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) {\n return \"\\uFFFD\";\n }\n if (codePoint in decode_json_1.default) {\n codePoint = decode_json_1.default[codePoint];\n }\n return fromCodePoint$2(codePoint);\n}\ndecode_codepoint.default = decodeCodePoint;\n\nvar __importDefault$1 = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(decode, \"__esModule\", { value: true });\ndecode.decodeHTML = decode.decodeHTMLStrict = decode.decodeXML = void 0;\nvar entities_json_1$1 = __importDefault$1(require$$1$1);\nvar legacy_json_1 = __importDefault$1(require$$1);\nvar xml_json_1$1 = __importDefault$1(require$$0$1);\nvar decode_codepoint_1 = __importDefault$1(decode_codepoint);\nvar strictEntityRe = /&(?:[a-zA-Z0-9]+|#[xX][\\da-fA-F]+|#\\d+);/g;\ndecode.decodeXML = getStrictDecoder(xml_json_1$1.default);\ndecode.decodeHTMLStrict = getStrictDecoder(entities_json_1$1.default);\nfunction getStrictDecoder(map) {\n var replace = getReplacer(map);\n return function (str) { return String(str).replace(strictEntityRe, replace); };\n}\nvar sorter = function (a, b) { return (a < b ? 1 : -1); };\ndecode.decodeHTML = (function () {\n var legacy = Object.keys(legacy_json_1.default).sort(sorter);\n var keys = Object.keys(entities_json_1$1.default).sort(sorter);\n for (var i = 0, j = 0; i < keys.length; i++) {\n if (legacy[j] === keys[i]) {\n keys[i] += \";?\";\n j++;\n }\n else {\n keys[i] += \";\";\n }\n }\n var re = new RegExp(\"&(?:\" + keys.join(\"|\") + \"|#[xX][\\\\da-fA-F]+;?|#\\\\d+;?)\", \"g\");\n var replace = getReplacer(entities_json_1$1.default);\n function replacer(str) {\n if (str.substr(-1) !== \";\")\n str += \";\";\n return replace(str);\n }\n // TODO consider creating a merged map\n return function (str) { return String(str).replace(re, replacer); };\n})();\nfunction getReplacer(map) {\n return function replace(str) {\n if (str.charAt(1) === \"#\") {\n var secondChar = str.charAt(2);\n if (secondChar === \"X\" || secondChar === \"x\") {\n return decode_codepoint_1.default(parseInt(str.substr(3), 16));\n }\n return decode_codepoint_1.default(parseInt(str.substr(2), 10));\n }\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n return map[str.slice(1, -1)] || str;\n };\n}\n\nvar encode = {};\n\nvar __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(encode, \"__esModule\", { value: true });\nencode.escapeUTF8 = encode.escape = encode.encodeNonAsciiHTML = encode.encodeHTML = encode.encodeXML = void 0;\nvar xml_json_1 = __importDefault(require$$0$1);\nvar inverseXML = getInverseObj(xml_json_1.default);\nvar xmlReplacer = getInverseReplacer(inverseXML);\n/**\n * Encodes all non-ASCII characters, as well as characters not valid in XML\n * documents using XML entities.\n *\n * If a character has no equivalent entity, a\n * numeric hexadecimal reference (eg. `&#xfc;`) will be used.\n */\nencode.encodeXML = getASCIIEncoder(inverseXML);\nvar entities_json_1 = __importDefault(require$$1$1);\nvar inverseHTML = getInverseObj(entities_json_1.default);\nvar htmlReplacer = getInverseReplacer(inverseHTML);\n/**\n * Encodes all entities and non-ASCII characters in the input.\n *\n * This includes characters that are valid ASCII characters in HTML documents.\n * For example `#` will be encoded as `&num;`. To get a more compact output,\n * consider using the `encodeNonAsciiHTML` function.\n *\n * If a character has no equivalent entity, a\n * numeric hexadecimal reference (eg. `&#xfc;`) will be used.\n */\nencode.encodeHTML = getInverse(inverseHTML, htmlReplacer);\n/**\n * Encodes all non-ASCII characters, as well as characters not valid in HTML\n * documents using HTML entities.\n *\n * If a character has no equivalent entity, a\n * numeric hexadecimal reference (eg. `&#xfc;`) will be used.\n */\nencode.encodeNonAsciiHTML = getASCIIEncoder(inverseHTML);\nfunction getInverseObj(obj) {\n return Object.keys(obj)\n .sort()\n .reduce(function (inverse, name) {\n inverse[obj[name]] = \"&\" + name + \";\";\n return inverse;\n }, {});\n}\nfunction getInverseReplacer(inverse) {\n var single = [];\n var multiple = [];\n for (var _i = 0, _a = Object.keys(inverse); _i < _a.length; _i++) {\n var k = _a[_i];\n if (k.length === 1) {\n // Add value to single array\n single.push(\"\\\\\" + k);\n }\n else {\n // Add value to multiple array\n multiple.push(k);\n }\n }\n // Add ranges to single characters.\n single.sort();\n for (var start = 0; start < single.length - 1; start++) {\n // Find the end of a run of characters\n var end = start;\n while (end < single.length - 1 &&\n single[end].charCodeAt(1) + 1 === single[end + 1].charCodeAt(1)) {\n end += 1;\n }\n var count = 1 + end - start;\n // We want to replace at least three characters\n if (count < 3)\n continue;\n single.splice(start, count, single[start] + \"-\" + single[end]);\n }\n multiple.unshift(\"[\" + single.join(\"\") + \"]\");\n return new RegExp(multiple.join(\"|\"), \"g\");\n}\n// /[^\\0-\\x7F]/gu\nvar reNonASCII = /(?:[\\x80-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])/g;\nvar getCodePoint = \n// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\nString.prototype.codePointAt != null\n ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n function (str) { return str.codePointAt(0); }\n : // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n function (c) {\n return (c.charCodeAt(0) - 0xd800) * 0x400 +\n c.charCodeAt(1) -\n 0xdc00 +\n 0x10000;\n };\nfunction singleCharReplacer(c) {\n return \"&#x\" + (c.length > 1 ? getCodePoint(c) : c.charCodeAt(0))\n .toString(16)\n .toUpperCase() + \";\";\n}\nfunction getInverse(inverse, re) {\n return function (data) {\n return data\n .replace(re, function (name) { return inverse[name]; })\n .replace(reNonASCII, singleCharReplacer);\n };\n}\nvar reEscapeChars = new RegExp(xmlReplacer.source + \"|\" + reNonASCII.source, \"g\");\n/**\n * Encodes all non-ASCII characters, as well as characters not valid in XML\n * documents using numeric hexadecimal reference (eg. `&#xfc;`).\n *\n * Have a look at `escapeUTF8` if you want a more concise output at the expense\n * of reduced transportability.\n *\n * @param data String to escape.\n */\nfunction escape(data) {\n return data.replace(reEscapeChars, singleCharReplacer);\n}\nencode.escape = escape;\n/**\n * Encodes all characters not valid in XML documents using numeric hexadecimal\n * reference (eg. `&#xfc;`).\n *\n * Note that the output will be character-set dependent.\n *\n * @param data String to escape.\n */\nfunction escapeUTF8(data) {\n return data.replace(xmlReplacer, singleCharReplacer);\n}\nencode.escapeUTF8 = escapeUTF8;\nfunction getASCIIEncoder(obj) {\n return function (data) {\n return data.replace(reEscapeChars, function (c) { return obj[c] || singleCharReplacer(c); });\n };\n}\n\n(function (exports) {\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decodeXMLStrict = exports.decodeHTML5Strict = exports.decodeHTML4Strict = exports.decodeHTML5 = exports.decodeHTML4 = exports.decodeHTMLStrict = exports.decodeHTML = exports.decodeXML = exports.encodeHTML5 = exports.encodeHTML4 = exports.escapeUTF8 = exports.escape = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.encodeXML = exports.encode = exports.decodeStrict = exports.decode = void 0;\nvar decode_1 = decode;\nvar encode_1 = encode;\n/**\n * Decodes a string with entities.\n *\n * @param data String to decode.\n * @param level Optional level to decode at. 0 = XML, 1 = HTML. Default is 0.\n * @deprecated Use `decodeXML` or `decodeHTML` directly.\n */\nfunction decode$1(data, level) {\n return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTML)(data);\n}\nexports.decode = decode$1;\n/**\n * Decodes a string with entities. Does not allow missing trailing semicolons for entities.\n *\n * @param data String to decode.\n * @param level Optional level to decode at. 0 = XML, 1 = HTML. Default is 0.\n * @deprecated Use `decodeHTMLStrict` or `decodeXML` directly.\n */\nfunction decodeStrict(data, level) {\n return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTMLStrict)(data);\n}\nexports.decodeStrict = decodeStrict;\n/**\n * Encodes a string with entities.\n *\n * @param data String to encode.\n * @param level Optional level to encode at. 0 = XML, 1 = HTML. Default is 0.\n * @deprecated Use `encodeHTML`, `encodeXML` or `encodeNonAsciiHTML` directly.\n */\nfunction encode$1(data, level) {\n return (!level || level <= 0 ? encode_1.encodeXML : encode_1.encodeHTML)(data);\n}\nexports.encode = encode$1;\nvar encode_2 = encode;\nObject.defineProperty(exports, \"encodeXML\", { enumerable: true, get: function () { return encode_2.encodeXML; } });\nObject.defineProperty(exports, \"encodeHTML\", { enumerable: true, get: function () { return encode_2.encodeHTML; } });\nObject.defineProperty(exports, \"encodeNonAsciiHTML\", { enumerable: true, get: function () { return encode_2.encodeNonAsciiHTML; } });\nObject.defineProperty(exports, \"escape\", { enumerable: true, get: function () { return encode_2.escape; } });\nObject.defineProperty(exports, \"escapeUTF8\", { enumerable: true, get: function () { return encode_2.escapeUTF8; } });\n// Legacy aliases (deprecated)\nObject.defineProperty(exports, \"encodeHTML4\", { enumerable: true, get: function () { return encode_2.encodeHTML; } });\nObject.defineProperty(exports, \"encodeHTML5\", { enumerable: true, get: function () { return encode_2.encodeHTML; } });\nvar decode_2 = decode;\nObject.defineProperty(exports, \"decodeXML\", { enumerable: true, get: function () { return decode_2.decodeXML; } });\nObject.defineProperty(exports, \"decodeHTML\", { enumerable: true, get: function () { return decode_2.decodeHTML; } });\nObject.defineProperty(exports, \"decodeHTMLStrict\", { enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } });\n// Legacy aliases (deprecated)\nObject.defineProperty(exports, \"decodeHTML4\", { enumerable: true, get: function () { return decode_2.decodeHTML; } });\nObject.defineProperty(exports, \"decodeHTML5\", { enumerable: true, get: function () { return decode_2.decodeHTML; } });\nObject.defineProperty(exports, \"decodeHTML4Strict\", { enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } });\nObject.defineProperty(exports, \"decodeHTML5Strict\", { enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } });\nObject.defineProperty(exports, \"decodeXMLStrict\", { enumerable: true, get: function () { return decode_2.decodeXML; } });\n}(lib));\n\nvar ENTITY = '&(?:#x[a-f0-9]{1,6}|#[0-9]{1,7}|[a-z][a-z0-9]{1,31});';\nvar C_BACKSLASH$1 = 92;\nvar reBackslashOrAmp = /[\\\\&]/;\nvar ESCAPABLE = '[!\"#$%&\\'()*+,./:;<=>?@[\\\\\\\\\\\\]^_`{|}~-]';\nvar reEntityOrEscapedChar = new RegExp(\"\\\\\\\\\" + ESCAPABLE + \"|\" + ENTITY, 'gi');\nvar XMLSPECIAL = '[&<>\"]';\nvar reXmlSpecial = new RegExp(XMLSPECIAL, 'g');\nvar unescapeChar = function (s) {\n if (s.charCodeAt(0) === C_BACKSLASH$1) {\n return s.charAt(1);\n }\n return lib.decodeHTML(s);\n};\n// Replace entities and backslash escapes with literal characters.\nfunction unescapeString(s) {\n if (reBackslashOrAmp.test(s)) {\n return s.replace(reEntityOrEscapedChar, unescapeChar);\n }\n return s;\n}\nfunction normalizeURI(uri) {\n try {\n return encode_1(uri);\n }\n catch (err) {\n return uri;\n }\n}\nfunction replaceUnsafeChar(s) {\n switch (s) {\n case '&':\n return '&amp;';\n case '<':\n return '&lt;';\n case '>':\n return '&gt;';\n case '\"':\n return '&quot;';\n default:\n return s;\n }\n}\nfunction escapeXml(s) {\n if (reXmlSpecial.test(s)) {\n return s.replace(reXmlSpecial, replaceUnsafeChar);\n }\n return s;\n}\nfunction repeat(str, count) {\n var arr = [];\n for (var i = 0; i < count; i++) {\n arr.push(str);\n }\n return arr.join('');\n}\nfunction isEmpty(str) {\n if (!str) {\n return true;\n }\n return !/[^ \\t]+/.test(str);\n}\n\nvar NodeWalker = /** @class */ (function () {\n function NodeWalker(root) {\n this.current = root;\n this.root = root;\n this.entering = true;\n }\n NodeWalker.prototype.next = function () {\n var cur = this.current;\n var entering = this.entering;\n if (cur === null) {\n return null;\n }\n var container = isContainer$1(cur);\n if (entering && container) {\n if (cur.firstChild) {\n this.current = cur.firstChild;\n this.entering = true;\n }\n else {\n // stay on node but exit\n this.entering = false;\n }\n }\n else if (cur === this.root) {\n this.current = null;\n }\n else if (cur.next === null) {\n this.current = cur.parent;\n this.entering = false;\n }\n else {\n this.current = cur.next;\n this.entering = true;\n }\n return { entering: entering, node: cur };\n };\n NodeWalker.prototype.resumeAt = function (node, entering) {\n this.current = node;\n this.entering = entering === true;\n };\n return NodeWalker;\n}());\n\nfunction isContainer$1(node) {\n switch (node.type) {\n case 'document':\n case 'blockQuote':\n case 'list':\n case 'item':\n case 'paragraph':\n case 'heading':\n case 'emph':\n case 'strong':\n case 'strike':\n case 'link':\n case 'image':\n case 'table':\n case 'tableHead':\n case 'tableBody':\n case 'tableRow':\n case 'tableCell':\n case 'tableDelimRow':\n case 'customInline':\n return true;\n default:\n return false;\n }\n}\nvar lastNodeId = 1;\nvar nodeMap = {};\nfunction getNodeById(id) {\n return nodeMap[id];\n}\nfunction removeNodeById(id) {\n delete nodeMap[id];\n}\nfunction removeAllNode() {\n nodeMap = {};\n}\nvar Node$1 = /** @class */ (function () {\n function Node(nodeType, sourcepos) {\n this.parent = null;\n this.prev = null;\n this.next = null;\n // only for container node\n this.firstChild = null;\n this.lastChild = null;\n // only for leaf node\n this.literal = null;\n if (nodeType === 'document') {\n this.id = -1;\n }\n else {\n this.id = lastNodeId++;\n }\n this.type = nodeType;\n this.sourcepos = sourcepos;\n nodeMap[this.id] = this;\n }\n Node.prototype.isContainer = function () {\n return isContainer$1(this);\n };\n Node.prototype.unlink = function () {\n if (this.prev) {\n this.prev.next = this.next;\n }\n else if (this.parent) {\n this.parent.firstChild = this.next;\n }\n if (this.next) {\n this.next.prev = this.prev;\n }\n else if (this.parent) {\n this.parent.lastChild = this.prev;\n }\n this.parent = null;\n this.next = null;\n this.prev = null;\n };\n Node.prototype.replaceWith = function (node) {\n this.insertBefore(node);\n this.unlink();\n };\n Node.prototype.insertAfter = function (sibling) {\n sibling.unlink();\n sibling.next = this.next;\n if (sibling.next) {\n sibling.next.prev = sibling;\n }\n sibling.prev = this;\n this.next = sibling;\n if (this.parent) {\n sibling.parent = this.parent;\n if (!sibling.next) {\n sibling.parent.lastChild = sibling;\n }\n }\n };\n Node.prototype.insertBefore = function (sibling) {\n sibling.unlink();\n sibling.prev = this.prev;\n if (sibling.prev) {\n sibling.prev.next = sibling;\n }\n sibling.next = this;\n this.prev = sibling;\n sibling.parent = this.parent;\n if (!sibling.prev) {\n sibling.parent.firstChild = sibling;\n }\n };\n Node.prototype.appendChild = function (child) {\n child.unlink();\n child.parent = this;\n if (this.lastChild) {\n this.lastChild.next = child;\n child.prev = this.lastChild;\n this.lastChild = child;\n }\n else {\n this.firstChild = child;\n this.lastChild = child;\n }\n };\n Node.prototype.prependChild = function (child) {\n child.unlink();\n child.parent = this;\n if (this.firstChild) {\n this.firstChild.prev = child;\n child.next = this.firstChild;\n this.firstChild = child;\n }\n else {\n this.firstChild = child;\n this.lastChild = child;\n }\n };\n Node.prototype.walker = function () {\n return new NodeWalker(this);\n };\n return Node;\n}());\nvar BlockNode = /** @class */ (function (_super) {\n __extends(BlockNode, _super);\n function BlockNode(nodeType, sourcepos) {\n var _this = _super.call(this, nodeType, sourcepos) || this;\n // temporal data (for parsing)\n _this.open = true;\n _this.lineOffsets = null;\n _this.stringContent = null;\n _this.lastLineBlank = false;\n _this.lastLineChecked = false;\n _this.type = nodeType;\n return _this;\n }\n return BlockNode;\n}(Node$1));\nvar ListNode = /** @class */ (function (_super) {\n __extends(ListNode, _super);\n function ListNode() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.listData = null;\n return _this;\n }\n return ListNode;\n}(BlockNode));\nvar HeadingNode = /** @class */ (function (_super) {\n __extends(HeadingNode, _super);\n function HeadingNode() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.level = 0;\n _this.headingType = 'atx';\n return _this;\n }\n return HeadingNode;\n}(BlockNode));\nvar CodeBlockNode = /** @class */ (function (_super) {\n __extends(CodeBlockNode, _super);\n function CodeBlockNode() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.isFenced = false;\n _this.fenceChar = null;\n _this.fenceLength = 0;\n _this.fenceOffset = -1;\n _this.info = null;\n _this.infoPadding = 0;\n return _this;\n }\n return CodeBlockNode;\n}(BlockNode));\nvar TableNode = /** @class */ (function (_super) {\n __extends(TableNode, _super);\n function TableNode() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.columns = [];\n return _this;\n }\n return TableNode;\n}(BlockNode));\nvar TableCellNode = /** @class */ (function (_super) {\n __extends(TableCellNode, _super);\n function TableCellNode() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.startIdx = 0;\n _this.endIdx = 0;\n _this.paddingLeft = 0;\n _this.paddingRight = 0;\n _this.ignored = false;\n return _this;\n }\n return TableCellNode;\n}(BlockNode));\nvar RefDefNode = /** @class */ (function (_super) {\n __extends(RefDefNode, _super);\n function RefDefNode() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.title = '';\n _this.dest = '';\n _this.label = '';\n return _this;\n }\n return RefDefNode;\n}(BlockNode));\nvar CustomBlockNode = /** @class */ (function (_super) {\n __extends(CustomBlockNode, _super);\n function CustomBlockNode() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.syntaxLength = 0;\n _this.offset = -1;\n _this.info = '';\n return _this;\n }\n return CustomBlockNode;\n}(BlockNode));\nvar HtmlBlockNode = /** @class */ (function (_super) {\n __extends(HtmlBlockNode, _super);\n function HtmlBlockNode() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.htmlBlockType = -1;\n return _this;\n }\n return HtmlBlockNode;\n}(BlockNode));\nvar LinkNode = /** @class */ (function (_super) {\n __extends(LinkNode, _super);\n function LinkNode() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.destination = null;\n _this.title = null;\n _this.extendedAutolink = false;\n return _this;\n }\n return LinkNode;\n}(Node$1));\nvar CodeNode = /** @class */ (function (_super) {\n __extends(CodeNode, _super);\n function CodeNode() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.tickCount = 0;\n return _this;\n }\n return CodeNode;\n}(Node$1));\nvar CustomInlineNode = /** @class */ (function (_super) {\n __extends(CustomInlineNode, _super);\n function CustomInlineNode() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.info = '';\n return _this;\n }\n return CustomInlineNode;\n}(Node$1));\nfunction createNode$1(type, sourcepos) {\n switch (type) {\n case 'heading':\n return new HeadingNode(type, sourcepos);\n case 'list':\n case 'item':\n return new ListNode(type, sourcepos);\n case 'link':\n case 'image':\n return new LinkNode(type, sourcepos);\n case 'codeBlock':\n return new CodeBlockNode(type, sourcepos);\n case 'htmlBlock':\n return new HtmlBlockNode(type, sourcepos);\n case 'table':\n return new TableNode(type, sourcepos);\n case 'tableCell':\n return new TableCellNode(type, sourcepos);\n case 'document':\n case 'paragraph':\n case 'blockQuote':\n case 'thematicBreak':\n case 'tableRow':\n case 'tableBody':\n case 'tableHead':\n case 'frontMatter':\n return new BlockNode(type, sourcepos);\n case 'code':\n return new CodeNode(type, sourcepos);\n case 'refDef':\n return new RefDefNode(type, sourcepos);\n case 'customBlock':\n return new CustomBlockNode(type, sourcepos);\n case 'customInline':\n return new CustomInlineNode(type, sourcepos);\n default:\n return new Node$1(type, sourcepos);\n }\n}\nfunction isCodeBlock(node) {\n return node.type === 'codeBlock';\n}\nfunction isHtmlBlock(node) {\n return node.type === 'htmlBlock';\n}\nfunction isHeading(node) {\n return node.type === 'heading';\n}\nfunction isList(node) {\n return node.type === 'list';\n}\nfunction isTable(node) {\n return node.type === 'table';\n}\nfunction isRefDef(node) {\n return node.type === 'refDef';\n}\nfunction isCustomBlock(node) {\n return node.type === 'customBlock';\n}\nfunction isCustomInline(node) {\n return node.type === 'customInline';\n}\nfunction text$1(s, sourcepos) {\n var node = createNode$1('text', sourcepos);\n node.literal = s;\n return node;\n}\n\nvar TAGNAME = '[A-Za-z][A-Za-z0-9-]*';\nvar ATTRIBUTENAME = '[a-zA-Z_:][a-zA-Z0-9:._-]*';\nvar UNQUOTEDVALUE = '[^\"\\'=<>`\\\\x00-\\\\x20]+';\nvar SINGLEQUOTEDVALUE = \"'[^']*'\";\nvar DOUBLEQUOTEDVALUE = '\"[^\"]*\"';\nvar ATTRIBUTEVALUE = \"(?:\" + UNQUOTEDVALUE + \"|\" + SINGLEQUOTEDVALUE + \"|\" + DOUBLEQUOTEDVALUE + \")\";\nvar ATTRIBUTEVALUESPEC = \"\" + '(?:\\\\s*=\\\\s*' + ATTRIBUTEVALUE + \")\";\nvar ATTRIBUTE = \"\" + '(?:\\\\s+' + ATTRIBUTENAME + ATTRIBUTEVALUESPEC + \"?)\";\nvar OPENTAG = \"<\" + TAGNAME + ATTRIBUTE + \"*\\\\s*/?>\";\nvar CLOSETAG = \"</\" + TAGNAME + \"\\\\s*[>]\";\nvar HTMLCOMMENT = '<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->';\nvar PROCESSINGINSTRUCTION = '[<][?].*?[?][>]';\nvar DECLARATION = '<![A-Z]+\\\\s+[^>]*>';\nvar CDATA = '<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?\\\\]\\\\]>';\nvar HTMLTAG = \"(?:\" + OPENTAG + \"|\" + CLOSETAG + \"|\" + HTMLCOMMENT + \"|\" + PROCESSINGINSTRUCTION + \"|\" + DECLARATION + \"|\" + CDATA + \")\";\nvar reHtmlTag = new RegExp(\"^\" + HTMLTAG, 'i');\n\n// derived from https://github.com/mathiasbynens/String.fromCodePoint\n/*! http://mths.be/fromcodepoint v0.2.1 by @mathias */\nvar fromCodePoint;\nif (String.fromCodePoint) {\n fromCodePoint = function (_) {\n try {\n return String.fromCodePoint(_);\n }\n catch (e) {\n if (e instanceof RangeError) {\n return String.fromCharCode(0xfffd);\n }\n throw e;\n }\n };\n}\nelse {\n var stringFromCharCode_1 = String.fromCharCode;\n var floor_1 = Math.floor;\n fromCodePoint = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var MAX_SIZE = 0x4000;\n var codeUnits = [];\n var highSurrogate;\n var lowSurrogate;\n var index = -1;\n var length = args.length;\n if (!length) {\n return '';\n }\n var result = '';\n while (++index < length) {\n var codePoint = Number(args[index]);\n if (!isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity`\n codePoint < 0 || // not a valid Unicode code point\n codePoint > 0x10ffff || // not a valid Unicode code point\n floor_1(codePoint) !== codePoint // not an integer\n ) {\n return String.fromCharCode(0xfffd);\n }\n if (codePoint <= 0xffff) {\n // BMP code point\n codeUnits.push(codePoint);\n }\n else {\n // Astral code point; split in surrogate halves\n // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n codePoint -= 0x10000;\n highSurrogate = (codePoint >> 10) + 0xd800;\n lowSurrogate = (codePoint % 0x400) + 0xdc00;\n codeUnits.push(highSurrogate, lowSurrogate);\n }\n if (index + 1 === length || codeUnits.length > MAX_SIZE) {\n result += stringFromCharCode_1.apply(void 0, codeUnits);\n codeUnits.length = 0;\n }\n }\n return result;\n };\n}\nvar fromCodePoint$1 = fromCodePoint;\n\nvar DOMAIN = '(?:[w-]+.)*[A-Za-z0-9-]+.[A-Za-z0-9-]+';\nvar PATH = '[^<\\\\s]*[^<?!.,:*_?~\\\\s]';\nvar EMAIL = '[\\\\w.+-]+@(?:[\\\\w-]+\\\\.)+[\\\\w-]+';\nfunction trimUnmatchedTrailingParens(source) {\n var trailingParen = /\\)+$/.exec(source);\n if (trailingParen) {\n var count = 0;\n for (var _i = 0, source_1 = source; _i < source_1.length; _i++) {\n var ch = source_1[_i];\n if (ch === '(') {\n if (count < 0) {\n count = 1;\n }\n else {\n count += 1;\n }\n }\n else if (ch === ')') {\n count -= 1;\n }\n }\n if (count < 0) {\n var trimCount = Math.min(-count, trailingParen[0].length);\n return source.substring(0, source.length - trimCount);\n }\n }\n return source;\n}\nfunction trimTrailingEntity(source) {\n return source.replace(/&[A-Za-z0-9]+;$/, '');\n}\nfunction parseEmailLink(source) {\n var reEmailLink = new RegExp(EMAIL, 'g');\n var result = [];\n var m;\n while ((m = reEmailLink.exec(source))) {\n var text_1 = m[0];\n if (!/[_-]+$/.test(text_1)) {\n result.push({\n text: text_1,\n range: [m.index, m.index + text_1.length - 1],\n url: \"mailto:\" + text_1,\n });\n }\n }\n return result;\n}\nfunction parseUrlLink(source) {\n var reWwwAutolink = new RegExp(\"(www|https?://).\" + DOMAIN + PATH, 'g');\n var result = [];\n var m;\n while ((m = reWwwAutolink.exec(source))) {\n var text_2 = trimTrailingEntity(trimUnmatchedTrailingParens(m[0]));\n var scheme = m[1] === 'www' ? 'http://' : '';\n result.push({\n text: text_2,\n range: [m.index, m.index + text_2.length - 1],\n url: \"\" + scheme + text_2,\n });\n }\n return result;\n}\nfunction baseAutolinkParser(source) {\n return __spreadArray(__spreadArray([], parseUrlLink(source)), parseEmailLink(source)).sort(function (a, b) { return a.range[0] - b.range[0]; });\n}\nfunction convertExtAutoLinks(walker, autolinkParser) {\n if (typeof autolinkParser === 'boolean') {\n autolinkParser = baseAutolinkParser;\n }\n var event;\n var _loop_1 = function () {\n var entering = event.entering, node = event.node;\n if (entering && node.type === 'text' && node.parent.type !== 'link') {\n var literal = node.literal;\n var linkInfos = autolinkParser(literal);\n if (!linkInfos || !linkInfos.length) {\n return \"continue\";\n }\n var lastIdx = 0;\n var _a = node.sourcepos[0], lineNum_1 = _a[0], chPos_1 = _a[1];\n var sourcepos = function (startIdx, endIdx) { return [\n [lineNum_1, chPos_1 + startIdx],\n [lineNum_1, chPos_1 + endIdx],\n ]; };\n var newNodes = [];\n for (var _i = 0, linkInfos_1 = linkInfos; _i < linkInfos_1.length; _i++) {\n var _b = linkInfos_1[_i], range = _b.range, url = _b.url, linkText = _b.text;\n if (range[0] > lastIdx) {\n newNodes.push(text$1(literal.substring(lastIdx, range[0]), sourcepos(lastIdx, range[0] - 1)));\n }\n var linkNode = createNode$1('link', sourcepos.apply(void 0, range));\n linkNode.appendChild(text$1(linkText, sourcepos.apply(void 0, range)));\n linkNode.destination = url;\n linkNode.extendedAutolink = true;\n newNodes.push(linkNode);\n lastIdx = range[1] + 1;\n }\n if (lastIdx < literal.length) {\n newNodes.push(text$1(literal.substring(lastIdx), sourcepos(lastIdx, literal.length - 1)));\n }\n for (var _c = 0, newNodes_1 = newNodes; _c < newNodes_1.length; _c++) {\n var newNode = newNodes_1[_c];\n node.insertBefore(newNode);\n }\n node.unlink();\n }\n };\n while ((event = walker.next())) {\n _loop_1();\n }\n}\n\nfunction last(arr) {\n return arr[arr.length - 1];\n}\n// normalize a reference in reference link (remove []s, trim,\n// collapse internal space, unicode case fold.\n// See commonmark/commonmark.js#168.\nfunction normalizeReference(str) {\n return str\n .slice(1, str.length - 1)\n .trim()\n .replace(/[ \\t\\r\\n]+/, ' ')\n .toLowerCase()\n .toUpperCase();\n}\nfunction iterateObject(obj, iteratee) {\n Object.keys(obj).forEach(function (key) {\n iteratee(key, obj[key]);\n });\n}\nfunction omit(obj) {\n var propNames = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n propNames[_i - 1] = arguments[_i];\n }\n var resultMap = __assign({}, obj);\n propNames.forEach(function (key) {\n delete resultMap[key];\n });\n return resultMap;\n}\nfunction isEmptyObj(obj) {\n return !Object.keys(obj).length;\n}\nfunction clearObj(obj) {\n Object.keys(obj).forEach(function (key) {\n delete obj[key];\n });\n}\n\nvar C_NEWLINE = 10;\nvar C_ASTERISK = 42;\nvar C_UNDERSCORE = 95;\nvar C_BACKTICK = 96;\nvar C_OPEN_BRACKET$1 = 91;\nvar C_CLOSE_BRACKET = 93;\nvar C_TILDE = 126;\nvar C_LESSTHAN$1 = 60;\nvar C_BANG = 33;\nvar C_BACKSLASH = 92;\nvar C_AMPERSAND = 38;\nvar C_OPEN_PAREN = 40;\nvar C_CLOSE_PAREN = 41;\nvar C_COLON = 58;\nvar C_SINGLEQUOTE = 39;\nvar C_DOUBLEQUOTE = 34;\nvar C_DOLLAR = 36;\n// Some regexps used in inline parser:\nvar ESCAPED_CHAR = \"\\\\\\\\\" + ESCAPABLE;\nvar rePunctuation = new RegExp(/[!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~\\xA1\\xA7\\xAB\\xB6\\xB7\\xBB\\xBF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u058A\\u05BE\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061E\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u0AF0\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F3A-\\u0F3D\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u1400\\u166D\\u166E\\u169B\\u169C\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B5A-\\u1B60\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205E\\u207D\\u207E\\u208D\\u208E\\u2308-\\u230B\\u2329\\u232A\\u2768-\\u2775\\u27C5\\u27C6\\u27E6-\\u27EF\\u2983-\\u2998\\u29D8-\\u29DB\\u29FC\\u29FD\\u2CF9-\\u2CFC\\u2CFE\\u2CFF\\u2D70\\u2E00-\\u2E2E\\u2E30-\\u2E42\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301F\\u3030\\u303D\\u30A0\\u30FB\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA673\\uA67E\\uA6F2-\\uA6F7\\uA874-\\uA877\\uA8CE\\uA8CF\\uA8F8-\\uA8FA\\uA8FC\\uA92E\\uA92F\\uA95F\\uA9C1-\\uA9CD\\uA9DE\\uA9DF\\uAA5C-\\uAA5F\\uAADE\\uAADF\\uAAF0\\uAAF1\\uABEB\\uFD3E\\uFD3F\\uFE10-\\uFE19\\uFE30-\\uFE52\\uFE54-\\uFE61\\uFE63\\uFE68\\uFE6A\\uFE6B\\uFF01-\\uFF03\\uFF05-\\uFF0A\\uFF0C-\\uFF0F\\uFF1A\\uFF1B\\uFF1F\\uFF20\\uFF3B-\\uFF3D\\uFF3F\\uFF5B\\uFF5D\\uFF5F-\\uFF65]|\\uD800[\\uDD00-\\uDD02\\uDF9F\\uDFD0]|\\uD801\\uDD6F|\\uD802[\\uDC57\\uDD1F\\uDD3F\\uDE50-\\uDE58\\uDE7F\\uDEF0-\\uDEF6\\uDF39-\\uDF3F\\uDF99-\\uDF9C]|\\uD804[\\uDC47-\\uDC4D\\uDCBB\\uDCBC\\uDCBE-\\uDCC1\\uDD40-\\uDD43\\uDD74\\uDD75\\uDDC5-\\uDDC9\\uDDCD\\uDDDB\\uDDDD-\\uDDDF\\uDE38-\\uDE3D\\uDEA9]|\\uD805[\\uDCC6\\uDDC1-\\uDDD7\\uDE41-\\uDE43\\uDF3C-\\uDF3E]|\\uD809[\\uDC70-\\uDC74]|\\uD81A[\\uDE6E\\uDE6F\\uDEF5\\uDF37-\\uDF3B\\uDF44]|\\uD82F\\uDC9F|\\uD836[\\uDE87-\\uDE8B]/);\nvar reLinkTitle = new RegExp(\"^(?:\\\"(\" + ESCAPED_CHAR + \"|[^\\\"\\\\x00])*\\\"\" +\n \"|\" +\n (\"'(\" + ESCAPED_CHAR + \"|[^'\\\\x00])*'\") +\n \"|\" +\n (\"\\\\((\" + ESCAPED_CHAR + \"|[^()\\\\x00])*\\\\))\"));\nvar reLinkDestinationBraces = /^(?:<(?:[^<>\\n\\\\\\x00]|\\\\.)*>)/;\nvar reEscapable = new RegExp(\"^\" + ESCAPABLE);\nvar reEntityHere = new RegExp(\"^\" + ENTITY, 'i');\nvar reTicks = /`+/;\nvar reTicksHere = /^`+/;\nvar reEllipses = /\\.\\.\\./g;\nvar reDash = /--+/g;\nvar reEmailAutolink = /^<([a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/;\nvar reAutolink = /^<[A-Za-z][A-Za-z0-9.+-]{1,31}:[^<>\\x00-\\x20]*>/i;\nvar reSpnl = /^ *(?:\\n *)?/;\nvar reWhitespaceChar = /^[ \\t\\n\\x0b\\x0c\\x0d]/;\nvar reUnicodeWhitespaceChar = /^\\s/;\nvar reFinalSpace = / *$/;\nvar reInitialSpace = /^ */;\nvar reSpaceAtEndOfLine = /^ *(?:\\n|$)/;\nvar reLinkLabel = /^\\[(?:[^\\\\\\[\\]]|\\\\.){0,1000}\\]/;\n// Matches a string of non-special characters.\nvar reMain = /^[^\\n`\\[\\]\\\\!<&*_'\"~$]+/m;\nvar InlineParser = /** @class */ (function () {\n function InlineParser(options) {\n // An InlineParser keeps track of a subject (a string to be parsed)\n // and a position in that subject.\n this.subject = '';\n this.delimiters = null; // used by handleDelim method\n this.brackets = null;\n this.pos = 0;\n this.lineStartNum = 0;\n this.lineIdx = 0;\n this.lineOffsets = [0];\n this.linePosOffset = 0;\n this.refMap = {};\n this.refLinkCandidateMap = {};\n this.refDefCandidateMap = {};\n this.options = options;\n }\n InlineParser.prototype.sourcepos = function (start, end) {\n var linePosOffset = this.linePosOffset + this.lineOffsets[this.lineIdx];\n var lineNum = this.lineStartNum + this.lineIdx;\n var startpos = [lineNum, start + linePosOffset];\n if (typeof end === 'number') {\n return [startpos, [lineNum, end + linePosOffset]];\n }\n return startpos;\n };\n InlineParser.prototype.nextLine = function () {\n this.lineIdx += 1;\n this.linePosOffset = -this.pos;\n };\n // If re matches at current position in the subject, advance\n // position in subject and return the match; otherwise return null.\n InlineParser.prototype.match = function (re) {\n var m = re.exec(this.subject.slice(this.pos));\n if (m === null) {\n return null;\n }\n this.pos += m.index + m[0].length;\n return m[0];\n };\n // Returns the code for the character at the current subject position, or -1\n // there are no more characters.\n InlineParser.prototype.peek = function () {\n if (this.pos < this.subject.length) {\n return this.subject.charCodeAt(this.pos);\n }\n return -1;\n };\n // Parse zero or more space characters, including at most one newline\n InlineParser.prototype.spnl = function () {\n this.match(reSpnl);\n return true;\n };\n // All of the parsers below try to match something at the current position\n // in the subject. If they succeed in matching anything, they\n // return the inline matched, advancing the subject.\n // Attempt to parse backticks, adding either a backtick code span or a\n // literal sequence of backticks.\n InlineParser.prototype.parseBackticks = function (block) {\n var startpos = this.pos + 1;\n var ticks = this.match(reTicksHere);\n if (ticks === null) {\n return false;\n }\n var afterOpenTicks = this.pos;\n var matched;\n while ((matched = this.match(reTicks)) !== null) {\n if (matched === ticks) {\n var contents = this.subject.slice(afterOpenTicks, this.pos - ticks.length);\n var sourcepos = this.sourcepos(startpos, this.pos);\n var lines = contents.split('\\n');\n if (lines.length > 1) {\n var lastLine = last(lines);\n this.lineIdx += lines.length - 1;\n this.linePosOffset = -(this.pos - lastLine.length - ticks.length);\n sourcepos[1] = this.sourcepos(this.pos);\n contents = lines.join(' ');\n }\n var node = createNode$1('code', sourcepos);\n if (contents.length > 0 &&\n contents.match(/[^ ]/) !== null &&\n contents[0] == ' ' &&\n contents[contents.length - 1] == ' ') {\n node.literal = contents.slice(1, contents.length - 1);\n }\n else {\n node.literal = contents;\n }\n node.tickCount = ticks.length;\n block.appendChild(node);\n return true;\n }\n }\n // If we got here, we didn't match a closing backtick sequence.\n this.pos = afterOpenTicks;\n block.appendChild(text$1(ticks, this.sourcepos(startpos, this.pos - 1)));\n return true;\n };\n // Parse a backslash-escaped special character, adding either the escaped\n // character, a hard line break (if the backslash is followed by a newline),\n // or a literal backslash to the block's children. Assumes current character\n // is a backslash.\n InlineParser.prototype.parseBackslash = function (block) {\n var subj = this.subject;\n var node;\n this.pos += 1;\n var startpos = this.pos;\n if (this.peek() === C_NEWLINE) {\n this.pos += 1;\n node = createNode$1('linebreak', this.sourcepos(this.pos - 1, this.pos));\n block.appendChild(node);\n this.nextLine();\n }\n else if (reEscapable.test(subj.charAt(this.pos))) {\n block.appendChild(text$1(subj.charAt(this.pos), this.sourcepos(startpos, this.pos)));\n this.pos += 1;\n }\n else {\n block.appendChild(text$1('\\\\', this.sourcepos(startpos, startpos)));\n }\n return true;\n };\n // Attempt to parse an autolink (URL or email in pointy brackets).\n InlineParser.prototype.parseAutolink = function (block) {\n var m;\n var dest;\n var node;\n var startpos = this.pos + 1;\n if ((m = this.match(reEmailAutolink))) {\n dest = m.slice(1, m.length - 1);\n node = createNode$1('link', this.sourcepos(startpos, this.pos));\n node.destination = normalizeURI(\"mailto:\" + dest);\n node.title = '';\n node.appendChild(text$1(dest, this.sourcepos(startpos + 1, this.pos - 1)));\n block.appendChild(node);\n return true;\n }\n if ((m = this.match(reAutolink))) {\n dest = m.slice(1, m.length - 1);\n node = createNode$1('link', this.sourcepos(startpos, this.pos));\n node.destination = normalizeURI(dest);\n node.title = '';\n node.appendChild(text$1(dest, this.sourcepos(startpos + 1, this.pos - 1)));\n block.appendChild(node);\n return true;\n }\n return false;\n };\n // Attempt to parse a raw HTML tag.\n InlineParser.prototype.parseHtmlTag = function (block) {\n var startpos = this.pos + 1;\n var m = this.match(reHtmlTag);\n if (m === null) {\n return false;\n }\n var node = createNode$1('htmlInline', this.sourcepos(startpos, this.pos));\n node.literal = m;\n block.appendChild(node);\n return true;\n };\n // Scan a sequence of characters with code cc, and return information about\n // the number of delimiters and whether they are positioned such that\n // they can open and/or close emphasis or strong emphasis. A utility\n // function for strong/emph parsing.\n InlineParser.prototype.scanDelims = function (cc) {\n var numdelims = 0;\n var startpos = this.pos;\n if (cc === C_SINGLEQUOTE || cc === C_DOUBLEQUOTE) {\n numdelims++;\n this.pos++;\n }\n else {\n while (this.peek() === cc) {\n numdelims++;\n this.pos++;\n }\n }\n if (numdelims === 0 || (numdelims < 2 && (cc === C_TILDE || cc === C_DOLLAR))) {\n this.pos = startpos;\n return null;\n }\n var charBefore = startpos === 0 ? '\\n' : this.subject.charAt(startpos - 1);\n var ccAfter = this.peek();\n var charAfter;\n if (ccAfter === -1) {\n charAfter = '\\n';\n }\n else {\n charAfter = fromCodePoint$1(ccAfter);\n }\n var afterIsWhitespace = reUnicodeWhitespaceChar.test(charAfter);\n var afterIsPunctuation = rePunctuation.test(charAfter);\n var beforeIsWhitespace = reUnicodeWhitespaceChar.test(charBefore);\n var beforeIsPunctuation = rePunctuation.test(charBefore);\n var leftFlanking = !afterIsWhitespace && (!afterIsPunctuation || beforeIsWhitespace || beforeIsPunctuation);\n var rightFlanking = !beforeIsWhitespace && (!beforeIsPunctuation || afterIsWhitespace || afterIsPunctuation);\n var canOpen;\n var canClose;\n if (cc === C_UNDERSCORE) {\n canOpen = leftFlanking && (!rightFlanking || beforeIsPunctuation);\n canClose = rightFlanking && (!leftFlanking || afterIsPunctuation);\n }\n else if (cc === C_SINGLEQUOTE || cc === C_DOUBLEQUOTE) {\n canOpen = leftFlanking && !rightFlanking;\n canClose = rightFlanking;\n }\n else if (cc === C_DOLLAR) {\n canOpen = !afterIsWhitespace;\n canClose = !beforeIsWhitespace;\n }\n else {\n canOpen = leftFlanking;\n canClose = rightFlanking;\n }\n this.pos = startpos;\n return { numdelims: numdelims, canOpen: canOpen, canClose: canClose };\n };\n // Handle a delimiter marker for emphasis or a quote.\n InlineParser.prototype.handleDelim = function (cc, block) {\n var res = this.scanDelims(cc);\n if (!res) {\n return false;\n }\n var numdelims = res.numdelims;\n var startpos = this.pos + 1;\n var contents;\n this.pos += numdelims;\n if (cc === C_SINGLEQUOTE) {\n contents = '\\u2019';\n }\n else if (cc === C_DOUBLEQUOTE) {\n contents = '\\u201C';\n }\n else {\n contents = this.subject.slice(startpos - 1, this.pos);\n }\n var node = text$1(contents, this.sourcepos(startpos, this.pos));\n block.appendChild(node);\n // Add entry to stack for this opener\n if ((res.canOpen || res.canClose) &&\n (this.options.smart || (cc !== C_SINGLEQUOTE && cc !== C_DOUBLEQUOTE))) {\n this.delimiters = {\n cc: cc,\n numdelims: numdelims,\n origdelims: numdelims,\n node: node,\n previous: this.delimiters,\n next: null,\n canOpen: res.canOpen,\n canClose: res.canClose,\n };\n if (this.delimiters.previous) {\n this.delimiters.previous.next = this.delimiters;\n }\n }\n return true;\n };\n InlineParser.prototype.removeDelimiter = function (delim) {\n if (delim.previous !== null) {\n delim.previous.next = delim.next;\n }\n if (delim.next === null) {\n // top of stack\n this.delimiters = delim.previous;\n }\n else {\n delim.next.previous = delim.previous;\n }\n };\n InlineParser.prototype.removeDelimitersBetween = function (bottom, top) {\n if (bottom.next !== top) {\n bottom.next = top;\n top.previous = bottom;\n }\n };\n /**\n * Process all delimiters - emphasis, strong emphasis, strikethrough(gfm)\n * If the smart punctuation options is true,\n * convert single/double quotes to corresponding unicode characters.\n **/\n InlineParser.prototype.processEmphasis = function (stackBottom) {\n var _a;\n var opener;\n var closer;\n var oldCloser;\n var openerInl, closerInl;\n var openerFound;\n var oddMatch = false;\n var openersBottom = (_a = {},\n _a[C_UNDERSCORE] = [stackBottom, stackBottom, stackBottom],\n _a[C_ASTERISK] = [stackBottom, stackBottom, stackBottom],\n _a[C_SINGLEQUOTE] = [stackBottom],\n _a[C_DOUBLEQUOTE] = [stackBottom],\n _a[C_TILDE] = [stackBottom],\n _a[C_DOLLAR] = [stackBottom],\n _a);\n // find first closer above stackBottom:\n closer = this.delimiters;\n while (closer !== null && closer.previous !== stackBottom) {\n closer = closer.previous;\n }\n // move forward, looking for closers, and handling each\n while (closer !== null) {\n var closercc = closer.cc;\n var closerEmph = closercc === C_UNDERSCORE || closercc === C_ASTERISK;\n if (!closer.canClose) {\n closer = closer.next;\n }\n else {\n // found emphasis closer. now look back for first matching opener:\n opener = closer.previous;\n openerFound = false;\n while (opener !== null &&\n opener !== stackBottom &&\n opener !== openersBottom[closercc][closerEmph ? closer.origdelims % 3 : 0]) {\n oddMatch =\n closerEmph &&\n (closer.canOpen || opener.canClose) &&\n closer.origdelims % 3 !== 0 &&\n (opener.origdelims + closer.origdelims) % 3 === 0;\n if (opener.cc === closer.cc && opener.canOpen && !oddMatch) {\n openerFound = true;\n break;\n }\n opener = opener.previous;\n }\n oldCloser = closer;\n if (closerEmph || closercc === C_TILDE || closercc === C_DOLLAR) {\n if (!openerFound) {\n closer = closer.next;\n }\n else if (opener) {\n // (null opener check for type narrowing)\n // calculate actual number of delimiters used from closer\n var useDelims = closer.numdelims >= 2 && opener.numdelims >= 2 ? 2 : 1;\n var emptyDelims = closerEmph ? 0 : 1;\n openerInl = opener.node;\n closerInl = closer.node;\n // build contents for new emph element\n var nodeType = closerEmph\n ? useDelims === 1\n ? 'emph'\n : 'strong'\n : 'strike';\n if (closercc === C_DOLLAR) {\n nodeType = 'customInline';\n }\n var newNode = createNode$1(nodeType);\n var openerEndPos = openerInl.sourcepos[1];\n var closerStartPos = closerInl.sourcepos[0];\n newNode.sourcepos = [\n [openerEndPos[0], openerEndPos[1] - useDelims + 1],\n [closerStartPos[0], closerStartPos[1] + useDelims - 1],\n ];\n openerInl.sourcepos[1][1] -= useDelims;\n closerInl.sourcepos[0][1] += useDelims;\n openerInl.literal = openerInl.literal.slice(useDelims);\n closerInl.literal = closerInl.literal.slice(useDelims);\n opener.numdelims -= useDelims;\n closer.numdelims -= useDelims;\n // remove used delimiters from stack elts and inlines\n var tmp = openerInl.next;\n var next = void 0;\n while (tmp && tmp !== closerInl) {\n next = tmp.next;\n tmp.unlink();\n newNode.appendChild(tmp);\n tmp = next;\n }\n // build custom inline node\n if (closercc === C_DOLLAR) {\n var textNode = newNode.firstChild;\n var literal = textNode.literal || '';\n var info = literal.split(/\\s/)[0];\n newNode.info = info;\n if (literal.length <= info.length) {\n textNode.unlink();\n }\n else {\n textNode.sourcepos[0][1] += info.length;\n textNode.literal = literal.replace(info + \" \", '');\n }\n }\n openerInl.insertAfter(newNode);\n // remove elts between opener and closer in delimiters stack\n this.removeDelimitersBetween(opener, closer);\n // if opener has 0 delims, remove it and the inline\n // if opener has 1 delims and character is tilde, remove delimiter only\n if (opener.numdelims <= emptyDelims) {\n if (opener.numdelims === 0) {\n openerInl.unlink();\n }\n this.removeDelimiter(opener);\n }\n // if closer has 0 delims, remove it and the inline\n // if closer has 1 delims and character is tilde, remove delimiter only\n if (closer.numdelims <= emptyDelims) {\n if (closer.numdelims === 0) {\n closerInl.unlink();\n }\n var tempstack = closer.next;\n this.removeDelimiter(closer);\n closer = tempstack;\n }\n }\n }\n else if (closercc === C_SINGLEQUOTE) {\n closer.node.literal = '\\u2019';\n if (openerFound) {\n opener.node.literal = '\\u2018';\n }\n closer = closer.next;\n }\n else if (closercc === C_DOUBLEQUOTE) {\n closer.node.literal = '\\u201D';\n if (openerFound) {\n opener.node.literal = '\\u201C';\n }\n closer = closer.next;\n }\n if (!openerFound) {\n // Set lower bound for future searches for openers:\n openersBottom[closercc][closerEmph ? oldCloser.origdelims % 3 : 0] = oldCloser.previous;\n if (!oldCloser.canOpen) {\n // We can remove a closer that can't be an opener,\n // once we've seen there's no matching opener:\n this.removeDelimiter(oldCloser);\n }\n }\n }\n }\n // remove all delimiters\n while (this.delimiters !== null && this.delimiters !== stackBottom) {\n this.removeDelimiter(this.delimiters);\n }\n };\n // Attempt to parse link title (sans quotes), returning the string\n // or null if no match.\n InlineParser.prototype.parseLinkTitle = function () {\n var title = this.match(reLinkTitle);\n if (title === null) {\n return null;\n }\n // chop off quotes from title and unescape:\n return unescapeString(title.substr(1, title.length - 2));\n };\n // Attempt to parse link destination, returning the string or null if no match.\n InlineParser.prototype.parseLinkDestination = function () {\n var res = this.match(reLinkDestinationBraces);\n if (res === null) {\n if (this.peek() === C_LESSTHAN$1) {\n return null;\n }\n // @TODO handrolled parser; res should be null or the string\n var savepos = this.pos;\n var openparens = 0;\n var c = void 0;\n while ((c = this.peek()) !== -1) {\n if (c === C_BACKSLASH && reEscapable.test(this.subject.charAt(this.pos + 1))) {\n this.pos += 1;\n if (this.peek() !== -1) {\n this.pos += 1;\n }\n }\n else if (c === C_OPEN_PAREN) {\n this.pos += 1;\n openparens += 1;\n }\n else if (c === C_CLOSE_PAREN) {\n if (openparens < 1) {\n break;\n }\n else {\n this.pos += 1;\n openparens -= 1;\n }\n }\n else if (reWhitespaceChar.exec(fromCodePoint$1(c)) !== null) {\n break;\n }\n else {\n this.pos += 1;\n }\n }\n if (this.pos === savepos && c !== C_CLOSE_PAREN) {\n return null;\n }\n if (openparens !== 0) {\n return null;\n }\n res = this.subject.substr(savepos, this.pos - savepos);\n return normalizeURI(unescapeString(res));\n } // chop off surrounding <..>:\n return normalizeURI(unescapeString(res.substr(1, res.length - 2)));\n };\n // Attempt to parse a link label, returning number of characters parsed.\n InlineParser.prototype.parseLinkLabel = function () {\n var m = this.match(reLinkLabel);\n if (m === null || m.length > 1001) {\n return 0;\n }\n return m.length;\n };\n // Add open bracket to delimiter stack and add a text node to block's children.\n InlineParser.prototype.parseOpenBracket = function (block) {\n var startpos = this.pos;\n this.pos += 1;\n var node = text$1('[', this.sourcepos(this.pos, this.pos));\n block.appendChild(node);\n // Add entry to stack for this opener\n this.addBracket(node, startpos, false);\n return true;\n };\n // IF next character is [, and ! delimiter to delimiter stack and\n // add a text node to block's children. Otherwise just add a text node.\n InlineParser.prototype.parseBang = function (block) {\n var startpos = this.pos;\n this.pos += 1;\n if (this.peek() === C_OPEN_BRACKET$1) {\n this.pos += 1;\n var node = text$1('![', this.sourcepos(this.pos - 1, this.pos));\n block.appendChild(node);\n // Add entry to stack for this opener\n this.addBracket(node, startpos + 1, true);\n }\n else {\n var node = text$1('!', this.sourcepos(this.pos, this.pos));\n block.appendChild(node);\n }\n return true;\n };\n // Try to match close bracket against an opening in the delimiter\n // stack. Add either a link or image, or a plain [ character,\n // to block's children. If there is a matching delimiter,\n // remove it from the delimiter stack.\n InlineParser.prototype.parseCloseBracket = function (block) {\n var dest = null;\n var title = null;\n var matched = false;\n this.pos += 1;\n var startpos = this.pos;\n // get last [ or ![\n var opener = this.brackets;\n if (opener === null) {\n // no matched opener, just return a literal\n block.appendChild(text$1(']', this.sourcepos(startpos, startpos)));\n return true;\n }\n if (!opener.active) {\n // no matched opener, just return a literal\n block.appendChild(text$1(']', this.sourcepos(startpos, startpos)));\n // take opener off brackets stack\n this.removeBracket();\n return true;\n }\n // If we got here, open is a potential opener\n var isImage = opener.image;\n // Check to see if we have a link/image\n var savepos = this.pos;\n // Inline link?\n if (this.peek() === C_OPEN_PAREN) {\n this.pos++;\n if (this.spnl() &&\n (dest = this.parseLinkDestination()) !== null &&\n this.spnl() &&\n // make sure there's a space before the title:\n ((reWhitespaceChar.test(this.subject.charAt(this.pos - 1)) &&\n (title = this.parseLinkTitle())) ||\n true) &&\n this.spnl() &&\n this.peek() === C_CLOSE_PAREN) {\n this.pos += 1;\n matched = true;\n }\n else {\n this.pos = savepos;\n }\n }\n var refLabel = '';\n if (!matched) {\n // Next, see if there's a link label\n var beforelabel = this.pos;\n var n = this.parseLinkLabel();\n if (n > 2) {\n refLabel = this.subject.slice(beforelabel, beforelabel + n);\n }\n else if (!opener.bracketAfter) {\n // Empty or missing second label means to use the first label as the reference.\n // The reference must not contain a bracket. If we know there's a bracket, we don't even bother checking it.\n refLabel = this.subject.slice(opener.index, startpos);\n }\n if (n === 0) {\n // If shortcut reference link, rewind before spaces we skipped.\n this.pos = savepos;\n }\n if (refLabel) {\n refLabel = normalizeReference(refLabel);\n // lookup rawlabel in refMap\n var link = this.refMap[refLabel];\n if (link) {\n dest = link.destination;\n title = link.title;\n matched = true;\n }\n }\n }\n if (matched) {\n var node = createNode$1(isImage ? 'image' : 'link');\n node.destination = dest;\n node.title = title || '';\n node.sourcepos = [opener.startpos, this.sourcepos(this.pos)];\n var tmp = opener.node.next;\n var next = void 0;\n while (tmp) {\n next = tmp.next;\n tmp.unlink();\n node.appendChild(tmp);\n tmp = next;\n }\n block.appendChild(node);\n this.processEmphasis(opener.previousDelimiter);\n this.removeBracket();\n opener.node.unlink();\n // We remove this bracket and processEmphasis will remove later delimiters.\n // Now, for a link, we also deactivate earlier link openers.\n // (no links in links)\n if (!isImage) {\n opener = this.brackets;\n while (opener !== null) {\n if (!opener.image) {\n opener.active = false; // deactivate this opener\n }\n opener = opener.previous;\n }\n }\n if (this.options.referenceDefinition) {\n this.refLinkCandidateMap[block.id] = { node: block, refLabel: refLabel };\n }\n return true;\n } // no match\n this.removeBracket(); // remove this opener from stack\n this.pos = startpos;\n block.appendChild(text$1(']', this.sourcepos(startpos, startpos)));\n if (this.options.referenceDefinition) {\n this.refLinkCandidateMap[block.id] = { node: block, refLabel: refLabel };\n }\n return true;\n };\n InlineParser.prototype.addBracket = function (node, index, image) {\n if (this.brackets !== null) {\n this.brackets.bracketAfter = true;\n }\n this.brackets = {\n node: node,\n startpos: this.sourcepos(index + (image ? 0 : 1)),\n previous: this.brackets,\n previousDelimiter: this.delimiters,\n index: index,\n image: image,\n active: true,\n };\n };\n InlineParser.prototype.removeBracket = function () {\n if (this.brackets) {\n this.brackets = this.brackets.previous;\n }\n };\n // Attempt to parse an entity.\n InlineParser.prototype.parseEntity = function (block) {\n var m;\n var startpos = this.pos + 1;\n if ((m = this.match(reEntityHere))) {\n block.appendChild(text$1(lib.decodeHTML(m), this.sourcepos(startpos, this.pos)));\n return true;\n }\n return false;\n };\n // Parse a run of ordinary characters, or a single character with\n // a special meaning in markdown, as a plain string.\n InlineParser.prototype.parseString = function (block) {\n var m;\n var startpos = this.pos + 1;\n if ((m = this.match(reMain))) {\n if (this.options.smart) {\n var lit = m.replace(reEllipses, '\\u2026').replace(reDash, function (chars) {\n var enCount = 0;\n var emCount = 0;\n if (chars.length % 3 === 0) {\n // If divisible by 3, use all em dashes\n emCount = chars.length / 3;\n }\n else if (chars.length % 2 === 0) {\n // If divisible by 2, use all en dashes\n enCount = chars.length / 2;\n }\n else if (chars.length % 3 === 2) {\n // If 2 extra dashes, use en dash for last 2; em dashes for rest\n enCount = 1;\n emCount = (chars.length - 2) / 3;\n }\n else {\n // Use en dashes for last 4 hyphens; em dashes for rest\n enCount = 2;\n emCount = (chars.length - 4) / 3;\n }\n return repeat('\\u2014', emCount) + repeat('\\u2013', enCount);\n });\n block.appendChild(text$1(lit, this.sourcepos(startpos, this.pos)));\n }\n else {\n var node = text$1(m, this.sourcepos(startpos, this.pos));\n block.appendChild(node);\n }\n return true;\n }\n return false;\n };\n // Parse a newline. If it was preceded by two spaces, return a hard\n // line break; otherwise a soft line break.\n InlineParser.prototype.parseNewline = function (block) {\n this.pos += 1; // assume we're at a \\n\n // check previous node for trailing spaces\n var lastc = block.lastChild;\n if (lastc && lastc.type === 'text' && lastc.literal[lastc.literal.length - 1] === ' ') {\n var hardbreak = lastc.literal[lastc.literal.length - 2] === ' ';\n var litLen = lastc.literal.length;\n lastc.literal = lastc.literal.replace(reFinalSpace, '');\n var finalSpaceLen = litLen - lastc.literal.length;\n lastc.sourcepos[1][1] -= finalSpaceLen;\n block.appendChild(createNode$1(hardbreak ? 'linebreak' : 'softbreak', this.sourcepos(this.pos - finalSpaceLen, this.pos)));\n }\n else {\n block.appendChild(createNode$1('softbreak', this.sourcepos(this.pos, this.pos)));\n }\n this.nextLine();\n this.match(reInitialSpace); // gobble leading spaces in next line\n return true;\n };\n // Attempt to parse a link reference, modifying refmap.\n InlineParser.prototype.parseReference = function (block, refMap) {\n if (!this.options.referenceDefinition) {\n return 0;\n }\n this.subject = block.stringContent;\n this.pos = 0;\n var title = null;\n var startpos = this.pos;\n // label:\n var matchChars = this.parseLinkLabel();\n if (matchChars === 0) {\n return 0;\n }\n var rawlabel = this.subject.substr(0, matchChars);\n // colon:\n if (this.peek() === C_COLON) {\n this.pos++;\n }\n else {\n this.pos = startpos;\n return 0;\n }\n // link url\n this.spnl();\n var dest = this.parseLinkDestination();\n if (dest === null) {\n this.pos = startpos;\n return 0;\n }\n var beforetitle = this.pos;\n this.spnl();\n if (this.pos !== beforetitle) {\n title = this.parseLinkTitle();\n }\n if (title === null) {\n title = '';\n // rewind before spaces\n this.pos = beforetitle;\n }\n // make sure we're at line end:\n var atLineEnd = true;\n if (this.match(reSpaceAtEndOfLine) === null) {\n if (title === '') {\n atLineEnd = false;\n }\n else {\n // the potential title we found is not at the line end,\n // but it could still be a legal link reference if we\n // discard the title\n title = '';\n // rewind before spaces\n this.pos = beforetitle;\n // and instead check if the link URL is at the line end\n atLineEnd = this.match(reSpaceAtEndOfLine) !== null;\n }\n }\n if (!atLineEnd) {\n this.pos = startpos;\n return 0;\n }\n var normalLabel = normalizeReference(rawlabel);\n if (normalLabel === '') {\n // label must contain non-whitespace characters\n this.pos = startpos;\n return 0;\n }\n var sourcepos = this.getReferenceDefSourcepos(block);\n block.sourcepos[0][0] = sourcepos[1][0] + 1;\n var node = createNode$1('refDef', sourcepos);\n node.title = title;\n node.dest = dest;\n node.label = normalLabel;\n block.insertBefore(node);\n if (!refMap[normalLabel]) {\n refMap[normalLabel] = createRefDefState(node);\n }\n else {\n this.refDefCandidateMap[node.id] = node;\n }\n return this.pos - startpos;\n };\n InlineParser.prototype.mergeTextNodes = function (walker) {\n var event;\n var textNodes = [];\n while ((event = walker.next())) {\n var entering = event.entering, node = event.node;\n if (entering && node.type === 'text') {\n textNodes.push(node);\n }\n else if (textNodes.length === 1) {\n textNodes = [];\n }\n else if (textNodes.length > 1) {\n var firstNode = textNodes[0];\n var lastNode = textNodes[textNodes.length - 1];\n if (firstNode.sourcepos && lastNode.sourcepos) {\n firstNode.sourcepos[1] = lastNode.sourcepos[1];\n }\n firstNode.next = lastNode.next;\n if (firstNode.next) {\n firstNode.next.prev = firstNode;\n }\n for (var i = 1; i < textNodes.length; i += 1) {\n firstNode.literal += textNodes[i].literal;\n textNodes[i].unlink();\n }\n textNodes = [];\n }\n }\n };\n InlineParser.prototype.getReferenceDefSourcepos = function (block) {\n var lines = block.stringContent.split(/\\n|\\r\\n/);\n var passedUrlLine = false;\n var quotationCount = 0;\n var lastLineOffset = { line: 0, ch: 0 };\n for (var i = 0; i < lines.length; i += 1) {\n var line = lines[i];\n if (reWhitespaceChar.test(line)) {\n break;\n }\n if (/\\:/.test(line) && quotationCount === 0) {\n if (passedUrlLine) {\n break;\n }\n var lineOffset = line.indexOf(':') === line.length - 1 ? i + 1 : i;\n lastLineOffset = { line: lineOffset, ch: lines[lineOffset].length };\n passedUrlLine = true;\n }\n // should consider extendable title\n var matched = line.match(/'|\"/g);\n if (matched) {\n quotationCount += matched.length;\n }\n if (quotationCount === 2) {\n lastLineOffset = { line: i, ch: line.length };\n break;\n }\n }\n return [\n [block.sourcepos[0][0], block.sourcepos[0][1]],\n [block.sourcepos[0][0] + lastLineOffset.line, lastLineOffset.ch],\n ];\n };\n // Parse the next inline element in subject, advancing subject position.\n // On success, add the result to block's children and return true.\n // On failure, return false.\n InlineParser.prototype.parseInline = function (block) {\n var _a;\n var res = false;\n var c = this.peek();\n if (c === -1) {\n return false;\n }\n switch (c) {\n case C_NEWLINE:\n res = this.parseNewline(block);\n break;\n case C_BACKSLASH:\n res = this.parseBackslash(block);\n break;\n case C_BACKTICK:\n res = this.parseBackticks(block);\n break;\n case C_ASTERISK:\n case C_UNDERSCORE:\n case C_TILDE:\n case C_DOLLAR:\n res = this.handleDelim(c, block);\n break;\n case C_SINGLEQUOTE:\n case C_DOUBLEQUOTE:\n res = !!((_a = this.options) === null || _a === void 0 ? void 0 : _a.smart) && this.handleDelim(c, block);\n break;\n case C_OPEN_BRACKET$1:\n res = this.parseOpenBracket(block);\n break;\n case C_BANG:\n res = this.parseBang(block);\n break;\n case C_CLOSE_BRACKET:\n res = this.parseCloseBracket(block);\n break;\n case C_LESSTHAN$1:\n res = this.parseAutolink(block) || this.parseHtmlTag(block);\n break;\n case C_AMPERSAND:\n if (!block.disabledEntityParse) {\n res = this.parseEntity(block);\n }\n break;\n default:\n res = this.parseString(block);\n break;\n }\n if (!res) {\n this.pos += 1;\n block.appendChild(text$1(fromCodePoint$1(c), this.sourcepos(this.pos, this.pos + 1)));\n }\n return true;\n };\n // Parse string content in block into inline children,\n // using refmap to resolve references.\n InlineParser.prototype.parse = function (block) {\n this.subject = block.stringContent.trim();\n this.pos = 0;\n this.delimiters = null;\n this.brackets = null;\n this.lineOffsets = block.lineOffsets || [0];\n this.lineIdx = 0;\n this.linePosOffset = 0;\n this.lineStartNum = block.sourcepos[0][0];\n if (isHeading(block)) {\n this.lineOffsets[0] += block.level + 1;\n }\n while (this.parseInline(block)) { }\n block.stringContent = null; // allow raw string to be garbage collected\n this.processEmphasis(null);\n this.mergeTextNodes(block.walker());\n var _a = this.options, extendedAutolinks = _a.extendedAutolinks, customParser = _a.customParser;\n if (extendedAutolinks) {\n convertExtAutoLinks(block.walker(), extendedAutolinks);\n }\n if (customParser && block.firstChild) {\n var event_1;\n var walker = block.firstChild.walker();\n while ((event_1 = walker.next())) {\n var node = event_1.node, entering = event_1.entering;\n if (customParser[node.type]) {\n customParser[node.type](node, { entering: entering, options: this.options });\n }\n }\n }\n };\n return InlineParser;\n}());\n\nvar reTaskListItemMarker = /^\\[([ \\txX])\\][ \\t]+/;\n// finalize for block handler\nfunction taskListItemFinalize(_, block) {\n if (block.firstChild && block.firstChild.type === 'paragraph') {\n var p = block.firstChild;\n var m = p.stringContent.match(reTaskListItemMarker);\n if (m) {\n var mLen = m[0].length;\n p.stringContent = p.stringContent.substring(mLen - 1);\n p.sourcepos[0][1] += mLen;\n p.lineOffsets[0] += mLen;\n block.listData.task = true;\n block.listData.checked = /[xX]/.test(m[1]);\n }\n }\n}\n\nvar table = {\n continue: function () {\n return 0 /* Go */;\n },\n finalize: function () { },\n canContain: function (t) {\n return t === 'tableHead' || t === 'tableBody';\n },\n acceptsLines: false,\n};\nvar tableBody$1 = {\n continue: function () {\n return 0 /* Go */;\n },\n finalize: function () { },\n canContain: function (t) {\n return t === 'tableRow';\n },\n acceptsLines: false,\n};\nvar tableHead$1 = {\n continue: function () {\n return 1 /* Stop */;\n },\n finalize: function () { },\n canContain: function (t) {\n return t === 'tableRow' || t === 'tableDelimRow';\n },\n acceptsLines: false,\n};\nvar tableDelimRow = {\n continue: function () {\n return 1 /* Stop */;\n },\n finalize: function () { },\n canContain: function (t) {\n return t === 'tableDelimCell';\n },\n acceptsLines: false,\n};\nvar tableDelimCell = {\n continue: function () {\n return 1 /* Stop */;\n },\n finalize: function () { },\n canContain: function () {\n return false;\n },\n acceptsLines: false,\n};\nvar tableRow = {\n continue: function () {\n return 1 /* Stop */;\n },\n finalize: function () { },\n canContain: function (t) {\n return t === 'tableCell';\n },\n acceptsLines: false,\n};\nvar tableCell = {\n continue: function () {\n return 1 /* Stop */;\n },\n finalize: function () { },\n canContain: function () {\n return false;\n },\n acceptsLines: false,\n};\n\nvar CODE_INDENT = 4;\nvar C_TAB = 9;\nvar C_GREATERTHAN = 62;\nvar C_LESSTHAN = 60;\nvar C_SPACE = 32;\nvar C_OPEN_BRACKET = 91;\nvar reNonSpace = /[^ \\t\\f\\v\\r\\n]/;\nvar reClosingCodeFence = /^(?:`{3,}|~{3,})(?= *$)/;\n// Returns true if block ends with a blank line, descending if needed\n// into lists and sublists.\nfunction endsWithBlankLine(block) {\n var curBlock = block;\n while (curBlock) {\n if (curBlock.lastLineBlank) {\n return true;\n }\n var t = curBlock.type;\n if (!curBlock.lastLineChecked && (t === 'list' || t === 'item')) {\n curBlock.lastLineChecked = true;\n curBlock = curBlock.lastChild;\n }\n else {\n curBlock.lastLineChecked = true;\n break;\n }\n }\n return false;\n}\nfunction peek(ln, pos) {\n if (pos < ln.length) {\n return ln.charCodeAt(pos);\n }\n return -1;\n}\n// Returns true if string contains only space characters.\nfunction isBlank(s) {\n return !reNonSpace.test(s);\n}\nfunction isSpaceOrTab(c) {\n return c === C_SPACE || c === C_TAB;\n}\n\nvar reClosingCustomBlock = /^\\$\\$$/;\nvar customBlock$1 = {\n continue: function (parser, container) {\n var line = parser.currentLine;\n var match = line.match(reClosingCustomBlock);\n if (match) {\n // closing custom block\n parser.lastLineLength = match[0].length;\n parser.finalize(container, parser.lineNumber);\n return 2 /* Finished */;\n }\n // skip optional spaces of custom block offset\n var i = container.offset;\n while (i > 0 && isSpaceOrTab(peek(line, parser.offset))) {\n parser.advanceOffset(1, true);\n i--;\n }\n return 0 /* Go */;\n },\n finalize: function (_, block) {\n if (block.stringContent === null) {\n return;\n }\n // first line becomes info string\n var content = block.stringContent;\n var newlinePos = content.indexOf('\\n');\n var firstLine = content.slice(0, newlinePos);\n var rest = content.slice(newlinePos + 1);\n var infoString = firstLine.match(/^(\\s*)(.*)/);\n block.info = unescapeString(infoString[2].trim());\n block.literal = rest;\n block.stringContent = null;\n },\n canContain: function () {\n return false;\n },\n acceptsLines: true,\n};\n\nvar noop = {\n continue: function () {\n return 1 /* Stop */;\n },\n finalize: function () { },\n canContain: function () {\n return false;\n },\n acceptsLines: true,\n};\nvar document$1 = {\n continue: function () {\n return 0 /* Go */;\n },\n finalize: function () { },\n canContain: function (t) {\n return t !== 'item';\n },\n acceptsLines: false,\n};\nvar list = {\n continue: function () {\n return 0 /* Go */;\n },\n finalize: function (_, block) {\n var item = block.firstChild;\n while (item) {\n // check for non-final list item ending with blank line:\n if (endsWithBlankLine(item) && item.next) {\n block.listData.tight = false;\n break;\n }\n // recurse into children of list item, to see if there are\n // spaces between any of them:\n var subitem = item.firstChild;\n while (subitem) {\n if (endsWithBlankLine(subitem) && (item.next || subitem.next)) {\n block.listData.tight = false;\n break;\n }\n subitem = subitem.next;\n }\n item = item.next;\n }\n },\n canContain: function (t) {\n return t === 'item';\n },\n acceptsLines: false,\n};\nvar blockQuote$1 = {\n continue: function (parser) {\n var ln = parser.currentLine;\n if (!parser.indented && peek(ln, parser.nextNonspace) === C_GREATERTHAN) {\n parser.advanceNextNonspace();\n parser.advanceOffset(1, false);\n if (isSpaceOrTab(peek(ln, parser.offset))) {\n parser.advanceOffset(1, true);\n }\n }\n else {\n return 1 /* Stop */;\n }\n return 0 /* Go */;\n },\n finalize: function () { },\n canContain: function (t) {\n return t !== 'item';\n },\n acceptsLines: false,\n};\nvar item = {\n continue: function (parser, container) {\n if (parser.blank) {\n if (container.firstChild === null) {\n // Blank line after empty list item\n return 1 /* Stop */;\n }\n parser.advanceNextNonspace();\n }\n else if (parser.indent >= container.listData.markerOffset + container.listData.padding) {\n parser.advanceOffset(container.listData.markerOffset + container.listData.padding, true);\n }\n else {\n return 1 /* Stop */;\n }\n return 0 /* Go */;\n },\n finalize: taskListItemFinalize,\n canContain: function (t) {\n return t !== 'item';\n },\n acceptsLines: false,\n};\nvar heading = {\n continue: function () {\n // a heading can never container > 1 line, so fail to match:\n return 1 /* Stop */;\n },\n finalize: function () { },\n canContain: function () {\n return false;\n },\n acceptsLines: false,\n};\nvar thematicBreak$1 = {\n continue: function () {\n // a thematic break can never container > 1 line, so fail to match:\n return 1 /* Stop */;\n },\n finalize: function () { },\n canContain: function () {\n return false;\n },\n acceptsLines: false,\n};\nvar codeBlock = {\n continue: function (parser, container) {\n var ln = parser.currentLine;\n var indent = parser.indent;\n if (container.isFenced) {\n // fenced\n var match = indent <= 3 &&\n ln.charAt(parser.nextNonspace) === container.fenceChar &&\n ln.slice(parser.nextNonspace).match(reClosingCodeFence);\n if (match && match[0].length >= container.fenceLength) {\n // closing fence - we're at end of line, so we can return\n parser.lastLineLength = parser.offset + indent + match[0].length;\n parser.finalize(container, parser.lineNumber);\n return 2 /* Finished */;\n }\n // skip optional spaces of fence offset\n var i = container.fenceOffset;\n while (i > 0 && isSpaceOrTab(peek(ln, parser.offset))) {\n parser.advanceOffset(1, true);\n i--;\n }\n }\n else {\n // indented\n if (indent >= CODE_INDENT) {\n parser.advanceOffset(CODE_INDENT, true);\n }\n else if (parser.blank) {\n parser.advanceNextNonspace();\n }\n else {\n return 1 /* Stop */;\n }\n }\n return 0 /* Go */;\n },\n finalize: function (_, block) {\n var _a;\n if (block.stringContent === null) {\n return;\n }\n if (block.isFenced) {\n // fenced\n // first line becomes info string\n var content = block.stringContent;\n var newlinePos = content.indexOf('\\n');\n var firstLine = content.slice(0, newlinePos);\n var rest = content.slice(newlinePos + 1);\n var infoString = firstLine.match(/^(\\s*)(.*)/);\n block.infoPadding = infoString[1].length;\n block.info = unescapeString(infoString[2].trim());\n block.literal = rest;\n }\n else {\n // indented\n block.literal = (_a = block.stringContent) === null || _a === void 0 ? void 0 : _a.replace(/(\\n *)+$/, '\\n');\n }\n block.stringContent = null; // allow GC\n },\n canContain: function () {\n return false;\n },\n acceptsLines: true,\n};\nvar htmlBlock$1 = {\n continue: function (parser, container) {\n return parser.blank && (container.htmlBlockType === 6 || container.htmlBlockType === 7)\n ? 1 /* Stop */\n : 0 /* Go */;\n },\n finalize: function (_, block) {\n var _a;\n block.literal = ((_a = block.stringContent) === null || _a === void 0 ? void 0 : _a.replace(/(\\n *)+$/, '')) || null;\n block.stringContent = null; // allow GC\n },\n canContain: function () {\n return false;\n },\n acceptsLines: true,\n};\nvar paragraph = {\n continue: function (parser) {\n return parser.blank ? 1 /* Stop */ : 0 /* Go */;\n },\n finalize: function (parser, block) {\n if (block.stringContent === null) {\n return;\n }\n var pos;\n var hasReferenceDefs = false;\n // try parsing the beginning as link reference definitions:\n while (peek(block.stringContent, 0) === C_OPEN_BRACKET &&\n (pos = parser.inlineParser.parseReference(block, parser.refMap))) {\n block.stringContent = block.stringContent.slice(pos);\n hasReferenceDefs = true;\n }\n if (hasReferenceDefs && isBlank(block.stringContent)) {\n block.unlink();\n }\n },\n canContain: function () {\n return false;\n },\n acceptsLines: true,\n};\nvar refDef = noop;\nvar frontMatter$2 = noop;\nvar blockHandlers = {\n document: document$1,\n list: list,\n blockQuote: blockQuote$1,\n item: item,\n heading: heading,\n thematicBreak: thematicBreak$1,\n codeBlock: codeBlock,\n htmlBlock: htmlBlock$1,\n paragraph: paragraph,\n table: table,\n tableBody: tableBody$1,\n tableHead: tableHead$1,\n tableRow: tableRow,\n tableCell: tableCell,\n tableDelimRow: tableDelimRow,\n tableDelimCell: tableDelimCell,\n refDef: refDef,\n customBlock: customBlock$1,\n frontMatter: frontMatter$2,\n};\n\nfunction parseRowContent(content) {\n var startIdx = 0;\n var offset = 0;\n var cells = [];\n for (var i = 0; i < content.length; i += 1) {\n if (content[i] === '|' && content[i - 1] !== '\\\\') {\n var cell = content.substring(startIdx, i);\n if (startIdx === 0 && isEmpty(cell)) {\n offset = i + 1;\n }\n else {\n cells.push(cell);\n }\n startIdx = i + 1;\n }\n }\n if (startIdx < content.length) {\n var cell = content.substring(startIdx, content.length);\n if (!isEmpty(cell)) {\n cells.push(cell);\n }\n }\n return [offset, cells];\n}\nfunction generateTableCells(cellType, contents, lineNum, chPos) {\n var cells = [];\n for (var _i = 0, contents_1 = contents; _i < contents_1.length; _i++) {\n var content = contents_1[_i];\n var preSpaces = content.match(/^[ \\t]+/);\n var paddingLeft = preSpaces ? preSpaces[0].length : 0;\n var paddingRight = void 0, trimmed = void 0;\n if (paddingLeft === content.length) {\n paddingLeft = 0;\n paddingRight = 0;\n trimmed = '';\n }\n else {\n var postSpaces = content.match(/[ \\t]+$/);\n paddingRight = postSpaces ? postSpaces[0].length : 0;\n trimmed = content.slice(paddingLeft, content.length - paddingRight);\n }\n var chPosStart = chPos + paddingLeft;\n var tableCell = createNode$1(cellType, [\n [lineNum, chPos],\n [lineNum, chPos + content.length - 1],\n ]);\n tableCell.stringContent = trimmed.replace(/\\\\\\|/g, '|'); // replace esacped pipe(\\|)\n tableCell.startIdx = cells.length;\n tableCell.endIdx = cells.length;\n tableCell.lineOffsets = [chPosStart - 1];\n tableCell.paddingLeft = paddingLeft;\n tableCell.paddingRight = paddingRight;\n cells.push(tableCell);\n chPos += content.length + 1;\n }\n return cells;\n}\nfunction getColumnFromDelimCell(cellNode) {\n var align = null;\n var content = cellNode.stringContent;\n var firstCh = content[0];\n var lastCh = content[content.length - 1];\n if (lastCh === ':') {\n align = firstCh === ':' ? 'center' : 'right';\n }\n else if (firstCh === ':') {\n align = 'left';\n }\n return { align: align };\n}\nvar tableHead = function (parser, container) {\n var stringContent = container.stringContent;\n if (container.type === 'paragraph' && !parser.indented && !parser.blank) {\n var lastNewLineIdx = stringContent.length - 1;\n var lastLineStartIdx = stringContent.lastIndexOf('\\n', lastNewLineIdx - 1) + 1;\n var headerContent = stringContent.slice(lastLineStartIdx, lastNewLineIdx);\n var delimContent = parser.currentLine.slice(parser.nextNonspace);\n var _a = parseRowContent(headerContent), headerOffset = _a[0], headerCells = _a[1];\n var _b = parseRowContent(delimContent), delimOffset = _b[0], delimCells = _b[1];\n var reValidDelimCell_1 = /^[ \\t]*:?-+:?[ \\t]*$/;\n if (\n // not checking if the number of header cells and delimiter cells are the same\n // to consider the case of merged-column (via plugin)\n !headerCells.length ||\n !delimCells.length ||\n delimCells.some(function (cell) { return !reValidDelimCell_1.test(cell); }) ||\n // to prevent to regard setTextHeading as tabel delim cell with 'disallowDeepHeading' option\n (delimCells.length === 1 && delimContent.indexOf('|') !== 0)) {\n return 0 /* None */;\n }\n var lineOffsets = container.lineOffsets;\n var firstLineNum = parser.lineNumber - 1;\n var firstLineStart = last(lineOffsets) + 1;\n var table = createNode$1('table', [\n [firstLineNum, firstLineStart],\n [parser.lineNumber, parser.offset],\n ]);\n // eslint-disable-next-line arrow-body-style\n table.columns = delimCells.map(function () { return ({ align: null }); });\n container.insertAfter(table);\n if (lineOffsets.length === 1) {\n container.unlink();\n }\n else {\n container.stringContent = stringContent.slice(0, lastLineStartIdx);\n var paraLastLineStartIdx = stringContent.lastIndexOf('\\n', lastLineStartIdx - 2) + 1;\n var paraLastLineLen = lastLineStartIdx - paraLastLineStartIdx - 1;\n parser.lastLineLength = lineOffsets[lineOffsets.length - 2] + paraLastLineLen;\n parser.finalize(container, firstLineNum - 1);\n }\n parser.advanceOffset(parser.currentLine.length - parser.offset, false);\n var tableHead_1 = createNode$1('tableHead', [\n [firstLineNum, firstLineStart],\n [parser.lineNumber, parser.offset],\n ]);\n table.appendChild(tableHead_1);\n var tableHeadRow_1 = createNode$1('tableRow', [\n [firstLineNum, firstLineStart],\n [firstLineNum, firstLineStart + headerContent.length - 1],\n ]);\n var tableDelimRow_1 = createNode$1('tableDelimRow', [\n [parser.lineNumber, parser.nextNonspace + 1],\n [parser.lineNumber, parser.offset],\n ]);\n tableHead_1.appendChild(tableHeadRow_1);\n tableHead_1.appendChild(tableDelimRow_1);\n generateTableCells('tableCell', headerCells, firstLineNum, firstLineStart + headerOffset).forEach(function (cellNode) {\n tableHeadRow_1.appendChild(cellNode);\n });\n var delimCellNodes = generateTableCells('tableDelimCell', delimCells, parser.lineNumber, parser.nextNonspace + 1 + delimOffset);\n delimCellNodes.forEach(function (cellNode) {\n tableDelimRow_1.appendChild(cellNode);\n });\n table.columns = delimCellNodes.map(getColumnFromDelimCell);\n parser.tip = table;\n return 2 /* Leaf */;\n }\n return 0 /* None */;\n};\nvar tableBody = function (parser, container) {\n if ((container.type !== 'table' && container.type !== 'tableBody') ||\n (!parser.blank && parser.currentLine.indexOf('|') === -1)) {\n return 0 /* None */;\n }\n parser.advanceOffset(parser.currentLine.length - parser.offset, false);\n if (parser.blank) {\n var table_1 = container;\n if (container.type === 'tableBody') {\n table_1 = container.parent;\n parser.finalize(container, parser.lineNumber - 1);\n }\n parser.finalize(table_1, parser.lineNumber - 1);\n return 0 /* None */;\n }\n var tableBody = container;\n if (container.type === 'table') {\n tableBody = parser.addChild('tableBody', parser.nextNonspace);\n tableBody.stringContent = null;\n }\n var tableRow = createNode$1('tableRow', [\n [parser.lineNumber, parser.nextNonspace + 1],\n [parser.lineNumber, parser.currentLine.length],\n ]);\n tableBody.appendChild(tableRow);\n var table = tableBody.parent;\n var content = parser.currentLine.slice(parser.nextNonspace);\n var _a = parseRowContent(content), offset = _a[0], cellContents = _a[1];\n generateTableCells('tableCell', cellContents, parser.lineNumber, parser.nextNonspace + 1 + offset).forEach(function (cellNode, idx) {\n if (idx >= table.columns.length) {\n cellNode.ignored = true;\n }\n tableRow.appendChild(cellNode);\n });\n return 2 /* Leaf */;\n};\n\nvar reCustomBlock = /^(\\$\\$)(\\s*[a-zA-Z])+/;\nvar reCanBeCustomInline = /^(\\$\\$)(\\s*[a-zA-Z])+.*(\\$\\$)/;\nvar customBlock = function (parser) {\n var match;\n if (!parser.indented &&\n !reCanBeCustomInline.test(parser.currentLine) &&\n (match = parser.currentLine.match(reCustomBlock))) {\n var syntaxLength = match[1].length;\n parser.closeUnmatchedBlocks();\n var container = parser.addChild('customBlock', parser.nextNonspace);\n container.syntaxLength = syntaxLength;\n container.offset = parser.indent;\n parser.advanceNextNonspace();\n parser.advanceOffset(syntaxLength, false);\n return 2 /* Leaf */;\n }\n return 0 /* None */;\n};\n\nvar reCodeFence = /^`{3,}(?!.*`)|^~{3,}/;\nvar reHtmlBlockOpen = [\n /./,\n /^<(?:script|pre|style)(?:\\s|>|$)/i,\n /^<!--/,\n /^<[?]/,\n /^<![A-Z]/,\n /^<!\\[CDATA\\[/,\n /^<[/]?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[123456]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\\s|[/]?[>]|$)/i,\n new RegExp(\"^(?:\" + OPENTAG + \"|\" + CLOSETAG + \")\\\\s*$\", 'i'),\n];\nvar reSetextHeadingLine = /^(?:=+|-+)[ \\t]*$/;\nvar reATXHeadingMarker = /^#{1,6}(?:[ \\t]+|$)/;\nvar reThematicBreak = /^(?:(?:\\*[ \\t]*){3,}|(?:_[ \\t]*){3,}|(?:-[ \\t]*){3,})[ \\t]*$/;\nvar reBulletListMarker = /^[*+-]/;\nvar reOrderedListMarker = /^(\\d{1,9})([.)])/;\n// Parse a list marker and return data on the marker (type,\n// start, delimiter, bullet character, padding) or null.\nfunction parseListMarker(parser, container) {\n var rest = parser.currentLine.slice(parser.nextNonspace);\n var match;\n var nextc;\n var data = {\n type: 'bullet',\n tight: true,\n bulletChar: '',\n start: 0,\n delimiter: '',\n padding: 0,\n markerOffset: parser.indent,\n // GFM: Task List Item\n task: false,\n checked: false,\n };\n if (parser.indent >= 4) {\n return null;\n }\n if ((match = rest.match(reBulletListMarker))) {\n data.type = 'bullet';\n data.bulletChar = match[0][0];\n }\n else if ((match = rest.match(reOrderedListMarker)) &&\n (container.type !== 'paragraph' || match[1] === '1')) {\n data.type = 'ordered';\n data.start = parseInt(match[1], 10);\n data.delimiter = match[2];\n }\n else {\n return null;\n }\n // make sure we have spaces after\n nextc = peek(parser.currentLine, parser.nextNonspace + match[0].length);\n if (!(nextc === -1 || nextc === C_TAB || nextc === C_SPACE)) {\n return null;\n }\n // if it interrupts paragraph, make sure first line isn't blank\n if (container.type === 'paragraph' &&\n !parser.currentLine.slice(parser.nextNonspace + match[0].length).match(reNonSpace)) {\n return null;\n }\n // we've got a match! advance offset and calculate padding\n parser.advanceNextNonspace(); // to start of marker\n parser.advanceOffset(match[0].length, true); // to end of marker\n var spacesStartCol = parser.column;\n var spacesStartOffset = parser.offset;\n do {\n parser.advanceOffset(1, true);\n nextc = peek(parser.currentLine, parser.offset);\n } while (parser.column - spacesStartCol < 5 && isSpaceOrTab(nextc));\n var blankItem = peek(parser.currentLine, parser.offset) === -1;\n var spacesAfterMarker = parser.column - spacesStartCol;\n if (spacesAfterMarker >= 5 || spacesAfterMarker < 1 || blankItem) {\n data.padding = match[0].length + 1;\n parser.column = spacesStartCol;\n parser.offset = spacesStartOffset;\n if (isSpaceOrTab(peek(parser.currentLine, parser.offset))) {\n parser.advanceOffset(1, true);\n }\n }\n else {\n data.padding = match[0].length + spacesAfterMarker;\n }\n return data;\n}\n// Returns true if the two list items are of the same type,\n// with the same delimiter and bullet character. This is used\n// in agglomerating list items into lists.\nfunction listsMatch(listData, itemData) {\n return (listData.type === itemData.type &&\n listData.delimiter === itemData.delimiter &&\n listData.bulletChar === itemData.bulletChar);\n}\nfunction isDisallowedDeepHeading(parser, node) {\n return parser.options.disallowDeepHeading && (node.type === 'blockQuote' || node.type === 'item');\n}\nvar blockQuote = function (parser) {\n if (!parser.indented && peek(parser.currentLine, parser.nextNonspace) === C_GREATERTHAN) {\n parser.advanceNextNonspace();\n parser.advanceOffset(1, false);\n // optional following space\n if (isSpaceOrTab(peek(parser.currentLine, parser.offset))) {\n parser.advanceOffset(1, true);\n }\n parser.closeUnmatchedBlocks();\n parser.addChild('blockQuote', parser.nextNonspace);\n return 1 /* Container */;\n }\n return 0 /* None */;\n};\nvar atxHeading = function (parser, container) {\n var match;\n if (!parser.indented &&\n // The nested Heading is disallowed in list and blockquote with 'disallowDeepHeading' option\n !isDisallowedDeepHeading(parser, container) &&\n (match = parser.currentLine.slice(parser.nextNonspace).match(reATXHeadingMarker))) {\n parser.advanceNextNonspace();\n parser.advanceOffset(match[0].length, false);\n parser.closeUnmatchedBlocks();\n var heading = parser.addChild('heading', parser.nextNonspace);\n heading.level = match[0].trim().length; // number of #s\n heading.headingType = 'atx';\n // remove trailing ###s:\n heading.stringContent = parser.currentLine\n .slice(parser.offset)\n .replace(/^[ \\t]*#+[ \\t]*$/, '')\n .replace(/[ \\t]+#+[ \\t]*$/, '');\n parser.advanceOffset(parser.currentLine.length - parser.offset);\n return 2 /* Leaf */;\n }\n return 0 /* None */;\n};\nvar fencedCodeBlock = function (parser) {\n var match;\n if (!parser.indented &&\n (match = parser.currentLine.slice(parser.nextNonspace).match(reCodeFence))) {\n var fenceLength = match[0].length;\n parser.closeUnmatchedBlocks();\n var container = parser.addChild('codeBlock', parser.nextNonspace);\n container.isFenced = true;\n container.fenceLength = fenceLength;\n container.fenceChar = match[0][0];\n container.fenceOffset = parser.indent;\n parser.advanceNextNonspace();\n parser.advanceOffset(fenceLength, false);\n return 2 /* Leaf */;\n }\n return 0 /* None */;\n};\nvar htmlBlock = function (parser, container) {\n if (!parser.indented && peek(parser.currentLine, parser.nextNonspace) === C_LESSTHAN) {\n var s = parser.currentLine.slice(parser.nextNonspace);\n var disallowedTags = parser.options.disallowedHtmlBlockTags;\n var blockType = void 0;\n for (blockType = 1; blockType <= 7; blockType++) {\n var matched = s.match(reHtmlBlockOpen[blockType]);\n if (matched) {\n if (blockType === 7) {\n if (container.type === 'paragraph') {\n return 0 /* None */;\n }\n if (disallowedTags.length > 0) {\n var reDisallowedTags = new RegExp(\"</?(?:\" + disallowedTags.join('|') + \")\", 'i');\n if (reDisallowedTags.test(matched[0])) {\n return 0 /* None */;\n }\n }\n }\n parser.closeUnmatchedBlocks();\n // We don't adjust parser.offset;\n // spaces are part of the HTML block:\n var b = parser.addChild('htmlBlock', parser.offset);\n b.htmlBlockType = blockType;\n return 2 /* Leaf */;\n }\n }\n }\n return 0 /* None */;\n};\nvar seTextHeading = function (parser, container) {\n var match;\n if (container.stringContent !== null &&\n !parser.indented &&\n container.type === 'paragraph' &&\n // The nested Heading is disallowed in list and blockquote with 'disallowDeepHeading' option\n !isDisallowedDeepHeading(parser, container.parent) &&\n (match = parser.currentLine.slice(parser.nextNonspace).match(reSetextHeadingLine))) {\n parser.closeUnmatchedBlocks();\n // resolve reference link definitions\n var pos = void 0;\n while (peek(container.stringContent, 0) === C_OPEN_BRACKET &&\n (pos = parser.inlineParser.parseReference(container, parser.refMap))) {\n container.stringContent = container.stringContent.slice(pos);\n }\n if (container.stringContent.length > 0) {\n var heading = createNode$1('heading', container.sourcepos);\n heading.level = match[0][0] === '=' ? 1 : 2;\n heading.headingType = 'setext';\n heading.stringContent = container.stringContent;\n container.insertAfter(heading);\n container.unlink();\n parser.tip = heading;\n parser.advanceOffset(parser.currentLine.length - parser.offset, false);\n return 2 /* Leaf */;\n }\n return 0 /* None */;\n }\n return 0 /* None */;\n};\nvar thematicBreak = function (parser) {\n if (!parser.indented && reThematicBreak.test(parser.currentLine.slice(parser.nextNonspace))) {\n parser.closeUnmatchedBlocks();\n parser.addChild('thematicBreak', parser.nextNonspace);\n parser.advanceOffset(parser.currentLine.length - parser.offset, false);\n return 2 /* Leaf */;\n }\n return 0 /* None */;\n};\nvar listItem = function (parser, container) {\n var data;\n var currNode = container;\n if ((!parser.indented || container.type === 'list') &&\n (data = parseListMarker(parser, currNode))) {\n parser.closeUnmatchedBlocks();\n // add the list if needed\n if (parser.tip.type !== 'list' || !listsMatch(currNode.listData, data)) {\n currNode = parser.addChild('list', parser.nextNonspace);\n currNode.listData = data;\n }\n // add the list item\n currNode = parser.addChild('item', parser.nextNonspace);\n currNode.listData = data;\n return 1 /* Container */;\n }\n return 0 /* None */;\n};\n// indented code block\nvar indentedCodeBlock = function (parser) {\n if (parser.indented && parser.tip.type !== 'paragraph' && !parser.blank) {\n // indented code\n parser.advanceOffset(CODE_INDENT, true);\n parser.closeUnmatchedBlocks();\n parser.addChild('codeBlock', parser.offset);\n return 2 /* Leaf */;\n }\n return 0 /* None */;\n};\nvar blockStarts = [\n blockQuote,\n atxHeading,\n fencedCodeBlock,\n htmlBlock,\n seTextHeading,\n thematicBreak,\n listItem,\n indentedCodeBlock,\n tableHead,\n tableBody,\n customBlock,\n];\n\n// `---` for YAML, `+++` for TOML, `;;;` for JSON\nvar reFrontMatter = /^(-{3}|\\+{3}|;{3})$/;\nvar frontMatter$1 = function (parser, container) {\n var currentLine = parser.currentLine, lineNumber = parser.lineNumber, indented = parser.indented;\n if (lineNumber === 1 &&\n !indented &&\n container.type === 'document' &&\n reFrontMatter.test(currentLine)) {\n parser.closeUnmatchedBlocks();\n var frontMatter_1 = parser.addChild('frontMatter', parser.nextNonspace);\n frontMatter_1.stringContent = currentLine;\n parser.advanceNextNonspace();\n parser.advanceOffset(currentLine.length, false);\n return 2 /* Leaf */;\n }\n return 0 /* None */;\n};\n\nvar frontMatter = {\n continue: function (parser, container) {\n var line = parser.currentLine;\n var match = line.match(reFrontMatter);\n if (container.type === 'frontMatter' && match) {\n container.stringContent += line;\n parser.lastLineLength = match[0].length;\n parser.finalize(container, parser.lineNumber);\n return 2 /* Finished */;\n }\n return 0 /* Go */;\n },\n finalize: function (_, block) {\n if (block.stringContent === null) {\n return;\n }\n block.literal = block.stringContent;\n block.stringContent = null;\n },\n canContain: function () {\n return false;\n },\n acceptsLines: true,\n};\n\nvar reHtmlBlockClose = [\n /./,\n /<\\/(?:script|pre|style)>/i,\n /-->/,\n /\\?>/,\n />/,\n /\\]\\]>/,\n];\nvar reMaybeSpecial = /^[#`~*+_=<>0-9-;$]/;\nvar reLineEnding$1 = /\\r\\n|\\n|\\r/;\nfunction document$2() {\n return createNode$1('document', [\n [1, 1],\n [0, 0],\n ]);\n}\nvar defaultOptions$1 = {\n smart: false,\n tagFilter: false,\n extendedAutolinks: false,\n disallowedHtmlBlockTags: [],\n referenceDefinition: false,\n disallowDeepHeading: false,\n customParser: null,\n frontMatter: false,\n};\nvar Parser = /** @class */ (function () {\n function Parser(options) {\n this.options = __assign(__assign({}, defaultOptions$1), options);\n this.doc = document$2();\n this.tip = this.doc;\n this.oldtip = this.doc;\n this.lineNumber = 0;\n this.offset = 0;\n this.column = 0;\n this.nextNonspace = 0;\n this.nextNonspaceColumn = 0;\n this.indent = 0;\n this.currentLine = '';\n this.indented = false;\n this.blank = false;\n this.partiallyConsumedTab = false;\n this.allClosed = true;\n this.lastMatchedContainer = this.doc;\n this.refMap = {};\n this.refLinkCandidateMap = {};\n this.refDefCandidateMap = {};\n this.lastLineLength = 0;\n this.lines = [];\n if (this.options.frontMatter) {\n blockHandlers.frontMatter = frontMatter;\n blockStarts.unshift(frontMatter$1);\n }\n this.inlineParser = new InlineParser(this.options);\n }\n Parser.prototype.advanceOffset = function (count, columns) {\n if (columns === void 0) { columns = false; }\n var currentLine = this.currentLine;\n var charsToTab, charsToAdvance;\n var c;\n while (count > 0 && (c = currentLine[this.offset])) {\n if (c === '\\t') {\n charsToTab = 4 - (this.column % 4);\n if (columns) {\n this.partiallyConsumedTab = charsToTab > count;\n charsToAdvance = charsToTab > count ? count : charsToTab;\n this.column += charsToAdvance;\n this.offset += this.partiallyConsumedTab ? 0 : 1;\n count -= charsToAdvance;\n }\n else {\n this.partiallyConsumedTab = false;\n this.column += charsToTab;\n this.offset += 1;\n count -= 1;\n }\n }\n else {\n this.partiallyConsumedTab = false;\n this.offset += 1;\n this.column += 1; // assume ascii; block starts are ascii\n count -= 1;\n }\n }\n };\n Parser.prototype.advanceNextNonspace = function () {\n this.offset = this.nextNonspace;\n this.column = this.nextNonspaceColumn;\n this.partiallyConsumedTab = false;\n };\n Parser.prototype.findNextNonspace = function () {\n var currentLine = this.currentLine;\n var i = this.offset;\n var cols = this.column;\n var c;\n while ((c = currentLine.charAt(i)) !== '') {\n if (c === ' ') {\n i++;\n cols++;\n }\n else if (c === '\\t') {\n i++;\n cols += 4 - (cols % 4);\n }\n else {\n break;\n }\n }\n this.blank = c === '\\n' || c === '\\r' || c === '';\n this.nextNonspace = i;\n this.nextNonspaceColumn = cols;\n this.indent = this.nextNonspaceColumn - this.column;\n this.indented = this.indent >= CODE_INDENT;\n };\n // Add a line to the block at the tip. We assume the tip\n // can accept lines -- that check should be done before calling this.\n Parser.prototype.addLine = function () {\n if (this.partiallyConsumedTab) {\n this.offset += 1; // skip over tab\n // add space characters:\n var charsToTab = 4 - (this.column % 4);\n this.tip.stringContent += repeat(' ', charsToTab);\n }\n if (this.tip.lineOffsets) {\n this.tip.lineOffsets.push(this.offset);\n }\n else {\n this.tip.lineOffsets = [this.offset];\n }\n this.tip.stringContent += this.currentLine.slice(this.offset) + \"\\n\";\n };\n // Add block of type tag as a child of the tip. If the tip can't\n // accept children, close and finalize it and try its parent,\n // and so on til we find a block that can accept children.\n Parser.prototype.addChild = function (tag, offset) {\n while (!blockHandlers[this.tip.type].canContain(tag)) {\n this.finalize(this.tip, this.lineNumber - 1);\n }\n var columnNumber = offset + 1; // offset 0 = column 1\n var newBlock = createNode$1(tag, [\n [this.lineNumber, columnNumber],\n [0, 0],\n ]);\n newBlock.stringContent = '';\n this.tip.appendChild(newBlock);\n this.tip = newBlock;\n return newBlock;\n };\n // Finalize and close any unmatched blocks.\n Parser.prototype.closeUnmatchedBlocks = function () {\n if (!this.allClosed) {\n // finalize any blocks not matched\n while (this.oldtip !== this.lastMatchedContainer) {\n var parent_1 = this.oldtip.parent;\n this.finalize(this.oldtip, this.lineNumber - 1);\n this.oldtip = parent_1;\n }\n this.allClosed = true;\n }\n };\n // Finalize a block. Close it and do any necessary postprocessing,\n // e.g. creating stringContent from strings, setting the 'tight'\n // or 'loose' status of a list, and parsing the beginnings\n // of paragraphs for reference definitions. Reset the tip to the\n // parent of the closed block.\n Parser.prototype.finalize = function (block, lineNumber) {\n var above = block.parent;\n block.open = false;\n block.sourcepos[1] = [lineNumber, this.lastLineLength];\n blockHandlers[block.type].finalize(this, block);\n this.tip = above;\n };\n // Walk through a block & children recursively, parsing string content\n // into inline content where appropriate.\n Parser.prototype.processInlines = function (block) {\n var event;\n var customParser = this.options.customParser;\n var walker = block.walker();\n this.inlineParser.refMap = this.refMap;\n this.inlineParser.refLinkCandidateMap = this.refLinkCandidateMap;\n this.inlineParser.refDefCandidateMap = this.refDefCandidateMap;\n this.inlineParser.options = this.options;\n while ((event = walker.next())) {\n var node = event.node, entering = event.entering;\n var t = node.type;\n if (customParser && customParser[t]) {\n customParser[t](node, { entering: entering, options: this.options });\n }\n if (!entering &&\n (t === 'paragraph' ||\n t === 'heading' ||\n (t === 'tableCell' && !node.ignored))) {\n this.inlineParser.parse(node);\n }\n }\n };\n // Analyze a line of text and update the document appropriately.\n // We parse markdown text by calling this on each line of input,\n // then finalizing the document.\n Parser.prototype.incorporateLine = function (ln) {\n var container = this.doc;\n this.oldtip = this.tip;\n this.offset = 0;\n this.column = 0;\n this.blank = false;\n this.partiallyConsumedTab = false;\n this.lineNumber += 1;\n // replace NUL characters for security\n if (ln.indexOf('\\u0000') !== -1) {\n ln = ln.replace(/\\0/g, '\\uFFFD');\n }\n this.currentLine = ln;\n // For each containing block, try to parse the associated line start.\n // Bail out on failure: container will point to the last matching block.\n // Set allMatched to false if not all containers match.\n var allMatched = true;\n var lastChild;\n while ((lastChild = container.lastChild) && lastChild.open) {\n container = lastChild;\n this.findNextNonspace();\n switch (blockHandlers[container.type]['continue'](this, container)) {\n case 0 /* Go */: // we've matched, keep going\n break;\n case 1 /* Stop */: // we've failed to match a block\n allMatched = false;\n break;\n case 2 /* Finished */: // we've hit end of line for fenced code close and can return\n this.lastLineLength = ln.length;\n return;\n default:\n throw new Error('continue returned illegal value, must be 0, 1, or 2');\n }\n if (!allMatched) {\n container = container.parent; // back up to last matching block\n break;\n }\n }\n this.allClosed = container === this.oldtip;\n this.lastMatchedContainer = container;\n var matchedLeaf = container.type !== 'paragraph' && blockHandlers[container.type].acceptsLines;\n var blockStartsLen = blockStarts.length;\n // Unless last matched container is a code block, try new container starts,\n // adding children to the last matched container:\n while (!matchedLeaf) {\n this.findNextNonspace();\n // this is a little performance optimization:\n if (container.type !== 'table' &&\n container.type !== 'tableBody' &&\n container.type !== 'paragraph' &&\n !this.indented &&\n !reMaybeSpecial.test(ln.slice(this.nextNonspace))) {\n this.advanceNextNonspace();\n break;\n }\n var i = 0;\n while (i < blockStartsLen) {\n var res = blockStarts[i](this, container);\n if (res === 1 /* Container */) {\n container = this.tip;\n break;\n }\n else if (res === 2 /* Leaf */) {\n container = this.tip;\n matchedLeaf = true;\n break;\n }\n else {\n i++;\n }\n }\n if (i === blockStartsLen) {\n // nothing matched\n this.advanceNextNonspace();\n break;\n }\n }\n // What remains at the offset is a text line. Add the text to the\n // appropriate container.\n // First check for a lazy paragraph continuation:\n if (!this.allClosed && !this.blank && this.tip.type === 'paragraph') {\n // lazy paragraph continuation\n this.addLine();\n }\n else {\n // not a lazy continuation\n // finalize any blocks not matched\n this.closeUnmatchedBlocks();\n if (this.blank && container.lastChild) {\n container.lastChild.lastLineBlank = true;\n }\n var t = container.type;\n // Block quote lines are never blank as they start with >\n // and we don't count blanks in fenced code for purposes of tight/loose\n // lists or breaking out of lists. We also don't set _lastLineBlank\n // on an empty list item, or if we just closed a fenced block.\n var lastLineBlank = this.blank &&\n !(t === 'blockQuote' ||\n (isCodeBlock(container) && container.isFenced) ||\n (t === 'item' && !container.firstChild && container.sourcepos[0][0] === this.lineNumber));\n // propagate lastLineBlank up through parents:\n var cont = container;\n while (cont) {\n cont.lastLineBlank = lastLineBlank;\n cont = cont.parent;\n }\n if (blockHandlers[t].acceptsLines) {\n this.addLine();\n // if HtmlBlock, check for end condition\n if (isHtmlBlock(container) &&\n container.htmlBlockType >= 1 &&\n container.htmlBlockType <= 5 &&\n reHtmlBlockClose[container.htmlBlockType].test(this.currentLine.slice(this.offset))) {\n this.lastLineLength = ln.length;\n this.finalize(container, this.lineNumber);\n }\n }\n else if (this.offset < ln.length && !this.blank) {\n // create paragraph container for line\n container = this.addChild('paragraph', this.offset);\n this.advanceNextNonspace();\n this.addLine();\n }\n }\n this.lastLineLength = ln.length;\n };\n // The main parsing function. Returns a parsed document AST.\n Parser.prototype.parse = function (input, lineTexts) {\n this.doc = document$2();\n this.tip = this.doc;\n this.lineNumber = 0;\n this.lastLineLength = 0;\n this.offset = 0;\n this.column = 0;\n this.lastMatchedContainer = this.doc;\n this.currentLine = '';\n var lines = input.split(reLineEnding$1);\n var len = lines.length;\n this.lines = lineTexts ? lineTexts : lines;\n if (this.options.referenceDefinition) {\n this.clearRefMaps();\n }\n if (input.charCodeAt(input.length - 1) === C_NEWLINE) {\n // ignore last blank line created by final newline\n len -= 1;\n }\n for (var i = 0; i < len; i++) {\n this.incorporateLine(lines[i]);\n }\n while (this.tip) {\n this.finalize(this.tip, len);\n }\n this.processInlines(this.doc);\n return this.doc;\n };\n Parser.prototype.partialParseStart = function (lineNumber, lines) {\n this.doc = document$2();\n this.tip = this.doc;\n this.lineNumber = lineNumber - 1;\n this.lastLineLength = 0;\n this.offset = 0;\n this.column = 0;\n this.lastMatchedContainer = this.doc;\n this.currentLine = '';\n var len = lines.length;\n for (var i = 0; i < len; i++) {\n this.incorporateLine(lines[i]);\n }\n return this.doc;\n };\n Parser.prototype.partialParseExtends = function (lines) {\n for (var i = 0; i < lines.length; i++) {\n this.incorporateLine(lines[i]);\n }\n };\n Parser.prototype.partialParseFinish = function () {\n while (this.tip) {\n this.finalize(this.tip, this.lineNumber);\n }\n this.processInlines(this.doc);\n };\n Parser.prototype.setRefMaps = function (refMap, refLinkCandidateMap, refDefCandidateMap) {\n this.refMap = refMap;\n this.refLinkCandidateMap = refLinkCandidateMap;\n this.refDefCandidateMap = refDefCandidateMap;\n };\n Parser.prototype.clearRefMaps = function () {\n [this.refMap, this.refLinkCandidateMap, this.refDefCandidateMap].forEach(function (map) {\n clearObj(map);\n });\n };\n return Parser;\n}());\n\nfunction comparePos(p1, p2) {\n if (p1[0] < p2[0]) {\n return 1 /* LT */;\n }\n if (p1[0] > p2[0]) {\n return -1 /* GT */;\n }\n if (p1[1] < p2[1]) {\n return 1 /* LT */;\n }\n if (p1[1] > p2[1]) {\n return -1 /* GT */;\n }\n return 0 /* EQ */;\n}\nfunction compareRangeAndPos(_a, pos) {\n var startPos = _a[0], endPos = _a[1];\n if (comparePos(endPos, pos) === 1 /* LT */) {\n return 1 /* LT */;\n }\n if (comparePos(startPos, pos) === -1 /* GT */) {\n return -1 /* GT */;\n }\n return 0 /* EQ */;\n}\nfunction removeNextUntil(node, last) {\n if (node.parent !== last.parent || node === last) {\n return;\n }\n var next = node.next;\n while (next && next !== last) {\n var temp = next.next;\n for (var _i = 0, _a = ['parent', 'prev', 'next']; _i < _a.length; _i++) {\n var type = _a[_i];\n if (next[type]) {\n removeNodeById(next[type].id);\n next[type] = null;\n }\n }\n next = temp;\n }\n node.next = last.next;\n if (last.next) {\n last.next.prev = node;\n }\n else {\n node.parent.lastChild = node;\n }\n}\nfunction getChildNodes(parent) {\n var nodes = [];\n var curr = parent.firstChild;\n while (curr) {\n nodes.push(curr);\n curr = curr.next;\n }\n return nodes;\n}\nfunction insertNodesBefore(target, nodes) {\n for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) {\n var node = nodes_1[_i];\n target.insertBefore(node);\n }\n}\nfunction prependChildNodes(parent, nodes) {\n for (var i = nodes.length - 1; i >= 0; i -= 1) {\n parent.prependChild(nodes[i]);\n }\n}\nfunction updateNextLineNumbers(base, diff) {\n if (!base || !base.parent || diff === 0) {\n return;\n }\n var walker = base.parent.walker();\n walker.resumeAt(base, true);\n var event;\n while ((event = walker.next())) {\n var node = event.node, entering = event.entering;\n if (entering) {\n node.sourcepos[0][0] += diff;\n node.sourcepos[1][0] += diff;\n }\n }\n}\nfunction compareRangeAndLine(_a, line) {\n var startPos = _a[0], endPos = _a[1];\n if (endPos[0] < line) {\n return 1 /* LT */;\n }\n if (startPos[0] > line) {\n return -1 /* GT */;\n }\n return 0 /* EQ */;\n}\nfunction findChildNodeAtLine(parent, line) {\n var node = parent.firstChild;\n while (node) {\n var comp = compareRangeAndLine(node.sourcepos, line);\n if (comp === 0 /* EQ */) {\n return node;\n }\n if (comp === -1 /* GT */) {\n // To consider that top line is blank line\n return node.prev || node;\n }\n node = node.next;\n }\n return parent.lastChild;\n}\nfunction lastLeafNode(node) {\n while (node.lastChild) {\n node = node.lastChild;\n }\n return node;\n}\nfunction sameLineTopAncestor(node) {\n while (node.parent &&\n node.parent.type !== 'document' &&\n node.parent.sourcepos[0][0] === node.sourcepos[0][0]) {\n node = node.parent;\n }\n return node;\n}\nfunction findFirstNodeAtLine(parent, line) {\n var node = parent.firstChild;\n var prev = null;\n while (node) {\n var comp = compareRangeAndLine(node.sourcepos, line);\n if (comp === 0 /* EQ */) {\n if (node.sourcepos[0][0] === line || !node.firstChild) {\n return node;\n }\n prev = node;\n node = node.firstChild;\n }\n else if (comp === -1 /* GT */) {\n break;\n }\n else {\n prev = node;\n node = node.next;\n }\n }\n if (prev) {\n return sameLineTopAncestor(lastLeafNode(prev));\n }\n return null;\n}\nfunction findNodeAtPosition(parent, pos) {\n var node = parent;\n var prev = null;\n while (node) {\n var comp = compareRangeAndPos(node.sourcepos, pos);\n if (comp === 0 /* EQ */) {\n if (node.firstChild) {\n prev = node;\n node = node.firstChild;\n }\n else {\n return node;\n }\n }\n else if (comp === -1 /* GT */) {\n return prev;\n }\n else if (node.next) {\n node = node.next;\n }\n else {\n return prev;\n }\n }\n return node;\n}\nfunction findNodeById(id) {\n return getNodeById(id) || null;\n}\nfunction invokeNextUntil(callback, start, end) {\n if (end === void 0) { end = null; }\n if (start) {\n var walker = start.walker();\n while (start && start !== end) {\n callback(start);\n var next = walker.next();\n if (next) {\n start = next.node;\n }\n else {\n break;\n }\n }\n }\n}\nfunction isUnlinked(id) {\n var node = findNodeById(id);\n if (!node) {\n return true;\n }\n while (node && node.type !== 'document') {\n // eslint-disable-next-line no-loop-func\n if (!node.parent && !node.prev && !node.next) {\n return true;\n }\n node = node.parent;\n }\n return false;\n}\n\nvar reLineEnding = /\\r\\n|\\n|\\r/;\nfunction canBeContinuedListItem(lineText) {\n var spaceMatch = lineText.match(/^[ \\t]+/);\n if (spaceMatch && (spaceMatch[0].length >= 2 || /\\t/.test(spaceMatch[0]))) {\n return true;\n }\n var leftTrimmed = spaceMatch ? lineText.slice(spaceMatch.length) : lineText;\n return reBulletListMarker.test(leftTrimmed) || reOrderedListMarker.test(leftTrimmed);\n}\nfunction canBeContinuedTableBody(lineText) {\n return !isBlank(lineText) && lineText.indexOf('|') !== -1;\n}\nfunction createRefDefState(node) {\n var id = node.id, title = node.title, sourcepos = node.sourcepos, dest = node.dest;\n return {\n id: id,\n title: title,\n sourcepos: sourcepos,\n unlinked: false,\n destination: dest,\n };\n}\nvar ToastMark = /** @class */ (function () {\n function ToastMark(contents, options) {\n this.refMap = {};\n this.refLinkCandidateMap = {};\n this.refDefCandidateMap = {};\n this.referenceDefinition = !!(options === null || options === void 0 ? void 0 : options.referenceDefinition);\n this.parser = new Parser(options);\n this.parser.setRefMaps(this.refMap, this.refLinkCandidateMap, this.refDefCandidateMap);\n this.eventHandlerMap = { change: [] };\n contents = contents || '';\n this.lineTexts = contents.split(reLineEnding);\n this.root = this.parser.parse(contents, this.lineTexts);\n }\n ToastMark.prototype.updateLineTexts = function (startPos, endPos, newText) {\n var _a;\n var startLine = startPos[0], startCol = startPos[1];\n var endLine = endPos[0], endCol = endPos[1];\n var newLines = newText.split(reLineEnding);\n var newLineLen = newLines.length;\n var startLineText = this.lineTexts[startLine - 1];\n var endLineText = this.lineTexts[endLine - 1];\n newLines[0] = startLineText.slice(0, startCol - 1) + newLines[0];\n newLines[newLineLen - 1] = newLines[newLineLen - 1] + endLineText.slice(endCol - 1);\n var removedLineLen = endLine - startLine + 1;\n (_a = this.lineTexts).splice.apply(_a, __spreadArray([startLine - 1, removedLineLen], newLines));\n return newLineLen - removedLineLen;\n };\n ToastMark.prototype.updateRootNodeState = function () {\n if (this.lineTexts.length === 1 && this.lineTexts[0] === '') {\n this.root.lastLineBlank = true;\n this.root.sourcepos = [\n [1, 1],\n [1, 0],\n ];\n return;\n }\n if (this.root.lastChild) {\n this.root.lastLineBlank = this.root.lastChild.lastLineBlank;\n }\n var lineTexts = this.lineTexts;\n var idx = lineTexts.length - 1;\n while (lineTexts[idx] === '') {\n idx -= 1;\n }\n if (lineTexts.length - 2 > idx) {\n idx += 1;\n }\n this.root.sourcepos[1] = [idx + 1, lineTexts[idx].length];\n };\n ToastMark.prototype.replaceRangeNodes = function (startNode, endNode, newNodes) {\n if (!startNode) {\n if (endNode) {\n insertNodesBefore(endNode, newNodes);\n removeNodeById(endNode.id);\n endNode.unlink();\n }\n else {\n prependChildNodes(this.root, newNodes);\n }\n }\n else {\n insertNodesBefore(startNode, newNodes);\n removeNextUntil(startNode, endNode);\n [startNode.id, endNode.id].forEach(function (id) { return removeNodeById(id); });\n startNode.unlink();\n }\n };\n ToastMark.prototype.getNodeRange = function (startPos, endPos) {\n var startNode = findChildNodeAtLine(this.root, startPos[0]);\n var endNode = findChildNodeAtLine(this.root, endPos[0]);\n // extend node range to include a following block which doesn't have preceding blank line\n if (endNode && endNode.next && endPos[0] + 1 === endNode.next.sourcepos[0][0]) {\n endNode = endNode.next;\n }\n return [startNode, endNode];\n };\n ToastMark.prototype.trigger = function (eventName, param) {\n this.eventHandlerMap[eventName].forEach(function (handler) {\n handler(param);\n });\n };\n ToastMark.prototype.extendEndLine = function (line) {\n while (this.lineTexts[line] === '') {\n line += 1;\n }\n return line;\n };\n ToastMark.prototype.parseRange = function (startNode, endNode, startLine, endLine) {\n // extends starting range if the first node can be a continued list item\n if (startNode &&\n startNode.prev &&\n ((isList(startNode.prev) && canBeContinuedListItem(this.lineTexts[startLine - 1])) ||\n (isTable(startNode.prev) && canBeContinuedTableBody(this.lineTexts[startLine - 1])))) {\n startNode = startNode.prev;\n startLine = startNode.sourcepos[0][0];\n }\n var editedLines = this.lineTexts.slice(startLine - 1, endLine);\n var root = this.parser.partialParseStart(startLine, editedLines);\n // extends ending range if the following node can be a fenced code block or a continued list item\n var nextNode = endNode ? endNode.next : this.root.firstChild;\n var lastChild = root.lastChild;\n var isOpenedLastChildCodeBlock = lastChild && isCodeBlock(lastChild) && lastChild.open;\n var isOpenedLastChildCustomBlock = lastChild && isCustomBlock(lastChild) && lastChild.open;\n var isLastChildList = lastChild && isList(lastChild);\n while (((isOpenedLastChildCodeBlock || isOpenedLastChildCustomBlock) && nextNode) ||\n (isLastChildList && nextNode && (nextNode.type === 'list' || nextNode.sourcepos[0][1] >= 2))) {\n var newEndLine = this.extendEndLine(nextNode.sourcepos[1][0]);\n this.parser.partialParseExtends(this.lineTexts.slice(endLine, newEndLine));\n if (!startNode) {\n startNode = endNode;\n }\n endNode = nextNode;\n endLine = newEndLine;\n nextNode = nextNode.next;\n }\n this.parser.partialParseFinish();\n var newNodes = getChildNodes(root);\n return { newNodes: newNodes, extStartNode: startNode, extEndNode: endNode };\n };\n ToastMark.prototype.getRemovedNodeRange = function (extStartNode, extEndNode) {\n if (!extStartNode ||\n (extStartNode && isRefDef(extStartNode)) ||\n (extEndNode && isRefDef(extEndNode))) {\n return null;\n }\n return {\n id: [extStartNode.id, extEndNode.id],\n line: [extStartNode.sourcepos[0][0] - 1, extEndNode.sourcepos[1][0] - 1],\n };\n };\n ToastMark.prototype.markDeletedRefMap = function (extStartNode, extEndNode) {\n var _this = this;\n if (!isEmptyObj(this.refMap)) {\n var markDeleted = function (node) {\n if (isRefDef(node)) {\n var refDefState = _this.refMap[node.label];\n if (refDefState && node.id === refDefState.id) {\n refDefState.unlinked = true;\n }\n }\n };\n if (extStartNode) {\n invokeNextUntil(markDeleted, extStartNode.parent, extEndNode);\n }\n if (extEndNode) {\n invokeNextUntil(markDeleted, extEndNode);\n }\n }\n };\n ToastMark.prototype.replaceWithNewRefDefState = function (nodes) {\n var _this = this;\n if (!isEmptyObj(this.refMap)) {\n var replaceWith_1 = function (node) {\n if (isRefDef(node)) {\n var label = node.label;\n var refDefState = _this.refMap[label];\n if (!refDefState || refDefState.unlinked) {\n _this.refMap[label] = createRefDefState(node);\n }\n }\n };\n nodes.forEach(function (node) {\n invokeNextUntil(replaceWith_1, node);\n });\n }\n };\n ToastMark.prototype.replaceWithRefDefCandidate = function () {\n var _this = this;\n if (!isEmptyObj(this.refDefCandidateMap)) {\n iterateObject(this.refDefCandidateMap, function (_, candidate) {\n var label = candidate.label, sourcepos = candidate.sourcepos;\n var refDefState = _this.refMap[label];\n if (!refDefState ||\n refDefState.unlinked ||\n refDefState.sourcepos[0][0] > sourcepos[0][0]) {\n _this.refMap[label] = createRefDefState(candidate);\n }\n });\n }\n };\n ToastMark.prototype.getRangeWithRefDef = function (startLine, endLine, startNode, endNode, lineDiff) {\n if (this.referenceDefinition && !isEmptyObj(this.refMap)) {\n var prevNode = findChildNodeAtLine(this.root, startLine - 1);\n var nextNode = findChildNodeAtLine(this.root, endLine + 1);\n if (prevNode && isRefDef(prevNode) && prevNode !== startNode && prevNode !== endNode) {\n startNode = prevNode;\n startLine = startNode.sourcepos[0][0];\n }\n if (nextNode && isRefDef(nextNode) && nextNode !== startNode && nextNode !== endNode) {\n endNode = nextNode;\n endLine = this.extendEndLine(endNode.sourcepos[1][0] + lineDiff);\n }\n }\n return [startNode, endNode, startLine, endLine];\n };\n ToastMark.prototype.parse = function (startPos, endPos, lineDiff) {\n if (lineDiff === void 0) { lineDiff = 0; }\n var range = this.getNodeRange(startPos, endPos);\n var startNode = range[0], endNode = range[1];\n var startLine = startNode ? Math.min(startNode.sourcepos[0][0], startPos[0]) : startPos[0];\n var endLine = this.extendEndLine((endNode ? Math.max(endNode.sourcepos[1][0], endPos[0]) : endPos[0]) + lineDiff);\n var parseResult = this.parseRange.apply(this, this.getRangeWithRefDef(startLine, endLine, startNode, endNode, lineDiff));\n var newNodes = parseResult.newNodes, extStartNode = parseResult.extStartNode, extEndNode = parseResult.extEndNode;\n var removedNodeRange = this.getRemovedNodeRange(extStartNode, extEndNode);\n var nextNode = extEndNode ? extEndNode.next : this.root.firstChild;\n if (this.referenceDefinition) {\n this.markDeletedRefMap(extStartNode, extEndNode);\n this.replaceRangeNodes(extStartNode, extEndNode, newNodes);\n this.replaceWithNewRefDefState(newNodes);\n }\n else {\n this.replaceRangeNodes(extStartNode, extEndNode, newNodes);\n }\n return { nodes: newNodes, removedNodeRange: removedNodeRange, nextNode: nextNode };\n };\n ToastMark.prototype.parseRefLink = function () {\n var _this = this;\n var result = [];\n if (!isEmptyObj(this.refMap)) {\n iterateObject(this.refMap, function (label, value) {\n if (value.unlinked) {\n delete _this.refMap[label];\n }\n iterateObject(_this.refLinkCandidateMap, function (_, candidate) {\n var node = candidate.node, refLabel = candidate.refLabel;\n if (refLabel === label) {\n result.push(_this.parse(node.sourcepos[0], node.sourcepos[1]));\n }\n });\n });\n }\n return result;\n };\n ToastMark.prototype.removeUnlinkedCandidate = function () {\n if (!isEmptyObj(this.refDefCandidateMap)) {\n [this.refLinkCandidateMap, this.refDefCandidateMap].forEach(function (candidateMap) {\n iterateObject(candidateMap, function (id) {\n if (isUnlinked(id)) {\n delete candidateMap[id];\n }\n });\n });\n }\n };\n ToastMark.prototype.editMarkdown = function (startPos, endPos, newText) {\n var lineDiff = this.updateLineTexts(startPos, endPos, newText);\n var parseResult = this.parse(startPos, endPos, lineDiff);\n var editResult = omit(parseResult, 'nextNode');\n updateNextLineNumbers(parseResult.nextNode, lineDiff);\n this.updateRootNodeState();\n var result = [editResult];\n if (this.referenceDefinition) {\n this.removeUnlinkedCandidate();\n this.replaceWithRefDefCandidate();\n result = result.concat(this.parseRefLink());\n }\n this.trigger('change', result);\n return result;\n };\n ToastMark.prototype.getLineTexts = function () {\n return this.lineTexts;\n };\n ToastMark.prototype.getRootNode = function () {\n return this.root;\n };\n ToastMark.prototype.findNodeAtPosition = function (pos) {\n var node = findNodeAtPosition(this.root, pos);\n if (!node || node === this.root) {\n return null;\n }\n return node;\n };\n ToastMark.prototype.findFirstNodeAtLine = function (line) {\n return findFirstNodeAtLine(this.root, line);\n };\n ToastMark.prototype.on = function (eventName, callback) {\n this.eventHandlerMap[eventName].push(callback);\n };\n ToastMark.prototype.off = function (eventName, callback) {\n var handlers = this.eventHandlerMap[eventName];\n var idx = handlers.indexOf(callback);\n handlers.splice(idx, 1);\n };\n ToastMark.prototype.findNodeById = function (id) {\n return findNodeById(id);\n };\n ToastMark.prototype.removeAllNode = function () {\n removeAllNode();\n };\n return ToastMark;\n}());\n\nvar disallowedTags = [\n 'title',\n 'textarea',\n 'style',\n 'xmp',\n 'iframe',\n 'noembed',\n 'noframes',\n 'script',\n 'plaintext',\n];\nvar reDisallowedTag = new RegExp(\"<(/?(?:\" + disallowedTags.join('|') + \")[^>]*>)\", 'ig');\nfunction filterDisallowedTags(str) {\n if (reDisallowedTag.test(str)) {\n return str.replace(reDisallowedTag, function (_, group) { return \"&lt;\" + group; });\n }\n return str;\n}\n\nvar baseConvertors$1 = {\n heading: function (node, _a) {\n var entering = _a.entering;\n return {\n type: entering ? 'openTag' : 'closeTag',\n tagName: \"h\" + node.level,\n outerNewLine: true,\n };\n },\n text: function (node) {\n return {\n type: 'text',\n content: node.literal,\n };\n },\n softbreak: function (_, _a) {\n var options = _a.options;\n return {\n type: 'html',\n content: options.softbreak,\n };\n },\n linebreak: function () {\n return {\n type: 'html',\n content: '<br />\\n',\n };\n },\n emph: function (_, _a) {\n var entering = _a.entering;\n return {\n type: entering ? 'openTag' : 'closeTag',\n tagName: 'em',\n };\n },\n strong: function (_, _a) {\n var entering = _a.entering;\n return {\n type: entering ? 'openTag' : 'closeTag',\n tagName: 'strong',\n };\n },\n paragraph: function (node, _a) {\n var _b;\n var entering = _a.entering;\n var grandparent = (_b = node.parent) === null || _b === void 0 ? void 0 : _b.parent;\n if (grandparent && grandparent.type === 'list') {\n if (grandparent.listData.tight) {\n return null;\n }\n }\n return {\n type: entering ? 'openTag' : 'closeTag',\n tagName: 'p',\n outerNewLine: true,\n };\n },\n thematicBreak: function () {\n return {\n type: 'openTag',\n tagName: 'hr',\n outerNewLine: true,\n selfClose: true,\n };\n },\n blockQuote: function (_, _a) {\n var entering = _a.entering;\n return {\n type: entering ? 'openTag' : 'closeTag',\n tagName: 'blockquote',\n outerNewLine: true,\n innerNewLine: true,\n };\n },\n list: function (node, _a) {\n var entering = _a.entering;\n var _b = node.listData, type = _b.type, start = _b.start;\n var tagName = type === 'bullet' ? 'ul' : 'ol';\n var attributes = {};\n if (tagName === 'ol' && start !== null && start !== 1) {\n attributes.start = start.toString();\n }\n return {\n type: entering ? 'openTag' : 'closeTag',\n tagName: tagName,\n attributes: attributes,\n outerNewLine: true,\n };\n },\n item: function (_, _a) {\n var entering = _a.entering;\n return {\n type: entering ? 'openTag' : 'closeTag',\n tagName: 'li',\n outerNewLine: true,\n };\n },\n htmlInline: function (node, _a) {\n var options = _a.options;\n var content = options.tagFilter ? filterDisallowedTags(node.literal) : node.literal;\n return { type: 'html', content: content };\n },\n htmlBlock: function (node, _a) {\n var options = _a.options;\n var content = options.tagFilter ? filterDisallowedTags(node.literal) : node.literal;\n if (options.nodeId) {\n return [\n { type: 'openTag', tagName: 'div', outerNewLine: true },\n { type: 'html', content: content },\n { type: 'closeTag', tagName: 'div', outerNewLine: true },\n ];\n }\n return { type: 'html', content: content, outerNewLine: true };\n },\n code: function (node) {\n return [\n { type: 'openTag', tagName: 'code' },\n { type: 'text', content: node.literal },\n { type: 'closeTag', tagName: 'code' },\n ];\n },\n codeBlock: function (node) {\n var infoStr = node.info;\n var infoWords = infoStr ? infoStr.split(/\\s+/) : [];\n var codeClassNames = [];\n if (infoWords.length > 0 && infoWords[0].length > 0) {\n codeClassNames.push(\"language-\" + escapeXml(infoWords[0]));\n }\n return [\n { type: 'openTag', tagName: 'pre', outerNewLine: true },\n { type: 'openTag', tagName: 'code', classNames: codeClassNames },\n { type: 'text', content: node.literal },\n { type: 'closeTag', tagName: 'code' },\n { type: 'closeTag', tagName: 'pre', outerNewLine: true },\n ];\n },\n link: function (node, _a) {\n var entering = _a.entering;\n if (entering) {\n var _b = node, title = _b.title, destination = _b.destination;\n return {\n type: 'openTag',\n tagName: 'a',\n attributes: __assign({ href: escapeXml(destination) }, (title && { title: escapeXml(title) })),\n };\n }\n return { type: 'closeTag', tagName: 'a' };\n },\n image: function (node, _a) {\n var getChildrenText = _a.getChildrenText, skipChildren = _a.skipChildren;\n var _b = node, title = _b.title, destination = _b.destination;\n skipChildren();\n return {\n type: 'openTag',\n tagName: 'img',\n selfClose: true,\n attributes: __assign({ src: escapeXml(destination), alt: getChildrenText(node) }, (title && { title: escapeXml(title) })),\n };\n },\n customBlock: function (node, context, convertors) {\n var info = node.info.trim().toLowerCase();\n var customConvertor = convertors[info];\n if (customConvertor) {\n try {\n return customConvertor(node, context);\n }\n catch (e) {\n console.warn(\"[@toast-ui/editor] - The error occurred when \" + info + \" block node was parsed in markdown renderer: \" + e);\n }\n }\n return [\n { type: 'openTag', tagName: 'div', outerNewLine: true },\n { type: 'text', content: node.literal },\n { type: 'closeTag', tagName: 'div', outerNewLine: true },\n ];\n },\n frontMatter: function (node) {\n return [\n {\n type: 'openTag',\n tagName: 'div',\n outerNewLine: true,\n // Because front matter is metadata, it should not be render.\n attributes: { style: 'white-space: pre; display: none;' },\n },\n { type: 'text', content: node.literal },\n { type: 'closeTag', tagName: 'div', outerNewLine: true },\n ];\n },\n customInline: function (node, context, convertors) {\n var _a = node, info = _a.info, firstChild = _a.firstChild;\n var nomalizedInfo = info.trim().toLowerCase();\n var customConvertor = convertors[nomalizedInfo];\n var entering = context.entering;\n if (customConvertor) {\n try {\n return customConvertor(node, context);\n }\n catch (e) {\n console.warn(\"[@toast-ui/editor] - The error occurred when \" + nomalizedInfo + \" inline node was parsed in markdown renderer: \" + e);\n }\n }\n return entering\n ? [\n { type: 'openTag', tagName: 'span' },\n { type: 'text', content: \"$$\" + info + (firstChild ? ' ' : '') },\n ]\n : [\n { type: 'text', content: '$$' },\n { type: 'closeTag', tagName: 'span' },\n ];\n },\n};\n\nvar gfmConvertors = {\n strike: function (_, _a) {\n var entering = _a.entering;\n return {\n type: entering ? 'openTag' : 'closeTag',\n tagName: 'del',\n };\n },\n item: function (node, _a) {\n var entering = _a.entering;\n var _b = node.listData, checked = _b.checked, task = _b.task;\n if (entering) {\n var itemTag = {\n type: 'openTag',\n tagName: 'li',\n outerNewLine: true,\n };\n if (task) {\n return [\n itemTag,\n {\n type: 'openTag',\n tagName: 'input',\n selfClose: true,\n attributes: __assign(__assign({}, (checked && { checked: '' })), { disabled: '', type: 'checkbox' }),\n },\n {\n type: 'text',\n content: ' ',\n },\n ];\n }\n return itemTag;\n }\n return {\n type: 'closeTag',\n tagName: 'li',\n outerNewLine: true,\n };\n },\n table: function (_, _a) {\n var entering = _a.entering;\n return {\n type: entering ? 'openTag' : 'closeTag',\n tagName: 'table',\n outerNewLine: true,\n };\n },\n tableHead: function (_, _a) {\n var entering = _a.entering;\n return {\n type: entering ? 'openTag' : 'closeTag',\n tagName: 'thead',\n outerNewLine: true,\n };\n },\n tableBody: function (_, _a) {\n var entering = _a.entering;\n return {\n type: entering ? 'openTag' : 'closeTag',\n tagName: 'tbody',\n outerNewLine: true,\n };\n },\n tableRow: function (node, _a) {\n var entering = _a.entering;\n if (entering) {\n return {\n type: 'openTag',\n tagName: 'tr',\n outerNewLine: true,\n };\n }\n var result = [];\n if (node.lastChild) {\n var columnLen = node.parent.parent.columns.length;\n var lastColIdx = node.lastChild.endIdx;\n for (var i = lastColIdx + 1; i < columnLen; i += 1) {\n result.push({\n type: 'openTag',\n tagName: 'td',\n outerNewLine: true,\n }, {\n type: 'closeTag',\n tagName: 'td',\n outerNewLine: true,\n });\n }\n }\n result.push({\n type: 'closeTag',\n tagName: 'tr',\n outerNewLine: true,\n });\n return result;\n },\n tableCell: function (node, _a) {\n var entering = _a.entering;\n if (node.ignored) {\n return {\n type: 'text',\n content: '',\n };\n }\n var tablePart = node.parent.parent;\n var tagName = tablePart.type === 'tableHead' ? 'th' : 'td';\n var table = tablePart.parent;\n var columnInfo = table.columns[node.startIdx];\n var attributes = (columnInfo === null || columnInfo === void 0 ? void 0 : columnInfo.align) ? { align: columnInfo.align } : null;\n if (entering) {\n return __assign({ type: 'openTag', tagName: tagName, outerNewLine: true }, (attributes && { attributes: attributes }));\n }\n return {\n type: 'closeTag',\n tagName: tagName,\n outerNewLine: true,\n };\n },\n};\n\nvar defaultOptions = {\n softbreak: '\\n',\n gfm: false,\n tagFilter: false,\n nodeId: false,\n};\nfunction getChildrenText(node) {\n var buffer = [];\n var walker = node.walker();\n var event = null;\n while ((event = walker.next())) {\n var node_1 = event.node;\n if (node_1.type === 'text') {\n buffer.push(node_1.literal);\n }\n }\n return buffer.join('');\n}\nvar Renderer = /** @class */ (function () {\n function Renderer(customOptions) {\n this.buffer = [];\n this.options = __assign(__assign({}, defaultOptions), customOptions);\n this.convertors = this.createConvertors();\n delete this.options.convertors;\n }\n Renderer.prototype.createConvertors = function () {\n var convertors = __assign({}, baseConvertors$1);\n if (this.options.gfm) {\n convertors = __assign(__assign({}, convertors), gfmConvertors);\n }\n if (this.options.convertors) {\n var customConvertors_1 = this.options.convertors;\n var nodeTypes = Object.keys(customConvertors_1);\n var defaultConvertors_1 = __assign(__assign({}, baseConvertors$1), gfmConvertors);\n nodeTypes.forEach(function (nodeType) {\n var orgConvertor = convertors[nodeType];\n var convertor = customConvertors_1[nodeType];\n var convertorType = Object.keys(defaultConvertors_1).indexOf(nodeType) === -1\n ? nodeType.toLowerCase()\n : nodeType;\n if (orgConvertor) {\n convertors[convertorType] = function (node, context, convertors) {\n context.origin = function () { return orgConvertor(node, context, convertors); };\n return convertor(node, context);\n };\n }\n else {\n convertors[convertorType] = convertor;\n }\n });\n }\n return convertors;\n };\n Renderer.prototype.getConvertors = function () {\n return this.convertors;\n };\n Renderer.prototype.getOptions = function () {\n return this.options;\n };\n Renderer.prototype.render = function (rootNode) {\n var _this = this;\n this.buffer = [];\n var walker = rootNode.walker();\n var event = null;\n var _loop_1 = function () {\n var node = event.node, entering = event.entering;\n var convertor = this_1.convertors[node.type];\n if (!convertor) {\n return \"continue\";\n }\n var skipped = false;\n var context = {\n entering: entering,\n leaf: !isContainer$1(node),\n options: this_1.options,\n getChildrenText: getChildrenText,\n skipChildren: function () {\n skipped = true;\n },\n };\n var converted = isCustomBlock(node) || isCustomInline(node)\n ? convertor(node, context, this_1.convertors)\n : convertor(node, context);\n if (converted) {\n var htmlNodes = Array.isArray(converted) ? converted : [converted];\n htmlNodes.forEach(function (htmlNode, index) {\n if (htmlNode.type === 'openTag' && _this.options.nodeId && index === 0) {\n if (!htmlNode.attributes) {\n htmlNode.attributes = {};\n }\n htmlNode.attributes['data-nodeid'] = String(node.id);\n }\n _this.renderHTMLNode(htmlNode);\n });\n if (skipped) {\n walker.resumeAt(node, false);\n walker.next();\n }\n }\n };\n var this_1 = this;\n while ((event = walker.next())) {\n _loop_1();\n }\n this.addNewLine();\n return this.buffer.join('');\n };\n Renderer.prototype.renderHTMLNode = function (node) {\n switch (node.type) {\n case 'openTag':\n case 'closeTag':\n this.renderElementNode(node);\n break;\n case 'text':\n this.renderTextNode(node);\n break;\n case 'html':\n this.renderRawHtmlNode(node);\n break;\n // no-default-case\n }\n };\n Renderer.prototype.generateOpenTagString = function (node) {\n var _this = this;\n var tagName = node.tagName, classNames = node.classNames, attributes = node.attributes;\n this.buffer.push(\"<\" + tagName);\n if (classNames && classNames.length > 0) {\n this.buffer.push(\" class=\\\"\" + classNames.join(' ') + \"\\\"\");\n }\n if (attributes) {\n Object.keys(attributes).forEach(function (attrName) {\n var attrValue = attributes[attrName];\n _this.buffer.push(\" \" + attrName + \"=\\\"\" + attrValue + \"\\\"\");\n });\n }\n if (node.selfClose) {\n this.buffer.push(' /');\n }\n this.buffer.push('>');\n };\n Renderer.prototype.generateCloseTagString = function (_a) {\n var tagName = _a.tagName;\n this.buffer.push(\"</\" + tagName + \">\");\n };\n Renderer.prototype.addNewLine = function () {\n if (this.buffer.length && last(last(this.buffer)) !== '\\n') {\n this.buffer.push('\\n');\n }\n };\n Renderer.prototype.addOuterNewLine = function (node) {\n if (node.outerNewLine) {\n this.addNewLine();\n }\n };\n Renderer.prototype.addInnerNewLine = function (node) {\n if (node.innerNewLine) {\n this.addNewLine();\n }\n };\n Renderer.prototype.renderTextNode = function (node) {\n this.buffer.push(escapeXml(node.content));\n };\n Renderer.prototype.renderRawHtmlNode = function (node) {\n this.addOuterNewLine(node);\n this.buffer.push(node.content);\n this.addOuterNewLine(node);\n };\n Renderer.prototype.renderElementNode = function (node) {\n if (node.type === 'openTag') {\n this.addOuterNewLine(node);\n this.generateOpenTagString(node);\n if (node.selfClose) {\n this.addOuterNewLine(node);\n }\n else {\n this.addInnerNewLine(node);\n }\n }\n else {\n this.addInnerNewLine(node);\n this.generateCloseTagString(node);\n this.addOuterNewLine(node);\n }\n };\n return Renderer;\n}());\n\n/*! @license DOMPurify 2.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.3/LICENSE */\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nvar hasOwnProperty = Object.hasOwnProperty,\n setPrototypeOf = Object.setPrototypeOf,\n isFrozen = Object.isFrozen,\n getPrototypeOf = Object.getPrototypeOf,\n getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar freeze = Object.freeze,\n seal = Object.seal,\n create = Object.create; // eslint-disable-line import/no-mutable-exports\n\nvar _ref = typeof Reflect !== 'undefined' && Reflect,\n apply = _ref.apply,\n construct = _ref.construct;\n\nif (!apply) {\n apply = function apply(fun, thisValue, args) {\n return fun.apply(thisValue, args);\n };\n}\n\nif (!freeze) {\n freeze = function freeze(x) {\n return x;\n };\n}\n\nif (!seal) {\n seal = function seal(x) {\n return x;\n };\n}\n\nif (!construct) {\n construct = function construct(Func, args) {\n return new (Function.prototype.bind.apply(Func, [null].concat(_toConsumableArray(args))))();\n };\n}\n\nvar arrayForEach = unapply(Array.prototype.forEach);\nvar arrayPop = unapply(Array.prototype.pop);\nvar arrayPush = unapply(Array.prototype.push);\n\nvar stringToLowerCase = unapply(String.prototype.toLowerCase);\nvar stringMatch = unapply(String.prototype.match);\nvar stringReplace = unapply(String.prototype.replace);\nvar stringIndexOf = unapply(String.prototype.indexOf);\nvar stringTrim = unapply(String.prototype.trim);\n\nvar regExpTest = unapply(RegExp.prototype.test);\n\nvar typeErrorCreate = unconstruct(TypeError);\n\nfunction unapply(func) {\n return function (thisArg) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return apply(func, thisArg, args);\n };\n}\n\nfunction unconstruct(func) {\n return function () {\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return construct(func, args);\n };\n}\n\n/* Add properties to a lookup table */\nfunction addToSet(set, array) {\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n\n var l = array.length;\n while (l--) {\n var element = array[l];\n if (typeof element === 'string') {\n var lcElement = stringToLowerCase(element);\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n array[l] = lcElement;\n }\n\n element = lcElement;\n }\n }\n\n set[element] = true;\n }\n\n return set;\n}\n\n/* Shallow clone an object */\nfunction clone(object) {\n var newObject = create(null);\n\n var property = void 0;\n for (property in object) {\n if (apply(hasOwnProperty, object, [property])) {\n newObject[property] = object[property];\n }\n }\n\n return newObject;\n}\n\n/* IE10 doesn't support __lookupGetter__ so lets'\n * simulate it. It also automatically checks\n * if the prop is function or getter and behaves\n * accordingly. */\nfunction lookupGetter(object, prop) {\n while (object !== null) {\n var desc = getOwnPropertyDescriptor(object, prop);\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n\n object = getPrototypeOf(object);\n }\n\n function fallbackValue(element) {\n console.warn('fallback value for', element);\n return null;\n }\n\n return fallbackValue;\n}\n\nvar html$2 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);\n\n// SVG\nvar svg = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);\n\nvar svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);\n\n// List of SVG elements that are disallowed by default.\n// We still need to know them so that we can do namespace\n// checks properly in case one wants to add them to\n// allow-list.\nvar svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'fedropshadow', 'feimage', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);\n\nvar mathMl = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover']);\n\n// Similarly to SVG, we want to know all MathML elements,\n// even those that we disallow by default.\nvar mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\n\nvar text = freeze(['#text']);\n\nvar html$1$1 = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns', 'slot']);\n\nvar svg$1 = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);\n\nvar mathMl$1 = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);\n\nvar xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\n// eslint-disable-next-line unicorn/better-regex\nvar MUSTACHE_EXPR = seal(/\\{\\{[\\s\\S]*|[\\s\\S]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\nvar ERB_EXPR = seal(/<%[\\s\\S]*|[\\s\\S]*%>/gm);\nvar DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\nvar ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\nvar IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n);\nvar IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\nvar ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n);\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction _toConsumableArray$1(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nvar getGlobal = function getGlobal() {\n return typeof window === 'undefined' ? null : window;\n};\n\n/**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.\n * @param {Document} document The document object (to determine policy name suffix)\n * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types\n * are not supported).\n */\nvar _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, document) {\n if ((typeof trustedTypes === 'undefined' ? 'undefined' : _typeof(trustedTypes)) !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n return null;\n }\n\n // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n var suffix = null;\n var ATTR_NAME = 'data-tt-policy-suffix';\n if (document.currentScript && document.currentScript.hasAttribute(ATTR_NAME)) {\n suffix = document.currentScript.getAttribute(ATTR_NAME);\n }\n\n var policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML: function createHTML(html$$1) {\n return html$$1;\n }\n });\n } catch (_) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n return null;\n }\n};\n\nfunction createDOMPurify() {\n var window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n\n var DOMPurify = function DOMPurify(root) {\n return createDOMPurify(root);\n };\n\n /**\n * Version label, exposed for easier checks\n * if DOMPurify is up to date or not\n */\n DOMPurify.version = '2.3.3';\n\n /**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\n */\n DOMPurify.removed = [];\n\n if (!window || !window.document || window.document.nodeType !== 9) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n\n return DOMPurify;\n }\n\n var originalDocument = window.document;\n\n var document = window.document;\n var DocumentFragment = window.DocumentFragment,\n HTMLTemplateElement = window.HTMLTemplateElement,\n Node = window.Node,\n Element = window.Element,\n NodeFilter = window.NodeFilter,\n _window$NamedNodeMap = window.NamedNodeMap,\n NamedNodeMap = _window$NamedNodeMap === undefined ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap,\n Text = window.Text,\n Comment = window.Comment,\n DOMParser = window.DOMParser,\n trustedTypes = window.trustedTypes;\n\n\n var ElementPrototype = Element.prototype;\n\n var cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n var getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n var getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n var getParentNode = lookupGetter(ElementPrototype, 'parentNode');\n\n // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n if (typeof HTMLTemplateElement === 'function') {\n var template = document.createElement('template');\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n\n var trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, originalDocument);\n var emptyHTML = trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML('') : '';\n\n var _document = document,\n implementation = _document.implementation,\n createNodeIterator = _document.createNodeIterator,\n createDocumentFragment = _document.createDocumentFragment,\n getElementsByTagName = _document.getElementsByTagName;\n var importNode = originalDocument.importNode;\n\n\n var documentMode = {};\n try {\n documentMode = clone(document).documentMode ? document.documentMode : {};\n } catch (_) {}\n\n var hooks = {};\n\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n DOMPurify.isSupported = typeof getParentNode === 'function' && implementation && typeof implementation.createHTMLDocument !== 'undefined' && documentMode !== 9;\n\n var MUSTACHE_EXPR$$1 = MUSTACHE_EXPR,\n ERB_EXPR$$1 = ERB_EXPR,\n DATA_ATTR$$1 = DATA_ATTR,\n ARIA_ATTR$$1 = ARIA_ATTR,\n IS_SCRIPT_OR_DATA$$1 = IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE$$1 = ATTR_WHITESPACE;\n var IS_ALLOWED_URI$$1 = IS_ALLOWED_URI;\n\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n\n /* allowed element names */\n\n var ALLOWED_TAGS = null;\n var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray$1(html$2), _toConsumableArray$1(svg), _toConsumableArray$1(svgFilters), _toConsumableArray$1(mathMl), _toConsumableArray$1(text)));\n\n /* Allowed attribute names */\n var ALLOWED_ATTR = null;\n var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray$1(html$1$1), _toConsumableArray$1(svg$1), _toConsumableArray$1(mathMl$1), _toConsumableArray$1(xml)));\n\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n var FORBID_TAGS = null;\n\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n var FORBID_ATTR = null;\n\n /* Decide if ARIA attributes are okay */\n var ALLOW_ARIA_ATTR = true;\n\n /* Decide if custom data attributes are okay */\n var ALLOW_DATA_ATTR = true;\n\n /* Decide if unknown protocols are okay */\n var ALLOW_UNKNOWN_PROTOCOLS = false;\n\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n var SAFE_FOR_TEMPLATES = false;\n\n /* Decide if document with <html>... should be returned */\n var WHOLE_DOCUMENT = false;\n\n /* Track whether config is already set on this instance of DOMPurify. */\n var SET_CONFIG = false;\n\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n var FORCE_BODY = false;\n\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n var RETURN_DOM = false;\n\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n var RETURN_DOM_FRAGMENT = false;\n\n /* If `RETURN_DOM` or `RETURN_DOM_FRAGMENT` is enabled, decide if the returned DOM\n * `Node` is imported into the current `Document`. If this flag is not enabled the\n * `Node` will belong (its ownerDocument) to a fresh `HTMLDocument`, created by\n * DOMPurify.\n *\n * This defaults to `true` starting DOMPurify 2.2.0. Note that setting it to `false`\n * might cause XSS from attacks hidden in closed shadowroots in case the browser\n * supports Declarative Shadow: DOM https://web.dev/declarative-shadow-dom/\n */\n var RETURN_DOM_IMPORT = true;\n\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n var RETURN_TRUSTED_TYPE = false;\n\n /* Output should be free from DOM clobbering attacks? */\n var SANITIZE_DOM = true;\n\n /* Keep element content when removing element? */\n var KEEP_CONTENT = true;\n\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n var IN_PLACE = false;\n\n /* Allow usage of profiles like html, svg and mathMl */\n var USE_PROFILES = {};\n\n /* Tags to ignore content of when KEEP_CONTENT is true */\n var FORBID_CONTENTS = null;\n var DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);\n\n /* Tags that are safe for data: URIs */\n var DATA_URI_TAGS = null;\n var DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n\n /* Attributes safe for values like \"javascript:\" */\n var URI_SAFE_ATTRIBUTES = null;\n var DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);\n\n var MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n /* Document namespace */\n var NAMESPACE = HTML_NAMESPACE;\n var IS_EMPTY_INPUT = false;\n\n /* Parsing of strict XHTML documents */\n var PARSER_MEDIA_TYPE = void 0;\n var SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n var DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n var transformCaseFunc = void 0;\n\n /* Keep a reference to config to pass to hooks */\n var CONFIG = null;\n\n /* Ideally, do not touch anything below this line */\n /* ______________________________________________ */\n\n var formElement = document.createElement('form');\n\n /**\n * _parseConfig\n *\n * @param {Object} cfg optional config literal\n */\n // eslint-disable-next-line complexity\n var _parseConfig = function _parseConfig(cfg) {\n if (CONFIG && CONFIG === cfg) {\n return;\n }\n\n /* Shield configuration object from tampering */\n if (!cfg || (typeof cfg === 'undefined' ? 'undefined' : _typeof(cfg)) !== 'object') {\n cfg = {};\n }\n\n /* Shield configuration object from prototype pollution */\n cfg = clone(cfg);\n\n /* Set configuration parameters */\n ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS) : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR) : DEFAULT_ALLOWED_ATTR;\n URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR) : DEFAULT_URI_SAFE_ATTRIBUTES;\n DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS) : DEFAULT_DATA_URI_TAGS;\n FORBID_CONTENTS = 'FORBID_CONTENTS' in cfg ? addToSet({}, cfg.FORBID_CONTENTS) : DEFAULT_FORBID_CONTENTS;\n FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS) : {};\n FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR) : {};\n USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n RETURN_DOM_IMPORT = cfg.RETURN_DOM_IMPORT !== false; // Default true\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n IN_PLACE = cfg.IN_PLACE || false; // Default false\n IS_ALLOWED_URI$$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$$1;\n NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;\n\n PARSER_MEDIA_TYPE =\n // eslint-disable-next-line unicorn/prefer-includes\n SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? PARSER_MEDIA_TYPE = DEFAULT_PARSER_MEDIA_TYPE : PARSER_MEDIA_TYPE = cfg.PARSER_MEDIA_TYPE;\n\n // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? function (x) {\n return x;\n } : stringToLowerCase;\n\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n\n /* Parse profile info */\n if (USE_PROFILES) {\n ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray$1(text)));\n ALLOWED_ATTR = [];\n if (USE_PROFILES.html === true) {\n addToSet(ALLOWED_TAGS, html$2);\n addToSet(ALLOWED_ATTR, html$1$1);\n }\n\n if (USE_PROFILES.svg === true) {\n addToSet(ALLOWED_TAGS, svg);\n addToSet(ALLOWED_ATTR, svg$1);\n addToSet(ALLOWED_ATTR, xml);\n }\n\n if (USE_PROFILES.svgFilters === true) {\n addToSet(ALLOWED_TAGS, svgFilters);\n addToSet(ALLOWED_ATTR, svg$1);\n addToSet(ALLOWED_ATTR, xml);\n }\n\n if (USE_PROFILES.mathMl === true) {\n addToSet(ALLOWED_TAGS, mathMl);\n addToSet(ALLOWED_ATTR, mathMl$1);\n addToSet(ALLOWED_ATTR, xml);\n }\n }\n\n /* Merge configuration parameters */\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS);\n }\n\n if (cfg.ADD_ATTR) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR);\n }\n\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR);\n }\n\n if (cfg.FORBID_CONTENTS) {\n if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n FORBID_CONTENTS = clone(FORBID_CONTENTS);\n }\n\n addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS);\n }\n\n /* Add #text in case KEEP_CONTENT is set to true */\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n if (ALLOWED_TAGS.table) {\n addToSet(ALLOWED_TAGS, ['tbody']);\n delete FORBID_TAGS.tbody;\n }\n\n // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n if (freeze) {\n freeze(cfg);\n }\n\n CONFIG = cfg;\n };\n\n var MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);\n\n var HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']);\n\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n var ALL_SVG_TAGS = addToSet({}, svg);\n addToSet(ALL_SVG_TAGS, svgFilters);\n addToSet(ALL_SVG_TAGS, svgDisallowed);\n\n var ALL_MATHML_TAGS = addToSet({}, mathMl);\n addToSet(ALL_MATHML_TAGS, mathMlDisallowed);\n\n /**\n *\n *\n * @param {Element} element a DOM element whose namespace is being checked\n * @returns {boolean} Return false if the element has a\n * namespace that a spec-compliant parser would never\n * return. Return true otherwise.\n */\n var _checkValidNamespace = function _checkValidNamespace(element) {\n var parent = getParentNode(element);\n\n // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\n if (!parent || !parent.tagName) {\n parent = {\n namespaceURI: HTML_NAMESPACE,\n tagName: 'template'\n };\n }\n\n var tagName = stringToLowerCase(element.tagName);\n var parentTagName = stringToLowerCase(parent.tagName);\n\n if (element.namespaceURI === SVG_NAMESPACE) {\n // The only way to switch from HTML namespace to SVG\n // is via <svg>. If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'svg';\n }\n\n // The only way to switch from MathML to SVG is via\n // svg if parent is either <annotation-xml> or MathML\n // text integration points.\n if (parent.namespaceURI === MATHML_NAMESPACE) {\n return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n }\n\n // We only allow elements that are defined in SVG\n // spec. All others are disallowed in SVG namespace.\n return Boolean(ALL_SVG_TAGS[tagName]);\n }\n\n if (element.namespaceURI === MATHML_NAMESPACE) {\n // The only way to switch from HTML namespace to MathML\n // is via <math>. If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'math';\n }\n\n // The only way to switch from SVG to MathML is via\n // <math> and HTML integration points\n if (parent.namespaceURI === SVG_NAMESPACE) {\n return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n }\n\n // We only allow elements that are defined in MathML\n // spec. All others are disallowed in MathML namespace.\n return Boolean(ALL_MATHML_TAGS[tagName]);\n }\n\n if (element.namespaceURI === HTML_NAMESPACE) {\n // The only way to switch from SVG to HTML is via\n // HTML integration points, and from MathML to HTML\n // is via MathML text integration points\n if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n\n if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n\n // Certain elements are allowed in both SVG and HTML\n // namespace. We need to specify them explicitly\n // so that they don't get erronously deleted from\n // HTML namespace.\n var commonSvgAndHTMLElements = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n\n // We disallow tags that are specific for MathML\n // or SVG and should never appear in HTML namespace\n return !ALL_MATHML_TAGS[tagName] && (commonSvgAndHTMLElements[tagName] || !ALL_SVG_TAGS[tagName]);\n }\n\n // The code should never reach this place (this means\n // that the element somehow got namespace that is not\n // HTML, SVG or MathML). Return false just in case.\n return false;\n };\n\n /**\n * _forceRemove\n *\n * @param {Node} node a DOM node\n */\n var _forceRemove = function _forceRemove(node) {\n arrayPush(DOMPurify.removed, { element: node });\n try {\n // eslint-disable-next-line unicorn/prefer-dom-node-remove\n node.parentNode.removeChild(node);\n } catch (_) {\n try {\n node.outerHTML = emptyHTML;\n } catch (_) {\n node.remove();\n }\n }\n };\n\n /**\n * _removeAttribute\n *\n * @param {String} name an Attribute name\n * @param {Node} node a DOM node\n */\n var _removeAttribute = function _removeAttribute(name, node) {\n try {\n arrayPush(DOMPurify.removed, {\n attribute: node.getAttributeNode(name),\n from: node\n });\n } catch (_) {\n arrayPush(DOMPurify.removed, {\n attribute: null,\n from: node\n });\n }\n\n node.removeAttribute(name);\n\n // We void attribute values for unremovable \"is\"\" attributes\n if (name === 'is' && !ALLOWED_ATTR[name]) {\n if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n try {\n _forceRemove(node);\n } catch (_) {}\n } else {\n try {\n node.setAttribute(name, '');\n } catch (_) {}\n }\n }\n };\n\n /**\n * _initDocument\n *\n * @param {String} dirty a string of dirty markup\n * @return {Document} a DOM, filled with the dirty markup\n */\n var _initDocument = function _initDocument(dirty) {\n /* Create a HTML document */\n var doc = void 0;\n var leadingWhitespace = void 0;\n\n if (FORCE_BODY) {\n dirty = '<remove></remove>' + dirty;\n } else {\n /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n var matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n leadingWhitespace = matches && matches[0];\n }\n\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml') {\n // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n dirty = '<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>' + dirty + '</body></html>';\n }\n\n var dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;\n /*\n * Use the DOMParser API by default, fallback later if needs be\n * DOMParser not work for svg when has multiple root element.\n */\n if (NAMESPACE === HTML_NAMESPACE) {\n try {\n doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n } catch (_) {}\n }\n\n /* Use createHTMLDocument in case DOMParser is not available */\n if (!doc || !doc.documentElement) {\n doc = implementation.createDocument(NAMESPACE, 'template', null);\n try {\n doc.documentElement.innerHTML = IS_EMPTY_INPUT ? '' : dirtyPayload;\n } catch (_) {\n // Syntax error if dirtyPayload is invalid xml\n }\n }\n\n var body = doc.body || doc.documentElement;\n\n if (dirty && leadingWhitespace) {\n body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n }\n\n /* Work on whole document or just its body */\n if (NAMESPACE === HTML_NAMESPACE) {\n return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n }\n\n return WHOLE_DOCUMENT ? doc.documentElement : body;\n };\n\n /**\n * _createIterator\n *\n * @param {Document} root document/fragment to create iterator for\n * @return {Iterator} iterator instance\n */\n var _createIterator = function _createIterator(root) {\n return createNodeIterator.call(root.ownerDocument || root, root, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, null, false);\n };\n\n /**\n * _isClobbered\n *\n * @param {Node} elm element to check for clobbering attacks\n * @return {Boolean} true if clobbered, false if safe\n */\n var _isClobbered = function _isClobbered(elm) {\n if (elm instanceof Text || elm instanceof Comment) {\n return false;\n }\n\n if (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function') {\n return true;\n }\n\n return false;\n };\n\n /**\n * _isNode\n *\n * @param {Node} obj object to check whether it's a DOM node\n * @return {Boolean} true is object is a DOM node\n */\n var _isNode = function _isNode(object) {\n return (typeof Node === 'undefined' ? 'undefined' : _typeof(Node)) === 'object' ? object instanceof Node : object && (typeof object === 'undefined' ? 'undefined' : _typeof(object)) === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string';\n };\n\n /**\n * _executeHook\n * Execute user configurable hooks\n *\n * @param {String} entryPoint Name of the hook's entry point\n * @param {Node} currentNode node to work on with the hook\n * @param {Object} data additional hook parameters\n */\n var _executeHook = function _executeHook(entryPoint, currentNode, data) {\n if (!hooks[entryPoint]) {\n return;\n }\n\n arrayForEach(hooks[entryPoint], function (hook) {\n hook.call(DOMPurify, currentNode, data, CONFIG);\n });\n };\n\n /**\n * _sanitizeElements\n *\n * @protect nodeName\n * @protect textContent\n * @protect removeChild\n *\n * @param {Node} currentNode to check for permission to exist\n * @return {Boolean} true if node was killed, false if left alive\n */\n var _sanitizeElements = function _sanitizeElements(currentNode) {\n var content = void 0;\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeElements', currentNode, null);\n\n /* Check if element is clobbered or can clobber */\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Check if tagname contains Unicode */\n if (stringMatch(currentNode.nodeName, /[\\u0080-\\uFFFF]/)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Now let's check the element's type and name */\n var tagName = transformCaseFunc(currentNode.nodeName);\n\n /* Execute a hook if present */\n _executeHook('uponSanitizeElement', currentNode, {\n tagName: tagName,\n allowedTags: ALLOWED_TAGS\n });\n\n /* Detect mXSS attempts abusing namespace confusion */\n if (!_isNode(currentNode.firstElementChild) && (!_isNode(currentNode.content) || !_isNode(currentNode.content.firstElementChild)) && regExpTest(/<[/\\w]/g, currentNode.innerHTML) && regExpTest(/<[/\\w]/g, currentNode.textContent)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Mitigate a problem with templates inside select */\n if (tagName === 'select' && regExpTest(/<template/i, currentNode.innerHTML)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Remove element if anything forbids its presence */\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n /* Keep content except for bad-listed elements */\n if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n var parentNode = getParentNode(currentNode) || currentNode.parentNode;\n var childNodes = getChildNodes(currentNode) || currentNode.childNodes;\n\n if (childNodes && parentNode) {\n var childCount = childNodes.length;\n\n for (var i = childCount - 1; i >= 0; --i) {\n parentNode.insertBefore(cloneNode(childNodes[i], true), getNextSibling(currentNode));\n }\n }\n }\n\n _forceRemove(currentNode);\n return true;\n }\n\n /* Check whether element has a valid namespace */\n if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n\n if ((tagName === 'noscript' || tagName === 'noembed') && regExpTest(/<\\/no(script|embed)/i, currentNode.innerHTML)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Sanitize element content to be template-safe */\n if (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) {\n /* Get the element's text content */\n content = currentNode.textContent;\n content = stringReplace(content, MUSTACHE_EXPR$$1, ' ');\n content = stringReplace(content, ERB_EXPR$$1, ' ');\n if (currentNode.textContent !== content) {\n arrayPush(DOMPurify.removed, { element: currentNode.cloneNode() });\n currentNode.textContent = content;\n }\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeElements', currentNode, null);\n\n return false;\n };\n\n /**\n * _isValidAttribute\n *\n * @param {string} lcTag Lowercase tag name of containing element.\n * @param {string} lcName Lowercase attribute name.\n * @param {string} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid, otherwise false.\n */\n // eslint-disable-next-line complexity\n var _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n /* Make sure attribute cannot clobber */\n if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {\n return false;\n }\n\n /* Allow valid data-* attributes: At least one character after \"-\"\n (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n We don't need to check the value; it's always URI safe. */\n if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR$$1, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$$1, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {\n return false;\n\n /* Check value is safe. First, is attr inert? If so, is safe */\n } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$$1, stringReplace(value, ATTR_WHITESPACE$$1, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$$1, stringReplace(value, ATTR_WHITESPACE$$1, ''))) ; else if (!value) ; else {\n return false;\n }\n\n return true;\n };\n\n /**\n * _sanitizeAttributes\n *\n * @protect attributes\n * @protect nodeName\n * @protect removeAttribute\n * @protect setAttribute\n *\n * @param {Node} currentNode to sanitize\n */\n var _sanitizeAttributes = function _sanitizeAttributes(currentNode) {\n var attr = void 0;\n var value = void 0;\n var lcName = void 0;\n var l = void 0;\n /* Execute a hook if present */\n _executeHook('beforeSanitizeAttributes', currentNode, null);\n\n var attributes = currentNode.attributes;\n\n /* Check if we have attributes; if not we might have a text node */\n\n if (!attributes) {\n return;\n }\n\n var hookEvent = {\n attrName: '',\n attrValue: '',\n keepAttr: true,\n allowedAttributes: ALLOWED_ATTR\n };\n l = attributes.length;\n\n /* Go backwards over all attributes; safely remove bad ones */\n while (l--) {\n attr = attributes[l];\n var _attr = attr,\n name = _attr.name,\n namespaceURI = _attr.namespaceURI;\n\n value = stringTrim(attr.value);\n lcName = transformCaseFunc(name);\n\n /* Execute a hook if present */\n hookEvent.attrName = lcName;\n hookEvent.attrValue = value;\n hookEvent.keepAttr = true;\n hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set\n _executeHook('uponSanitizeAttribute', currentNode, hookEvent);\n value = hookEvent.attrValue;\n /* Did the hooks approve of the attribute? */\n if (hookEvent.forceKeepAttr) {\n continue;\n }\n\n /* Remove attribute */\n _removeAttribute(name, currentNode);\n\n /* Did the hooks approve of the attribute? */\n if (!hookEvent.keepAttr) {\n continue;\n }\n\n /* Work around a security issue in jQuery 3.0 */\n if (regExpTest(/\\/>/i, value)) {\n _removeAttribute(name, currentNode);\n continue;\n }\n\n /* Sanitize attribute content to be template-safe */\n if (SAFE_FOR_TEMPLATES) {\n value = stringReplace(value, MUSTACHE_EXPR$$1, ' ');\n value = stringReplace(value, ERB_EXPR$$1, ' ');\n }\n\n /* Is `value` valid for this attribute? */\n var lcTag = transformCaseFunc(currentNode.nodeName);\n if (!_isValidAttribute(lcTag, lcName, value)) {\n continue;\n }\n\n /* Handle invalid data-* attribute set by try-catching it */\n try {\n if (namespaceURI) {\n currentNode.setAttributeNS(namespaceURI, name, value);\n } else {\n /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\n currentNode.setAttribute(name, value);\n }\n\n arrayPop(DOMPurify.removed);\n } catch (_) {}\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeAttributes', currentNode, null);\n };\n\n /**\n * _sanitizeShadowDOM\n *\n * @param {DocumentFragment} fragment to iterate over recursively\n */\n var _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {\n var shadowNode = void 0;\n var shadowIterator = _createIterator(fragment);\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeShadowDOM', fragment, null);\n\n while (shadowNode = shadowIterator.nextNode()) {\n /* Execute a hook if present */\n _executeHook('uponSanitizeShadowNode', shadowNode, null);\n\n /* Sanitize tags and elements */\n if (_sanitizeElements(shadowNode)) {\n continue;\n }\n\n /* Deep shadow DOM detected */\n if (shadowNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(shadowNode.content);\n }\n\n /* Check attributes, sanitize if necessary */\n _sanitizeAttributes(shadowNode);\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeShadowDOM', fragment, null);\n };\n\n /**\n * Sanitize\n * Public method providing core sanitation functionality\n *\n * @param {String|Node} dirty string or DOM node\n * @param {Object} configuration object\n */\n // eslint-disable-next-line complexity\n DOMPurify.sanitize = function (dirty, cfg) {\n var body = void 0;\n var importedNode = void 0;\n var currentNode = void 0;\n var oldNode = void 0;\n var returnNode = void 0;\n /* Make sure we have a string to sanitize.\n DO NOT return early, as this will return the wrong type if\n the user has requested a DOM object rather than a string */\n IS_EMPTY_INPUT = !dirty;\n if (IS_EMPTY_INPUT) {\n dirty = '<!-->';\n }\n\n /* Stringify, in case dirty is an object */\n if (typeof dirty !== 'string' && !_isNode(dirty)) {\n // eslint-disable-next-line no-negated-condition\n if (typeof dirty.toString !== 'function') {\n throw typeErrorCreate('toString is not a function');\n } else {\n dirty = dirty.toString();\n if (typeof dirty !== 'string') {\n throw typeErrorCreate('dirty is not a string, aborting');\n }\n }\n }\n\n /* Check we can run. Otherwise fall back or ignore */\n if (!DOMPurify.isSupported) {\n if (_typeof(window.toStaticHTML) === 'object' || typeof window.toStaticHTML === 'function') {\n if (typeof dirty === 'string') {\n return window.toStaticHTML(dirty);\n }\n\n if (_isNode(dirty)) {\n return window.toStaticHTML(dirty.outerHTML);\n }\n }\n\n return dirty;\n }\n\n /* Assign config vars */\n if (!SET_CONFIG) {\n _parseConfig(cfg);\n }\n\n /* Clean up removed elements */\n DOMPurify.removed = [];\n\n /* Check if dirty is correctly typed for IN_PLACE */\n if (typeof dirty === 'string') {\n IN_PLACE = false;\n }\n\n if (IN_PLACE) ; else if (dirty instanceof Node) {\n /* If dirty is a DOM element, append to an empty document to avoid\n elements being stripped by the parser */\n body = _initDocument('<!---->');\n importedNode = body.ownerDocument.importNode(dirty, true);\n if (importedNode.nodeType === 1 && importedNode.nodeName === 'BODY') {\n /* Node is already a body, use as is */\n body = importedNode;\n } else if (importedNode.nodeName === 'HTML') {\n body = importedNode;\n } else {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n body.appendChild(importedNode);\n }\n } else {\n /* Exit directly if we have nothing to do */\n if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&\n // eslint-disable-next-line unicorn/prefer-includes\n dirty.indexOf('<') === -1) {\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;\n }\n\n /* Initialize the document to work on */\n body = _initDocument(dirty);\n\n /* Check we have a DOM node from the data */\n if (!body) {\n return RETURN_DOM ? null : emptyHTML;\n }\n }\n\n /* Remove first element node (ours) if FORCE_BODY is set */\n if (body && FORCE_BODY) {\n _forceRemove(body.firstChild);\n }\n\n /* Get node iterator */\n var nodeIterator = _createIterator(IN_PLACE ? dirty : body);\n\n /* Now start iterating over the created document */\n while (currentNode = nodeIterator.nextNode()) {\n /* Fix IE's strange behavior with manipulated textNodes #89 */\n if (currentNode.nodeType === 3 && currentNode === oldNode) {\n continue;\n }\n\n /* Sanitize tags and elements */\n if (_sanitizeElements(currentNode)) {\n continue;\n }\n\n /* Shadow DOM detected, sanitize it */\n if (currentNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(currentNode.content);\n }\n\n /* Check attributes, sanitize if necessary */\n _sanitizeAttributes(currentNode);\n\n oldNode = currentNode;\n }\n\n oldNode = null;\n\n /* If we sanitized `dirty` in-place, return it. */\n if (IN_PLACE) {\n return dirty;\n }\n\n /* Return sanitized string or DOM */\n if (RETURN_DOM) {\n if (RETURN_DOM_FRAGMENT) {\n returnNode = createDocumentFragment.call(body.ownerDocument);\n\n while (body.firstChild) {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n returnNode.appendChild(body.firstChild);\n }\n } else {\n returnNode = body;\n }\n\n if (RETURN_DOM_IMPORT) {\n /*\n AdoptNode() is not used because internal state is not reset\n (e.g. the past names map of a HTMLFormElement), this is safe\n in theory but we would rather not risk another attack vector.\n The state that is cloned by importNode() is explicitly defined\n by the specs.\n */\n returnNode = importNode.call(originalDocument, returnNode, true);\n }\n\n return returnNode;\n }\n\n var serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n\n /* Sanitize final string template-safe */\n if (SAFE_FOR_TEMPLATES) {\n serializedHTML = stringReplace(serializedHTML, MUSTACHE_EXPR$$1, ' ');\n serializedHTML = stringReplace(serializedHTML, ERB_EXPR$$1, ' ');\n }\n\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;\n };\n\n /**\n * Public method to set the configuration once\n * setConfig\n *\n * @param {Object} cfg configuration object\n */\n DOMPurify.setConfig = function (cfg) {\n _parseConfig(cfg);\n SET_CONFIG = true;\n };\n\n /**\n * Public method to remove the configuration\n * clearConfig\n *\n */\n DOMPurify.clearConfig = function () {\n CONFIG = null;\n SET_CONFIG = false;\n };\n\n /**\n * Public method to check if an attribute value is valid.\n * Uses last set config, if any. Otherwise, uses config defaults.\n * isValidAttribute\n *\n * @param {string} tag Tag name of containing element.\n * @param {string} attr Attribute name.\n * @param {string} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.\n */\n DOMPurify.isValidAttribute = function (tag, attr, value) {\n /* Initialize shared config vars if necessary. */\n if (!CONFIG) {\n _parseConfig({});\n }\n\n var lcTag = transformCaseFunc(tag);\n var lcName = transformCaseFunc(attr);\n return _isValidAttribute(lcTag, lcName, value);\n };\n\n /**\n * AddHook\n * Public method to add DOMPurify hooks\n *\n * @param {String} entryPoint entry point for the hook to add\n * @param {Function} hookFunction function to execute\n */\n DOMPurify.addHook = function (entryPoint, hookFunction) {\n if (typeof hookFunction !== 'function') {\n return;\n }\n\n hooks[entryPoint] = hooks[entryPoint] || [];\n arrayPush(hooks[entryPoint], hookFunction);\n };\n\n /**\n * RemoveHook\n * Public method to remove a DOMPurify hook at a given entryPoint\n * (pops it from the stack of hooks if more are present)\n *\n * @param {String} entryPoint entry point for the hook to remove\n */\n DOMPurify.removeHook = function (entryPoint) {\n if (hooks[entryPoint]) {\n arrayPop(hooks[entryPoint]);\n }\n };\n\n /**\n * RemoveHooks\n * Public method to remove all DOMPurify hooks at a given entryPoint\n *\n * @param {String} entryPoint entry point for the hooks to remove\n */\n DOMPurify.removeHooks = function (entryPoint) {\n if (hooks[entryPoint]) {\n hooks[entryPoint] = [];\n }\n };\n\n /**\n * RemoveAllHooks\n * Public method to remove all DOMPurify hooks\n *\n */\n DOMPurify.removeAllHooks = function () {\n hooks = {};\n };\n\n return DOMPurify;\n}\n\nvar purify = createDOMPurify();\n\nvar CAN_BE_WHITE_TAG_LIST = ['iframe', 'embed'];\nvar whiteTagList = [];\nfunction registerTagWhitelistIfPossible(tagName) {\n if (includes(CAN_BE_WHITE_TAG_LIST, tagName)) {\n whiteTagList.push(tagName.toLowerCase());\n }\n}\nfunction sanitizeHTML(html, options) {\n return purify.sanitize(html, __assign$1({ ADD_TAGS: whiteTagList, ADD_ATTR: ['rel', 'target', 'hreflang', 'type'], FORBID_TAGS: [\n 'input',\n 'script',\n 'textarea',\n 'form',\n 'button',\n 'select',\n 'meta',\n 'style',\n 'link',\n 'title',\n 'object',\n 'base',\n ] }, options));\n}\n\nfunction getChildrenHTML(node, typeName) {\n return node\n .literal.replace(new RegExp(\"(<\\\\s*\" + typeName + \"[^>]*>)|(</\" + typeName + \"\\\\s*[>])\", 'ig'), '')\n .trim();\n}\nfunction getHTMLAttrsByHTMLString(html) {\n html = html.match(reHTMLTag)[0];\n var attrs = html.match(new RegExp(ATTRIBUTE$1, 'g'));\n return attrs\n ? attrs.reduce(function (acc, attr) {\n var _a = attr.trim().split('='), name = _a[0], values = _a.slice(1);\n if (values.length) {\n acc[name] = values.join('=').replace(/'|\"/g, '').trim();\n }\n return acc;\n }, {})\n : {};\n}\nfunction getHTMLAttrs(dom) {\n return toArray_1(dom.attributes).reduce(function (acc, attr) {\n acc[attr.nodeName] = attr.nodeValue;\n return acc;\n }, {});\n}\nfunction sanitizeDOM(node, typeName, sanitizer, wwToDOMAdaptor) {\n var dom = wwToDOMAdaptor.getToDOMNode(typeName)(node);\n var html = sanitizer(dom.outerHTML);\n var container = document.createElement('div');\n container.innerHTML = html;\n dom = container.firstChild;\n var htmlAttrs = getHTMLAttrs(dom);\n return { dom: dom, htmlAttrs: htmlAttrs };\n}\nvar schemaFactory = {\n htmlBlock: function (typeName, sanitizeHTML, wwToDOMAdaptor) {\n return {\n atom: true,\n content: 'block+',\n group: 'block',\n attrs: {\n htmlAttrs: { default: {} },\n childrenHTML: { default: '' },\n htmlBlock: { default: true },\n },\n parseDOM: [\n {\n tag: typeName,\n getAttrs: function (dom) {\n return {\n htmlAttrs: getHTMLAttrs(dom),\n childrenHTML: dom.innerHTML,\n };\n },\n },\n ],\n toDOM: function (node) {\n var _a = sanitizeDOM(node, typeName, sanitizeHTML, wwToDOMAdaptor), dom = _a.dom, htmlAttrs = _a.htmlAttrs;\n htmlAttrs.class = htmlAttrs.class ? htmlAttrs.class + \" html-block\" : 'html-block';\n return __spreadArray$1([typeName, htmlAttrs], toArray_1(dom.childNodes));\n },\n };\n },\n htmlInline: function (typeName, sanitizeHTML, wwToDOMAdaptor) {\n return {\n attrs: {\n htmlAttrs: { default: {} },\n htmlInline: { default: true },\n },\n parseDOM: [\n {\n tag: typeName,\n getAttrs: function (dom) {\n return {\n htmlAttrs: getHTMLAttrs(dom),\n };\n },\n },\n ],\n toDOM: function (node) {\n var htmlAttrs = sanitizeDOM(node, typeName, sanitizeHTML, wwToDOMAdaptor).htmlAttrs;\n return [typeName, htmlAttrs, 0];\n },\n };\n },\n};\nfunction createHTMLSchemaMap(convertorMap, sanitizeHTML, wwToDOMAdaptor) {\n var htmlSchemaMap = { nodes: {}, marks: {} };\n ['htmlBlock', 'htmlInline'].forEach(function (htmlType) {\n if (convertorMap[htmlType]) {\n Object.keys(convertorMap[htmlType]).forEach(function (type) {\n var targetType = htmlType === 'htmlBlock' ? 'nodes' : 'marks';\n // register tag white list for preventing to remove the html in sanitizer\n registerTagWhitelistIfPossible(type);\n htmlSchemaMap[targetType][type] = schemaFactory[htmlType](type, sanitizeHTML, wwToDOMAdaptor);\n });\n }\n });\n return htmlSchemaMap;\n}\n\nvar reCloseTag = /^\\s*<\\s*\\//;\nvar baseConvertors = {\n paragraph: function (_, _a) {\n var entering = _a.entering, origin = _a.origin, options = _a.options;\n if (options.nodeId) {\n return {\n type: entering ? 'openTag' : 'closeTag',\n outerNewLine: true,\n tagName: 'p',\n };\n }\n return origin();\n },\n softbreak: function (node) {\n var isPrevNodeHTML = node.prev && node.prev.type === 'htmlInline';\n var isPrevBR = isPrevNodeHTML && /<br ?\\/?>/.test(node.prev.literal);\n var content = isPrevBR ? '\\n' : '<br>\\n';\n return { type: 'html', content: content };\n },\n item: function (node, _a) {\n var entering = _a.entering;\n if (entering) {\n var attributes = {};\n var classNames = [];\n if (node.listData.task) {\n attributes['data-task'] = '';\n classNames.push('task-list-item');\n if (node.listData.checked) {\n classNames.push('checked');\n attributes['data-task-checked'] = '';\n }\n }\n return {\n type: 'openTag',\n tagName: 'li',\n classNames: classNames,\n attributes: attributes,\n outerNewLine: true,\n };\n }\n return {\n type: 'closeTag',\n tagName: 'li',\n outerNewLine: true,\n };\n },\n code: function (node) {\n var attributes = { 'data-backticks': String(node.tickCount) };\n return [\n { type: 'openTag', tagName: 'code', attributes: attributes },\n { type: 'text', content: node.literal },\n { type: 'closeTag', tagName: 'code' },\n ];\n },\n codeBlock: function (node) {\n var _a = node, fenceLength = _a.fenceLength, info = _a.info;\n var infoWords = info ? info.split(/\\s+/) : [];\n var preClasses = [];\n var codeAttrs = {};\n if (fenceLength > 3) {\n codeAttrs['data-backticks'] = fenceLength;\n }\n if (infoWords.length > 0 && infoWords[0].length > 0) {\n var lang = infoWords[0];\n preClasses.push(\"lang-\" + lang);\n codeAttrs['data-language'] = lang;\n }\n return [\n { type: 'openTag', tagName: 'pre', classNames: preClasses },\n { type: 'openTag', tagName: 'code', attributes: codeAttrs },\n { type: 'text', content: node.literal },\n { type: 'closeTag', tagName: 'code' },\n { type: 'closeTag', tagName: 'pre' },\n ];\n },\n customInline: function (node, _a) {\n var origin = _a.origin, entering = _a.entering, skipChildren = _a.skipChildren;\n var info = node.info;\n if (info.indexOf('widget') !== -1 && entering) {\n skipChildren();\n var content = getWidgetContent(node);\n var htmlInline = widgetToDOM(info, content).outerHTML;\n return [\n { type: 'openTag', tagName: 'span', classNames: ['tui-widget'] },\n { type: 'html', content: htmlInline },\n { type: 'closeTag', tagName: 'span' },\n ];\n }\n return origin();\n },\n};\nfunction getHTMLRenderConvertors(linkAttributes, customConvertors) {\n var convertors = __assign$1({}, baseConvertors);\n if (linkAttributes) {\n convertors.link = function (_, _a) {\n var entering = _a.entering, origin = _a.origin;\n var result = origin();\n if (entering) {\n result.attributes = __assign$1(__assign$1({}, result.attributes), linkAttributes);\n }\n return result;\n };\n }\n if (customConvertors) {\n Object.keys(customConvertors).forEach(function (nodeType) {\n var orgConvertor = convertors[nodeType];\n var customConvertor = customConvertors[nodeType];\n if (orgConvertor && isFunction_1(customConvertor)) {\n convertors[nodeType] = function (node, context) {\n var newContext = __assign$1({}, context);\n newContext.origin = function () { return orgConvertor(node, context); };\n return customConvertor(node, newContext);\n };\n }\n else if (includes(['htmlBlock', 'htmlInline'], nodeType) && !isFunction_1(customConvertor)) {\n convertors[nodeType] = function (node, context) {\n var matched = node.literal.match(reHTMLTag);\n if (matched) {\n var rootHTML = matched[0], openTagName = matched[1], closeTagName = matched[3];\n var typeName = (openTagName || closeTagName).toLowerCase();\n var htmlConvertor = customConvertor[typeName];\n var childrenHTML = getChildrenHTML(node, typeName);\n if (htmlConvertor) {\n // copy for preventing to overwrite the originial property\n var newNode = __assign$1({}, node);\n newNode.attrs = getHTMLAttrsByHTMLString(rootHTML);\n newNode.childrenHTML = childrenHTML;\n newNode.type = typeName;\n context.entering = !reCloseTag.test(node.literal);\n return htmlConvertor(newNode, context);\n }\n }\n return context.origin();\n };\n }\n else {\n convertors[nodeType] = customConvertor;\n }\n });\n }\n return convertors;\n}\n\nvar nestableTypes = ['list', 'item', 'blockQuote'];\nvar nestableTagNames = ['UL', 'OL', 'BLOCKQUOTE'];\nfunction isBlankLine(doc, index) {\n var _a;\n var pmNode = doc.child(index);\n return !pmNode.childCount || (pmNode.childCount === 1 && !((_a = pmNode.firstChild.text) === null || _a === void 0 ? void 0 : _a.trim()));\n}\nfunction getEditorRangeHeightInfo(doc, mdNode, children) {\n var start = getMdStartLine(mdNode) - 1;\n var end = getMdEndLine(mdNode) - 1;\n var rect = children[start].getBoundingClientRect();\n var height = children[end].offsetTop -\n children[start].offsetTop +\n children[end].clientHeight;\n return {\n height: height <= 0\n ? children[start].clientHeight\n : height + getBlankLinesHeight(doc, children, Math.min(end + 1, doc.childCount - 1)),\n rect: rect,\n };\n}\nfunction getBlankLinesHeight(doc, children, start) {\n var end = doc.childCount - 1;\n var height = 0;\n while (start <= end && isBlankLine(doc, start)) {\n height += children[start].clientHeight;\n start += 1;\n }\n return height;\n}\nfunction findAncestorHavingId(el, root) {\n while (!el.getAttribute('data-nodeid') && el.parentElement !== root) {\n el = el.parentElement;\n }\n return el;\n}\nfunction getTotalOffsetTop(el, root) {\n var offsetTop = 0;\n while (el && el !== root) {\n if (!includes(nestableTagNames, el.tagName)) {\n offsetTop += el.offsetTop;\n }\n if (el.offsetParent === root.offsetParent) {\n break;\n }\n el = el.parentElement;\n }\n return offsetTop;\n}\nfunction findAdjacentElementToScrollTop(scrollTop, root) {\n var el = root;\n var prev = null;\n while (el) {\n var firstElementChild = el.firstElementChild;\n if (!firstElementChild) {\n break;\n }\n var lastSibling = findLastSiblingElementToScrollTop(firstElementChild, scrollTop, getTotalOffsetTop(el, root));\n prev = el;\n el = lastSibling;\n }\n var adjacentEl = el || prev;\n return adjacentEl === root ? null : adjacentEl;\n}\nfunction findLastSiblingElementToScrollTop(el, scrollTop, offsetTop) {\n if (el && scrollTop > offsetTop + el.offsetTop) {\n return (findLastSiblingElementToScrollTop(el.nextElementSibling, scrollTop, offsetTop) || el);\n }\n return null;\n}\nfunction getAdditionalPos(scrollTop, offsetTop, height, targetNodeHeight) {\n var ratio = Math.min((scrollTop - offsetTop) / height, 1);\n return ratio * targetNodeHeight;\n}\nfunction getParentNodeObj(previewContent, mdNode) {\n var el = previewContent.querySelector(\"[data-nodeid=\\\"\" + mdNode.id + \"\\\"]\");\n while (!el || isStyledInlineNode(mdNode)) {\n mdNode = mdNode.parent;\n el = previewContent.querySelector(\"[data-nodeid=\\\"\" + mdNode.id + \"\\\"]\");\n }\n return getNonNestableNodeObj({ mdNode: mdNode, el: el });\n}\nfunction getNonNestableNodeObj(_a) {\n var mdNode = _a.mdNode, el = _a.el;\n while ((includes(nestableTypes, mdNode.type) || mdNode.type === 'table') && mdNode.firstChild) {\n mdNode = mdNode.firstChild;\n el = el.firstElementChild;\n }\n return { mdNode: mdNode, el: el };\n}\n\nvar offsetInfoMap = {};\nfunction setHeight(id, height) {\n offsetInfoMap[id] = offsetInfoMap[id] || {};\n offsetInfoMap[id].height = height;\n}\nfunction setOffsetTop(id, offsetTop) {\n offsetInfoMap[id] = offsetInfoMap[id] || {};\n offsetInfoMap[id].offsetTop = offsetTop;\n}\nfunction getHeight(id) {\n return offsetInfoMap[id] && offsetInfoMap[id].height;\n}\nfunction getOffsetTop(id) {\n return offsetInfoMap[id] && offsetInfoMap[id].offsetTop;\n}\nfunction removeOffsetInfoByNode(node) {\n if (node) {\n delete offsetInfoMap[Number(node.getAttribute('data-nodeid'))];\n toArray_1(node.children).forEach(function (child) {\n removeOffsetInfoByNode(child);\n });\n }\n}\nfunction getAndSaveOffsetInfo(node, root, mdNodeId) {\n var cachedHeight = getHeight(mdNodeId);\n var cachedTop = getOffsetTop(mdNodeId);\n var nodeHeight = cachedHeight || node.clientHeight;\n var offsetTop = cachedTop || getTotalOffsetTop(node, root) || node.offsetTop;\n if (!cachedHeight) {\n setHeight(mdNodeId, nodeHeight);\n }\n if (!cachedTop) {\n setOffsetTop(mdNodeId, offsetTop);\n }\n return { nodeHeight: nodeHeight, offsetTop: offsetTop };\n}\n\nvar CLASS_HIGHLIGHT = cls('md-preview-highlight');\nfunction findTableCell(tableRow, chOffset) {\n var cell = tableRow.firstChild;\n while (cell && cell.next) {\n if (getMdStartCh(cell.next) > chOffset + 1) {\n break;\n }\n cell = cell.next;\n }\n return cell;\n}\n/**\n * Class Markdown Preview\n * @param {HTMLElement} el - base element\n * @param {eventEmitter} eventEmitter - event manager\n * @param {object} options\n * @param {boolean} options.isViewer - true for view-only mode\n * @param {boolean} options.highlight - true for using live-highlight feature\n * @param {object} opitons.linkAttributes - attributes for link element\n * @param {object} opitons.customHTMLRenderer - map of custom HTML render functions\n *\n * @ignore\n */\nvar MarkdownPreview = /** @class */ (function () {\n function MarkdownPreview(eventEmitter, options) {\n var el = document.createElement('div');\n this.el = el;\n this.eventEmitter = eventEmitter;\n this.isViewer = !!options.isViewer;\n this.el.className = cls('md-preview');\n var linkAttributes = options.linkAttributes, customHTMLRenderer = options.customHTMLRenderer, sanitizer = options.sanitizer, _a = options.highlight, highlight = _a === void 0 ? false : _a;\n this.renderer = new Renderer({\n gfm: true,\n nodeId: true,\n convertors: getHTMLRenderConvertors(linkAttributes, customHTMLRenderer),\n });\n this.cursorNodeId = null;\n this.sanitizer = sanitizer;\n this.initEvent(highlight);\n this.initContentSection();\n // To prevent overflowing contents in the viewer\n if (this.isViewer) {\n this.previewContent.style.overflowWrap = 'break-word';\n }\n }\n MarkdownPreview.prototype.initContentSection = function () {\n this.previewContent = createElementWith(\"<div class=\\\"\" + cls('contents') + \"\\\"></div>\");\n if (!this.isViewer) {\n this.el.appendChild(this.previewContent);\n }\n };\n MarkdownPreview.prototype.toggleActive = function (active) {\n toggleClass(this.el, 'active', active);\n };\n MarkdownPreview.prototype.initEvent = function (highlight) {\n var _this = this;\n this.eventEmitter.listen('updatePreview', this.update.bind(this));\n if (this.isViewer) {\n return;\n }\n if (highlight) {\n this.eventEmitter.listen('changeToolbarState', function (_a) {\n var mdNode = _a.mdNode, cursorPos = _a.cursorPos;\n _this.updateCursorNode(mdNode, cursorPos);\n });\n this.eventEmitter.listen('blur', function () {\n _this.removeHighlight();\n });\n }\n on_1(this.el, 'scroll', function (event) {\n _this.eventEmitter.emit('scroll', 'preview', findAdjacentElementToScrollTop(event.target.scrollTop, _this.previewContent));\n });\n this.eventEmitter.listen('changePreviewTabPreview', function () { return _this.toggleActive(true); });\n this.eventEmitter.listen('changePreviewTabWrite', function () { return _this.toggleActive(false); });\n };\n MarkdownPreview.prototype.removeHighlight = function () {\n if (this.cursorNodeId) {\n var currentEl = this.getElementByNodeId(this.cursorNodeId);\n if (currentEl) {\n removeClass_1(currentEl, CLASS_HIGHLIGHT);\n }\n }\n };\n MarkdownPreview.prototype.updateCursorNode = function (cursorNode, cursorPos) {\n if (cursorNode) {\n cursorNode = findClosestNode(cursorNode, function (mdNode) { return !isInlineNode$1(mdNode); });\n if (cursorNode.type === 'tableRow') {\n cursorNode = findTableCell(cursorNode, cursorPos[1]);\n }\n else if (cursorNode.type === 'tableBody') {\n // empty line next to table\n cursorNode = null;\n }\n }\n var cursorNodeId = cursorNode ? cursorNode.id : null;\n if (this.cursorNodeId === cursorNodeId) {\n return;\n }\n var oldEL = this.getElementByNodeId(this.cursorNodeId);\n var newEL = this.getElementByNodeId(cursorNodeId);\n if (oldEL) {\n removeClass_1(oldEL, CLASS_HIGHLIGHT);\n }\n if (newEL) {\n addClass_1(newEL, CLASS_HIGHLIGHT);\n }\n this.cursorNodeId = cursorNodeId;\n };\n MarkdownPreview.prototype.getElementByNodeId = function (nodeId) {\n return nodeId\n ? this.previewContent.querySelector(\"[data-nodeid=\\\"\" + nodeId + \"\\\"]\")\n : null;\n };\n MarkdownPreview.prototype.update = function (changed) {\n var _this = this;\n changed.forEach(function (editResult) { return _this.replaceRangeNodes(editResult); });\n this.eventEmitter.emit('afterPreviewRender', this);\n };\n MarkdownPreview.prototype.replaceRangeNodes = function (editResult) {\n var _this = this;\n var nodes = editResult.nodes, removedNodeRange = editResult.removedNodeRange;\n var contentEl = this.previewContent;\n var newHtml = this.eventEmitter.emitReduce('beforePreviewRender', this.sanitizer(nodes.map(function (node) { return _this.renderer.render(node); }).join('')));\n if (!removedNodeRange) {\n contentEl.insertAdjacentHTML('afterbegin', newHtml);\n }\n else {\n var _a = removedNodeRange.id, startNodeId = _a[0], endNodeId = _a[1];\n var startEl = this.getElementByNodeId(startNodeId);\n var endEl = this.getElementByNodeId(endNodeId);\n if (startEl) {\n startEl.insertAdjacentHTML('beforebegin', newHtml);\n var el = startEl;\n while (el && el !== endEl) {\n var nextEl = el.nextElementSibling;\n removeNode$1(el);\n removeOffsetInfoByNode(el);\n el = nextEl;\n }\n if (el === null || el === void 0 ? void 0 : el.parentNode) {\n removeNode$1(el);\n removeOffsetInfoByNode(el);\n }\n }\n }\n };\n MarkdownPreview.prototype.getRenderer = function () {\n return this.renderer;\n };\n MarkdownPreview.prototype.destroy = function () {\n off_1(this.el, 'scroll');\n this.el = null;\n };\n MarkdownPreview.prototype.getElement = function () {\n return this.el;\n };\n MarkdownPreview.prototype.getHTML = function () {\n return removeProseMirrorHackNodes(this.previewContent.innerHTML);\n };\n MarkdownPreview.prototype.setHTML = function (html) {\n this.previewContent.innerHTML = html;\n };\n MarkdownPreview.prototype.setHeight = function (height) {\n css_1(this.el, { height: height + \"px\" });\n };\n MarkdownPreview.prototype.setMinHeight = function (minHeight) {\n css_1(this.el, { minHeight: minHeight + \"px\" });\n };\n return MarkdownPreview;\n}());\n\nfunction findNodeBy(pos, condition) {\n var depth = pos.depth;\n while (depth) {\n var node = pos.node(depth);\n if (condition(node, depth)) {\n return {\n node: node,\n depth: depth,\n offset: depth > 0 ? pos.before(depth) : 0,\n };\n }\n depth -= 1;\n }\n return null;\n}\nfunction isInListNode(pos) {\n return !!findNodeBy(pos, function (_a) {\n var type = _a.type;\n return type.name === 'listItem' || type.name === 'bulletList' || type.name === 'orderedList';\n });\n}\nfunction isInTableNode(pos) {\n return !!findNodeBy(pos, function (_a) {\n var type = _a.type;\n return type.name === 'tableHeadCell' || type.name === 'tableBodyCell';\n });\n}\nfunction findListItem(pos) {\n return findNodeBy(pos, function (_a) {\n var type = _a.type;\n return type.name === 'listItem';\n });\n}\nfunction createDOMInfoParsedRawHTML(tag) {\n return {\n tag: tag,\n getAttrs: function (dom) {\n var rawHTML = dom.getAttribute('data-raw-html');\n return __assign$1({}, (rawHTML && { rawHTML: rawHTML }));\n },\n };\n}\nfunction createCellAttrs(attrs) {\n return Object.keys(attrs).reduce(function (acc, attrName) {\n if (attrName !== 'rawHTML' && attrs[attrName]) {\n attrName = attrName === 'className' ? 'class' : attrName;\n acc[attrName] = attrs[attrName];\n }\n return acc;\n }, {});\n}\nfunction createParsedCellDOM(tag) {\n return {\n tag: tag,\n getAttrs: function (dom) {\n return ['rawHTML', 'colspan', 'rowspan', 'extended'].reduce(function (acc, attrName) {\n var attrNameInDOM = attrName === 'rawHTML' ? 'data-raw-html' : attrName;\n var attrValue = dom.getAttribute(attrNameInDOM);\n if (attrValue) {\n acc[attrName] = includes(['rawHTML', 'extended'], attrName)\n ? attrValue\n : Number(attrValue);\n }\n return acc;\n }, {});\n },\n };\n}\nfunction getDefaultCustomAttrs() {\n return {\n htmlAttrs: { default: null },\n classNames: { default: null },\n };\n}\nfunction getCustomAttrs(attrs) {\n var htmlAttrs = attrs.htmlAttrs, classNames = attrs.classNames;\n return __assign$1(__assign$1({}, htmlAttrs), { class: classNames ? classNames.join(' ') : null });\n}\n\nfunction findWrappingOutside(range, type) {\n var parent = range.parent, startIndex = range.startIndex, endIndex = range.endIndex;\n var around = parent.contentMatchAt(startIndex).findWrapping(type);\n if (around) {\n var outer = around.length ? around[0] : type;\n return parent.canReplaceWith(startIndex, endIndex, outer) ? around : null;\n }\n return null;\n}\nfunction findWrappingInside(range, type) {\n var parent = range.parent, startIndex = range.startIndex, endIndex = range.endIndex;\n var inner = parent.child(startIndex);\n var inside = type.contentMatch.findWrapping(inner.type);\n if (inside) {\n var lastType = inside.length ? inside[inside.length - 1] : type;\n var innerMatch = lastType.contentMatch;\n for (var i = startIndex; innerMatch && i < endIndex; i += 1) {\n innerMatch = innerMatch.matchType(parent.child(i).type);\n }\n if (innerMatch && innerMatch.validEnd) {\n return inside;\n }\n }\n return null;\n}\nfunction findWrappers(range, innerRange, nodeType, attrs) {\n var around = findWrappingOutside(range, nodeType);\n var inner = findWrappingInside(innerRange, nodeType);\n if (around && inner) {\n var aroundNodes = around.map(function (type) {\n return { type: type };\n });\n var innerNodes = inner.map(function (type) {\n return { type: type, attrs: attrs };\n });\n return aroundNodes.concat({ type: nodeType }).concat(innerNodes);\n }\n return null;\n}\nfunction wrapInList(tr, _a, wrappers, joinBefore, list) {\n var start = _a.start, end = _a.end, startIndex = _a.startIndex, endIndex = _a.endIndex, parent = _a.parent;\n var content = Fragment.empty;\n for (var i = wrappers.length - 1; i >= 0; i -= 1) {\n content = Fragment.from(wrappers[i].type.create(wrappers[i].attrs, content));\n }\n tr.step(new ReplaceAroundStep(start - (joinBefore ? 2 : 0), end, start, end, new Slice(content, 0, 0), wrappers.length, true));\n var foundListIndex = 0;\n for (var i = 0; i < wrappers.length; i += 1) {\n if (wrappers[i].type === list) {\n foundListIndex = i + 1;\n break;\n }\n }\n var splitDepth = wrappers.length - foundListIndex;\n var splitPos = start + wrappers.length - (joinBefore ? 2 : 0);\n for (var i = startIndex, len = endIndex; i < len; i += 1) {\n var first = i === startIndex;\n if (!first && canSplit(tr.doc, splitPos, splitDepth)) {\n tr.split(splitPos, splitDepth);\n splitPos += splitDepth * 2;\n }\n splitPos += parent.child(i).nodeSize;\n }\n return tr;\n}\nfunction changeToList(tr, range, list, attrs) {\n var $from = range.$from, $to = range.$to, depth = range.depth;\n var outerRange = range;\n var joinBefore = false;\n if (depth >= 2 &&\n $from.node(depth - 1).type.compatibleContent(list) &&\n range.startIndex === 0 &&\n $from.index(depth - 1)) {\n var start = tr.doc.resolve(range.start - 2);\n outerRange = new NodeRange(start, start, depth);\n if (range.endIndex < range.parent.childCount) {\n range = new NodeRange($from, tr.doc.resolve($to.end(depth)), depth);\n }\n joinBefore = true;\n }\n var wrappers = findWrappers(outerRange, range, list, attrs);\n if (wrappers) {\n return wrapInList(tr, range, wrappers, joinBefore, list);\n }\n return tr;\n}\nfunction getBeforeLineListItem(doc, offset) {\n var endListItemPos = doc.resolve(offset);\n while (endListItemPos.node().type.name !== 'paragraph') {\n offset -= 2; // The position value of </li></ul>\n endListItemPos = doc.resolve(offset);\n }\n return findListItem(endListItemPos);\n}\nfunction toggleTaskListItems(tr, _a) {\n var $from = _a.$from, $to = _a.$to;\n var startListItem = findListItem($from);\n var endListItem = findListItem($to);\n if (startListItem && endListItem) {\n while (endListItem) {\n var offset = endListItem.offset, node = endListItem.node;\n var attrs = { task: !node.attrs.task, checked: false };\n tr.setNodeMarkup(offset, null, attrs);\n if (offset === startListItem.offset) {\n break;\n }\n endListItem = getBeforeLineListItem(tr.doc, offset);\n }\n }\n return tr;\n}\nfunction changeListType(tr, _a, list) {\n var $from = _a.$from, $to = _a.$to;\n var startListItem = findListItem($from);\n var endListItem = findListItem($to);\n if (startListItem && endListItem) {\n while (endListItem) {\n var offset = endListItem.offset, node = endListItem.node, depth = endListItem.depth;\n if (node.attrs.task) {\n tr.setNodeMarkup(offset, null, { task: false, checked: false });\n }\n var resolvedPos = tr.doc.resolve(offset);\n if (resolvedPos.parent.type !== list) {\n var parentOffset = resolvedPos.before(depth - 1);\n tr.setNodeMarkup(parentOffset, list);\n }\n if (offset === startListItem.offset) {\n break;\n }\n endListItem = getBeforeLineListItem(tr.doc, offset);\n }\n }\n return tr;\n}\nfunction changeList(list) {\n return function (_a, dispatch) {\n var selection = _a.selection, tr = _a.tr;\n var $from = selection.$from, $to = selection.$to;\n var range = $from.blockRange($to);\n if (range) {\n var newTr = isInListNode($from)\n ? changeListType(tr, range, list)\n : changeToList(tr, range, list);\n dispatch(newTr);\n return true;\n }\n return false;\n };\n}\nfunction toggleTask() {\n return function (_a, dispatch) {\n var selection = _a.selection, tr = _a.tr, schema = _a.schema;\n var $from = selection.$from, $to = selection.$to;\n var range = $from.blockRange($to);\n if (range) {\n var newTr = isInListNode($from)\n ? toggleTaskListItems(tr, range)\n : changeToList(tr, range, schema.nodes.bulletList, { task: true });\n dispatch(newTr);\n return true;\n }\n return false;\n };\n}\nfunction sinkListItem(listItem) {\n return function (_a, dispatch) {\n var tr = _a.tr, selection = _a.selection;\n var $from = selection.$from, $to = selection.$to;\n var range = $from.blockRange($to, function (_a) {\n var childCount = _a.childCount, firstChild = _a.firstChild;\n return !!childCount && firstChild.type === listItem;\n });\n if (range && range.startIndex > 0) {\n var parent_1 = range.parent;\n var nodeBefore = parent_1.child(range.startIndex - 1);\n if (nodeBefore.type !== listItem) {\n return false;\n }\n var nestedBefore = nodeBefore.lastChild && nodeBefore.lastChild.type === parent_1.type;\n var inner = nestedBefore ? Fragment.from(listItem.create()) : null;\n var slice = new Slice(Fragment.from(listItem.create(null, Fragment.from(parent_1.type.create(null, inner)))), nestedBefore ? 3 : 1, 0);\n var before = range.start;\n var after = range.end;\n tr.step(new ReplaceAroundStep(before - (nestedBefore ? 3 : 1), after, before, after, slice, 1, true));\n dispatch(tr);\n return true;\n }\n return false;\n };\n}\nfunction liftToOuterList(tr, range, listItem) {\n var $from = range.$from, $to = range.$to, end = range.end, depth = range.depth, parent = range.parent;\n var endOfList = $to.end(depth);\n if (end < endOfList) {\n // There are siblings after the lifted items, which must become\n // children of the last item\n tr.step(new ReplaceAroundStep(end - 1, endOfList, end, endOfList, new Slice(Fragment.from(listItem.create(null, parent.copy())), 1, 0), 1, true));\n range = new NodeRange(tr.doc.resolve($from.pos), tr.doc.resolve(endOfList), depth);\n }\n tr.lift(range, liftTarget(range));\n return tr;\n}\nfunction liftOutOfList(tr, range) {\n var list = range.parent;\n var pos = range.end;\n // Merge the list items into a single big item\n for (var i = range.endIndex - 1, len = range.startIndex; i > len; i -= 1) {\n pos -= list.child(i).nodeSize;\n tr.delete(pos - 1, pos + 1);\n }\n var startPos = tr.doc.resolve(range.start);\n var listItem = startPos.nodeAfter;\n var atStart = range.startIndex === 0;\n var atEnd = range.endIndex === list.childCount;\n var parent = startPos.node(-1);\n var indexBefore = startPos.index(-1);\n var canReplaceParent = parent.canReplace(indexBefore + (atStart ? 0 : 1), indexBefore + 1, listItem === null || listItem === void 0 ? void 0 : listItem.content.append(atEnd ? Fragment.empty : Fragment.from(list)));\n if (listItem && canReplaceParent) {\n var start = startPos.pos;\n var end = start + listItem.nodeSize;\n // Strip off the surrounding list. At the sides where we're not at\n // the end of the list, the existing list is closed. At sides where\n // this is the end, it is overwritten to its end.\n tr.step(new ReplaceAroundStep(start - (atStart ? 1 : 0), end + (atEnd ? 1 : 0), start + 1, end - 1, new Slice((atStart ? Fragment.empty : Fragment.from(list.copy(Fragment.empty))).append(atEnd ? Fragment.empty : Fragment.from(list.copy(Fragment.empty))), atStart ? 0 : 1, atEnd ? 0 : 1), atStart ? 0 : 1));\n }\n return tr;\n}\nfunction liftListItem(listItem) {\n return function (_a, dispatch) {\n var tr = _a.tr, selection = _a.selection;\n var $from = selection.$from, $to = selection.$to;\n var range = $from.blockRange($to, function (_a) {\n var childCount = _a.childCount, firstChild = _a.firstChild;\n return !!childCount && firstChild.type === listItem;\n });\n if (range) {\n var topListItem = $from.node(range.depth - 1).type === listItem;\n var newTr = topListItem ? liftToOuterList(tr, range, listItem) : liftOutOfList(tr, range);\n dispatch(newTr);\n return true;\n }\n return false;\n };\n}\nfunction splitListItem(listItem) {\n return function (_a, dispatch) {\n var tr = _a.tr, selection = _a.selection;\n var $from = selection.$from, $to = selection.$to;\n if ($from.depth < 2 || !$from.sameParent($to)) {\n return false;\n }\n var grandParent = $from.node(-1);\n if (grandParent.type !== listItem) {\n return false;\n }\n if ($from.parent.content.size === 0 && $from.node(-1).childCount === $from.indexAfter(-1)) {\n // In an empty block. If this is a nested list, the wrapping\n // list item should be split. Otherwise, bail out and let next\n // command handle lifting.\n if ($from.depth === 2 ||\n $from.node(-3).type !== listItem ||\n $from.index(-2) !== $from.node(-2).childCount - 1) {\n return false;\n }\n var keepItem = $from.index(-1) > 0;\n var wrapper = Fragment.empty;\n // Build a fragment containing empty versions of the structure\n // from the outer list item to the parent node of the cursor\n for (var depth = $from.depth - (keepItem ? 1 : 2); depth >= $from.depth - 3; depth -= 1) {\n wrapper = Fragment.from($from.node(depth).copy(wrapper));\n }\n // Add a second list item with an empty default start node\n wrapper = wrapper.append(Fragment.from(listItem.createAndFill()));\n tr.replace(keepItem ? $from.before() : $from.before(-1), $from.after(-3), new Slice(wrapper, keepItem ? 3 : 2, 2));\n tr.setSelection(Selection.near(tr.doc.resolve($from.pos + (keepItem ? 3 : 2))));\n dispatch(tr);\n return true;\n }\n var nextType = $to.pos === $from.end() ? grandParent.contentMatchAt(0).defaultType : null;\n var types = nextType && [null, { type: nextType }];\n tr.delete($from.pos, $to.pos);\n if (canSplit(tr.doc, $from.pos, 2, types)) {\n tr.split($from.pos, 2, types);\n dispatch(tr);\n return true;\n }\n return false;\n };\n}\n\nfunction indent() {\n return function () { return function (state, dispatch) {\n var selection = state.selection, schema = state.schema;\n var $from = selection.$from, $to = selection.$to;\n var range = $from.blockRange($to);\n if (range && isInListNode($from)) {\n return sinkListItem(schema.nodes.listItem)(state, dispatch);\n }\n return false;\n }; };\n}\nfunction outdent() {\n return function () { return function (state, dispatch) {\n var selection = state.selection, schema = state.schema;\n var $from = selection.$from, $to = selection.$to;\n var range = $from.blockRange($to);\n if (range && isInListNode($from)) {\n return liftListItem(schema.nodes.listItem)(state, dispatch);\n }\n return false;\n }; };\n}\nfunction getWwCommands() {\n return {\n indent: indent(),\n outdent: outdent(),\n };\n}\n\nvar cache = new Map();\n/* eslint-disable @typescript-eslint/no-unused-vars */\nvar TableOffsetMap = /** @class */ (function () {\n function TableOffsetMap(table, tableRows, tableStartPos, rowInfo) {\n this.table = table;\n this.tableRows = tableRows;\n this.tableStartPos = tableStartPos;\n this.rowInfo = rowInfo;\n }\n TableOffsetMap.create = function (cellPos) {\n var table = findNodeBy(cellPos, function (_a) {\n var type = _a.type;\n return type.name === 'table';\n });\n if (table) {\n var node = table.node, depth = table.depth, offset = table.offset;\n var cached = cache.get(node);\n if ((cached === null || cached === void 0 ? void 0 : cached.tableStartPos) === offset + 1) {\n return cached;\n }\n var rows_1 = [];\n var tablePos = cellPos.start(depth);\n var thead = node.child(0);\n var tbody = node.child(1);\n var theadCellInfo = createOffsetMap(thead, tablePos);\n var tbodyCellInfo = createOffsetMap(tbody, tablePos + thead.nodeSize);\n thead.forEach(function (row) { return rows_1.push(row); });\n tbody.forEach(function (row) { return rows_1.push(row); });\n var map = new TableOffsetMap(node, rows_1, tablePos, theadCellInfo.concat(tbodyCellInfo));\n cache.set(node, map);\n return map;\n }\n return null;\n };\n Object.defineProperty(TableOffsetMap.prototype, \"totalRowCount\", {\n get: function () {\n return this.rowInfo.length;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TableOffsetMap.prototype, \"totalColumnCount\", {\n get: function () {\n return this.rowInfo[0].length;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TableOffsetMap.prototype, \"tableStartOffset\", {\n get: function () {\n return this.tableStartPos;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TableOffsetMap.prototype, \"tableEndOffset\", {\n get: function () {\n return this.tableStartPos + this.table.nodeSize - 1;\n },\n enumerable: false,\n configurable: true\n });\n TableOffsetMap.prototype.getCellInfo = function (rowIdx, colIdx) {\n return this.rowInfo[rowIdx][colIdx];\n };\n TableOffsetMap.prototype.posAt = function (rowIdx, colIdx) {\n for (var i = 0, rowStart = this.tableStartPos;; i += 1) {\n var rowEnd = rowStart + this.tableRows[i].nodeSize;\n if (i === rowIdx) {\n var index = colIdx;\n // Skip the cells from previous row(via rowspan)\n while (index < this.totalColumnCount && this.rowInfo[i][index].offset < rowStart) {\n index += 1;\n }\n return index === this.totalColumnCount ? rowEnd : this.rowInfo[i][index].offset;\n }\n rowStart = rowEnd;\n }\n };\n TableOffsetMap.prototype.getNodeAndPos = function (rowIdx, colIdx) {\n var cellInfo = this.rowInfo[rowIdx][colIdx];\n return {\n node: this.table.nodeAt(cellInfo.offset - this.tableStartOffset),\n pos: cellInfo.offset,\n };\n };\n TableOffsetMap.prototype.extendedRowspan = function (rowIdx, colIdx) {\n return false;\n };\n TableOffsetMap.prototype.extendedColspan = function (rowIdx, colIdx) {\n return false;\n };\n TableOffsetMap.prototype.getRowspanCount = function (rowIdx, colIdx) {\n return 0;\n };\n TableOffsetMap.prototype.getColspanCount = function (rowIdx, colIdx) {\n return 0;\n };\n TableOffsetMap.prototype.decreaseColspanCount = function (rowIdx, colIdx) {\n return 0;\n };\n TableOffsetMap.prototype.decreaseRowspanCount = function (rowIdx, colIdx) {\n return 0;\n };\n TableOffsetMap.prototype.getColspanStartInfo = function (rowIdx, colIdx) {\n return null;\n };\n TableOffsetMap.prototype.getRowspanStartInfo = function (rowIdx, colIdx) {\n return null;\n };\n TableOffsetMap.prototype.getCellStartOffset = function (rowIdx, colIdx) {\n var offset = this.rowInfo[rowIdx][colIdx].offset;\n return this.extendedRowspan(rowIdx, colIdx) ? this.posAt(rowIdx, colIdx) : offset;\n };\n TableOffsetMap.prototype.getCellEndOffset = function (rowIdx, colIdx) {\n var _a = this.rowInfo[rowIdx][colIdx], offset = _a.offset, nodeSize = _a.nodeSize;\n return this.extendedRowspan(rowIdx, colIdx) ? this.posAt(rowIdx, colIdx) : offset + nodeSize;\n };\n TableOffsetMap.prototype.getCellIndex = function (cellPos) {\n for (var rowIdx = 0; rowIdx < this.totalRowCount; rowIdx += 1) {\n var rowInfo = this.rowInfo[rowIdx];\n for (var colIdx = 0; colIdx < this.totalColumnCount; colIdx += 1) {\n if (rowInfo[colIdx].offset + 1 > cellPos.pos) {\n return [rowIdx, colIdx];\n }\n }\n }\n return [0, 0];\n };\n TableOffsetMap.prototype.getRectOffsets = function (startCellPos, endCellPos) {\n var _a, _b, _c;\n if (endCellPos === void 0) { endCellPos = startCellPos; }\n if (startCellPos.pos > endCellPos.pos) {\n _a = [endCellPos, startCellPos], startCellPos = _a[0], endCellPos = _a[1];\n }\n var _d = this.getCellIndex(startCellPos), startRowIdx = _d[0], startColIdx = _d[1];\n var _e = this.getCellIndex(endCellPos), endRowIdx = _e[0], endColIdx = _e[1];\n _b = getSortedNumPair(startRowIdx, endRowIdx), startRowIdx = _b[0], endRowIdx = _b[1];\n _c = getSortedNumPair(startColIdx, endColIdx), startColIdx = _c[0], endColIdx = _c[1];\n return this.getSpannedOffsets({ startRowIdx: startRowIdx, startColIdx: startColIdx, endRowIdx: endRowIdx, endColIdx: endColIdx });\n };\n TableOffsetMap.prototype.getSpannedOffsets = function (selectionInfo) {\n return selectionInfo;\n };\n return TableOffsetMap;\n}());\n/* eslint-enable @typescript-eslint/no-unused-vars */\nvar createOffsetMap = function (headOrBody, startOffset) {\n var cellInfoMatrix = [];\n headOrBody.forEach(function (row, rowOffset) {\n // get row index based on table(not table head or table body)\n var rowInfo = { rowspanMap: {}, colspanMap: {}, length: 0 };\n row.forEach(function (_a, cellOffset) {\n var nodeSize = _a.nodeSize;\n var colIdx = 0;\n while (rowInfo[colIdx]) {\n colIdx += 1;\n }\n rowInfo[colIdx] = {\n // 2 is the sum of the front and back positions of the tag\n offset: startOffset + rowOffset + cellOffset + 2,\n nodeSize: nodeSize,\n };\n rowInfo.length += 1;\n });\n cellInfoMatrix.push(rowInfo);\n });\n return cellInfoMatrix;\n};\nfunction mixinTableOffsetMapPrototype(offsetMapMixin, createOffsetMapMixin) {\n assign(TableOffsetMap.prototype, offsetMapMixin);\n createOffsetMap = createOffsetMapMixin;\n return TableOffsetMap;\n}\n\nfunction getSelectionRanges(doc, map, _a) {\n var startRowIdx = _a.startRowIdx, startColIdx = _a.startColIdx, endRowIdx = _a.endRowIdx, endColIdx = _a.endColIdx;\n var ranges = [];\n for (var rowIdx = startRowIdx; rowIdx <= endRowIdx; rowIdx += 1) {\n for (var colIdx = startColIdx; colIdx <= endColIdx; colIdx += 1) {\n var _b = map.getCellInfo(rowIdx, colIdx), offset = _b.offset, nodeSize = _b.nodeSize;\n ranges.push(new SelectionRange(doc.resolve(offset + 1), doc.resolve(offset + nodeSize - 1)));\n }\n }\n return ranges;\n}\nfunction createTableFragment(tableHead, tableBody) {\n var fragment = [];\n if (tableHead.childCount) {\n fragment.push(tableHead);\n }\n if (tableBody.childCount) {\n fragment.push(tableBody);\n }\n return Fragment.from(fragment);\n}\nvar CellSelection = /** @class */ (function (_super) {\n __extends$1(CellSelection, _super);\n function CellSelection(startCellPos, endCellPos) {\n if (endCellPos === void 0) { endCellPos = startCellPos; }\n var _this = this;\n var doc = startCellPos.node(0);\n var map = TableOffsetMap.create(startCellPos);\n var selectionInfo = map.getRectOffsets(startCellPos, endCellPos);\n var ranges = getSelectionRanges(doc, map, selectionInfo);\n _this = _super.call(this, ranges[0].$from, ranges[0].$to, ranges) || this;\n _this.startCell = startCellPos;\n _this.endCell = endCellPos;\n _this.offsetMap = map;\n _this.isCellSelection = true;\n // This property is the api of the 'Selection' in prosemirror,\n // and is used to disable the text selection.\n _this.visible = false;\n return _this;\n }\n CellSelection.prototype.map = function (doc, mapping) {\n var startPos = this.startCell.pos;\n var endPos = this.endCell.pos;\n var startCell = doc.resolve(mapping.map(startPos));\n var endCell = doc.resolve(mapping.map(endPos));\n var map = TableOffsetMap.create(startCell);\n // text selection when rows or columns are deleted\n if (this.offsetMap.totalColumnCount > map.totalColumnCount ||\n this.offsetMap.totalRowCount > map.totalRowCount) {\n var depthMap = { tableBody: 1, tableRow: 2, tableCell: 3, paragraph: 4 };\n var depthFromTable = depthMap[endCell.parent.type.name];\n var tableEndPos = endCell.end(endCell.depth - depthFromTable);\n // subtract 4(</td></tr></tbody></table> tag length)\n var from = Math.min(tableEndPos - 4, endCell.pos);\n return TextSelection.create(doc, from);\n }\n return new CellSelection(startCell, endCell);\n };\n CellSelection.prototype.eq = function (cell) {\n return (cell instanceof CellSelection &&\n cell.startCell.pos === this.startCell.pos &&\n cell.endCell.pos === this.endCell.pos);\n };\n CellSelection.prototype.content = function () {\n var table = this.startCell.node(-2);\n var tableOffset = this.startCell.start(-2);\n var row = table.child(1).firstChild;\n var tableHead = table.child(0).type.create();\n var tableBody = table.child(1).type.create();\n var map = TableOffsetMap.create(this.startCell);\n var selectionInfo = map.getRectOffsets(this.startCell, this.endCell);\n var startRowIdx = selectionInfo.startRowIdx, startColIdx = selectionInfo.startColIdx, endRowIdx = selectionInfo.endRowIdx, endColIdx = selectionInfo.endColIdx;\n var isTableHeadCell = false;\n for (var rowIdx = startRowIdx; rowIdx <= endRowIdx; rowIdx += 1) {\n var cells = [];\n for (var colIdx = startColIdx; colIdx <= endColIdx; colIdx += 1) {\n var offset = map.getCellInfo(rowIdx, colIdx).offset;\n var cell = table.nodeAt(offset - tableOffset);\n if (cell) {\n isTableHeadCell = cell.type.name === 'tableHeadCell';\n // mark the extended cell for pasting\n if (map.extendedRowspan(rowIdx, colIdx) || map.extendedColspan(rowIdx, colIdx)) {\n cells.push(cell.type.create({ extended: true }));\n }\n else {\n cells.push(cell.copy(cell.content));\n }\n }\n }\n var copiedRow = row.copy(Fragment.from(cells));\n var targetNode = isTableHeadCell ? tableHead : tableBody;\n // @ts-ignore\n targetNode.content = targetNode.content.append(Fragment.from(copiedRow));\n }\n return new Slice(createTableFragment(tableHead, tableBody), 1, 1);\n };\n CellSelection.prototype.toJSON = function () {\n return JSON.stringify(this);\n };\n return CellSelection;\n}(Selection));\n\nfunction createTableHeadRow(columnCount, schema, data) {\n var _a = schema.nodes, tableRow = _a.tableRow, tableHeadCell = _a.tableHeadCell, paragraph = _a.paragraph;\n var cells = [];\n for (var index = 0; index < columnCount; index += 1) {\n var text = data && data[index];\n var para = paragraph.create(null, text ? schema.text(text) : []);\n cells.push(tableHeadCell.create(null, para));\n }\n return [tableRow.create(null, cells)];\n}\nfunction createTableBodyRows(rowCount, columnCount, schema, data) {\n var _a = schema.nodes, tableRow = _a.tableRow, tableBodyCell = _a.tableBodyCell, paragraph = _a.paragraph;\n var tableRows = [];\n for (var rowIdx = 0; rowIdx < rowCount; rowIdx += 1) {\n var cells = [];\n for (var colIdx = 0; colIdx < columnCount; colIdx += 1) {\n var text = data && data[rowIdx * columnCount + colIdx];\n var para = paragraph.create(null, text ? schema.text(text) : []);\n cells.push(tableBodyCell.create(null, para));\n }\n tableRows.push(tableRow.create(null, cells));\n }\n return tableRows;\n}\nfunction createDummyCells(columnCount, rowIdx, schema, attrs) {\n if (attrs === void 0) { attrs = null; }\n var _a = schema.nodes, tableHeadCell = _a.tableHeadCell, tableBodyCell = _a.tableBodyCell, paragraph = _a.paragraph;\n var cell = rowIdx === 0 ? tableHeadCell : tableBodyCell;\n var cells = [];\n for (var index = 0; index < columnCount; index += 1) {\n cells.push(cell.create(attrs, paragraph.create()));\n }\n return cells;\n}\nfunction findCellElement(node, root) {\n while (node && node !== root) {\n if (node.nodeName === 'TD' || node.nodeName === 'TH') {\n return node;\n }\n node = node.parentNode;\n }\n return null;\n}\nfunction findCell(pos) {\n return findNodeBy(pos, function (_a) {\n var type = _a.type;\n return type.name === 'tableHeadCell' || type.name === 'tableBodyCell';\n });\n}\nfunction getResolvedSelection(selection) {\n if (selection instanceof TextSelection) {\n var $anchor = selection.$anchor;\n var foundCell = findCell($anchor);\n if (foundCell) {\n var anchor = $anchor.node(0).resolve($anchor.before(foundCell.depth));\n return { anchor: anchor, head: anchor };\n }\n }\n var _a = selection, startCell = _a.startCell, endCell = _a.endCell;\n return { anchor: startCell, head: endCell };\n}\nfunction getTableContentFromSlice(slice) {\n var _a;\n if (slice.size) {\n var content = slice.content, openStart = slice.openStart, openEnd = slice.openEnd;\n if (content.childCount !== 1) {\n return null;\n }\n while (content.childCount === 1 &&\n ((openStart > 0 && openEnd > 0) || ((_a = content.firstChild) === null || _a === void 0 ? void 0 : _a.type.name) === 'table')) {\n openStart -= 1;\n openEnd -= 1;\n content = content.firstChild.content;\n }\n if (content.firstChild.type.name === 'tableHead' ||\n content.firstChild.type.name === 'tableBody') {\n return content;\n }\n }\n return null;\n}\nfunction getRowAndColumnCount(_a) {\n var startRowIdx = _a.startRowIdx, startColIdx = _a.startColIdx, endRowIdx = _a.endRowIdx, endColIdx = _a.endColIdx;\n var rowCount = endRowIdx - startRowIdx + 1;\n var columnCount = endColIdx - startColIdx + 1;\n return { rowCount: rowCount, columnCount: columnCount };\n}\nfunction setAttrs(cell, attrs) {\n return __assign$1(__assign$1({}, cell.attrs), attrs);\n}\n\nvar pluginKey = new PluginKey('cellSelection');\nvar MOUSE_RIGHT_BUTTON = 2;\nvar TableSelection = /** @class */ (function () {\n function TableSelection(view) {\n this.view = view;\n this.handlers = {\n mousedown: this.handleMousedown.bind(this),\n mousemove: this.handleMousemove.bind(this),\n mouseup: this.handleMouseup.bind(this),\n };\n this.startCellPos = null;\n this.init();\n }\n TableSelection.prototype.init = function () {\n this.view.dom.addEventListener('mousedown', this.handlers.mousedown);\n };\n TableSelection.prototype.handleMousedown = function (ev) {\n var foundCell = findCellElement(ev.target, this.view.dom);\n if (ev.button === MOUSE_RIGHT_BUTTON) {\n ev.preventDefault();\n return;\n }\n if (foundCell) {\n var startCellPos = this.getCellPos(ev);\n if (startCellPos) {\n this.startCellPos = startCellPos;\n }\n this.bindEvent();\n }\n };\n TableSelection.prototype.handleMousemove = function (ev) {\n var prevEndCellOffset = pluginKey.getState(this.view.state);\n var endCellPos = this.getCellPos(ev);\n var startCellPos = this.startCellPos;\n var prevEndCellPos;\n if (prevEndCellOffset) {\n prevEndCellPos = this.view.state.doc.resolve(prevEndCellOffset);\n }\n else if (startCellPos !== endCellPos) {\n prevEndCellPos = startCellPos;\n }\n if (prevEndCellPos && startCellPos && endCellPos) {\n this.setCellSelection(startCellPos, endCellPos);\n }\n };\n TableSelection.prototype.handleMouseup = function () {\n this.startCellPos = null;\n this.unbindEvent();\n if (pluginKey.getState(this.view.state) !== null) {\n this.view.dispatch(this.view.state.tr.setMeta(pluginKey, -1));\n }\n };\n TableSelection.prototype.bindEvent = function () {\n var dom = this.view.dom;\n dom.addEventListener('mousemove', this.handlers.mousemove);\n dom.addEventListener('mouseup', this.handlers.mouseup);\n };\n TableSelection.prototype.unbindEvent = function () {\n var dom = this.view.dom;\n dom.removeEventListener('mousemove', this.handlers.mousemove);\n dom.removeEventListener('mouseup', this.handlers.mouseup);\n };\n TableSelection.prototype.getCellPos = function (_a) {\n var clientX = _a.clientX, clientY = _a.clientY;\n var mousePos = this.view.posAtCoords({ left: clientX, top: clientY });\n if (mousePos) {\n var doc = this.view.state.doc;\n var currentPos = doc.resolve(mousePos.pos);\n var foundCell = findCell(currentPos);\n if (foundCell) {\n var cellOffset = currentPos.before(foundCell.depth);\n return doc.resolve(cellOffset);\n }\n }\n return null;\n };\n TableSelection.prototype.setCellSelection = function (startCellPos, endCellPos) {\n var _a = this.view.state, selection = _a.selection, tr = _a.tr;\n var starting = pluginKey.getState(this.view.state) === null;\n var cellSelection = new CellSelection(startCellPos, endCellPos);\n if (starting || !selection.eq(cellSelection)) {\n var newTr = tr.setSelection(cellSelection);\n if (starting) {\n newTr.setMeta(pluginKey, endCellPos.pos);\n }\n this.view.dispatch(newTr);\n }\n };\n TableSelection.prototype.destroy = function () {\n this.view.dom.removeEventListener('mousedown', this.handlers.mousedown);\n };\n return TableSelection;\n}());\n\nvar SELECTED_CELL_CLASS_NAME = cls('cell-selected');\nfunction drawCellSelection(_a) {\n var selection = _a.selection, doc = _a.doc;\n if (selection instanceof CellSelection) {\n var cells_1 = [];\n var ranges = selection.ranges;\n ranges.forEach(function (_a) {\n var $from = _a.$from, $to = _a.$to;\n cells_1.push(Decoration.node($from.pos - 1, $to.pos + 1, { class: SELECTED_CELL_CLASS_NAME }));\n });\n return DecorationSet.create(doc, cells_1);\n }\n return null;\n}\nfunction tableSelection() {\n return new Plugin({\n key: pluginKey,\n state: {\n init: function () {\n return null;\n },\n apply: function (tr, value) {\n var cellOffset = tr.getMeta(pluginKey);\n if (cellOffset) {\n return cellOffset === -1 ? null : cellOffset;\n }\n if (isNull_1(value) || !tr.docChanged) {\n return value;\n }\n var _a = tr.mapping.mapResult(value), deleted = _a.deleted, pos = _a.pos;\n return deleted ? null : pos;\n },\n },\n props: {\n decorations: drawCellSelection,\n createSelectionBetween: function (_a) {\n var state = _a.state;\n if (!isNull_1(pluginKey.getState(state))) {\n return state.selection;\n }\n return null;\n },\n },\n view: function (editorView) {\n return new TableSelection(editorView);\n },\n });\n}\n\n/**\n * @class\n * @ignore\n * @classdesc ES6 Map\n */\nvar Map$1 = /** @class */ (function () {\n function Map() {\n this.keys = [];\n this.values = [];\n }\n Map.prototype.getKeyIndex = function (key) {\n return inArray_1(key, this.keys);\n };\n Map.prototype.get = function (key) {\n return this.values[this.getKeyIndex(key)];\n };\n Map.prototype.set = function (key, value) {\n var keyIndex = this.getKeyIndex(key);\n if (keyIndex > -1) {\n this.values[keyIndex] = value;\n }\n else {\n this.keys.push(key);\n this.values.push(value);\n }\n return this;\n };\n Map.prototype.has = function (key) {\n return this.getKeyIndex(key) > -1;\n };\n Map.prototype.delete = function (key) {\n var keyIndex = this.getKeyIndex(key);\n if (keyIndex > -1) {\n this.keys.splice(keyIndex, 1);\n this.values.splice(keyIndex, 1);\n return true;\n }\n return false;\n };\n Map.prototype.forEach = function (callback, thisArg) {\n var _this = this;\n if (thisArg === void 0) { thisArg = this; }\n this.values.forEach(function (value, index) {\n if (value && _this.keys[index]) {\n callback.call(thisArg, value, _this.keys[index], _this);\n }\n });\n };\n Map.prototype.clear = function () {\n this.keys = [];\n this.values = [];\n };\n return Map;\n}());\n\n/**\n * @fileoverview Implements i18n\n * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>\n */\nvar DEFAULT_CODE = 'en-US';\n/**\n * Class I18n\n * @ignore\n */\nvar I18n = /** @class */ (function () {\n function I18n() {\n this.code = DEFAULT_CODE;\n this.langs = new Map$1();\n }\n I18n.prototype.setCode = function (code) {\n this.code = code || DEFAULT_CODE;\n };\n /**\n * Set language set\n * @param {string|string[]} codes locale code\n * @param {object} data language set\n */\n I18n.prototype.setLanguage = function (codes, data) {\n var _this = this;\n codes = [].concat(codes);\n codes.forEach(function (code) {\n if (!_this.langs.has(code)) {\n _this.langs.set(code, data);\n }\n else {\n var langData = _this.langs.get(code);\n _this.langs.set(code, extend_1(langData, data));\n }\n });\n };\n I18n.prototype.get = function (key, code) {\n if (!code) {\n code = this.code;\n }\n var langSet = this.langs.get(code);\n if (!langSet) {\n langSet = this.langs.get(DEFAULT_CODE);\n }\n var text = langSet[key];\n if (!text) {\n throw new Error(\"There is no text key \\\"\" + key + \"\\\" in \" + code);\n }\n return text;\n };\n return I18n;\n}());\nvar i18n = new I18n();\n\nvar contextMenuGroups = [\n [\n {\n action: 'Add row to up',\n command: 'addRowToUp',\n disableInThead: true,\n className: 'add-row-up',\n },\n {\n action: 'Add row to down',\n command: 'addRowToDown',\n disableInThead: true,\n className: 'add-row-down',\n },\n { action: 'Remove row', command: 'removeRow', disableInThead: true, className: 'remove-row' },\n ],\n [\n { action: 'Add column to left', command: 'addColumnToLeft', className: 'add-column-left' },\n { action: 'Add column to right', command: 'addColumnToRight', className: 'add-column-right' },\n { action: 'Remove column', command: 'removeColumn', className: 'remove-column' },\n ],\n [\n {\n action: 'Align column to left',\n command: 'alignColumn',\n payload: { align: 'left' },\n className: 'align-column-left',\n },\n {\n action: 'Align column to center',\n command: 'alignColumn',\n payload: { align: 'center' },\n className: 'align-column-center',\n },\n {\n action: 'Align column to right',\n command: 'alignColumn',\n payload: { align: 'right' },\n className: 'align-column-right',\n },\n ],\n [{ action: 'Remove table', command: 'removeTable', className: 'remove-table' }],\n];\nfunction getContextMenuGroups(eventEmitter, inTableHead) {\n return contextMenuGroups\n .map(function (contextMenuGroup) {\n return contextMenuGroup.map(function (_a) {\n var action = _a.action, command = _a.command, payload = _a.payload, disableInThead = _a.disableInThead, className = _a.className;\n return {\n label: i18n.get(action),\n onClick: function () {\n eventEmitter.emit('command', command, payload);\n },\n disabled: inTableHead && !!disableInThead,\n className: className,\n };\n });\n })\n .concat();\n}\nfunction tableContextMenu(eventEmitter) {\n return new Plugin({\n props: {\n handleDOMEvents: {\n contextmenu: function (view, ev) {\n var tableCell = findCellElement(ev.target, view.dom);\n if (tableCell) {\n ev.preventDefault();\n var _a = ev, clientX = _a.clientX, clientY = _a.clientY;\n var _b = view.dom.parentNode.getBoundingClientRect(), left = _b.left, top_1 = _b.top;\n var inTableHead = tableCell.nodeName === 'TH';\n eventEmitter.emit('contextmenu', {\n pos: { left: clientX - left + 10 + \"px\", top: clientY - top_1 + 30 + \"px\" },\n menuGroups: getContextMenuGroups(eventEmitter, inTableHead),\n tableCell: tableCell,\n });\n return true;\n }\n return false;\n },\n },\n },\n });\n}\n\nfunction task() {\n return new Plugin({\n props: {\n handleDOMEvents: {\n mousedown: function (view, ev) {\n var _a = ev, clientX = _a.clientX, clientY = _a.clientY;\n var mousePos = view.posAtCoords({ left: clientX, top: clientY });\n if (mousePos) {\n var _b = view.state, doc = _b.doc, tr = _b.tr;\n var currentPos = doc.resolve(mousePos.pos);\n var listItem = findListItem(currentPos);\n var target = ev.target;\n var style = getComputedStyle(target, ':before');\n var _c = ev, offsetX = _c.offsetX, offsetY = _c.offsetY;\n if (!listItem || !isPositionInBox(style, offsetX, offsetY)) {\n return false;\n }\n ev.preventDefault();\n var offset = currentPos.before(listItem.depth);\n var attrs = listItem.node.attrs;\n tr.setNodeMarkup(offset, null, __assign$1(__assign$1({}, attrs), { checked: !attrs.checked }));\n view.dispatch(tr);\n return true;\n }\n return false;\n },\n },\n },\n });\n}\n\nvar EXCEPT_TYPES = ['image', 'link', 'customBlock', 'frontMatter'];\nvar MARK_TYPES = ['strong', 'strike', 'emph', 'code'];\nvar LIST_TYPES = ['bulletList', 'orderedList', 'taskList'];\nfunction getToolbarStateType(node, parentNode) {\n var type = node.type.name;\n if (type === 'listItem') {\n return node.attrs.task ? 'taskList' : parentNode.type.name;\n }\n if (type.indexOf('table') !== -1) {\n return 'table';\n }\n return type;\n}\nfunction setListNodeToolbarState(type, nodeTypeState) {\n nodeTypeState[type] = { active: true };\n LIST_TYPES.filter(function (listName) { return listName !== type; }).forEach(function (listType) {\n if (nodeTypeState[listType]) {\n delete nodeTypeState[listType];\n }\n });\n}\nfunction setMarkTypeStates(from, to, schema, toolbarState) {\n MARK_TYPES.forEach(function (type) {\n var mark = schema.marks[type];\n var marksAtPos = from.marksAcross(to) || [];\n var foundMark = !!mark.isInSet(marksAtPos);\n if (foundMark) {\n toolbarState[type] = { active: true };\n }\n });\n}\nfunction getToolbarState(selection, doc, schema) {\n var $from = selection.$from, $to = selection.$to, from = selection.from, to = selection.to;\n var toolbarState = {\n indent: { active: false, disabled: true },\n outdent: { active: false, disabled: true },\n };\n doc.nodesBetween(from, to, function (node, _, parentNode) {\n var type = getToolbarStateType(node, parentNode);\n if (includes(EXCEPT_TYPES, type)) {\n return;\n }\n if (includes(LIST_TYPES, type)) {\n setListNodeToolbarState(type, toolbarState);\n toolbarState.indent.disabled = false;\n toolbarState.outdent.disabled = false;\n }\n else if (type === 'paragraph' || type === 'text') {\n setMarkTypeStates($from, $to, schema, toolbarState);\n }\n else {\n toolbarState[type] = { active: true };\n }\n });\n return toolbarState;\n}\nfunction toolbarStateHighlight(eventEmitter) {\n return new Plugin({\n view: function () {\n return {\n update: function (view) {\n var _a = view.state, selection = _a.selection, doc = _a.doc, schema = _a.schema;\n eventEmitter.emit('changeToolbarState', {\n toolbarState: getToolbarState(selection, doc, schema),\n });\n },\n };\n },\n });\n}\n\nvar CustomBlockView = /** @class */ (function () {\n function CustomBlockView(node, view, getPos, toDOMAdaptor) {\n var _this = this;\n this.openEditor = function () {\n if (_this.innerEditorView) {\n throw new Error('The editor is already opened.');\n }\n _this.dom.draggable = false;\n _this.wrapper.style.display = 'none';\n _this.innerViewContainer.style.display = 'block';\n _this.innerEditorView = new EditorView(_this.innerViewContainer, {\n state: EditorState.create({\n doc: _this.node,\n plugins: [\n keymap({\n 'Mod-z': function () { return undo(_this.innerEditorView.state, _this.innerEditorView.dispatch); },\n 'Shift-Mod-z': function () { return redo(_this.innerEditorView.state, _this.innerEditorView.dispatch); },\n Tab: function (state, dispatch) {\n dispatch(state.tr.insertText('\\t'));\n return true;\n },\n Enter: newlineInCode,\n Escape: function () {\n _this.cancelEditing();\n return true;\n },\n 'Ctrl-Enter': function () {\n _this.saveAndFinishEditing();\n return true;\n },\n }),\n history(),\n ],\n }),\n dispatchTransaction: function (tr) { return _this.dispatchInner(tr); },\n handleDOMEvents: {\n mousedown: function () {\n if (_this.editorView.hasFocus()) {\n _this.innerEditorView.focus();\n }\n return true;\n },\n blur: function () {\n _this.saveAndFinishEditing();\n return true;\n },\n },\n });\n _this.innerEditorView.focus();\n };\n this.node = node;\n this.editorView = view;\n this.getPos = getPos;\n this.toDOMAdaptor = toDOMAdaptor;\n this.innerEditorView = null;\n this.canceled = false;\n this.dom = document.createElement('div');\n this.dom.className = cls('custom-block');\n this.wrapper = document.createElement('div');\n this.wrapper.className = cls('custom-block-view');\n this.createInnerViewContainer();\n this.renderCustomBlock();\n this.dom.appendChild(this.innerViewContainer);\n this.dom.appendChild(this.wrapper);\n }\n CustomBlockView.prototype.renderToolArea = function () {\n var _this = this;\n var tool = document.createElement('div');\n var span = document.createElement('span');\n var button = document.createElement('button');\n tool.className = 'tool';\n span.textContent = this.node.attrs.info;\n span.className = 'info';\n button.type = 'button';\n button.addEventListener('click', function () { return _this.openEditor(); });\n tool.appendChild(span);\n tool.appendChild(button);\n this.wrapper.appendChild(tool);\n };\n CustomBlockView.prototype.renderCustomBlock = function () {\n var toDOMNode = this.toDOMAdaptor.getToDOMNode(this.node.attrs.info);\n if (toDOMNode) {\n var node = toDOMNode(this.node);\n while (this.wrapper.hasChildNodes()) {\n this.wrapper.removeChild(this.wrapper.lastChild);\n }\n if (node) {\n this.wrapper.appendChild(node);\n }\n this.renderToolArea();\n }\n };\n CustomBlockView.prototype.createInnerViewContainer = function () {\n this.innerViewContainer = document.createElement('div');\n this.innerViewContainer.className = cls('custom-block-editor');\n this.innerViewContainer.style.display = 'none';\n };\n CustomBlockView.prototype.closeEditor = function () {\n if (this.innerEditorView) {\n this.innerEditorView.destroy();\n this.innerEditorView = null;\n this.innerViewContainer.style.display = 'none';\n }\n this.wrapper.style.display = 'block';\n };\n CustomBlockView.prototype.saveAndFinishEditing = function () {\n var to = this.editorView.state.selection.to;\n var outerState = this.editorView.state;\n this.editorView.dispatch(outerState.tr.setSelection(createTextSelection(outerState.tr, to)));\n this.editorView.focus();\n this.renderCustomBlock();\n this.closeEditor();\n };\n CustomBlockView.prototype.cancelEditing = function () {\n var undoableCount = undoDepth(this.innerEditorView.state);\n this.canceled = true;\n // should undo editing result\n // eslint-disable-next-line no-plusplus\n while (undoableCount--) {\n undo(this.innerEditorView.state, this.innerEditorView.dispatch);\n undo(this.editorView.state, this.editorView.dispatch);\n }\n this.canceled = false;\n var to = this.editorView.state.selection.to;\n var outerState = this.editorView.state;\n this.editorView.dispatch(outerState.tr.setSelection(TextSelection.create(outerState.doc, to)));\n this.editorView.focus();\n this.closeEditor();\n };\n CustomBlockView.prototype.dispatchInner = function (tr) {\n var _a = this.innerEditorView.state.applyTransaction(tr), state = _a.state, transactions = _a.transactions;\n this.innerEditorView.updateState(state);\n if (!this.canceled && isFunction_1(this.getPos)) {\n var outerTr = this.editorView.state.tr;\n var offsetMap = StepMap.offset(this.getPos() + 1);\n for (var i = 0; i < transactions.length; i += 1) {\n var steps = transactions[i].steps;\n for (var j = 0; j < steps.length; j += 1) {\n outerTr.step(steps[j].map(offsetMap));\n }\n }\n if (outerTr.docChanged) {\n this.editorView.dispatch(outerTr);\n }\n }\n };\n CustomBlockView.prototype.update = function (node) {\n if (!node.sameMarkup(this.node)) {\n return false;\n }\n this.node = node;\n if (!this.innerEditorView) {\n this.renderCustomBlock();\n }\n return true;\n };\n CustomBlockView.prototype.stopEvent = function (event) {\n return (!!this.innerEditorView &&\n !!event.target &&\n this.innerEditorView.dom.contains(event.target));\n };\n CustomBlockView.prototype.ignoreMutation = function () {\n return true;\n };\n CustomBlockView.prototype.destroy = function () {\n this.dom.removeEventListener('dblclick', this.openEditor);\n this.closeEditor();\n };\n return CustomBlockView;\n}());\n\nvar IMAGE_LINK_CLASS_NAME = 'image-link';\nvar ImageView = /** @class */ (function () {\n function ImageView(node, view, getPos, eventEmitter) {\n var _this = this;\n var _a;\n this.handleMousedown = function (ev) {\n ev.preventDefault();\n var target = ev.target, offsetX = ev.offsetX, offsetY = ev.offsetY;\n if (_this.imageLink &&\n isFunction_1(_this.getPos) &&\n hasClass_1(target, IMAGE_LINK_CLASS_NAME)) {\n var style = getComputedStyle(target, ':before');\n ev.stopPropagation();\n if (isPositionInBox(style, offsetX, offsetY)) {\n var tr = _this.view.state.tr;\n var pos = _this.getPos();\n tr.setSelection(createTextSelection(tr, pos, pos + 1));\n _this.view.dispatch(tr);\n _this.eventEmitter.emit('openPopup', 'link', _this.imageLink.attrs);\n }\n }\n };\n this.node = node;\n this.view = view;\n this.getPos = getPos;\n this.eventEmitter = eventEmitter;\n this.imageLink = (_a = node.marks.filter(function (_a) {\n var type = _a.type;\n return type.name === 'link';\n })[0]) !== null && _a !== void 0 ? _a : null;\n this.dom = this.createElement();\n this.bindEvent();\n }\n ImageView.prototype.createElement = function () {\n var image = this.createImageElement(this.node);\n if (this.imageLink) {\n var wrapper = document.createElement('span');\n wrapper.className = IMAGE_LINK_CLASS_NAME;\n wrapper.appendChild(image);\n return wrapper;\n }\n return image;\n };\n ImageView.prototype.createImageElement = function (node) {\n var image = document.createElement('img');\n var _a = node.attrs, imageUrl = _a.imageUrl, altText = _a.altText;\n var attrs = getCustomAttrs(node.attrs);\n image.src = imageUrl;\n if (altText) {\n image.alt = altText;\n }\n setAttributes(attrs, image);\n return image;\n };\n ImageView.prototype.bindEvent = function () {\n if (this.imageLink) {\n this.dom.addEventListener('mousedown', this.handleMousedown);\n }\n };\n ImageView.prototype.stopEvent = function () {\n return true;\n };\n ImageView.prototype.destroy = function () {\n if (this.imageLink) {\n this.dom.removeEventListener('mousedown', this.handleMousedown);\n }\n };\n return ImageView;\n}());\n\nvar WRAPPER_CLASS_NAME = 'toastui-editor-ww-code-block';\nvar CODE_BLOCK_LANG_CLASS_NAME = 'toastui-editor-ww-code-block-language';\nvar CodeBlockView = /** @class */ (function () {\n function CodeBlockView(node, view, getPos, eventEmitter) {\n var _this = this;\n this.contentDOM = null;\n this.input = null;\n this.timer = null;\n this.handleMousedown = function (ev) {\n var target = ev.target;\n var style = getComputedStyle(target, ':after');\n // judge to click pseudo element with background image for IE11\n if (style.backgroundImage !== 'none' && isFunction_1(_this.getPos)) {\n var _a = _this.view.coordsAtPos(_this.getPos()), top_1 = _a.top, right = _a.right;\n _this.createLanguageEditor({ top: top_1, right: right });\n }\n };\n this.handleKeydown = function (ev) {\n if (ev.key === 'Enter' && _this.input) {\n ev.preventDefault();\n _this.changeLanguage();\n }\n };\n this.node = node;\n this.view = view;\n this.getPos = getPos;\n this.eventEmitter = eventEmitter;\n this.createElement();\n this.bindDOMEvent();\n this.bindEvent();\n }\n CodeBlockView.prototype.createElement = function () {\n var language = this.node.attrs.language;\n var wrapper = document.createElement('div');\n wrapper.setAttribute('data-language', language || 'text');\n wrapper.className = WRAPPER_CLASS_NAME;\n var pre = this.createCodeBlockElement();\n var code = pre.firstChild;\n wrapper.appendChild(pre);\n this.dom = wrapper;\n this.contentDOM = code;\n };\n CodeBlockView.prototype.createCodeBlockElement = function () {\n var pre = document.createElement('pre');\n var code = document.createElement('code');\n var language = this.node.attrs.language;\n var attrs = getCustomAttrs(this.node.attrs);\n if (language) {\n code.setAttribute('data-language', language);\n }\n setAttributes(attrs, pre);\n pre.appendChild(code);\n return pre;\n };\n CodeBlockView.prototype.createLanguageEditor = function (_a) {\n var _this = this;\n var top = _a.top, right = _a.right;\n var wrapper = document.createElement('span');\n wrapper.className = CODE_BLOCK_LANG_CLASS_NAME;\n var input = document.createElement('input');\n input.type = 'text';\n input.value = this.node.attrs.language;\n wrapper.appendChild(input);\n this.view.dom.parentElement.appendChild(wrapper);\n var wrpperWidth = wrapper.clientWidth;\n css_1(wrapper, {\n top: top + 10 + \"px\",\n left: right - wrpperWidth - 10 + \"px\",\n width: wrpperWidth + \"px\",\n });\n this.input = input;\n this.input.addEventListener('blur', function () { return _this.changeLanguage(); });\n this.input.addEventListener('keydown', this.handleKeydown);\n this.clearTimer();\n this.timer = setTimeout(function () {\n _this.input.focus();\n });\n };\n CodeBlockView.prototype.bindDOMEvent = function () {\n if (this.dom) {\n this.dom.addEventListener('click', this.handleMousedown);\n }\n };\n CodeBlockView.prototype.bindEvent = function () {\n var _this = this;\n this.eventEmitter.listen('scroll', function () {\n if (_this.input) {\n _this.reset();\n }\n });\n };\n CodeBlockView.prototype.changeLanguage = function () {\n if (this.input && isFunction_1(this.getPos)) {\n var value = this.input.value;\n this.reset();\n var pos = this.getPos();\n var tr = this.view.state.tr;\n tr.setNodeMarkup(pos, null, { language: value });\n this.view.dispatch(tr);\n }\n };\n CodeBlockView.prototype.reset = function () {\n var _a;\n if ((_a = this.input) === null || _a === void 0 ? void 0 : _a.parentElement) {\n var parent_1 = this.input.parentElement;\n this.input = null;\n removeNode$1(parent_1);\n }\n };\n CodeBlockView.prototype.clearTimer = function () {\n if (this.timer) {\n clearTimeout(this.timer);\n this.timer = null;\n }\n };\n CodeBlockView.prototype.stopEvent = function () {\n return true;\n };\n CodeBlockView.prototype.update = function (node) {\n if (!node.sameMarkup(this.node)) {\n return false;\n }\n this.node = node;\n return true;\n };\n CodeBlockView.prototype.destroy = function () {\n this.reset();\n this.clearTimer();\n if (this.dom) {\n this.dom.removeEventListener('click', this.handleMousedown);\n }\n };\n return CodeBlockView;\n}());\n\nvar reMSOListClassName = /MsoListParagraph/;\nvar reMSOStylePrefix = /style=(.|\\n)*mso-/;\nvar reMSOListStyle = /mso-list:(.*)/;\nvar reMSOTagName = /O:P/;\nvar reMSOListBullet = /^(n|u|l)/;\nvar MSO_CLASS_NAME_LIST_PARA = 'p.MsoListParagraph';\nfunction isFromMso(html) {\n return reMSOStylePrefix.test(html);\n}\nfunction getListItemContents(para) {\n var removedNodes = [];\n var walker = document.createTreeWalker(para, 1, null, false);\n while (walker.nextNode()) {\n var node = walker.currentNode;\n if (isElemNode(node)) {\n var _a = node, outerHTML = _a.outerHTML, textContent = _a.textContent;\n var msoSpan = reMSOStylePrefix.test(outerHTML);\n var bulletSpan = reMSOListStyle.test(outerHTML);\n if (msoSpan && !bulletSpan && textContent) {\n removedNodes.push([node, true]);\n }\n else if (reMSOTagName.test(node.nodeName) || (msoSpan && !textContent) || bulletSpan) {\n removedNodes.push([node, false]);\n }\n }\n }\n removedNodes.forEach(function (_a) {\n var node = _a[0], isUnwrap = _a[1];\n if (isUnwrap) {\n unwrapNode(node);\n }\n else {\n removeNode$1(node);\n }\n });\n return para.innerHTML.trim();\n}\nfunction createListItemDataFromParagraph(para, index) {\n var styleAttr = para.getAttribute('style');\n if (styleAttr) {\n var _a = styleAttr.match(reMSOListStyle), listItemInfo = _a[1];\n var _b = listItemInfo.trim().split(' '), levelStr = _b[1];\n var level = parseInt(levelStr.replace('level', ''), 10);\n var unordered = reMSOListBullet.test(para.textContent || '');\n return {\n id: index,\n level: level,\n prev: null,\n parent: null,\n children: [],\n unordered: unordered,\n contents: getListItemContents(para),\n };\n }\n return null;\n}\nfunction addListItemDetailData(data, prevData) {\n if (prevData.level < data.level) {\n prevData.children.push(data);\n data.parent = prevData;\n }\n else {\n while (prevData) {\n if (prevData.level === data.level) {\n break;\n }\n prevData = prevData.parent;\n }\n if (prevData) {\n data.prev = prevData;\n data.parent = prevData.parent;\n if (data.parent) {\n data.parent.children.push(data);\n }\n }\n }\n}\nfunction createListData(paras) {\n var listData = [];\n paras.forEach(function (para, index) {\n var prevListItemData = listData[index - 1];\n var listItemData = createListItemDataFromParagraph(para, index);\n if (listItemData) {\n if (prevListItemData) {\n addListItemDetailData(listItemData, prevListItemData);\n }\n listData.push(listItemData);\n }\n });\n return listData;\n}\nfunction makeList(listData) {\n var listTagName = listData[0].unordered ? 'ul' : 'ol';\n var list = document.createElement(listTagName);\n listData.forEach(function (data) {\n var children = data.children, contents = data.contents;\n var listItem = document.createElement('li');\n listItem.innerHTML = contents;\n list.appendChild(listItem);\n if (children.length) {\n list.appendChild(makeList(children));\n }\n });\n return list;\n}\nfunction makeListFromParagraphs(paras) {\n var listData = createListData(paras);\n var rootChildren = listData.filter(function (_a) {\n var parent = _a.parent;\n return !parent;\n });\n return makeList(rootChildren);\n}\nfunction isMsoListParagraphEnd(node) {\n while (node) {\n if (isElemNode(node)) {\n break;\n }\n node = node.nextSibling;\n }\n return node ? !reMSOListClassName.test(node.className) : true;\n}\nfunction convertMsoParagraphsToList(html) {\n var container = document.createElement('div');\n container.innerHTML = html;\n var paras = [];\n var foundParas = findNodes(container, MSO_CLASS_NAME_LIST_PARA);\n foundParas.forEach(function (para) {\n var msoListParaEnd = isMsoListParagraphEnd(para.nextSibling);\n paras.push(para);\n if (msoListParaEnd) {\n var list = makeListFromParagraphs(paras);\n var nextSibling = para.nextSibling;\n if (nextSibling) {\n insertBeforeNode(list, nextSibling);\n }\n else {\n appendNodes(container, list);\n }\n paras = [];\n }\n removeNode$1(para);\n });\n // without `<p></p>`, the list string was parsed as a paragraph node and added\n var extraHTML = foundParas.length ? '<p></p>' : '';\n return \"\" + extraHTML + container.innerHTML;\n}\n\nvar START_FRAGMENT_COMMENT = '<!--StartFragment-->';\nvar END_FRAGMENT_COMMENT = '<!--EndFragment-->';\nfunction getContentBetweenFragmentComments(html) {\n var startFragmentIndex = html.indexOf(START_FRAGMENT_COMMENT);\n var endFragmentIndex = html.lastIndexOf(END_FRAGMENT_COMMENT);\n if (startFragmentIndex > -1 && endFragmentIndex > -1) {\n html = html.slice(startFragmentIndex + START_FRAGMENT_COMMENT.length, endFragmentIndex);\n }\n return html.replace(/<br[^>]*>/g, ALTERNATIVE_TAG_FOR_BR);\n}\nfunction convertMsoTableToCompletedTable(html) {\n // wrap with <tr> if html contains dangling <td> tags\n // dangling <td> tag is that tag does not have <tr> as parent node\n if (/<\\/td>((?!<\\/tr>)[\\s\\S])*$/i.test(html)) {\n html = \"<tr>\" + html + \"</tr>\";\n }\n // wrap with <table> if html contains dangling <tr> tags\n // dangling <tr> tag is that tag does not have <table> as parent node\n if (/<\\/tr>((?!<\\/table>)[\\s\\S])*$/i.test(html)) {\n html = \"<table>\" + html + \"</table>\";\n }\n return html;\n}\nfunction changePastedHTML(html) {\n html = getContentBetweenFragmentComments(html);\n html = convertMsoTableToCompletedTable(html);\n if (isFromMso(html)) {\n html = convertMsoParagraphsToList(html);\n }\n return html;\n}\nfunction getMaxColumnCount(rows) {\n var row = rows.reduce(function (prevRow, currentRow) {\n return prevRow.childCount > currentRow.childCount ? prevRow : currentRow;\n });\n return row.childCount;\n}\nfunction createCells(orgRow, maxColumnCount, cell) {\n var cells = [];\n var cellCount = orgRow.childCount;\n for (var colIdx = 0; colIdx < cellCount; colIdx += 1) {\n if (!orgRow.child(colIdx).attrs.extended) {\n var copiedCell = colIdx < cellCount\n ? cell.create(orgRow.child(colIdx).attrs, orgRow.child(colIdx).content)\n : cell.createAndFill();\n cells.push(copiedCell);\n }\n }\n return cells;\n}\nfunction copyTableHeadRow(orgRow, maxColumnCount, schema) {\n var _a = schema.nodes, tableRow = _a.tableRow, tableHeadCell = _a.tableHeadCell;\n var cells = createCells(orgRow, maxColumnCount, tableHeadCell);\n return tableRow.create(null, cells);\n}\nfunction copyTableBodyRow(orgRow, maxColumnCount, schema) {\n var _a = schema.nodes, tableRow = _a.tableRow, tableBodyCell = _a.tableBodyCell;\n var cells = createCells(orgRow, maxColumnCount, tableBodyCell);\n return tableRow.create(null, cells);\n}\nfunction creatTableBodyDummyRow(columnCount, schema) {\n var _a = schema.nodes, tableRow = _a.tableRow, tableBodyCell = _a.tableBodyCell;\n var cells = [];\n for (var columnIndex = 0; columnIndex < columnCount; columnIndex += 1) {\n var dummyCell = tableBodyCell.createAndFill();\n cells.push(dummyCell);\n }\n return tableRow.create({ dummyRowForPasting: true }, cells);\n}\nfunction createRowsFromPastingTable(tableContent) {\n var tableHeadRows = [];\n var tableBodyRows = [];\n if (tableContent.firstChild.type.name === 'tableHead') {\n var tableHead = tableContent.firstChild;\n tableHead.forEach(function (row) { return tableHeadRows.push(row); });\n }\n if (tableContent.lastChild.type.name === 'tableBody') {\n var tableBody = tableContent.lastChild;\n tableBody.forEach(function (row) { return tableBodyRows.push(row); });\n }\n return __spreadArray$1(__spreadArray$1([], tableHeadRows), tableBodyRows);\n}\nfunction createTableHead(tableHeadRow, maxColumnCount, schema) {\n var copiedRow = copyTableHeadRow(tableHeadRow, maxColumnCount, schema);\n return schema.nodes.tableHead.create(null, copiedRow);\n}\nfunction createTableBody(tableBodyRows, maxColumnCount, schema) {\n var copiedRows = tableBodyRows.map(function (tableBodyRow) {\n return copyTableBodyRow(tableBodyRow, maxColumnCount, schema);\n });\n if (!tableBodyRows.length) {\n var dummyTableRow = creatTableBodyDummyRow(maxColumnCount, schema);\n copiedRows.push(dummyTableRow);\n }\n return schema.nodes.tableBody.create(null, copiedRows);\n}\nfunction createTableFromPastingTable(rows, schema, startFromBody, isInTable) {\n var columnCount = getMaxColumnCount(rows);\n if (startFromBody && isInTable) {\n return schema.nodes.table.create(null, [createTableBody(rows, columnCount, schema)]);\n }\n var tableHeadRow = rows[0];\n var tableBodyRows = rows.slice(1);\n var nodes = [createTableHead(tableHeadRow, columnCount, schema)];\n if (tableBodyRows.length) {\n nodes.push(createTableBody(tableBodyRows, columnCount, schema));\n }\n return schema.nodes.table.create(null, nodes);\n}\nfunction changePastedSlice(slice, schema, isInTable) {\n var nodes = [];\n var content = slice.content, openStart = slice.openStart, openEnd = slice.openEnd;\n content.forEach(function (node) {\n if (node.type.name === 'table') {\n var tableContent = getTableContentFromSlice(new Slice(Fragment.from(node), 0, 0));\n if (tableContent) {\n var rows = createRowsFromPastingTable(tableContent);\n var startFromBody = tableContent.firstChild.type.name === 'tableBody';\n var table = createTableFromPastingTable(rows, schema, startFromBody, isInTable);\n nodes.push(table);\n }\n }\n else {\n nodes.push(node);\n }\n });\n return new Slice(Fragment.from(nodes), openStart, openEnd);\n}\n\nvar DUMMY_CELL_SIZE = 4;\nvar TR_NODES_SIZE = 2;\nfunction getDummyCellSize(dummyCellCount) {\n return dummyCellCount * DUMMY_CELL_SIZE;\n}\nfunction createPastingCells(tableContent, curSelectionInfo, schema) {\n var pastingRows = [];\n var pastingTableRows = createRowsFromPastingTable(tableContent);\n var columnCount = pastingTableRows[0].childCount;\n var rowCount = pastingTableRows.length;\n var startToTableHead = curSelectionInfo.startRowIdx === 0;\n var slicedRows = pastingTableRows.slice(0, rowCount);\n if (startToTableHead) {\n var tableHeadRow = slicedRows.shift();\n if (tableHeadRow) {\n var content = copyTableHeadRow(tableHeadRow, columnCount, schema).content;\n pastingRows.push(content);\n }\n }\n slicedRows.forEach(function (tableBodyRow) {\n if (!tableBodyRow.attrs.dummyRowForPasting) {\n var content = copyTableBodyRow(tableBodyRow, columnCount, schema).content;\n pastingRows.push(content);\n }\n });\n return pastingRows;\n}\nfunction getPastingRangeInfo(map, _a, pastingCells) {\n var startRowIdx = _a.startRowIdx, startColIdx = _a.startColIdx;\n var pastingRowCount = pastingCells.length;\n var pastingColumnCount = 0;\n var _loop_1 = function (i) {\n var columnCount = pastingCells[i].childCount;\n pastingCells[i].forEach(function (_a) {\n var attrs = _a.attrs;\n var colspan = attrs.colspan;\n if (colspan > 1) {\n columnCount += colspan - 1;\n }\n });\n pastingColumnCount = Math.max(pastingColumnCount, columnCount);\n };\n for (var i = 0; i < pastingRowCount; i += 1) {\n _loop_1(i);\n }\n var endRowIdx = startRowIdx + pastingRowCount - 1;\n var endColIdx = startColIdx + pastingColumnCount - 1;\n var addedRowCount = Math.max(endRowIdx + 1 - map.totalRowCount, 0);\n var addedColumnCount = Math.max(endColIdx + 1 - map.totalColumnCount, 0);\n return {\n startRowIdx: startRowIdx,\n startColIdx: startColIdx,\n endRowIdx: endRowIdx,\n endColIdx: endColIdx,\n addedRowCount: addedRowCount,\n addedColumnCount: addedColumnCount,\n };\n}\nfunction addReplacedOffsets(_a, cellsOffsets) {\n var startRowIdx = _a.startRowIdx, startColIdx = _a.startColIdx, endRowIdx = _a.endRowIdx, endColIdx = _a.endColIdx, addedRowCount = _a.addedRowCount, addedColumnCount = _a.addedColumnCount;\n for (var rowIdx = startRowIdx; rowIdx <= endRowIdx - addedRowCount; rowIdx += 1) {\n cellsOffsets.push({\n rowIdx: rowIdx,\n startColIdx: startColIdx,\n endColIdx: endColIdx - addedColumnCount,\n });\n }\n}\nfunction expandColumns(tr, schema, map, _a, cellsOffsets) {\n var startRowIdx = _a.startRowIdx, startColIdx = _a.startColIdx, endRowIdx = _a.endRowIdx, endColIdx = _a.endColIdx, addedRowCount = _a.addedRowCount, addedColumnCount = _a.addedColumnCount;\n var totalRowCount = map.totalRowCount;\n var index = 0;\n for (var rowIdx = 0; rowIdx < totalRowCount; rowIdx += 1) {\n var _b = map.getCellInfo(rowIdx, endColIdx - addedColumnCount), offset = _b.offset, nodeSize = _b.nodeSize;\n var insertOffset = tr.mapping.map(offset + nodeSize);\n var cells = createDummyCells(addedColumnCount, rowIdx, schema);\n tr.insert(insertOffset, cells);\n if (rowIdx >= startRowIdx && rowIdx <= endRowIdx - addedRowCount) {\n var cellInfo = map.getCellInfo(rowIdx, endColIdx - addedColumnCount);\n var startCellOffset = tr.mapping.map(cellInfo.offset);\n var endCellOffset = insertOffset + getDummyCellSize(addedColumnCount);\n cellsOffsets[index] = {\n rowIdx: rowIdx,\n startColIdx: startColIdx,\n endColIdx: endColIdx,\n dummyOffsets: [startCellOffset, endCellOffset],\n };\n index += 1;\n }\n }\n}\nfunction expandRows(tr, schema, map, _a, cellsOffsets) {\n var addedRowCount = _a.addedRowCount, addedColumnCount = _a.addedColumnCount, startColIdx = _a.startColIdx, endColIdx = _a.endColIdx;\n var mapStart = tr.mapping.maps.length;\n var tableEndPos = map.tableEndOffset - 2;\n var rows = createTableBodyRows(addedRowCount, map.totalColumnCount + addedColumnCount, schema);\n var startOffset = tableEndPos;\n tr.insert(tr.mapping.slice(mapStart).map(startOffset), rows);\n for (var rowIndex = 0; rowIndex < addedRowCount; rowIndex += 1) {\n var startCellOffset = startOffset + getDummyCellSize(startColIdx) + 1;\n var endCellOffset = startOffset + getDummyCellSize(endColIdx + 1) + 1;\n var nextCellOffset = startOffset + getDummyCellSize(map.totalColumnCount + addedColumnCount) + TR_NODES_SIZE;\n cellsOffsets.push({\n rowIdx: rowIndex + map.totalRowCount,\n startColIdx: startColIdx,\n endColIdx: endColIdx,\n dummyOffsets: [startCellOffset, endCellOffset],\n });\n startOffset = nextCellOffset;\n }\n}\nfunction replaceCells(tr, pastingRows, cellsOffsets, map) {\n var mapStart = tr.mapping.maps.length;\n cellsOffsets.forEach(function (offsets, index) {\n var rowIdx = offsets.rowIdx, startColIdx = offsets.startColIdx, endColIdx = offsets.endColIdx, dummyOffsets = offsets.dummyOffsets;\n var mapping = tr.mapping.slice(mapStart);\n var cells = new Slice(pastingRows[index], 0, 0);\n var from = dummyOffsets ? dummyOffsets[0] : map.getCellStartOffset(rowIdx, startColIdx);\n var to = dummyOffsets ? dummyOffsets[1] : map.getCellEndOffset(rowIdx, endColIdx);\n tr.replace(mapping.map(from), mapping.map(to), cells);\n });\n}\nfunction pasteToTable(view, slice) {\n var _a = view.state, selection = _a.selection, schema = _a.schema, tr = _a.tr;\n var _b = getResolvedSelection(selection), anchor = _b.anchor, head = _b.head;\n if (anchor && head) {\n var tableContent = getTableContentFromSlice(slice);\n if (!tableContent) {\n return false;\n }\n var map = TableOffsetMap.create(anchor);\n var curSelectionInfo = map.getRectOffsets(anchor, head);\n var pastingCells = createPastingCells(tableContent, curSelectionInfo, schema);\n var pastingInfo = getPastingRangeInfo(map, curSelectionInfo, pastingCells);\n var cellsOffsets = [];\n // @TODO: unmerge the span and paste the cell\n if (canMerge(map, pastingInfo)) {\n addReplacedOffsets(pastingInfo, cellsOffsets);\n if (pastingInfo.addedColumnCount) {\n expandColumns(tr, schema, map, pastingInfo, cellsOffsets);\n }\n if (pastingInfo.addedRowCount) {\n expandRows(tr, schema, map, pastingInfo, cellsOffsets);\n }\n replaceCells(tr, pastingCells, cellsOffsets, map);\n view.dispatch(tr);\n setSelection(view, cellsOffsets, map.getCellInfo(0, 0).offset);\n }\n return true;\n }\n return false;\n}\nfunction setSelection(view, cellsOffsets, pos) {\n var _a = view.state, tr = _a.tr, doc = _a.doc;\n // get changed cell offsets\n var map = TableOffsetMap.create(doc.resolve(pos));\n // eslint-disable-next-line prefer-destructuring\n var _b = cellsOffsets[0], startRowIdx = _b.rowIdx, startColIdx = _b.startColIdx;\n var _c = last$1(cellsOffsets), endRowIdx = _c.rowIdx, endColIdx = _c.endColIdx;\n var startOffset = map.getCellInfo(startRowIdx, startColIdx).offset;\n var endOffset = map.getCellInfo(endRowIdx, endColIdx).offset;\n view.dispatch(tr.setSelection(new CellSelection(doc.resolve(startOffset), doc.resolve(endOffset))));\n}\nfunction canMerge(map, pastingInfo) {\n var ranges = map.getSpannedOffsets(pastingInfo);\n var _a = getRowAndColumnCount(ranges), rowCount = _a.rowCount, columnCount = _a.columnCount;\n var _b = getRowAndColumnCount(pastingInfo), pastingRowCount = _b.rowCount, pastingColumnCount = _b.columnCount;\n return rowCount === pastingRowCount && columnCount === pastingColumnCount;\n}\n\nvar Doc = /** @class */ (function (_super) {\n __extends$1(Doc, _super);\n function Doc() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Doc.prototype, \"name\", {\n get: function () {\n return 'doc';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Doc.prototype, \"schema\", {\n get: function () {\n return {\n content: 'block+',\n };\n },\n enumerable: false,\n configurable: true\n });\n return Doc;\n}(Node$2));\n\nvar Paragraph = /** @class */ (function (_super) {\n __extends$1(Paragraph, _super);\n function Paragraph() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Paragraph.prototype, \"name\", {\n get: function () {\n return 'paragraph';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Paragraph.prototype, \"schema\", {\n get: function () {\n return {\n content: 'inline*',\n group: 'block',\n attrs: __assign$1({}, getDefaultCustomAttrs()),\n parseDOM: [{ tag: 'p' }],\n toDOM: function (_a) {\n var attrs = _a.attrs;\n return ['p', getCustomAttrs(attrs), 0];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n return Paragraph;\n}(Node$2));\n\nvar reSoftTabLen = /\\s{1,4}$/;\nvar Text = /** @class */ (function (_super) {\n __extends$1(Text, _super);\n function Text() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Text.prototype, \"name\", {\n get: function () {\n return 'text';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Text.prototype, \"schema\", {\n get: function () {\n return {\n group: 'inline',\n };\n },\n enumerable: false,\n configurable: true\n });\n Text.prototype.addSpaces = function () {\n return function (_a, dispatch) {\n var selection = _a.selection, tr = _a.tr;\n var $from = selection.$from, $to = selection.$to;\n var range = $from.blockRange($to);\n if (range && !isInListNode($from) && !isInTableNode($from)) {\n dispatch(tr.insertText(' ', $from.pos, $to.pos));\n return true;\n }\n return false;\n };\n };\n Text.prototype.removeSpaces = function () {\n return function (_a, dispatch) {\n var selection = _a.selection, tr = _a.tr;\n var $from = selection.$from, $to = selection.$to, from = selection.from;\n var range = $from.blockRange($to);\n if (range && !isInListNode($from) && !isInTableNode($from)) {\n var nodeBefore = $from.nodeBefore;\n if (nodeBefore && nodeBefore.isText) {\n var text = nodeBefore.text;\n var removedSpaceText = text.replace(reSoftTabLen, '');\n var spaces = text.length - removedSpaceText.length;\n dispatch(tr.delete(from - spaces, from));\n return true;\n }\n }\n return false;\n };\n };\n Text.prototype.keymaps = function () {\n return {\n Tab: this.addSpaces(),\n 'Shift-Tab': this.removeSpaces(),\n };\n };\n return Text;\n}(Node$2));\n\nvar Heading = /** @class */ (function (_super) {\n __extends$1(Heading, _super);\n function Heading() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Heading.prototype, \"name\", {\n get: function () {\n return 'heading';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Heading.prototype, \"levels\", {\n get: function () {\n return [1, 2, 3, 4, 5, 6];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Heading.prototype, \"schema\", {\n get: function () {\n var parseDOM = this.levels.map(function (level) {\n return {\n tag: \"h\" + level,\n getAttrs: function (dom) {\n var rawHTML = dom.getAttribute('data-raw-html');\n return __assign$1({ level: level }, (rawHTML && { rawHTML: rawHTML }));\n },\n };\n });\n return {\n attrs: __assign$1({ level: { default: 1 }, headingType: { default: 'atx' }, rawHTML: { default: null } }, getDefaultCustomAttrs()),\n content: 'inline*',\n group: 'block',\n defining: true,\n parseDOM: parseDOM,\n toDOM: function (_a) {\n var attrs = _a.attrs;\n return [\"h\" + attrs.level, getCustomAttrs(attrs), 0];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n Heading.prototype.commands = function () {\n return function (payload) { return function (state, dispatch) {\n var nodeType = state.schema.nodes[payload.level ? 'heading' : 'paragraph'];\n return setBlockType(nodeType, payload)(state, dispatch);\n }; };\n };\n return Heading;\n}(Node$2));\n\nvar CodeBlock = /** @class */ (function (_super) {\n __extends$1(CodeBlock, _super);\n function CodeBlock() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(CodeBlock.prototype, \"name\", {\n get: function () {\n return 'codeBlock';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CodeBlock.prototype, \"schema\", {\n get: function () {\n return {\n content: 'text*',\n group: 'block',\n attrs: __assign$1({ language: { default: null }, rawHTML: { default: null } }, getDefaultCustomAttrs()),\n code: true,\n defining: true,\n marks: '',\n parseDOM: [\n {\n tag: 'pre',\n preserveWhitespace: 'full',\n getAttrs: function (dom) {\n var rawHTML = dom.getAttribute('data-raw-html');\n var child = dom.firstElementChild;\n return __assign$1({ language: (child === null || child === void 0 ? void 0 : child.getAttribute('data-language')) || null }, (rawHTML && { rawHTML: rawHTML }));\n },\n },\n ],\n toDOM: function (_a) {\n var attrs = _a.attrs;\n return [\n attrs.rawHTML || 'pre',\n ['code', __assign$1({ 'data-language': attrs.language }, getCustomAttrs(attrs)), 0],\n ];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n CodeBlock.prototype.commands = function () {\n return function () { return function (state, dispatch) { return setBlockType(state.schema.nodes.codeBlock)(state, dispatch); }; };\n };\n CodeBlock.prototype.moveCursor = function (direction) {\n var _this = this;\n return function (state, dispatch) {\n var tr = state.tr, doc = state.doc, schema = state.schema;\n var $from = state.selection.$from;\n var view = _this.context.view;\n if (view.endOfTextblock(direction) && $from.node().type.name === 'codeBlock') {\n var lines = $from.parent.textContent.split('\\n');\n var offset = direction === 'up' ? $from.start() : $from.end();\n var range = direction === 'up'\n ? [offset, lines[0].length + offset]\n : [offset - last$1(lines).length, offset];\n var pos = doc.resolve(direction === 'up' ? $from.before() : $from.after());\n var node = direction === 'up' ? pos.nodeBefore : pos.nodeAfter;\n if (between$1($from.pos, range[0], range[1]) && !node) {\n var newTr = addParagraph(tr, pos, schema);\n if (newTr) {\n dispatch(newTr);\n return true;\n }\n }\n }\n return false;\n };\n };\n CodeBlock.prototype.keymaps = function () {\n var codeCommand = this.commands()();\n return {\n 'Shift-Mod-p': codeCommand,\n 'Shift-Mod-P': codeCommand,\n ArrowUp: this.moveCursor('up'),\n ArrowDown: this.moveCursor('down'),\n };\n };\n return CodeBlock;\n}(Node$2));\n\nvar BulletList = /** @class */ (function (_super) {\n __extends$1(BulletList, _super);\n function BulletList() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(BulletList.prototype, \"name\", {\n get: function () {\n return 'bulletList';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BulletList.prototype, \"schema\", {\n get: function () {\n return {\n content: 'listItem+',\n group: 'block',\n attrs: __assign$1({ rawHTML: { default: null } }, getDefaultCustomAttrs()),\n parseDOM: [createDOMInfoParsedRawHTML('ul')],\n toDOM: function (_a) {\n var attrs = _a.attrs;\n return ['ul', getCustomAttrs(attrs), 0];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n BulletList.prototype.changeList = function () {\n return function (state, dispatch) { return changeList(state.schema.nodes.bulletList)(state, dispatch); };\n };\n BulletList.prototype.commands = function () {\n return {\n bulletList: this.changeList,\n taskList: toggleTask,\n };\n };\n BulletList.prototype.keymaps = function () {\n var bulletListCommand = this.changeList();\n var _a = getWwCommands(), indent = _a.indent, outdent = _a.outdent;\n return {\n 'Mod-u': bulletListCommand,\n 'Mod-U': bulletListCommand,\n Tab: indent(),\n 'Shift-Tab': outdent(),\n };\n };\n return BulletList;\n}(Node$2));\n\nvar OrderedList = /** @class */ (function (_super) {\n __extends$1(OrderedList, _super);\n function OrderedList() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(OrderedList.prototype, \"name\", {\n get: function () {\n return 'orderedList';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(OrderedList.prototype, \"schema\", {\n get: function () {\n return {\n content: 'listItem+',\n group: 'block',\n attrs: __assign$1({ order: { default: 1 }, rawHTML: { default: null } }, getDefaultCustomAttrs()),\n parseDOM: [\n {\n tag: 'ol',\n getAttrs: function (dom) {\n var start = dom.getAttribute('start');\n var rawHTML = dom.getAttribute('data-raw-html');\n return __assign$1({ order: dom.hasAttribute('start') ? Number(start) : 1 }, (rawHTML && { rawHTML: rawHTML }));\n },\n },\n ],\n toDOM: function (_a) {\n var attrs = _a.attrs;\n return [\n attrs.rawHTML || 'ol',\n __assign$1({ start: attrs.order === 1 ? null : attrs.order }, getCustomAttrs(attrs)),\n 0,\n ];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n OrderedList.prototype.commands = function () {\n return function () { return function (state, dispatch) { return changeList(state.schema.nodes.orderedList)(state, dispatch); }; };\n };\n OrderedList.prototype.keymaps = function () {\n var orderedListCommand = this.commands()();\n var _a = getWwCommands(), indent = _a.indent, outdent = _a.outdent;\n return {\n 'Mod-o': orderedListCommand,\n 'Mod-O': orderedListCommand,\n Tab: indent(),\n 'Shift-Tab': outdent(),\n };\n };\n return OrderedList;\n}(Node$2));\n\nvar ListItem = /** @class */ (function (_super) {\n __extends$1(ListItem, _super);\n function ListItem() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(ListItem.prototype, \"name\", {\n get: function () {\n return 'listItem';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ListItem.prototype, \"schema\", {\n get: function () {\n return {\n content: 'paragraph block*',\n selectable: false,\n attrs: {\n task: { default: false },\n checked: { default: false },\n rawHTML: { default: null },\n },\n defining: true,\n parseDOM: [\n {\n tag: 'li',\n getAttrs: function (dom) {\n var rawHTML = dom.getAttribute('data-raw-html');\n return __assign$1({ task: dom.hasAttribute('data-task'), checked: dom.hasAttribute('data-task-checked') }, (rawHTML && { rawHTML: rawHTML }));\n },\n },\n ],\n toDOM: function (_a) {\n var attrs = _a.attrs;\n var task = attrs.task, checked = attrs.checked;\n if (!task) {\n return [attrs.rawHTML || 'li', 0];\n }\n var classNames = ['task-list-item'];\n if (checked) {\n classNames.push('checked');\n }\n return [\n attrs.rawHTML || 'li',\n __assign$1({ class: classNames.join(' '), 'data-task': task }, (checked && { 'data-task-checked': checked })),\n 0,\n ];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n ListItem.prototype.liftToPrevListItem = function () {\n return function (state, dispatch) {\n var selection = state.selection, tr = state.tr, schema = state.schema;\n var $from = selection.$from, empty = selection.empty;\n var listItem = schema.nodes.listItem;\n var parent = $from.parent;\n var listItemParent = $from.node(-1);\n if (empty && !parent.childCount && listItemParent.type === listItem) {\n // move to previous sibling list item when the current list item is not top list item\n if ($from.index(-2) >= 1) {\n // should subtract '1' for considering tag length(<li>)\n tr.delete($from.start(-1) - 1, $from.end(-1));\n dispatch(tr);\n return true;\n }\n var grandParentListItem = $from.node(-3);\n // move to parent list item when the current list item is top list item\n if (grandParentListItem.type === listItem) {\n // should subtract '1' for considering tag length(<ul>)\n tr.delete($from.start(-2) - 1, $from.end(-1));\n dispatch(tr);\n return true;\n }\n }\n return false;\n };\n };\n ListItem.prototype.keymaps = function () {\n var split = function (state, dispatch) {\n return splitListItem(state.schema.nodes.listItem)(state, dispatch);\n };\n return {\n Backspace: this.liftToPrevListItem(),\n Enter: split,\n };\n };\n return ListItem;\n}(Node$2));\n\nvar BlockQuote = /** @class */ (function (_super) {\n __extends$1(BlockQuote, _super);\n function BlockQuote() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(BlockQuote.prototype, \"name\", {\n get: function () {\n return 'blockQuote';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BlockQuote.prototype, \"schema\", {\n get: function () {\n return {\n attrs: __assign$1({ rawHTML: { default: null } }, getDefaultCustomAttrs()),\n content: 'block+',\n group: 'block',\n parseDOM: [createDOMInfoParsedRawHTML('blockquote')],\n toDOM: function (_a) {\n var attrs = _a.attrs;\n return ['blockquote', getCustomAttrs(attrs), 0];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n BlockQuote.prototype.commands = function () {\n return function () { return function (state, dispatch) { return wrapIn(state.schema.nodes.blockQuote)(state, dispatch); }; };\n };\n BlockQuote.prototype.keymaps = function () {\n var blockQutoeCommand = this.commands()();\n return {\n 'Alt-q': blockQutoeCommand,\n 'Alt-Q': blockQutoeCommand,\n };\n };\n return BlockQuote;\n}(Node$2));\n\nvar cellOffsetFnMap = {\n left: getLeftCellOffset,\n right: getRightCellOffset,\n up: getUpCellOffset,\n down: getDownCellOffset,\n};\nfunction isInFirstListItem(pos, doc, _a) {\n var paraDepth = _a[0], listDepth = _a[1];\n var listItemNode = doc.resolve(pos.before(paraDepth - 1));\n return listDepth === paraDepth && !listItemNode.nodeBefore;\n}\nfunction isInLastListItem(pos) {\n var _a;\n var depth = pos.depth;\n var parentNode;\n while (depth) {\n parentNode = pos.node(depth);\n if (parentNode.type.name === 'tableBodyCell') {\n break;\n }\n if (parentNode.type.name === 'listItem') {\n var grandParent = pos.node(depth - 1);\n var lastListItem = grandParent.lastChild === parentNode;\n var hasChildren = ((_a = parentNode.lastChild) === null || _a === void 0 ? void 0 : _a.type.name) !== 'paragraph';\n if (!lastListItem) {\n return false;\n }\n return !hasChildren;\n }\n depth -= 1;\n }\n return false;\n}\nfunction canMoveToBeforeCell(direction, _a, from, doc, inList) {\n var paraDepth = _a[0], listDepth = _a[1], curDepth = _a[2];\n if (direction === \"left\" /* LEFT */ || direction === \"up\" /* UP */) {\n if (inList && !isInFirstListItem(from, doc, [paraDepth, listDepth])) {\n return false;\n }\n var endOffset = from.before(curDepth);\n var nodeBefore = doc.resolve(endOffset).nodeBefore;\n if (nodeBefore) {\n return false;\n }\n }\n return true;\n}\nfunction canMoveToAfterCell(direction, curDepth, from, doc, inList) {\n if (direction === \"right\" /* RIGHT */ || direction === \"down\" /* DOWN */) {\n if (inList && !isInLastListItem(from)) {\n return false;\n }\n var endOffset = from.after(curDepth);\n var nodeAfter = doc.resolve(endOffset).nodeAfter;\n if (nodeAfter) {\n return false;\n }\n }\n return true;\n}\nfunction canMoveBetweenCells(direction, _a, from, doc) {\n var cellDepth = _a[0], paraDepth = _a[1];\n var listDepth = cellDepth + 3; // 3 is position of <ul><li><p>\n var inList = paraDepth >= listDepth;\n var curDepth = inList ? cellDepth + 1 : paraDepth;\n var moveBeforeCell = canMoveToBeforeCell(direction, [paraDepth, listDepth, curDepth], from, doc, inList);\n var moveAfterCell = canMoveToAfterCell(direction, curDepth, from, doc, inList);\n return moveBeforeCell && moveAfterCell;\n}\nfunction canBeOutOfTable(direction, map, _a) {\n var rowIdx = _a[0], colIdx = _a[1];\n var rowspanInfo = map.getRowspanStartInfo(rowIdx, colIdx);\n var inFirstRow = direction === \"up\" /* UP */ && rowIdx === 0;\n var inLastRow = direction === \"down\" /* DOWN */ &&\n ((rowspanInfo === null || rowspanInfo === void 0 ? void 0 : rowspanInfo.count) > 1 ? rowIdx + rowspanInfo.count - 1 : rowIdx) === map.totalRowCount - 1;\n return inFirstRow || inLastRow;\n}\nfunction addParagraphBeforeTable(tr, map, schema) {\n var tableStartPos = tr.doc.resolve(map.tableStartOffset - 1);\n if (!tableStartPos.nodeBefore) {\n return addParagraph(tr, tableStartPos, schema);\n }\n return tr.setSelection(Selection.near(tableStartPos, -1));\n}\nfunction addParagraphAfterTable(tr, map, schema, forcedAddtion) {\n if (forcedAddtion === void 0) { forcedAddtion = false; }\n var tableEndPos = tr.doc.resolve(map.tableEndOffset);\n if (forcedAddtion || !tableEndPos.nodeAfter) {\n return addParagraph(tr, tableEndPos, schema);\n }\n return tr.setSelection(Selection.near(tableEndPos, 1));\n}\nfunction getRightCellOffset(_a, map) {\n var rowIdx = _a[0], colIdx = _a[1];\n var totalRowCount = map.totalRowCount, totalColumnCount = map.totalColumnCount;\n var lastCellInRow = colIdx === totalColumnCount - 1;\n var lastCellInTable = rowIdx === totalRowCount - 1 && lastCellInRow;\n if (!lastCellInTable) {\n var nextColIdx = colIdx + 1;\n var colspanInfo = map.getColspanStartInfo(rowIdx, colIdx);\n if ((colspanInfo === null || colspanInfo === void 0 ? void 0 : colspanInfo.count) > 1) {\n nextColIdx += colspanInfo.count - 1;\n }\n if (lastCellInRow || nextColIdx === totalColumnCount) {\n rowIdx += 1;\n nextColIdx = 0;\n }\n var offset = map.getCellInfo(rowIdx, nextColIdx).offset;\n return offset + 2;\n }\n return null;\n}\nfunction getLeftCellOffset(_a, map) {\n var rowIdx = _a[0], colIdx = _a[1];\n var totalColumnCount = map.totalColumnCount;\n var firstCellInRow = colIdx === 0;\n var firstCellInTable = rowIdx === 0 && firstCellInRow;\n if (!firstCellInTable) {\n colIdx -= 1;\n if (firstCellInRow) {\n rowIdx -= 1;\n colIdx = totalColumnCount - 1;\n }\n var _b = map.getCellInfo(rowIdx, colIdx), offset = _b.offset, nodeSize = _b.nodeSize;\n return offset + nodeSize - 2;\n }\n return null;\n}\nfunction getUpCellOffset(_a, map) {\n var rowIdx = _a[0], colIdx = _a[1];\n if (rowIdx > 0) {\n var _b = map.getCellInfo(rowIdx - 1, colIdx), offset = _b.offset, nodeSize = _b.nodeSize;\n return offset + nodeSize - 2;\n }\n return null;\n}\nfunction getDownCellOffset(_a, map) {\n var rowIdx = _a[0], colIdx = _a[1];\n var totalRowCount = map.totalRowCount;\n if (rowIdx < totalRowCount - 1) {\n var nextRowIdx = rowIdx + 1;\n var rowspanInfo = map.getRowspanStartInfo(rowIdx, colIdx);\n if ((rowspanInfo === null || rowspanInfo === void 0 ? void 0 : rowspanInfo.count) > 1) {\n nextRowIdx += rowspanInfo.count - 1;\n }\n var offset = map.getCellInfo(nextRowIdx, colIdx).offset;\n return offset + 2;\n }\n return null;\n}\nfunction moveToCell(direction, tr, cellIndex, map) {\n var cellOffsetFn = cellOffsetFnMap[direction];\n var offset = cellOffsetFn(cellIndex, map);\n if (offset) {\n var dir = direction === \"right\" /* RIGHT */ || direction === \"down\" /* DOWN */ ? 1 : -1;\n return tr.setSelection(Selection.near(tr.doc.resolve(offset), dir));\n }\n return null;\n}\nfunction canSelectTableNode(direction, map, _a) {\n var rowIdx = _a[0], colIdx = _a[1];\n if (direction === \"up\" /* UP */ || direction === \"down\" /* DOWN */) {\n return false;\n }\n var tableStartOffset = map.tableStartOffset, tableEndOffset = map.tableEndOffset;\n var _b = map.getCellInfo(rowIdx, colIdx), offset = _b.offset, nodeSize = _b.nodeSize;\n var pos = direction === \"left\" /* LEFT */ ? tableStartOffset : tableEndOffset;\n var curPos = direction === \"left\" /* LEFT */ ? offset - 2 : offset + nodeSize + 3;\n return pos === curPos;\n}\nfunction selectNode(tr, pos, depth) {\n var tablePos = tr.doc.resolve(pos.before(depth - 3));\n return tr.setSelection(new NodeSelection(tablePos));\n}\n\nfunction getTargetRowInfo(direction, map, selectionInfo) {\n var targetRowIdx;\n var insertColIdx;\n var nodeSize;\n if (direction === \"up\" /* UP */) {\n targetRowIdx = selectionInfo.startRowIdx;\n insertColIdx = 0;\n nodeSize = -1;\n }\n else {\n targetRowIdx = selectionInfo.endRowIdx;\n insertColIdx = map.totalColumnCount - 1;\n nodeSize = map.getCellInfo(targetRowIdx, insertColIdx).nodeSize + 1;\n }\n return { targetRowIdx: targetRowIdx, insertColIdx: insertColIdx, nodeSize: nodeSize };\n}\nfunction getRowRanges(map, rowIdx, totalColumnCount) {\n var startOffset = map.getCellInfo(rowIdx, 0).offset;\n var _a = map.getCellInfo(rowIdx, totalColumnCount - 1), offset = _a.offset, nodeSize = _a.nodeSize;\n return { from: startOffset, to: offset + nodeSize };\n}\nvar Table = /** @class */ (function (_super) {\n __extends$1(Table, _super);\n function Table() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Table.prototype, \"name\", {\n get: function () {\n return 'table';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Table.prototype, \"schema\", {\n get: function () {\n return {\n content: 'tableHead{1} tableBody{1}',\n group: 'block',\n attrs: __assign$1({ rawHTML: { default: null } }, getDefaultCustomAttrs()),\n parseDOM: [createDOMInfoParsedRawHTML('table')],\n toDOM: function (_a) {\n var attrs = _a.attrs;\n return ['table', getCustomAttrs(attrs), 0];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n Table.prototype.addTable = function () {\n return function (payload) {\n if (payload === void 0) { payload = { rowCount: 2, columnCount: 1, data: [] }; }\n return function (state, dispatch) {\n var rowCount = payload.rowCount, columnCount = payload.columnCount, data = payload.data;\n var schema = state.schema, selection = state.selection, tr = state.tr;\n var from = selection.from, to = selection.to, $from = selection.$from;\n var collapsed = from === to;\n if (collapsed && !isInTableNode($from)) {\n var _a = schema.nodes, tableHead = _a.tableHead, tableBody = _a.tableBody;\n var theadData = data === null || data === void 0 ? void 0 : data.slice(0, columnCount);\n var tbodyData = data === null || data === void 0 ? void 0 : data.slice(columnCount, data.length);\n var tableHeadRow = createTableHeadRow(columnCount, schema, theadData);\n var tableBodyRows = createTableBodyRows(rowCount - 1, columnCount, schema, tbodyData);\n var table = schema.nodes.table.create(null, [\n tableHead.create(null, tableHeadRow),\n tableBody.create(null, tableBodyRows),\n ]);\n dispatch(tr.replaceSelectionWith(table));\n return true;\n }\n return false;\n };\n };\n };\n Table.prototype.removeTable = function () {\n return function () { return function (state, dispatch) {\n var selection = state.selection, tr = state.tr;\n var map = TableOffsetMap.create(selection.$anchor);\n if (map) {\n var tableStartOffset = map.tableStartOffset, tableEndOffset = map.tableEndOffset;\n var startOffset = tableStartOffset - 1;\n var cursorPos = createTextSelection(tr.delete(startOffset, tableEndOffset), startOffset);\n dispatch(tr.setSelection(cursorPos));\n return true;\n }\n return false;\n }; };\n };\n Table.prototype.addColumn = function (direction) {\n return function () { return function (state, dispatch) {\n var selection = state.selection, tr = state.tr, schema = state.schema;\n var _a = getResolvedSelection(selection), anchor = _a.anchor, head = _a.head;\n if (anchor && head) {\n var map = TableOffsetMap.create(anchor);\n var selectionInfo = map.getRectOffsets(anchor, head);\n var targetColIdx = direction === \"left\" /* LEFT */ ? selectionInfo.startColIdx : selectionInfo.endColIdx + 1;\n var columnCount = getRowAndColumnCount(selectionInfo).columnCount;\n var totalRowCount = map.totalRowCount;\n for (var rowIdx = 0; rowIdx < totalRowCount; rowIdx += 1) {\n var cells = createDummyCells(columnCount, rowIdx, schema);\n tr.insert(tr.mapping.map(map.posAt(rowIdx, targetColIdx)), cells);\n }\n dispatch(tr);\n return true;\n }\n return false;\n }; };\n };\n Table.prototype.removeColumn = function () {\n return function () { return function (state, dispatch) {\n var selection = state.selection, tr = state.tr;\n var _a = getResolvedSelection(selection), anchor = _a.anchor, head = _a.head;\n if (anchor && head) {\n var map = TableOffsetMap.create(anchor);\n var selectionInfo = map.getRectOffsets(anchor, head);\n var totalColumnCount = map.totalColumnCount, totalRowCount = map.totalRowCount;\n var columnCount = getRowAndColumnCount(selectionInfo).columnCount;\n var selectedAllColumn = columnCount === totalColumnCount;\n if (selectedAllColumn) {\n return false;\n }\n var startColIdx = selectionInfo.startColIdx, endColIdx = selectionInfo.endColIdx;\n var mapStart = tr.mapping.maps.length;\n for (var rowIdx = 0; rowIdx < totalRowCount; rowIdx += 1) {\n for (var colIdx = endColIdx; colIdx >= startColIdx; colIdx -= 1) {\n var _b = map.getCellInfo(rowIdx, colIdx), offset = _b.offset, nodeSize = _b.nodeSize;\n var from = tr.mapping.slice(mapStart).map(offset);\n var to = from + nodeSize;\n tr.delete(from, to);\n }\n }\n dispatch(tr);\n return true;\n }\n return false;\n }; };\n };\n Table.prototype.addRow = function (direction) {\n return function () { return function (state, dispatch) {\n var selection = state.selection, schema = state.schema, tr = state.tr;\n var _a = getResolvedSelection(selection), anchor = _a.anchor, head = _a.head;\n if (anchor && head) {\n var map = TableOffsetMap.create(anchor);\n var totalColumnCount = map.totalColumnCount;\n var selectionInfo = map.getRectOffsets(anchor, head);\n var rowCount = getRowAndColumnCount(selectionInfo).rowCount;\n var _b = getTargetRowInfo(direction, map, selectionInfo), targetRowIdx = _b.targetRowIdx, insertColIdx = _b.insertColIdx, nodeSize = _b.nodeSize;\n var selectedThead = targetRowIdx === 0;\n if (!selectedThead) {\n var rows = [];\n var from = tr.mapping.map(map.posAt(targetRowIdx, insertColIdx)) + nodeSize;\n var cells = [];\n for (var colIdx = 0; colIdx < totalColumnCount; colIdx += 1) {\n cells = cells.concat(createDummyCells(1, targetRowIdx, schema));\n }\n for (var i = 0; i < rowCount; i += 1) {\n rows.push(schema.nodes.tableRow.create(null, cells));\n }\n dispatch(tr.insert(from, rows));\n return true;\n }\n }\n return false;\n }; };\n };\n Table.prototype.removeRow = function () {\n return function () { return function (state, dispatch) {\n var selection = state.selection, tr = state.tr;\n var _a = getResolvedSelection(selection), anchor = _a.anchor, head = _a.head;\n if (anchor && head) {\n var map = TableOffsetMap.create(anchor);\n var totalRowCount = map.totalRowCount, totalColumnCount = map.totalColumnCount;\n var selectionInfo = map.getRectOffsets(anchor, head);\n var rowCount = getRowAndColumnCount(selectionInfo).rowCount;\n var startRowIdx = selectionInfo.startRowIdx, endRowIdx = selectionInfo.endRowIdx;\n var selectedThead = startRowIdx === 0;\n var selectedAllTbodyRow = rowCount === totalRowCount - 1;\n if (selectedAllTbodyRow || selectedThead) {\n return false;\n }\n for (var rowIdx = endRowIdx; rowIdx >= startRowIdx; rowIdx -= 1) {\n var _b = getRowRanges(map, rowIdx, totalColumnCount), from = _b.from, to = _b.to;\n // delete table row\n tr.delete(from - 1, to + 1);\n }\n dispatch(tr);\n return true;\n }\n return false;\n }; };\n };\n Table.prototype.alignColumn = function () {\n return function (payload) {\n if (payload === void 0) { payload = { align: 'center' }; }\n return function (state, dispatch) {\n var align = payload.align;\n var selection = state.selection, tr = state.tr;\n var _a = getResolvedSelection(selection), anchor = _a.anchor, head = _a.head;\n if (anchor && head) {\n var map = TableOffsetMap.create(anchor);\n var totalRowCount = map.totalRowCount;\n var selectionInfo = map.getRectOffsets(anchor, head);\n var startColIdx = selectionInfo.startColIdx, endColIdx = selectionInfo.endColIdx;\n for (var rowIdx = 0; rowIdx < totalRowCount; rowIdx += 1) {\n for (var colIdx = startColIdx; colIdx <= endColIdx; colIdx += 1) {\n if (!map.extendedRowspan(rowIdx, colIdx) && !map.extendedColspan(rowIdx, colIdx)) {\n var _b = map.getNodeAndPos(rowIdx, colIdx), node = _b.node, pos = _b.pos;\n var attrs = setAttrs(node, { align: align });\n tr.setNodeMarkup(pos, null, attrs);\n }\n }\n }\n dispatch(tr);\n return true;\n }\n return false;\n };\n };\n };\n Table.prototype.moveToCell = function (direction) {\n return function (state, dispatch) {\n var selection = state.selection, tr = state.tr, schema = state.schema;\n var _a = getResolvedSelection(selection), anchor = _a.anchor, head = _a.head;\n if (anchor && head) {\n var map = TableOffsetMap.create(anchor);\n var cellIndex = map.getCellIndex(anchor);\n var newTr = void 0;\n if (canBeOutOfTable(direction, map, cellIndex)) {\n // When there is no content before or after the table,\n // an empty line('paragraph') is created by pressing the arrow keys.\n newTr = addParagraphAfterTable(tr, map, schema);\n }\n else {\n newTr = moveToCell(direction, tr, cellIndex, map);\n }\n if (newTr) {\n dispatch(newTr);\n return true;\n }\n }\n return false;\n };\n };\n Table.prototype.moveInCell = function (direction) {\n var _this = this;\n return function (state, dispatch) {\n var selection = state.selection, tr = state.tr, doc = state.doc, schema = state.schema;\n var $from = selection.$from;\n var view = _this.context.view;\n if (!view.endOfTextblock(direction)) {\n return false;\n }\n var cell = findNodeBy($from, function (_a) {\n var type = _a.type;\n return type.name === 'tableHeadCell' || type.name === 'tableBodyCell';\n });\n if (cell) {\n var para = findNodeBy($from, function (_a) {\n var type = _a.type;\n return type.name === 'paragraph';\n });\n var cellDepth = cell.depth;\n if (para && canMoveBetweenCells(direction, [cellDepth, para.depth], $from, doc)) {\n var anchor = getResolvedSelection(selection).anchor;\n var map = TableOffsetMap.create(anchor);\n var cellIndex = map.getCellIndex(anchor);\n var newTr = void 0;\n if (canSelectTableNode(direction, map, cellIndex)) {\n // When the cursor position is at the end of the cell,\n // the table is selected when the left / right arrow keys are pressed.\n newTr = selectNode(tr, $from, cellDepth);\n }\n else if (canBeOutOfTable(direction, map, cellIndex)) {\n // When there is no content before or after the table,\n // an empty line('paragraph') is created by pressing the arrow keys.\n if (direction === \"up\" /* UP */) {\n newTr = addParagraphBeforeTable(tr, map, schema);\n }\n else if (direction === \"down\" /* DOWN */) {\n newTr = addParagraphAfterTable(tr, map, schema);\n }\n }\n else {\n newTr = moveToCell(direction, tr, cellIndex, map);\n }\n if (newTr) {\n dispatch(newTr);\n return true;\n }\n }\n }\n return false;\n };\n };\n Table.prototype.deleteCells = function () {\n return function (state, dispatch) {\n var schema = state.schema, selection = state.selection, tr = state.tr;\n var _a = getResolvedSelection(selection), anchor = _a.anchor, head = _a.head;\n var textSelection = selection instanceof TextSelection;\n if (anchor && head && !textSelection) {\n var map = TableOffsetMap.create(anchor);\n var _b = map.getRectOffsets(anchor, head), startRowIdx = _b.startRowIdx, startColIdx = _b.startColIdx, endRowIdx = _b.endRowIdx, endColIdx = _b.endColIdx;\n for (var rowIdx = startRowIdx; rowIdx <= endRowIdx; rowIdx += 1) {\n for (var colIdx = startColIdx; colIdx <= endColIdx; colIdx += 1) {\n if (!map.extendedRowspan(rowIdx, colIdx) && !map.extendedColspan(rowIdx, colIdx)) {\n var _c = map.getNodeAndPos(rowIdx, colIdx), node = _c.node, pos = _c.pos;\n var cells = createDummyCells(1, rowIdx, schema, node.attrs);\n tr.replaceWith(tr.mapping.map(pos), tr.mapping.map(pos + node.nodeSize), cells);\n }\n }\n }\n dispatch(tr);\n return true;\n }\n return false;\n };\n };\n Table.prototype.exitTable = function () {\n return function (state, dispatch) {\n var selection = state.selection, tr = state.tr, schema = state.schema;\n var $from = selection.$from;\n var cell = findNodeBy($from, function (_a) {\n var type = _a.type;\n return type.name === 'tableHeadCell' || type.name === 'tableBodyCell';\n });\n if (cell) {\n var para = findNodeBy($from, function (_a) {\n var type = _a.type;\n return type.name === 'paragraph';\n });\n if (para) {\n var anchor = getResolvedSelection(selection).anchor;\n var map = TableOffsetMap.create(anchor);\n dispatch(addParagraphAfterTable(tr, map, schema, true));\n return true;\n }\n }\n return false;\n };\n };\n Table.prototype.commands = function () {\n return {\n addTable: this.addTable(),\n removeTable: this.removeTable(),\n addColumnToLeft: this.addColumn(\"left\" /* LEFT */),\n addColumnToRight: this.addColumn(\"right\" /* RIGHT */),\n removeColumn: this.removeColumn(),\n addRowToUp: this.addRow(\"up\" /* UP */),\n addRowToDown: this.addRow(\"down\" /* DOWN */),\n removeRow: this.removeRow(),\n alignColumn: this.alignColumn(),\n };\n };\n Table.prototype.keymaps = function () {\n var deleteCellContent = this.deleteCells();\n return {\n Tab: this.moveToCell(\"right\" /* RIGHT */),\n 'Shift-Tab': this.moveToCell(\"left\" /* LEFT */),\n ArrowUp: this.moveInCell(\"up\" /* UP */),\n ArrowDown: this.moveInCell(\"down\" /* DOWN */),\n ArrowLeft: this.moveInCell(\"left\" /* LEFT */),\n ArrowRight: this.moveInCell(\"right\" /* RIGHT */),\n Backspace: deleteCellContent,\n 'Mod-Backspace': deleteCellContent,\n Delete: deleteCellContent,\n 'Mod-Delete': deleteCellContent,\n 'Mod-Enter': this.exitTable(),\n };\n };\n return Table;\n}(Node$2));\n\nvar TableHead = /** @class */ (function (_super) {\n __extends$1(TableHead, _super);\n function TableHead() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(TableHead.prototype, \"name\", {\n get: function () {\n return 'tableHead';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TableHead.prototype, \"schema\", {\n get: function () {\n return {\n content: 'tableRow{1}',\n attrs: __assign$1({ rawHTML: { default: null } }, getDefaultCustomAttrs()),\n parseDOM: [createDOMInfoParsedRawHTML('thead')],\n toDOM: function (_a) {\n var attrs = _a.attrs;\n return ['thead', getCustomAttrs(attrs), 0];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n return TableHead;\n}(Node$2));\n\nvar TableBody = /** @class */ (function (_super) {\n __extends$1(TableBody, _super);\n function TableBody() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(TableBody.prototype, \"name\", {\n get: function () {\n return 'tableBody';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TableBody.prototype, \"schema\", {\n get: function () {\n return {\n content: 'tableRow+',\n attrs: __assign$1({ rawHTML: { default: null } }, getDefaultCustomAttrs()),\n parseDOM: [\n {\n tag: 'tbody',\n getAttrs: function (dom) {\n var rows = dom.querySelectorAll('tr');\n var columns = rows[0].children.length;\n var rawHTML = dom.getAttribute('data-raw-html');\n if (!columns) {\n return false;\n }\n return __assign$1({}, (rawHTML && { rawHTML: rawHTML }));\n },\n },\n ],\n toDOM: function (_a) {\n var attrs = _a.attrs;\n return ['tbody', getCustomAttrs(attrs), 0];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n return TableBody;\n}(Node$2));\n\nvar TableRow = /** @class */ (function (_super) {\n __extends$1(TableRow, _super);\n function TableRow() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(TableRow.prototype, \"name\", {\n get: function () {\n return 'tableRow';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TableRow.prototype, \"schema\", {\n get: function () {\n return {\n content: '(tableHeadCell | tableBodyCell)*',\n attrs: __assign$1({ rawHTML: { default: null } }, getDefaultCustomAttrs()),\n parseDOM: [\n {\n tag: 'tr',\n getAttrs: function (dom) {\n var columns = dom.children.length;\n var rawHTML = dom.getAttribute('data-raw-html');\n if (!columns) {\n return false;\n }\n return __assign$1({}, (rawHTML && { rawHTML: rawHTML }));\n },\n },\n ],\n toDOM: function (_a) {\n var attrs = _a.attrs;\n return ['tr', getCustomAttrs(attrs), 0];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n return TableRow;\n}(Node$2));\n\nvar TableHeadCell = /** @class */ (function (_super) {\n __extends$1(TableHeadCell, _super);\n function TableHeadCell() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(TableHeadCell.prototype, \"name\", {\n get: function () {\n return 'tableHeadCell';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TableHeadCell.prototype, \"schema\", {\n get: function () {\n return {\n content: 'paragraph+',\n attrs: __assign$1({ align: { default: null }, className: { default: null }, rawHTML: { default: null }, colspan: { default: null }, extended: { default: null } }, getDefaultCustomAttrs()),\n isolating: true,\n parseDOM: [createParsedCellDOM('th')],\n toDOM: function (_a) {\n var attrs = _a.attrs;\n var cellAttrs = createCellAttrs(attrs);\n return ['th', __assign$1(__assign$1({}, cellAttrs), getCustomAttrs(attrs)), 0];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n return TableHeadCell;\n}(Node$2));\n\nvar TableBodyCell = /** @class */ (function (_super) {\n __extends$1(TableBodyCell, _super);\n function TableBodyCell() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(TableBodyCell.prototype, \"name\", {\n get: function () {\n return 'tableBodyCell';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TableBodyCell.prototype, \"schema\", {\n get: function () {\n return {\n content: '(paragraph | bulletList | orderedList)+',\n attrs: {\n align: { default: null },\n className: { default: null },\n rawHTML: { default: null },\n colspan: { default: null },\n rowspan: { default: null },\n extended: { default: null },\n },\n isolating: true,\n parseDOM: [createParsedCellDOM('td')],\n toDOM: function (_a) {\n var attrs = _a.attrs;\n var cellAttrs = createCellAttrs(attrs);\n return ['td', cellAttrs, 0];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n return TableBodyCell;\n}(Node$2));\n\nvar Image = /** @class */ (function (_super) {\n __extends$1(Image, _super);\n function Image() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Image.prototype, \"name\", {\n get: function () {\n return 'image';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Image.prototype, \"schema\", {\n get: function () {\n return {\n inline: true,\n attrs: __assign$1({ imageUrl: { default: '' }, altText: { default: null }, rawHTML: { default: null } }, getDefaultCustomAttrs()),\n group: 'inline',\n selectable: false,\n parseDOM: [\n {\n tag: 'img[src]',\n getAttrs: function (dom) {\n var sanitizedDOM = sanitizeHTML(dom, { RETURN_DOM_FRAGMENT: true })\n .firstChild;\n var imageUrl = sanitizedDOM.getAttribute('src') || '';\n var rawHTML = sanitizedDOM.getAttribute('data-raw-html');\n var altText = sanitizedDOM.getAttribute('alt');\n return __assign$1({ imageUrl: imageUrl,\n altText: altText }, (rawHTML && { rawHTML: rawHTML }));\n },\n },\n ],\n toDOM: function (_a) {\n var attrs = _a.attrs;\n return [\n attrs.rawHTML || 'img',\n __assign$1(__assign$1({ src: escapeXml$1(attrs.imageUrl) }, (attrs.altText && { alt: attrs.altText })), getCustomAttrs(attrs)),\n ];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n Image.prototype.addImage = function () {\n return function (payload) { return function (_a, dispatch) {\n var schema = _a.schema, tr = _a.tr;\n var _b = payload, imageUrl = _b.imageUrl, altText = _b.altText;\n if (!imageUrl) {\n return false;\n }\n var node = schema.nodes.image.createAndFill(__assign$1({ imageUrl: imageUrl }, (altText && { altText: altText })));\n dispatch(tr.replaceSelectionWith(node).scrollIntoView());\n return true;\n }; };\n };\n Image.prototype.commands = function () {\n return {\n addImage: this.addImage(),\n };\n };\n return Image;\n}(Node$2));\n\nvar ROOT_BLOCK_DEPTH = 1;\nvar ThematicBreak = /** @class */ (function (_super) {\n __extends$1(ThematicBreak, _super);\n function ThematicBreak() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(ThematicBreak.prototype, \"name\", {\n get: function () {\n return 'thematicBreak';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ThematicBreak.prototype, \"schema\", {\n get: function () {\n return {\n attrs: __assign$1({ rawHTML: { default: null } }, getDefaultCustomAttrs()),\n group: 'block',\n parseDOM: [{ tag: 'hr' }],\n selectable: false,\n toDOM: function (_a) {\n var attrs = _a.attrs;\n return ['div', getCustomAttrs(attrs), [attrs.rawHTML || 'hr']];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n ThematicBreak.prototype.hr = function () {\n var _this = this;\n return function () { return function (state, dispatch) {\n var _a;\n var _b = state.selection, $from = _b.$from, $to = _b.$to;\n if ($from === $to) {\n var doc = state.doc;\n var _c = state.schema.nodes, thematicBreak = _c.thematicBreak, paragraph = _c.paragraph;\n var nodes = [thematicBreak.create()];\n var rootBlock = $from.node(ROOT_BLOCK_DEPTH);\n var lastBlock = doc.child(doc.childCount - 1) === rootBlock;\n var blockEnd = doc.resolve($from.after(ROOT_BLOCK_DEPTH));\n var nextHr = ((_a = $from.nodeAfter) === null || _a === void 0 ? void 0 : _a.type.name) === _this.name;\n if (lastBlock || nextHr) {\n nodes.push(paragraph.create());\n }\n dispatch(state.tr.insert(blockEnd.pos, nodes).scrollIntoView());\n return true;\n }\n return false;\n }; };\n };\n ThematicBreak.prototype.commands = function () {\n return { hr: this.hr() };\n };\n ThematicBreak.prototype.keymaps = function () {\n var hrCommand = this.hr()();\n return {\n 'Mod-l': hrCommand,\n 'Mod-L': hrCommand,\n };\n };\n return ThematicBreak;\n}(Node$2));\n\nvar Strong = /** @class */ (function (_super) {\n __extends$1(Strong, _super);\n function Strong() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Strong.prototype, \"name\", {\n get: function () {\n return 'strong';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Strong.prototype, \"schema\", {\n get: function () {\n var parseDOM = ['b', 'strong'].map(function (tag) {\n return {\n tag: tag,\n getAttrs: function (dom) {\n var rawHTML = dom.getAttribute('data-raw-html');\n return __assign$1({}, (rawHTML && { rawHTML: rawHTML }));\n },\n };\n });\n return {\n attrs: __assign$1({ rawHTML: { default: null } }, getDefaultCustomAttrs()),\n parseDOM: parseDOM,\n toDOM: function (_a) {\n var attrs = _a.attrs;\n return [attrs.rawHTML || 'strong', getCustomAttrs(attrs)];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n Strong.prototype.bold = function () {\n return function () { return function (state, dispatch) { return toggleMark$1(state.schema.marks.strong)(state, dispatch); }; };\n };\n Strong.prototype.commands = function () {\n return { bold: this.bold() };\n };\n Strong.prototype.keymaps = function () {\n var boldCommand = this.bold()();\n return {\n 'Mod-b': boldCommand,\n 'Mod-B': boldCommand,\n };\n };\n return Strong;\n}(Mark));\n\nvar Emph = /** @class */ (function (_super) {\n __extends$1(Emph, _super);\n function Emph() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Emph.prototype, \"name\", {\n get: function () {\n return 'emph';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Emph.prototype, \"schema\", {\n get: function () {\n var parseDOM = ['i', 'em'].map(function (tag) {\n return {\n tag: tag,\n getAttrs: function (dom) {\n var rawHTML = dom.getAttribute('data-raw-html');\n return __assign$1({}, (rawHTML && { rawHTML: rawHTML }));\n },\n };\n });\n return {\n attrs: __assign$1({ rawHTML: { default: null } }, getDefaultCustomAttrs()),\n parseDOM: parseDOM,\n toDOM: function (_a) {\n var attrs = _a.attrs;\n return [attrs.rawHTML || 'em', getCustomAttrs(attrs)];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n Emph.prototype.italic = function () {\n return function () { return function (state, dispatch) { return toggleMark$1(state.schema.marks.emph)(state, dispatch); }; };\n };\n Emph.prototype.commands = function () {\n return { italic: this.italic() };\n };\n Emph.prototype.keymaps = function () {\n var italicCommand = this.italic()();\n return {\n 'Mod-i': italicCommand,\n 'Mod-I': italicCommand,\n };\n };\n return Emph;\n}(Mark));\n\nvar Strike = /** @class */ (function (_super) {\n __extends$1(Strike, _super);\n function Strike() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Strike.prototype, \"name\", {\n get: function () {\n return 'strike';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Strike.prototype, \"schema\", {\n get: function () {\n var parseDOM = ['s', 'del'].map(function (tag) {\n return {\n tag: tag,\n getAttrs: function (dom) {\n var rawHTML = dom.getAttribute('data-raw-html');\n return __assign$1({}, (rawHTML && { rawHTML: rawHTML }));\n },\n };\n });\n return {\n attrs: __assign$1({ rawHTML: { default: null } }, getDefaultCustomAttrs()),\n parseDOM: parseDOM,\n toDOM: function (_a) {\n var attrs = _a.attrs;\n return [attrs.rawHTML || 'del', getCustomAttrs(attrs)];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n Strike.prototype.commands = function () {\n return function () { return function (state, dispatch) { return toggleMark$1(state.schema.marks.strike)(state, dispatch); }; };\n };\n Strike.prototype.keymaps = function () {\n var strikeCommand = this.commands()();\n return {\n 'Mod-s': strikeCommand,\n 'Mod-S': strikeCommand,\n };\n };\n return Strike;\n}(Mark));\n\nvar Link = /** @class */ (function (_super) {\n __extends$1(Link, _super);\n function Link(linkAttributes) {\n var _this = _super.call(this) || this;\n _this.linkAttributes = linkAttributes;\n return _this;\n }\n Object.defineProperty(Link.prototype, \"name\", {\n get: function () {\n return 'link';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Link.prototype, \"schema\", {\n get: function () {\n var _this = this;\n return {\n attrs: __assign$1({ linkUrl: { default: '' }, title: { default: null }, rawHTML: { default: null } }, getDefaultCustomAttrs()),\n inclusive: false,\n parseDOM: [\n {\n tag: 'a[href]',\n getAttrs: function (dom) {\n var sanitizedDOM = sanitizeHTML(dom, { RETURN_DOM_FRAGMENT: true })\n .firstChild;\n var href = sanitizedDOM.getAttribute('href') || '';\n var title = sanitizedDOM.getAttribute('title') || '';\n var rawHTML = sanitizedDOM.getAttribute('data-raw-html');\n return __assign$1({ linkUrl: href, title: title }, (rawHTML && { rawHTML: rawHTML }));\n },\n },\n ],\n toDOM: function (_a) {\n var attrs = _a.attrs;\n return [\n attrs.rawHTML || 'a',\n __assign$1(__assign$1({ href: escapeXml$1(attrs.linkUrl) }, _this.linkAttributes), getCustomAttrs(attrs)),\n ];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n Link.prototype.addLink = function () {\n return function (payload) { return function (state, dispatch) {\n var _a = payload, linkUrl = _a.linkUrl, _b = _a.linkText, linkText = _b === void 0 ? '' : _b;\n var schema = state.schema, tr = state.tr, selection = state.selection;\n var empty = selection.empty, from = selection.from, to = selection.to;\n if (from && to && linkUrl) {\n var attrs = { linkUrl: linkUrl };\n var mark = schema.mark('link', attrs);\n if (empty && linkText) {\n var node = createTextNode$1(schema, linkText, mark);\n tr.replaceRangeWith(from, to, node);\n }\n else {\n tr.addMark(from, to, mark);\n }\n dispatch(tr.scrollIntoView());\n return true;\n }\n return false;\n }; };\n };\n Link.prototype.toggleLink = function () {\n return function (payload) { return function (state, dispatch) {\n return toggleMark$1(state.schema.marks.link, payload)(state, dispatch);\n }; };\n };\n Link.prototype.commands = function () {\n return {\n addLink: this.addLink(),\n toggleLink: this.toggleLink(),\n };\n };\n return Link;\n}(Mark));\n\nvar Code = /** @class */ (function (_super) {\n __extends$1(Code, _super);\n function Code() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Code.prototype, \"name\", {\n get: function () {\n return 'code';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Code.prototype, \"schema\", {\n get: function () {\n return {\n attrs: __assign$1({ rawHTML: { default: null } }, getDefaultCustomAttrs()),\n parseDOM: [\n {\n tag: 'code',\n getAttrs: function (dom) {\n var rawHTML = dom.getAttribute('data-raw-html');\n return __assign$1({}, (rawHTML && { rawHTML: rawHTML }));\n },\n },\n ],\n toDOM: function (_a) {\n var attrs = _a.attrs;\n return [attrs.rawHTML || 'code', getCustomAttrs(attrs)];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n Code.prototype.commands = function () {\n return function () { return function (state, dispatch) { return toggleMark$1(state.schema.marks.code)(state, dispatch); }; };\n };\n Code.prototype.keymaps = function () {\n var codeCommand = this.commands()();\n return {\n 'Shift-Mod-c': codeCommand,\n 'Shift-Mod-C': codeCommand,\n };\n };\n return Code;\n}(Mark));\n\nvar CustomBlock = /** @class */ (function (_super) {\n __extends$1(CustomBlock, _super);\n function CustomBlock() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(CustomBlock.prototype, \"name\", {\n get: function () {\n return 'customBlock';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CustomBlock.prototype, \"schema\", {\n get: function () {\n return {\n content: 'text*',\n group: 'block',\n attrs: {\n info: { default: null },\n },\n atom: true,\n code: true,\n defining: true,\n parseDOM: [\n {\n tag: 'div[data-custom-info]',\n getAttrs: function (dom) {\n var info = dom.getAttribute('data-custom-info');\n return { info: info };\n },\n },\n ],\n toDOM: function (_a) {\n var attrs = _a.attrs;\n return ['div', { 'data-custom-info': attrs.info || null }, 0];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n CustomBlock.prototype.commands = function () {\n return function (payload) { return function (state, dispatch) {\n return (payload === null || payload === void 0 ? void 0 : payload.info)\n ? setBlockType(state.schema.nodes.customBlock, payload)(state, dispatch)\n : false;\n }; };\n };\n return CustomBlock;\n}(Node$2));\n\nvar FrontMatter = /** @class */ (function (_super) {\n __extends$1(FrontMatter, _super);\n function FrontMatter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(FrontMatter.prototype, \"name\", {\n get: function () {\n return 'frontMatter';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(FrontMatter.prototype, \"schema\", {\n get: function () {\n return {\n content: 'text*',\n group: 'block',\n code: true,\n defining: true,\n parseDOM: [\n {\n preserveWhitespace: 'full',\n tag: 'div[data-front-matter]',\n },\n ],\n toDOM: function () {\n return ['div', { 'data-front-matter': 'true' }, 0];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n FrontMatter.prototype.commands = function () {\n return function () { return function (state, dispatch, view) {\n var $from = state.selection.$from;\n if (view.endOfTextblock('down') && $from.node().type.name === 'frontMatter') {\n return exitCode(state, dispatch);\n }\n return false;\n }; };\n };\n FrontMatter.prototype.keymaps = function () {\n return {\n Enter: this.commands()(),\n };\n };\n return FrontMatter;\n}(Node$2));\n\nvar HTMLComment = /** @class */ (function (_super) {\n __extends$1(HTMLComment, _super);\n function HTMLComment() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(HTMLComment.prototype, \"name\", {\n get: function () {\n return 'htmlComment';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(HTMLComment.prototype, \"schema\", {\n get: function () {\n return {\n content: 'text*',\n group: 'block',\n code: true,\n defining: true,\n parseDOM: [{ preserveWhitespace: 'full', tag: 'div[data-html-comment]' }],\n toDOM: function () {\n return ['div', { 'data-html-comment': 'true' }, 0];\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n HTMLComment.prototype.commands = function () {\n return function () { return function (state, dispatch, view) {\n var $from = state.selection.$from;\n if (view.endOfTextblock('down') && $from.node().type.name === 'htmlComment') {\n return exitCode(state, dispatch);\n }\n return false;\n }; };\n };\n HTMLComment.prototype.keymaps = function () {\n return {\n Enter: this.commands()(),\n };\n };\n return HTMLComment;\n}(Node$2));\n\nfunction createSpecs(linkAttributes) {\n return new SpecManager([\n new Doc(),\n new Paragraph(),\n new Text(),\n new Heading(),\n new CodeBlock(),\n new BulletList(),\n new OrderedList(),\n new ListItem(),\n new BlockQuote(),\n new Table(),\n new TableHead(),\n new TableBody(),\n new TableRow(),\n new TableHeadCell(),\n new TableBodyCell(),\n new Image(),\n new ThematicBreak(),\n new Strong(),\n new Emph(),\n new Strike(),\n new Link(linkAttributes),\n new Code(),\n new CustomBlock(),\n new FrontMatter(),\n new Widget(),\n new HTMLComment(),\n ]);\n}\n\nvar CONTENTS_CLASS_NAME = cls('contents');\nvar WysiwygEditor = /** @class */ (function (_super) {\n __extends$1(WysiwygEditor, _super);\n function WysiwygEditor(eventEmitter, options) {\n var _this = _super.call(this, eventEmitter) || this;\n var toDOMAdaptor = options.toDOMAdaptor, _a = options.htmlSchemaMap, htmlSchemaMap = _a === void 0 ? {} : _a, _b = options.linkAttributes, linkAttributes = _b === void 0 ? {} : _b, _c = options.useCommandShortcut, useCommandShortcut = _c === void 0 ? true : _c, _d = options.wwPlugins, wwPlugins = _d === void 0 ? [] : _d, _e = options.wwNodeViews, wwNodeViews = _e === void 0 ? {} : _e;\n _this.editorType = 'wysiwyg';\n _this.el.classList.add('ww-mode');\n _this.toDOMAdaptor = toDOMAdaptor;\n _this.linkAttributes = linkAttributes;\n _this.extraPlugins = wwPlugins;\n _this.pluginNodeViews = wwNodeViews;\n _this.specs = _this.createSpecs();\n _this.schema = _this.createSchema(htmlSchemaMap);\n _this.context = _this.createContext();\n _this.keymaps = _this.createKeymaps(useCommandShortcut);\n _this.view = _this.createView();\n _this.commands = _this.createCommands();\n _this.specs.setContext(__assign$1(__assign$1({}, _this.context), { view: _this.view }));\n _this.initEvent();\n return _this;\n }\n WysiwygEditor.prototype.createSpecs = function () {\n return createSpecs(this.linkAttributes);\n };\n WysiwygEditor.prototype.createContext = function () {\n return {\n schema: this.schema,\n eventEmitter: this.eventEmitter,\n };\n };\n WysiwygEditor.prototype.createSchema = function (htmlSchemaMap) {\n return new Schema({\n nodes: __assign$1(__assign$1({}, this.specs.nodes), htmlSchemaMap.nodes),\n marks: __assign$1(__assign$1({}, this.specs.marks), htmlSchemaMap.marks),\n });\n };\n WysiwygEditor.prototype.createPlugins = function () {\n return __spreadArray$1([\n tableSelection(),\n tableContextMenu(this.eventEmitter),\n task(),\n toolbarStateHighlight(this.eventEmitter)\n ], this.createPluginProps()).concat(this.defaultPlugins);\n };\n WysiwygEditor.prototype.createPluginNodeViews = function () {\n var _a = this, eventEmitter = _a.eventEmitter, pluginNodeViews = _a.pluginNodeViews;\n var pluginNodeViewMap = {};\n if (pluginNodeViews) {\n Object.keys(pluginNodeViews).forEach(function (key) {\n pluginNodeViewMap[key] = function (node, view, getPos) {\n return pluginNodeViews[key](node, view, getPos, eventEmitter);\n };\n });\n }\n return pluginNodeViewMap;\n };\n WysiwygEditor.prototype.createView = function () {\n var _this = this;\n var _a = this, toDOMAdaptor = _a.toDOMAdaptor, eventEmitter = _a.eventEmitter;\n return new EditorView(this.el, {\n state: this.createState(),\n attributes: {\n class: CONTENTS_CLASS_NAME,\n },\n nodeViews: __assign$1({ customBlock: function (node, view, getPos) {\n return new CustomBlockView(node, view, getPos, toDOMAdaptor);\n },\n image: function (node, view, getPos) {\n return new ImageView(node, view, getPos, eventEmitter);\n },\n codeBlock: function (node, view, getPos) {\n return new CodeBlockView(node, view, getPos, eventEmitter);\n }, widget: widgetNodeView }, this.createPluginNodeViews()),\n dispatchTransaction: function (tr) {\n var state = _this.view.state.applyTransaction(tr).state;\n _this.view.updateState(state);\n _this.emitChangeEvent(tr.scrollIntoView());\n _this.eventEmitter.emit('setFocusedNode', state.selection.$from.node(1));\n },\n transformPastedHTML: changePastedHTML,\n transformPasted: function (slice) {\n return changePastedSlice(slice, _this.schema, isInTableNode(_this.view.state.selection.$from));\n },\n handlePaste: function (view, _, slice) { return pasteToTable(view, slice); },\n handleKeyDown: function (_, ev) {\n _this.eventEmitter.emit('keydown', _this.editorType, ev);\n return false;\n },\n handleDOMEvents: {\n paste: function (_, ev) {\n var clipboardData = ev.clipboardData || window.clipboardData;\n var items = clipboardData === null || clipboardData === void 0 ? void 0 : clipboardData.items;\n if (items) {\n var containRtfItem = toArray_1(items).some(function (item) { return item.kind === 'string' && item.type === 'text/rtf'; });\n // if it contains rtf, it's most likely copy paste from office -> no image\n if (!containRtfItem) {\n var imageBlob = pasteImageOnly(items);\n if (imageBlob) {\n ev.preventDefault();\n emitImageBlobHook(_this.eventEmitter, imageBlob, ev.type);\n }\n }\n }\n return false;\n },\n keyup: function (_, ev) {\n _this.eventEmitter.emit('keyup', _this.editorType, ev);\n return false;\n },\n scroll: function () {\n _this.eventEmitter.emit('scroll', 'editor');\n return true;\n },\n },\n });\n };\n WysiwygEditor.prototype.createCommands = function () {\n return this.specs.commands(this.view, getWwCommands());\n };\n WysiwygEditor.prototype.getHTML = function () {\n return removeProseMirrorHackNodes(this.view.dom.innerHTML);\n };\n WysiwygEditor.prototype.getModel = function () {\n return this.view.state.doc;\n };\n WysiwygEditor.prototype.getSelection = function () {\n var _a = this.view.state.selection, from = _a.from, to = _a.to;\n return [from, to];\n };\n WysiwygEditor.prototype.getSchema = function () {\n return this.view.state.schema;\n };\n WysiwygEditor.prototype.replaceSelection = function (text, start, end) {\n var _a = this.view.state, schema = _a.schema, tr = _a.tr;\n var lineTexts = text.split('\\n');\n var paras = lineTexts.map(function (lineText) {\n return createParagraph(schema, createNodesWithWidget(lineText, schema));\n });\n var slice = new Slice(Fragment.from(paras), 1, 1);\n var newTr = isNumber_1(start) && isNumber_1(end)\n ? tr.replaceRange(start, end, slice)\n : tr.replaceSelection(slice);\n this.view.dispatch(newTr);\n this.focus();\n };\n WysiwygEditor.prototype.deleteSelection = function (start, end) {\n var tr = this.view.state.tr;\n var newTr = isNumber_1(start) && isNumber_1(end) ? tr.deleteRange(start, end) : tr.deleteSelection();\n this.view.dispatch(newTr.scrollIntoView());\n };\n WysiwygEditor.prototype.getSelectedText = function (start, end) {\n var _a = this.view.state, doc = _a.doc, selection = _a.selection;\n var from = selection.from, to = selection.to;\n if (isNumber_1(start) && isNumber_1(end)) {\n from = start;\n to = end;\n }\n return doc.textBetween(from, to, '\\n');\n };\n WysiwygEditor.prototype.setModel = function (newDoc, cursorToEnd) {\n if (cursorToEnd === void 0) { cursorToEnd = false; }\n var _a = this.view.state, tr = _a.tr, doc = _a.doc;\n this.view.dispatch(tr.replaceWith(0, doc.content.size, newDoc));\n if (cursorToEnd) {\n this.moveCursorToEnd(true);\n }\n };\n WysiwygEditor.prototype.setSelection = function (start, end) {\n if (end === void 0) { end = start; }\n var tr = this.view.state.tr;\n var selection = createTextSelection(tr, start, end);\n this.view.dispatch(tr.setSelection(selection).scrollIntoView());\n };\n WysiwygEditor.prototype.addWidget = function (node, style, pos) {\n var _a = this.view, dispatch = _a.dispatch, state = _a.state;\n dispatch(state.tr.setMeta('widget', { pos: pos !== null && pos !== void 0 ? pos : state.selection.to, node: node, style: style }));\n };\n WysiwygEditor.prototype.replaceWithWidget = function (start, end, text) {\n var _a = this.view.state, tr = _a.tr, schema = _a.schema;\n var nodes = createNodesWithWidget(text, schema);\n this.view.dispatch(tr.replaceWith(start, end, nodes));\n };\n WysiwygEditor.prototype.getRangeInfoOfNode = function (pos) {\n var _a = this.view.state, doc = _a.doc, selection = _a.selection;\n var $pos = pos ? doc.resolve(pos) : selection.$from;\n var marks = $pos.marks();\n var node = $pos.node();\n var start = $pos.start();\n var end = $pos.end();\n var type = node.type.name;\n if (marks.length || type === 'paragraph') {\n var mark_1 = marks[marks.length - 1];\n var maybeHasMark_1 = function (nodeMarks) {\n return nodeMarks.length ? includes(nodeMarks, mark_1) : true;\n };\n type = mark_1 ? mark_1.type.name : 'text';\n node.forEach(function (child, offset) {\n var isText = child.isText, nodeSize = child.nodeSize, nodeMarks = child.marks;\n var startOffset = $pos.pos - start;\n if (isText &&\n offset <= startOffset &&\n offset + nodeSize >= startOffset &&\n maybeHasMark_1(nodeMarks)) {\n start = start + offset;\n end = start + nodeSize;\n }\n });\n }\n return { range: [start, end], type: type };\n };\n return WysiwygEditor;\n}(EditorBase));\n\n/**\n * @fileoverview Check whether the given variable is existing or not.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\nvar isUndefined = isUndefined_1;\nvar isNull = isNull_1;\n\n/**\n * Check whether the given variable is existing or not.\n * If the given variable is not null and not undefined, returns true.\n * @param {*} param - Target for checking\n * @returns {boolean} Is existy?\n * @memberof module:type\n * @example\n * // ES6\n * import isExisty from 'tui-code-snippet/type/isExisty');\n * \n * // CommonJS\n * const isExisty = require('tui-code-snippet/type/isExisty');\n *\n * isExisty(''); //true\n * isExisty(0); //true\n * isExisty([]); //true\n * isExisty({}); //true\n * isExisty(null); //false\n * isExisty(undefined); //false\n*/\nfunction isExisty$1(param) {\n return !isUndefined(param) && !isNull(param);\n}\n\nvar isExisty_1 = isExisty$1;\n\n/**\n * @fileoverview Check whether the given variable is truthy or not.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\nvar isExisty = isExisty_1;\n\n/**\n * Check whether the given variable is truthy or not.\n * If the given variable is not null or not undefined or not false, returns true.\n * (It regards 0 as true)\n * @param {*} obj - Target for checking\n * @returns {boolean} Is truthy?\n * @memberof module:type\n */\nfunction isTruthy$1(obj) {\n return isExisty(obj) && obj !== false;\n}\n\nvar isTruthy_1 = isTruthy$1;\n\n/**\n * @fileoverview Check whether the given variable is falsy or not.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\nvar isTruthy = isTruthy_1;\n\n/**\n * Check whether the given variable is falsy or not.\n * If the given variable is null or undefined or false, returns true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is falsy?\n * @memberof module:type\n */\nfunction isFalsy(obj) {\n return !isTruthy(obj);\n}\n\nvar isFalsy_1 = isFalsy;\n\nvar eventTypeList = [\n 'afterPreviewRender',\n 'updatePreview',\n 'changeMode',\n 'needChangeMode',\n 'command',\n 'changePreviewStyle',\n 'changePreviewTabPreview',\n 'changePreviewTabWrite',\n 'scroll',\n 'contextmenu',\n 'show',\n 'hide',\n 'changeLanguage',\n 'changeToolbarState',\n 'toggleScrollSync',\n 'mixinTableOffsetMapPrototype',\n 'setFocusedNode',\n 'removePopupWidget',\n 'query',\n // provide event for user\n 'openPopup',\n 'closePopup',\n 'addImageBlobHook',\n 'beforePreviewRender',\n 'beforeConvertWysiwygToMarkdown',\n 'load',\n 'loadUI',\n 'change',\n 'caretChange',\n 'destroy',\n 'focus',\n 'blur',\n 'keydown',\n 'keyup',\n];\n/**\n * Class EventEmitter\n * @ignore\n */\nvar EventEmitter = /** @class */ (function () {\n function EventEmitter() {\n var _this = this;\n this.events = new Map$1();\n this.eventTypes = eventTypeList.reduce(function (types, type) {\n return __assign$1(__assign$1({}, types), { type: type });\n }, {});\n this.hold = false;\n eventTypeList.forEach(function (eventType) {\n _this.addEventType(eventType);\n });\n }\n /**\n * Listen event and bind event handler\n * @param {string} type Event type string\n * @param {function} handler Event handler\n */\n EventEmitter.prototype.listen = function (type, handler) {\n var typeInfo = this.getTypeInfo(type);\n var eventHandlers = this.events.get(typeInfo.type) || [];\n if (!this.hasEventType(typeInfo.type)) {\n throw new Error(\"There is no event type \" + typeInfo.type);\n }\n if (typeInfo.namespace) {\n handler.namespace = typeInfo.namespace;\n }\n eventHandlers.push(handler);\n this.events.set(typeInfo.type, eventHandlers);\n };\n /**\n * Emit event\n * @param {string} eventName Event name to emit\n * @returns {Array}\n */\n EventEmitter.prototype.emit = function (type) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var typeInfo = this.getTypeInfo(type);\n var eventHandlers = this.events.get(typeInfo.type);\n var results = [];\n if (!this.hold && eventHandlers) {\n eventHandlers.forEach(function (handler) {\n var result = handler.apply(void 0, args);\n if (!isUndefined_1(result)) {\n results.push(result);\n }\n });\n }\n return results;\n };\n /**\n * Emit given event and return result\n * @param {string} eventName Event name to emit\n * @param {any} source Source to change\n * @returns {string}\n */\n EventEmitter.prototype.emitReduce = function (type, source) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n var eventHandlers = this.events.get(type);\n if (!this.hold && eventHandlers) {\n eventHandlers.forEach(function (handler) {\n var result = handler.apply(void 0, __spreadArray$1([source], args));\n if (!isFalsy_1(result)) {\n source = result;\n }\n });\n }\n return source;\n };\n /**\n * Get event type and namespace\n * @param {string} type Event type name\n * @returns {{type: string, namespace: string}}\n * @private\n */\n EventEmitter.prototype.getTypeInfo = function (type) {\n var splited = type.split('.');\n return {\n type: splited[0],\n namespace: splited[1],\n };\n };\n /**\n * Check whether event type exists or not\n * @param {string} type Event type name\n * @returns {boolean}\n * @private\n */\n EventEmitter.prototype.hasEventType = function (type) {\n return !isUndefined_1(this.eventTypes[this.getTypeInfo(type).type]);\n };\n /**\n * Add event type when given event not exists\n * @param {string} type Event type name\n */\n EventEmitter.prototype.addEventType = function (type) {\n if (this.hasEventType(type)) {\n throw new Error(\"There is already have event type \" + type);\n }\n this.eventTypes[type] = type;\n };\n /**\n * Remove event handler from given event type\n * @param {string} eventType Event type name\n * @param {function} [handler] - registered event handler\n */\n EventEmitter.prototype.removeEventHandler = function (eventType, handler) {\n var _this = this;\n var _a = this.getTypeInfo(eventType), type = _a.type, namespace = _a.namespace;\n if (type && handler) {\n this.removeEventHandlerWithHandler(type, handler);\n }\n else if (type && !namespace) {\n this.events.delete(type);\n }\n else if (!type && namespace) {\n this.events.forEach(function (_, evtType) {\n _this.removeEventHandlerWithTypeInfo(evtType, namespace);\n });\n }\n else if (type && namespace) {\n this.removeEventHandlerWithTypeInfo(type, namespace);\n }\n };\n /**\n * Remove event handler with event handler\n * @param {string} type - event type name\n * @param {function} handler - event handler\n * @private\n */\n EventEmitter.prototype.removeEventHandlerWithHandler = function (type, handler) {\n var eventHandlers = this.events.get(type);\n if (eventHandlers) {\n var handlerIndex = eventHandlers.indexOf(handler);\n if (eventHandlers.indexOf(handler) >= 0) {\n eventHandlers.splice(handlerIndex, 1);\n }\n }\n };\n /**\n * Remove event handler with event type information\n * @param {string} type Event type name\n * @param {string} namespace Event namespace\n * @private\n */\n EventEmitter.prototype.removeEventHandlerWithTypeInfo = function (type, namespace) {\n var handlersToSurvive = [];\n var eventHandlers = this.events.get(type);\n if (!eventHandlers) {\n return;\n }\n eventHandlers.map(function (handler) {\n if (handler.namespace !== namespace) {\n handlersToSurvive.push(handler);\n }\n return null;\n });\n this.events.set(type, handlersToSurvive);\n };\n EventEmitter.prototype.getEvents = function () {\n return this.events;\n };\n EventEmitter.prototype.holdEventInvoke = function (fn) {\n this.hold = true;\n fn();\n this.hold = false;\n };\n return EventEmitter;\n}());\n\nvar CommandManager = /** @class */ (function () {\n function CommandManager(eventEmitter, mdCommands, wwCommands, getEditorType) {\n this.eventEmitter = eventEmitter;\n this.mdCommands = mdCommands;\n this.wwCommands = wwCommands;\n this.getEditorType = getEditorType;\n this.initEvent();\n }\n CommandManager.prototype.initEvent = function () {\n var _this = this;\n this.eventEmitter.listen('command', function (command, payload) {\n _this.exec(command, payload);\n });\n };\n CommandManager.prototype.addCommand = function (type, name, command) {\n if (type === 'markdown') {\n this.mdCommands[name] = command;\n }\n else {\n this.wwCommands[name] = command;\n }\n };\n CommandManager.prototype.deleteCommand = function (type, name) {\n if (type === 'markdown') {\n delete this.mdCommands[name];\n }\n else {\n delete this.wwCommands[name];\n }\n };\n CommandManager.prototype.exec = function (name, payload) {\n var type = this.getEditorType();\n if (type === 'markdown') {\n this.mdCommands[name](payload);\n }\n else {\n this.wwCommands[name](payload);\n }\n };\n return CommandManager;\n}());\n\nfunction getTextWithoutTrailingNewline(text) {\n return text[text.length - 1] === '\\n' ? text.slice(0, text.length - 1) : text;\n}\nfunction isCustomHTMLInlineNode(_a, node) {\n var schema = _a.schema;\n var html = node.literal;\n var matched = html.match(reHTMLTag);\n if (matched) {\n var openTagName = matched[1], closeTagName = matched[3];\n var typeName = (openTagName || closeTagName).toLowerCase();\n return node.type === 'htmlInline' && !!(schema.marks[typeName] || schema.nodes[typeName]);\n }\n return false;\n}\nfunction isInlineNode(_a) {\n var type = _a.type;\n return includes(['text', 'strong', 'emph', 'strike', 'image', 'link', 'code'], type);\n}\nfunction isSoftbreak(mdNode) {\n return (mdNode === null || mdNode === void 0 ? void 0 : mdNode.type) === 'softbreak';\n}\nfunction isListNode(_a) {\n var type = _a.type, literal = _a.literal;\n var matched = type === 'htmlInline' && literal.match(reHTMLTag);\n if (matched) {\n var openTagName = matched[1], closeTagName = matched[3];\n var tagName = openTagName || closeTagName;\n if (tagName) {\n return includes(['ul', 'ol', 'li'], tagName.toLowerCase());\n }\n }\n return false;\n}\nfunction getListItemAttrs(_a) {\n var literal = _a.literal;\n var task = /data-task/.test(literal);\n var checked = /data-task-checked/.test(literal);\n return { task: task, checked: checked };\n}\nfunction getMatchedAttributeValue(rawHTML) {\n var attrNames = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n attrNames[_i - 1] = arguments[_i];\n }\n var wrapper = document.createElement('div');\n wrapper.innerHTML = sanitizeHTML(rawHTML);\n var el = wrapper.firstChild;\n return attrNames.map(function (attrName) { return el.getAttribute(attrName) || ''; });\n}\nfunction createConvertors(convertors) {\n var convertorMap = {};\n Object.keys(convertors).forEach(function (key) {\n var tagNames = key.split(', ');\n tagNames.forEach(function (tagName) {\n var name = tagName.toLowerCase();\n convertorMap[name] = convertors[key];\n });\n });\n return convertorMap;\n}\nvar convertors = {\n 'b, strong': function (state, _, openTagName) {\n var strong = state.schema.marks.strong;\n if (openTagName) {\n state.openMark(strong.create({ rawHTML: openTagName }));\n }\n else {\n state.closeMark(strong);\n }\n },\n 'i, em': function (state, _, openTagName) {\n var emph = state.schema.marks.emph;\n if (openTagName) {\n state.openMark(emph.create({ rawHTML: openTagName }));\n }\n else {\n state.closeMark(emph);\n }\n },\n 's, del': function (state, _, openTagName) {\n var strike = state.schema.marks.strike;\n if (openTagName) {\n state.openMark(strike.create({ rawHTML: openTagName }));\n }\n else {\n state.closeMark(strike);\n }\n },\n code: function (state, _, openTagName) {\n var code = state.schema.marks.code;\n if (openTagName) {\n state.openMark(code.create({ rawHTML: openTagName }));\n }\n else {\n state.closeMark(code);\n }\n },\n a: function (state, node, openTagName) {\n var tag = node.literal;\n var link = state.schema.marks.link;\n if (openTagName) {\n var linkUrl = getMatchedAttributeValue(tag, 'href')[0];\n state.openMark(link.create({\n linkUrl: linkUrl,\n rawHTML: openTagName,\n }));\n }\n else {\n state.closeMark(link);\n }\n },\n img: function (state, node, openTagName) {\n var tag = node.literal;\n if (openTagName) {\n var _a = getMatchedAttributeValue(tag, 'src', 'alt'), imageUrl = _a[0], altText = _a[1];\n var image = state.schema.nodes.image;\n state.addNode(image, __assign$1({ rawHTML: openTagName, imageUrl: imageUrl }, (altText && { altText: altText })));\n }\n },\n hr: function (state, _, openTagName) {\n state.addNode(state.schema.nodes.thematicBreak, { rawHTML: openTagName });\n },\n br: function (state, node) {\n var paragraph = state.schema.nodes.paragraph;\n var parent = node.parent, prev = node.prev, next = node.next;\n if ((parent === null || parent === void 0 ? void 0 : parent.type) === 'paragraph') {\n // should open a paragraph node when line text has only <br> tag\n // ex) first line\\n\\n<br>\\nfourth line\n if (isSoftbreak(prev)) {\n state.openNode(paragraph);\n }\n // should close a paragraph node when line text has only <br> tag\n // ex) first line\\n\\n<br>\\nfourth line\n if (isSoftbreak(next)) {\n state.closeNode();\n // should close a paragraph node and open a paragraph node to separate between blocks\n // when <br> tag is in the middle of the paragraph\n // ex) first <br>line\\nthird line\n }\n else if (next) {\n state.closeNode();\n state.openNode(paragraph);\n }\n }\n else if ((parent === null || parent === void 0 ? void 0 : parent.type) === 'tableCell') {\n if (prev && (isInlineNode(prev) || isCustomHTMLInlineNode(state, prev))) {\n state.closeNode();\n }\n if (next && (isInlineNode(next) || isCustomHTMLInlineNode(state, next))) {\n state.openNode(paragraph);\n }\n }\n },\n pre: function (state, node, openTagName) {\n var _a, _b;\n var container = document.createElement('div');\n container.innerHTML = node.literal;\n var literal = (_b = (_a = container.firstChild) === null || _a === void 0 ? void 0 : _a.firstChild) === null || _b === void 0 ? void 0 : _b.textContent;\n state.openNode(state.schema.nodes.codeBlock, { rawHTML: openTagName });\n state.addText(getTextWithoutTrailingNewline(literal));\n state.closeNode();\n },\n 'ul, ol': function (state, node, openTagName) {\n // in the table cell, '<ul>', '<ol>' is parsed as 'htmlInline' node\n if (node.parent.type === 'tableCell') {\n var _a = state.schema.nodes, bulletList = _a.bulletList, orderedList = _a.orderedList, paragraph = _a.paragraph;\n var list = openTagName === 'ul' ? bulletList : orderedList;\n if (openTagName) {\n if (node.prev && !isListNode(node.prev)) {\n state.closeNode();\n }\n state.openNode(list, { rawHTML: openTagName });\n }\n else {\n state.closeNode();\n if (node.next && !isListNode(node.next)) {\n state.openNode(paragraph);\n }\n }\n }\n },\n li: function (state, node, openTagName) {\n var _a;\n // in the table cell, '<li>' is parsed as 'htmlInline' node\n if (((_a = node.parent) === null || _a === void 0 ? void 0 : _a.type) === 'tableCell') {\n var _b = state.schema.nodes, listItem = _b.listItem, paragraph = _b.paragraph;\n if (openTagName) {\n var attrs = getListItemAttrs(node);\n if (node.prev && !isListNode(node.prev)) {\n state.closeNode();\n }\n state.openNode(listItem, __assign$1({ rawHTML: openTagName }, attrs));\n if (node.next && !isListNode(node.next)) {\n state.openNode(paragraph);\n }\n }\n else {\n if (node.prev && !isListNode(node.prev)) {\n state.closeNode();\n }\n state.closeNode();\n }\n }\n },\n};\nvar htmlToWwConvertors = createConvertors(convertors);\n\nfunction isBRTag(node) {\n return node.type === 'htmlInline' && reBR.test(node.literal);\n}\nfunction addRawHTMLAttributeToDOM(parent) {\n toArray_1(parent.childNodes).forEach(function (child) {\n if (isElemNode(child)) {\n var openTagName = child.nodeName.toLowerCase();\n child.setAttribute('data-raw-html', openTagName);\n if (child.childNodes) {\n addRawHTMLAttributeToDOM(child);\n }\n }\n });\n}\nvar toWwConvertors = {\n text: function (state, node) {\n state.addText(node.literal || '');\n },\n paragraph: function (state, node, _a, customAttrs) {\n var _b;\n var entering = _a.entering;\n if (entering) {\n var paragraph = state.schema.nodes.paragraph;\n // The `\\n\\n` entered in markdown separates the paragraph.\n // When changing to wysiwyg, a newline is added between the two paragraphs.\n if (((_b = node.prev) === null || _b === void 0 ? void 0 : _b.type) === 'paragraph') {\n state.openNode(paragraph, customAttrs);\n state.closeNode();\n }\n state.openNode(paragraph, customAttrs);\n }\n else {\n state.closeNode();\n }\n },\n heading: function (state, node, _a, customAttrs) {\n var entering = _a.entering;\n if (entering) {\n var _b = node, level = _b.level, headingType = _b.headingType;\n state.openNode(state.schema.nodes.heading, __assign$1({ level: level, headingType: headingType }, customAttrs));\n }\n else {\n state.closeNode();\n }\n },\n codeBlock: function (state, node, customAttrs) {\n var codeBlock = state.schema.nodes.codeBlock;\n var _a = node, info = _a.info, literal = _a.literal;\n state.openNode(codeBlock, __assign$1({ language: info }, customAttrs));\n state.addText(getTextWithoutTrailingNewline(literal || ''));\n state.closeNode();\n },\n list: function (state, node, _a, customAttrs) {\n var entering = _a.entering;\n if (entering) {\n var _b = state.schema.nodes, bulletList = _b.bulletList, orderedList = _b.orderedList;\n var _c = node.listData, type = _c.type, start = _c.start;\n if (type === 'bullet') {\n state.openNode(bulletList, customAttrs);\n }\n else {\n state.openNode(orderedList, __assign$1({ order: start }, customAttrs));\n }\n }\n else {\n state.closeNode();\n }\n },\n item: function (state, node, _a, customAttrs) {\n var entering = _a.entering;\n var listItem = state.schema.nodes.listItem;\n var _b = node.listData, task = _b.task, checked = _b.checked;\n if (entering) {\n var attrs = __assign$1(__assign$1(__assign$1({}, (task && { task: task })), (checked && { checked: checked })), customAttrs);\n state.openNode(listItem, attrs);\n }\n else {\n state.closeNode();\n }\n },\n blockQuote: function (state, _, _a, customAttrs) {\n var entering = _a.entering;\n if (entering) {\n state.openNode(state.schema.nodes.blockQuote, customAttrs);\n }\n else {\n state.closeNode();\n }\n },\n image: function (state, node, _a, customAttrs) {\n var entering = _a.entering, skipChildren = _a.skipChildren;\n var image = state.schema.nodes.image;\n var _b = node, destination = _b.destination, firstChild = _b.firstChild;\n if (entering && skipChildren) {\n skipChildren();\n }\n state.addNode(image, __assign$1(__assign$1({ imageUrl: destination }, (firstChild && { altText: firstChild.literal })), customAttrs));\n },\n thematicBreak: function (state, node, _, customAttrs) {\n state.addNode(state.schema.nodes.thematicBreak, customAttrs);\n },\n strong: function (state, _, _a, customAttrs) {\n var entering = _a.entering;\n var strong = state.schema.marks.strong;\n if (entering) {\n state.openMark(strong.create(customAttrs));\n }\n else {\n state.closeMark(strong);\n }\n },\n emph: function (state, _, _a, customAttrs) {\n var entering = _a.entering;\n var emph = state.schema.marks.emph;\n if (entering) {\n state.openMark(emph.create(customAttrs));\n }\n else {\n state.closeMark(emph);\n }\n },\n link: function (state, node, _a, customAttrs) {\n var entering = _a.entering;\n var link = state.schema.marks.link;\n var _b = node, destination = _b.destination, title = _b.title;\n if (entering) {\n var attrs = __assign$1({ linkUrl: destination, title: title }, customAttrs);\n state.openMark(link.create(attrs));\n }\n else {\n state.closeMark(link);\n }\n },\n softbreak: function (state, node) {\n if (node.parent.type === 'paragraph') {\n var prev = node.prev, next = node.next;\n if (prev && !isBRTag(prev)) {\n state.closeNode();\n }\n if (next && !isBRTag(next)) {\n state.openNode(state.schema.nodes.paragraph);\n }\n }\n },\n // GFM specifications node\n table: function (state, _, _a, customAttrs) {\n var entering = _a.entering;\n if (entering) {\n state.openNode(state.schema.nodes.table, customAttrs);\n }\n else {\n state.closeNode();\n }\n },\n tableHead: function (state, _, _a, customAttrs) {\n var entering = _a.entering;\n if (entering) {\n state.openNode(state.schema.nodes.tableHead, customAttrs);\n }\n else {\n state.closeNode();\n }\n },\n tableBody: function (state, _, _a, customAttrs) {\n var entering = _a.entering;\n if (entering) {\n state.openNode(state.schema.nodes.tableBody, customAttrs);\n }\n else {\n state.closeNode();\n }\n },\n tableRow: function (state, _, _a, customAttrs) {\n var entering = _a.entering;\n if (entering) {\n state.openNode(state.schema.nodes.tableRow, customAttrs);\n }\n else {\n state.closeNode();\n }\n },\n tableCell: function (state, node, _a) {\n var entering = _a.entering;\n if (!node.ignored) {\n var hasParaNode = function (childNode) {\n return childNode && (isInlineNode(childNode) || isCustomHTMLInlineNode(state, childNode));\n };\n if (entering) {\n var _b = state.schema.nodes, tableHeadCell = _b.tableHeadCell, tableBodyCell = _b.tableBodyCell, paragraph = _b.paragraph;\n var tablePart = node.parent.parent;\n var cell = tablePart.type === 'tableHead' ? tableHeadCell : tableBodyCell;\n var table = tablePart.parent;\n var align = (table.columns[node.startIdx] || {}).align;\n var attrs = __assign$1({}, node.attrs);\n if (align) {\n attrs.align = align;\n }\n state.openNode(cell, attrs);\n if (hasParaNode(node.firstChild)) {\n state.openNode(paragraph);\n }\n }\n else {\n if (hasParaNode(node.lastChild)) {\n state.closeNode();\n }\n state.closeNode();\n }\n }\n },\n strike: function (state, _, _a, customAttrs) {\n var entering = _a.entering;\n var strike = state.schema.marks.strike;\n if (entering) {\n state.openMark(strike.create(customAttrs));\n }\n else {\n state.closeMark(strike);\n }\n },\n code: function (state, node, _, customAttrs) {\n var code = state.schema.marks.code;\n state.openMark(code.create(customAttrs));\n state.addText(getTextWithoutTrailingNewline(node.literal || ''));\n state.closeMark(code);\n },\n customBlock: function (state, node) {\n var _a = state.schema.nodes, customBlock = _a.customBlock, paragraph = _a.paragraph;\n var _b = node, info = _b.info, literal = _b.literal;\n state.openNode(customBlock, { info: info });\n state.addText(getTextWithoutTrailingNewline(literal || ''));\n state.closeNode();\n // add empty line to edit the content in next line\n if (!node.next) {\n state.openNode(paragraph);\n state.closeNode();\n }\n },\n frontMatter: function (state, node) {\n state.openNode(state.schema.nodes.frontMatter);\n state.addText(node.literal);\n state.closeNode();\n },\n htmlInline: function (state, node) {\n var html = node.literal;\n var matched = html.match(reHTMLTag);\n var openTagName = matched[1], closeTagName = matched[3];\n var typeName = (openTagName || closeTagName).toLowerCase();\n var markType = state.schema.marks[typeName];\n var sanitizedHTML = sanitizeHTML(html);\n // for user defined html schema\n if (markType === null || markType === void 0 ? void 0 : markType.spec.attrs.htmlInline) {\n if (openTagName) {\n var htmlAttrs = getHTMLAttrsByHTMLString(sanitizedHTML);\n state.openMark(markType.create({ htmlAttrs: htmlAttrs }));\n }\n else {\n state.closeMark(markType);\n }\n }\n else {\n var htmlToWwConvertor = htmlToWwConvertors[typeName];\n if (htmlToWwConvertor) {\n htmlToWwConvertor(state, node, openTagName);\n }\n }\n },\n htmlBlock: function (state, node) {\n var html = node.literal;\n var container = document.createElement('div');\n var isHTMLComment = reHTMLComment.test(html);\n if (isHTMLComment) {\n state.openNode(state.schema.nodes.htmlComment);\n state.addText(node.literal);\n state.closeNode();\n }\n else {\n var matched = html.match(reHTMLTag);\n var openTagName = matched[1], closeTagName = matched[3];\n var typeName = (openTagName || closeTagName).toLowerCase();\n var nodeType = state.schema.nodes[typeName];\n var sanitizedHTML = sanitizeHTML(html);\n // for user defined html schema\n if (nodeType === null || nodeType === void 0 ? void 0 : nodeType.spec.attrs.htmlBlock) {\n var htmlAttrs = getHTMLAttrsByHTMLString(sanitizedHTML);\n var childrenHTML = getChildrenHTML(node, typeName);\n state.addNode(nodeType, { htmlAttrs: htmlAttrs, childrenHTML: childrenHTML });\n }\n else {\n container.innerHTML = sanitizedHTML;\n addRawHTMLAttributeToDOM(container);\n state.convertByDOMParser(container);\n }\n }\n },\n customInline: function (state, node, _a) {\n var entering = _a.entering, skipChildren = _a.skipChildren;\n var _b = node, info = _b.info, firstChild = _b.firstChild;\n var schema = state.schema;\n if (info.indexOf('widget') !== -1 && entering) {\n var content = getWidgetContent(node);\n skipChildren();\n state.addNode(schema.nodes.widget, { info: info }, [\n schema.text(createWidgetContent(info, content)),\n ]);\n }\n else {\n var text = '$$';\n if (entering) {\n text += firstChild ? info + \" \" : info;\n }\n state.addText(text);\n }\n },\n};\nfunction createWwConvertors(customConvertors) {\n var customConvertorTypes = Object.keys(customConvertors);\n var convertors = __assign$1({}, toWwConvertors);\n var renderer = new Renderer({\n gfm: true,\n nodeId: true,\n convertors: customConvertors,\n });\n var orgConvertors = renderer.getConvertors();\n customConvertorTypes.forEach(function (type) {\n var wwConvertor = toWwConvertors[type];\n if (wwConvertor && !includes(['htmlBlock', 'htmlInline'], type)) {\n convertors[type] = function (state, node, context) {\n context.origin = function () { return orgConvertors[type](node, context, orgConvertors); };\n var tokens = customConvertors[type](node, context);\n var attrs;\n if (tokens) {\n var _a = Array.isArray(tokens) ? tokens[0] : tokens, htmlAttrs = _a.attributes, classNames = _a.classNames;\n attrs = { htmlAttrs: htmlAttrs, classNames: classNames };\n }\n wwConvertor(state, node, context, attrs);\n };\n }\n });\n return convertors;\n}\n\nfunction mergeMarkText(a, b) {\n if (a.isText && b.isText && Mark$1.sameSet(a.marks, b.marks)) {\n // @ts-ignore\n // type is not defined for \"withText\" in prosemirror-model\n return a.withText(a.text + b.text);\n }\n return false;\n}\nvar ToWwConvertorState = /** @class */ (function () {\n function ToWwConvertorState(schema, convertors) {\n this.schema = schema;\n this.convertors = convertors;\n this.stack = [{ type: this.schema.topNodeType, attrs: null, content: [] }];\n this.marks = Mark$1.none;\n }\n ToWwConvertorState.prototype.top = function () {\n return last$1(this.stack);\n };\n ToWwConvertorState.prototype.push = function (node) {\n if (this.stack.length) {\n this.top().content.push(node);\n }\n };\n ToWwConvertorState.prototype.addText = function (text) {\n if (text) {\n var nodes = this.top().content;\n var lastNode = last$1(nodes);\n var node = this.schema.text(text, this.marks);\n var merged = lastNode && mergeMarkText(lastNode, node);\n if (merged) {\n nodes[nodes.length - 1] = merged;\n }\n else {\n nodes.push(node);\n }\n }\n };\n ToWwConvertorState.prototype.openMark = function (mark) {\n this.marks = mark.addToSet(this.marks);\n };\n ToWwConvertorState.prototype.closeMark = function (mark) {\n this.marks = mark.removeFromSet(this.marks);\n };\n ToWwConvertorState.prototype.addNode = function (type, attrs, content) {\n var node = type.createAndFill(attrs, content, this.marks);\n if (node) {\n this.push(node);\n return node;\n }\n return null;\n };\n ToWwConvertorState.prototype.openNode = function (type, attrs) {\n this.stack.push({ type: type, attrs: attrs, content: [] });\n };\n ToWwConvertorState.prototype.closeNode = function () {\n if (this.marks.length) {\n this.marks = Mark$1.none;\n }\n var _a = this.stack.pop(), type = _a.type, attrs = _a.attrs, content = _a.content;\n return this.addNode(type, attrs, content);\n };\n ToWwConvertorState.prototype.convertByDOMParser = function (root) {\n var _this = this;\n var doc = DOMParser.fromSchema(this.schema).parse(root);\n doc.content.forEach(function (node) { return _this.push(node); });\n };\n ToWwConvertorState.prototype.closeUnmatchedHTMLInline = function (node, entering) {\n var _a;\n if (!entering && node.type !== 'htmlInline') {\n var length_1 = this.stack.length - 1;\n for (var i = length_1; i >= 0; i -= 1) {\n var nodeInfo = this.stack[i];\n if ((_a = nodeInfo.attrs) === null || _a === void 0 ? void 0 : _a.rawHTML) {\n if (nodeInfo.content.length) {\n this.closeNode();\n }\n else {\n // just pop useless unmatched html inline node\n this.stack.pop();\n }\n }\n else {\n break;\n }\n }\n }\n };\n ToWwConvertorState.prototype.convert = function (mdNode, infoForPosSync) {\n var walker = mdNode.walker();\n var event = walker.next();\n var _loop_1 = function () {\n var node = event.node, entering = event.entering;\n var convertor = this_1.convertors[node.type];\n var skipped = false;\n if (convertor) {\n var context = {\n entering: entering,\n leaf: !isContainer$2(node),\n getChildrenText: getChildrenText$1,\n options: { gfm: true, nodeId: false, tagFilter: false, softbreak: '\\n' },\n skipChildren: function () {\n skipped = true;\n },\n };\n this_1.closeUnmatchedHTMLInline(node, entering);\n convertor(this_1, node, context);\n if ((infoForPosSync === null || infoForPosSync === void 0 ? void 0 : infoForPosSync.node) === node) {\n var pos = this_1.stack.reduce(function (nodeSize, stackItem) {\n return nodeSize +\n stackItem.content.reduce(function (contentSize, pmNode) { return contentSize + pmNode.nodeSize; }, 0);\n }, 0) + 1;\n infoForPosSync.setMappedPos(pos);\n }\n }\n if (skipped) {\n walker.resumeAt(node, false);\n walker.next();\n }\n event = walker.next();\n };\n var this_1 = this;\n while (event) {\n _loop_1();\n }\n };\n ToWwConvertorState.prototype.convertNode = function (mdNode, infoForPosSync) {\n this.convert(mdNode, infoForPosSync);\n if (this.stack.length) {\n return this.closeNode();\n }\n return null;\n };\n return ToWwConvertorState;\n}());\n\nfunction convertToRawHTMLHavingInlines(state, node, _a) {\n var openTag = _a[0], closeTag = _a[1];\n state.write(openTag);\n state.convertInline(node);\n state.write(closeTag);\n}\nfunction convertToRawHTMLHavingBlocks(state, _a, _b) {\n var node = _a.node, parent = _a.parent;\n var openTag = _b[0], closeTag = _b[1];\n state.stopNewline = true;\n state.write(openTag);\n state.convertNode(node);\n state.write(closeTag);\n if ((parent === null || parent === void 0 ? void 0 : parent.type.name) === 'doc') {\n state.closeBlock(node);\n state.stopNewline = false;\n }\n}\nfunction createTableHeadDelim(textContent, columnAlign) {\n var textLen = textContent.length;\n var leftDelim = '';\n var rightDelim = '';\n if (columnAlign === 'left') {\n leftDelim = ':';\n textLen -= 1;\n }\n else if (columnAlign === 'right') {\n rightDelim = ':';\n textLen -= 1;\n }\n else if (columnAlign === 'center') {\n leftDelim = ':';\n rightDelim = ':';\n textLen -= 2;\n }\n return \"\" + leftDelim + repeat$1('-', Math.max(textLen, 3)) + rightDelim;\n}\nvar nodeTypeWriters = {\n text: function (state, _a) {\n var _b;\n var node = _a.node;\n var text = (_b = node.text) !== null && _b !== void 0 ? _b : '';\n if ((node.marks || []).some(function (mark) { return mark.type.name === 'link'; })) {\n state.text(escapeTextForLink(text), false);\n }\n else {\n state.text(text);\n }\n },\n paragraph: function (state, _a) {\n var node = _a.node, parent = _a.parent, _b = _a.index, index = _b === void 0 ? 0 : _b;\n if (state.stopNewline) {\n state.convertInline(node);\n }\n else {\n var firstChildNode = index === 0;\n var prevNode = !firstChildNode && parent.child(index - 1);\n var prevEmptyNode = prevNode && prevNode.childCount === 0;\n var nextNode = index < parent.childCount - 1 && parent.child(index + 1);\n var nextParaNode = nextNode && nextNode.type.name === 'paragraph';\n var emptyNode = node.childCount === 0;\n if (emptyNode && prevEmptyNode) {\n state.write('<br>\\n');\n }\n else if (emptyNode && !prevEmptyNode && !firstChildNode) {\n if ((parent === null || parent === void 0 ? void 0 : parent.type.name) === 'listItem') {\n var prevDelim = state.getDelim();\n state.setDelim('');\n state.write('<br>');\n state.setDelim(prevDelim);\n }\n state.write('\\n');\n }\n else {\n state.convertInline(node);\n if (nextParaNode) {\n state.write('\\n');\n }\n else {\n state.closeBlock(node);\n }\n }\n }\n },\n heading: function (state, _a, _b) {\n var node = _a.node;\n var delim = _b.delim;\n var headingType = node.attrs.headingType;\n if (headingType === 'atx') {\n state.write(delim + \" \");\n state.convertInline(node);\n state.closeBlock(node);\n }\n else {\n state.convertInline(node);\n state.ensureNewLine();\n state.write(delim);\n state.closeBlock(node);\n }\n },\n codeBlock: function (state, _a, _b) {\n var node = _a.node;\n var delim = _b.delim, text = _b.text;\n var _c = delim, openDelim = _c[0], closeDelim = _c[1];\n state.write(openDelim);\n state.ensureNewLine();\n state.text(text, false);\n state.ensureNewLine();\n state.write(closeDelim);\n state.closeBlock(node);\n },\n blockQuote: function (state, _a, _b) {\n var node = _a.node, parent = _a.parent;\n var delim = _b.delim;\n if ((parent === null || parent === void 0 ? void 0 : parent.type.name) === node.type.name) {\n state.flushClose(1);\n }\n state.wrapBlock(delim, null, node, function () { return state.convertNode(node); });\n },\n bulletList: function (state, _a, _b) {\n var node = _a.node;\n var delim = _b.delim;\n // soft-tab(4)\n state.convertList(node, repeat$1(' ', 4), function () { return delim + \" \"; });\n },\n orderedList: function (state, _a) {\n var node = _a.node;\n var start = node.attrs.order || 1;\n // soft-tab(4)\n state.convertList(node, repeat$1(' ', 4), function (index) {\n var orderedNum = String(start + index);\n return orderedNum + \". \";\n });\n },\n listItem: function (state, _a) {\n var node = _a.node;\n var _b = node.attrs, task = _b.task, checked = _b.checked;\n if (task) {\n state.write(\"[\" + (checked ? 'x' : ' ') + \"] \");\n }\n state.convertNode(node);\n },\n image: function (state, _, _a) {\n var attrs = _a.attrs;\n state.write(\"![\" + (attrs === null || attrs === void 0 ? void 0 : attrs.altText) + \"](\" + (attrs === null || attrs === void 0 ? void 0 : attrs.imageUrl) + \")\");\n },\n thematicBreak: function (state, _a, _b) {\n var node = _a.node;\n var delim = _b.delim;\n state.write(delim);\n state.closeBlock(node);\n },\n table: function (state, _a) {\n var node = _a.node;\n state.convertNode(node);\n state.closeBlock(node);\n },\n tableHead: function (state, _a, _b) {\n var node = _a.node;\n var delim = _b.delim;\n var row = node.firstChild;\n state.convertNode(node);\n var result = delim !== null && delim !== void 0 ? delim : '';\n if (!delim && row) {\n row.forEach(function (_a) {\n var textContent = _a.textContent, attrs = _a.attrs;\n var headDelim = createTableHeadDelim(textContent, attrs.align);\n result += \"| \" + headDelim + \" \";\n });\n }\n state.write(result + \"|\");\n state.ensureNewLine();\n },\n tableBody: function (state, _a) {\n var node = _a.node;\n state.convertNode(node);\n },\n tableRow: function (state, _a) {\n var node = _a.node;\n state.convertNode(node);\n state.write('|');\n state.ensureNewLine();\n },\n tableHeadCell: function (state, _a, _b) {\n var node = _a.node;\n var _c = _b.delim, delim = _c === void 0 ? '| ' : _c;\n state.write(delim);\n state.convertTableCell(node);\n state.write(' ');\n },\n tableBodyCell: function (state, _a, _b) {\n var node = _a.node;\n var _c = _b.delim, delim = _c === void 0 ? '| ' : _c;\n state.write(delim);\n state.convertTableCell(node);\n state.write(' ');\n },\n customBlock: function (state, _a, _b) {\n var node = _a.node;\n var delim = _b.delim, text = _b.text;\n var _c = delim, openDelim = _c[0], closeDelim = _c[1];\n state.write(openDelim);\n state.ensureNewLine();\n state.text(text, false);\n state.ensureNewLine();\n state.write(closeDelim);\n state.closeBlock(node);\n },\n frontMatter: function (state, _a, _b) {\n var node = _a.node;\n var text = _b.text;\n state.text(text, false);\n state.closeBlock(node);\n },\n widget: function (state, _, _a) {\n var text = _a.text;\n state.write(text);\n },\n html: function (state, _a, _b) {\n var node = _a.node;\n var text = _b.text;\n state.write(text);\n if (node.attrs.htmlBlock) {\n state.closeBlock(node);\n }\n },\n htmlComment: function (state, _a, _b) {\n var node = _a.node;\n var text = _b.text;\n state.write(text);\n state.closeBlock(node);\n },\n};\nfunction write(type, _a) {\n var state = _a.state, nodeInfo = _a.nodeInfo, params = _a.params;\n var rawHTML = params.rawHTML;\n if (rawHTML) {\n if (inArray_1(type, ['heading', 'codeBlock']) > -1) {\n convertToRawHTMLHavingInlines(state, nodeInfo.node, rawHTML);\n }\n else if (inArray_1(type, ['image', 'thematicBreak']) > -1) {\n state.write(rawHTML);\n }\n else {\n convertToRawHTMLHavingBlocks(state, nodeInfo, rawHTML);\n }\n }\n else {\n nodeTypeWriters[type](state, nodeInfo, params);\n }\n}\n\nfunction addBackticks(node, side) {\n var text = node.text;\n var ticks = /`+/g;\n var len = 0;\n if (node.isText && text) {\n var matched = ticks.exec(text);\n while (matched) {\n len = Math.max(len, matched[0].length);\n matched = ticks.exec(text);\n }\n }\n var result = len > 0 && side > 0 ? ' `' : '`';\n for (var i = 0; i < len; i += 1) {\n result += '`';\n }\n if (len > 0 && side < 0) {\n result += ' ';\n }\n return result;\n}\nfunction getPairRawHTML(rawHTML) {\n return rawHTML ? [\"<\" + rawHTML + \">\", \"</\" + rawHTML + \">\"] : null;\n}\nfunction getOpenRawHTML(rawHTML) {\n return rawHTML ? \"<\" + rawHTML + \">\" : null;\n}\nfunction getCloseRawHTML(rawHTML) {\n return rawHTML ? \"</\" + rawHTML + \">\" : null;\n}\nvar toMdConvertors = {\n heading: function (_a) {\n var node = _a.node;\n var attrs = node.attrs;\n var level = attrs.level;\n var delim = repeat$1('#', level);\n if (attrs.headingType === 'setext') {\n delim = level === 1 ? '===' : '---';\n }\n return {\n delim: delim,\n rawHTML: getPairRawHTML(attrs.rawHTML),\n };\n },\n codeBlock: function (_a) {\n var node = _a.node;\n var _b = node, attrs = _b.attrs, textContent = _b.textContent;\n return {\n delim: [\"```\" + (attrs.language || ''), '```'],\n rawHTML: getPairRawHTML(attrs.rawHTML),\n text: textContent,\n };\n },\n blockQuote: function (_a) {\n var node = _a.node;\n return {\n delim: '> ',\n rawHTML: getPairRawHTML(node.attrs.rawHTML),\n };\n },\n bulletList: function (_a, _b) {\n var node = _a.node;\n var inTable = _b.inTable;\n var rawHTML = node.attrs.rawHTML;\n if (inTable) {\n rawHTML = rawHTML || 'ul';\n }\n return {\n delim: '*',\n rawHTML: getPairRawHTML(rawHTML),\n };\n },\n orderedList: function (_a, _b) {\n var node = _a.node;\n var inTable = _b.inTable;\n var rawHTML = node.attrs.rawHTML;\n if (inTable) {\n rawHTML = rawHTML || 'ol';\n }\n return {\n rawHTML: getPairRawHTML(rawHTML),\n };\n },\n listItem: function (_a, _b) {\n var node = _a.node;\n var inTable = _b.inTable;\n var _c = node.attrs, task = _c.task, checked = _c.checked;\n var rawHTML = node.attrs.rawHTML;\n if (inTable) {\n rawHTML = rawHTML || 'li';\n }\n var className = task ? \" class=\\\"task-list-item\" + (checked ? ' checked' : '') + \"\\\"\" : '';\n var dataset = task ? \" data-task\" + (checked ? \" data-task-checked\" : '') : '';\n return {\n rawHTML: rawHTML ? [\"<\" + rawHTML + className + dataset + \">\", \"</\" + rawHTML + \">\"] : null,\n };\n },\n table: function (_a) {\n var node = _a.node;\n return {\n rawHTML: getPairRawHTML(node.attrs.rawHTML),\n };\n },\n tableHead: function (_a) {\n var node = _a.node;\n return {\n rawHTML: getPairRawHTML(node.attrs.rawHTML),\n };\n },\n tableBody: function (_a) {\n var node = _a.node;\n return {\n rawHTML: getPairRawHTML(node.attrs.rawHTML),\n };\n },\n tableRow: function (_a) {\n var node = _a.node;\n return {\n rawHTML: getPairRawHTML(node.attrs.rawHTML),\n };\n },\n tableHeadCell: function (_a) {\n var node = _a.node;\n return {\n rawHTML: getPairRawHTML(node.attrs.rawHTML),\n };\n },\n tableBodyCell: function (_a) {\n var node = _a.node;\n return {\n rawHTML: getPairRawHTML(node.attrs.rawHTML),\n };\n },\n image: function (_a) {\n var node = _a.node;\n var attrs = node.attrs;\n var rawHTML = attrs.rawHTML, altText = attrs.altText;\n var imageUrl = attrs.imageUrl.replace(/&amp;/g, '&');\n var altAttr = altText ? \" alt=\\\"\" + escapeXml$1(altText) + \"\\\"\" : '';\n return {\n rawHTML: rawHTML ? \"<\" + rawHTML + \" src=\\\"\" + escapeXml$1(imageUrl) + \"\\\"\" + altAttr + \">\" : null,\n attrs: {\n altText: escapeTextForLink(altText || ''),\n imageUrl: imageUrl,\n },\n };\n },\n thematicBreak: function (_a) {\n var node = _a.node;\n return {\n delim: '***',\n rawHTML: getOpenRawHTML(node.attrs.rawHTML),\n };\n },\n customBlock: function (_a) {\n var node = _a.node;\n var _b = node, attrs = _b.attrs, textContent = _b.textContent;\n return {\n delim: [\"$$\" + attrs.info, '$$'],\n text: textContent,\n };\n },\n frontMatter: function (_a) {\n var node = _a.node;\n return {\n text: node.textContent,\n };\n },\n widget: function (_a) {\n var node = _a.node;\n return {\n text: node.textContent,\n };\n },\n strong: function (_a, _b) {\n var node = _a.node;\n var entering = _b.entering;\n var rawHTML = node.attrs.rawHTML;\n return {\n delim: '**',\n rawHTML: entering ? getOpenRawHTML(rawHTML) : getCloseRawHTML(rawHTML),\n };\n },\n emph: function (_a, _b) {\n var node = _a.node;\n var entering = _b.entering;\n var rawHTML = node.attrs.rawHTML;\n return {\n delim: '*',\n rawHTML: entering ? getOpenRawHTML(rawHTML) : getCloseRawHTML(rawHTML),\n };\n },\n strike: function (_a, _b) {\n var node = _a.node;\n var entering = _b.entering;\n var rawHTML = node.attrs.rawHTML;\n return {\n delim: '~~',\n rawHTML: entering ? getOpenRawHTML(rawHTML) : getCloseRawHTML(rawHTML),\n };\n },\n link: function (_a, _b) {\n var node = _a.node;\n var entering = _b.entering;\n var attrs = node.attrs;\n var title = attrs.title, rawHTML = attrs.rawHTML;\n var linkUrl = attrs.linkUrl.replace(/&amp;/g, '&');\n var titleAttr = title ? \" title=\\\"\" + escapeXml$1(title) + \"\\\"\" : '';\n if (entering) {\n return {\n delim: '[',\n rawHTML: rawHTML ? \"<\" + rawHTML + \" href=\\\"\" + escapeXml$1(linkUrl) + \"\\\"\" + titleAttr + \">\" : null,\n };\n }\n return {\n delim: \"](\" + linkUrl + (title ? \" \" + quote(escapeTextForLink(title)) : '') + \")\",\n rawHTML: getCloseRawHTML(rawHTML),\n };\n },\n code: function (_a, _b) {\n var node = _a.node, parent = _a.parent, _c = _a.index, index = _c === void 0 ? 0 : _c;\n var entering = _b.entering;\n var delim = entering\n ? addBackticks(parent.child(index), -1)\n : addBackticks(parent.child(index - 1), 1);\n var rawHTML = entering\n ? getOpenRawHTML(node.attrs.rawHTML)\n : getCloseRawHTML(node.attrs.rawHTML);\n return {\n delim: delim,\n rawHTML: rawHTML,\n };\n },\n htmlComment: function (_a) {\n var node = _a.node;\n return {\n text: node.textContent,\n };\n },\n // html inline node, html block node\n html: function (_a, _b) {\n var node = _a.node;\n var entering = _b.entering;\n var tagName = node.type.name;\n var attrs = node.attrs.htmlAttrs;\n var openTag = \"<\" + tagName;\n var closeTag = \"</\" + tagName + \">\";\n Object.keys(attrs).forEach(function (attrName) {\n // To prevent broken converting when attributes has double quote string\n openTag += \" \" + attrName + \"=\\\"\" + attrs[attrName].replace(/\"/g, \"'\") + \"\\\"\";\n });\n openTag += '>';\n if (node.attrs.htmlInline) {\n return {\n rawHTML: entering ? openTag : closeTag,\n };\n }\n return {\n text: \"\" + openTag + node.attrs.childrenHTML + closeTag,\n };\n },\n};\nvar markTypeOptions = {\n strong: {\n mixable: true,\n removedEnclosingWhitespace: true,\n },\n emph: {\n mixable: true,\n removedEnclosingWhitespace: true,\n },\n strike: {\n mixable: true,\n removedEnclosingWhitespace: true,\n },\n code: {\n escape: false,\n },\n link: null,\n html: null,\n};\nfunction createNodeTypeConvertors(convertors) {\n var nodeTypeConvertors = {};\n var nodeTypes = Object.keys(nodeTypeWriters);\n nodeTypes.forEach(function (type) {\n nodeTypeConvertors[type] = function (state, nodeInfo) {\n var writer = nodeTypeWriters[type];\n if (writer) {\n var convertor = convertors[type];\n var params = convertor\n ? convertor(nodeInfo, {\n inTable: state.inTable,\n })\n : {};\n write(type, { state: state, nodeInfo: nodeInfo, params: params });\n }\n };\n });\n return nodeTypeConvertors;\n}\nfunction createMarkTypeConvertors(convertors) {\n var markTypeConvertors = {};\n var markTypes = Object.keys(markTypeOptions);\n markTypes.forEach(function (type) {\n markTypeConvertors[type] = function (nodeInfo, entering) {\n var markOption = markTypeOptions[type];\n var convertor = convertors[type];\n // There are two ways to call the mark type converter\n // in the `toMdConvertorState` module.\n // When calling the converter without using `delim` and `rawHTML` values,\n // the converter is called without parameters.\n var runConvertor = convertor && nodeInfo && !isUndefined_1(entering);\n var params = runConvertor ? convertor(nodeInfo, { entering: entering }) : {};\n return __assign$1(__assign$1({}, params), markOption);\n };\n });\n return markTypeConvertors;\n}\n// Step 1: Create the converter by overriding the custom converter\n// to the original converter defined in the `toMdConvertors` module.\n// If the node type is defined in the original converter,\n// the `origin()` function is exported to the paramter of the converter.\n// Step 2: Create a converter for the node type of ProseMirror by combining the converter\n// created in Step 1 with the writers defined in the`toMdNodeTypeWriters` module.\n// Each writer converts the ProseMirror's node to a string with the value returned\n// by the converter, and then stores the state in the`toMdConverterState` class.\n// Step 3: Create a converter for the mark type of ProseMirror by combining the converter\n// created in Step 1 with `markTypeOptions`.\n// Step 4: The created node type converter and mark type converter are injected\n// when creating an instance of the`toMdConverterState` class.\nfunction createMdConvertors(customConvertors) {\n var customConvertorTypes = Object.keys(customConvertors);\n customConvertorTypes.forEach(function (type) {\n var baseConvertor = toMdConvertors[type];\n var customConvertor = customConvertors[type];\n if (baseConvertor) {\n toMdConvertors[type] = function (nodeInfo, context) {\n context.origin = function () { return baseConvertor(nodeInfo, context); };\n return customConvertor(nodeInfo, context);\n };\n }\n else {\n toMdConvertors[type] = customConvertor;\n }\n delete customConvertors[type];\n });\n var nodeTypeConvertors = createNodeTypeConvertors(toMdConvertors);\n var markTypeConvertors = createMarkTypeConvertors(toMdConvertors);\n return {\n nodeTypeConvertors: nodeTypeConvertors,\n markTypeConvertors: markTypeConvertors,\n };\n}\n\nvar ToMdConvertorState = /** @class */ (function () {\n function ToMdConvertorState(_a) {\n var nodeTypeConvertors = _a.nodeTypeConvertors, markTypeConvertors = _a.markTypeConvertors;\n this.nodeTypeConvertors = nodeTypeConvertors;\n this.markTypeConvertors = markTypeConvertors;\n this.delim = '';\n this.result = '';\n this.closed = false;\n this.tightList = false;\n this.stopNewline = false;\n this.inTable = false;\n }\n ToMdConvertorState.prototype.getMarkConvertor = function (mark) {\n var type = mark.attrs.htmlInline ? 'html' : mark.type.name;\n return this.markTypeConvertors[type];\n };\n ToMdConvertorState.prototype.isInBlank = function () {\n return /(^|\\n)$/.test(this.result);\n };\n ToMdConvertorState.prototype.markText = function (mark, entering, parent, index) {\n var convertor = this.getMarkConvertor(mark);\n if (convertor) {\n var _a = convertor({ node: mark, parent: parent, index: index }, entering), delim = _a.delim, rawHTML = _a.rawHTML;\n return rawHTML || delim;\n }\n return '';\n };\n ToMdConvertorState.prototype.setDelim = function (delim) {\n this.delim = delim;\n };\n ToMdConvertorState.prototype.getDelim = function () {\n return this.delim;\n };\n ToMdConvertorState.prototype.flushClose = function (size) {\n if (!this.stopNewline && this.closed) {\n if (!this.isInBlank()) {\n this.result += '\\n';\n }\n if (!size) {\n size = 2;\n }\n if (size > 1) {\n var delimMin = this.delim;\n var trim = /\\s+$/.exec(delimMin);\n if (trim) {\n delimMin = delimMin.slice(0, delimMin.length - trim[0].length);\n }\n for (var i = 1; i < size; i += 1) {\n this.result += delimMin + \"\\n\";\n }\n }\n this.closed = false;\n }\n };\n ToMdConvertorState.prototype.wrapBlock = function (delim, firstDelim, node, fn) {\n var old = this.getDelim();\n this.write(firstDelim || delim);\n this.setDelim(this.getDelim() + delim);\n fn();\n this.setDelim(old);\n this.closeBlock(node);\n };\n ToMdConvertorState.prototype.ensureNewLine = function () {\n if (!this.isInBlank()) {\n this.result += '\\n';\n }\n };\n ToMdConvertorState.prototype.write = function (content) {\n if (content === void 0) { content = ''; }\n this.flushClose();\n if (this.delim && this.isInBlank()) {\n this.result += this.delim;\n }\n if (content) {\n this.result += content;\n }\n };\n ToMdConvertorState.prototype.closeBlock = function (node) {\n this.closed = node;\n };\n ToMdConvertorState.prototype.text = function (text, escaped) {\n if (escaped === void 0) { escaped = true; }\n var lines = text.split('\\n');\n for (var i = 0; i < lines.length; i += 1) {\n this.write();\n this.result += escaped ? escape$1(lines[i]) : lines[i];\n if (i !== lines.length - 1) {\n this.result += '\\n';\n }\n }\n };\n ToMdConvertorState.prototype.convertBlock = function (node, parent, index) {\n var type = node.type.name;\n var convertor = this.nodeTypeConvertors[type];\n var nodeInfo = { node: node, parent: parent, index: index };\n if (node.attrs.htmlBlock) {\n this.nodeTypeConvertors.html(this, nodeInfo);\n }\n else if (convertor) {\n convertor(this, nodeInfo);\n }\n };\n ToMdConvertorState.prototype.convertInline = function (parent) {\n var _this = this;\n var active = [];\n var trailing = '';\n var progress = function (node, _, index) {\n var marks = node ? node.marks : [];\n var leading = trailing;\n trailing = '';\n // If whitespace has to be expelled from the node, adjust\n // leading and trailing accordingly.\n var removedWhitespace = node &&\n node.isText &&\n marks.some(function (mark) {\n var markConvertor = _this.getMarkConvertor(mark);\n var info = markConvertor && markConvertor();\n return info && info.removedEnclosingWhitespace;\n });\n if (removedWhitespace && node && node.text) {\n var _a = /^(\\s*)(.*?)(\\s*)$/m.exec(node.text), lead = _a[1], mark = _a[2], trail = _a[3];\n leading += lead;\n trailing = trail;\n if (lead || trail) {\n // @ts-ignore\n // type is not defined for \"withText\" in prosemirror-model\n node = mark ? node.withText(mark) : null;\n if (!node) {\n marks = active;\n }\n }\n }\n var lastMark = marks.length && last$1(marks);\n var markConvertor = lastMark && _this.getMarkConvertor(lastMark);\n var markType = markConvertor && markConvertor();\n var noEscape = markType && markType.escape === false;\n var len = marks.length - (noEscape ? 1 : 0);\n // Try to reorder 'mixable' marks, such as em and strong, which\n // in Markdown may be opened and closed in different order, so\n // that order of the marks for the token matches the order in\n // active.\n for (var i = 0; i < len; i += 1) {\n var mark = marks[i];\n if (markType && !markType.mixable) {\n break;\n }\n for (var j = 0; j < active.length; j += 1) {\n var other = active[j];\n if (markType && !markType.mixable) {\n break;\n }\n if (mark.eq(other)) {\n // eslint-disable-next-line max-depth\n if (i > j) {\n marks = marks\n .slice(0, j)\n .concat(mark)\n .concat(marks.slice(j, i))\n .concat(marks.slice(i + 1, len));\n }\n else if (j > i) {\n marks = marks\n .slice(0, i)\n .concat(marks.slice(i + 1, j))\n .concat(mark)\n .concat(marks.slice(j, len));\n }\n break;\n }\n }\n }\n // Find the prefix of the mark set that didn't change\n var keep = 0;\n while (keep < Math.min(active.length, len) && marks[keep].eq(active[keep])) {\n keep += 1;\n }\n // Close the marks that need to be closed\n while (keep < active.length) {\n var activedMark = active.pop();\n if (activedMark) {\n _this.text(_this.markText(activedMark, false, parent, index), false);\n }\n }\n // Output any previously expelled trailing whitespace outside the marks\n if (leading) {\n _this.text(leading);\n }\n // Open the marks that need to be opened\n if (node) {\n while (active.length < len) {\n var mark = marks[active.length];\n active.push(mark);\n _this.text(_this.markText(mark, true, parent, index), false);\n }\n // Render the node. Special case code marks, since their content\n // may not be escaped.\n if (noEscape && node.isText) {\n _this.text(_this.markText(lastMark, true, parent, index) +\n node.text +\n _this.markText(lastMark, false, parent, index + 1), false);\n }\n else {\n _this.convertBlock(node, parent, index);\n }\n }\n };\n parent.forEach(progress);\n progress(null, null, parent.childCount);\n };\n // Render a node's content as a list. `delim` should be the extra\n // indentation added to all lines except the first in an item,\n // `firstDelimFn` is a function going from an item index to a\n // delimiter for the first line of the item.\n ToMdConvertorState.prototype.convertList = function (node, delim, firstDelimFn) {\n var _this = this;\n var _a;\n if (this.closed && this.closed.type === node.type) {\n this.flushClose(3);\n }\n else if (this.tightList) {\n this.flushClose(1);\n }\n var tight = (_a = node.attrs.tight) !== null && _a !== void 0 ? _a : true;\n var prevTight = this.tightList;\n this.tightList = tight;\n node.forEach(function (child, _, index) {\n if (index && tight) {\n _this.flushClose(1);\n }\n _this.wrapBlock(delim, firstDelimFn(index), node, function () { return _this.convertBlock(child, node, index); });\n });\n this.tightList = prevTight;\n };\n ToMdConvertorState.prototype.convertTableCell = function (node) {\n var _this = this;\n this.stopNewline = true;\n this.inTable = true;\n node.forEach(function (child, _, index) {\n if (includes(['bulletList', 'orderedList'], child.type.name)) {\n _this.convertBlock(child, node, index);\n _this.closed = false;\n }\n else {\n _this.convertInline(child);\n if (index < node.childCount - 1) {\n var nextChild = node.child(index + 1);\n if (nextChild.type.name === 'paragraph') {\n _this.write('<br>');\n }\n }\n }\n });\n this.stopNewline = false;\n this.inTable = false;\n };\n ToMdConvertorState.prototype.convertNode = function (parent, infoForPosSync) {\n var _this = this;\n parent.forEach(function (node, _, index) {\n _this.convertBlock(node, parent, index);\n if ((infoForPosSync === null || infoForPosSync === void 0 ? void 0 : infoForPosSync.node) === node) {\n var lineTexts = _this.result.split('\\n');\n infoForPosSync.setMappedPos([lineTexts.length, last$1(lineTexts).length + 1]);\n }\n });\n return this.result;\n };\n return ToMdConvertorState;\n}());\n\nvar Convertor = /** @class */ (function () {\n function Convertor(schema, toMdConvertors, toHTMLConvertors, eventEmitter) {\n var _this = this;\n this.setMappedPos = function (pos) {\n _this.mappedPosWhenConverting = pos;\n };\n this.schema = schema;\n this.eventEmitter = eventEmitter;\n this.focusedNode = null;\n this.mappedPosWhenConverting = null;\n this.toWwConvertors = createWwConvertors(toHTMLConvertors);\n this.toMdConvertors = createMdConvertors(toMdConvertors || {});\n this.eventEmitter.listen('setFocusedNode', function (node) { return (_this.focusedNode = node); });\n }\n Convertor.prototype.getMappedPos = function () {\n return this.mappedPosWhenConverting;\n };\n Convertor.prototype.getInfoForPosSync = function () {\n return { node: this.focusedNode, setMappedPos: this.setMappedPos };\n };\n Convertor.prototype.toWysiwygModel = function (mdNode) {\n var state = new ToWwConvertorState(this.schema, this.toWwConvertors);\n return state.convertNode(mdNode, this.getInfoForPosSync());\n };\n Convertor.prototype.toMarkdownText = function (wwNode) {\n var state = new ToMdConvertorState(this.toMdConvertors);\n var markdownText = state.convertNode(wwNode, this.getInfoForPosSync());\n markdownText = this.eventEmitter.emitReduce('beforeConvertWysiwygToMarkdown', markdownText);\n return markdownText;\n };\n return Convertor;\n}());\n\nfunction execPlugin(pluginInfo) {\n var plugin = pluginInfo.plugin, eventEmitter = pluginInfo.eventEmitter, usageStatistics = pluginInfo.usageStatistics, instance = pluginInfo.instance;\n var pmState = { Plugin: Plugin, PluginKey: PluginKey, Selection: Selection, TextSelection: TextSelection };\n var pmView = { Decoration: Decoration, DecorationSet: DecorationSet };\n var pmModel = { Fragment: Fragment };\n var pmRules = { InputRule: InputRule, inputRules: inputRules, undoInputRule: undoInputRule };\n var pmKeymap = { keymap: keymap };\n var context = {\n eventEmitter: eventEmitter,\n usageStatistics: usageStatistics,\n instance: instance,\n pmState: pmState,\n pmView: pmView,\n pmModel: pmModel,\n pmRules: pmRules,\n pmKeymap: pmKeymap,\n i18n: i18n,\n };\n if (isArray_1(plugin)) {\n var pluginFn = plugin[0], _a = plugin[1], options = _a === void 0 ? {} : _a;\n return pluginFn(context, options);\n }\n return plugin(context);\n}\nfunction getPluginInfo(pluginsInfo) {\n var plugins = pluginsInfo.plugins, eventEmitter = pluginsInfo.eventEmitter, usageStatistics = pluginsInfo.usageStatistics, instance = pluginsInfo.instance;\n eventEmitter.listen('mixinTableOffsetMapPrototype', mixinTableOffsetMapPrototype);\n return (plugins !== null && plugins !== void 0 ? plugins : []).reduce(function (acc, plugin) {\n var pluginInfoResult = execPlugin({\n plugin: plugin,\n eventEmitter: eventEmitter,\n usageStatistics: usageStatistics,\n instance: instance,\n });\n if (!pluginInfoResult) {\n throw new Error('The return value of the executed plugin is empty.');\n }\n var markdownParsers = pluginInfoResult.markdownParsers, toHTMLRenderers = pluginInfoResult.toHTMLRenderers, toMarkdownRenderers = pluginInfoResult.toMarkdownRenderers, markdownPlugins = pluginInfoResult.markdownPlugins, wysiwygPlugins = pluginInfoResult.wysiwygPlugins, wysiwygNodeViews = pluginInfoResult.wysiwygNodeViews, markdownCommands = pluginInfoResult.markdownCommands, wysiwygCommands = pluginInfoResult.wysiwygCommands, toolbarItems = pluginInfoResult.toolbarItems;\n if (toHTMLRenderers) {\n acc.toHTMLRenderers = deepMergedCopy(acc.toHTMLRenderers, toHTMLRenderers);\n }\n if (toMarkdownRenderers) {\n acc.toMarkdownRenderers = deepMergedCopy(acc.toMarkdownRenderers, toMarkdownRenderers);\n }\n if (markdownPlugins) {\n acc.mdPlugins = acc.mdPlugins.concat(markdownPlugins);\n }\n if (wysiwygPlugins) {\n acc.wwPlugins = acc.wwPlugins.concat(wysiwygPlugins);\n }\n if (wysiwygNodeViews) {\n acc.wwNodeViews = __assign$1(__assign$1({}, acc.wwNodeViews), wysiwygNodeViews);\n }\n if (markdownCommands) {\n acc.mdCommands = __assign$1(__assign$1({}, acc.mdCommands), markdownCommands);\n }\n if (wysiwygCommands) {\n acc.wwCommands = __assign$1(__assign$1({}, acc.wwCommands), wysiwygCommands);\n }\n if (toolbarItems) {\n acc.toolbarItems = acc.toolbarItems.concat(toolbarItems);\n }\n if (markdownParsers) {\n acc.markdownParsers = __assign$1(__assign$1({}, acc.markdownParsers), markdownParsers);\n }\n return acc;\n }, {\n toHTMLRenderers: {},\n toMarkdownRenderers: {},\n mdPlugins: [],\n wwPlugins: [],\n wwNodeViews: {},\n mdCommands: {},\n wwCommands: {},\n toolbarItems: [],\n markdownParsers: {},\n });\n}\n\nvar TASK_ATTR_NAME = 'data-task';\nvar DISABLED_TASK_ATTR_NAME = 'data-task-disabled';\nvar TASK_CHECKED_CLASS_NAME = 'checked';\nfunction registerHTMLTagToWhitelist(convertorMap) {\n ['htmlBlock', 'htmlInline'].forEach(function (htmlType) {\n if (convertorMap[htmlType]) {\n // register tag white list for preventing to remove the html in sanitizer\n Object.keys(convertorMap[htmlType]).forEach(function (type) { return registerTagWhitelistIfPossible(type); });\n }\n });\n}\n/**\n * Class ToastUIEditorViewer\n * @param {object} options Option object\n * @param {HTMLElement} options.el - container element\n * @param {string} [options.initialValue] Editor's initial value\n * @param {Object} [options.events] - Events\n * @param {function} [options.events.load] - It would be emitted when editor fully load\n * @param {function} [options.events.change] - It would be emitted when content changed\n * @param {function} [options.events.caretChange] - It would be emitted when format change by cursor position\n * @param {function} [options.events.focus] - It would be emitted when editor get focus\n * @param {function} [options.events.blur] - It would be emitted when editor loose focus\n * @param {Array.<function|Array>} [options.plugins] - Array of plugins. A plugin can be either a function or an array in the form of [function, options].\n * @param {Object} [options.extendedAutolinks] - Using extended Autolinks specified in GFM spec\n * @param {Object} [options.linkAttributes] - Attributes of anchor element that should be rel, target, hreflang, type\n * @param {Object} [options.customHTMLRenderer=null] - Object containing custom renderer functions correspond to change markdown node to preview HTML or wysiwyg node\n * @param {boolean} [options.referenceDefinition=false] - whether use the specification of link reference definition\n * @param {function} [options.customHTMLSanitizer=null] - custom HTML sanitizer\n * @param {boolean} [options.frontMatter=false] - whether use the front matter\n * @param {string} [options.theme] - The theme to style the viewer with. The default is included in toastui-editor.css.\n */\nvar ToastUIEditorViewer = /** @class */ (function () {\n function ToastUIEditorViewer(options) {\n var _this = this;\n this.options = extend_1({\n linkAttributes: null,\n extendedAutolinks: false,\n customHTMLRenderer: null,\n referenceDefinition: false,\n customHTMLSanitizer: null,\n frontMatter: false,\n usageStatistics: true,\n theme: 'light',\n }, options);\n this.eventEmitter = new EventEmitter();\n var linkAttributes = sanitizeLinkAttribute(this.options.linkAttributes);\n var _a = getPluginInfo({\n plugins: this.options.plugins,\n eventEmitter: this.eventEmitter,\n usageStatistics: this.options.usageStatistics,\n instance: this,\n }) || {}, toHTMLRenderers = _a.toHTMLRenderers, markdownParsers = _a.markdownParsers;\n var _b = this.options, customHTMLRenderer = _b.customHTMLRenderer, extendedAutolinks = _b.extendedAutolinks, referenceDefinition = _b.referenceDefinition, frontMatter = _b.frontMatter, customHTMLSanitizer = _b.customHTMLSanitizer;\n var rendererOptions = {\n linkAttributes: linkAttributes,\n customHTMLRenderer: __assign$1(__assign$1({}, toHTMLRenderers), customHTMLRenderer),\n extendedAutolinks: extendedAutolinks,\n referenceDefinition: referenceDefinition,\n frontMatter: frontMatter,\n sanitizer: customHTMLSanitizer || sanitizeHTML,\n };\n registerHTMLTagToWhitelist(rendererOptions.customHTMLRenderer);\n if (this.options.events) {\n forEachOwnProperties_1(this.options.events, function (fn, key) {\n _this.on(key, fn);\n });\n }\n var _c = this.options, el = _c.el, initialValue = _c.initialValue, theme = _c.theme;\n var existingHTML = el.innerHTML;\n if (theme !== 'light') {\n el.classList.add(cls(theme));\n }\n el.innerHTML = '';\n this.toastMark = new ToastMark('', {\n disallowedHtmlBlockTags: ['br', 'img'],\n extendedAutolinks: extendedAutolinks,\n referenceDefinition: referenceDefinition,\n disallowDeepHeading: true,\n frontMatter: frontMatter,\n customParser: markdownParsers,\n });\n this.preview = new MarkdownPreview(this.eventEmitter, __assign$1(__assign$1({}, rendererOptions), { isViewer: true }));\n on_1(this.preview.previewContent, 'mousedown', this.toggleTask.bind(this));\n if (initialValue) {\n this.setMarkdown(initialValue);\n }\n else if (existingHTML) {\n this.preview.setHTML(existingHTML);\n }\n el.appendChild(this.preview.previewContent);\n this.eventEmitter.emit('load', this);\n }\n /**\n * Toggle task by detecting mousedown event.\n * @param {MouseEvent} ev - event\n * @private\n */\n ToastUIEditorViewer.prototype.toggleTask = function (ev) {\n var element = ev.target;\n var style = getComputedStyle(element, ':before');\n if (!element.hasAttribute(DISABLED_TASK_ATTR_NAME) &&\n element.hasAttribute(TASK_ATTR_NAME) &&\n isPositionInBox(style, ev.offsetX, ev.offsetY)) {\n toggleClass(element, TASK_CHECKED_CLASS_NAME);\n this.eventEmitter.emit('change', {\n source: 'viewer',\n date: ev,\n });\n }\n };\n /**\n * Set content for preview\n * @param {string} markdown Markdown text\n */\n ToastUIEditorViewer.prototype.setMarkdown = function (markdown) {\n var lineTexts = this.toastMark.getLineTexts();\n var length = lineTexts.length;\n var lastLine = last$1(lineTexts);\n var endSourcepos = [length, lastLine.length + 1];\n var editResult = this.toastMark.editMarkdown([1, 1], endSourcepos, markdown || '');\n this.eventEmitter.emit('updatePreview', editResult);\n };\n /**\n * Bind eventHandler to event type\n * @param {string} type Event type\n * @param {function} handler Event handler\n */\n ToastUIEditorViewer.prototype.on = function (type, handler) {\n this.eventEmitter.listen(type, handler);\n };\n /**\n * Unbind eventHandler from event type\n * @param {string} type Event type\n */\n ToastUIEditorViewer.prototype.off = function (type) {\n this.eventEmitter.removeEventHandler(type);\n };\n /**\n * Add hook to TUIEditor event\n * @param {string} type Event type\n * @param {function} handler Event handler\n */\n ToastUIEditorViewer.prototype.addHook = function (type, handler) {\n this.eventEmitter.removeEventHandler(type);\n this.eventEmitter.listen(type, handler);\n };\n /**\n * Remove Viewer preview from document\n */\n ToastUIEditorViewer.prototype.destroy = function () {\n off_1(this.preview.el, 'mousedown', this.toggleTask.bind(this));\n this.preview.destroy();\n this.eventEmitter.emit('destroy');\n };\n /**\n * Return true\n * @returns {boolean}\n */\n ToastUIEditorViewer.prototype.isViewer = function () {\n return true;\n };\n /**\n * Return false\n * @returns {boolean}\n */\n ToastUIEditorViewer.prototype.isMarkdownMode = function () {\n return false;\n };\n /**\n * Return false\n * @returns {boolean}\n */\n ToastUIEditorViewer.prototype.isWysiwygMode = function () {\n return false;\n };\n return ToastUIEditorViewer;\n}());\n\nfunction isPmNode(node) {\n return node instanceof Node$3;\n}\nfunction isContainer(type) {\n var containerTypes = [\n 'document',\n 'blockQuote',\n 'bulletList',\n 'orderedList',\n 'listItem',\n 'paragraph',\n 'heading',\n 'emph',\n 'strong',\n 'strike',\n 'link',\n 'image',\n 'table',\n 'tableHead',\n 'tableBody',\n 'tableRow',\n 'tableHeadCell',\n 'tableBodyCell',\n ];\n return includes(containerTypes, type);\n}\nfunction createMdLikeNode(node) {\n var attrs = node.attrs, type = node.type;\n var nodeType = type.name;\n var mdLikeNode = {\n type: nodeType,\n wysiwygNode: true,\n literal: !isContainer(nodeType) && isPmNode(node) ? node.textContent : null,\n };\n var nodeTypeMap = {\n heading: { level: attrs.level },\n link: { destination: attrs.linkUrl, title: attrs.title },\n image: { destination: attrs.imageUrl },\n codeBlock: { info: attrs.language },\n bulletList: { type: 'list', listData: { type: 'bullet' } },\n orderedList: { type: 'list', listData: { type: 'ordered', start: attrs.order } },\n listItem: { type: 'item', listData: { task: attrs.task, checked: attrs.checked } },\n tableHeadCell: { type: 'tableCell', cellType: 'head', align: attrs.align },\n tableBodyCell: { type: 'tableCell', cellType: 'body', align: attrs.align },\n customBlock: { info: attrs.info },\n };\n var nodeInfo = nodeTypeMap[nodeType];\n var attributes = __assign$1(__assign$1({}, mdLikeNode), nodeInfo);\n // html block, inline node\n var _a = node.attrs, htmlAttrs = _a.htmlAttrs, childrenHTML = _a.childrenHTML;\n if (htmlAttrs) {\n return __assign$1(__assign$1({}, attributes), { attrs: htmlAttrs, childrenHTML: childrenHTML });\n }\n return attributes;\n}\n\nvar tokenToDOMNode = {\n openTag: function (token, stack) {\n var _a = token, tagName = _a.tagName, classNames = _a.classNames, attributes = _a.attributes;\n var el = document.createElement(tagName);\n var attrs = {};\n if (classNames) {\n el.className = classNames.join(' ');\n }\n if (attributes) {\n attrs = __assign$1(__assign$1({}, attrs), attributes);\n }\n setAttributes(attrs, el);\n stack.push(el);\n },\n closeTag: function (_, stack) {\n if (stack.length > 1) {\n var el = stack.pop();\n last$1(stack).appendChild(el);\n }\n },\n html: function (token, stack) {\n last$1(stack).insertAdjacentHTML('beforeend', token.content);\n },\n text: function (token, stack) {\n var textNode = document.createTextNode(token.content);\n last$1(stack).appendChild(textNode);\n },\n};\nvar WwToDOMAdaptor = /** @class */ (function () {\n function WwToDOMAdaptor(linkAttributes, customRenderer) {\n var convertors = getHTMLRenderConvertors(linkAttributes, customRenderer);\n var customHTMLConvertor = __assign$1(__assign$1({}, customRenderer.htmlBlock), customRenderer.htmlInline);\n // flatten the html block, inline convertor to other custom convertors\n this.customConvertorKeys = Object.keys(customRenderer).concat(Object.keys(customHTMLConvertor));\n this.renderer = new Renderer({\n gfm: true,\n convertors: __assign$1(__assign$1({}, convertors), customHTMLConvertor),\n });\n this.convertors = this.renderer.getConvertors();\n }\n WwToDOMAdaptor.prototype.generateTokens = function (node) {\n var mdLikeNode = createMdLikeNode(node);\n var context = {\n entering: true,\n leaf: isPmNode(node) ? node.isLeaf : false,\n options: this.renderer.getOptions(),\n getChildrenText: function () { return (isPmNode(node) ? node.textContent : ''); },\n skipChildren: function () { return false; },\n };\n var convertor = this.convertors[node.type.name];\n var converted = convertor(mdLikeNode, context, this.convertors);\n var tokens = isArray_1(converted) ? converted : [converted];\n if (isContainer(node.type.name) || node.attrs.htmlInline) {\n context.entering = false;\n tokens.push({ type: 'text', content: isPmNode(node) ? node.textContent : '' });\n tokens = tokens.concat(convertor(mdLikeNode, context, this.convertors));\n }\n return tokens;\n };\n WwToDOMAdaptor.prototype.toDOMNode = function (node) {\n var tokens = this.generateTokens(node);\n var stack = [];\n tokens.forEach(function (token) { return tokenToDOMNode[token.type](token, stack); });\n return stack[0];\n };\n WwToDOMAdaptor.prototype.getToDOMNode = function (name) {\n if (includes(this.customConvertorKeys, name)) {\n return this.toDOMNode.bind(this);\n }\n return null;\n };\n return WwToDOMAdaptor;\n}());\n\nvar ANIMATION_TIME = 100;\nvar SCROLL_BLOCKING_RESET_DELAY = 15;\nvar currentTimeoutId = null;\nvar releaseTimer = null;\nfunction run(deltaScrollTop, _a) {\n var syncScrollTop = _a.syncScrollTop, releaseEventBlock = _a.releaseEventBlock;\n if (releaseTimer) {\n clearTimeout(releaseTimer);\n }\n syncScrollTop(deltaScrollTop);\n releaseTimer = setTimeout(function () {\n releaseEventBlock();\n }, SCROLL_BLOCKING_RESET_DELAY);\n}\nfunction animate(curScrollTop, targetScrollTop, syncCallbacks) {\n var diff = targetScrollTop - curScrollTop;\n var startTime = Date.now();\n var step = function () {\n var stepTime = Date.now();\n var progress = (stepTime - startTime) / ANIMATION_TIME;\n var deltaValue;\n if (currentTimeoutId) {\n clearTimeout(currentTimeoutId);\n }\n if (progress < 1) {\n deltaValue = curScrollTop + diff * Math.cos(((1 - progress) * Math.PI) / 2);\n run(Math.ceil(deltaValue), syncCallbacks);\n currentTimeoutId = setTimeout(step, 1);\n }\n else {\n run(targetScrollTop, syncCallbacks);\n currentTimeoutId = null;\n }\n };\n step();\n}\n\nvar EDITOR_BOTTOM_PADDING = 18;\nvar ScrollSync = /** @class */ (function () {\n function ScrollSync(mdEditor, preview, eventEmitter) {\n this.latestEditorScrollTop = null;\n this.latestPreviewScrollTop = null;\n this.blockedScroll = null;\n this.active = true;\n this.timer = null;\n var previewRoot = preview.previewContent, previewEl = preview.el;\n this.previewRoot = previewRoot;\n this.previewEl = previewEl;\n this.mdEditor = mdEditor;\n this.editorView = mdEditor.view;\n this.toastMark = mdEditor.getToastMark();\n this.eventEmitter = eventEmitter;\n this.addScrollSyncEvent();\n }\n ScrollSync.prototype.addScrollSyncEvent = function () {\n var _this = this;\n this.eventEmitter.listen('afterPreviewRender', function () {\n _this.clearTimer();\n // Immediately after the 'afterPreviewRender' event has occurred,\n // browser rendering is not yet complete.\n // So the size of elements can not be accurately measured.\n _this.timer = setTimeout(function () {\n _this.syncPreviewScrollTop(true);\n }, 200);\n });\n this.eventEmitter.listen('scroll', function (type, data) {\n if (_this.active) {\n if (type === 'editor' && _this.blockedScroll !== 'editor') {\n _this.syncPreviewScrollTop();\n }\n else if (type === 'preview' && _this.blockedScroll !== 'preview') {\n _this.syncEditorScrollTop(data);\n }\n }\n });\n this.eventEmitter.listen('toggleScrollSync', function (active) {\n _this.active = active;\n });\n };\n ScrollSync.prototype.getMdNodeAtPos = function (doc, posInfo) {\n var indexInfo = doc.content.findIndex(posInfo.pos);\n var line = indexInfo.index;\n return this.toastMark.findFirstNodeAtLine(line + 1);\n };\n ScrollSync.prototype.getScrollTopByCaretPos = function () {\n var pos = this.mdEditor.getSelection();\n var firstMdNode = this.toastMark.findFirstNodeAtLine(pos[0][0]);\n var previewHeight = this.previewEl.clientHeight;\n var el = getParentNodeObj(this.previewRoot, firstMdNode).el;\n var totalOffsetTop = getTotalOffsetTop(el, this.previewRoot) || el.offsetTop;\n var nodeHeight = el.clientHeight;\n // multiply 0.5 for calculating the position in the middle of preview area\n var targetScrollTop = totalOffsetTop + nodeHeight - previewHeight * 0.5;\n this.latestEditorScrollTop = null;\n var diff = el.getBoundingClientRect().top - this.previewEl.getBoundingClientRect().top;\n return diff < previewHeight ? null : targetScrollTop;\n };\n ScrollSync.prototype.syncPreviewScrollTop = function (editing) {\n if (editing === void 0) { editing = false; }\n var _a = this, editorView = _a.editorView, previewEl = _a.previewEl, previewRoot = _a.previewRoot;\n var _b = editorView.dom.getBoundingClientRect(), left = _b.left, top = _b.top;\n var posInfo = editorView.posAtCoords({ left: left, top: top });\n var doc = editorView.state.doc;\n var firstMdNode = this.getMdNodeAtPos(doc, posInfo);\n if (!firstMdNode || isHTMLNode(firstMdNode)) {\n return;\n }\n var curScrollTop = previewEl.scrollTop;\n var _c = editorView.dom, scrollTop = _c.scrollTop, scrollHeight = _c.scrollHeight, clientHeight = _c.clientHeight, children = _c.children;\n var isBottomPos = scrollHeight - scrollTop <= clientHeight + EDITOR_BOTTOM_PADDING;\n var targetScrollTop = isBottomPos ? previewEl.scrollHeight : 0;\n if (scrollTop && !isBottomPos) {\n if (editing) {\n var scrollTopByEditing = this.getScrollTopByCaretPos();\n if (!scrollTopByEditing) {\n return;\n }\n targetScrollTop = scrollTopByEditing;\n }\n else {\n var _d = getParentNodeObj(this.previewRoot, firstMdNode), el = _d.el, mdNode = _d.mdNode;\n var _e = getEditorRangeHeightInfo(doc, mdNode, children), height = _e.height, rect = _e.rect;\n var totalOffsetTop = getTotalOffsetTop(el, previewRoot) || el.offsetTop;\n var nodeHeight = el.clientHeight;\n var ratio = top > rect.top ? Math.min((top - rect.top) / height, 1) : 0;\n targetScrollTop = totalOffsetTop + nodeHeight * ratio;\n }\n targetScrollTop = this.getResolvedScrollTop('editor', scrollTop, targetScrollTop, curScrollTop);\n this.latestEditorScrollTop = scrollTop;\n }\n if (targetScrollTop !== curScrollTop) {\n this.run('editor', targetScrollTop, curScrollTop);\n }\n };\n ScrollSync.prototype.syncEditorScrollTop = function (targetNode) {\n var _a = this, toastMark = _a.toastMark, editorView = _a.editorView, previewRoot = _a.previewRoot, previewEl = _a.previewEl;\n var dom = editorView.dom, state = editorView.state;\n var scrollTop = previewEl.scrollTop, clientHeight = previewEl.clientHeight, scrollHeight = previewEl.scrollHeight;\n var isBottomPos = scrollHeight - scrollTop <= clientHeight;\n var curScrollTop = dom.scrollTop;\n var targetScrollTop = isBottomPos ? dom.scrollHeight : 0;\n if (scrollTop && targetNode && !isBottomPos) {\n targetNode = findAncestorHavingId(targetNode, previewRoot);\n if (!targetNode.getAttribute('data-nodeid')) {\n return;\n }\n var children = dom.children;\n var mdNodeId = Number(targetNode.getAttribute('data-nodeid'));\n var _b = getParentNodeObj(this.previewRoot, toastMark.findNodeById(mdNodeId)), mdNode = _b.mdNode, el = _b.el;\n var mdNodeStartLine = getMdStartLine(mdNode);\n targetScrollTop = children[mdNodeStartLine - 1].offsetTop;\n var height = getEditorRangeHeightInfo(state.doc, mdNode, children).height;\n var _c = getAndSaveOffsetInfo(el, previewRoot, mdNodeId), nodeHeight = _c.nodeHeight, offsetTop = _c.offsetTop;\n targetScrollTop += getAdditionalPos(scrollTop, offsetTop, nodeHeight, height);\n targetScrollTop = this.getResolvedScrollTop('preview', scrollTop, targetScrollTop, curScrollTop);\n this.latestPreviewScrollTop = scrollTop;\n }\n if (targetScrollTop !== curScrollTop) {\n this.run('preview', targetScrollTop, curScrollTop);\n }\n };\n ScrollSync.prototype.getResolvedScrollTop = function (from, scrollTop, targetScrollTop, curScrollTop) {\n var latestScrollTop = from === 'editor' ? this.latestEditorScrollTop : this.latestPreviewScrollTop;\n if (latestScrollTop === null) {\n return targetScrollTop;\n }\n return latestScrollTop < scrollTop\n ? Math.max(targetScrollTop, curScrollTop)\n : Math.min(targetScrollTop, curScrollTop);\n };\n ScrollSync.prototype.run = function (from, targetScrollTop, curScrollTop) {\n var _this = this;\n var scrollTarget;\n if (from === 'editor') {\n scrollTarget = this.previewEl;\n this.blockedScroll = 'preview';\n }\n else {\n scrollTarget = this.editorView.dom;\n this.blockedScroll = 'editor';\n }\n var syncCallbacks = {\n syncScrollTop: function (scrollTop) { return (scrollTarget.scrollTop = scrollTop); },\n releaseEventBlock: function () { return (_this.blockedScroll = null); },\n };\n animate(curScrollTop, targetScrollTop, syncCallbacks);\n };\n ScrollSync.prototype.clearTimer = function () {\n if (this.timer) {\n clearTimeout(this.timer);\n this.timer = null;\n }\n };\n ScrollSync.prototype.destroy = function () {\n this.clearTimer();\n this.eventEmitter.removeEventHandler('scroll');\n this.eventEmitter.removeEventHandler('afterPreviewRender');\n };\n return ScrollSync;\n}());\n\nvar queryMap = {\n getPopupInitialValues: function (editor, payload) {\n var popupName = payload.popupName;\n return popupName === 'link' ? { linkText: editor.getSelectedText() } : {};\n },\n};\nfunction buildQuery(editor) {\n editor.eventEmitter.listen('query', function (query, payload) {\n return queryMap[query](editor, payload);\n });\n}\n\n/**\n * ToastUIEditorCore\n * @param {Object} options Option object\n * @param {HTMLElement} options.el - container element\n * @param {string} [options.height='300px'] - Editor's height style value. Height is applied as border-box ex) '300px', '100%', 'auto'\n * @param {string} [options.minHeight='200px'] - Editor's min-height style value in pixel ex) '300px'\n * @param {string} [options.initialValue] - Editor's initial value\n * @param {string} [options.previewStyle] - Markdown editor's preview style (tab, vertical)\n * @param {boolean} [options.previewHighlight = true] - Highlight a preview element corresponds to the cursor position in the markdown editor\n * @param {string} [options.initialEditType] - Initial editor type (markdown, wysiwyg)\n * @param {Object} [options.events] - Events\n * @param {function} [options.events.load] - It would be emitted when editor fully load\n * @param {function} [options.events.change] - It would be emitted when content changed\n * @param {function} [options.events.caretChange] - It would be emitted when format change by cursor position\n * @param {function} [options.events.focus] - It would be emitted when editor get focus\n * @param {function} [options.events.blur] - It would be emitted when editor loose focus\n * @param {function} [options.events.keydown] - It would be emitted when the key is pressed in editor\n * @param {function} [options.events.keyup] - It would be emitted when the key is released in editor\n * @param {function} [options.events.beforePreviewRender] - It would be emitted before rendering the markdown preview with html string\n * @param {function} [options.events.beforeConvertWysiwygToMarkdown] - It would be emitted before converting wysiwyg to markdown with markdown text\n * @param {Object} [options.hooks] - Hooks\n * @param {addImageBlobHook} [options.hooks.addImageBlobHook] - hook for image upload\n * @param {string} [options.language='en-US'] - language\n * @param {boolean} [options.useCommandShortcut=true] - whether use keyboard shortcuts to perform commands\n * @param {boolean} [options.usageStatistics=true] - send hostname to google analytics\n * @param {Array.<string|toolbarItemsValue>} [options.toolbarItems] - toolbar items.\n * @param {boolean} [options.hideModeSwitch=false] - hide mode switch tab bar\n * @param {Array.<function|Array>} [options.plugins] - Array of plugins. A plugin can be either a function or an array in the form of [function, options].\n * @param {Object} [options.extendedAutolinks] - Using extended Autolinks specified in GFM spec\n * @param {string} [options.placeholder] - The placeholder text of the editable element.\n * @param {Object} [options.linkAttributes] - Attributes of anchor element that should be rel, target, hreflang, type\n * @param {Object} [options.customHTMLRenderer=null] - Object containing custom renderer functions correspond to change markdown node to preview HTML or wysiwyg node\n * @param {Object} [options.customMarkdownRenderer=null] - Object containing custom renderer functions correspond to change wysiwyg node to markdown text\n * @param {boolean} [options.referenceDefinition=false] - whether use the specification of link reference definition\n * @param {function} [options.customHTMLSanitizer=null] - custom HTML sanitizer\n * @param {boolean} [options.previewHighlight=false] - whether highlight preview area\n * @param {boolean} [options.frontMatter=false] - whether use the front matter\n * @param {Array.<object>} [options.widgetRules=[]] - The rules for replacing the text with widget node\n * @param {string} [options.theme] - The theme to style the editor with. The default is included in toastui-editor.css.\n * @param {autofocus} [options.autofocus=true] - automatically focus the editor on creation.\n */\nvar ToastUIEditorCore = /** @class */ (function () {\n function ToastUIEditorCore(options) {\n var _this = this;\n this.initialHTML = options.el.innerHTML;\n options.el.innerHTML = '';\n this.options = extend_1({\n previewStyle: 'tab',\n previewHighlight: true,\n initialEditType: 'markdown',\n height: '300px',\n minHeight: '200px',\n language: 'en-US',\n useCommandShortcut: true,\n usageStatistics: true,\n toolbarItems: [\n ['heading', 'bold', 'italic', 'strike'],\n ['hr', 'quote'],\n ['ul', 'ol', 'task', 'indent', 'outdent'],\n ['table', 'image', 'link'],\n ['code', 'codeblock'],\n ['scrollSync'],\n ],\n hideModeSwitch: false,\n linkAttributes: null,\n extendedAutolinks: false,\n customHTMLRenderer: null,\n customMarkdownRenderer: null,\n referenceDefinition: false,\n customHTMLSanitizer: null,\n frontMatter: false,\n widgetRules: [],\n theme: 'light',\n autofocus: true,\n }, options);\n var _a = this.options, customHTMLRenderer = _a.customHTMLRenderer, extendedAutolinks = _a.extendedAutolinks, referenceDefinition = _a.referenceDefinition, frontMatter = _a.frontMatter, customMarkdownRenderer = _a.customMarkdownRenderer, useCommandShortcut = _a.useCommandShortcut, initialEditType = _a.initialEditType, widgetRules = _a.widgetRules, customHTMLSanitizer = _a.customHTMLSanitizer;\n this.mode = initialEditType || 'markdown';\n this.mdPreviewStyle = this.options.previewStyle;\n this.i18n = i18n;\n this.i18n.setCode(this.options.language);\n this.eventEmitter = new EventEmitter();\n setWidgetRules(widgetRules);\n var linkAttributes = sanitizeLinkAttribute(this.options.linkAttributes);\n this.pluginInfo = getPluginInfo({\n plugins: this.options.plugins,\n eventEmitter: this.eventEmitter,\n usageStatistics: this.options.usageStatistics,\n instance: this,\n });\n var _b = this.pluginInfo, toHTMLRenderers = _b.toHTMLRenderers, toMarkdownRenderers = _b.toMarkdownRenderers, mdPlugins = _b.mdPlugins, wwPlugins = _b.wwPlugins, wwNodeViews = _b.wwNodeViews, mdCommands = _b.mdCommands, wwCommands = _b.wwCommands, markdownParsers = _b.markdownParsers;\n var rendererOptions = {\n linkAttributes: linkAttributes,\n customHTMLRenderer: deepMergedCopy(toHTMLRenderers, customHTMLRenderer),\n extendedAutolinks: extendedAutolinks,\n referenceDefinition: referenceDefinition,\n frontMatter: frontMatter,\n sanitizer: customHTMLSanitizer || sanitizeHTML,\n };\n var wwToDOMAdaptor = new WwToDOMAdaptor(linkAttributes, rendererOptions.customHTMLRenderer);\n var htmlSchemaMap = createHTMLSchemaMap(rendererOptions.customHTMLRenderer, rendererOptions.sanitizer, wwToDOMAdaptor);\n this.toastMark = new ToastMark('', {\n disallowedHtmlBlockTags: ['br', 'img'],\n extendedAutolinks: extendedAutolinks,\n referenceDefinition: referenceDefinition,\n disallowDeepHeading: true,\n frontMatter: frontMatter,\n customParser: markdownParsers,\n });\n this.mdEditor = new MdEditor(this.eventEmitter, {\n toastMark: this.toastMark,\n useCommandShortcut: useCommandShortcut,\n mdPlugins: mdPlugins,\n });\n this.preview = new MarkdownPreview(this.eventEmitter, __assign$1(__assign$1({}, rendererOptions), { isViewer: false, highlight: this.options.previewHighlight }));\n this.wwEditor = new WysiwygEditor(this.eventEmitter, {\n toDOMAdaptor: wwToDOMAdaptor,\n useCommandShortcut: useCommandShortcut,\n htmlSchemaMap: htmlSchemaMap,\n linkAttributes: linkAttributes,\n wwPlugins: wwPlugins,\n wwNodeViews: wwNodeViews,\n });\n this.convertor = new Convertor(this.wwEditor.getSchema(), __assign$1(__assign$1({}, toMarkdownRenderers), customMarkdownRenderer), getHTMLRenderConvertors(linkAttributes, rendererOptions.customHTMLRenderer), this.eventEmitter);\n this.setMinHeight(this.options.minHeight);\n this.setHeight(this.options.height);\n this.setMarkdown(this.options.initialValue, false);\n if (this.options.placeholder) {\n this.setPlaceholder(this.options.placeholder);\n }\n if (!this.options.initialValue) {\n this.setHTML(this.initialHTML, false);\n }\n this.commandManager = new CommandManager(this.eventEmitter, this.mdEditor.commands, this.wwEditor.commands, function () { return _this.mode; });\n if (this.options.usageStatistics) {\n sendHostName();\n }\n this.scrollSync = new ScrollSync(this.mdEditor, this.preview, this.eventEmitter);\n this.addInitEvent();\n this.addInitCommand(mdCommands, wwCommands);\n buildQuery(this);\n if (this.options.hooks) {\n forEachOwnProperties_1(this.options.hooks, function (fn, key) { return _this.addHook(key, fn); });\n }\n if (this.options.events) {\n forEachOwnProperties_1(this.options.events, function (fn, key) { return _this.on(key, fn); });\n }\n this.eventEmitter.emit('load', this);\n this.moveCursorToStart(this.options.autofocus);\n }\n ToastUIEditorCore.prototype.addInitEvent = function () {\n var _this = this;\n this.on('needChangeMode', this.changeMode.bind(this));\n this.on('loadUI', function () {\n if (_this.height !== 'auto') {\n // 75px equals default editor ui height - the editing area height\n var minHeight = Math.min(parseInt(_this.minHeight, 10), parseInt(_this.height, 10) - 75) + \"px\";\n _this.setMinHeight(minHeight);\n }\n });\n addDefaultImageBlobHook(this.eventEmitter);\n };\n ToastUIEditorCore.prototype.addInitCommand = function (mdCommands, wwCommands) {\n var _this = this;\n var addPluginCommands = function (type, commandMap) {\n Object.keys(commandMap).forEach(function (name) {\n _this.addCommand(type, name, commandMap[name]);\n });\n };\n this.addCommand('markdown', 'toggleScrollSync', function (payload) {\n _this.eventEmitter.emit('toggleScrollSync', payload.active);\n return true;\n });\n addPluginCommands('markdown', mdCommands);\n addPluginCommands('wysiwyg', wwCommands);\n };\n ToastUIEditorCore.prototype.getCurrentModeEditor = function () {\n return (this.isMarkdownMode() ? this.mdEditor : this.wwEditor);\n };\n /**\n * Factory method for Editor\n * @param {object} options Option for initialize TUIEditor\n * @returns {object} ToastUIEditorCore or ToastUIEditorViewer\n */\n ToastUIEditorCore.factory = function (options) {\n return options.viewer ? new ToastUIEditorViewer(options) : new ToastUIEditorCore(options);\n };\n /**\n * Set language\n * @param {string|string[]} code - code for I18N language\n * @param {object} data - language set\n */\n ToastUIEditorCore.setLanguage = function (code, data) {\n i18n.setLanguage(code, data);\n };\n /**\n * change preview style\n * @param {string} style - 'tab'|'vertical'\n */\n ToastUIEditorCore.prototype.changePreviewStyle = function (style) {\n if (this.mdPreviewStyle !== style) {\n this.mdPreviewStyle = style;\n this.eventEmitter.emit('changePreviewStyle', style);\n }\n };\n /**\n * execute editor command\n * @param {string} name - command name\n * @param {object} [payload] - payload for command\n */\n ToastUIEditorCore.prototype.exec = function (name, payload) {\n this.commandManager.exec(name, payload);\n };\n /**\n * @param {string} type - editor type\n * @param {string} name - command name\n * @param {function} command - command handler\n */\n ToastUIEditorCore.prototype.addCommand = function (type, name, command) {\n var _this = this;\n var commandHoc = function (paylaod) {\n if (paylaod === void 0) { paylaod = {}; }\n var view = (type === 'markdown' ? _this.mdEditor : _this.wwEditor).view;\n command(paylaod, view.state, view.dispatch, view);\n };\n this.commandManager.addCommand(type, name, commandHoc);\n };\n /**\n * Bind eventHandler to event type\n * @param {string} type Event type\n * @param {function} handler Event handler\n */\n ToastUIEditorCore.prototype.on = function (type, handler) {\n this.eventEmitter.listen(type, handler);\n };\n /**\n * Unbind eventHandler from event type\n * @param {string} type Event type\n */\n ToastUIEditorCore.prototype.off = function (type) {\n this.eventEmitter.removeEventHandler(type);\n };\n /**\n * Add hook to TUIEditor event\n * @param {string} type Event type\n * @param {function} handler Event handler\n */\n ToastUIEditorCore.prototype.addHook = function (type, handler) {\n this.eventEmitter.removeEventHandler(type);\n this.eventEmitter.listen(type, handler);\n };\n /**\n * Remove hook from TUIEditor event\n * @param {string} type Event type\n */\n ToastUIEditorCore.prototype.removeHook = function (type) {\n this.eventEmitter.removeEventHandler(type);\n };\n /**\n * Set focus to current Editor\n */\n ToastUIEditorCore.prototype.focus = function () {\n this.getCurrentModeEditor().focus();\n };\n /**\n * Remove focus of current Editor\n */\n ToastUIEditorCore.prototype.blur = function () {\n this.getCurrentModeEditor().blur();\n };\n /**\n * Set cursor position to end\n * @param {boolean} [focus] - automatically focus the editor\n */\n ToastUIEditorCore.prototype.moveCursorToEnd = function (focus) {\n if (focus === void 0) { focus = true; }\n this.getCurrentModeEditor().moveCursorToEnd(focus);\n };\n /**\n * Set cursor position to start\n * @param {boolean} [focus] - automatically focus the editor\n */\n ToastUIEditorCore.prototype.moveCursorToStart = function (focus) {\n if (focus === void 0) { focus = true; }\n this.getCurrentModeEditor().moveCursorToStart(focus);\n };\n /**\n * Set markdown syntax text.\n * @param {string} markdown - markdown syntax text.\n * @param {boolean} [cursorToEnd=true] - move cursor to contents end\n */\n ToastUIEditorCore.prototype.setMarkdown = function (markdown, cursorToEnd) {\n if (markdown === void 0) { markdown = ''; }\n if (cursorToEnd === void 0) { cursorToEnd = true; }\n this.mdEditor.setMarkdown(markdown, cursorToEnd);\n if (this.isWysiwygMode()) {\n var mdNode = this.toastMark.getRootNode();\n var wwNode = this.convertor.toWysiwygModel(mdNode);\n this.wwEditor.setModel(wwNode, cursorToEnd);\n }\n };\n /**\n * Set html value.\n * @param {string} html - html syntax text\n * @param {boolean} [cursorToEnd=true] - move cursor to contents end\n */\n ToastUIEditorCore.prototype.setHTML = function (html, cursorToEnd) {\n if (html === void 0) { html = ''; }\n if (cursorToEnd === void 0) { cursorToEnd = true; }\n var container = document.createElement('div');\n // the `br` tag should be replaced with empty block to separate between blocks\n container.innerHTML = replaceBRWithEmptyBlock(html);\n var wwNode = DOMParser.fromSchema(this.wwEditor.schema).parse(container);\n if (this.isMarkdownMode()) {\n this.mdEditor.setMarkdown(this.convertor.toMarkdownText(wwNode), cursorToEnd);\n }\n else {\n this.wwEditor.setModel(wwNode, cursorToEnd);\n }\n };\n /**\n * Get content to markdown\n * @returns {string} markdown text\n */\n ToastUIEditorCore.prototype.getMarkdown = function () {\n if (this.isMarkdownMode()) {\n return this.mdEditor.getMarkdown();\n }\n return this.convertor.toMarkdownText(this.wwEditor.getModel());\n };\n /**\n * Get content to html\n * @returns {string} html string\n */\n ToastUIEditorCore.prototype.getHTML = function () {\n var _this = this;\n this.eventEmitter.holdEventInvoke(function () {\n if (_this.isMarkdownMode()) {\n var mdNode = _this.toastMark.getRootNode();\n var wwNode = _this.convertor.toWysiwygModel(mdNode);\n _this.wwEditor.setModel(wwNode);\n }\n });\n var html = removeProseMirrorHackNodes(this.wwEditor.view.dom.innerHTML);\n if (this.placeholder) {\n var rePlaceholder = new RegExp(\"<span class=\\\"placeholder[^>]+>\" + this.placeholder + \"</span>\", 'i');\n return html.replace(rePlaceholder, '');\n }\n return html;\n };\n /**\n * Insert text\n * @param {string} text - text content\n */\n ToastUIEditorCore.prototype.insertText = function (text) {\n this.getCurrentModeEditor().replaceSelection(text);\n };\n /**\n * Set selection range\n * @param {number|Array.<number>} start - start position\n * @param {number|Array.<number>} end - end position\n */\n ToastUIEditorCore.prototype.setSelection = function (start, end) {\n this.getCurrentModeEditor().setSelection(start, end);\n };\n /**\n * Replace selection range with given text content\n * @param {string} text - text content\n * @param {number|Array.<number>} [start] - start position\n * @param {number|Array.<number>} [end] - end position\n */\n ToastUIEditorCore.prototype.replaceSelection = function (text, start, end) {\n this.getCurrentModeEditor().replaceSelection(text, start, end);\n };\n /**\n * Delete the content of selection range\n * @param {number|Array.<number>} [start] - start position\n * @param {number|Array.<number>} [end] - end position\n */\n ToastUIEditorCore.prototype.deleteSelection = function (start, end) {\n this.getCurrentModeEditor().deleteSelection(start, end);\n };\n /**\n * Get selected text content\n * @param {number|Array.<number>} [start] - start position\n * @param {number|Array.<number>} [end] - end position\n * @returns {string} - selected text content\n */\n ToastUIEditorCore.prototype.getSelectedText = function (start, end) {\n return this.getCurrentModeEditor().getSelectedText(start, end);\n };\n /**\n * Get range of the node\n * @param {number|Array.<number>} [pos] - position\n * @returns {Array.<number[]>|Array.<number>} - node [start, end] range\n * @example\n * // Markdown mode\n * const rangeInfo = editor.getRangeInfoOfNode();\n *\n * console.log(rangeInfo); // { range: [[startLineOffset, startCurorOffset], [endLineOffset, endCurorOffset]], type: 'emph' }\n *\n * // WYSIWYG mode\n * const rangeInfo = editor.getRangeInfoOfNode();\n *\n * console.log(rangeInfo); // { range: [startCursorOffset, endCursorOffset], type: 'emph' }\n */\n ToastUIEditorCore.prototype.getRangeInfoOfNode = function (pos) {\n return this.getCurrentModeEditor().getRangeInfoOfNode(pos);\n };\n /**\n * Add widget to selection\n * @param {Node} node - widget node\n * @param {string} style - Adding style \"top\" or \"bottom\"\n * @param {number|Array.<number>} [pos] - position\n */\n ToastUIEditorCore.prototype.addWidget = function (node, style, pos) {\n this.getCurrentModeEditor().addWidget(node, style, pos);\n };\n /**\n * Replace node with widget to range\n * @param {number|Array.<number>} start - start position\n * @param {number|Array.<number>} end - end position\n * @param {string} text - widget text content\n */\n ToastUIEditorCore.prototype.replaceWithWidget = function (start, end, text) {\n this.getCurrentModeEditor().replaceWithWidget(start, end, text);\n };\n /**\n * Set editor height\n * @param {string} height - editor height in pixel\n */\n ToastUIEditorCore.prototype.setHeight = function (height) {\n var el = this.options.el;\n if (isString_1(height)) {\n if (height === 'auto') {\n addClass_1(el, 'auto-height');\n }\n else {\n removeClass_1(el, 'auto-height');\n }\n this.setMinHeight(this.getMinHeight());\n }\n css_1(el, { height: height });\n this.height = height;\n };\n /**\n * Get editor height\n * @returns {string} editor height in pixel\n */\n ToastUIEditorCore.prototype.getHeight = function () {\n return this.height;\n };\n /**\n * Set minimum height to editor content\n * @param {string} minHeight - min content height in pixel\n */\n ToastUIEditorCore.prototype.setMinHeight = function (minHeight) {\n if (minHeight !== this.minHeight) {\n var height = this.height || this.options.height;\n if (height !== 'auto' && this.options.el.querySelector(\".\" + cls('main'))) {\n // 75px equals default editor ui height - the editing area height\n minHeight = Math.min(parseInt(minHeight, 10), parseInt(height, 10) - 75) + \"px\";\n }\n var minHeightNum = parseInt(minHeight, 10);\n this.minHeight = minHeight;\n this.wwEditor.setMinHeight(minHeightNum);\n this.mdEditor.setMinHeight(minHeightNum);\n this.preview.setMinHeight(minHeightNum);\n }\n };\n /**\n * Get minimum height of editor content\n * @returns {string} min height in pixel\n */\n ToastUIEditorCore.prototype.getMinHeight = function () {\n return this.minHeight;\n };\n /**\n * Return true if current editor mode is Markdown\n * @returns {boolean}\n */\n ToastUIEditorCore.prototype.isMarkdownMode = function () {\n return this.mode === 'markdown';\n };\n /**\n * Return true if current editor mode is WYSIWYG\n * @returns {boolean}\n */\n ToastUIEditorCore.prototype.isWysiwygMode = function () {\n return this.mode === 'wysiwyg';\n };\n /**\n * Return false\n * @returns {boolean}\n */\n ToastUIEditorCore.prototype.isViewer = function () {\n return false;\n };\n /**\n * Get current Markdown editor's preview style\n * @returns {string}\n */\n ToastUIEditorCore.prototype.getCurrentPreviewStyle = function () {\n return this.mdPreviewStyle;\n };\n /**\n * Change editor's mode to given mode string\n * @param {string} mode - Editor mode name of want to change\n * @param {boolean} [withoutFocus] - Change mode without focus\n */\n ToastUIEditorCore.prototype.changeMode = function (mode, withoutFocus) {\n if (this.mode === mode) {\n return;\n }\n this.mode = mode;\n if (this.isWysiwygMode()) {\n var mdNode = this.toastMark.getRootNode();\n var wwNode = this.convertor.toWysiwygModel(mdNode);\n this.wwEditor.setModel(wwNode);\n }\n else {\n var wwNode = this.wwEditor.getModel();\n this.mdEditor.setMarkdown(this.convertor.toMarkdownText(wwNode), !withoutFocus);\n }\n this.eventEmitter.emit('removePopupWidget');\n this.eventEmitter.emit('changeMode', mode);\n if (!withoutFocus) {\n var pos = this.convertor.getMappedPos();\n this.focus();\n if (this.isWysiwygMode() && isNumber_1(pos)) {\n this.wwEditor.setSelection(pos);\n }\n else if (Array.isArray(pos)) {\n this.mdEditor.setSelection(pos);\n }\n }\n };\n /**\n * Destroy TUIEditor from document\n */\n ToastUIEditorCore.prototype.destroy = function () {\n var _this = this;\n this.wwEditor.destroy();\n this.mdEditor.destroy();\n this.preview.destroy();\n this.scrollSync.destroy();\n this.eventEmitter.emit('destroy');\n this.eventEmitter.getEvents().forEach(function (_, type) { return _this.off(type); });\n };\n /**\n * Hide TUIEditor\n */\n ToastUIEditorCore.prototype.hide = function () {\n this.eventEmitter.emit('hide');\n };\n /**\n * Show TUIEditor\n */\n ToastUIEditorCore.prototype.show = function () {\n this.eventEmitter.emit('show');\n };\n /**\n * Move on scroll position of the editor container\n * @param {number} value scrollTop value of editor container\n */\n ToastUIEditorCore.prototype.setScrollTop = function (value) {\n this.getCurrentModeEditor().setScrollTop(value);\n };\n /**\n * Get scroll position value of editor container\n * @returns {number} scrollTop value of editor container\n */\n ToastUIEditorCore.prototype.getScrollTop = function () {\n return this.getCurrentModeEditor().getScrollTop();\n };\n /**\n * Reset TUIEditor\n */\n ToastUIEditorCore.prototype.reset = function () {\n this.wwEditor.setModel([]);\n this.mdEditor.setMarkdown('');\n };\n /**\n * Get current selection range\n * @returns {Array.<number[]>|Array.<number>} Returns the range of the selection depending on the editor mode\n * @example\n * // Markdown mode\n * const mdSelection = editor.getSelection();\n *\n * console.log(mdSelection); // [[startLineOffset, startCurorOffset], [endLineOffset, endCurorOffset]]\n *\n * // WYSIWYG mode\n * const wwSelection = editor.getSelection();\n *\n * console.log(wwSelection); // [startCursorOffset, endCursorOffset]\n */\n ToastUIEditorCore.prototype.getSelection = function () {\n return this.getCurrentModeEditor().getSelection();\n };\n /**\n * Set the placeholder on all editors\n * @param {string} placeholder - placeholder to set\n */\n ToastUIEditorCore.prototype.setPlaceholder = function (placeholder) {\n this.placeholder = placeholder;\n this.mdEditor.setPlaceholder(placeholder);\n this.wwEditor.setPlaceholder(placeholder);\n };\n /**\n * Get markdown editor, preview, wysiwyg editor DOM elements\n */\n ToastUIEditorCore.prototype.getEditorElements = function () {\n return {\n mdEditor: this.mdEditor.getElement(),\n mdPreview: this.preview.getElement(),\n wwEditor: this.wwEditor.getElement(),\n };\n };\n /**\n * Convert position to match editor mode\n * @param {number|Array.<number>} start - start position\n * @param {number|Array.<number>} end - end position\n * @param {string} mode - Editor mode name of want to match converted position to\n */\n ToastUIEditorCore.prototype.convertPosToMatchEditorMode = function (start, end, mode) {\n var _a, _b;\n if (end === void 0) { end = start; }\n if (mode === void 0) { mode = this.mode; }\n var doc = this.mdEditor.view.state.doc;\n var isFromArray = Array.isArray(start);\n var isToArray = Array.isArray(end);\n var convertedFrom = start;\n var convertedTo = end;\n if (isFromArray !== isToArray) {\n throw new Error('Types of arguments must be same');\n }\n if (mode === 'markdown' && !isFromArray && !isToArray) {\n _a = getEditorToMdPos(doc, start, end), convertedFrom = _a[0], convertedTo = _a[1];\n }\n else if (mode === 'wysiwyg' && isFromArray && isToArray) {\n _b = getMdToEditorPos(doc, start, end), convertedFrom = _b[0], convertedTo = _b[1];\n }\n return [convertedFrom, convertedTo];\n };\n return ToastUIEditorCore;\n}());\n\n// @TODO: change syntax with our convention\n/* eslint-disable */\nfunction html$1 (n) {\n for (\n var l,\n e,\n s = arguments,\n t = 1,\n r = '',\n u = '',\n a = [0],\n c = function (n) {\n t === 1 && (n || (r = r.replace(/^\\s*\\n\\s*|\\s*\\n\\s*$/g, '')))\n ? a.push(n ? s[n] : r)\n : t === 3 && (n || r)\n ? ((a[1] = n ? s[n] : r), (t = 2))\n : t === 2 && r === '...' && n\n ? (a[2] = assign(a[2] || {}, s[n]))\n : t === 2 && r && !n\n ? ((a[2] = a[2] || {})[r] = !0)\n : t >= 5 &&\n (t === 5\n ? (((a[2] = a[2] || {})[e] = n ? (r ? r + s[n] : s[n]) : r), (t = 6))\n : (n || r) && (a[2][e] += n ? r + s[n] : r)),\n (r = '');\n },\n h = 0;\n h < n.length;\n h++\n ) {\n h && (t === 1 && c(), c(h));\n for (let i = 0; i < n[h].length; i++)\n (l = n[h][i]),\n t === 1\n ? l === '<'\n ? (c(), (a = [a, '', null]), (t = 3))\n : (r += l)\n : t === 4\n ? r === '--' && l === '>'\n ? ((t = 1), (r = ''))\n : (r = l + r[0])\n : u\n ? l === u\n ? (u = '')\n : (r += l)\n : l === '\"' || l === \"'\"\n ? (u = l)\n : l === '>'\n ? (c(), (t = 1))\n : t &&\n (l === '='\n ? ((t = 5), (e = r), (r = ''))\n : l === '/' && (t < 5 || n[h][i + 1] === '>')\n ? (c(),\n t === 3 && (a = a[0]),\n (t = a),\n (a = a[0]).push(this.apply(null, t.slice(1))),\n (t = 0))\n : l === ' ' || l === '\\t' || l === '\\n' || l === '\\r'\n ? (c(), (t = 2))\n : (r += l)),\n t === 3 && r === '!--' && ((t = 4), (a = a[0]));\n }\n return c(), a.length > 2 ? a.slice(1) : a[1];\n}\n\n/**\n * @fileoverview Check whether the given variable is a string or not.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n/**\n * Check whether the given variable is a boolean or not.\n * If the given variable is a boolean, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is boolean?\n * @memberof module:type\n */\nfunction isBoolean(obj) {\n return typeof obj === 'boolean' || obj instanceof Boolean;\n}\n\nvar isBoolean_1 = isBoolean;\n\nvar VNodeWalker = /** @class */ (function () {\n function VNodeWalker(current) {\n this.current = current;\n this.root = current;\n this.entering = true;\n }\n VNodeWalker.prototype.walk = function () {\n var _a = this, entering = _a.entering, cur = _a.current;\n if (!cur) {\n return null;\n }\n if (entering) {\n if (cur.firstChild) {\n this.current = cur.firstChild;\n this.entering = true;\n }\n else {\n this.entering = false;\n }\n }\n else if (cur === this.root) {\n this.current = null;\n }\n else if (cur.next) {\n this.current = cur.next;\n this.entering = true;\n }\n else {\n this.current = cur.parent;\n this.entering = false;\n }\n return { vnode: cur, entering: entering };\n };\n return VNodeWalker;\n}());\nvar VNode = /** @class */ (function () {\n function VNode(type, props, children) {\n this.parent = null;\n this.old = null;\n this.firstChild = null;\n this.next = null;\n this.skip = false;\n this.type = type;\n this.props = props;\n this.children = children;\n this.props.children = children;\n if (props.ref) {\n this.ref = props.ref;\n delete props.ref;\n }\n if (props.key) {\n this.key = props.key;\n delete props.key;\n }\n }\n VNode.prototype.walker = function () {\n return new VNodeWalker(this);\n };\n VNode.removalNodes = [];\n return VNode;\n}());\n\nfunction createTextNode(text) {\n return new VNode('TEXT_NODE', { nodeValue: text }, []);\n}\nfunction excludeUnnecessaryChild(child, flatted) {\n var vnode = child;\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (isBoolean_1(child) || child == null) {\n vnode = null;\n }\n else if (isString_1(child) || isNumber_1(child)) {\n vnode = createTextNode(String(child));\n }\n if (vnode) {\n flatted.push(vnode);\n }\n}\nfunction h(type, props) {\n var children = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n children[_i - 2] = arguments[_i];\n }\n var flatted = [];\n children.forEach(function (child) {\n if (Array.isArray(child)) {\n child.forEach(function (vnode) {\n excludeUnnecessaryChild(vnode, flatted);\n });\n }\n else {\n excludeUnnecessaryChild(child, flatted);\n }\n });\n return new VNode(type, props || {}, flatted);\n}\n// @ts-ignore\nvar html = html$1.bind(h);\n\n/**\n * @fileoverview Check whether the given variable is an object or not.\n * @author NHN FE Development Lab <dl_javascript@nhn.com>\n */\n\n/**\n * Check whether the given variable is an object or not.\n * If the given variable is an object, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is object?\n * @memberof module:type\n */\nfunction isObject(obj) {\n return obj === Object(obj);\n}\n\nvar isObject_1 = isObject;\n\n// @TODO: clearfy the type definition for CSSDeclaration\nfunction createNode(vnode) {\n var node;\n if (vnode.type === 'TEXT_NODE') {\n node = document.createTextNode(vnode.props.nodeValue);\n }\n else {\n node = document.createElement(vnode.type);\n setProps(node, {}, vnode.props);\n }\n return node;\n}\nfunction removeNode(vnode, parentNode) {\n if (vnode.node) {\n parentNode.removeChild(vnode.node);\n }\n else {\n removeNode(vnode.firstChild, parentNode);\n }\n}\nfunction innerDiff(node, prevProps, nextProps) {\n Object.keys(prevProps).forEach(function (propName) {\n if (/^on/.test(propName)) {\n if (!nextProps[propName] || prevProps[propName] !== nextProps[propName]) {\n var eventName = propName.slice(2).toLowerCase();\n node.removeEventListener(eventName, prevProps[propName]);\n }\n }\n else if (propName !== 'children' && !nextProps[propName] && !isTextNode(node)) {\n node.removeAttribute(propName);\n }\n });\n setProps(node, prevProps, nextProps, function (propName) { return !shallowEqual(prevProps[propName], nextProps[propName]); });\n}\nvar reNonDimension = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;\nfunction setProps(node, prevProps, props, condition) {\n Object.keys(props).forEach(function (propName) {\n if (!condition || condition(propName)) {\n if (/^on/.test(propName)) {\n var eventName = propName.slice(2).toLowerCase();\n node.addEventListener(eventName, props[propName]);\n }\n else if (propName === 'nodeValue') {\n node[propName] = props[propName];\n }\n else if (propName === 'style' && isObject_1(props[propName])) {\n setStyleProps(node, prevProps[propName], props[propName]);\n }\n else if (propName !== 'children') {\n if (props[propName] === false) {\n node.removeAttribute(propName);\n }\n else {\n node.setAttribute(propName, props[propName]);\n }\n }\n }\n });\n}\nfunction setStyleProps(node, prevStyleProps, styleProps) {\n if (prevStyleProps) {\n Object.keys(prevStyleProps).forEach(function (styleProp) {\n // @ts-ignore\n node.style[styleProp] = '';\n });\n }\n Object.keys(styleProps).forEach(function (styleProp) {\n var value = styleProps[styleProp];\n // @ts-ignore\n node.style[styleProp] =\n isNumber_1(value) && !reNonDimension.test(styleProp) ? value + \"px\" : value;\n });\n}\n\nfunction commit(vnode) {\n VNode.removalNodes.forEach(function (removalNode) { return diff(removalNode); });\n if (vnode) {\n var next = void 0;\n var walker = vnode.walker();\n while ((next = walker.walk())) {\n vnode = next.vnode;\n if (next.entering) {\n diff(vnode);\n }\n else if (isFunction_1(vnode.type)) {\n var comp = vnode.component;\n // lifecycle method\n if (!vnode.old && comp.mounted) {\n comp.mounted();\n }\n if (vnode.old && comp.updated) {\n var prevProps = comp.prevProps || {};\n comp.updated(prevProps);\n }\n }\n }\n }\n}\nfunction getParentNode(vnode) {\n var parent = vnode.parent;\n while (!parent.node) {\n parent = parent.parent;\n }\n return parent.node;\n}\nfunction diff(vnode) {\n if (!vnode || !vnode.parent) {\n return;\n }\n if (vnode.node) {\n var parentNode = getParentNode(vnode);\n if (vnode.effect === 'A') {\n parentNode.appendChild(vnode.node);\n }\n else if (vnode.effect === 'U') {\n innerDiff(vnode.node, vnode.old.props, vnode.props);\n }\n }\n if (vnode.effect === 'D') {\n var next = void 0;\n var walker = vnode.walker();\n while ((next = walker.walk())) {\n vnode = next.vnode;\n if (!next.entering) {\n if (isFunction_1(vnode.type)) {\n var comp = vnode.component;\n // lifecycle method\n if (comp.beforeDestroy) {\n comp.beforeDestroy();\n }\n }\n else {\n var parentNode = getParentNode(vnode);\n removeNode(vnode, parentNode);\n }\n }\n }\n }\n // apply ref\n if (vnode.ref) {\n if (vnode.component) {\n vnode.ref(vnode.component);\n }\n else if (vnode.node) {\n vnode.ref(vnode.node);\n }\n }\n}\n\nfunction createComponent(Comp, vnode) {\n var props = vnode.props, component = vnode.component;\n if (component) {\n component.prevProps = component.props;\n component.props = vnode.props;\n return component;\n }\n return new Comp(props);\n}\nfunction buildVNode(vnode) {\n var root = vnode;\n while (vnode && !vnode.skip) {\n if (isFunction_1(vnode.type)) {\n var instance = createComponent(vnode.type, vnode);\n instance.vnode = vnode;\n vnode.component = instance;\n vnode.props.children = vnode.children = [instance.render()];\n buildChildrenVNode(vnode);\n }\n else {\n if (!vnode.node) {\n vnode.node = createNode(vnode);\n }\n buildChildrenVNode(vnode);\n }\n if (vnode.firstChild) {\n vnode = vnode.firstChild;\n }\n else {\n while (vnode && vnode.parent && !vnode.next) {\n vnode = vnode.parent;\n if (vnode === root) {\n break;\n }\n }\n vnode = vnode.next;\n }\n }\n}\nfunction isSameType(old, vnode) {\n return old && vnode && vnode.type === old.type && (!vnode.key || vnode.key === old.key);\n}\n// @TODO: add key diff algorithm\nfunction buildChildrenVNode(parent) {\n var children = parent.children;\n var old = parent.old ? parent.old.firstChild : null;\n var prev = null;\n children.forEach(function (vnode, index) {\n var sameType = isSameType(old, vnode);\n if (sameType) {\n vnode.old = old;\n vnode.parent = parent;\n vnode.node = old.node;\n vnode.component = old.component;\n vnode.effect = 'U';\n }\n if (vnode && !sameType) {\n vnode.old = null;\n vnode.parent = parent;\n vnode.node = null;\n vnode.effect = 'A';\n }\n if (old && !sameType) {\n VNode.removalNodes.push(old);\n old.effect = 'D';\n }\n if (old) {\n old = old.next;\n }\n if (index === 0) {\n parent.firstChild = vnode;\n }\n else if (vnode) {\n prev.next = vnode;\n }\n prev = vnode;\n });\n var lastChild = last$1(children);\n if (!children.length) {\n while (old) {\n VNode.removalNodes.push(old);\n old.effect = 'D';\n old = old.next;\n }\n }\n while (old && lastChild) {\n if (old && lastChild.old !== old) {\n VNode.removalNodes.push(old);\n old.effect = 'D';\n old = old.next;\n }\n }\n}\n\nfunction destroy(vnode) {\n vnode.effect = 'D';\n VNode.removalNodes = [vnode];\n commit();\n VNode.removalNodes = [];\n}\nfunction rerender(comp) {\n var root = comp.vnode;\n root.effect = 'U';\n root.old = root;\n // skip for unnecessary reconciliation\n if (root.next) {\n root.next.skip = true;\n }\n VNode.removalNodes = [];\n buildVNode(root);\n commit(root);\n if (root.next) {\n root.next.skip = false;\n }\n}\nfunction render(container, vnode) {\n var root = new VNode(container.tagName.toLowerCase(), {}, [vnode]);\n root.node = container;\n VNode.removalNodes = [];\n buildVNode(root);\n commit(root);\n return function () { return destroy(root.firstChild); };\n}\n\nvar Component = /** @class */ (function () {\n function Component(props) {\n this.props = props;\n this.state = {};\n this.refs = {};\n }\n Component.prototype.setState = function (state) {\n var newState = __assign$1(__assign$1({}, this.state), state);\n if (!shallowEqual(this.state, newState)) {\n this.state = newState;\n rerender(this);\n }\n };\n return Component;\n}());\n\nvar Switch = /** @class */ (function (_super) {\n __extends$1(Switch, _super);\n function Switch(props) {\n var _this = _super.call(this, props) || this;\n _this.state = {\n hide: false,\n };\n return _this;\n }\n Switch.prototype.show = function () {\n this.setState({ hide: false });\n };\n Switch.prototype.hide = function () {\n this.setState({ hide: true });\n };\n Switch.prototype.render = function () {\n var _a = this.props, editorType = _a.editorType, eventEmitter = _a.eventEmitter;\n return html(templateObject_1$h || (templateObject_1$h = __makeTemplateObject([\"\\n <div class=\\\"\", \"\\\" style=\\\"display: \", \"\\\">\\n <div\\n class=\\\"tab-item\", \"\\\"\\n onClick=\", \"\\n >\\n \", \"\\n </div>\\n <div\\n class=\\\"tab-item\", \"\\\"\\n onClick=\", \"\\n >\\n \", \"\\n </div>\\n </div>\\n \"], [\"\\n <div class=\\\"\", \"\\\" style=\\\"display: \", \"\\\">\\n <div\\n class=\\\"tab-item\", \"\\\"\\n onClick=\",\n \"\\n >\\n \", \"\\n </div>\\n <div\\n class=\\\"tab-item\", \"\\\"\\n onClick=\",\n \"\\n >\\n \", \"\\n </div>\\n </div>\\n \"])), cls('mode-switch'), this.state.hide ? 'none' : 'block', editorType === 'markdown' ? ' active' : '', function () {\n eventEmitter.emit('needChangeMode', 'markdown');\n }, i18n.get('Markdown'), editorType === 'wysiwyg' ? ' active' : '', function () {\n eventEmitter.emit('needChangeMode', 'wysiwyg');\n }, i18n.get('WYSIWYG'));\n };\n return Switch;\n}(Component));\nvar templateObject_1$h;\n\n/**\n * @fileoverview Creates a debounced function that delays invoking fn until after delay milliseconds has elapsed since the last time the debouced function was invoked.\n * @author NHN FE Development Lab <dl_javascript.nhn.com>\n */\n\n/**\n * @module tricks\n */\n\n/**\n * Creates a debounced function that delays invoking fn until after delay milliseconds has elapsed\n * since the last time the debouced function was invoked.\n * @param {function} fn The function to debounce.\n * @param {number} [delay=0] The number of milliseconds to delay\n * @returns {function} debounced function.\n * @memberof module:tricks\n * @example\n * // ES6\n * import debounce from 'tui-code-snippet/tricks/debounce';\n * \n * // CommonJS\n * const debounce = require('tui-code-snippet/tricks/debounce');\n *\n * function someMethodToInvokeDebounced() {}\n *\n * const debounced = debounce(someMethodToInvokeDebounced, 300);\n *\n * // invoke repeatedly\n * debounced();\n * debounced();\n * debounced();\n * debounced();\n * debounced();\n * debounced(); // last invoke of debounced()\n *\n * // invoke someMethodToInvokeDebounced() after 300 milliseconds.\n */\nfunction debounce$1(fn, delay) {\n var timer, args;\n\n /* istanbul ignore next */\n delay = delay || 0;\n\n function debounced() { // eslint-disable-line require-jsdoc\n args = Array.prototype.slice.call(arguments);\n\n window.clearTimeout(timer);\n timer = window.setTimeout(function() {\n fn.apply(null, args);\n }, delay);\n }\n\n return debounced;\n}\n\nvar debounce_1 = debounce$1;\n\n/**\n * @fileoverview Creates a throttled function that only invokes fn at most once per every interval milliseconds.\n * @author NHN FE Development Lab <dl_javascript.nhn.com>\n */\n\nvar debounce = debounce_1;\n\n/**\n * Creates a throttled function that only invokes fn at most once per every interval milliseconds.\n * You can use this throttle short time repeatedly invoking functions. (e.g MouseMove, Resize ...)\n * if you need reuse throttled method. you must remove slugs (e.g. flag variable) related with throttling.\n * @param {function} fn function to throttle\n * @param {number} [interval=0] the number of milliseconds to throttle invocations to.\n * @returns {function} throttled function\n * @memberof module:tricks\n * @example\n * // ES6\n * import throttle from 'tui-code-snippet/tricks/throttle';\n * \n * // CommonJS\n * const throttle = require('tui-code-snippet/tricks/throttle');\n *\n * function someMethodToInvokeThrottled() {}\n *\n * const throttled = throttle(someMethodToInvokeThrottled, 300);\n *\n * // invoke repeatedly\n * throttled(); // invoke (leading)\n * throttled();\n * throttled(); // invoke (near 300 milliseconds)\n * throttled();\n * throttled();\n * throttled(); // invoke (near 600 milliseconds)\n * // ...\n * // invoke (trailing)\n *\n * // if you need reuse throttled method. then invoke reset()\n * throttled.reset();\n */\nfunction throttle$1(fn, interval) {\n var base;\n var isLeading = true;\n var tick = function(_args) {\n fn.apply(null, _args);\n base = null;\n };\n var debounced, stamp, args;\n\n /* istanbul ignore next */\n interval = interval || 0;\n\n debounced = debounce(tick, interval);\n\n function throttled() { // eslint-disable-line require-jsdoc\n args = Array.prototype.slice.call(arguments);\n\n if (isLeading) {\n tick(args);\n isLeading = false;\n\n return;\n }\n\n stamp = Number(new Date());\n\n base = base || stamp;\n\n // pass array directly because `debounce()`, `tick()` are already use\n // `apply()` method to invoke developer's `fn` handler.\n //\n // also, this `debounced` line invoked every time for implements\n // `trailing` features.\n debounced(args);\n\n if ((stamp - base) >= interval) {\n tick(args);\n }\n }\n\n function reset() { // eslint-disable-line require-jsdoc\n isLeading = true;\n base = null;\n }\n\n throttled.reset = reset;\n\n return throttled;\n}\n\nvar throttle_1 = throttle$1;\n\n/**\r\n * A collection of shims that provide minimal functionality of the ES6 collections.\r\n *\r\n * These implementations are not meant to be used outside of the ResizeObserver\r\n * modules as they cover only a limited range of use cases.\r\n */\r\n/* eslint-disable require-jsdoc, valid-jsdoc */\r\nvar MapShim = (function () {\r\n if (typeof Map !== 'undefined') {\r\n return Map;\r\n }\r\n /**\r\n * Returns index in provided array that matches the specified key.\r\n *\r\n * @param {Array<Array>} arr\r\n * @param {*} key\r\n * @returns {number}\r\n */\r\n function getIndex(arr, key) {\r\n var result = -1;\r\n arr.some(function (entry, index) {\r\n if (entry[0] === key) {\r\n result = index;\r\n return true;\r\n }\r\n return false;\r\n });\r\n return result;\r\n }\r\n return /** @class */ (function () {\r\n function class_1() {\r\n this.__entries__ = [];\r\n }\r\n Object.defineProperty(class_1.prototype, \"size\", {\r\n /**\r\n * @returns {boolean}\r\n */\r\n get: function () {\r\n return this.__entries__.length;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * @param {*} key\r\n * @returns {*}\r\n */\r\n class_1.prototype.get = function (key) {\r\n var index = getIndex(this.__entries__, key);\r\n var entry = this.__entries__[index];\r\n return entry && entry[1];\r\n };\r\n /**\r\n * @param {*} key\r\n * @param {*} value\r\n * @returns {void}\r\n */\r\n class_1.prototype.set = function (key, value) {\r\n var index = getIndex(this.__entries__, key);\r\n if (~index) {\r\n this.__entries__[index][1] = value;\r\n }\r\n else {\r\n this.__entries__.push([key, value]);\r\n }\r\n };\r\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\r\n class_1.prototype.delete = function (key) {\r\n var entries = this.__entries__;\r\n var index = getIndex(entries, key);\r\n if (~index) {\r\n entries.splice(index, 1);\r\n }\r\n };\r\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\r\n class_1.prototype.has = function (key) {\r\n return !!~getIndex(this.__entries__, key);\r\n };\r\n /**\r\n * @returns {void}\r\n */\r\n class_1.prototype.clear = function () {\r\n this.__entries__.splice(0);\r\n };\r\n /**\r\n * @param {Function} callback\r\n * @param {*} [ctx=null]\r\n * @returns {void}\r\n */\r\n class_1.prototype.forEach = function (callback, ctx) {\r\n if (ctx === void 0) { ctx = null; }\r\n for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {\r\n var entry = _a[_i];\r\n callback.call(ctx, entry[1], entry[0]);\r\n }\r\n };\r\n return class_1;\r\n }());\r\n})();\n\n/**\r\n * Detects whether window and document objects are available in current environment.\r\n */\r\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;\n\n// Returns global object of a current environment.\r\nvar global$1 = (function () {\r\n if (typeof global !== 'undefined' && global.Math === Math) {\r\n return global;\r\n }\r\n if (typeof self !== 'undefined' && self.Math === Math) {\r\n return self;\r\n }\r\n if (typeof window !== 'undefined' && window.Math === Math) {\r\n return window;\r\n }\r\n // eslint-disable-next-line no-new-func\r\n return Function('return this')();\r\n})();\n\n/**\r\n * A shim for the requestAnimationFrame which falls back to the setTimeout if\r\n * first one is not supported.\r\n *\r\n * @returns {number} Requests' identifier.\r\n */\r\nvar requestAnimationFrame$1 = (function () {\r\n if (typeof requestAnimationFrame === 'function') {\r\n // It's required to use a bounded function because IE sometimes throws\r\n // an \"Invalid calling object\" error if rAF is invoked without the global\r\n // object on the left hand side.\r\n return requestAnimationFrame.bind(global$1);\r\n }\r\n return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };\r\n})();\n\n// Defines minimum timeout before adding a trailing call.\r\nvar trailingTimeout = 2;\r\n/**\r\n * Creates a wrapper function which ensures that provided callback will be\r\n * invoked only once during the specified delay period.\r\n *\r\n * @param {Function} callback - Function to be invoked after the delay period.\r\n * @param {number} delay - Delay after which to invoke callback.\r\n * @returns {Function}\r\n */\r\nfunction throttle (callback, delay) {\r\n var leadingCall = false, trailingCall = false, lastCallTime = 0;\r\n /**\r\n * Invokes the original callback function and schedules new invocation if\r\n * the \"proxy\" was called during current request.\r\n *\r\n * @returns {void}\r\n */\r\n function resolvePending() {\r\n if (leadingCall) {\r\n leadingCall = false;\r\n callback();\r\n }\r\n if (trailingCall) {\r\n proxy();\r\n }\r\n }\r\n /**\r\n * Callback invoked after the specified delay. It will further postpone\r\n * invocation of the original function delegating it to the\r\n * requestAnimationFrame.\r\n *\r\n * @returns {void}\r\n */\r\n function timeoutCallback() {\r\n requestAnimationFrame$1(resolvePending);\r\n }\r\n /**\r\n * Schedules invocation of the original function.\r\n *\r\n * @returns {void}\r\n */\r\n function proxy() {\r\n var timeStamp = Date.now();\r\n if (leadingCall) {\r\n // Reject immediately following calls.\r\n if (timeStamp - lastCallTime < trailingTimeout) {\r\n return;\r\n }\r\n // Schedule new call to be in invoked when the pending one is resolved.\r\n // This is important for \"transitions\" which never actually start\r\n // immediately so there is a chance that we might miss one if change\r\n // happens amids the pending invocation.\r\n trailingCall = true;\r\n }\r\n else {\r\n leadingCall = true;\r\n trailingCall = false;\r\n setTimeout(timeoutCallback, delay);\r\n }\r\n lastCallTime = timeStamp;\r\n }\r\n return proxy;\r\n}\n\n// Minimum delay before invoking the update of observers.\r\nvar REFRESH_DELAY = 20;\r\n// A list of substrings of CSS properties used to find transition events that\r\n// might affect dimensions of observed elements.\r\nvar transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];\r\n// Check if MutationObserver is available.\r\nvar mutationObserverSupported = typeof MutationObserver !== 'undefined';\r\n/**\r\n * Singleton controller class which handles updates of ResizeObserver instances.\r\n */\r\nvar ResizeObserverController = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserverController.\r\n *\r\n * @private\r\n */\r\n function ResizeObserverController() {\r\n /**\r\n * Indicates whether DOM listeners have been added.\r\n *\r\n * @private {boolean}\r\n */\r\n this.connected_ = false;\r\n /**\r\n * Tells that controller has subscribed for Mutation Events.\r\n *\r\n * @private {boolean}\r\n */\r\n this.mutationEventsAdded_ = false;\r\n /**\r\n * Keeps reference to the instance of MutationObserver.\r\n *\r\n * @private {MutationObserver}\r\n */\r\n this.mutationsObserver_ = null;\r\n /**\r\n * A list of connected observers.\r\n *\r\n * @private {Array<ResizeObserverSPI>}\r\n */\r\n this.observers_ = [];\r\n this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);\r\n this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);\r\n }\r\n /**\r\n * Adds observer to observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be added.\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.addObserver = function (observer) {\r\n if (!~this.observers_.indexOf(observer)) {\r\n this.observers_.push(observer);\r\n }\r\n // Add listeners if they haven't been added yet.\r\n if (!this.connected_) {\r\n this.connect_();\r\n }\r\n };\r\n /**\r\n * Removes observer from observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be removed.\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.removeObserver = function (observer) {\r\n var observers = this.observers_;\r\n var index = observers.indexOf(observer);\r\n // Remove observer if it's present in registry.\r\n if (~index) {\r\n observers.splice(index, 1);\r\n }\r\n // Remove listeners if controller has no connected observers.\r\n if (!observers.length && this.connected_) {\r\n this.disconnect_();\r\n }\r\n };\r\n /**\r\n * Invokes the update of observers. It will continue running updates insofar\r\n * it detects changes.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.refresh = function () {\r\n var changesDetected = this.updateObservers_();\r\n // Continue running updates if changes have been detected as there might\r\n // be future ones caused by CSS transitions.\r\n if (changesDetected) {\r\n this.refresh();\r\n }\r\n };\r\n /**\r\n * Updates every observer from observers list and notifies them of queued\r\n * entries.\r\n *\r\n * @private\r\n * @returns {boolean} Returns \"true\" if any observer has detected changes in\r\n * dimensions of it's elements.\r\n */\r\n ResizeObserverController.prototype.updateObservers_ = function () {\r\n // Collect observers that have active observations.\r\n var activeObservers = this.observers_.filter(function (observer) {\r\n return observer.gatherActive(), observer.hasActive();\r\n });\r\n // Deliver notifications in a separate cycle in order to avoid any\r\n // collisions between observers, e.g. when multiple instances of\r\n // ResizeObserver are tracking the same element and the callback of one\r\n // of them changes content dimensions of the observed target. Sometimes\r\n // this may result in notifications being blocked for the rest of observers.\r\n activeObservers.forEach(function (observer) { return observer.broadcastActive(); });\r\n return activeObservers.length > 0;\r\n };\r\n /**\r\n * Initializes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.connect_ = function () {\r\n // Do nothing if running in a non-browser environment or if listeners\r\n // have been already added.\r\n if (!isBrowser || this.connected_) {\r\n return;\r\n }\r\n // Subscription to the \"Transitionend\" event is used as a workaround for\r\n // delayed transitions. This way it's possible to capture at least the\r\n // final state of an element.\r\n document.addEventListener('transitionend', this.onTransitionEnd_);\r\n window.addEventListener('resize', this.refresh);\r\n if (mutationObserverSupported) {\r\n this.mutationsObserver_ = new MutationObserver(this.refresh);\r\n this.mutationsObserver_.observe(document, {\r\n attributes: true,\r\n childList: true,\r\n characterData: true,\r\n subtree: true\r\n });\r\n }\r\n else {\r\n document.addEventListener('DOMSubtreeModified', this.refresh);\r\n this.mutationEventsAdded_ = true;\r\n }\r\n this.connected_ = true;\r\n };\r\n /**\r\n * Removes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.disconnect_ = function () {\r\n // Do nothing if running in a non-browser environment or if listeners\r\n // have been already removed.\r\n if (!isBrowser || !this.connected_) {\r\n return;\r\n }\r\n document.removeEventListener('transitionend', this.onTransitionEnd_);\r\n window.removeEventListener('resize', this.refresh);\r\n if (this.mutationsObserver_) {\r\n this.mutationsObserver_.disconnect();\r\n }\r\n if (this.mutationEventsAdded_) {\r\n document.removeEventListener('DOMSubtreeModified', this.refresh);\r\n }\r\n this.mutationsObserver_ = null;\r\n this.mutationEventsAdded_ = false;\r\n this.connected_ = false;\r\n };\r\n /**\r\n * \"Transitionend\" event handler.\r\n *\r\n * @private\r\n * @param {TransitionEvent} event\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {\r\n var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;\r\n // Detect whether transition may affect dimensions of an element.\r\n var isReflowProperty = transitionKeys.some(function (key) {\r\n return !!~propertyName.indexOf(key);\r\n });\r\n if (isReflowProperty) {\r\n this.refresh();\r\n }\r\n };\r\n /**\r\n * Returns instance of the ResizeObserverController.\r\n *\r\n * @returns {ResizeObserverController}\r\n */\r\n ResizeObserverController.getInstance = function () {\r\n if (!this.instance_) {\r\n this.instance_ = new ResizeObserverController();\r\n }\r\n return this.instance_;\r\n };\r\n /**\r\n * Holds reference to the controller's instance.\r\n *\r\n * @private {ResizeObserverController}\r\n */\r\n ResizeObserverController.instance_ = null;\r\n return ResizeObserverController;\r\n}());\n\n/**\r\n * Defines non-writable/enumerable properties of the provided target object.\r\n *\r\n * @param {Object} target - Object for which to define properties.\r\n * @param {Object} props - Properties to be defined.\r\n * @returns {Object} Target object.\r\n */\r\nvar defineConfigurable = (function (target, props) {\r\n for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {\r\n var key = _a[_i];\r\n Object.defineProperty(target, key, {\r\n value: props[key],\r\n enumerable: false,\r\n writable: false,\r\n configurable: true\r\n });\r\n }\r\n return target;\r\n});\n\n/**\r\n * Returns the global object associated with provided element.\r\n *\r\n * @param {Object} target\r\n * @returns {Object}\r\n */\r\nvar getWindowOf = (function (target) {\r\n // Assume that the element is an instance of Node, which means that it\r\n // has the \"ownerDocument\" property from which we can retrieve a\r\n // corresponding global object.\r\n var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;\r\n // Return the local global object if it's not possible extract one from\r\n // provided element.\r\n return ownerGlobal || global$1;\r\n});\n\n// Placeholder of an empty content rectangle.\r\nvar emptyRect = createRectInit(0, 0, 0, 0);\r\n/**\r\n * Converts provided string to a number.\r\n *\r\n * @param {number|string} value\r\n * @returns {number}\r\n */\r\nfunction toFloat(value) {\r\n return parseFloat(value) || 0;\r\n}\r\n/**\r\n * Extracts borders size from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @param {...string} positions - Borders positions (top, right, ...)\r\n * @returns {number}\r\n */\r\nfunction getBordersSize(styles) {\r\n var positions = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n positions[_i - 1] = arguments[_i];\r\n }\r\n return positions.reduce(function (size, position) {\r\n var value = styles['border-' + position + '-width'];\r\n return size + toFloat(value);\r\n }, 0);\r\n}\r\n/**\r\n * Extracts paddings sizes from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @returns {Object} Paddings box.\r\n */\r\nfunction getPaddings(styles) {\r\n var positions = ['top', 'right', 'bottom', 'left'];\r\n var paddings = {};\r\n for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {\r\n var position = positions_1[_i];\r\n var value = styles['padding-' + position];\r\n paddings[position] = toFloat(value);\r\n }\r\n return paddings;\r\n}\r\n/**\r\n * Calculates content rectangle of provided SVG element.\r\n *\r\n * @param {SVGGraphicsElement} target - Element content rectangle of which needs\r\n * to be calculated.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getSVGContentRect(target) {\r\n var bbox = target.getBBox();\r\n return createRectInit(0, 0, bbox.width, bbox.height);\r\n}\r\n/**\r\n * Calculates content rectangle of provided HTMLElement.\r\n *\r\n * @param {HTMLElement} target - Element for which to calculate the content rectangle.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getHTMLElementContentRect(target) {\r\n // Client width & height properties can't be\r\n // used exclusively as they provide rounded values.\r\n var clientWidth = target.clientWidth, clientHeight = target.clientHeight;\r\n // By this condition we can catch all non-replaced inline, hidden and\r\n // detached elements. Though elements with width & height properties less\r\n // than 0.5 will be discarded as well.\r\n //\r\n // Without it we would need to implement separate methods for each of\r\n // those cases and it's not possible to perform a precise and performance\r\n // effective test for hidden elements. E.g. even jQuery's ':visible' filter\r\n // gives wrong results for elements with width & height less than 0.5.\r\n if (!clientWidth && !clientHeight) {\r\n return emptyRect;\r\n }\r\n var styles = getWindowOf(target).getComputedStyle(target);\r\n var paddings = getPaddings(styles);\r\n var horizPad = paddings.left + paddings.right;\r\n var vertPad = paddings.top + paddings.bottom;\r\n // Computed styles of width & height are being used because they are the\r\n // only dimensions available to JS that contain non-rounded values. It could\r\n // be possible to utilize the getBoundingClientRect if only it's data wasn't\r\n // affected by CSS transformations let alone paddings, borders and scroll bars.\r\n var width = toFloat(styles.width), height = toFloat(styles.height);\r\n // Width & height include paddings and borders when the 'border-box' box\r\n // model is applied (except for IE).\r\n if (styles.boxSizing === 'border-box') {\r\n // Following conditions are required to handle Internet Explorer which\r\n // doesn't include paddings and borders to computed CSS dimensions.\r\n //\r\n // We can say that if CSS dimensions + paddings are equal to the \"client\"\r\n // properties then it's either IE, and thus we don't need to subtract\r\n // anything, or an element merely doesn't have paddings/borders styles.\r\n if (Math.round(width + horizPad) !== clientWidth) {\r\n width -= getBordersSize(styles, 'left', 'right') + horizPad;\r\n }\r\n if (Math.round(height + vertPad) !== clientHeight) {\r\n height -= getBordersSize(styles, 'top', 'bottom') + vertPad;\r\n }\r\n }\r\n // Following steps can't be applied to the document's root element as its\r\n // client[Width/Height] properties represent viewport area of the window.\r\n // Besides, it's as well not necessary as the <html> itself neither has\r\n // rendered scroll bars nor it can be clipped.\r\n if (!isDocumentElement(target)) {\r\n // In some browsers (only in Firefox, actually) CSS width & height\r\n // include scroll bars size which can be removed at this step as scroll\r\n // bars are the only difference between rounded dimensions + paddings\r\n // and \"client\" properties, though that is not always true in Chrome.\r\n var vertScrollbar = Math.round(width + horizPad) - clientWidth;\r\n var horizScrollbar = Math.round(height + vertPad) - clientHeight;\r\n // Chrome has a rather weird rounding of \"client\" properties.\r\n // E.g. for an element with content width of 314.2px it sometimes gives\r\n // the client width of 315px and for the width of 314.7px it may give\r\n // 314px. And it doesn't happen all the time. So just ignore this delta\r\n // as a non-relevant.\r\n if (Math.abs(vertScrollbar) !== 1) {\r\n width -= vertScrollbar;\r\n }\r\n if (Math.abs(horizScrollbar) !== 1) {\r\n height -= horizScrollbar;\r\n }\r\n }\r\n return createRectInit(paddings.left, paddings.top, width, height);\r\n}\r\n/**\r\n * Checks whether provided element is an instance of the SVGGraphicsElement.\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\r\nvar isSVGGraphicsElement = (function () {\r\n // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement\r\n // interface.\r\n if (typeof SVGGraphicsElement !== 'undefined') {\r\n return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };\r\n }\r\n // If it's so, then check that element is at least an instance of the\r\n // SVGElement and that it has the \"getBBox\" method.\r\n // eslint-disable-next-line no-extra-parens\r\n return function (target) { return (target instanceof getWindowOf(target).SVGElement &&\r\n typeof target.getBBox === 'function'); };\r\n})();\r\n/**\r\n * Checks whether provided element is a document element (<html>).\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\r\nfunction isDocumentElement(target) {\r\n return target === getWindowOf(target).document.documentElement;\r\n}\r\n/**\r\n * Calculates an appropriate content rectangle for provided html or svg element.\r\n *\r\n * @param {Element} target - Element content rectangle of which needs to be calculated.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getContentRect(target) {\r\n if (!isBrowser) {\r\n return emptyRect;\r\n }\r\n if (isSVGGraphicsElement(target)) {\r\n return getSVGContentRect(target);\r\n }\r\n return getHTMLElementContentRect(target);\r\n}\r\n/**\r\n * Creates rectangle with an interface of the DOMRectReadOnly.\r\n * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly\r\n *\r\n * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.\r\n * @returns {DOMRectReadOnly}\r\n */\r\nfunction createReadOnlyRect(_a) {\r\n var x = _a.x, y = _a.y, width = _a.width, height = _a.height;\r\n // If DOMRectReadOnly is available use it as a prototype for the rectangle.\r\n var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;\r\n var rect = Object.create(Constr.prototype);\r\n // Rectangle's properties are not writable and non-enumerable.\r\n defineConfigurable(rect, {\r\n x: x, y: y, width: width, height: height,\r\n top: y,\r\n right: x + width,\r\n bottom: height + y,\r\n left: x\r\n });\r\n return rect;\r\n}\r\n/**\r\n * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.\r\n * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit\r\n *\r\n * @param {number} x - X coordinate.\r\n * @param {number} y - Y coordinate.\r\n * @param {number} width - Rectangle's width.\r\n * @param {number} height - Rectangle's height.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction createRectInit(x, y, width, height) {\r\n return { x: x, y: y, width: width, height: height };\r\n}\n\n/**\r\n * Class that is responsible for computations of the content rectangle of\r\n * provided DOM element and for keeping track of it's changes.\r\n */\r\nvar ResizeObservation = /** @class */ (function () {\r\n /**\r\n * Creates an instance of ResizeObservation.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n */\r\n function ResizeObservation(target) {\r\n /**\r\n * Broadcasted width of content rectangle.\r\n *\r\n * @type {number}\r\n */\r\n this.broadcastWidth = 0;\r\n /**\r\n * Broadcasted height of content rectangle.\r\n *\r\n * @type {number}\r\n */\r\n this.broadcastHeight = 0;\r\n /**\r\n * Reference to the last observed content rectangle.\r\n *\r\n * @private {DOMRectInit}\r\n */\r\n this.contentRect_ = createRectInit(0, 0, 0, 0);\r\n this.target = target;\r\n }\r\n /**\r\n * Updates content rectangle and tells whether it's width or height properties\r\n * have changed since the last broadcast.\r\n *\r\n * @returns {boolean}\r\n */\r\n ResizeObservation.prototype.isActive = function () {\r\n var rect = getContentRect(this.target);\r\n this.contentRect_ = rect;\r\n return (rect.width !== this.broadcastWidth ||\r\n rect.height !== this.broadcastHeight);\r\n };\r\n /**\r\n * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data\r\n * from the corresponding properties of the last observed content rectangle.\r\n *\r\n * @returns {DOMRectInit} Last observed content rectangle.\r\n */\r\n ResizeObservation.prototype.broadcastRect = function () {\r\n var rect = this.contentRect_;\r\n this.broadcastWidth = rect.width;\r\n this.broadcastHeight = rect.height;\r\n return rect;\r\n };\r\n return ResizeObservation;\r\n}());\n\nvar ResizeObserverEntry = /** @class */ (function () {\r\n /**\r\n * Creates an instance of ResizeObserverEntry.\r\n *\r\n * @param {Element} target - Element that is being observed.\r\n * @param {DOMRectInit} rectInit - Data of the element's content rectangle.\r\n */\r\n function ResizeObserverEntry(target, rectInit) {\r\n var contentRect = createReadOnlyRect(rectInit);\r\n // According to the specification following properties are not writable\r\n // and are also not enumerable in the native implementation.\r\n //\r\n // Property accessors are not being used as they'd require to define a\r\n // private WeakMap storage which may cause memory leaks in browsers that\r\n // don't support this type of collections.\r\n defineConfigurable(this, { target: target, contentRect: contentRect });\r\n }\r\n return ResizeObserverEntry;\r\n}());\n\nvar ResizeObserverSPI = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserver.\r\n *\r\n * @param {ResizeObserverCallback} callback - Callback function that is invoked\r\n * when one of the observed elements changes it's content dimensions.\r\n * @param {ResizeObserverController} controller - Controller instance which\r\n * is responsible for the updates of observer.\r\n * @param {ResizeObserver} callbackCtx - Reference to the public\r\n * ResizeObserver instance which will be passed to callback function.\r\n */\r\n function ResizeObserverSPI(callback, controller, callbackCtx) {\r\n /**\r\n * Collection of resize observations that have detected changes in dimensions\r\n * of elements.\r\n *\r\n * @private {Array<ResizeObservation>}\r\n */\r\n this.activeObservations_ = [];\r\n /**\r\n * Registry of the ResizeObservation instances.\r\n *\r\n * @private {Map<Element, ResizeObservation>}\r\n */\r\n this.observations_ = new MapShim();\r\n if (typeof callback !== 'function') {\r\n throw new TypeError('The callback provided as parameter 1 is not a function.');\r\n }\r\n this.callback_ = callback;\r\n this.controller_ = controller;\r\n this.callbackCtx_ = callbackCtx;\r\n }\r\n /**\r\n * Starts observing provided element.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.observe = function (target) {\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n // Do nothing if current environment doesn't have the Element interface.\r\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\r\n return;\r\n }\r\n if (!(target instanceof getWindowOf(target).Element)) {\r\n throw new TypeError('parameter 1 is not of type \"Element\".');\r\n }\r\n var observations = this.observations_;\r\n // Do nothing if element is already being observed.\r\n if (observations.has(target)) {\r\n return;\r\n }\r\n observations.set(target, new ResizeObservation(target));\r\n this.controller_.addObserver(this);\r\n // Force the update of observations.\r\n this.controller_.refresh();\r\n };\r\n /**\r\n * Stops observing provided element.\r\n *\r\n * @param {Element} target - Element to stop observing.\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.unobserve = function (target) {\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n // Do nothing if current environment doesn't have the Element interface.\r\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\r\n return;\r\n }\r\n if (!(target instanceof getWindowOf(target).Element)) {\r\n throw new TypeError('parameter 1 is not of type \"Element\".');\r\n }\r\n var observations = this.observations_;\r\n // Do nothing if element is not being observed.\r\n if (!observations.has(target)) {\r\n return;\r\n }\r\n observations.delete(target);\r\n if (!observations.size) {\r\n this.controller_.removeObserver(this);\r\n }\r\n };\r\n /**\r\n * Stops observing all elements.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.disconnect = function () {\r\n this.clearActive();\r\n this.observations_.clear();\r\n this.controller_.removeObserver(this);\r\n };\r\n /**\r\n * Collects observation instances the associated element of which has changed\r\n * it's content rectangle.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.gatherActive = function () {\r\n var _this = this;\r\n this.clearActive();\r\n this.observations_.forEach(function (observation) {\r\n if (observation.isActive()) {\r\n _this.activeObservations_.push(observation);\r\n }\r\n });\r\n };\r\n /**\r\n * Invokes initial callback function with a list of ResizeObserverEntry\r\n * instances collected from active resize observations.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.broadcastActive = function () {\r\n // Do nothing if observer doesn't have active observations.\r\n if (!this.hasActive()) {\r\n return;\r\n }\r\n var ctx = this.callbackCtx_;\r\n // Create ResizeObserverEntry instance for every active observation.\r\n var entries = this.activeObservations_.map(function (observation) {\r\n return new ResizeObserverEntry(observation.target, observation.broadcastRect());\r\n });\r\n this.callback_.call(ctx, entries, ctx);\r\n this.clearActive();\r\n };\r\n /**\r\n * Clears the collection of active observations.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.clearActive = function () {\r\n this.activeObservations_.splice(0);\r\n };\r\n /**\r\n * Tells whether observer has active observations.\r\n *\r\n * @returns {boolean}\r\n */\r\n ResizeObserverSPI.prototype.hasActive = function () {\r\n return this.activeObservations_.length > 0;\r\n };\r\n return ResizeObserverSPI;\r\n}());\n\n// Registry of internal observers. If WeakMap is not available use current shim\r\n// for the Map collection as it has all required methods and because WeakMap\r\n// can't be fully polyfilled anyway.\r\nvar observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();\r\n/**\r\n * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation\r\n * exposing only those methods and properties that are defined in the spec.\r\n */\r\nvar ResizeObserver = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserver.\r\n *\r\n * @param {ResizeObserverCallback} callback - Callback that is invoked when\r\n * dimensions of the observed elements change.\r\n */\r\n function ResizeObserver(callback) {\r\n if (!(this instanceof ResizeObserver)) {\r\n throw new TypeError('Cannot call a class as a function.');\r\n }\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n var controller = ResizeObserverController.getInstance();\r\n var observer = new ResizeObserverSPI(callback, controller, this);\r\n observers.set(this, observer);\r\n }\r\n return ResizeObserver;\r\n}());\r\n// Expose public methods of ResizeObserver.\r\n[\r\n 'observe',\r\n 'unobserve',\r\n 'disconnect'\r\n].forEach(function (method) {\r\n ResizeObserver.prototype[method] = function () {\r\n var _a;\r\n return (_a = observers.get(this))[method].apply(_a, arguments);\r\n };\r\n});\n\nvar index = (function () {\r\n // Export existing implementation if available.\r\n if (typeof global$1.ResizeObserver !== 'undefined') {\r\n return global$1.ResizeObserver;\r\n }\r\n return ResizeObserver;\r\n})();\n\nvar HeadingPopupBody = /** @class */ (function (_super) {\n __extends$1(HeadingPopupBody, _super);\n function HeadingPopupBody() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n HeadingPopupBody.prototype.execCommand = function (ev) {\n var el = closest(ev.target, 'li');\n this.props.execCommand('heading', {\n level: Number(el.getAttribute('data-level')),\n });\n };\n HeadingPopupBody.prototype.render = function () {\n var _this = this;\n return html(templateObject_2$8 || (templateObject_2$8 = __makeTemplateObject([\"\\n <ul\\n onClick=\", \"\\n aria-role=\\\"menu\\\"\\n aria-label=\\\"\", \"\\\"\\n >\\n \", \"\\n <li data-type=\\\"Paragraph\\\" aria-role=\\\"menuitem\\\">\\n <div>\", \"</div>\\n </li>\\n </ul>\\n \"], [\"\\n <ul\\n onClick=\", \"\\n aria-role=\\\"menu\\\"\\n aria-label=\\\"\", \"\\\"\\n >\\n \",\n \"\\n <li data-type=\\\"Paragraph\\\" aria-role=\\\"menuitem\\\">\\n <div>\", \"</div>\\n </li>\\n </ul>\\n \"])), function (ev) { return _this.execCommand(ev); }, i18n.get('Headings'), [1, 2, 3, 4, 5, 6].map(function (level) {\n return html(templateObject_1$g || (templateObject_1$g = __makeTemplateObject([\"\\n <li data-level=\\\"\", \"\\\" data-type=\\\"Heading\\\" aria-role=\\\"menuitem\\\">\\n <\", \">\", \" \", \"</$>\\n </li>\\n \"], [\"\\n <li data-level=\\\"\", \"\\\" data-type=\\\"Heading\\\" aria-role=\\\"menuitem\\\">\\n <\", \">\", \" \", \"</$>\\n </li>\\n \"])), level, \"h\" + level, i18n.get('Heading'), level);\n }), i18n.get('Paragraph'));\n };\n return HeadingPopupBody;\n}(Component));\nvar templateObject_1$g, templateObject_2$8;\n\nvar Tabs = /** @class */ (function (_super) {\n __extends$1(Tabs, _super);\n function Tabs() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Tabs.prototype.toggleTab = function (ev, activeTab) {\n this.props.onClick(ev, activeTab);\n };\n Tabs.prototype.render = function () {\n var _this = this;\n return html(templateObject_2$7 || (templateObject_2$7 = __makeTemplateObject([\"\\n <div class=\\\"\", \"\\\" aria-role=\\\"tabpanel\\\">\\n \", \"\\n </div>\\n \"], [\"\\n <div class=\\\"\", \"\\\" aria-role=\\\"tabpanel\\\">\\n \",\n \"\\n </div>\\n \"])), cls('tabs'), this.props.tabs.map(function (_a) {\n var name = _a.name, text = _a.text;\n var isActive = _this.props.activeTab === name;\n return html(templateObject_1$f || (templateObject_1$f = __makeTemplateObject([\"\\n <div\\n class=\\\"tab-item\", \"\\\"\\n onClick=\", \"\\n aria-role=\\\"tab\\\"\\n aria-label=\\\"\", \"\\\"\\n aria-selected=\\\"\", \"\\\"\\n tabindex=\\\"\", \"\\\"\\n >\\n \", \"\\n </div>\\n \"], [\"\\n <div\\n class=\\\"tab-item\", \"\\\"\\n onClick=\", \"\\n aria-role=\\\"tab\\\"\\n aria-label=\\\"\", \"\\\"\\n aria-selected=\\\"\", \"\\\"\\n tabindex=\\\"\", \"\\\"\\n >\\n \", \"\\n </div>\\n \"])), isActive ? ' active' : '', function (ev) { return _this.toggleTab(ev, name); }, i18n.get(text), isActive ? 'true' : 'false', isActive ? '0' : '-1', i18n.get(text));\n }));\n };\n return Tabs;\n}(Component));\nvar templateObject_1$f, templateObject_2$7;\n\nvar TYPE_UI = 'ui';\nvar ImagePopupBody = /** @class */ (function (_super) {\n __extends$1(ImagePopupBody, _super);\n function ImagePopupBody(props) {\n var _this = _super.call(this, props) || this;\n _this.initialize = function (activeTab) {\n if (activeTab === void 0) { activeTab = 'file'; }\n var urlEl = _this.refs.url;\n urlEl.value = '';\n _this.refs.altText.value = '';\n _this.refs.file.value = '';\n removeClass_1(urlEl, 'wrong');\n _this.setState({ activeTab: activeTab, file: null, fileNameElClassName: '' });\n };\n _this.execCommand = function () {\n if (_this.state.activeTab === 'file') {\n _this.emitAddImageBlob();\n }\n else {\n _this.emitAddImage();\n }\n };\n _this.toggleTab = function (_, activeTab) {\n if (activeTab !== _this.state.activeTab) {\n _this.initialize(activeTab);\n }\n };\n _this.showFileSelectBox = function () {\n _this.refs.file.click();\n };\n _this.changeFile = function (ev) {\n var files = ev.target.files;\n if (files === null || files === void 0 ? void 0 : files.length) {\n _this.setState({ file: files[0] });\n }\n };\n _this.state = { activeTab: 'file', file: null, fileNameElClassName: '' };\n _this.tabs = [\n { name: 'file', text: 'File' },\n { name: 'url', text: 'URL' },\n ];\n return _this;\n }\n ImagePopupBody.prototype.emitAddImageBlob = function () {\n var _this = this;\n var files = this.refs.file.files;\n var altTextEl = this.refs.altText;\n var fileNameElClassName = ' wrong';\n if (files === null || files === void 0 ? void 0 : files.length) {\n fileNameElClassName = '';\n var imageFile = files.item(0);\n var hookCallback = function (url, text) {\n return _this.props.execCommand('addImage', { imageUrl: url, altText: text || altTextEl.value });\n };\n this.props.eventEmitter.emit('addImageBlobHook', imageFile, hookCallback, TYPE_UI);\n }\n this.setState({ fileNameElClassName: fileNameElClassName });\n };\n ImagePopupBody.prototype.emitAddImage = function () {\n var imageUrlEl = this.refs.url;\n var altTextEl = this.refs.altText;\n var imageUrl = imageUrlEl.value;\n var altText = altTextEl.value || 'image';\n removeClass_1(imageUrlEl, 'wrong');\n if (!imageUrl.length) {\n addClass_1(imageUrlEl, 'wrong');\n return;\n }\n if (imageUrl) {\n this.props.execCommand('addImage', { imageUrl: imageUrl, altText: altText });\n }\n };\n ImagePopupBody.prototype.preventSelectStart = function (ev) {\n ev.preventDefault();\n };\n ImagePopupBody.prototype.updated = function () {\n if (!this.props.show) {\n this.initialize();\n }\n };\n ImagePopupBody.prototype.render = function () {\n var _this = this;\n var _a = this.state, activeTab = _a.activeTab, file = _a.file, fileNameElClassName = _a.fileNameElClassName;\n return html(templateObject_1$e || (templateObject_1$e = __makeTemplateObject([\"\\n <div aria-label=\\\"\", \"\\\">\\n <\", \" tabs=\", \" activeTab=\", \" onClick=\", \" />\\n <div style=\\\"display:\", \"\\\">\\n <label for=\\\"toastuiImageUrlInput\\\">\", \"</label>\\n <input\\n id=\\\"toastuiImageUrlInput\\\"\\n type=\\\"text\\\"\\n ref=\", \"\\n />\\n </div>\\n <div style=\\\"display:\", \";position: relative;\\\">\\n <label for=\\\"toastuiImageFileInput\\\">\", \"</label>\\n <span\\n class=\\\"\", \"\", \"\\\"\\n onClick=\", \"\\n onSelectstart=\", \"\\n >\\n \", \"\\n </span>\\n <button\\n type=\\\"button\\\"\\n class=\\\"\", \"\\\"\\n onClick=\", \"\\n >\\n \", \"\\n </button>\\n <input\\n id=\\\"toastuiImageFileInput\\\"\\n type=\\\"file\\\"\\n accept=\\\"image/*\\\"\\n onChange=\", \"\\n ref=\", \"\\n />\\n </div>\\n <label for=\\\"toastuiAltTextInput\\\">\", \"</label>\\n <input\\n id=\\\"toastuiAltTextInput\\\"\\n type=\\\"text\\\"\\n ref=\", \"\\n />\\n <div class=\\\"\", \"\\\">\\n <button type=\\\"button\\\" class=\\\"\", \"\\\" onClick=\", \">\\n \", \"\\n </button>\\n <button type=\\\"button\\\" class=\\\"\", \"\\\" onClick=\", \">\\n \", \"\\n </button>\\n </div>\\n </div>\\n \"], [\"\\n <div aria-label=\\\"\", \"\\\">\\n <\", \" tabs=\", \" activeTab=\", \" onClick=\", \" />\\n <div style=\\\"display:\", \"\\\">\\n <label for=\\\"toastuiImageUrlInput\\\">\", \"</label>\\n <input\\n id=\\\"toastuiImageUrlInput\\\"\\n type=\\\"text\\\"\\n ref=\", \"\\n />\\n </div>\\n <div style=\\\"display:\", \";position: relative;\\\">\\n <label for=\\\"toastuiImageFileInput\\\">\", \"</label>\\n <span\\n class=\\\"\", \"\", \"\\\"\\n onClick=\", \"\\n onSelectstart=\", \"\\n >\\n \", \"\\n </span>\\n <button\\n type=\\\"button\\\"\\n class=\\\"\", \"\\\"\\n onClick=\", \"\\n >\\n \", \"\\n </button>\\n <input\\n id=\\\"toastuiImageFileInput\\\"\\n type=\\\"file\\\"\\n accept=\\\"image/*\\\"\\n onChange=\", \"\\n ref=\", \"\\n />\\n </div>\\n <label for=\\\"toastuiAltTextInput\\\">\", \"</label>\\n <input\\n id=\\\"toastuiAltTextInput\\\"\\n type=\\\"text\\\"\\n ref=\", \"\\n />\\n <div class=\\\"\", \"\\\">\\n <button type=\\\"button\\\" class=\\\"\", \"\\\" onClick=\", \">\\n \", \"\\n </button>\\n <button type=\\\"button\\\" class=\\\"\", \"\\\" onClick=\", \">\\n \", \"\\n </button>\\n </div>\\n </div>\\n \"])), i18n.get('Insert image'), Tabs, this.tabs, activeTab, this.toggleTab, activeTab === 'url' ? 'block' : 'none', i18n.get('Image URL'), function (el) { return (_this.refs.url = el); }, activeTab === 'file' ? 'block' : 'none', i18n.get('Select image file'), cls('file-name'), file ? ' has-file' : fileNameElClassName, this.showFileSelectBox, this.preventSelectStart, file ? file.name : i18n.get('No file'), cls('file-select-button'), this.showFileSelectBox, i18n.get('Choose a file'), this.changeFile, function (el) { return (_this.refs.file = el); }, i18n.get('Description'), function (el) { return (_this.refs.altText = el); }, cls('button-container'), cls('close-button'), this.props.hidePopup, i18n.get('Cancel'), cls('ok-button'), this.execCommand, i18n.get('OK'));\n };\n return ImagePopupBody;\n}(Component));\nvar templateObject_1$e;\n\nvar LinkPopupBody = /** @class */ (function (_super) {\n __extends$1(LinkPopupBody, _super);\n function LinkPopupBody() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.execCommand = function () {\n var linkUrlEl = _this.refs.url;\n var linkTextEl = _this.refs.text;\n removeClass_1(linkUrlEl, 'wrong');\n removeClass_1(linkTextEl, 'wrong');\n if (linkUrlEl.value.length < 1) {\n addClass_1(linkUrlEl, 'wrong');\n return;\n }\n var checkLinkText = isUndefined_1(_this.props.initialValues.linkUrl);\n if (checkLinkText && linkTextEl.value.length < 1) {\n addClass_1(linkTextEl, 'wrong');\n return;\n }\n _this.props.execCommand('addLink', {\n linkUrl: linkUrlEl.value,\n linkText: linkTextEl.value,\n });\n };\n return _this;\n }\n LinkPopupBody.prototype.initialize = function () {\n var _a = this.props.initialValues, linkUrl = _a.linkUrl, linkText = _a.linkText;\n var linkUrlEl = this.refs.url;\n var linkTextEl = this.refs.text;\n removeClass_1(linkUrlEl, 'wrong');\n removeClass_1(linkTextEl, 'wrong', 'disabled');\n linkTextEl.removeAttribute('disabled');\n if (linkUrl) {\n addClass_1(linkTextEl, 'disabled');\n linkTextEl.setAttribute('disabled', 'disabled');\n }\n linkUrlEl.value = linkUrl || '';\n linkTextEl.value = linkText || '';\n };\n LinkPopupBody.prototype.mounted = function () {\n this.initialize();\n };\n LinkPopupBody.prototype.updated = function (prevProps) {\n if (!prevProps.show && this.props.show) {\n this.initialize();\n }\n };\n LinkPopupBody.prototype.render = function () {\n var _this = this;\n return html(templateObject_1$d || (templateObject_1$d = __makeTemplateObject([\"\\n <div aria-label=\\\"\", \"\\\">\\n <label for=\\\"toastuiLinkUrlInput\\\">\", \"</label>\\n <input\\n id=\\\"toastuiLinkUrlInput\\\"\\n type=\\\"text\\\"\\n ref=\", \"\\n />\\n <label for=\\\"toastuiLinkTextInput\\\">\", \"</label>\\n <input\\n id=\\\"toastuiLinkTextInput\\\"\\n type=\\\"text\\\"\\n ref=\", \"\\n />\\n <div class=\\\"\", \"\\\">\\n <button type=\\\"button\\\" class=\\\"\", \"\\\" onClick=\", \">\\n \", \"\\n </button>\\n <button type=\\\"button\\\" class=\\\"\", \"\\\" onClick=\", \">\\n \", \"\\n </button>\\n </div>\\n </div>\\n \"], [\"\\n <div aria-label=\\\"\", \"\\\">\\n <label for=\\\"toastuiLinkUrlInput\\\">\", \"</label>\\n <input\\n id=\\\"toastuiLinkUrlInput\\\"\\n type=\\\"text\\\"\\n ref=\", \"\\n />\\n <label for=\\\"toastuiLinkTextInput\\\">\", \"</label>\\n <input\\n id=\\\"toastuiLinkTextInput\\\"\\n type=\\\"text\\\"\\n ref=\", \"\\n />\\n <div class=\\\"\", \"\\\">\\n <button type=\\\"button\\\" class=\\\"\", \"\\\" onClick=\", \">\\n \", \"\\n </button>\\n <button type=\\\"button\\\" class=\\\"\", \"\\\" onClick=\", \">\\n \", \"\\n </button>\\n </div>\\n </div>\\n \"])), i18n.get('Insert link'), i18n.get('URL'), function (el) { return (_this.refs.url = el); }, i18n.get('Link text'), function (el) { return (_this.refs.text = el); }, cls('button-container'), cls('close-button'), this.props.hidePopup, i18n.get('Cancel'), cls('ok-button'), this.execCommand, i18n.get('OK'));\n };\n return LinkPopupBody;\n}(Component));\nvar templateObject_1$d;\n\nvar CELL_WIDTH = 20;\nvar CELL_HEIGHT = 20;\nvar MIN_ROW_INDEX = 5;\nvar MAX_ROW_INDEX = 14;\nvar MIN_COL_INDEX = 5;\nvar MAX_COL_INDEX = 9;\nvar MIN_ROW_SELECTION_INDEX = 1;\nvar MIN_COL_SELECTION_INDEX = 1;\nvar BORDER_WIDTH = 1;\nvar TablePopupBody = /** @class */ (function (_super) {\n __extends$1(TablePopupBody, _super);\n function TablePopupBody(props) {\n var _this = _super.call(this, props) || this;\n _this.extendSelectionRange = function (_a) {\n var pageX = _a.pageX, pageY = _a.pageY;\n var x = pageX - _this.offsetRect.left;\n var y = pageY - _this.offsetRect.top;\n var range = _this.getSelectionRangeByOffset(x, y);\n _this.setState(__assign$1({}, range));\n };\n _this.execCommand = function () {\n _this.props.execCommand('addTable', {\n rowCount: _this.state.rowIdx + 1,\n columnCount: _this.state.colIdx + 1,\n });\n };\n _this.state = {\n rowIdx: -1,\n colIdx: -1,\n };\n return _this;\n }\n TablePopupBody.prototype.getDescription = function () {\n return this.state.colIdx === -1 ? '' : this.state.colIdx + 1 + \" x \" + (this.state.rowIdx + 1);\n };\n TablePopupBody.prototype.getBoundByRange = function (colIdx, rowIdx) {\n return {\n width: (colIdx + 1) * CELL_WIDTH,\n height: (rowIdx + 1) * CELL_HEIGHT,\n };\n };\n TablePopupBody.prototype.getRangeByOffset = function (x, y) {\n return {\n colIdx: Math.floor(x / CELL_WIDTH),\n rowIdx: Math.floor(y / CELL_HEIGHT),\n };\n };\n TablePopupBody.prototype.getTableRange = function () {\n var _a = this.state, orgColIdx = _a.colIdx, orgRowIdx = _a.rowIdx;\n var colIdx = Math.max(orgColIdx, MIN_COL_INDEX);\n var rowIdx = Math.max(orgRowIdx, MIN_ROW_INDEX);\n if (orgColIdx >= MIN_COL_INDEX && colIdx < MAX_COL_INDEX) {\n colIdx += 1;\n }\n if (orgRowIdx >= MIN_ROW_INDEX && rowIdx < MAX_ROW_INDEX) {\n rowIdx += 1;\n }\n return { colIdx: colIdx + 1, rowIdx: rowIdx + 1 };\n };\n TablePopupBody.prototype.getSelectionAreaBound = function () {\n var _a = this.getBoundByRange(this.state.colIdx, this.state.rowIdx), width = _a.width, height = _a.height;\n if (!width && !height) {\n return { display: 'none' };\n }\n return { width: width - BORDER_WIDTH, height: height - BORDER_WIDTH, display: 'block' };\n };\n TablePopupBody.prototype.getSelectionRangeByOffset = function (x, y) {\n var range = this.getRangeByOffset(x, y);\n range.rowIdx = Math.min(Math.max(range.rowIdx, MIN_ROW_SELECTION_INDEX), MAX_ROW_INDEX);\n range.colIdx = Math.min(Math.max(range.colIdx, MIN_COL_SELECTION_INDEX), MAX_COL_INDEX);\n return range;\n };\n TablePopupBody.prototype.updated = function () {\n if (!this.props.show) {\n this.setState({ colIdx: -1, rowIdx: -1 });\n }\n else if (this.state.colIdx === -1 && this.state.rowIdx === -1) {\n var _a = this.refs.tableEl.getBoundingClientRect(), left = _a.left, top_1 = _a.top;\n this.offsetRect = {\n left: window.pageXOffset + left,\n top: window.pageYOffset + top_1,\n };\n }\n };\n TablePopupBody.prototype.createTableArea = function (tableRange) {\n var colIdx = tableRange.colIdx, rowIdx = tableRange.rowIdx;\n var rows = [];\n for (var i = 0; i < rowIdx; i += 1) {\n var cells = [];\n for (var j = 0; j < colIdx; j += 1) {\n var cellClassNames = \"\" + cls('table-cell') + (i > 0 ? '' : ' header');\n cells.push(html(templateObject_1$c || (templateObject_1$c = __makeTemplateObject([\"<div class=\\\"\", \"\\\"></div>\"], [\"<div class=\\\"\", \"\\\"></div>\"])), cellClassNames));\n }\n rows.push(html(templateObject_2$6 || (templateObject_2$6 = __makeTemplateObject([\"<div class=\\\"\", \"\\\">\", \"</div>\"], [\"<div class=\\\"\", \"\\\">\", \"</div>\"])), cls('table-row'), cells));\n }\n return html(templateObject_3$2 || (templateObject_3$2 = __makeTemplateObject([\"<div class=\\\"\", \"\\\">\", \"</div>\"], [\"<div class=\\\"\", \"\\\">\", \"</div>\"])), cls('table'), rows);\n };\n TablePopupBody.prototype.render = function () {\n var _this = this;\n var tableRange = this.getTableRange();\n var selectionAreaBound = this.getSelectionAreaBound();\n return html(templateObject_4$1 || (templateObject_4$1 = __makeTemplateObject([\"\\n <div aria-label=\\\"\", \"\\\">\\n <div\\n class=\\\"\", \"\\\"\\n ref=\", \"\\n onMousemove=\", \"\\n onClick=\", \"\\n >\\n \", \"\\n <div class=\\\"\", \"\\\" style=\", \"></div>\\n </div>\\n <p class=\\\"\", \"\\\">\", \"</p>\\n </div>\\n \"], [\"\\n <div aria-label=\\\"\", \"\\\">\\n <div\\n class=\\\"\", \"\\\"\\n ref=\", \"\\n onMousemove=\", \"\\n onClick=\", \"\\n >\\n \", \"\\n <div class=\\\"\", \"\\\" style=\", \"></div>\\n </div>\\n <p class=\\\"\", \"\\\">\", \"</p>\\n </div>\\n \"])), i18n.get('Insert table'), cls('table-selection'), function (el) { return (_this.refs.tableEl = el); }, this.extendSelectionRange, this.execCommand, this.createTableArea(tableRange), cls('table-selection-layer'), selectionAreaBound, cls('table-description'), this.getDescription());\n };\n return TablePopupBody;\n}(Component));\nvar templateObject_1$c, templateObject_2$6, templateObject_3$2, templateObject_4$1;\n\nvar CustomPopupBody = /** @class */ (function (_super) {\n __extends$1(CustomPopupBody, _super);\n function CustomPopupBody() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n CustomPopupBody.prototype.mounted = function () {\n // append the custom popup body element\n this.refs.el.appendChild(this.props.body);\n };\n CustomPopupBody.prototype.updated = function (prevProps) {\n // update custom popup element\n this.refs.el.replaceChild(this.props.body, prevProps.body);\n };\n CustomPopupBody.prototype.render = function () {\n var _this = this;\n return html(templateObject_1$b || (templateObject_1$b = __makeTemplateObject([\"<div ref=\", \"></div>\"], [\"<div ref=\", \"></div>\"])), function (el) { return (_this.refs.el = el); });\n };\n return CustomPopupBody;\n}(Component));\nvar templateObject_1$b;\n\nfunction createToolbarItemInfo(type) {\n return isString_1(type) ? createDefaultToolbarItemInfo(type) : type;\n}\nfunction createScrollSyncToolbarItem() {\n var label = document.createElement('label');\n var checkbox = document.createElement('input');\n var toggleSwitch = document.createElement('span');\n label.className = 'scroll-sync active';\n checkbox.type = 'checkbox';\n checkbox.checked = true;\n toggleSwitch.className = 'switch';\n var onMounted = function (execCommand) {\n return checkbox.addEventListener('change', function (ev) {\n var checked = ev.target.checked;\n if (checked) {\n addClass_1(label, 'active');\n }\n else {\n removeClass_1(label, 'active');\n }\n execCommand('toggleScrollSync', { active: checked });\n });\n };\n label.appendChild(checkbox);\n label.appendChild(toggleSwitch);\n return {\n name: 'scrollSync',\n el: label,\n onMounted: onMounted,\n };\n}\nfunction createDefaultToolbarItemInfo(type) {\n var info;\n switch (type) {\n case 'heading':\n info = {\n name: 'heading',\n className: 'heading',\n tooltip: i18n.get('Headings'),\n state: 'heading',\n };\n break;\n case 'bold':\n info = {\n name: 'bold',\n className: 'bold',\n command: 'bold',\n tooltip: i18n.get('Bold'),\n state: 'strong',\n };\n break;\n case 'italic':\n info = {\n name: 'italic',\n className: 'italic',\n command: 'italic',\n tooltip: i18n.get('Italic'),\n state: 'emph',\n };\n break;\n case 'strike':\n info = {\n name: 'strike',\n className: 'strike',\n command: 'strike',\n tooltip: i18n.get('Strike'),\n state: 'strike',\n };\n break;\n case 'hr':\n info = {\n name: 'hr',\n className: 'hrline',\n command: 'hr',\n tooltip: i18n.get('Line'),\n state: 'thematicBreak',\n };\n break;\n case 'quote':\n info = {\n name: 'quote',\n className: 'quote',\n command: 'blockQuote',\n tooltip: i18n.get('Blockquote'),\n state: 'blockQuote',\n };\n break;\n case 'ul':\n info = {\n name: 'ul',\n className: 'bullet-list',\n command: 'bulletList',\n tooltip: i18n.get('Unordered list'),\n state: 'bulletList',\n };\n break;\n case 'ol':\n info = {\n name: 'ol',\n className: 'ordered-list',\n command: 'orderedList',\n tooltip: i18n.get('Ordered list'),\n state: 'orderedList',\n };\n break;\n case 'task':\n info = {\n name: 'task',\n className: 'task-list',\n command: 'taskList',\n tooltip: i18n.get('Task'),\n state: 'taskList',\n };\n break;\n case 'table':\n info = {\n name: 'table',\n className: 'table',\n tooltip: i18n.get('Insert table'),\n state: 'table',\n };\n break;\n case 'image':\n info = {\n name: 'image',\n className: 'image',\n tooltip: i18n.get('Insert image'),\n };\n break;\n case 'link':\n info = {\n name: 'link',\n className: 'link',\n tooltip: i18n.get('Insert link'),\n };\n break;\n case 'code':\n info = {\n name: 'code',\n className: 'code',\n command: 'code',\n tooltip: i18n.get('Code'),\n state: 'code',\n };\n break;\n case 'codeblock':\n info = {\n name: 'codeblock',\n className: 'codeblock',\n command: 'codeBlock',\n tooltip: i18n.get('Insert CodeBlock'),\n state: 'codeBlock',\n };\n break;\n case 'indent':\n info = {\n name: 'indent',\n className: 'indent',\n command: 'indent',\n tooltip: i18n.get('Indent'),\n state: 'indent',\n };\n break;\n case 'outdent':\n info = {\n name: 'outdent',\n className: 'outdent',\n command: 'outdent',\n tooltip: i18n.get('Outdent'),\n state: 'outdent',\n };\n break;\n case 'scrollSync':\n info = createScrollSyncToolbarItem();\n break;\n case 'more':\n info = {\n name: 'more',\n className: 'more',\n tooltip: i18n.get('More'),\n };\n break;\n // do nothing\n }\n if (info.name !== 'scrollSync') {\n info.className += \" \" + cls('toolbar-icons');\n }\n return info;\n}\nfunction createPopupInfo(type, payload) {\n var el = payload.el, pos = payload.pos, popup = payload.popup, initialValues = payload.initialValues;\n switch (type) {\n case 'heading':\n return {\n render: function (props) { return html(templateObject_1$a || (templateObject_1$a = __makeTemplateObject([\"<\", \" ...\", \" />\"], [\"<\", \" ...\", \" />\"])), HeadingPopupBody, props); },\n className: cls('popup-add-heading'),\n fromEl: el,\n pos: pos,\n };\n case 'link':\n return {\n render: function (props) { return html(templateObject_2$5 || (templateObject_2$5 = __makeTemplateObject([\"<\", \" ...\", \" />\"], [\"<\", \" ...\", \" />\"])), LinkPopupBody, props); },\n className: cls('popup-add-link'),\n fromEl: el,\n pos: pos,\n initialValues: initialValues,\n };\n case 'image':\n return {\n render: function (props) { return html(templateObject_3$1 || (templateObject_3$1 = __makeTemplateObject([\"<\", \" ...\", \" />\"], [\"<\", \" ...\", \" />\"])), ImagePopupBody, props); },\n className: cls('popup-add-image'),\n fromEl: el,\n pos: pos,\n };\n case 'table':\n return {\n render: function (props) { return html(templateObject_4 || (templateObject_4 = __makeTemplateObject([\"<\", \" ...\", \" />\"], [\"<\", \" ...\", \" />\"])), TablePopupBody, props); },\n className: cls('popup-add-table'),\n fromEl: el,\n pos: pos,\n };\n case 'customPopupBody':\n if (!popup) {\n return null;\n }\n return __assign$1({ render: function (props) { return html(templateObject_5 || (templateObject_5 = __makeTemplateObject([\"<\", \" ...\", \" body=\", \" />\"], [\"<\", \" ...\", \" body=\", \" />\"])), CustomPopupBody, props, popup.body); }, fromEl: el, pos: pos }, popup);\n default:\n return null;\n }\n}\nfunction setGroupState(group) {\n group.hidden = group.length === group.filter(function (info) { return info.hidden; }).length;\n}\nfunction groupToolbarItems(toolbarItems, hiddenScrollSync) {\n var toggleScrollSyncState = function (item) {\n item.hidden = item.name === 'scrollSync' && hiddenScrollSync;\n return item;\n };\n return toolbarItems.reduce(function (acc, item) {\n acc.push(item.map(function (type) { return toggleScrollSyncState(createToolbarItemInfo(type)); }));\n var group = acc[(acc.length || 1) - 1];\n if (group) {\n setGroupState(group);\n }\n return acc;\n }, []);\n}\nfunction toggleScrollSync(toolbarItems, hiddenScrollSync) {\n toolbarItems.forEach(function (group) {\n group.forEach(function (item) { return (item.hidden = item.name === 'scrollSync' && hiddenScrollSync); });\n setGroupState(group);\n });\n}\nvar templateObject_1$a, templateObject_2$5, templateObject_3$1, templateObject_4, templateObject_5;\n\nvar MARGIN_FROM_RIGHT_SIDE = 20;\nvar Popup = /** @class */ (function (_super) {\n __extends$1(Popup, _super);\n function Popup() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.handleMousedown = function (ev) {\n if (!closest(ev.target, \".\" + cls('popup')) &&\n !closest(ev.target, _this.props.info.fromEl)) {\n _this.props.hidePopup();\n }\n };\n return _this;\n }\n Popup.prototype.mounted = function () {\n document.addEventListener('mousedown', this.handleMousedown);\n this.props.eventEmitter.listen('closePopup', this.props.hidePopup);\n };\n Popup.prototype.beforeDestroy = function () {\n document.removeEventListener('mousedown', this.handleMousedown);\n };\n Popup.prototype.updated = function (prevProps) {\n var _a = this.props, show = _a.show, info = _a.info;\n if (show && info.pos && prevProps.show !== show) {\n var popupPos = __assign$1({}, info.pos);\n var offsetWidth = this.refs.el.offsetWidth;\n var toolbarEl = closest(this.refs.el, \".\" + cls('toolbar'));\n var toolbarOffsetWidth = toolbarEl.offsetWidth;\n if (popupPos.left + offsetWidth >= toolbarOffsetWidth) {\n popupPos.left = toolbarOffsetWidth - offsetWidth - MARGIN_FROM_RIGHT_SIDE;\n }\n if (!shallowEqual(this.state.popupPos, popupPos)) {\n this.setState({ popupPos: popupPos });\n }\n }\n };\n Popup.prototype.render = function () {\n var _this = this;\n var _a = this.props, info = _a.info, show = _a.show, hidePopup = _a.hidePopup, eventEmitter = _a.eventEmitter, execCommand = _a.execCommand;\n var _b = info || {}, _c = _b.className, className = _c === void 0 ? '' : _c, style = _b.style, render = _b.render, _d = _b.initialValues, initialValues = _d === void 0 ? {} : _d;\n var popupStyle = __assign$1(__assign$1({ display: show ? 'block' : 'none' }, style), this.state.popupPos);\n return html(templateObject_1$9 || (templateObject_1$9 = __makeTemplateObject([\"\\n <div\\n class=\\\"\", \" \", \"\\\"\\n style=\", \"\\n ref=\", \"\\n aria-role=\\\"dialog\\\"\\n >\\n <div class=\\\"\", \"\\\">\\n \", \"\\n </div>\\n </div>\\n \"], [\"\\n <div\\n class=\\\"\", \" \", \"\\\"\\n style=\", \"\\n ref=\", \"\\n aria-role=\\\"dialog\\\"\\n >\\n <div class=\\\"\", \"\\\">\\n \", \"\\n </div>\\n </div>\\n \"])), cls('popup'), className, popupStyle, function (el) { return (_this.refs.el = el); }, cls('popup-body'), render && render({ eventEmitter: eventEmitter, show: show, hidePopup: hidePopup, execCommand: execCommand, initialValues: initialValues }));\n };\n return Popup;\n}(Component));\nvar templateObject_1$9;\n\nvar TOOLTIP_INDENT = 6;\nfunction connectHOC(WrappedComponent) {\n return /** @class */ (function (_super) {\n __extends$1(ButtonHOC, _super);\n function ButtonHOC(props) {\n var _this = _super.call(this, props) || this;\n _this.showTooltip = function (el) {\n var tooltip = _this.props.item.tooltip;\n if (!_this.props.disabled && tooltip) {\n var bound = _this.getBound(el);\n var left = bound.left + TOOLTIP_INDENT + \"px\";\n var top_1 = bound.top + TOOLTIP_INDENT + \"px\";\n css_1(_this.props.tooltipRef.current, { display: 'block', left: left, top: top_1 });\n _this.props.tooltipRef.current.querySelector('.text').textContent = tooltip;\n }\n };\n _this.hideTooltip = function () {\n css_1(_this.props.tooltipRef.current, 'display', 'none');\n };\n _this.state = { active: false, disabled: props.disabled };\n _this.addEvent();\n return _this;\n }\n ButtonHOC.prototype.addEvent = function () {\n var _this = this;\n var _a = this.props, item = _a.item, eventEmitter = _a.eventEmitter;\n if (item.state) {\n eventEmitter.listen('changeToolbarState', function (_a) {\n var _b;\n var toolbarState = _a.toolbarState;\n var _c = (_b = toolbarState[item.state]) !== null && _b !== void 0 ? _b : {}, active = _c.active, disabled = _c.disabled;\n _this.setState({ active: !!active, disabled: disabled !== null && disabled !== void 0 ? disabled : _this.props.disabled });\n });\n }\n };\n ButtonHOC.prototype.getBound = function (el) {\n var _a = getTotalOffset(el, closest(el, \".\" + cls('toolbar'))), offsetLeft = _a.offsetLeft, offsetTop = _a.offsetTop;\n return { left: offsetLeft, top: el.offsetHeight + offsetTop };\n };\n ButtonHOC.prototype.render = function () {\n return html(templateObject_1$8 || (templateObject_1$8 = __makeTemplateObject([\"\\n <\", \"\\n ...\", \"\\n active=\", \"\\n showTooltip=\", \"\\n hideTooltip=\", \"\\n getBound=\", \"\\n disabled=\", \"\\n />\\n \"], [\"\\n <\", \"\\n ...\", \"\\n active=\", \"\\n showTooltip=\", \"\\n hideTooltip=\", \"\\n getBound=\", \"\\n disabled=\", \"\\n />\\n \"])), WrappedComponent, this.props, this.state.active, this.showTooltip, this.hideTooltip, this.getBound, this.state.disabled || this.props.disabled);\n };\n return ButtonHOC;\n }(Component));\n}\nvar templateObject_1$8;\n\nvar DEFAULT_WIDTH = 80;\nvar ToolbarButtonComp = /** @class */ (function (_super) {\n __extends$1(ToolbarButtonComp, _super);\n function ToolbarButtonComp() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.showTooltip = function () {\n _this.props.showTooltip(_this.refs.el);\n };\n _this.execCommand = function () {\n var _a = _this.props, item = _a.item, execCommand = _a.execCommand, setPopupInfo = _a.setPopupInfo, getBound = _a.getBound, eventEmitter = _a.eventEmitter;\n var command = item.command, name = item.name, popup = item.popup;\n if (command) {\n execCommand(command);\n }\n else {\n var popupName = popup ? 'customPopupBody' : name;\n var initialValues = eventEmitter.emit('query', 'getPopupInitialValues', { popupName: popupName })[0];\n var info = createPopupInfo(popupName, {\n el: _this.refs.el,\n pos: getBound(_this.refs.el),\n popup: popup,\n initialValues: initialValues,\n });\n if (info) {\n setPopupInfo(info);\n }\n }\n };\n return _this;\n }\n ToolbarButtonComp.prototype.mounted = function () {\n this.setItemWidth();\n };\n ToolbarButtonComp.prototype.updated = function (prevProps) {\n if (prevProps.item.name !== this.props.item.name) {\n this.setItemWidth();\n }\n };\n ToolbarButtonComp.prototype.setItemWidth = function () {\n var _a = this.props, setItemWidth = _a.setItemWidth, item = _a.item;\n // set width only if it is not a dropdown toolbar\n if (setItemWidth) {\n setItemWidth(item.name, getOuterWidth(this.refs.el) + (item.hidden ? DEFAULT_WIDTH : 0));\n }\n };\n ToolbarButtonComp.prototype.render = function () {\n var _this = this;\n var _a = this.props, hideTooltip = _a.hideTooltip, disabled = _a.disabled, item = _a.item, active = _a.active;\n var style = __assign$1({ display: item.hidden ? 'none' : null }, item.style);\n var classNames = \"\" + (item.className || '') + (active ? ' active' : '');\n return html(templateObject_1$7 || (templateObject_1$7 = __makeTemplateObject([\"\\n <button\\n ref=\", \"\\n type=\\\"button\\\"\\n style=\", \"\\n class=\", \"\\n onClick=\", \"\\n onMouseover=\", \"\\n onMouseout=\", \"\\n disabled=\", \"\\n aria-label=\", \"\\n >\\n \", \"\\n </button>\\n \"], [\"\\n <button\\n ref=\", \"\\n type=\\\"button\\\"\\n style=\", \"\\n class=\", \"\\n onClick=\", \"\\n onMouseover=\", \"\\n onMouseout=\", \"\\n disabled=\", \"\\n aria-label=\", \"\\n >\\n \", \"\\n </button>\\n \"])), function (el) { return (_this.refs.el = el); }, style, classNames, this.execCommand, this.showTooltip, hideTooltip, !!disabled, item.text || item.tooltip || '', item.text || '');\n };\n return ToolbarButtonComp;\n}(Component));\nvar ToolbarButton = connectHOC(ToolbarButtonComp);\nvar templateObject_1$7;\n\nvar CustomToolbarItemComp = /** @class */ (function (_super) {\n __extends$1(CustomToolbarItemComp, _super);\n function CustomToolbarItemComp() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.showTooltip = function () {\n _this.props.showTooltip(_this.refs.el);\n };\n _this.showPopup = function () {\n var info = createPopupInfo('customPopupBody', {\n el: _this.refs.el,\n pos: _this.props.getBound(_this.refs.el),\n popup: _this.props.item.popup,\n });\n if (info) {\n _this.props.setPopupInfo(info);\n }\n };\n return _this;\n }\n CustomToolbarItemComp.prototype.mounted = function () {\n var _a = this.props, setItemWidth = _a.setItemWidth, item = _a.item;\n // append the custom html element\n this.refs.el.appendChild(item.el);\n // set width only if it is not a dropdown toolbar\n if (setItemWidth) {\n setItemWidth(item.name, getOuterWidth(this.refs.el));\n }\n if (item.onMounted) {\n item.onMounted(this.props.execCommand);\n }\n };\n CustomToolbarItemComp.prototype.updated = function (prevProps) {\n var _a;\n var _b = this.props, item = _b.item, active = _b.active, disabled = _b.disabled;\n if (prevProps.active !== active || prevProps.disabled !== disabled) {\n (_a = item.onUpdated) === null || _a === void 0 ? void 0 : _a.call(item, { active: active, disabled: disabled });\n }\n };\n CustomToolbarItemComp.prototype.render = function () {\n var _this = this;\n var _a = this.props, disabled = _a.disabled, item = _a.item;\n var style = { display: item.hidden ? 'none' : 'inline-block' };\n var getListener = function (listener) { return (disabled ? null : listener); };\n return html(templateObject_1$6 || (templateObject_1$6 = __makeTemplateObject([\"\\n <div\\n ref=\", \"\\n style=\", \"\\n class=\", \"\\n onClick=\", \"\\n onMouseover=\", \"\\n onMouseout=\", \"\\n ></div>\\n \"], [\"\\n <div\\n ref=\", \"\\n style=\", \"\\n class=\", \"\\n onClick=\", \"\\n onMouseover=\", \"\\n onMouseout=\", \"\\n ></div>\\n \"])), function (el) { return (_this.refs.el = el); }, style, cls('toolbar-item-wrapper'), getListener(this.showPopup), getListener(this.showTooltip), getListener(this.props.hideTooltip));\n };\n return CustomToolbarItemComp;\n}(Component));\nvar CustomToolbarItem = connectHOC(CustomToolbarItemComp);\nvar templateObject_1$6;\n\nvar ToolbarGroup = /** @class */ (function (_super) {\n __extends$1(ToolbarGroup, _super);\n function ToolbarGroup() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ToolbarGroup.prototype.render = function () {\n var _this = this;\n var _a = this.props, group = _a.group, hiddenDivider = _a.hiddenDivider;\n var groupStyle = group.hidden ? { display: 'none' } : null;\n var dividerStyle = hiddenDivider ? { display: 'none' } : null;\n return html(templateObject_2$4 || (templateObject_2$4 = __makeTemplateObject([\"\\n <div class=\\\"\", \"\\\" style=\", \">\\n \", \"\\n <div class=\\\"\", \"\\\" style=\", \"></div>\\n </div>\\n \"], [\"\\n <div class=\\\"\", \"\\\" style=\", \">\\n \",\n \"\\n <div class=\\\"\", \"\\\" style=\", \"></div>\\n </div>\\n \"])), cls('toolbar-group'), groupStyle, group.map(function (item) {\n var Comp = item.el ? CustomToolbarItem : ToolbarButton;\n return html(templateObject_1$5 || (templateObject_1$5 = __makeTemplateObject([\"<\", \" key=\", \" ...\", \" item=\", \" />\"], [\"<\", \" key=\", \" ...\", \" item=\", \" />\"])), Comp, item.name, _this.props, item);\n }), cls('toolbar-divider'), dividerStyle);\n };\n return ToolbarGroup;\n}(Component));\nvar templateObject_1$5, templateObject_2$4;\n\nvar POPUP_INDENT = 4;\nvar DropdownToolbarButtonComp = /** @class */ (function (_super) {\n __extends$1(DropdownToolbarButtonComp, _super);\n function DropdownToolbarButtonComp(props) {\n var _this = _super.call(this, props) || this;\n _this.handleClickDocument = function (_a) {\n var target = _a.target;\n if (!closest(target, \".\" + cls('dropdown-toolbar')) &&\n !closest(target, '.more')) {\n _this.setState({ showDropdown: false, dropdownPos: null });\n }\n };\n _this.showTooltip = function () {\n _this.props.showTooltip(_this.refs.el);\n };\n _this.state = { showDropdown: false, dropdownPos: null };\n return _this;\n }\n DropdownToolbarButtonComp.prototype.getBound = function () {\n var rect = this.props.getBound(this.refs.el);\n rect.top += POPUP_INDENT;\n return __assign$1(__assign$1({}, rect), { left: null, right: 10 });\n };\n DropdownToolbarButtonComp.prototype.mounted = function () {\n document.addEventListener('click', this.handleClickDocument);\n };\n DropdownToolbarButtonComp.prototype.updated = function () {\n if (this.state.showDropdown && !this.state.dropdownPos) {\n this.setState({ dropdownPos: this.getBound() });\n }\n };\n DropdownToolbarButtonComp.prototype.beforeDestroy = function () {\n document.removeEventListener('click', this.handleClickDocument);\n };\n DropdownToolbarButtonComp.prototype.render = function () {\n var _this = this;\n var _a = this.state, showDropdown = _a.showDropdown, dropdownPos = _a.dropdownPos;\n var _b = this.props, disabled = _b.disabled, item = _b.item, items = _b.items, hideTooltip = _b.hideTooltip;\n var visibleItems = items.filter(function (dropdownItem) { return !dropdownItem.hidden; });\n var groupStyle = visibleItems.length ? null : { display: 'none' };\n var dropdownStyle = showDropdown ? null : { display: 'none' };\n return html(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject([\"\\n <div class=\\\"\", \"\\\" style=\", \">\\n <button\\n ref=\", \"\\n type=\\\"button\\\"\\n class=\", \"\\n onClick=\", \"\\n onMouseover=\", \"\\n onMouseout=\", \"\\n disabled=\", \"\\n ></button>\\n <div\\n class=\\\"\", \"\\\"\\n style=\", \"\\n ref=\", \"\\n >\\n \", \"\\n </div>\\n </div>\\n \"], [\"\\n <div class=\\\"\", \"\\\" style=\", \">\\n <button\\n ref=\", \"\\n type=\\\"button\\\"\\n class=\", \"\\n onClick=\", \"\\n onMouseover=\", \"\\n onMouseout=\", \"\\n disabled=\", \"\\n ></button>\\n <div\\n class=\\\"\", \"\\\"\\n style=\", \"\\n ref=\", \"\\n >\\n \",\n \"\\n </div>\\n </div>\\n \"])), cls('toolbar-group'), groupStyle, function (el) { return (_this.refs.el = el); }, item.className, function () { return _this.setState({ showDropdown: true }); }, this.showTooltip, hideTooltip, disabled, cls('dropdown-toolbar'), __assign$1(__assign$1({}, dropdownStyle), dropdownPos), function (el) { return (_this.refs.dropdownEl = el); }, visibleItems.length\n ? visibleItems.map(function (group, index) {\n var _a;\n return html(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject([\"\\n <\", \"\\n group=\", \"\\n hiddenDivider=\", \"\\n ...\", \"\\n />\\n \"], [\"\\n <\", \"\\n group=\", \"\\n hiddenDivider=\",\n \"\\n ...\", \"\\n />\\n \"])), ToolbarGroup, group, index === visibleItems.length - 1 ||\n ((_a = visibleItems[index + 1]) === null || _a === void 0 ? void 0 : _a.hidden), _this.props);\n })\n : null);\n };\n return DropdownToolbarButtonComp;\n}(Component));\nvar DropdownToolbarButton = connectHOC(DropdownToolbarButtonComp);\nvar templateObject_1$4, templateObject_2$3;\n\nvar INLINE_PADDING = 50;\nvar Toolbar = /** @class */ (function (_super) {\n __extends$1(Toolbar, _super);\n function Toolbar(props) {\n var _this = _super.call(this, props) || this;\n _this.toggleTab = function (_, activeTab) {\n var eventEmitter = _this.props.eventEmitter;\n if (_this.state.activeTab !== activeTab) {\n var event_1 = activeTab === 'write' ? 'changePreviewTabWrite' : 'changePreviewTabPreview';\n eventEmitter.emit(event_1);\n _this.setState({ activeTab: activeTab });\n }\n };\n _this.setItemWidth = function (name, width) {\n _this.itemWidthMap[name] = width;\n };\n _this.setPopupInfo = function (popupInfo) {\n _this.setState({ showPopup: true, popupInfo: popupInfo });\n };\n _this.openPopup = function (popupName, initialValues) {\n if (initialValues === void 0) { initialValues = {}; }\n var el = _this.refs.el.querySelector(\".\" + cls('toolbar-group') + \" .\" + popupName);\n if (el) {\n var _a = getTotalOffset(el, closest(el, \".\" + cls('toolbar'))), offsetLeft = _a.offsetLeft, offsetTop = _a.offsetTop;\n var info = createPopupInfo(popupName, {\n el: el,\n pos: { left: offsetLeft, top: el.offsetHeight + offsetTop },\n initialValues: initialValues,\n });\n if (info) {\n _this.setPopupInfo(info);\n }\n }\n };\n _this.hidePopup = function () {\n if (_this.state.showPopup) {\n _this.setState({ showPopup: false });\n }\n };\n _this.execCommand = function (command, payload) {\n var eventEmitter = _this.props.eventEmitter;\n eventEmitter.emit('command', command, payload);\n _this.hidePopup();\n };\n _this.tabs = [\n { name: 'write', text: 'Write' },\n { name: 'preview', text: 'Preview' },\n ];\n _this.itemWidthMap = {};\n _this.initialItems = groupToolbarItems(props.toolbarItems || [], _this.hiddenScrollSync());\n _this.state = {\n items: _this.initialItems,\n dropdownItems: [],\n showPopup: false,\n popupInfo: {},\n activeTab: 'write',\n };\n _this.tooltipRef = { current: null };\n _this.resizeObserver = new index(function () { return _this.handleResize(); });\n _this.addEvent();\n return _this;\n }\n Toolbar.prototype.insertToolbarItem = function (indexList, item) {\n var groupIndex = indexList.groupIndex, itemIndex = indexList.itemIndex;\n var group = this.initialItems[groupIndex];\n item = createToolbarItemInfo(item);\n if (group) {\n group.splice(itemIndex, 0, item);\n }\n else {\n this.initialItems.push([item]);\n }\n this.setState(this.classifyToolbarItems());\n };\n Toolbar.prototype.removeToolbarItem = function (name) {\n var _this = this;\n forEachArray_1(this.initialItems, function (group) {\n var found = false;\n forEachArray_1(group, function (item, index) {\n if (item.name === name) {\n found = true;\n group.splice(index, 1);\n _this.setState(_this.classifyToolbarItems());\n return false;\n }\n return true;\n });\n return !found;\n });\n };\n Toolbar.prototype.addEvent = function () {\n var _this = this;\n var eventEmitter = this.props.eventEmitter;\n this.handleResize = throttle_1(function () {\n // reset toolbar items to re-layout toolbar items with each clientWidth\n _this.setState({ items: _this.initialItems, dropdownItems: [] });\n _this.setState(_this.classifyToolbarItems());\n }, 200);\n eventEmitter.listen('openPopup', this.openPopup);\n };\n Toolbar.prototype.appendTooltipToRoot = function () {\n var tooltip = \"<div class=\\\"\" + cls('tooltip') + \"\\\" style=\\\"display:none\\\">\\n <div class=\\\"arrow\\\"></div>\\n <span class=\\\"text\\\"></span>\\n </div>\";\n this.tooltipRef.current = createElementWith(tooltip, this.refs.el);\n };\n Toolbar.prototype.hiddenScrollSync = function () {\n return this.props.editorType === 'wysiwyg' || this.props.previewStyle === 'tab';\n };\n Toolbar.prototype.movePrevItemToDropdownToolbar = function (itemIndex, items, group, dropdownGroup) {\n var moveItem = function (targetGroup) {\n var item = targetGroup.pop();\n if (item) {\n dropdownGroup.push(item);\n }\n };\n if (itemIndex > 1) {\n moveItem(group);\n }\n else {\n var prevGroup = last$1(items);\n if (prevGroup) {\n moveItem(prevGroup);\n }\n }\n };\n Toolbar.prototype.classifyToolbarItems = function () {\n var _this = this;\n var totalWidth = 0;\n var clientWidth = this.refs.el.clientWidth;\n var divider = this.refs.el.querySelector(\".\" + cls('toolbar-divider'));\n var dividerWidth = divider ? getOuterWidth(divider) : 0;\n var items = [];\n var dropdownItems = [];\n var moved = false;\n this.initialItems.forEach(function (initialGroup, groupIndex) {\n var group = [];\n var dropdownGroup = [];\n initialGroup.forEach(function (item, itemIndex) {\n if (!item.hidden) {\n totalWidth += _this.itemWidthMap[item.name];\n if (totalWidth > clientWidth - INLINE_PADDING) {\n // should move the prev item to dropdown toolbar for placing the more button\n if (!moved) {\n _this.movePrevItemToDropdownToolbar(itemIndex, items, group, dropdownGroup);\n moved = true;\n }\n dropdownGroup.push(item);\n }\n else {\n group.push(item);\n }\n }\n });\n if (group.length) {\n setGroupState(group);\n items.push(group);\n }\n if (dropdownGroup.length) {\n setGroupState(dropdownGroup);\n dropdownItems.push(dropdownGroup);\n }\n // add divider width\n if (groupIndex < _this.state.items.length - 1) {\n totalWidth += dividerWidth;\n }\n });\n return { items: items, dropdownItems: dropdownItems };\n };\n Toolbar.prototype.mounted = function () {\n if (this.props.previewStyle === 'tab') {\n this.props.eventEmitter.emit('changePreviewTabWrite', true);\n }\n // classify toolbar and dropdown toolbar after DOM has been rendered\n this.setState(this.classifyToolbarItems());\n this.appendTooltipToRoot();\n this.resizeObserver.observe(this.refs.el);\n };\n Toolbar.prototype.updated = function (prevProps) {\n var _a = this.props, editorType = _a.editorType, previewStyle = _a.previewStyle, eventEmitter = _a.eventEmitter;\n var changedStyle = previewStyle !== prevProps.previewStyle;\n var changedType = editorType !== prevProps.editorType;\n if (changedStyle || changedType) {\n // show or hide scrollSync button\n toggleScrollSync(this.initialItems, this.hiddenScrollSync());\n var newState = this.classifyToolbarItems();\n if (changedStyle || (previewStyle === 'tab' && editorType === 'markdown')) {\n eventEmitter.emit('changePreviewTabWrite');\n newState.activeTab = 'write';\n }\n this.setState(newState);\n }\n };\n Toolbar.prototype.beforeDestroy = function () {\n window.removeEventListener('resize', this.handleResize);\n this.resizeObserver.disconnect();\n removeNode$1(this.tooltipRef.current);\n };\n Toolbar.prototype.render = function () {\n var _this = this;\n var _a = this.props, previewStyle = _a.previewStyle, eventEmitter = _a.eventEmitter, editorType = _a.editorType;\n var _b = this.state, popupInfo = _b.popupInfo, showPopup = _b.showPopup, activeTab = _b.activeTab, items = _b.items, dropdownItems = _b.dropdownItems;\n var props = {\n eventEmitter: eventEmitter,\n tooltipRef: this.tooltipRef,\n disabled: editorType === 'markdown' && previewStyle === 'tab' && activeTab === 'preview',\n execCommand: this.execCommand,\n setPopupInfo: this.setPopupInfo,\n };\n var toolbarStyle = previewStyle === 'tab' ? { borderTopLeftRadius: 0 } : null;\n return html(templateObject_2$2 || (templateObject_2$2 = __makeTemplateObject([\"\\n <div class=\\\"\", \"\\\">\\n <div\\n class=\\\"\", \"\\\"\\n style=\\\"display: \", \"\\\"\\n >\\n <\", \" tabs=\", \" activeTab=\", \" onClick=\", \" />\\n </div>\\n <div\\n class=\\\"\", \"\\\"\\n ref=\", \"\\n style=\", \"\\n >\\n \", \"\\n <\", \"\\n item=\", \"\\n items=\", \"\\n ...\", \"\\n />\\n </div>\\n <\", \"\\n info=\", \"\\n show=\", \"\\n eventEmitter=\", \"\\n hidePopup=\", \"\\n execCommand=\", \"\\n />\\n </div>\\n \"], [\"\\n <div class=\\\"\", \"\\\">\\n <div\\n class=\\\"\", \"\\\"\\n style=\\\"display: \",\n \"\\\"\\n >\\n <\", \" tabs=\", \" activeTab=\", \" onClick=\", \" />\\n </div>\\n <div\\n class=\\\"\", \"\\\"\\n ref=\", \"\\n style=\", \"\\n >\\n \",\n \"\\n <\", \"\\n item=\", \"\\n items=\", \"\\n ...\", \"\\n />\\n </div>\\n <\", \"\\n info=\", \"\\n show=\", \"\\n eventEmitter=\", \"\\n hidePopup=\", \"\\n execCommand=\", \"\\n />\\n </div>\\n \"])), cls('toolbar'), cls('md-tab-container'), editorType === 'wysiwyg' || previewStyle === 'vertical'\n ? 'none'\n : 'block', Tabs, this.tabs, activeTab, this.toggleTab, cls('defaultUI-toolbar'), function (el) { return (_this.refs.el = el); }, toolbarStyle, items.map(function (group, index) {\n var _a;\n return html(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject([\"\\n <\", \"\\n group=\", \"\\n hiddenDivider=\", \"\\n setItemWidth=\", \"\\n ...\", \"\\n />\\n \"], [\"\\n <\", \"\\n group=\", \"\\n hiddenDivider=\", \"\\n setItemWidth=\", \"\\n ...\", \"\\n />\\n \"])), ToolbarGroup, group, index === items.length - 1 || ((_a = items[index + 1]) === null || _a === void 0 ? void 0 : _a.hidden), _this.setItemWidth, props);\n }), DropdownToolbarButton, createToolbarItemInfo('more'), dropdownItems, props, Popup, popupInfo, showPopup, eventEmitter, this.hidePopup, this.execCommand);\n };\n return Toolbar;\n}(Component));\nvar templateObject_1$3, templateObject_2$2;\n\nvar ContextMenu = /** @class */ (function (_super) {\n __extends$1(ContextMenu, _super);\n function ContextMenu(props) {\n var _this = _super.call(this, props) || this;\n _this.handleClickDocument = function (ev) {\n if (!closest(ev.target, \".\" + cls('context-menu'))) {\n _this.setState({ pos: null });\n }\n };\n _this.state = {\n pos: null,\n menuGroups: [],\n };\n _this.addEvent();\n return _this;\n }\n ContextMenu.prototype.addEvent = function () {\n var _this = this;\n this.props.eventEmitter.listen('contextmenu', function (_a) {\n var pos = _a.pos, menuGroups = _a.menuGroups;\n _this.setState({ pos: pos, menuGroups: menuGroups });\n });\n };\n ContextMenu.prototype.mounted = function () {\n document.addEventListener('click', this.handleClickDocument);\n };\n ContextMenu.prototype.beforeDestroy = function () {\n document.removeEventListener('click', this.handleClickDocument);\n };\n ContextMenu.prototype.getMenuGroupElements = function () {\n var _this = this;\n var _a = this.state, pos = _a.pos, menuGroups = _a.menuGroups;\n return pos\n ? menuGroups.reduce(function (acc, group) {\n var menuItem = [];\n group.forEach(function (_a) {\n var label = _a.label, _b = _a.className, className = _b === void 0 ? false : _b, disabled = _a.disabled, onClick = _a.onClick;\n var handleClick = function () {\n if (!disabled) {\n onClick();\n _this.setState({ pos: null });\n }\n };\n menuItem.push(html(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject([\"\\n <li\\n onClick=\", \"\\n class=\\\"menu-item\", \"\\\"\\n aria-role=\\\"menuitem\\\"\\n >\\n <span class=\\\"\", \"\\\">\", \"</span>\\n </li>\\n \"], [\"\\n <li\\n onClick=\", \"\\n class=\\\"menu-item\", \"\\\"\\n aria-role=\\\"menuitem\\\"\\n >\\n <span class=\\\"\", \"\\\">\", \"</span>\\n </li>\\n \"])), handleClick, disabled ? ' disabled' : '', className, label));\n });\n acc.push(html(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject([\"<ul class=\\\"menu-group\\\">\\n \", \"\\n </ul>\"], [\"<ul class=\\\"menu-group\\\">\\n \", \"\\n </ul>\"])), menuItem));\n return acc;\n }, [])\n : [];\n };\n ContextMenu.prototype.render = function () {\n var style = __assign$1({ display: this.state.pos ? 'block' : 'none' }, this.state.pos);\n return html(templateObject_3 || (templateObject_3 = __makeTemplateObject([\"<div class=\\\"\", \"\\\" style=\", \" aria-role=\\\"menu\\\">\\n \", \"\\n </div>\"], [\"<div class=\\\"\", \"\\\" style=\", \" aria-role=\\\"menu\\\">\\n \", \"\\n </div>\"])), cls('context-menu'), style, this.getMenuGroupElements());\n };\n return ContextMenu;\n}(Component));\nvar templateObject_1$2, templateObject_2$1, templateObject_3;\n\nvar Layout = /** @class */ (function (_super) {\n __extends$1(Layout, _super);\n function Layout(props) {\n var _this = _super.call(this, props) || this;\n _this.changeMode = function (editorType) {\n if (editorType !== _this.state.editorType) {\n _this.setState({ editorType: editorType });\n }\n };\n _this.changePreviewStyle = function (previewStyle) {\n if (previewStyle !== _this.state.previewStyle) {\n _this.setState({ previewStyle: previewStyle });\n }\n };\n _this.hide = function () {\n _this.setState({ hide: true });\n };\n _this.show = function () {\n _this.setState({ hide: false });\n };\n var editorType = props.editorType, previewStyle = props.previewStyle;\n _this.state = {\n editorType: editorType,\n previewStyle: previewStyle,\n hide: false,\n };\n _this.addEvent();\n return _this;\n }\n Layout.prototype.mounted = function () {\n var _a = this.props.slots, wwEditor = _a.wwEditor, mdEditor = _a.mdEditor, mdPreview = _a.mdPreview;\n this.refs.wwContainer.appendChild(wwEditor);\n this.refs.mdContainer.insertAdjacentElement('afterbegin', mdEditor);\n this.refs.mdContainer.appendChild(mdPreview);\n };\n Layout.prototype.insertToolbarItem = function (indexList, item) {\n this.toolbar.insertToolbarItem(indexList, item);\n };\n Layout.prototype.removeToolbarItem = function (name) {\n this.toolbar.removeToolbarItem(name);\n };\n Layout.prototype.render = function () {\n var _this = this;\n var _a = this.props, eventEmitter = _a.eventEmitter, hideModeSwitch = _a.hideModeSwitch, toolbarItems = _a.toolbarItems, theme = _a.theme;\n var _b = this.state, hide = _b.hide, previewStyle = _b.previewStyle, editorType = _b.editorType;\n var displayClassName = hide ? ' hidden' : '';\n var editorTypeClassName = cls(editorType === 'markdown' ? 'md-mode' : 'ww-mode');\n var previewClassName = cls('md') + \"-\" + previewStyle + \"-style\";\n var themeClassName = cls([theme !== 'light', theme + \" \"]);\n return html(templateObject_2 || (templateObject_2 = __makeTemplateObject([\"\\n <div\\n class=\\\"\", \"\", \"\", \"\\\"\\n ref=\", \"\\n >\\n <\", \"\\n ref=\", \"\\n eventEmitter=\", \"\\n previewStyle=\", \"\\n toolbarItems=\", \"\\n editorType=\", \"\\n />\\n <div\\n class=\\\"\", \" \", \"\\\"\\n ref=\", \"\\n >\\n <div class=\\\"\", \"\\\">\\n <div\\n class=\\\"\", \" \", \"\\\"\\n ref=\", \"\\n >\\n <div class=\\\"\", \"\\\"></div>\\n </div>\\n <div\\n class=\\\"\", \"\\\"\\n ref=\", \"\\n />\\n </div>\\n </div>\\n \", \"\\n <\", \" eventEmitter=\", \" />\\n </div>\\n \"], [\"\\n <div\\n class=\\\"\", \"\", \"\", \"\\\"\\n ref=\", \"\\n >\\n <\", \"\\n ref=\", \"\\n eventEmitter=\", \"\\n previewStyle=\", \"\\n toolbarItems=\", \"\\n editorType=\", \"\\n />\\n <div\\n class=\\\"\", \" \", \"\\\"\\n ref=\", \"\\n >\\n <div class=\\\"\", \"\\\">\\n <div\\n class=\\\"\", \" \", \"\\\"\\n ref=\", \"\\n >\\n <div class=\\\"\", \"\\\"></div>\\n </div>\\n <div\\n class=\\\"\", \"\\\"\\n ref=\", \"\\n />\\n </div>\\n </div>\\n \",\n \"\\n <\", \" eventEmitter=\", \" />\\n </div>\\n \"])), themeClassName, cls('defaultUI'), displayClassName, function (el) { return (_this.refs.el = el); }, Toolbar, function (toolbar) { return (_this.toolbar = toolbar); }, eventEmitter, previewStyle, toolbarItems, editorType, cls('main'), editorTypeClassName, function (el) { return (_this.refs.editorSection = el); }, cls('main-container'), cls('md-container'), previewClassName, function (el) { return (_this.refs.mdContainer = el); }, cls('md-splitter'), cls('ww-container'), function (el) { return (_this.refs.wwContainer = el); }, !hideModeSwitch && html(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject([\"<\", \" eventEmitter=\", \" editorType=\", \" />\"], [\"<\", \" eventEmitter=\", \" editorType=\", \" />\"])), Switch, eventEmitter, editorType), ContextMenu, eventEmitter);\n };\n Layout.prototype.addEvent = function () {\n var eventEmitter = this.props.eventEmitter;\n eventEmitter.listen('hide', this.hide);\n eventEmitter.listen('show', this.show);\n eventEmitter.listen('changeMode', this.changeMode);\n eventEmitter.listen('changePreviewStyle', this.changePreviewStyle);\n };\n return Layout;\n}(Component));\nvar templateObject_1$1, templateObject_2;\n\n/**\n * ToastUI Editor\n * @extends ToastUIEditorCore\n */\nvar ToastUIEditor = /** @class */ (function (_super) {\n __extends$1(ToastUIEditor, _super);\n function ToastUIEditor(options) {\n var _a;\n var _this = _super.call(this, options) || this;\n var layoutComp;\n var destroy = render(_this.options.el, html(templateObject_1 || (templateObject_1 = __makeTemplateObject([\"\\n <\", \"\\n ref=\", \"\\n eventEmitter=\", \"\\n slots=\", \"\\n hideModeSwitch=\", \"\\n toolbarItems=\", \"\\n previewStyle=\", \"\\n editorType=\", \"\\n theme=\", \"\\n />\\n \"], [\"\\n <\", \"\\n ref=\", \"\\n eventEmitter=\", \"\\n slots=\", \"\\n hideModeSwitch=\", \"\\n toolbarItems=\", \"\\n previewStyle=\", \"\\n editorType=\", \"\\n theme=\", \"\\n />\\n \"])), Layout, function (layout) { return (layoutComp = layout); }, _this.eventEmitter, _this.getEditorElements(), _this.options.hideModeSwitch, _this.options.toolbarItems, _this.options.previewStyle, _this.options.initialEditType, _this.options.theme));\n _this.setMinHeight(_this.options.minHeight);\n _this.setHeight(_this.options.height);\n _this.defaultUI = {\n insertToolbarItem: layoutComp.insertToolbarItem.bind(layoutComp),\n removeToolbarItem: layoutComp.removeToolbarItem.bind(layoutComp),\n destroy: destroy,\n };\n (_a = _this.pluginInfo.toolbarItems) === null || _a === void 0 ? void 0 : _a.forEach(function (toolbarItem) {\n var groupIndex = toolbarItem.groupIndex, itemIndex = toolbarItem.itemIndex, item = toolbarItem.item;\n _this.defaultUI.insertToolbarItem({ groupIndex: groupIndex, itemIndex: itemIndex }, item);\n });\n _this.eventEmitter.emit('loadUI', _this);\n return _this;\n }\n /**\n * Factory method for Editor\n * @param {object} options Option for initialize TUIEditor\n * @returns {object} ToastUIEditor or ToastUIEditorViewer\n */\n ToastUIEditor.factory = function (options) {\n return options.viewer ? new ToastUIEditorViewer(options) : new ToastUIEditor(options);\n };\n /**\n * add toolbar item\n * @param {Object} indexInfo group index and item index of the toolbar item\n * @param {string|Object} item toolbar item\n */\n ToastUIEditor.prototype.insertToolbarItem = function (indexInfo, item) {\n this.defaultUI.insertToolbarItem(indexInfo, item);\n };\n /**\n * Remove toolbar item\n * @param {string} itemName toolbar item name\n */\n ToastUIEditor.prototype.removeToolbarItem = function (itemName) {\n this.defaultUI.removeToolbarItem(itemName);\n };\n /**\n * Destroy TUIEditor from document\n */\n ToastUIEditor.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n this.defaultUI.destroy();\n };\n return ToastUIEditor;\n}(ToastUIEditorCore));\nvar templateObject_1;\n\n/**\n * @fileoverview I18N for English\n * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>\n */\nToastUIEditorCore.setLanguage(['en', 'en-US'], {\n Markdown: 'Markdown',\n WYSIWYG: 'WYSIWYG',\n Write: 'Write',\n Preview: 'Preview',\n Headings: 'Headings',\n Paragraph: 'Paragraph',\n Bold: 'Bold',\n Italic: 'Italic',\n Strike: 'Strike',\n Code: 'Inline code',\n Line: 'Line',\n Blockquote: 'Blockquote',\n 'Unordered list': 'Unordered list',\n 'Ordered list': 'Ordered list',\n Task: 'Task',\n Indent: 'Indent',\n Outdent: 'Outdent',\n 'Insert link': 'Insert link',\n 'Insert CodeBlock': 'Insert codeBlock',\n 'Insert table': 'Insert table',\n 'Insert image': 'Insert image',\n Heading: 'Heading',\n 'Image URL': 'Image URL',\n 'Select image file': 'Select image file',\n 'Choose a file': 'Choose a file',\n 'No file': 'No file',\n Description: 'Description',\n OK: 'OK',\n More: 'More',\n Cancel: 'Cancel',\n File: 'File',\n URL: 'URL',\n 'Link text': 'Link text',\n 'Add row to up': 'Add row to up',\n 'Add row to down': 'Add row to down',\n 'Add column to left': 'Add column to left',\n 'Add column to right': 'Add column to right',\n 'Remove row': 'Remove row',\n 'Remove column': 'Remove column',\n 'Align column to left': 'Align column to left',\n 'Align column to center': 'Align column to center',\n 'Align column to right': 'Align column to right',\n 'Remove table': 'Remove table',\n 'Would you like to paste as table?': 'Would you like to paste as table?',\n 'Text color': 'Text color',\n 'Auto scroll enabled': 'Auto scroll enabled',\n 'Auto scroll disabled': 'Auto scroll disabled',\n 'Choose language': 'Choose language',\n});\n\nexport { ToastUIEditor as Editor, ToastUIEditorCore as EditorCore, ToastUIEditor as default };\n"],"names":["extendStatics$1","d","b","Object","setPrototypeOf","__proto__","Array","p","prototype","hasOwnProperty","call","__extends$1","TypeError","String","__","this","constructor","create","__assign$1","assign","t","s","i","n","arguments","length","apply","__spreadArray$1","to","from","pack","ar","l","slice","concat","__makeTemplateObject","cooked","raw","defineProperty","value","forEachOwnProperties_1","obj","iteratee","context","key","extend_1","target","objects","source","prop","len","hasOwnProp","isString_1","isArray_1","forEachArray_1","arr","index","isArray$2","forEachArray$2","forEachOwnProperties$1","forEach_1","isString$2","forEach$3","css_1","element","style","v","k","isArray$1","inArray_1","searchElement","array","startIndex","indexOf","isUndefined_1","undefined","isUndefined$3","getClass_1","className","baseVal","isArray","isUndefined$2","_setClassName","cssClass","join","replace","forEach$2","inArray$3","getClass$2","setClassName$1","addClass_1","origin","classList","newClass","name","add","split","cls","push","forEachArray$1","inArray$2","getClass$1","setClassName","removeClass_1","remove","isNumber_1","Number","isNull_1","forEachOwnProperties","isUndefined$1","imagePing","url","trackingInfo","trackingElement","document","createElement","queryString","substring","src","display","body","appendChild","removeChild","ms7days","sendHostname_1","appName","trackingId","hostname","location","applicationKeyForStorage","date","window","localStorage","getItem","tui","usageStatistics","Date","getTime","isExpired","setItem","setTimeout","readyState","tid","cid","dp","dh","el","ec","reSpaceMoreThanOne","reEscapeChars$1","reEscapeHTML","reEscapeBackSlash","reEscapePairedChars","reMdImageSyntax","reEscapedCharInLinkSyntax","reEscapeBackSlashInSentence","reXmlSpecial$1","RegExp","replaceUnsafeChar$1","char","escapeXml$1","text","test","includes","targetItem","availableLinkAttributes","reMarkdownTextToEscapeMap","codeblock","thematicBreak","atxHeading","seTextheading","blockquote","list","def","link","reflink","verticalBar","fencedCodeblock","sanitizeLinkAttribute","attribute","linkAttributes","forEach","repeat$1","count","result","escapeTextForLink","imageSyntaxRanges","exec","matched","offset","isDelimiter","some","range","escape$1","aheadReplacer","escapedText","needEscape","reMarkdownTextToEscape","isNeedEscapeText","quote","isNil","shallowEqual","o1","o2","last$1","isObject$1","deepMergedCopy","targetObj","resultObj","keys","deepCopyArray","deepCopy","items","map","item","reduce","acc","getSortedNumPair","valueA","valueB","forEachArray","toArray_1","arrayLike","e","createParagraph","schema","content","paragraph","nodes","createAndFill","createTextNode$1","marks","createTextSelection","tr","contentSize","doc","size","TextSelection","Math","min","addParagraph","_a","pos","replaceWith","setSelection","replaceTextNode","state","endIndex","createText","_b","child","nodeSize","textContent","node","Fragment","empty","mappedFrom","mapping","mappedTo","splitAndExtendBlock","textLen","delete","insert","getMdStartLine","mdNode","sourcepos","getMdEndLine","getMdStartCh","getMdEndCh","isStyledInlineNode","type","isListNode$1","isOrderedListNode","listData","isBulletListNode","isTableCellNode","findClosestNode","condition","includeSelf","parent","addOffsetPos","originPos","setOffsetPos","newOffset","getInlineMarkdownText","firstChild","literal","destination","title","isContainer$2","getChildrenText$1","buffer","walker","event","next","childNode","widgetRules","widgetRuleMap","reWidgetPrefix","unwrapWidgetSyntax","search","replaced","createWidgetContent","info","widgetToDOM","rule","toDOM","matches","match","getWidgetRules","setWidgetRules","rules","mergeNodes","ruleIndex","createNodesWithWidget","nextRuleIndex","prev","widget","getWidgetContent","widgetNode","entering","resumeAt","getDefaultCommands","deleteSelection","selectAll","undo","redo","inArray$1","getClass","hasClass_1","contains","inArray","toArray","elProto","Element","matchSelector","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","selector","ownerDocument","querySelectorAll","matches_1","TAG_NAME","ATTRIBUTE$1","OPEN_TAG","HTML_TAG","reHTMLTag","reBR","reHTMLComment","ALTERNATIVE_TAG_FOR_BR","isPositionInBox","offsetX","offsetY","left","parseInt","top","width","paddingLeft","paddingRight","height","paddingTop","paddingBottom","CLS_PREFIX","names","_i","names_1","name_1","clsWithMdPrefix","isElemNode","nodeType","Node","ELEMENT_NODE","removeNode$1","parentNode","toggleClass","createElementWith","contents","container","innerHTML","getOuterWidth","computed","getComputedStyle","getPropertyValue","offsetWidth","closest","found","getTotalOffset","root","offsetTop","offsetLeft","offsetParent","setAttributes","attributes","attrName","removeAttribute","setAttribute","removeProseMirrorHackNodes","html","resultHTML","pluginKey$1","PluginKey","PopupWidget","view","eventEmitter","_this","popup","removeWidget","rootEl","dom","parentElement","listen","update","getState","coordsAtPos","top_1","bottom","rect","getBoundingClientRect","relTopPos","opacity","position","focus","destroy","removeEventHandler","emitImageBlobHook","blob","emit","imageUrl","altText","pasteImageOnly","images","filter","getAsFile","dropImage","Plugin","props","handleDOMEvents","drop","_","ev","dataTransfer","files","preventDefault","stopPropagation","Node$2","get","enumerable","configurable","setContext","widgetNodeView","pmNode","attrs","isWidgetNode","Widget","_super","default","group","inline","selectable","atom","class","parseDOM","tag","getAttrs","EditorBase","timer","placeholder","createState","EditorState","plugins","createPlugins","initEvent","editorType","addEventListener","emitChangeEvent","docChanged","options","createInputRules","keymaps","keymap","baseKeymap","Enter","history","decorations","childCount","isTextblock","placeHolder","DecorationSet","Decoration","init","getMeta","editorView","InputRule","start","end","allMatched","input","resolve","depth","inputRules","clearTimer","clearTimeout","createSchema","Schema","specs","createKeymaps","useCommandShortcut","allKeymaps","historyKeymap","createCommands","commands","createPluginProps","extraPlugins","plugin","dispatch","scrollIntoView","blur","moveCursorToStart","moveCursorToEnd","setScrollTop","scrollTop","getScrollTop","setPlaceholder","setHeight","setMinHeight","minHeight","getElement","isFunction_1","Function","defaultCommandShortcuts","execCommand","command","payload","SpecManager","spec","addedCommands","specCommands","allCommands","specCommand","defaultCommands","resolveSelectionPos","selection","AllSelection","getMdLine","resolvedPos","getWidgetNodePos","chPos","direction","additionalPos","getEditorToMdPos","collapsed","startResolvedPos","startLine","endLine","startOffset","endOffset","endResolvedPos","startCh","max","endCh","getStartPosListPerLine","startPosListPerLine","getMdToEditorPos","startPos","endPos","startNode","endNode","getRangeInfo","$from","$to","startFromOffset","endFromOffset","startToOffset","endToOffset","getNodeContentOffsetRange","targetIndex","HEADING","LIST_ITEM","LINK","CODE","META","DELIM","TEXT","delimSize","strong","emph","strike","markInfo","emphasisAndStrikethrough","startDelimPos","endDelimPos","markLink","linkTextStart","lastChildCh","desc","lineBackground","prefix","defaultBackground","codeStart","codeEnd","markListItemChildren","markType","markNodeFuncMap","heading","level","headingType","seText","lastChild","extendedAutolink","image","linkTextEnd","code","tickCount","openDelimEnd","closeDelimStart","marked","codeBlock","fenceOffset","fenceLength","fenceChar","infoPadding","fenceEnd","lineBackgroundMarkInfo","blockQuote","childMarks","markParagraphInBlockQuote","padding","task","odd","even","listStyle","getSpecOfListItemStyle","customBlock","syntaxLength","syntaxEnd","simpleMarkClassNameMap","table","tableCell","htmlInline","getMarkInfo","removingBackgroundIndexMap","syntaxHighlight","toastMark","appendTransaction","transactions","newState","newTr","markInfo_1","removedNodeRange","skipLines","cacheIndexToRemoveBackground","getMarkForRemoving","nodes_1","event_1","getMarkForAdding","maxIndex","line","blockPosInfo","shouldChangeBlockType","isDifferentBlock","setBlockType","addLineBackground","addMark","mark","removeMark","removeBlockBackground","appendMarkTr","setMeta","lineTexts","getLineTexts","defaultToolbarStateKeys","getToolbarState$1","targetNode","toolbarState","indent","active","disabled","outdent","listEnabled","traverseParentNodes","getToolbarStateType$1","Doc$1","Doc","Mark","getTextByMdLine","mdLine","getTextContent","reBlockQuote","BlockQuote$1","BlockQuote","createBlockQuoteText","isBlockQuote","trim","extendBlockQuote","deleteRange","slicedText","blockQuoteCommand","reList","reOrderedList","reOrderedListGroup","reCanBeTaskList","reBulletListGroup","reTaskList","reBulletTaskList","getListType","getListDepth","findSameDepthList","currentLine","backward","lineLen","findFirstNodeAtLine","currentListDepth","getChangedInfo","sameDepthItems","firstIndex","MAX_VALUE","lastIndex","changedResults","textToBullet","ordinalNum","textToOrdered","getBulletOrOrdered","forwardList","backwardList","sameDepthListInfo","reverse","otherListToList","bullet","ordered","otherNodeToList","lineText","firstOrderedListNum","firstOrderedListLine","skipped","canBeListNode","searchResult","extendList","listSyntax","delimiter","filteredList","getReorderedListInfo","prevIndentLength","indentLength","nestedListInfo","reStartSpace","isBlockUnit","isInTableCellNode","$pos","rangeHasMark","createSelection","posInfo","spaceLenList","Paragraph$1","Paragraph","reorderList","topListNode","_c","indentLen","_d","_e","newSelection","tabKey","startLineText","spaceLenList_1","startText","startTextWithoutSpace","deletStart","deleteLines","chainCommands","joinForward","moveDown","moveUp","Tab","Text$1","Text","reHeading","Heading$1","Heading","classNames","createHeadingText","curHeadingSyntax","headingText","matchedHeading","fencedCodeBlockSyntax","CodeBlock$1","CodeBlock","fencedNode","keepIndentation","isCodeBlockNode","spaces","codeBlockCommand","reEmptyTable","createTableRow","columnCount","delim","row","Table$1","Table","extendTable","mdPos","cellNode","findNodeAtPosition","isEmpty","columns","moveTableCell","moveNext","parent_2","parentType","childType","createTargetTypes","chOffset","addTable","rowCount","headerRows","createTableHeader","bodyRows","createTableBody$1","ThematicBreak$1","ThematicBreak","hr","lineCommand","cannotBeListNode","ListItem$1","ListItem","commandType","unshift","changeToListPerLine","toList","rangeInfo","indexDiff","maxEndOffset","_loop_1","changedResult","this_1","toggleTask","checked","stateChar","bulletList","orderedList","taskList","bulletCommand","orderedCommand","taskCommand","togleTaskCommand","toggleMark","syntax","conditionFn","syntaxLen","prevPos","nextPos","textBetween","prevText","nextText","insertText","reStrong","Strong$1","Strong","bold","boldCommand","reStrike","Strike$1","Strike","strikeCommand","reEmph","Emph$1","Emph","italic","italicCommand","reCode","Code$1","Code","codeCommand","Link$1","Link","addLinkOrImage","linkText","linkUrl","addImage","addLink","TaskDelimiter","Delimiter","Meta","MarkedText","TableCell","Html","customBlockSyntax","CustomBlock$1","CustomBlock","reTaskMarkerKey","reTaskMarker","smartTask","keyup","paraNode","startMdPos","startSpaces","lastSpaces","addedPos","EVENT_TYPE","reLineEnding$2","MdEditor","mdPlugins","createSpecs","createContext","createView","createClipboard","isMarkdownTabMounted","toggleActive","clipboard","clipboardData","containRtfItem","kind","imageBlob","replaceSelection","insertBefore","prevState","eq","startChOffset","ch","cursorPos","findIndex","defaultPlugins","EditorView","dispatchTransaction","updateMarkdown","applyTransaction","updateState","handleKeyDown","metaKey","ctrlKey","toUpperCase","copy","captureCopy","cut","scroll","nodeViews","getChanged","setData","steps","step","ReplaceAroundStep","docs","changed","editResult","editMarkdown","nodesBetween","isText","isBlock","Slice","replaceRange","getSelectedText","getSelection","setMarkdown","markdown","cursorToEnd","addWidget","replaceWithWidget","getRangeInfoOfNode","getMarkdown","getToastMark","EVENT_KEY","_safeEvent","handlers","events","isString$1","forEach$1","safeEvent$1","unbindEvent","handler","idx","removeHandler","wrappedHandler","splice","removeEventListener","detachEvent","off_1","types","func","isString","safeEvent","bindEvent","eventHandler","attachEvent","existInEvents","memorizeHandler","on_1","extendStatics","__extends","__assign","__spreadArray","commonjsGlobal","globalThis","global","self","encodeCache","encode$1","string","exclude","keepEscaped","nextCode","cache","defaultChars","fromCharCode","toString","charCodeAt","getEncodeCache","encodeURIComponent","componentChars","encode_1","lib","decode","require$$1$1","Aacute","aacute","Abreve","abreve","ac","acd","acE","Acirc","acirc","acute","Acy","acy","AElig","aelig","af","Afr","afr","Agrave","agrave","alefsym","aleph","Alpha","alpha","Amacr","amacr","amalg","amp","AMP","andand","And","and","andd","andslope","andv","ang","ange","angle","angmsdaa","angmsdab","angmsdac","angmsdad","angmsdae","angmsdaf","angmsdag","angmsdah","angmsd","angrt","angrtvb","angrtvbd","angsph","angst","angzarr","Aogon","aogon","Aopf","aopf","apacir","ap","apE","ape","apid","apos","ApplyFunction","approx","approxeq","Aring","aring","Ascr","ascr","Assign","ast","asymp","asympeq","Atilde","atilde","Auml","auml","awconint","awint","backcong","backepsilon","backprime","backsim","backsimeq","Backslash","Barv","barvee","barwed","Barwed","barwedge","bbrk","bbrktbrk","bcong","Bcy","bcy","bdquo","becaus","because","Because","bemptyv","bepsi","bernou","Bernoullis","Beta","beta","beth","between","Bfr","bfr","bigcap","bigcirc","bigcup","bigodot","bigoplus","bigotimes","bigsqcup","bigstar","bigtriangledown","bigtriangleup","biguplus","bigvee","bigwedge","bkarow","blacklozenge","blacksquare","blacktriangle","blacktriangledown","blacktriangleleft","blacktriangleright","blank","blk12","blk14","blk34","block","bne","bnequiv","bNot","bnot","Bopf","bopf","bot","bowtie","boxbox","boxdl","boxdL","boxDl","boxDL","boxdr","boxdR","boxDr","boxDR","boxh","boxH","boxhd","boxHd","boxhD","boxHD","boxhu","boxHu","boxhU","boxHU","boxminus","boxplus","boxtimes","boxul","boxuL","boxUl","boxUL","boxur","boxuR","boxUr","boxUR","boxv","boxV","boxvh","boxvH","boxVh","boxVH","boxvl","boxvL","boxVl","boxVL","boxvr","boxvR","boxVr","boxVR","bprime","breve","Breve","brvbar","bscr","Bscr","bsemi","bsim","bsime","bsolb","bsol","bsolhsub","bull","bump","bumpE","bumpe","Bumpeq","bumpeq","Cacute","cacute","capand","capbrcup","capcap","cap","Cap","capcup","capdot","CapitalDifferentialD","caps","caret","caron","Cayleys","ccaps","Ccaron","ccaron","Ccedil","ccedil","Ccirc","ccirc","Cconint","ccups","ccupssm","Cdot","cdot","cedil","Cedilla","cemptyv","cent","centerdot","CenterDot","cfr","Cfr","CHcy","chcy","check","checkmark","Chi","chi","circ","circeq","circlearrowleft","circlearrowright","circledast","circledcirc","circleddash","CircleDot","circledR","circledS","CircleMinus","CirclePlus","CircleTimes","cir","cirE","cire","cirfnint","cirmid","cirscir","ClockwiseContourIntegral","CloseCurlyDoubleQuote","CloseCurlyQuote","clubs","clubsuit","colon","Colon","Colone","colone","coloneq","comma","commat","comp","compfn","complement","complexes","cong","congdot","Congruent","conint","Conint","ContourIntegral","copf","Copf","coprod","Coproduct","COPY","copysr","CounterClockwiseContourIntegral","crarr","cross","Cross","Cscr","cscr","csub","csube","csup","csupe","ctdot","cudarrl","cudarrr","cuepr","cuesc","cularr","cularrp","cupbrcap","cupcap","CupCap","cup","Cup","cupcup","cupdot","cupor","cups","curarr","curarrm","curlyeqprec","curlyeqsucc","curlyvee","curlywedge","curren","curvearrowleft","curvearrowright","cuvee","cuwed","cwconint","cwint","cylcty","dagger","Dagger","daleth","darr","Darr","dArr","dash","Dashv","dashv","dbkarow","dblac","Dcaron","dcaron","Dcy","dcy","ddagger","ddarr","DD","dd","DDotrahd","ddotseq","deg","Del","Delta","delta","demptyv","dfisht","Dfr","dfr","dHar","dharl","dharr","DiacriticalAcute","DiacriticalDot","DiacriticalDoubleAcute","DiacriticalGrave","DiacriticalTilde","diam","diamond","Diamond","diamondsuit","diams","die","DifferentialD","digamma","disin","div","divide","divideontimes","divonx","DJcy","djcy","dlcorn","dlcrop","dollar","Dopf","dopf","Dot","dot","DotDot","doteq","doteqdot","DotEqual","dotminus","dotplus","dotsquare","doublebarwedge","DoubleContourIntegral","DoubleDot","DoubleDownArrow","DoubleLeftArrow","DoubleLeftRightArrow","DoubleLeftTee","DoubleLongLeftArrow","DoubleLongLeftRightArrow","DoubleLongRightArrow","DoubleRightArrow","DoubleRightTee","DoubleUpArrow","DoubleUpDownArrow","DoubleVerticalBar","DownArrowBar","downarrow","DownArrow","Downarrow","DownArrowUpArrow","DownBreve","downdownarrows","downharpoonleft","downharpoonright","DownLeftRightVector","DownLeftTeeVector","DownLeftVectorBar","DownLeftVector","DownRightTeeVector","DownRightVectorBar","DownRightVector","DownTeeArrow","DownTee","drbkarow","drcorn","drcrop","Dscr","dscr","DScy","dscy","dsol","Dstrok","dstrok","dtdot","dtri","dtrif","duarr","duhar","dwangle","DZcy","dzcy","dzigrarr","Eacute","eacute","easter","Ecaron","ecaron","Ecirc","ecirc","ecir","ecolon","Ecy","ecy","eDDot","Edot","edot","eDot","ee","efDot","Efr","efr","eg","Egrave","egrave","egs","egsdot","elinters","ell","els","elsdot","Emacr","emacr","emptyset","EmptySmallSquare","emptyv","EmptyVerySmallSquare","emsp13","emsp14","emsp","ENG","eng","ensp","Eogon","eogon","Eopf","eopf","epar","eparsl","eplus","epsi","Epsilon","epsilon","epsiv","eqcirc","eqcolon","eqsim","eqslantgtr","eqslantless","Equal","equals","EqualTilde","equest","Equilibrium","equiv","equivDD","eqvparsl","erarr","erDot","escr","Escr","esdot","Esim","esim","Eta","eta","ETH","eth","Euml","euml","euro","excl","exist","Exists","expectation","exponentiale","ExponentialE","fallingdotseq","Fcy","fcy","female","ffilig","fflig","ffllig","Ffr","ffr","filig","FilledSmallSquare","FilledVerySmallSquare","fjlig","flat","fllig","fltns","fnof","Fopf","fopf","forall","ForAll","fork","forkv","Fouriertrf","fpartint","frac12","frac13","frac14","frac15","frac16","frac18","frac23","frac25","frac34","frac35","frac38","frac45","frac56","frac58","frac78","frasl","frown","fscr","Fscr","gacute","Gamma","gamma","Gammad","gammad","gap","Gbreve","gbreve","Gcedil","Gcirc","gcirc","Gcy","gcy","Gdot","gdot","ge","gE","gEl","gel","geq","geqq","geqslant","gescc","ges","gesdot","gesdoto","gesdotol","gesl","gesles","Gfr","gfr","gg","Gg","ggg","gimel","GJcy","gjcy","gla","gl","glE","glj","gnap","gnapprox","gne","gnE","gneq","gneqq","gnsim","Gopf","gopf","grave","GreaterEqual","GreaterEqualLess","GreaterFullEqual","GreaterGreater","GreaterLess","GreaterSlantEqual","GreaterTilde","Gscr","gscr","gsim","gsime","gsiml","gtcc","gtcir","gt","GT","Gt","gtdot","gtlPar","gtquest","gtrapprox","gtrarr","gtrdot","gtreqless","gtreqqless","gtrless","gtrsim","gvertneqq","gvnE","Hacek","hairsp","half","hamilt","HARDcy","hardcy","harrcir","harr","hArr","harrw","Hat","hbar","Hcirc","hcirc","hearts","heartsuit","hellip","hercon","hfr","Hfr","HilbertSpace","hksearow","hkswarow","hoarr","homtht","hookleftarrow","hookrightarrow","hopf","Hopf","horbar","HorizontalLine","hscr","Hscr","hslash","Hstrok","hstrok","HumpDownHump","HumpEqual","hybull","hyphen","Iacute","iacute","ic","Icirc","icirc","Icy","icy","Idot","IEcy","iecy","iexcl","iff","ifr","Ifr","Igrave","igrave","ii","iiiint","iiint","iinfin","iiota","IJlig","ijlig","Imacr","imacr","ImaginaryI","imagline","imagpart","imath","Im","imof","imped","Implies","incare","in","infin","infintie","inodot","intcal","int","Int","integers","Integral","intercal","Intersection","intlarhk","intprod","InvisibleComma","InvisibleTimes","IOcy","iocy","Iogon","iogon","Iopf","iopf","Iota","iota","iprod","iquest","iscr","Iscr","isin","isindot","isinE","isins","isinsv","isinv","it","Itilde","itilde","Iukcy","iukcy","Iuml","iuml","Jcirc","jcirc","Jcy","jcy","Jfr","jfr","jmath","Jopf","jopf","Jscr","jscr","Jsercy","jsercy","Jukcy","jukcy","Kappa","kappa","kappav","Kcedil","kcedil","Kcy","kcy","Kfr","kfr","kgreen","KHcy","khcy","KJcy","kjcy","Kopf","kopf","Kscr","kscr","lAarr","Lacute","lacute","laemptyv","lagran","Lambda","lambda","lang","Lang","langd","langle","lap","Laplacetrf","laquo","larrb","larrbfs","larr","Larr","lArr","larrfs","larrhk","larrlp","larrpl","larrsim","larrtl","latail","lAtail","lat","late","lates","lbarr","lBarr","lbbrk","lbrace","lbrack","lbrke","lbrksld","lbrkslu","Lcaron","lcaron","Lcedil","lcedil","lceil","lcub","Lcy","lcy","ldca","ldquo","ldquor","ldrdhar","ldrushar","ldsh","le","lE","LeftAngleBracket","LeftArrowBar","leftarrow","LeftArrow","Leftarrow","LeftArrowRightArrow","leftarrowtail","LeftCeiling","LeftDoubleBracket","LeftDownTeeVector","LeftDownVectorBar","LeftDownVector","LeftFloor","leftharpoondown","leftharpoonup","leftleftarrows","leftrightarrow","LeftRightArrow","Leftrightarrow","leftrightarrows","leftrightharpoons","leftrightsquigarrow","LeftRightVector","LeftTeeArrow","LeftTee","LeftTeeVector","leftthreetimes","LeftTriangleBar","LeftTriangle","LeftTriangleEqual","LeftUpDownVector","LeftUpTeeVector","LeftUpVectorBar","LeftUpVector","LeftVectorBar","LeftVector","lEg","leg","leq","leqq","leqslant","lescc","les","lesdot","lesdoto","lesdotor","lesg","lesges","lessapprox","lessdot","lesseqgtr","lesseqqgtr","LessEqualGreater","LessFullEqual","LessGreater","lessgtr","LessLess","lesssim","LessSlantEqual","LessTilde","lfisht","lfloor","Lfr","lfr","lg","lgE","lHar","lhard","lharu","lharul","lhblk","LJcy","ljcy","llarr","ll","Ll","llcorner","Lleftarrow","llhard","lltri","Lmidot","lmidot","lmoustache","lmoust","lnap","lnapprox","lne","lnE","lneq","lneqq","lnsim","loang","loarr","lobrk","longleftarrow","LongLeftArrow","Longleftarrow","longleftrightarrow","LongLeftRightArrow","Longleftrightarrow","longmapsto","longrightarrow","LongRightArrow","Longrightarrow","looparrowleft","looparrowright","lopar","Lopf","lopf","loplus","lotimes","lowast","lowbar","LowerLeftArrow","LowerRightArrow","loz","lozenge","lozf","lpar","lparlt","lrarr","lrcorner","lrhar","lrhard","lrm","lrtri","lsaquo","lscr","Lscr","lsh","Lsh","lsim","lsime","lsimg","lsqb","lsquo","lsquor","Lstrok","lstrok","ltcc","ltcir","lt","LT","Lt","ltdot","lthree","ltimes","ltlarr","ltquest","ltri","ltrie","ltrif","ltrPar","lurdshar","luruhar","lvertneqq","lvnE","macr","male","malt","maltese","Map","mapsto","mapstodown","mapstoleft","mapstoup","marker","mcomma","Mcy","mcy","mdash","mDDot","measuredangle","MediumSpace","Mellintrf","Mfr","mfr","mho","micro","midast","midcir","mid","middot","minusb","minus","minusd","minusdu","MinusPlus","mlcp","mldr","mnplus","models","Mopf","mopf","mp","mscr","Mscr","mstpos","Mu","mu","multimap","mumap","nabla","Nacute","nacute","nang","nap","napE","napid","napos","napprox","natural","naturals","natur","nbsp","nbump","nbumpe","ncap","Ncaron","ncaron","Ncedil","ncedil","ncong","ncongdot","ncup","Ncy","ncy","ndash","nearhk","nearr","neArr","nearrow","ne","nedot","NegativeMediumSpace","NegativeThickSpace","NegativeThinSpace","NegativeVeryThinSpace","nequiv","nesear","nesim","NestedGreaterGreater","NestedLessLess","NewLine","nexist","nexists","Nfr","nfr","ngE","nge","ngeq","ngeqq","ngeqslant","nges","nGg","ngsim","nGt","ngt","ngtr","nGtv","nharr","nhArr","nhpar","ni","nis","nisd","niv","NJcy","njcy","nlarr","nlArr","nldr","nlE","nle","nleftarrow","nLeftarrow","nleftrightarrow","nLeftrightarrow","nleq","nleqq","nleqslant","nles","nless","nLl","nlsim","nLt","nlt","nltri","nltrie","nLtv","nmid","NoBreak","NonBreakingSpace","nopf","Nopf","Not","not","NotCongruent","NotCupCap","NotDoubleVerticalBar","NotElement","NotEqual","NotEqualTilde","NotExists","NotGreater","NotGreaterEqual","NotGreaterFullEqual","NotGreaterGreater","NotGreaterLess","NotGreaterSlantEqual","NotGreaterTilde","NotHumpDownHump","NotHumpEqual","notin","notindot","notinE","notinva","notinvb","notinvc","NotLeftTriangleBar","NotLeftTriangle","NotLeftTriangleEqual","NotLess","NotLessEqual","NotLessGreater","NotLessLess","NotLessSlantEqual","NotLessTilde","NotNestedGreaterGreater","NotNestedLessLess","notni","notniva","notnivb","notnivc","NotPrecedes","NotPrecedesEqual","NotPrecedesSlantEqual","NotReverseElement","NotRightTriangleBar","NotRightTriangle","NotRightTriangleEqual","NotSquareSubset","NotSquareSubsetEqual","NotSquareSuperset","NotSquareSupersetEqual","NotSubset","NotSubsetEqual","NotSucceeds","NotSucceedsEqual","NotSucceedsSlantEqual","NotSucceedsTilde","NotSuperset","NotSupersetEqual","NotTilde","NotTildeEqual","NotTildeFullEqual","NotTildeTilde","NotVerticalBar","nparallel","npar","nparsl","npart","npolint","npr","nprcue","nprec","npreceq","npre","nrarrc","nrarr","nrArr","nrarrw","nrightarrow","nRightarrow","nrtri","nrtrie","nsc","nsccue","nsce","Nscr","nscr","nshortmid","nshortparallel","nsim","nsime","nsimeq","nsmid","nspar","nsqsube","nsqsupe","nsub","nsubE","nsube","nsubset","nsubseteq","nsubseteqq","nsucc","nsucceq","nsup","nsupE","nsupe","nsupset","nsupseteq","nsupseteqq","ntgl","Ntilde","ntilde","ntlg","ntriangleleft","ntrianglelefteq","ntriangleright","ntrianglerighteq","Nu","nu","num","numero","numsp","nvap","nvdash","nvDash","nVdash","nVDash","nvge","nvgt","nvHarr","nvinfin","nvlArr","nvle","nvlt","nvltrie","nvrArr","nvrtrie","nvsim","nwarhk","nwarr","nwArr","nwarrow","nwnear","Oacute","oacute","oast","Ocirc","ocirc","ocir","Ocy","ocy","odash","Odblac","odblac","odiv","odot","odsold","OElig","oelig","ofcir","Ofr","ofr","ogon","Ograve","ograve","ogt","ohbar","ohm","oint","olarr","olcir","olcross","oline","olt","Omacr","omacr","Omega","omega","Omicron","omicron","omid","ominus","Oopf","oopf","opar","OpenCurlyDoubleQuote","OpenCurlyQuote","operp","oplus","orarr","Or","or","ord","order","orderof","ordf","ordm","origof","oror","orslope","orv","oS","Oscr","oscr","Oslash","oslash","osol","Otilde","otilde","otimesas","Otimes","otimes","Ouml","ouml","ovbar","OverBar","OverBrace","OverBracket","OverParenthesis","para","parallel","par","parsim","parsl","part","PartialD","Pcy","pcy","percnt","period","permil","perp","pertenk","Pfr","pfr","Phi","phi","phiv","phmmat","phone","Pi","pi","pitchfork","piv","planck","planckh","plankv","plusacir","plusb","pluscir","plus","plusdo","plusdu","pluse","PlusMinus","plusmn","plussim","plustwo","pm","Poincareplane","pointint","popf","Popf","pound","prap","Pr","pr","prcue","precapprox","prec","preccurlyeq","Precedes","PrecedesEqual","PrecedesSlantEqual","PrecedesTilde","preceq","precnapprox","precneqq","precnsim","pre","prE","precsim","prime","Prime","primes","prnap","prnE","prnsim","prod","Product","profalar","profline","profsurf","Proportional","Proportion","propto","prsim","prurel","Pscr","pscr","Psi","psi","puncsp","Qfr","qfr","qint","qopf","Qopf","qprime","Qscr","qscr","quaternions","quatint","quest","questeq","quot","QUOT","rAarr","race","Racute","racute","radic","raemptyv","rang","Rang","rangd","rangle","raquo","rarrap","rarrb","rarrbfs","rarrc","rarr","Rarr","rArr","rarrfs","rarrhk","rarrlp","rarrpl","rarrsim","Rarrtl","rarrtl","rarrw","ratail","rAtail","ratio","rationals","rbarr","rBarr","RBarr","rbbrk","rbrace","rbrack","rbrke","rbrksld","rbrkslu","Rcaron","rcaron","Rcedil","rcedil","rceil","rcub","Rcy","rcy","rdca","rdldhar","rdquo","rdquor","rdsh","real","realine","realpart","reals","Re","reg","REG","ReverseElement","ReverseEquilibrium","ReverseUpEquilibrium","rfisht","rfloor","rfr","Rfr","rHar","rhard","rharu","rharul","Rho","rho","rhov","RightAngleBracket","RightArrowBar","rightarrow","RightArrow","Rightarrow","RightArrowLeftArrow","rightarrowtail","RightCeiling","RightDoubleBracket","RightDownTeeVector","RightDownVectorBar","RightDownVector","RightFloor","rightharpoondown","rightharpoonup","rightleftarrows","rightleftharpoons","rightrightarrows","rightsquigarrow","RightTeeArrow","RightTee","RightTeeVector","rightthreetimes","RightTriangleBar","RightTriangle","RightTriangleEqual","RightUpDownVector","RightUpTeeVector","RightUpVectorBar","RightUpVector","RightVectorBar","RightVector","ring","risingdotseq","rlarr","rlhar","rlm","rmoustache","rmoust","rnmid","roang","roarr","robrk","ropar","ropf","Ropf","roplus","rotimes","RoundImplies","rpar","rpargt","rppolint","rrarr","Rrightarrow","rsaquo","rscr","Rscr","rsh","Rsh","rsqb","rsquo","rsquor","rthree","rtimes","rtri","rtrie","rtrif","rtriltri","RuleDelayed","ruluhar","rx","Sacute","sacute","sbquo","scap","Scaron","scaron","Sc","sc","sccue","sce","scE","Scedil","scedil","Scirc","scirc","scnap","scnE","scnsim","scpolint","scsim","Scy","scy","sdotb","sdot","sdote","searhk","searr","seArr","searrow","sect","semi","seswar","setminus","setmn","sext","Sfr","sfr","sfrown","sharp","SHCHcy","shchcy","SHcy","shcy","ShortDownArrow","ShortLeftArrow","shortmid","shortparallel","ShortRightArrow","ShortUpArrow","shy","Sigma","sigma","sigmaf","sigmav","sim","simdot","sime","simeq","simg","simgE","siml","simlE","simne","simplus","simrarr","slarr","SmallCircle","smallsetminus","smashp","smeparsl","smid","smile","smt","smte","smtes","SOFTcy","softcy","solbar","solb","sol","Sopf","sopf","spades","spadesuit","spar","sqcap","sqcaps","sqcup","sqcups","Sqrt","sqsub","sqsube","sqsubset","sqsubseteq","sqsup","sqsupe","sqsupset","sqsupseteq","square","Square","SquareIntersection","SquareSubset","SquareSubsetEqual","SquareSuperset","SquareSupersetEqual","SquareUnion","squarf","squ","squf","srarr","Sscr","sscr","ssetmn","ssmile","sstarf","Star","star","starf","straightepsilon","straightphi","strns","sub","Sub","subdot","subE","sube","subedot","submult","subnE","subne","subplus","subrarr","subset","Subset","subseteq","subseteqq","SubsetEqual","subsetneq","subsetneqq","subsim","subsub","subsup","succapprox","succ","succcurlyeq","Succeeds","SucceedsEqual","SucceedsSlantEqual","SucceedsTilde","succeq","succnapprox","succneqq","succnsim","succsim","SuchThat","sum","Sum","sung","sup1","sup2","sup3","sup","Sup","supdot","supdsub","supE","supe","supedot","Superset","SupersetEqual","suphsol","suphsub","suplarr","supmult","supnE","supne","supplus","supset","Supset","supseteq","supseteqq","supsetneq","supsetneqq","supsim","supsub","supsup","swarhk","swarr","swArr","swarrow","swnwar","szlig","Tau","tau","tbrk","Tcaron","tcaron","Tcedil","tcedil","Tcy","tcy","tdot","telrec","Tfr","tfr","there4","therefore","Therefore","Theta","theta","thetasym","thetav","thickapprox","thicksim","ThickSpace","ThinSpace","thinsp","thkap","thksim","THORN","thorn","tilde","Tilde","TildeEqual","TildeFullEqual","TildeTilde","timesbar","timesb","times","timesd","tint","toea","topbot","topcir","Topf","topf","topfork","tosa","tprime","trade","TRADE","triangle","triangledown","triangleleft","trianglelefteq","triangleq","triangleright","trianglerighteq","tridot","trie","triminus","TripleDot","triplus","trisb","tritime","trpezium","Tscr","tscr","TScy","tscy","TSHcy","tshcy","Tstrok","tstrok","twixt","twoheadleftarrow","twoheadrightarrow","Uacute","uacute","uarr","Uarr","uArr","Uarrocir","Ubrcy","ubrcy","Ubreve","ubreve","Ucirc","ucirc","Ucy","ucy","udarr","Udblac","udblac","udhar","ufisht","Ufr","ufr","Ugrave","ugrave","uHar","uharl","uharr","uhblk","ulcorn","ulcorner","ulcrop","ultri","Umacr","umacr","uml","UnderBar","UnderBrace","UnderBracket","UnderParenthesis","Union","UnionPlus","Uogon","uogon","Uopf","uopf","UpArrowBar","uparrow","UpArrow","Uparrow","UpArrowDownArrow","updownarrow","UpDownArrow","Updownarrow","UpEquilibrium","upharpoonleft","upharpoonright","uplus","UpperLeftArrow","UpperRightArrow","upsi","Upsi","upsih","Upsilon","upsilon","UpTeeArrow","UpTee","upuparrows","urcorn","urcorner","urcrop","Uring","uring","urtri","Uscr","uscr","utdot","Utilde","utilde","utri","utrif","uuarr","Uuml","uuml","uwangle","vangrt","varepsilon","varkappa","varnothing","varphi","varpi","varpropto","varr","vArr","varrho","varsigma","varsubsetneq","varsubsetneqq","varsupsetneq","varsupsetneqq","vartheta","vartriangleleft","vartriangleright","vBar","Vbar","vBarv","Vcy","vcy","vdash","vDash","Vdash","VDash","Vdashl","veebar","vee","Vee","veeeq","vellip","verbar","Verbar","vert","Vert","VerticalBar","VerticalLine","VerticalSeparator","VerticalTilde","VeryThinSpace","Vfr","vfr","vltri","vnsub","vnsup","Vopf","vopf","vprop","vrtri","Vscr","vscr","vsubnE","vsubne","vsupnE","vsupne","Vvdash","vzigzag","Wcirc","wcirc","wedbar","wedge","Wedge","wedgeq","weierp","Wfr","wfr","Wopf","wopf","wp","wr","wreath","Wscr","wscr","xcap","xcirc","xcup","xdtri","Xfr","xfr","xharr","xhArr","Xi","xi","xlarr","xlArr","xmap","xnis","xodot","Xopf","xopf","xoplus","xotime","xrarr","xrArr","Xscr","xscr","xsqcup","xuplus","xutri","xvee","xwedge","Yacute","yacute","YAcy","yacy","Ycirc","ycirc","Ycy","ycy","yen","Yfr","yfr","YIcy","yicy","Yopf","yopf","Yscr","yscr","YUcy","yucy","yuml","Yuml","Zacute","zacute","Zcaron","zcaron","Zcy","zcy","Zdot","zdot","zeetrf","ZeroWidthSpace","Zeta","zeta","zfr","Zfr","ZHcy","zhcy","zigrarr","zopf","Zopf","Zscr","zscr","zwj","zwnj","require$$1","require$$0$1","decode_codepoint","__importDefault$2","__importDefault","mod","__esModule","decode_json_1","fromCodePoint$2","fromCodePoint","codePoint","output","__importDefault$1","decodeHTML","decodeHTMLStrict","decodeXML","entities_json_1$1","legacy_json_1","xml_json_1$1","decode_codepoint_1","strictEntityRe","getStrictDecoder","getReplacer","str","sorter","a","charAt","secondChar","substr","legacy","sort","j","re","replacer","encode","escapeUTF8","escape","encodeNonAsciiHTML","encodeHTML","encodeXML","inverseXML","getInverseObj","xmlReplacer","getInverseReplacer","getASCIIEncoder","inverse","inverseHTML","htmlReplacer","single","multiple","data","reNonASCII","singleCharReplacer","getCodePoint","codePointAt","c","reEscapeChars","exports","decodeXMLStrict","decodeHTML5Strict","decodeHTML4Strict","decodeHTML5","decodeHTML4","encodeHTML5","encodeHTML4","decodeStrict","decode_1","encode_2","decode_2","ENTITY","reBackslashOrAmp","ESCAPABLE","reEntityOrEscapedChar","reXmlSpecial","unescapeChar","unescapeString","normalizeURI","uri","err","replaceUnsafeChar","escapeXml","repeat","NodeWalker","current","cur","isContainer$1","lastNodeId","nodeMap","removeNodeById","id","Node$1","isContainer","unlink","insertAfter","sibling","prependChild","BlockNode","open","lineOffsets","stringContent","lastLineBlank","lastLineChecked","ListNode","HeadingNode","CodeBlockNode","isFenced","TableNode","TableCellNode","startIdx","endIdx","ignored","RefDefNode","dest","label","CustomBlockNode","HtmlBlockNode","htmlBlockType","LinkNode","CodeNode","CustomInlineNode","createNode$1","isCodeBlock","isList","isRefDef","isCustomBlock","text$1","TAGNAME","OPENTAG","CLOSETAG","reHtmlTag","RangeError","stringFromCharCode_1","floor_1","floor","args","highSurrogate","lowSurrogate","codeUnits","isFinite","fromCodePoint$1","DOMAIN","PATH","EMAIL","trimUnmatchedTrailingParens","trailingParen","source_1","trimCount","trimTrailingEntity","baseAutolinkParser","m","reWwwAutolink","text_2","scheme","parseUrlLink","reEmailLink","text_1","parseEmailLink","last","normalizeReference","toLowerCase","iterateObject","isEmptyObj","C_TILDE","C_SINGLEQUOTE","C_DOUBLEQUOTE","C_DOLLAR","ESCAPED_CHAR","rePunctuation","reLinkTitle","reLinkDestinationBraces","reEscapable","reEntityHere","reTicks","reTicksHere","reEllipses","reDash","reEmailAutolink","reAutolink","reSpnl","reWhitespaceChar","reUnicodeWhitespaceChar","reFinalSpace","reInitialSpace","reSpaceAtEndOfLine","reLinkLabel","reMain","InlineParser","subject","delimiters","brackets","lineStartNum","lineIdx","linePosOffset","refMap","refLinkCandidateMap","refDefCandidateMap","lineNum","startpos","nextLine","peek","spnl","parseBackticks","ticks","afterOpenTicks","lines","lastLine","parseBackslash","subj","parseAutolink","parseHtmlTag","scanDelims","cc","numdelims","charAfter","charBefore","ccAfter","canOpen","canClose","afterIsWhitespace","afterIsPunctuation","beforeIsWhitespace","beforeIsPunctuation","leftFlanking","rightFlanking","handleDelim","res","smart","origdelims","previous","removeDelimiter","removeDelimitersBetween","processEmphasis","stackBottom","opener","closer","oldCloser","openerInl","closerInl","openerFound","oddMatch","openersBottom","closercc","closerEmph","useDelims","emptyDelims","newNode","openerEndPos","closerStartPos","tmp","textNode","tempstack","parseLinkTitle","parseLinkDestination","savepos","openparens","parseLinkLabel","parseOpenBracket","addBracket","parseBang","parseCloseBracket","removeBracket","isImage","refLabel","beforelabel","bracketAfter","previousDelimiter","referenceDefinition","parseEntity","parseString","lit","chars","enCount","emCount","parseNewline","lastc","hardbreak","litLen","finalSpaceLen","parseReference","matchChars","rawlabel","beforetitle","atLineEnd","normalLabel","getReferenceDefSourcepos","createRefDefState","mergeTextNodes","textNodes","firstNode","lastNode","passedUrlLine","quotationCount","lastLineOffset","lineOffset","parseInline","disabledEntityParse","parse","isHeading","extendedAutolinks","customParser","autolinkParser","linkInfos","lastIdx","lineNum_1","chPos_1","newNodes","linkInfos_1","linkNode","newNodes_1","convertExtAutoLinks","reTaskListItemMarker","C_TAB","C_SPACE","reNonSpace","reClosingCodeFence","endsWithBlankLine","curBlock","ln","isBlank","isSpaceOrTab","reClosingCustomBlock","customBlock$1","continue","parser","lastLineLength","finalize","lineNumber","advanceOffset","newlinePos","firstLine","rest","infoString","canContain","acceptsLines","noop","tight","subitem","advanceNextNonspace","markerOffset","mLen","nextNonspace","hasReferenceDefs","inlineParser","blockHandlers","indented","htmlBlock","tableBody","tableHead","tableRow","tableDelimRow","tableDelimCell","refDef","frontMatter","parseRowContent","cells","cell","generateTableCells","cellType","contents_1","preSpaces","trimmed","postSpaces","chPosStart","getColumnFromDelimCell","align","firstCh","reCustomBlock","reCanBeCustomInline","reCodeFence","reHtmlBlockOpen","reSetextHeadingLine","reATXHeadingMarker","reThematicBreak","reBulletListMarker","reOrderedListMarker","isDisallowedDeepHeading","disallowDeepHeading","blockStarts","closeUnmatchedBlocks","addChild","disallowedTags","disallowedHtmlBlockTags","blockType","tip","itemData","currNode","nextc","bulletChar","spacesStartCol","column","spacesStartOffset","blankItem","spacesAfterMarker","parseListMarker","lastNewLineIdx","lastLineStartIdx","lastIndexOf","headerContent","delimContent","headerOffset","headerCells","delimOffset","delimCells","reValidDelimCell_1","firstLineNum","firstLineStart","paraLastLineLen","tableHead_1","tableHeadRow_1","tableDelimRow_1","delimCellNodes","table_1","reFrontMatter","frontMatter$1","reHtmlBlockClose","reMaybeSpecial","reLineEnding$1","document$2","defaultOptions$1","tagFilter","Parser","oldtip","nextNonspaceColumn","partiallyConsumedTab","allClosed","lastMatchedContainer","charsToTab","charsToAdvance","findNextNonspace","cols","addLine","columnNumber","newBlock","parent_1","above","processInlines","incorporateLine","Error","matchedLeaf","blockStartsLen","cont","clearRefMaps","partialParseStart","partialParseExtends","partialParseFinish","setRefMaps","comparePos","p1","p2","compareRangeAndPos","insertNodesBefore","compareRangeAndLine","findChildNodeAtLine","findNodeById","getNodeById","invokeNextUntil","callback","reLineEnding","unlinked","ToastMark","eventHandlerMap","change","updateLineTexts","newText","startCol","endCol","newLines","newLineLen","endLineText","removedLineLen","updateRootNodeState","replaceRangeNodes","temp","removeNextUntil","prependChildNodes","getNodeRange","trigger","eventName","param","extendEndLine","parseRange","spaceMatch","leftTrimmed","canBeContinuedListItem","editedLines","nextNode","isOpenedLastChildCodeBlock","isOpenedLastChildCustomBlock","isLastChildList","newEndLine","curr","getChildNodes","extStartNode","extEndNode","getRemovedNodeRange","markDeletedRefMap","markDeleted","refDefState","replaceWithNewRefDefState","replaceWith_1","replaceWithRefDefCandidate","candidate","getRangeWithRefDef","lineDiff","prevNode","parseResult","parseRefLink","removeUnlinkedCandidate","candidateMap","isUnlinked","propNames","resultMap","omit","base","diff","updateNextLineNumbers","getRootNode","sameLineTopAncestor","lastLeafNode","on","off","removeAllNode","reDisallowedTag","filterDisallowedTags","baseConvertors$1","tagName","outerNewLine","softbreak","linebreak","grandparent","selfClose","innerNewLine","nodeId","infoStr","infoWords","codeClassNames","href","getChildrenText","skipChildren","alt","convertors","customConvertor","console","warn","customInline","nomalizedInfo","gfmConvertors","itemTag","columnLen","tablePart","columnInfo","defaultOptions","gfm","node_1","Renderer","customOptions","createConvertors","customConvertors_1","nodeTypes","defaultConvertors_1","orgConvertor","convertor","convertorType","getConvertors","getOptions","render","rootNode","leaf","converted","isCustomInline","htmlNode","renderHTMLNode","addNewLine","renderElementNode","renderTextNode","renderRawHtmlNode","generateOpenTagString","attrValue","generateCloseTagString","addOuterNewLine","addInnerNewLine","isFrozen","getPrototypeOf","getOwnPropertyDescriptor","freeze","seal","_ref","Reflect","construct","fun","thisValue","x","Func","bind","arr2","_toConsumableArray","arrayForEach","unapply","arrayPop","pop","arrayPush","stringToLowerCase","stringMatch","stringReplace","stringIndexOf","stringTrim","regExpTest","typeErrorCreate","_len2","_key2","thisArg","_len","_key","addToSet","set","lcElement","clone","object","newObject","property","lookupGetter","html$2","svg","svgFilters","svgDisallowed","mathMl","mathMlDisallowed","html$1$1","svg$1","mathMl$1","xml","MUSTACHE_EXPR","ERB_EXPR","DATA_ATTR","ARIA_ATTR","IS_ALLOWED_URI","IS_SCRIPT_OR_DATA","ATTR_WHITESPACE","_typeof","Symbol","iterator","_toConsumableArray$1","getGlobal","purify","createDOMPurify","DOMPurify","version","removed","isSupported","originalDocument","DocumentFragment","HTMLTemplateElement","NodeFilter","_window$NamedNodeMap","NamedNodeMap","MozNamedAttrMap","Comment","DOMParser","trustedTypes","ElementPrototype","cloneNode","getNextSibling","getParentNode","template","trustedTypesPolicy","createPolicy","suffix","ATTR_NAME","currentScript","hasAttribute","getAttribute","policyName","createHTML","html$$1","_createTrustedTypesPolicy","emptyHTML","RETURN_TRUSTED_TYPE","_document","implementation","createNodeIterator","createDocumentFragment","getElementsByTagName","importNode","documentMode","hooks","createHTMLDocument","MUSTACHE_EXPR$$1","ERB_EXPR$$1","DATA_ATTR$$1","ARIA_ATTR$$1","IS_SCRIPT_OR_DATA$$1","ATTR_WHITESPACE$$1","IS_ALLOWED_URI$$1","ALLOWED_TAGS","DEFAULT_ALLOWED_TAGS","ALLOWED_ATTR","DEFAULT_ALLOWED_ATTR","FORBID_TAGS","FORBID_ATTR","ALLOW_ARIA_ATTR","ALLOW_DATA_ATTR","ALLOW_UNKNOWN_PROTOCOLS","SAFE_FOR_TEMPLATES","WHOLE_DOCUMENT","SET_CONFIG","FORCE_BODY","RETURN_DOM","RETURN_DOM_FRAGMENT","RETURN_DOM_IMPORT","SANITIZE_DOM","KEEP_CONTENT","IN_PLACE","USE_PROFILES","FORBID_CONTENTS","DEFAULT_FORBID_CONTENTS","DATA_URI_TAGS","DEFAULT_DATA_URI_TAGS","URI_SAFE_ATTRIBUTES","DEFAULT_URI_SAFE_ATTRIBUTES","MATHML_NAMESPACE","SVG_NAMESPACE","HTML_NAMESPACE","NAMESPACE","IS_EMPTY_INPUT","PARSER_MEDIA_TYPE","SUPPORTED_PARSER_MEDIA_TYPES","transformCaseFunc","CONFIG","formElement","_parseConfig","cfg","ADD_URI_SAFE_ATTR","ADD_DATA_URI_TAGS","ALLOWED_URI_REGEXP","ADD_TAGS","ADD_ATTR","tbody","MATHML_TEXT_INTEGRATION_POINTS","HTML_INTEGRATION_POINTS","ALL_SVG_TAGS","ALL_MATHML_TAGS","_forceRemove","outerHTML","_removeAttribute","getAttributeNode","_initDocument","dirty","leadingWhitespace","dirtyPayload","parseFromString","documentElement","createDocument","createTextNode","childNodes","_createIterator","SHOW_ELEMENT","SHOW_COMMENT","SHOW_TEXT","_isNode","nodeName","_executeHook","entryPoint","currentNode","hook","_sanitizeElements","elm","namespaceURI","allowedTags","firstElementChild","parentTagName","Boolean","commonSvgAndHTMLElements","_checkValidNamespace","_isValidAttribute","lcTag","lcName","_sanitizeAttributes","attr","hookEvent","keepAttr","allowedAttributes","_attr","forceKeepAttr","setAttributeNS","_sanitizeShadowDOM","fragment","shadowNode","shadowIterator","sanitize","importedNode","oldNode","returnNode","toStaticHTML","nodeIterator","serializedHTML","setConfig","clearConfig","isValidAttribute","addHook","hookFunction","removeHook","removeHooks","removeAllHooks","CAN_BE_WHITE_TAG_LIST","whiteTagList","registerTagWhitelistIfPossible","sanitizeHTML","getChildrenHTML","typeName","getHTMLAttrsByHTMLString","values","getHTMLAttrs","nodeValue","sanitizeDOM","sanitizer","wwToDOMAdaptor","getToDOMNode","htmlAttrs","schemaFactory","childrenHTML","reCloseTag","baseConvertors","preClasses","codeAttrs","getHTMLRenderConvertors","customConvertors","newContext","rootHTML","openTagName","closeTagName","htmlConvertor","nestableTypes","nestableTagNames","isBlankLine","getEditorRangeHeightInfo","children","clientHeight","getBlankLinesHeight","getTotalOffsetTop","findLastSiblingElementToScrollTop","nextElementSibling","getParentNodeObj","previewContent","querySelector","getNonNestableNodeObj","offsetInfoMap","removeOffsetInfoByNode","getAndSaveOffsetInfo","mdNodeId","cachedHeight","cachedTop","getOffsetTop","nodeHeight","setOffsetTop","CLASS_HIGHLIGHT","MarkdownPreview","isViewer","customHTMLRenderer","highlight","renderer","cursorNodeId","initContentSection","overflowWrap","updateCursorNode","removeHighlight","adjacentEl","findAdjacentElementToScrollTop","currentEl","getElementByNodeId","cursorNode","isInlineNode$1","findTableCell","oldEL","newEL","contentEl","newHtml","emitReduce","startNodeId","endNodeId","startEl","endEl","insertAdjacentHTML","nextEl","getRenderer","getHTML","setHTML","findNodeBy","before","isInListNode","isInTableNode","findListItem","createDOMInfoParsedRawHTML","rawHTML","createCellAttrs","createParsedCellDOM","attrNameInDOM","getCustomAttrs","changeToList","outerRange","joinBefore","compatibleContent","NodeRange","wrappers","innerRange","around","contentMatchAt","findWrapping","outer","canReplaceWith","findWrappingOutside","inner","inside","contentMatch","innerMatch","matchType","validEnd","findWrappingInside","aroundNodes","innerNodes","findWrappers","foundListIndex","splitDepth","splitPos","canSplit","wrapInList","getBeforeLineListItem","endListItemPos","changeList","blockRange","startListItem","endListItem","setNodeMarkup","parentOffset","changeListType","toggleTaskListItems","liftListItem","listItem","endOfList","lift","liftTarget","liftToOuterList","nodeAfter","atStart","atEnd","indexBefore","canReplaceParent","canReplace","append","liftOutOfList","nodeBefore","nestedBefore","after","sinkListItem","getWwCommands","TableOffsetMap","tableRows","tableStartPos","rowInfo","cellPos","cached","rows_1","tablePos","thead","theadCellInfo","createOffsetMap","tbodyCellInfo","getCellInfo","rowIdx","colIdx","posAt","rowStart","rowEnd","totalColumnCount","getNodeAndPos","cellInfo","nodeAt","tableStartOffset","extendedRowspan","extendedColspan","getRowspanCount","getColspanCount","decreaseColspanCount","decreaseRowspanCount","getColspanStartInfo","getRowspanStartInfo","getCellStartOffset","getCellEndOffset","getCellIndex","totalRowCount","getRectOffsets","startCellPos","endCellPos","startRowIdx","startColIdx","endRowIdx","endColIdx","getSpannedOffsets","selectionInfo","headOrBody","cellInfoMatrix","rowOffset","rowspanMap","colspanMap","cellOffset","mixinTableOffsetMapPrototype","offsetMapMixin","createOffsetMapMixin","CellSelection","ranges","SelectionRange","getSelectionRanges","startCell","endCell","offsetMap","isCellSelection","visible","depthFromTable","tableEndPos","tableOffset","isTableHeadCell","extended","copiedRow","createTableFragment","toJSON","JSON","stringify","Selection","createTableBodyRows","tableBodyCell","createDummyCells","tableHeadCell","findCellElement","findCell","getResolvedSelection","$anchor","foundCell","anchor","head","getTableContentFromSlice","openStart","openEnd","getRowAndColumnCount","setAttrs","pluginKey","TableSelection","mousedown","handleMousedown","mousemove","handleMousemove","mouseup","handleMouseup","button","getCellPos","prevEndCellPos","prevEndCellOffset","setCellSelection","clientX","clientY","mousePos","posAtCoords","currentPos","starting","cellSelection","SELECTED_CELL_CLASS_NAME","drawCellSelection","cells_1","Map$1","getKeyIndex","keyIndex","has","clear","DEFAULT_CODE","I18n","langs","setCode","setLanguage","codes","langData","langSet","i18n","contextMenuGroups","action","disableInThead","getContextMenuGroups","inTableHead","contextMenuGroup","onClick","EXCEPT_TYPES","MARK_TYPES","LIST_TYPES","getToolbarState","getToolbarStateType","nodeTypeState","listName","listType","setListNodeToolbarState","marksAtPos","marksAcross","isInSet","setMarkTypeStates","toolbarStateHighlight","CustomBlockView","getPos","toDOMAdaptor","openEditor","innerEditorView","draggable","wrapper","innerViewContainer","newlineInCode","Escape","cancelEditing","saveAndFinishEditing","dispatchInner","hasFocus","canceled","createInnerViewContainer","renderCustomBlock","renderToolArea","tool","span","toDOMNode","hasChildNodes","closeEditor","outerState","undoableCount","undoDepth","outerTr","StepMap","sameMarkup","stopEvent","ignoreMutation","IMAGE_LINK_CLASS_NAME","ImageView","imageLink","createImageElement","CodeBlockView","contentDOM","backgroundImage","right","createLanguageEditor","handleKeydown","changeLanguage","bindDOMEvent","language","createCodeBlockElement","wrpperWidth","clientWidth","reset","reMSOListClassName","reMSOStylePrefix","reMSOListStyle","reMSOTagName","reMSOListBullet","MSO_CLASS_NAME_LIST_PARA","getListItemContents","removedNodes","createTreeWalker","msoSpan","bulletSpan","unwrapNode","createListData","paras","prevListItemData","listItemData","styleAttr","levelStr","unordered","createListItemDataFromParagraph","prevData","addListItemDetailData","makeList","listTagName","makeListFromParagraphs","convertMsoParagraphsToList","nodeList","foundParas","insertedNode","msoListParaEnd","nextSibling","isMsoListParagraphEnd","nodesToAppend","nodeToAppend","appendNodes","START_FRAGMENT_COMMENT","END_FRAGMENT_COMMENT","changePastedHTML","isFromMso","convertMsoTableToCompletedTable","startFragmentIndex","endFragmentIndex","getContentBetweenFragmentComments","createCells","orgRow","maxColumnCount","cellCount","copiedCell","copyTableHeadRow","copyTableBodyRow","createRowsFromPastingTable","tableContent","tableHeadRows","tableBodyRows","createTableHead","tableHeadRow","createTableBody","copiedRows","tableBodyRow","dummyTableRow","columnIndex","dummyCell","dummyRowForPasting","creatTableBodyDummyRow","changePastedSlice","isInTable","rows","startFromBody","prevRow","currentRow","getMaxColumnCount","createTableFromPastingTable","DUMMY_CELL_SIZE","TR_NODES_SIZE","getDummyCellSize","dummyCellCount","pasteToTable","curSelectionInfo","pastingCells","pastingRows","pastingTableRows","startToTableHead","slicedRows","shift","createPastingCells","pastingInfo","pastingRowCount","pastingColumnCount","colspan","addedRowCount","addedColumnCount","getPastingRangeInfo","cellsOffsets","canMerge","addReplacedOffsets","insertOffset","startCellOffset","endCellOffset","dummyOffsets","expandColumns","mapStart","maps","tableEndOffset","rowIndex","nextCellOffset","expandRows","offsets","replaceCells","reSoftTabLen","addSpaces","removeSpaces","removedSpaceText","levels","defining","preserveWhitespace","moveCursor","endOfTextblock","ArrowUp","ArrowDown","BulletList","bulletListCommand","OrderedList","orderedListCommand","liftToPrevListItem","listItemParent","Backspace","sameParent","grandParent","indexAfter","keepItem","near","nextType","defaultType","splitListItem","wrapIn","blockQutoeCommand","cellOffsetFnMap","firstCellInRow","lastCellInRow","nextColIdx","colspanInfo","up","down","nextRowIdx","rowspanInfo","canBeOutOfTable","inFirstRow","inLastRow","addParagraphAfterTable","forcedAddtion","moveToCell","cellIndex","cellOffsetFn","dir","getRowRanges","theadData","tbodyData","createTableHeadRow","replaceSelectionWith","removeTable","addColumn","targetColIdx","removeColumn","addRow","targetRowIdx","insertColIdx","getTargetRowInfo","removeRow","alignColumn","moveInCell","cellDepth","paraDepth","listDepth","inList","curDepth","moveBeforeCell","listItemNode","isInFirstListItem","canMoveToBeforeCell","moveAfterCell","lastListItem","hasChildren","isInLastListItem","canMoveToAfterCell","canMoveBetweenCells","canSelectTableNode","addParagraphBeforeTable","NodeSelection","selectNode","deleteCells","exitTable","addColumnToLeft","addColumnToRight","addRowToUp","addRowToDown","deleteCellContent","ArrowLeft","ArrowRight","Delete","TableHead","TableBody","TableRow","TableHeadCell","isolating","cellAttrs","TableBodyCell","rowspan","Image","sanitizedDOM","rootBlock","lastBlock","blockEnd","nextHr","hrCommand","toggleMark$1","inclusive","replaceRangeWith","toggleLink","FrontMatter","exitCode","HTMLComment","CONTENTS_CLASS_NAME","WysiwygEditor","htmlSchemaMap","wwPlugins","wwNodeViews","pluginNodeViews","mapResult","deleted","createSelectionBetween","contextmenu","menuGroups","createPluginNodeViews","pluginNodeViewMap","transformPastedHTML","transformPasted","handlePaste","paste","getModel","getSchema","setModel","newDoc","mark_1","nodeMarks","maybeHasMark_1","isUndefined","isNull","isExisty","isTruthy","isFalsy_1","eventTypeList","EventEmitter","eventTypes","hold","eventType","addEventType","typeInfo","getTypeInfo","eventHandlers","hasEventType","namespace","results","splited","removeEventHandlerWithHandler","evtType","removeEventHandlerWithTypeInfo","handlerIndex","handlersToSurvive","getEvents","holdEventInvoke","fn","CommandManager","mdCommands","wwCommands","getEditorType","addCommand","deleteCommand","getTextWithoutTrailingNewline","isCustomHTMLInlineNode","isInlineNode","isSoftbreak","isListNode","getMatchedAttributeValue","attrNames","openMark","closeMark","img","addNode","br","openNode","closeNode","addText","li","getListItemAttrs","htmlToWwConvertors","convertorMap","isBRTag","addRawHTMLAttributeToDOM","toWwConvertors","customAttrs","hasParaNode","sanitizedHTML","htmlToWwConvertor","htmlComment","convertByDOMParser","ToWwConvertorState","stack","topNodeType","Mark$1","none","merged","sameSet","withText","removeFromSet","fromSchema","closeUnmatchedHTMLInline","nodeInfo","convert","infoForPosSync","stackItem","setMappedPos","convertNode","nodeTypeWriters","stopNewline","convertInline","firstChildNode","prevEmptyNode","nextParaNode","emptyNode","write","closeBlock","prevDelim","getDelim","setDelim","ensureNewLine","openDelim","closeDelim","flushClose","wrapBlock","convertList","headDelim","columnAlign","leftDelim","rightDelim","createTableHeadDelim","convertTableCell","addBackticks","side","getPairRawHTML","getOpenRawHTML","getCloseRawHTML","toMdConvertors","inTable","altAttr","titleAttr","openTag","closeTag","markTypeOptions","mixable","removedEnclosingWhitespace","createNodeTypeConvertors","nodeTypeConvertors","params","convertToRawHTMLHavingInlines","convertToRawHTMLHavingBlocks","createMdConvertors","baseConvertor","markTypeConvertors","markOption","createMarkTypeConvertors","ToMdConvertorState","closed","tightList","getMarkConvertor","isInBlank","markText","delimMin","firstDelim","old","escaped","convertBlock","trailing","progress","leading","removedWhitespace","markConvertor","lead","trail","lastMark","noEscape","other","keep","activedMark","firstDelimFn","prevTight","Convertor","toHTMLConvertors","mappedPosWhenConverting","focusedNode","customConvertorTypes","orgConvertors","wwConvertor","tokens","createWwConvertors","getMappedPos","getInfoForPosSync","toWysiwygModel","toMarkdownText","wwNode","markdownText","getPluginInfo","pluginsInfo","instance","pluginInfoResult","pluginInfo","pmState","pmView","pmModel","pmRules","undoInputRule","pmKeymap","pluginFn","execPlugin","markdownParsers","toHTMLRenderers","toMarkdownRenderers","markdownPlugins","wysiwygPlugins","wysiwygNodeViews","markdownCommands","wysiwygCommands","toolbarItems","ToastUIEditorViewer","customHTMLSanitizer","theme","rendererOptions","htmlType","initialValue","existingHTML","preview","endSourcepos","isMarkdownMode","isWysiwygMode","isPmNode","Node$3","tokenToDOMNode","token","WwToDOMAdaptor","customRenderer","customHTMLConvertor","customConvertorKeys","generateTokens","mdLikeNode","wysiwygNode","createMdLikeNode","isLeaf","SCROLL_BLOCKING_RESET_DELAY","currentTimeoutId","releaseTimer","run","deltaScrollTop","syncScrollTop","releaseEventBlock","ScrollSync","mdEditor","latestEditorScrollTop","latestPreviewScrollTop","blockedScroll","previewRoot","previewEl","addScrollSyncEvent","syncPreviewScrollTop","syncEditorScrollTop","getMdNodeAtPos","getScrollTopByCaretPos","firstMdNode","previewHeight","targetScrollTop","editing","isHTMLNode","curScrollTop","scrollHeight","isBottomPos","scrollTopByEditing","getResolvedScrollTop","findAncestorHavingId","targetNodeHeight","getAdditionalPos","latestScrollTop","scrollTarget","syncCallbacks","startTime","now","deltaValue","cos","PI","ceil","animate","queryMap","getPopupInitialValues","editor","popupName","ToastUIEditorCore","initialHTML","previewStyle","previewHighlight","initialEditType","hideModeSwitch","customMarkdownRenderer","autofocus","mode","mdPreviewStyle","targetType","createHTMLSchemaMap","wwEditor","commandManager","scrollSync","addInitEvent","addInitCommand","query","changeMode","reader","FileReader","onload","readAsDataURL","addPluginCommands","commandMap","getCurrentModeEditor","factory","viewer","changePreviewStyle","paylaod","replacedHTML","htmlTagMatched","htmlTag","alternativeTag","openTagMatched","replaceBRWithEmptyBlock","rePlaceholder","getMinHeight","getHeight","minHeightNum","getCurrentPreviewStyle","withoutFocus","hide","show","getEditorElements","mdPreview","convertPosToMatchEditorMode","isFromArray","isToArray","convertedFrom","convertedTo","isBoolean_1","VNodeWalker","walk","vnode","VNode","skip","ref","removalNodes","excludeUnnecessaryChild","flatted","r","u","h","isObject_1","createNode","setProps","removeNode","innerDiff","prevProps","nextProps","propName","TEXT_NODE","isTextNode","reNonDimension","prevStyleProps","styleProps","styleProp","setStyleProps","commit","removalNode","component","mounted","updated","effect","beforeDestroy","createComponent","Comp","buildVNode","buildChildrenVNode","sameType","isSameType","templateObject_1$h","Component","refs","setState","rerender","Switch","debounce","delay","throttle_1","interval","debounced","stamp","isLeading","tick","_args","throttled","MapShim","getIndex","entry","class_1","__entries__","entries","ctx","isBrowser","global$1","requestAnimationFrame$1","requestAnimationFrame","transitionKeys","mutationObserverSupported","MutationObserver","ResizeObserverController","connected_","mutationEventsAdded_","mutationsObserver_","observers_","onTransitionEnd_","refresh","leadingCall","trailingCall","lastCallTime","resolvePending","proxy","timeoutCallback","timeStamp","throttle","addObserver","observer","connect_","removeObserver","observers","disconnect_","updateObservers_","activeObservers","gatherActive","hasActive","broadcastActive","observe","childList","characterData","subtree","disconnect","propertyName","getInstance","instance_","defineConfigurable","writable","getWindowOf","defaultView","emptyRect","createRectInit","toFloat","parseFloat","getBordersSize","styles","positions","getHTMLElementContentRect","paddings","positions_1","getPaddings","horizPad","vertPad","boxSizing","round","isDocumentElement","vertScrollbar","horizScrollbar","abs","isSVGGraphicsElement","SVGGraphicsElement","SVGElement","getBBox","getContentRect","bbox","getSVGContentRect","y","ResizeObservation","broadcastWidth","broadcastHeight","contentRect_","isActive","broadcastRect","ResizeObserverEntry","rectInit","contentRect","Constr","DOMRectReadOnly","createReadOnlyRect","ResizeObserverSPI","controller","callbackCtx","activeObservations_","observations_","callback_","controller_","callbackCtx_","observations","unobserve","clearActive","observation","WeakMap","ResizeObserver","method","templateObject_1$g","templateObject_2$8","templateObject_1$f","templateObject_2$7","templateObject_1$e","templateObject_1$d","templateObject_1$c","templateObject_2$6","templateObject_3$2","templateObject_4$1","templateObject_1$b","templateObject_1$a","templateObject_2$5","templateObject_3$1","templateObject_4","templateObject_5","HeadingPopupBody","Tabs","toggleTab","activeTab","tabs","ImagePopupBody","initialize","urlEl","file","fileNameElClassName","emitAddImageBlob","emitAddImage","showFileSelectBox","click","changeFile","altTextEl","imageFile","imageUrlEl","preventSelectStart","hidePopup","LinkPopupBody","linkUrlEl","linkTextEl","initialValues","TablePopupBody","extendSelectionRange","pageX","pageY","offsetRect","getSelectionRangeByOffset","getDescription","getBoundByRange","getRangeByOffset","getTableRange","orgColIdx","orgRowIdx","getSelectionAreaBound","tableEl","pageXOffset","pageYOffset","createTableArea","tableRange","cellClassNames","selectionAreaBound","CustomPopupBody","replaceChild","createToolbarItemInfo","tooltip","checkbox","toggleSwitch","onMounted","createScrollSyncToolbarItem","createDefaultToolbarItemInfo","createPopupInfo","fromEl","setGroupState","hidden","groupToolbarItems","hiddenScrollSync","toggleScrollSyncState","templateObject_1$9","templateObject_1$8","Popup","popupPos","toolbarOffsetWidth","popupStyle","connectHOC","WrappedComponent","ButtonHOC","showTooltip","bound","getBound","tooltipRef","hideTooltip","addEvent","offsetHeight","templateObject_1$7","templateObject_1$6","templateObject_1$5","templateObject_2$4","templateObject_1$4","templateObject_2$3","templateObject_1$3","templateObject_2$2","templateObject_1$2","templateObject_2$1","templateObject_3","templateObject_1$1","templateObject_2","templateObject_1","ToolbarButtonComp","setPopupInfo","setItemWidth","ToolbarButton","CustomToolbarItemComp","showPopup","onUpdated","getListener","listener","CustomToolbarItem","ToolbarGroup","hiddenDivider","groupStyle","dividerStyle","DropdownToolbarButtonComp","handleClickDocument","showDropdown","dropdownPos","visibleItems","dropdownItem","dropdownStyle","dropdownEl","DropdownToolbarButton","Toolbar","itemWidthMap","popupInfo","openPopup","initialItems","dropdownItems","resizeObserver","handleResize","insertToolbarItem","indexList","groupIndex","itemIndex","classifyToolbarItems","removeToolbarItem","appendTooltipToRoot","movePrevItemToDropdownToolbar","dropdownGroup","moveItem","targetGroup","prevGroup","totalWidth","divider","dividerWidth","moved","initialGroup","changedStyle","changedType","toolbarStyle","borderTopLeftRadius","ContextMenu","getMenuGroupElements","menuItem","Layout","slots","wwContainer","mdContainer","insertAdjacentElement","toolbar","displayClassName","editorTypeClassName","previewClassName","themeClassName","editorSection","ToastUIEditor","layoutComp","layout","defaultUI","toolbarItem","indexInfo","itemName","Markdown","WYSIWYG","Write","Preview","Headings","Bold","Italic","Line","Blockquote","Task","Indent","Outdent","Description","OK","More","Cancel","File","URL"],"mappings":";;;;;;;;;;;;;;;;;;;;gFAgCA,IAAIA,EAAkB,SAASC,EAAGC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