@lotte-innovate/ui-component-test 0.0.120 → 0.0.202

Sign up to get free protection for your applications and to get access to all the features.
Files changed (566) hide show
  1. package/dist/globals.css +1 -1
  2. package/dist/lib/_virtual/icons.mjs +2 -0
  3. package/dist/lib/_virtual/icons.mjs.map +1 -0
  4. package/dist/lib/_virtual/index.mjs +2 -0
  5. package/dist/lib/_virtual/index10.mjs +2 -0
  6. package/dist/lib/_virtual/index10.mjs.map +1 -0
  7. package/dist/lib/_virtual/index11.mjs +2 -0
  8. package/dist/lib/_virtual/index11.mjs.map +1 -0
  9. package/dist/lib/_virtual/index12.mjs +2 -0
  10. package/dist/lib/_virtual/index12.mjs.map +1 -0
  11. package/dist/lib/_virtual/index13.mjs +2 -0
  12. package/dist/lib/_virtual/index13.mjs.map +1 -0
  13. package/dist/lib/_virtual/index14.mjs +2 -0
  14. package/dist/lib/_virtual/index14.mjs.map +1 -0
  15. package/dist/lib/_virtual/index15.mjs +2 -0
  16. package/dist/lib/_virtual/index15.mjs.map +1 -0
  17. package/dist/lib/_virtual/index16.mjs +2 -0
  18. package/dist/lib/_virtual/index16.mjs.map +1 -0
  19. package/dist/lib/_virtual/index17.mjs +2 -0
  20. package/dist/lib/_virtual/index17.mjs.map +1 -0
  21. package/dist/lib/_virtual/index18.mjs +2 -0
  22. package/dist/lib/_virtual/index18.mjs.map +1 -0
  23. package/dist/lib/_virtual/index19.mjs +2 -0
  24. package/dist/lib/_virtual/index19.mjs.map +1 -0
  25. package/dist/lib/_virtual/index2.mjs +2 -0
  26. package/dist/lib/_virtual/index2.mjs.map +1 -0
  27. package/dist/lib/_virtual/index20.mjs +2 -0
  28. package/dist/lib/_virtual/index20.mjs.map +1 -0
  29. package/dist/lib/_virtual/index3.mjs +2 -0
  30. package/dist/lib/_virtual/index3.mjs.map +1 -0
  31. package/dist/lib/_virtual/index4.mjs +2 -0
  32. package/dist/lib/_virtual/index4.mjs.map +1 -0
  33. package/dist/lib/_virtual/index5.mjs +2 -0
  34. package/dist/lib/_virtual/index5.mjs.map +1 -0
  35. package/dist/lib/_virtual/index6.mjs +2 -0
  36. package/dist/lib/_virtual/index6.mjs.map +1 -0
  37. package/dist/lib/_virtual/index7.mjs +2 -0
  38. package/dist/lib/_virtual/index7.mjs.map +1 -0
  39. package/dist/lib/_virtual/index8.mjs +2 -0
  40. package/dist/lib/_virtual/index8.mjs.map +1 -0
  41. package/dist/lib/_virtual/index9.mjs +2 -0
  42. package/dist/lib/_virtual/index9.mjs.map +1 -0
  43. package/dist/lib/_virtual/model.mjs +2 -0
  44. package/dist/lib/_virtual/model.mjs.map +1 -0
  45. package/dist/lib/_virtual/plugin.mjs +2 -0
  46. package/dist/lib/_virtual/plugin.mjs.map +1 -0
  47. package/dist/lib/_virtual/plugin2.mjs +2 -0
  48. package/dist/lib/_virtual/plugin2.mjs.map +1 -0
  49. package/dist/lib/_virtual/plugin3.mjs +2 -0
  50. package/dist/lib/_virtual/plugin3.mjs.map +1 -0
  51. package/dist/lib/_virtual/plugin4.mjs +2 -0
  52. package/dist/lib/_virtual/plugin4.mjs.map +1 -0
  53. package/dist/lib/_virtual/plugin5.mjs +2 -0
  54. package/dist/lib/_virtual/plugin5.mjs.map +1 -0
  55. package/dist/lib/_virtual/plugin6.mjs +2 -0
  56. package/dist/lib/_virtual/plugin6.mjs.map +1 -0
  57. package/dist/lib/_virtual/plugin7.mjs +2 -0
  58. package/dist/lib/_virtual/plugin7.mjs.map +1 -0
  59. package/dist/lib/_virtual/theme.mjs +2 -0
  60. package/dist/lib/_virtual/theme.mjs.map +1 -0
  61. package/dist/lib/_virtual/tinymce.mjs +2 -0
  62. package/dist/lib/_virtual/tinymce.mjs.map +1 -0
  63. package/dist/lib/_virtual/tinymce2.mjs +2 -0
  64. package/dist/lib/_virtual/tinymce2.mjs.map +1 -0
  65. package/dist/lib/components/Editor/index.d.ts +14 -0
  66. package/dist/lib/components/Editor/index.js +15 -1
  67. package/dist/lib/dist/lib/color/alpha.mjs.map +1 -0
  68. package/dist/lib/dist/lib/color/constants.mjs.map +1 -0
  69. package/dist/lib/dist/lib/color/light.mjs.map +1 -0
  70. package/dist/lib/dist/lib/components/AlertDialog/index.mjs.map +1 -0
  71. package/dist/lib/dist/lib/components/BarChart/index.mjs.map +1 -0
  72. package/dist/lib/dist/lib/components/Breadcrumb/BreadcrumbEllipsis.mjs.map +1 -0
  73. package/dist/lib/dist/lib/components/Breadcrumb/BreadcrumbItem.mjs.map +1 -0
  74. package/dist/lib/dist/lib/components/Breadcrumb/BreadcrumbLink.mjs.map +1 -0
  75. package/dist/lib/dist/lib/components/Breadcrumb/BreadcrumbList.mjs.map +1 -0
  76. package/dist/lib/dist/lib/components/Breadcrumb/BreadcrumbPage.mjs.map +1 -0
  77. package/dist/lib/dist/lib/components/Breadcrumb/BreadcrumbSeparator.mjs.map +1 -0
  78. package/dist/lib/dist/lib/components/Breadcrumb/index.mjs.map +1 -0
  79. package/dist/lib/dist/lib/components/BubbleChart/index.mjs.map +1 -0
  80. package/dist/lib/dist/lib/components/Callout/index.mjs.map +1 -0
  81. package/dist/lib/dist/lib/components/CheckboxGroup/index.mjs.map +1 -0
  82. package/dist/lib/dist/lib/components/ContextMenu/ContextMenuGroup.mjs.map +1 -0
  83. package/dist/lib/dist/lib/components/ContextMenu/ContextMenuSeparator.mjs.map +1 -0
  84. package/dist/lib/dist/lib/components/ContextMenu/ContextMenuTrigger.mjs.map +1 -0
  85. package/dist/lib/dist/lib/components/ContextMenu/index.mjs.map +1 -0
  86. package/dist/lib/dist/lib/components/DataList/index.mjs.map +1 -0
  87. package/dist/lib/dist/lib/components/Dialog/DialogTrigger.mjs.map +1 -0
  88. package/dist/lib/dist/lib/components/Dialog/index.mjs.map +1 -0
  89. package/dist/lib/dist/lib/components/DoughnutChart/index.mjs.map +1 -0
  90. package/dist/lib/dist/lib/components/DropdownMenu/DropdonMenuRadioGroup.mjs.map +1 -0
  91. package/dist/lib/dist/lib/components/DropdownMenu/DropdownMenuSeparator.mjs.map +1 -0
  92. package/dist/lib/dist/lib/components/DropdownMenu/DropdownMenuSub.mjs.map +1 -0
  93. package/dist/lib/dist/lib/components/DropdownMenu/index.mjs.map +1 -0
  94. package/dist/lib/dist/lib/components/Editor/index.mjs +3 -0
  95. package/dist/lib/dist/lib/components/Gnb/GnbLogo.mjs.map +1 -0
  96. package/dist/lib/dist/lib/components/Gnb/index.mjs.map +1 -0
  97. package/dist/lib/dist/lib/components/Grid/Pagination.mjs.map +1 -0
  98. package/dist/lib/dist/lib/components/HoverCard/HoverCardTrigger.mjs.map +1 -0
  99. package/dist/lib/dist/lib/components/HoverCard/index.mjs.map +1 -0
  100. package/dist/lib/dist/lib/components/LineChart/index.mjs.map +1 -0
  101. package/dist/lib/dist/lib/components/Menubar/MenubarMenu.mjs.map +1 -0
  102. package/dist/lib/dist/lib/components/Menubar/MenubarSeparator.mjs.map +1 -0
  103. package/dist/lib/dist/lib/components/Menubar/MenubarSub.mjs.map +1 -0
  104. package/dist/lib/dist/lib/components/Menubar/index.mjs.map +1 -0
  105. package/dist/lib/dist/lib/components/NavigationMenu/NavigationMenuIndicator.mjs.map +1 -0
  106. package/dist/lib/dist/lib/components/NavigationMenu/NavigationMenuItem.mjs.map +1 -0
  107. package/dist/lib/dist/lib/components/NavigationMenu/index.mjs.map +1 -0
  108. package/dist/lib/dist/lib/components/PieChart/index.mjs.map +1 -0
  109. package/dist/lib/dist/lib/components/Popover/PopoverTrigger.mjs.map +1 -0
  110. package/dist/lib/dist/lib/components/Popover/index.mjs.map +1 -0
  111. package/dist/lib/dist/lib/components/RadarChart/index.mjs.map +1 -0
  112. package/dist/lib/dist/lib/components/RadioCards/index.mjs.map +1 -0
  113. package/dist/lib/dist/lib/components/RadioGroup/index.mjs.map +1 -0
  114. package/dist/lib/dist/lib/components/SegmentedControl/SegmentedControlItem.mjs.map +1 -0
  115. package/dist/lib/dist/lib/components/SegmentedControl/index.mjs.map +1 -0
  116. package/dist/lib/dist/lib/components/Toast/index.mjs.map +1 -0
  117. package/dist/lib/dist/lib/components/ToggleGroup/index.mjs.map +1 -0
  118. package/dist/lib/dist/lib/constants.mjs.map +1 -0
  119. package/dist/lib/dist/lib/index.mjs.map +1 -0
  120. package/dist/lib/dist/lib/utils/utils.mjs.map +1 -0
  121. package/dist/lib/public/tinymce/icons/default/icons.mjs +2 -0
  122. package/dist/lib/public/tinymce/icons/default/icons.mjs.map +1 -0
  123. package/dist/lib/public/tinymce/icons/default/index.d.ts +1 -0
  124. package/dist/lib/public/tinymce/icons/default/index.mjs +2 -0
  125. package/dist/lib/public/tinymce/icons/default/index.mjs.map +1 -0
  126. package/dist/lib/public/tinymce/models/dom/index.d.ts +1 -0
  127. package/dist/lib/public/tinymce/models/dom/index.mjs +2 -0
  128. package/dist/lib/public/tinymce/models/dom/index.mjs.map +1 -0
  129. package/dist/lib/public/tinymce/models/dom/model.mjs +2 -0
  130. package/dist/lib/public/tinymce/models/dom/model.mjs.map +1 -0
  131. package/dist/lib/public/tinymce/plugins/advlist/index.d.ts +1 -0
  132. package/dist/lib/public/tinymce/plugins/advlist/index.mjs +2 -0
  133. package/dist/lib/public/tinymce/plugins/advlist/index.mjs.map +1 -0
  134. package/dist/lib/public/tinymce/plugins/advlist/plugin.mjs +2 -0
  135. package/dist/lib/public/tinymce/plugins/advlist/plugin.mjs.map +1 -0
  136. package/dist/lib/public/tinymce/plugins/code/index.d.ts +1 -0
  137. package/dist/lib/public/tinymce/plugins/code/index.mjs +2 -0
  138. package/dist/lib/public/tinymce/plugins/code/index.mjs.map +1 -0
  139. package/dist/lib/public/tinymce/plugins/code/plugin.mjs +2 -0
  140. package/dist/lib/public/tinymce/plugins/code/plugin.mjs.map +1 -0
  141. package/dist/lib/public/tinymce/plugins/codesample/index.d.ts +1 -0
  142. package/dist/lib/public/tinymce/plugins/codesample/index.mjs +2 -0
  143. package/dist/lib/public/tinymce/plugins/codesample/index.mjs.map +1 -0
  144. package/dist/lib/public/tinymce/plugins/codesample/plugin.d.ts +45 -0
  145. package/dist/lib/public/tinymce/plugins/codesample/plugin.mjs +2 -0
  146. package/dist/lib/public/tinymce/plugins/codesample/plugin.mjs.map +1 -0
  147. package/dist/lib/public/tinymce/plugins/image/index.d.ts +1 -0
  148. package/dist/lib/public/tinymce/plugins/image/index.mjs +2 -0
  149. package/dist/lib/public/tinymce/plugins/image/index.mjs.map +1 -0
  150. package/dist/lib/public/tinymce/plugins/image/plugin.mjs +2 -0
  151. package/dist/lib/public/tinymce/plugins/image/plugin.mjs.map +1 -0
  152. package/dist/lib/public/tinymce/plugins/link/index.d.ts +1 -0
  153. package/dist/lib/public/tinymce/plugins/link/index.mjs +2 -0
  154. package/dist/lib/public/tinymce/plugins/link/index.mjs.map +1 -0
  155. package/dist/lib/public/tinymce/plugins/link/plugin.mjs +2 -0
  156. package/dist/lib/public/tinymce/plugins/link/plugin.mjs.map +1 -0
  157. package/dist/lib/public/tinymce/plugins/lists/index.d.ts +1 -0
  158. package/dist/lib/public/tinymce/plugins/lists/index.mjs +2 -0
  159. package/dist/lib/public/tinymce/plugins/lists/index.mjs.map +1 -0
  160. package/dist/lib/public/tinymce/plugins/lists/plugin.mjs +2 -0
  161. package/dist/lib/public/tinymce/plugins/lists/plugin.mjs.map +1 -0
  162. package/dist/lib/public/tinymce/plugins/table/index.d.ts +1 -0
  163. package/dist/lib/public/tinymce/plugins/table/index.mjs +2 -0
  164. package/dist/lib/public/tinymce/plugins/table/index.mjs.map +1 -0
  165. package/dist/lib/public/tinymce/plugins/table/plugin.mjs +2 -0
  166. package/dist/lib/public/tinymce/plugins/table/plugin.mjs.map +1 -0
  167. package/dist/lib/public/tinymce/skins/content/default/content.mjs +2 -0
  168. package/dist/lib/public/tinymce/skins/content/default/content.mjs.map +1 -0
  169. package/dist/lib/public/tinymce/skins/ui/oxide/content.mjs +2 -0
  170. package/dist/lib/public/tinymce/skins/ui/oxide/content.mjs.map +1 -0
  171. package/dist/lib/public/tinymce/skins/ui/oxide/skin.mjs +2 -0
  172. package/dist/lib/public/tinymce/skins/ui/oxide/skin.mjs.map +1 -0
  173. package/dist/lib/public/tinymce/themes/silver/index.d.ts +1 -0
  174. package/dist/lib/public/tinymce/themes/silver/index.mjs +2 -0
  175. package/dist/lib/public/tinymce/themes/silver/index.mjs.map +1 -0
  176. package/dist/lib/public/tinymce/themes/silver/theme.mjs +2 -0
  177. package/dist/lib/public/tinymce/themes/silver/theme.mjs.map +1 -0
  178. package/dist/lib/public/tinymce/tinymce.mjs +2 -0
  179. package/dist/lib/public/tinymce/tinymce.mjs.map +1 -0
  180. package/dist/lib/tsconfig.tsbuildinfo +1 -1
  181. package/dist/public/tinymce/icons/default/icons.d.ts +0 -0
  182. package/dist/public/tinymce/icons/default/icons.js +195 -0
  183. package/dist/public/tinymce/icons/default/index.d.ts +1 -0
  184. package/dist/public/tinymce/icons/default/index.js +8 -0
  185. package/dist/public/tinymce/models/dom/index.d.ts +1 -0
  186. package/dist/public/tinymce/models/dom/index.js +8 -0
  187. package/dist/public/tinymce/models/dom/model.d.ts +0 -0
  188. package/dist/public/tinymce/models/dom/model.js +7988 -0
  189. package/dist/public/tinymce/plugins/advlist/index.d.ts +1 -0
  190. package/dist/public/tinymce/plugins/advlist/index.js +8 -0
  191. package/dist/public/tinymce/plugins/advlist/plugin.d.ts +0 -0
  192. package/dist/public/tinymce/plugins/advlist/plugin.js +255 -0
  193. package/dist/public/tinymce/plugins/code/index.d.ts +1 -0
  194. package/dist/public/tinymce/plugins/code/index.js +8 -0
  195. package/dist/public/tinymce/plugins/code/plugin.d.ts +0 -0
  196. package/dist/public/tinymce/plugins/code/plugin.js +77 -0
  197. package/dist/public/tinymce/plugins/codesample/index.d.ts +1 -0
  198. package/dist/public/tinymce/plugins/codesample/index.js +8 -0
  199. package/dist/public/tinymce/plugins/codesample/plugin.d.ts +45 -0
  200. package/dist/public/tinymce/plugins/codesample/plugin.js +2462 -0
  201. package/dist/public/tinymce/plugins/image/index.d.ts +1 -0
  202. package/dist/public/tinymce/plugins/image/index.js +8 -0
  203. package/dist/public/tinymce/plugins/image/plugin.d.ts +0 -0
  204. package/dist/public/tinymce/plugins/image/plugin.js +1523 -0
  205. package/dist/public/tinymce/plugins/link/index.d.ts +1 -0
  206. package/dist/public/tinymce/plugins/link/index.js +8 -0
  207. package/dist/public/tinymce/plugins/link/plugin.d.ts +0 -0
  208. package/dist/public/tinymce/plugins/link/plugin.js +1246 -0
  209. package/dist/public/tinymce/plugins/lists/index.d.ts +1 -0
  210. package/dist/public/tinymce/plugins/lists/index.js +8 -0
  211. package/dist/public/tinymce/plugins/lists/plugin.d.ts +0 -0
  212. package/dist/public/tinymce/plugins/lists/plugin.js +2191 -0
  213. package/dist/public/tinymce/plugins/table/index.d.ts +1 -0
  214. package/dist/public/tinymce/plugins/table/index.js +8 -0
  215. package/dist/public/tinymce/plugins/table/plugin.d.ts +0 -0
  216. package/dist/public/tinymce/plugins/table/plugin.js +3399 -0
  217. package/dist/public/tinymce/skins/content/default/content.d.ts +0 -0
  218. package/dist/public/tinymce/skins/content/default/content.js +3 -0
  219. package/dist/public/tinymce/skins/ui/oxide/content.d.ts +0 -0
  220. package/dist/public/tinymce/skins/ui/oxide/content.js +3 -0
  221. package/dist/public/tinymce/skins/ui/oxide/skin.d.ts +0 -0
  222. package/dist/public/tinymce/skins/ui/oxide/skin.js +3 -0
  223. package/dist/public/tinymce/themes/silver/index.d.ts +1 -0
  224. package/dist/public/tinymce/themes/silver/index.js +8 -0
  225. package/dist/public/tinymce/themes/silver/theme.d.ts +0 -0
  226. package/dist/public/tinymce/themes/silver/theme.js +29731 -0
  227. package/dist/tsconfig.tsbuildinfo +1 -1
  228. package/package.json +1 -1
  229. package/dist/lib/color/alpha.mjs.map +0 -1
  230. package/dist/lib/color/constants.mjs.map +0 -1
  231. package/dist/lib/color/light.mjs.map +0 -1
  232. package/dist/lib/components/AlertDialog/index.mjs.map +0 -1
  233. package/dist/lib/components/BarChart/index.mjs.map +0 -1
  234. package/dist/lib/components/Breadcrumb/BreadcrumbEllipsis.mjs.map +0 -1
  235. package/dist/lib/components/Breadcrumb/BreadcrumbItem.mjs.map +0 -1
  236. package/dist/lib/components/Breadcrumb/BreadcrumbLink.mjs.map +0 -1
  237. package/dist/lib/components/Breadcrumb/BreadcrumbList.mjs.map +0 -1
  238. package/dist/lib/components/Breadcrumb/BreadcrumbPage.mjs.map +0 -1
  239. package/dist/lib/components/Breadcrumb/BreadcrumbSeparator.mjs.map +0 -1
  240. package/dist/lib/components/Breadcrumb/index.mjs.map +0 -1
  241. package/dist/lib/components/BubbleChart/index.mjs.map +0 -1
  242. package/dist/lib/components/Callout/index.mjs.map +0 -1
  243. package/dist/lib/components/CheckboxGroup/index.mjs.map +0 -1
  244. package/dist/lib/components/ContextMenu/ContextMenuGroup.mjs.map +0 -1
  245. package/dist/lib/components/ContextMenu/ContextMenuSeparator.mjs.map +0 -1
  246. package/dist/lib/components/ContextMenu/ContextMenuTrigger.mjs.map +0 -1
  247. package/dist/lib/components/ContextMenu/index.mjs.map +0 -1
  248. package/dist/lib/components/DataList/index.mjs.map +0 -1
  249. package/dist/lib/components/Dialog/DialogTrigger.mjs.map +0 -1
  250. package/dist/lib/components/Dialog/index.mjs.map +0 -1
  251. package/dist/lib/components/DoughnutChart/index.mjs.map +0 -1
  252. package/dist/lib/components/DropdownMenu/DropdonMenuRadioGroup.mjs.map +0 -1
  253. package/dist/lib/components/DropdownMenu/DropdownMenuSeparator.mjs.map +0 -1
  254. package/dist/lib/components/DropdownMenu/DropdownMenuSub.mjs.map +0 -1
  255. package/dist/lib/components/DropdownMenu/index.mjs.map +0 -1
  256. package/dist/lib/components/Editor/index.mjs +0 -3
  257. package/dist/lib/components/Gnb/GnbLogo.mjs.map +0 -1
  258. package/dist/lib/components/Gnb/index.mjs.map +0 -1
  259. package/dist/lib/components/Grid/Pagination.mjs.map +0 -1
  260. package/dist/lib/components/HoverCard/HoverCardTrigger.mjs.map +0 -1
  261. package/dist/lib/components/HoverCard/index.mjs.map +0 -1
  262. package/dist/lib/components/LineChart/index.mjs.map +0 -1
  263. package/dist/lib/components/Menubar/MenubarMenu.mjs.map +0 -1
  264. package/dist/lib/components/Menubar/MenubarSeparator.mjs.map +0 -1
  265. package/dist/lib/components/Menubar/MenubarSub.mjs.map +0 -1
  266. package/dist/lib/components/Menubar/index.mjs.map +0 -1
  267. package/dist/lib/components/NavigationMenu/NavigationMenuIndicator.mjs.map +0 -1
  268. package/dist/lib/components/NavigationMenu/NavigationMenuItem.mjs.map +0 -1
  269. package/dist/lib/components/NavigationMenu/index.mjs.map +0 -1
  270. package/dist/lib/components/PieChart/index.mjs.map +0 -1
  271. package/dist/lib/components/Popover/PopoverTrigger.mjs.map +0 -1
  272. package/dist/lib/components/Popover/index.mjs.map +0 -1
  273. package/dist/lib/components/RadarChart/index.mjs.map +0 -1
  274. package/dist/lib/components/RadioCards/index.mjs.map +0 -1
  275. package/dist/lib/components/RadioGroup/index.mjs.map +0 -1
  276. package/dist/lib/components/SegmentedControl/SegmentedControlItem.mjs.map +0 -1
  277. package/dist/lib/components/SegmentedControl/index.mjs.map +0 -1
  278. package/dist/lib/components/Toast/index.mjs.map +0 -1
  279. package/dist/lib/components/ToggleGroup/index.mjs.map +0 -1
  280. package/dist/lib/constants.mjs.map +0 -1
  281. package/dist/lib/utils/utils.mjs.map +0 -1
  282. /package/dist/lib/{index.mjs.map → _virtual/index.mjs.map} +0 -0
  283. /package/dist/lib/{Typography → dist/lib/Typography}/Header/index.mjs +0 -0
  284. /package/dist/lib/{Typography → dist/lib/Typography}/Header/index.mjs.map +0 -0
  285. /package/dist/lib/{Typography → dist/lib/Typography}/Text/index.mjs +0 -0
  286. /package/dist/lib/{Typography → dist/lib/Typography}/Text/index.mjs.map +0 -0
  287. /package/dist/lib/{color → dist/lib/color}/alpha.mjs +0 -0
  288. /package/dist/lib/{color → dist/lib/color}/constants.mjs +0 -0
  289. /package/dist/lib/{color → dist/lib/color}/light.mjs +0 -0
  290. /package/dist/lib/{components → dist/lib/components}/Accordion/index.mjs +0 -0
  291. /package/dist/lib/{components → dist/lib/components}/Accordion/index.mjs.map +0 -0
  292. /package/dist/lib/{components → dist/lib/components}/AlertDialog/AlertDialogAction.mjs +0 -0
  293. /package/dist/lib/{components → dist/lib/components}/AlertDialog/AlertDialogAction.mjs.map +0 -0
  294. /package/dist/lib/{components → dist/lib/components}/AlertDialog/AlertDialogCancel.mjs +0 -0
  295. /package/dist/lib/{components → dist/lib/components}/AlertDialog/AlertDialogCancel.mjs.map +0 -0
  296. /package/dist/lib/{components → dist/lib/components}/AlertDialog/AlertDialogContent.mjs +0 -0
  297. /package/dist/lib/{components → dist/lib/components}/AlertDialog/AlertDialogContent.mjs.map +0 -0
  298. /package/dist/lib/{components → dist/lib/components}/AlertDialog/AlertDialogDescription.mjs +0 -0
  299. /package/dist/lib/{components → dist/lib/components}/AlertDialog/AlertDialogDescription.mjs.map +0 -0
  300. /package/dist/lib/{components → dist/lib/components}/AlertDialog/AlertDialogRoot.mjs +0 -0
  301. /package/dist/lib/{components → dist/lib/components}/AlertDialog/AlertDialogRoot.mjs.map +0 -0
  302. /package/dist/lib/{components → dist/lib/components}/AlertDialog/AlertDialogTitle.mjs +0 -0
  303. /package/dist/lib/{components → dist/lib/components}/AlertDialog/AlertDialogTitle.mjs.map +0 -0
  304. /package/dist/lib/{components → dist/lib/components}/AlertDialog/AlertDialogTrigger.mjs +0 -0
  305. /package/dist/lib/{components → dist/lib/components}/AlertDialog/AlertDialogTrigger.mjs.map +0 -0
  306. /package/dist/lib/{components → dist/lib/components}/AlertDialog/index.mjs +0 -0
  307. /package/dist/lib/{components → dist/lib/components}/AspectRatio/index.mjs +0 -0
  308. /package/dist/lib/{components → dist/lib/components}/AspectRatio/index.mjs.map +0 -0
  309. /package/dist/lib/{components → dist/lib/components}/Avatar/index.mjs +0 -0
  310. /package/dist/lib/{components → dist/lib/components}/Avatar/index.mjs.map +0 -0
  311. /package/dist/lib/{components → dist/lib/components}/Badge/index.mjs +0 -0
  312. /package/dist/lib/{components → dist/lib/components}/Badge/index.mjs.map +0 -0
  313. /package/dist/lib/{components → dist/lib/components}/BarChart/index.mjs +0 -0
  314. /package/dist/lib/{components → dist/lib/components}/Breadcrumb/BreadcrumbEllipsis.mjs +0 -0
  315. /package/dist/lib/{components → dist/lib/components}/Breadcrumb/BreadcrumbItem.mjs +0 -0
  316. /package/dist/lib/{components → dist/lib/components}/Breadcrumb/BreadcrumbLink.mjs +0 -0
  317. /package/dist/lib/{components → dist/lib/components}/Breadcrumb/BreadcrumbList.mjs +0 -0
  318. /package/dist/lib/{components → dist/lib/components}/Breadcrumb/BreadcrumbPage.mjs +0 -0
  319. /package/dist/lib/{components → dist/lib/components}/Breadcrumb/BreadcrumbRoot.mjs +0 -0
  320. /package/dist/lib/{components → dist/lib/components}/Breadcrumb/BreadcrumbRoot.mjs.map +0 -0
  321. /package/dist/lib/{components → dist/lib/components}/Breadcrumb/BreadcrumbSeparator.mjs +0 -0
  322. /package/dist/lib/{components → dist/lib/components}/Breadcrumb/index.mjs +0 -0
  323. /package/dist/lib/{components → dist/lib/components}/BubbleChart/index.mjs +0 -0
  324. /package/dist/lib/{components → dist/lib/components}/Button/index.mjs +0 -0
  325. /package/dist/lib/{components → dist/lib/components}/Button/index.mjs.map +0 -0
  326. /package/dist/lib/{components → dist/lib/components}/Callout/CalloutIcon.mjs +0 -0
  327. /package/dist/lib/{components → dist/lib/components}/Callout/CalloutIcon.mjs.map +0 -0
  328. /package/dist/lib/{components → dist/lib/components}/Callout/CalloutRoot.mjs +0 -0
  329. /package/dist/lib/{components → dist/lib/components}/Callout/CalloutRoot.mjs.map +0 -0
  330. /package/dist/lib/{components → dist/lib/components}/Callout/CalloutText.mjs +0 -0
  331. /package/dist/lib/{components → dist/lib/components}/Callout/CalloutText.mjs.map +0 -0
  332. /package/dist/lib/{components → dist/lib/components}/Callout/index.mjs +0 -0
  333. /package/dist/lib/{components → dist/lib/components}/Card/index.mjs +0 -0
  334. /package/dist/lib/{components → dist/lib/components}/Card/index.mjs.map +0 -0
  335. /package/dist/lib/{components → dist/lib/components}/Checkbox/index.mjs +0 -0
  336. /package/dist/lib/{components → dist/lib/components}/Checkbox/index.mjs.map +0 -0
  337. /package/dist/lib/{components → dist/lib/components}/CheckboxCard/index.mjs +0 -0
  338. /package/dist/lib/{components → dist/lib/components}/CheckboxCard/index.mjs.map +0 -0
  339. /package/dist/lib/{components → dist/lib/components}/CheckboxGroup/CheckboxGroupItem.mjs +0 -0
  340. /package/dist/lib/{components → dist/lib/components}/CheckboxGroup/CheckboxGroupItem.mjs.map +0 -0
  341. /package/dist/lib/{components → dist/lib/components}/CheckboxGroup/CheckboxGroupRoot.mjs +0 -0
  342. /package/dist/lib/{components → dist/lib/components}/CheckboxGroup/CheckboxGroupRoot.mjs.map +0 -0
  343. /package/dist/lib/{components → dist/lib/components}/CheckboxGroup/index.mjs +0 -0
  344. /package/dist/lib/{components → dist/lib/components}/Collapsible/index.mjs +0 -0
  345. /package/dist/lib/{components → dist/lib/components}/Collapsible/index.mjs.map +0 -0
  346. /package/dist/lib/{components → dist/lib/components}/ContextMenu/ContextMenuCheckboxItem.mjs +0 -0
  347. /package/dist/lib/{components → dist/lib/components}/ContextMenu/ContextMenuCheckboxItem.mjs.map +0 -0
  348. /package/dist/lib/{components → dist/lib/components}/ContextMenu/ContextMenuContent.mjs +0 -0
  349. /package/dist/lib/{components → dist/lib/components}/ContextMenu/ContextMenuContent.mjs.map +0 -0
  350. /package/dist/lib/{components → dist/lib/components}/ContextMenu/ContextMenuGroup.mjs +0 -0
  351. /package/dist/lib/{components → dist/lib/components}/ContextMenu/ContextMenuItem.mjs +0 -0
  352. /package/dist/lib/{components → dist/lib/components}/ContextMenu/ContextMenuItem.mjs.map +0 -0
  353. /package/dist/lib/{components → dist/lib/components}/ContextMenu/ContextMenuItemIndicator.mjs +0 -0
  354. /package/dist/lib/{components → dist/lib/components}/ContextMenu/ContextMenuItemIndicator.mjs.map +0 -0
  355. /package/dist/lib/{components → dist/lib/components}/ContextMenu/ContextMenuLabel.mjs +0 -0
  356. /package/dist/lib/{components → dist/lib/components}/ContextMenu/ContextMenuLabel.mjs.map +0 -0
  357. /package/dist/lib/{components → dist/lib/components}/ContextMenu/ContextMenuRadioGroup.mjs +0 -0
  358. /package/dist/lib/{components → dist/lib/components}/ContextMenu/ContextMenuRadioGroup.mjs.map +0 -0
  359. /package/dist/lib/{components → dist/lib/components}/ContextMenu/ContextMenuRadioItem.mjs +0 -0
  360. /package/dist/lib/{components → dist/lib/components}/ContextMenu/ContextMenuRadioItem.mjs.map +0 -0
  361. /package/dist/lib/{components → dist/lib/components}/ContextMenu/ContextMenuRoot.mjs +0 -0
  362. /package/dist/lib/{components → dist/lib/components}/ContextMenu/ContextMenuRoot.mjs.map +0 -0
  363. /package/dist/lib/{components → dist/lib/components}/ContextMenu/ContextMenuSeparator.mjs +0 -0
  364. /package/dist/lib/{components → dist/lib/components}/ContextMenu/ContextMenuSubContent.mjs +0 -0
  365. /package/dist/lib/{components → dist/lib/components}/ContextMenu/ContextMenuSubContent.mjs.map +0 -0
  366. /package/dist/lib/{components → dist/lib/components}/ContextMenu/ContextMenuSubTrigger.mjs +0 -0
  367. /package/dist/lib/{components → dist/lib/components}/ContextMenu/ContextMenuSubTrigger.mjs.map +0 -0
  368. /package/dist/lib/{components → dist/lib/components}/ContextMenu/ContextMenuTrigger.mjs +0 -0
  369. /package/dist/lib/{components → dist/lib/components}/ContextMenu/index.mjs +0 -0
  370. /package/dist/lib/{components → dist/lib/components}/DataList/DataListItem.mjs +0 -0
  371. /package/dist/lib/{components → dist/lib/components}/DataList/DataListItem.mjs.map +0 -0
  372. /package/dist/lib/{components → dist/lib/components}/DataList/DataListLabel.mjs +0 -0
  373. /package/dist/lib/{components → dist/lib/components}/DataList/DataListLabel.mjs.map +0 -0
  374. /package/dist/lib/{components → dist/lib/components}/DataList/DataListRoot.mjs +0 -0
  375. /package/dist/lib/{components → dist/lib/components}/DataList/DataListRoot.mjs.map +0 -0
  376. /package/dist/lib/{components → dist/lib/components}/DataList/DataListValue.mjs +0 -0
  377. /package/dist/lib/{components → dist/lib/components}/DataList/DataListValue.mjs.map +0 -0
  378. /package/dist/lib/{components → dist/lib/components}/DataList/index.mjs +0 -0
  379. /package/dist/lib/{components → dist/lib/components}/Dialog/DialogAction.mjs +0 -0
  380. /package/dist/lib/{components → dist/lib/components}/Dialog/DialogAction.mjs.map +0 -0
  381. /package/dist/lib/{components → dist/lib/components}/Dialog/DialogCancel.mjs +0 -0
  382. /package/dist/lib/{components → dist/lib/components}/Dialog/DialogCancel.mjs.map +0 -0
  383. /package/dist/lib/{components → dist/lib/components}/Dialog/DialogContent.mjs +0 -0
  384. /package/dist/lib/{components → dist/lib/components}/Dialog/DialogContent.mjs.map +0 -0
  385. /package/dist/lib/{components → dist/lib/components}/Dialog/DialogDescription.mjs +0 -0
  386. /package/dist/lib/{components → dist/lib/components}/Dialog/DialogDescription.mjs.map +0 -0
  387. /package/dist/lib/{components → dist/lib/components}/Dialog/DialogRoot.mjs +0 -0
  388. /package/dist/lib/{components → dist/lib/components}/Dialog/DialogRoot.mjs.map +0 -0
  389. /package/dist/lib/{components → dist/lib/components}/Dialog/DialogSlot.mjs +0 -0
  390. /package/dist/lib/{components → dist/lib/components}/Dialog/DialogSlot.mjs.map +0 -0
  391. /package/dist/lib/{components → dist/lib/components}/Dialog/DialogTitle.mjs +0 -0
  392. /package/dist/lib/{components → dist/lib/components}/Dialog/DialogTitle.mjs.map +0 -0
  393. /package/dist/lib/{components → dist/lib/components}/Dialog/DialogTrigger.mjs +0 -0
  394. /package/dist/lib/{components → dist/lib/components}/Dialog/index.mjs +0 -0
  395. /package/dist/lib/{components → dist/lib/components}/DoughnutChart/index.mjs +0 -0
  396. /package/dist/lib/{components → dist/lib/components}/DropdownMenu/DropdonMenuRadioGroup.mjs +0 -0
  397. /package/dist/lib/{components → dist/lib/components}/DropdownMenu/DropdonMenuSubContent.mjs +0 -0
  398. /package/dist/lib/{components → dist/lib/components}/DropdownMenu/DropdonMenuSubContent.mjs.map +0 -0
  399. /package/dist/lib/{components → dist/lib/components}/DropdownMenu/DropdownMenuCheckboxItem.mjs +0 -0
  400. /package/dist/lib/{components → dist/lib/components}/DropdownMenu/DropdownMenuCheckboxItem.mjs.map +0 -0
  401. /package/dist/lib/{components → dist/lib/components}/DropdownMenu/DropdownMenuContent.mjs +0 -0
  402. /package/dist/lib/{components → dist/lib/components}/DropdownMenu/DropdownMenuContent.mjs.map +0 -0
  403. /package/dist/lib/{components → dist/lib/components}/DropdownMenu/DropdownMenuItem.mjs +0 -0
  404. /package/dist/lib/{components → dist/lib/components}/DropdownMenu/DropdownMenuItem.mjs.map +0 -0
  405. /package/dist/lib/{components → dist/lib/components}/DropdownMenu/DropdownMenuItemIndicator.mjs +0 -0
  406. /package/dist/lib/{components → dist/lib/components}/DropdownMenu/DropdownMenuItemIndicator.mjs.map +0 -0
  407. /package/dist/lib/{components → dist/lib/components}/DropdownMenu/DropdownMenuLable.mjs +0 -0
  408. /package/dist/lib/{components → dist/lib/components}/DropdownMenu/DropdownMenuLable.mjs.map +0 -0
  409. /package/dist/lib/{components → dist/lib/components}/DropdownMenu/DropdownMenuRadioItem.mjs +0 -0
  410. /package/dist/lib/{components → dist/lib/components}/DropdownMenu/DropdownMenuRadioItem.mjs.map +0 -0
  411. /package/dist/lib/{components → dist/lib/components}/DropdownMenu/DropdownMenuRoot.mjs +0 -0
  412. /package/dist/lib/{components → dist/lib/components}/DropdownMenu/DropdownMenuRoot.mjs.map +0 -0
  413. /package/dist/lib/{components → dist/lib/components}/DropdownMenu/DropdownMenuSeparator.mjs +0 -0
  414. /package/dist/lib/{components → dist/lib/components}/DropdownMenu/DropdownMenuSub.mjs +0 -0
  415. /package/dist/lib/{components → dist/lib/components}/DropdownMenu/DropdownMenuSubTrigger.mjs +0 -0
  416. /package/dist/lib/{components → dist/lib/components}/DropdownMenu/DropdownMenuSubTrigger.mjs.map +0 -0
  417. /package/dist/lib/{components → dist/lib/components}/DropdownMenu/DropdownMenuTrigger.mjs +0 -0
  418. /package/dist/lib/{components → dist/lib/components}/DropdownMenu/DropdownMenuTrigger.mjs.map +0 -0
  419. /package/dist/lib/{components → dist/lib/components}/DropdownMenu/index.mjs +0 -0
  420. /package/dist/lib/{components → dist/lib/components}/Editor/index.mjs.map +0 -0
  421. /package/dist/lib/{components → dist/lib/components}/Footer/index.mjs +0 -0
  422. /package/dist/lib/{components → dist/lib/components}/Footer/index.mjs.map +0 -0
  423. /package/dist/lib/{components → dist/lib/components}/Gnb/GnbInfo.mjs +0 -0
  424. /package/dist/lib/{components → dist/lib/components}/Gnb/GnbInfo.mjs.map +0 -0
  425. /package/dist/lib/{components → dist/lib/components}/Gnb/GnbLogo.mjs +0 -0
  426. /package/dist/lib/{components → dist/lib/components}/Gnb/GnbMenu.mjs +0 -0
  427. /package/dist/lib/{components → dist/lib/components}/Gnb/GnbMenu.mjs.map +0 -0
  428. /package/dist/lib/{components → dist/lib/components}/Gnb/GnbRoot.mjs +0 -0
  429. /package/dist/lib/{components → dist/lib/components}/Gnb/GnbRoot.mjs.map +0 -0
  430. /package/dist/lib/{components → dist/lib/components}/Gnb/index.mjs +0 -0
  431. /package/dist/lib/{components → dist/lib/components}/Grid/Pagination.mjs +0 -0
  432. /package/dist/lib/{components → dist/lib/components}/Grid/index.mjs +0 -0
  433. /package/dist/lib/{components → dist/lib/components}/Grid/index.mjs.map +0 -0
  434. /package/dist/lib/{components → dist/lib/components}/Grid/useGrid.mjs +0 -0
  435. /package/dist/lib/{components → dist/lib/components}/Grid/useGrid.mjs.map +0 -0
  436. /package/dist/lib/{components → dist/lib/components}/HoverCard/HoverCardContent.mjs +0 -0
  437. /package/dist/lib/{components → dist/lib/components}/HoverCard/HoverCardContent.mjs.map +0 -0
  438. /package/dist/lib/{components → dist/lib/components}/HoverCard/HoverCardRoot.mjs +0 -0
  439. /package/dist/lib/{components → dist/lib/components}/HoverCard/HoverCardRoot.mjs.map +0 -0
  440. /package/dist/lib/{components → dist/lib/components}/HoverCard/HoverCardTrigger.mjs +0 -0
  441. /package/dist/lib/{components → dist/lib/components}/HoverCard/index.mjs +0 -0
  442. /package/dist/lib/{components → dist/lib/components}/IconButton/index.mjs +0 -0
  443. /package/dist/lib/{components → dist/lib/components}/IconButton/index.mjs.map +0 -0
  444. /package/dist/lib/{components → dist/lib/components}/Inset/index.mjs +0 -0
  445. /package/dist/lib/{components → dist/lib/components}/Inset/index.mjs.map +0 -0
  446. /package/dist/lib/{components → dist/lib/components}/Label/index.mjs +0 -0
  447. /package/dist/lib/{components → dist/lib/components}/Label/index.mjs.map +0 -0
  448. /package/dist/lib/{components → dist/lib/components}/LineChart/index.mjs +0 -0
  449. /package/dist/lib/{components → dist/lib/components}/Menubar/MenubarCheckboxItem.mjs +0 -0
  450. /package/dist/lib/{components → dist/lib/components}/Menubar/MenubarCheckboxItem.mjs.map +0 -0
  451. /package/dist/lib/{components → dist/lib/components}/Menubar/MenubarContent.mjs +0 -0
  452. /package/dist/lib/{components → dist/lib/components}/Menubar/MenubarContent.mjs.map +0 -0
  453. /package/dist/lib/{components → dist/lib/components}/Menubar/MenubarItem.mjs +0 -0
  454. /package/dist/lib/{components → dist/lib/components}/Menubar/MenubarItem.mjs.map +0 -0
  455. /package/dist/lib/{components → dist/lib/components}/Menubar/MenubarItemIndicator.mjs +0 -0
  456. /package/dist/lib/{components → dist/lib/components}/Menubar/MenubarItemIndicator.mjs.map +0 -0
  457. /package/dist/lib/{components → dist/lib/components}/Menubar/MenubarMenu.mjs +0 -0
  458. /package/dist/lib/{components → dist/lib/components}/Menubar/MenubarRadioGroup.mjs +0 -0
  459. /package/dist/lib/{components → dist/lib/components}/Menubar/MenubarRadioGroup.mjs.map +0 -0
  460. /package/dist/lib/{components → dist/lib/components}/Menubar/MenubarRadioItem.mjs +0 -0
  461. /package/dist/lib/{components → dist/lib/components}/Menubar/MenubarRadioItem.mjs.map +0 -0
  462. /package/dist/lib/{components → dist/lib/components}/Menubar/MenubarRoot.mjs +0 -0
  463. /package/dist/lib/{components → dist/lib/components}/Menubar/MenubarRoot.mjs.map +0 -0
  464. /package/dist/lib/{components → dist/lib/components}/Menubar/MenubarSeparator.mjs +0 -0
  465. /package/dist/lib/{components → dist/lib/components}/Menubar/MenubarSub.mjs +0 -0
  466. /package/dist/lib/{components → dist/lib/components}/Menubar/MenubarSubContent.mjs +0 -0
  467. /package/dist/lib/{components → dist/lib/components}/Menubar/MenubarSubContent.mjs.map +0 -0
  468. /package/dist/lib/{components → dist/lib/components}/Menubar/MenubarSubTrigger.mjs +0 -0
  469. /package/dist/lib/{components → dist/lib/components}/Menubar/MenubarSubTrigger.mjs.map +0 -0
  470. /package/dist/lib/{components → dist/lib/components}/Menubar/MenubarTrigger.mjs +0 -0
  471. /package/dist/lib/{components → dist/lib/components}/Menubar/MenubarTrigger.mjs.map +0 -0
  472. /package/dist/lib/{components → dist/lib/components}/Menubar/index.mjs +0 -0
  473. /package/dist/lib/{components → dist/lib/components}/NavigationMenu/NavigationMenuContent.mjs +0 -0
  474. /package/dist/lib/{components → dist/lib/components}/NavigationMenu/NavigationMenuContent.mjs.map +0 -0
  475. /package/dist/lib/{components → dist/lib/components}/NavigationMenu/NavigationMenuIndicator.mjs +0 -0
  476. /package/dist/lib/{components → dist/lib/components}/NavigationMenu/NavigationMenuItem.mjs +0 -0
  477. /package/dist/lib/{components → dist/lib/components}/NavigationMenu/NavigationMenuLink.mjs +0 -0
  478. /package/dist/lib/{components → dist/lib/components}/NavigationMenu/NavigationMenuLink.mjs.map +0 -0
  479. /package/dist/lib/{components → dist/lib/components}/NavigationMenu/NavigationMenuList.mjs +0 -0
  480. /package/dist/lib/{components → dist/lib/components}/NavigationMenu/NavigationMenuList.mjs.map +0 -0
  481. /package/dist/lib/{components → dist/lib/components}/NavigationMenu/NavigationMenuRoot.mjs +0 -0
  482. /package/dist/lib/{components → dist/lib/components}/NavigationMenu/NavigationMenuRoot.mjs.map +0 -0
  483. /package/dist/lib/{components → dist/lib/components}/NavigationMenu/NavigationMenuTrigger.mjs +0 -0
  484. /package/dist/lib/{components → dist/lib/components}/NavigationMenu/NavigationMenuTrigger.mjs.map +0 -0
  485. /package/dist/lib/{components → dist/lib/components}/NavigationMenu/NavigationMenuViewport.mjs +0 -0
  486. /package/dist/lib/{components → dist/lib/components}/NavigationMenu/NavigationMenuViewport.mjs.map +0 -0
  487. /package/dist/lib/{components → dist/lib/components}/NavigationMenu/index.mjs +0 -0
  488. /package/dist/lib/{components → dist/lib/components}/PieChart/index.mjs +0 -0
  489. /package/dist/lib/{components → dist/lib/components}/Popover/PopoverClose.mjs +0 -0
  490. /package/dist/lib/{components → dist/lib/components}/Popover/PopoverClose.mjs.map +0 -0
  491. /package/dist/lib/{components → dist/lib/components}/Popover/PopoverContent.mjs +0 -0
  492. /package/dist/lib/{components → dist/lib/components}/Popover/PopoverContent.mjs.map +0 -0
  493. /package/dist/lib/{components → dist/lib/components}/Popover/PopoverRoot.mjs +0 -0
  494. /package/dist/lib/{components → dist/lib/components}/Popover/PopoverRoot.mjs.map +0 -0
  495. /package/dist/lib/{components → dist/lib/components}/Popover/PopoverTrigger.mjs +0 -0
  496. /package/dist/lib/{components → dist/lib/components}/Popover/index.mjs +0 -0
  497. /package/dist/lib/{components → dist/lib/components}/Progress/index.mjs +0 -0
  498. /package/dist/lib/{components → dist/lib/components}/Progress/index.mjs.map +0 -0
  499. /package/dist/lib/{components → dist/lib/components}/RadarChart/index.mjs +0 -0
  500. /package/dist/lib/{components → dist/lib/components}/Radio/index.mjs +0 -0
  501. /package/dist/lib/{components → dist/lib/components}/Radio/index.mjs.map +0 -0
  502. /package/dist/lib/{components → dist/lib/components}/RadioCards/RadioCardsItem.mjs +0 -0
  503. /package/dist/lib/{components → dist/lib/components}/RadioCards/RadioCardsItem.mjs.map +0 -0
  504. /package/dist/lib/{components → dist/lib/components}/RadioCards/RadioCardsRoot.mjs +0 -0
  505. /package/dist/lib/{components → dist/lib/components}/RadioCards/RadioCardsRoot.mjs.map +0 -0
  506. /package/dist/lib/{components → dist/lib/components}/RadioCards/index.mjs +0 -0
  507. /package/dist/lib/{components → dist/lib/components}/RadioGroup/RadioGroupItem.mjs +0 -0
  508. /package/dist/lib/{components → dist/lib/components}/RadioGroup/RadioGroupItem.mjs.map +0 -0
  509. /package/dist/lib/{components → dist/lib/components}/RadioGroup/RadioGroupRoot.mjs +0 -0
  510. /package/dist/lib/{components → dist/lib/components}/RadioGroup/RadioGroupRoot.mjs.map +0 -0
  511. /package/dist/lib/{components → dist/lib/components}/RadioGroup/index.mjs +0 -0
  512. /package/dist/lib/{components → dist/lib/components}/ScrollArea/index.mjs +0 -0
  513. /package/dist/lib/{components → dist/lib/components}/ScrollArea/index.mjs.map +0 -0
  514. /package/dist/lib/{components → dist/lib/components}/SegmentedControl/SegmentedControlItem.mjs +0 -0
  515. /package/dist/lib/{components → dist/lib/components}/SegmentedControl/SegmentedControlRoot.mjs +0 -0
  516. /package/dist/lib/{components → dist/lib/components}/SegmentedControl/SegmentedControlRoot.mjs.map +0 -0
  517. /package/dist/lib/{components → dist/lib/components}/SegmentedControl/index.mjs +0 -0
  518. /package/dist/lib/{components → dist/lib/components}/Select/index.mjs +0 -0
  519. /package/dist/lib/{components → dist/lib/components}/Select/index.mjs.map +0 -0
  520. /package/dist/lib/{components → dist/lib/components}/Separator/index.mjs +0 -0
  521. /package/dist/lib/{components → dist/lib/components}/Separator/index.mjs.map +0 -0
  522. /package/dist/lib/{components → dist/lib/components}/Skeleton/index.mjs +0 -0
  523. /package/dist/lib/{components → dist/lib/components}/Skeleton/index.mjs.map +0 -0
  524. /package/dist/lib/{components → dist/lib/components}/Slider/index.mjs +0 -0
  525. /package/dist/lib/{components → dist/lib/components}/Slider/index.mjs.map +0 -0
  526. /package/dist/lib/{components → dist/lib/components}/Spinner/index.mjs +0 -0
  527. /package/dist/lib/{components → dist/lib/components}/Spinner/index.mjs.map +0 -0
  528. /package/dist/lib/{components → dist/lib/components}/TabNav/index.mjs +0 -0
  529. /package/dist/lib/{components → dist/lib/components}/TabNav/index.mjs.map +0 -0
  530. /package/dist/lib/{components → dist/lib/components}/Table/index.mjs +0 -0
  531. /package/dist/lib/{components → dist/lib/components}/Table/index.mjs.map +0 -0
  532. /package/dist/lib/{components → dist/lib/components}/Tabs/index.mjs +0 -0
  533. /package/dist/lib/{components → dist/lib/components}/Tabs/index.mjs.map +0 -0
  534. /package/dist/lib/{components → dist/lib/components}/TextArea/index.mjs +0 -0
  535. /package/dist/lib/{components → dist/lib/components}/TextArea/index.mjs.map +0 -0
  536. /package/dist/lib/{components → dist/lib/components}/TextField/index.mjs +0 -0
  537. /package/dist/lib/{components → dist/lib/components}/TextField/index.mjs.map +0 -0
  538. /package/dist/lib/{components → dist/lib/components}/Toast/ToastActionButton.mjs +0 -0
  539. /package/dist/lib/{components → dist/lib/components}/Toast/ToastActionButton.mjs.map +0 -0
  540. /package/dist/lib/{components → dist/lib/components}/Toast/ToastDescription.mjs +0 -0
  541. /package/dist/lib/{components → dist/lib/components}/Toast/ToastDescription.mjs.map +0 -0
  542. /package/dist/lib/{components → dist/lib/components}/Toast/ToastRoot.mjs +0 -0
  543. /package/dist/lib/{components → dist/lib/components}/Toast/ToastRoot.mjs.map +0 -0
  544. /package/dist/lib/{components → dist/lib/components}/Toast/ToastTitle.mjs +0 -0
  545. /package/dist/lib/{components → dist/lib/components}/Toast/ToastTitle.mjs.map +0 -0
  546. /package/dist/lib/{components → dist/lib/components}/Toast/index.mjs +0 -0
  547. /package/dist/lib/{components → dist/lib/components}/Toggle/ToggleWithText.mjs +0 -0
  548. /package/dist/lib/{components → dist/lib/components}/Toggle/ToggleWithText.mjs.map +0 -0
  549. /package/dist/lib/{components → dist/lib/components}/Toggle/index.mjs +0 -0
  550. /package/dist/lib/{components → dist/lib/components}/Toggle/index.mjs.map +0 -0
  551. /package/dist/lib/{components → dist/lib/components}/ToggleGroup/ToggleGroupItem.mjs +0 -0
  552. /package/dist/lib/{components → dist/lib/components}/ToggleGroup/ToggleGroupItem.mjs.map +0 -0
  553. /package/dist/lib/{components → dist/lib/components}/ToggleGroup/ToggleGroupRoot.mjs +0 -0
  554. /package/dist/lib/{components → dist/lib/components}/ToggleGroup/ToggleGroupRoot.mjs.map +0 -0
  555. /package/dist/lib/{components → dist/lib/components}/ToggleGroup/index.mjs +0 -0
  556. /package/dist/lib/{components → dist/lib/components}/ToggleSwitch/index.mjs +0 -0
  557. /package/dist/lib/{components → dist/lib/components}/ToggleSwitch/index.mjs.map +0 -0
  558. /package/dist/lib/{components → dist/lib/components}/Tooltip/index.mjs +0 -0
  559. /package/dist/lib/{components → dist/lib/components}/Tooltip/index.mjs.map +0 -0
  560. /package/dist/lib/{constants.mjs → dist/lib/constants.mjs} +0 -0
  561. /package/dist/lib/{index.mjs → dist/lib/index.mjs} +0 -0
  562. /package/dist/lib/{theme → dist/lib/theme}/ThemeProvider.mjs +0 -0
  563. /package/dist/lib/{theme → dist/lib/theme}/ThemeProvider.mjs.map +0 -0
  564. /package/dist/lib/{utils → dist/lib/utils}/useDarkMode.mjs +0 -0
  565. /package/dist/lib/{utils → dist/lib/utils}/useDarkMode.mjs.map +0 -0
  566. /package/dist/lib/{utils → dist/lib/utils}/utils.mjs +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.mjs","sources":["../../../../../../public/tinymce/models/dom/model.js"],"sourcesContent":["/**\n * TinyMCE version 6.8.5 (TBD)\n */\n\n(function () {\n 'use strict';\n\n var global$1 = tinymce.util.Tools.resolve('tinymce.ModelManager');\n\n const hasProto = (v, constructor, predicate) => {\n var _a;\n if (predicate(v, constructor.prototype)) {\n return true;\n } else {\n return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;\n }\n };\n const typeOf = x => {\n const t = typeof x;\n if (x === null) {\n return 'null';\n } else if (t === 'object' && Array.isArray(x)) {\n return 'array';\n } else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {\n return 'string';\n } else {\n return t;\n }\n };\n const isType$1 = type => value => typeOf(value) === type;\n const isSimpleType = type => value => typeof value === type;\n const eq$2 = t => a => t === a;\n const isString = isType$1('string');\n const isObject = isType$1('object');\n const isArray = isType$1('array');\n const isNull = eq$2(null);\n const isBoolean = isSimpleType('boolean');\n const isUndefined = eq$2(undefined);\n const isNullable = a => a === null || a === undefined;\n const isNonNullable = a => !isNullable(a);\n const isFunction = isSimpleType('function');\n const isNumber = isSimpleType('number');\n\n const noop = () => {\n };\n const compose = (fa, fb) => {\n return (...args) => {\n return fa(fb.apply(null, args));\n };\n };\n const compose1 = (fbc, fab) => a => fbc(fab(a));\n const constant = value => {\n return () => {\n return value;\n };\n };\n const identity = x => {\n return x;\n };\n const tripleEquals = (a, b) => {\n return a === b;\n };\n function curry(fn, ...initialArgs) {\n return (...restArgs) => {\n const all = initialArgs.concat(restArgs);\n return fn.apply(null, all);\n };\n }\n const not = f => t => !f(t);\n const die = msg => {\n return () => {\n throw new Error(msg);\n };\n };\n const apply = f => {\n return f();\n };\n const never = constant(false);\n const always = constant(true);\n\n class Optional {\n constructor(tag, value) {\n this.tag = tag;\n this.value = value;\n }\n static some(value) {\n return new Optional(true, value);\n }\n static none() {\n return Optional.singletonNone;\n }\n fold(onNone, onSome) {\n if (this.tag) {\n return onSome(this.value);\n } else {\n return onNone();\n }\n }\n isSome() {\n return this.tag;\n }\n isNone() {\n return !this.tag;\n }\n map(mapper) {\n if (this.tag) {\n return Optional.some(mapper(this.value));\n } else {\n return Optional.none();\n }\n }\n bind(binder) {\n if (this.tag) {\n return binder(this.value);\n } else {\n return Optional.none();\n }\n }\n exists(predicate) {\n return this.tag && predicate(this.value);\n }\n forall(predicate) {\n return !this.tag || predicate(this.value);\n }\n filter(predicate) {\n if (!this.tag || predicate(this.value)) {\n return this;\n } else {\n return Optional.none();\n }\n }\n getOr(replacement) {\n return this.tag ? this.value : replacement;\n }\n or(replacement) {\n return this.tag ? this : replacement;\n }\n getOrThunk(thunk) {\n return this.tag ? this.value : thunk();\n }\n orThunk(thunk) {\n return this.tag ? this : thunk();\n }\n getOrDie(message) {\n if (!this.tag) {\n throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');\n } else {\n return this.value;\n }\n }\n static from(value) {\n return isNonNullable(value) ? Optional.some(value) : Optional.none();\n }\n getOrNull() {\n return this.tag ? this.value : null;\n }\n getOrUndefined() {\n return this.value;\n }\n each(worker) {\n if (this.tag) {\n worker(this.value);\n }\n }\n toArray() {\n return this.tag ? [this.value] : [];\n }\n toString() {\n return this.tag ? `some(${ this.value })` : 'none()';\n }\n }\n Optional.singletonNone = new Optional(false);\n\n const nativeSlice = Array.prototype.slice;\n const nativeIndexOf = Array.prototype.indexOf;\n const nativePush = Array.prototype.push;\n const rawIndexOf = (ts, t) => nativeIndexOf.call(ts, t);\n const contains$2 = (xs, x) => rawIndexOf(xs, x) > -1;\n const exists = (xs, pred) => {\n for (let i = 0, len = xs.length; i < len; i++) {\n const x = xs[i];\n if (pred(x, i)) {\n return true;\n }\n }\n return false;\n };\n const range$1 = (num, f) => {\n const r = [];\n for (let i = 0; i < num; i++) {\n r.push(f(i));\n }\n return r;\n };\n const map$1 = (xs, f) => {\n const len = xs.length;\n const r = new Array(len);\n for (let i = 0; i < len; i++) {\n const x = xs[i];\n r[i] = f(x, i);\n }\n return r;\n };\n const each$2 = (xs, f) => {\n for (let i = 0, len = xs.length; i < len; i++) {\n const x = xs[i];\n f(x, i);\n }\n };\n const eachr = (xs, f) => {\n for (let i = xs.length - 1; i >= 0; i--) {\n const x = xs[i];\n f(x, i);\n }\n };\n const partition = (xs, pred) => {\n const pass = [];\n const fail = [];\n for (let i = 0, len = xs.length; i < len; i++) {\n const x = xs[i];\n const arr = pred(x, i) ? pass : fail;\n arr.push(x);\n }\n return {\n pass,\n fail\n };\n };\n const filter$2 = (xs, pred) => {\n const r = [];\n for (let i = 0, len = xs.length; i < len; i++) {\n const x = xs[i];\n if (pred(x, i)) {\n r.push(x);\n }\n }\n return r;\n };\n const foldr = (xs, f, acc) => {\n eachr(xs, (x, i) => {\n acc = f(acc, x, i);\n });\n return acc;\n };\n const foldl = (xs, f, acc) => {\n each$2(xs, (x, i) => {\n acc = f(acc, x, i);\n });\n return acc;\n };\n const findUntil = (xs, pred, until) => {\n for (let i = 0, len = xs.length; i < len; i++) {\n const x = xs[i];\n if (pred(x, i)) {\n return Optional.some(x);\n } else if (until(x, i)) {\n break;\n }\n }\n return Optional.none();\n };\n const find$1 = (xs, pred) => {\n return findUntil(xs, pred, never);\n };\n const findIndex = (xs, pred) => {\n for (let i = 0, len = xs.length; i < len; i++) {\n const x = xs[i];\n if (pred(x, i)) {\n return Optional.some(i);\n }\n }\n return Optional.none();\n };\n const flatten = xs => {\n const r = [];\n for (let i = 0, len = xs.length; i < len; ++i) {\n if (!isArray(xs[i])) {\n throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);\n }\n nativePush.apply(r, xs[i]);\n }\n return r;\n };\n const bind$2 = (xs, f) => flatten(map$1(xs, f));\n const forall = (xs, pred) => {\n for (let i = 0, len = xs.length; i < len; ++i) {\n const x = xs[i];\n if (pred(x, i) !== true) {\n return false;\n }\n }\n return true;\n };\n const reverse = xs => {\n const r = nativeSlice.call(xs, 0);\n r.reverse();\n return r;\n };\n const mapToObject = (xs, f) => {\n const r = {};\n for (let i = 0, len = xs.length; i < len; i++) {\n const x = xs[i];\n r[String(x)] = f(x, i);\n }\n return r;\n };\n const sort$1 = (xs, comparator) => {\n const copy = nativeSlice.call(xs, 0);\n copy.sort(comparator);\n return copy;\n };\n const get$d = (xs, i) => i >= 0 && i < xs.length ? Optional.some(xs[i]) : Optional.none();\n const head = xs => get$d(xs, 0);\n const last$2 = xs => get$d(xs, xs.length - 1);\n const findMap = (arr, f) => {\n for (let i = 0; i < arr.length; i++) {\n const r = f(arr[i], i);\n if (r.isSome()) {\n return r;\n }\n }\n return Optional.none();\n };\n\n const keys = Object.keys;\n const hasOwnProperty = Object.hasOwnProperty;\n const each$1 = (obj, f) => {\n const props = keys(obj);\n for (let k = 0, len = props.length; k < len; k++) {\n const i = props[k];\n const x = obj[i];\n f(x, i);\n }\n };\n const map = (obj, f) => {\n return tupleMap(obj, (x, i) => ({\n k: i,\n v: f(x, i)\n }));\n };\n const tupleMap = (obj, f) => {\n const r = {};\n each$1(obj, (x, i) => {\n const tuple = f(x, i);\n r[tuple.k] = tuple.v;\n });\n return r;\n };\n const objAcc = r => (x, i) => {\n r[i] = x;\n };\n const internalFilter = (obj, pred, onTrue, onFalse) => {\n each$1(obj, (x, i) => {\n (pred(x, i) ? onTrue : onFalse)(x, i);\n });\n };\n const filter$1 = (obj, pred) => {\n const t = {};\n internalFilter(obj, pred, objAcc(t), noop);\n return t;\n };\n const mapToArray = (obj, f) => {\n const r = [];\n each$1(obj, (value, name) => {\n r.push(f(value, name));\n });\n return r;\n };\n const values = obj => {\n return mapToArray(obj, identity);\n };\n const get$c = (obj, key) => {\n return has$1(obj, key) ? Optional.from(obj[key]) : Optional.none();\n };\n const has$1 = (obj, key) => hasOwnProperty.call(obj, key);\n const hasNonNullableKey = (obj, key) => has$1(obj, key) && obj[key] !== undefined && obj[key] !== null;\n const isEmpty = r => {\n for (const x in r) {\n if (hasOwnProperty.call(r, x)) {\n return false;\n }\n }\n return true;\n };\n\n const Global = typeof window !== 'undefined' ? window : Function('return this;')();\n\n const path = (parts, scope) => {\n let o = scope !== undefined && scope !== null ? scope : Global;\n for (let i = 0; i < parts.length && o !== undefined && o !== null; ++i) {\n o = o[parts[i]];\n }\n return o;\n };\n const resolve$2 = (p, scope) => {\n const parts = p.split('.');\n return path(parts, scope);\n };\n\n const unsafe = (name, scope) => {\n return resolve$2(name, scope);\n };\n const getOrDie = (name, scope) => {\n const actual = unsafe(name, scope);\n if (actual === undefined || actual === null) {\n throw new Error(name + ' not available on this browser');\n }\n return actual;\n };\n\n const getPrototypeOf = Object.getPrototypeOf;\n const sandHTMLElement = scope => {\n return getOrDie('HTMLElement', scope);\n };\n const isPrototypeOf = x => {\n const scope = resolve$2('ownerDocument.defaultView', x);\n return isObject(x) && (sandHTMLElement(scope).prototype.isPrototypeOf(x) || /^HTML\\w*Element$/.test(getPrototypeOf(x).constructor.name));\n };\n\n const COMMENT = 8;\n const DOCUMENT = 9;\n const DOCUMENT_FRAGMENT = 11;\n const ELEMENT = 1;\n const TEXT = 3;\n\n const name = element => {\n const r = element.dom.nodeName;\n return r.toLowerCase();\n };\n const type = element => element.dom.nodeType;\n const isType = t => element => type(element) === t;\n const isComment = element => type(element) === COMMENT || name(element) === '#comment';\n const isHTMLElement = element => isElement(element) && isPrototypeOf(element.dom);\n const isElement = isType(ELEMENT);\n const isText = isType(TEXT);\n const isDocument = isType(DOCUMENT);\n const isDocumentFragment = isType(DOCUMENT_FRAGMENT);\n const isTag = tag => e => isElement(e) && name(e) === tag;\n\n const rawSet = (dom, key, value) => {\n if (isString(value) || isBoolean(value) || isNumber(value)) {\n dom.setAttribute(key, value + '');\n } else {\n console.error('Invalid call to Attribute.set. Key ', key, ':: Value ', value, ':: Element ', dom);\n throw new Error('Attribute value was not simple');\n }\n };\n const set$2 = (element, key, value) => {\n rawSet(element.dom, key, value);\n };\n const setAll$1 = (element, attrs) => {\n const dom = element.dom;\n each$1(attrs, (v, k) => {\n rawSet(dom, k, v);\n });\n };\n const setOptions = (element, attrs) => {\n each$1(attrs, (v, k) => {\n v.fold(() => {\n remove$7(element, k);\n }, value => {\n rawSet(element.dom, k, value);\n });\n });\n };\n const get$b = (element, key) => {\n const v = element.dom.getAttribute(key);\n return v === null ? undefined : v;\n };\n const getOpt = (element, key) => Optional.from(get$b(element, key));\n const remove$7 = (element, key) => {\n element.dom.removeAttribute(key);\n };\n const clone$2 = element => foldl(element.dom.attributes, (acc, attr) => {\n acc[attr.name] = attr.value;\n return acc;\n }, {});\n\n const fromHtml$1 = (html, scope) => {\n const doc = scope || document;\n const div = doc.createElement('div');\n div.innerHTML = html;\n if (!div.hasChildNodes() || div.childNodes.length > 1) {\n const message = 'HTML does not have a single root node';\n console.error(message, html);\n throw new Error(message);\n }\n return fromDom$1(div.childNodes[0]);\n };\n const fromTag = (tag, scope) => {\n const doc = scope || document;\n const node = doc.createElement(tag);\n return fromDom$1(node);\n };\n const fromText = (text, scope) => {\n const doc = scope || document;\n const node = doc.createTextNode(text);\n return fromDom$1(node);\n };\n const fromDom$1 = node => {\n if (node === null || node === undefined) {\n throw new Error('Node cannot be null or undefined');\n }\n return { dom: node };\n };\n const fromPoint$1 = (docElm, x, y) => Optional.from(docElm.dom.elementFromPoint(x, y)).map(fromDom$1);\n const SugarElement = {\n fromHtml: fromHtml$1,\n fromTag,\n fromText,\n fromDom: fromDom$1,\n fromPoint: fromPoint$1\n };\n\n const is$2 = (element, selector) => {\n const dom = element.dom;\n if (dom.nodeType !== ELEMENT) {\n return false;\n } else {\n const elem = dom;\n if (elem.matches !== undefined) {\n return elem.matches(selector);\n } else if (elem.msMatchesSelector !== undefined) {\n return elem.msMatchesSelector(selector);\n } else if (elem.webkitMatchesSelector !== undefined) {\n return elem.webkitMatchesSelector(selector);\n } else if (elem.mozMatchesSelector !== undefined) {\n return elem.mozMatchesSelector(selector);\n } else {\n throw new Error('Browser lacks native selectors');\n }\n }\n };\n const bypassSelector = dom => dom.nodeType !== ELEMENT && dom.nodeType !== DOCUMENT && dom.nodeType !== DOCUMENT_FRAGMENT || dom.childElementCount === 0;\n const all$1 = (selector, scope) => {\n const base = scope === undefined ? document : scope.dom;\n return bypassSelector(base) ? [] : map$1(base.querySelectorAll(selector), SugarElement.fromDom);\n };\n const one = (selector, scope) => {\n const base = scope === undefined ? document : scope.dom;\n return bypassSelector(base) ? Optional.none() : Optional.from(base.querySelector(selector)).map(SugarElement.fromDom);\n };\n\n const eq$1 = (e1, e2) => e1.dom === e2.dom;\n const contains$1 = (e1, e2) => {\n const d1 = e1.dom;\n const d2 = e2.dom;\n return d1 === d2 ? false : d1.contains(d2);\n };\n const is$1 = is$2;\n\n const owner = element => SugarElement.fromDom(element.dom.ownerDocument);\n const documentOrOwner = dos => isDocument(dos) ? dos : owner(dos);\n const documentElement = element => SugarElement.fromDom(documentOrOwner(element).dom.documentElement);\n const defaultView = element => SugarElement.fromDom(documentOrOwner(element).dom.defaultView);\n const parent = element => Optional.from(element.dom.parentNode).map(SugarElement.fromDom);\n const parentElement = element => Optional.from(element.dom.parentElement).map(SugarElement.fromDom);\n const parents = (element, isRoot) => {\n const stop = isFunction(isRoot) ? isRoot : never;\n let dom = element.dom;\n const ret = [];\n while (dom.parentNode !== null && dom.parentNode !== undefined) {\n const rawParent = dom.parentNode;\n const p = SugarElement.fromDom(rawParent);\n ret.push(p);\n if (stop(p) === true) {\n break;\n } else {\n dom = rawParent;\n }\n }\n return ret;\n };\n const prevSibling = element => Optional.from(element.dom.previousSibling).map(SugarElement.fromDom);\n const nextSibling = element => Optional.from(element.dom.nextSibling).map(SugarElement.fromDom);\n const children$2 = element => map$1(element.dom.childNodes, SugarElement.fromDom);\n const child$2 = (element, index) => {\n const cs = element.dom.childNodes;\n return Optional.from(cs[index]).map(SugarElement.fromDom);\n };\n const firstChild = element => child$2(element, 0);\n\n const before$3 = (marker, element) => {\n const parent$1 = parent(marker);\n parent$1.each(v => {\n v.dom.insertBefore(element.dom, marker.dom);\n });\n };\n const after$5 = (marker, element) => {\n const sibling = nextSibling(marker);\n sibling.fold(() => {\n const parent$1 = parent(marker);\n parent$1.each(v => {\n append$1(v, element);\n });\n }, v => {\n before$3(v, element);\n });\n };\n const prepend = (parent, element) => {\n const firstChild$1 = firstChild(parent);\n firstChild$1.fold(() => {\n append$1(parent, element);\n }, v => {\n parent.dom.insertBefore(element.dom, v.dom);\n });\n };\n const append$1 = (parent, element) => {\n parent.dom.appendChild(element.dom);\n };\n const appendAt = (parent, element, index) => {\n child$2(parent, index).fold(() => {\n append$1(parent, element);\n }, v => {\n before$3(v, element);\n });\n };\n const wrap = (element, wrapper) => {\n before$3(element, wrapper);\n append$1(wrapper, element);\n };\n\n const after$4 = (marker, elements) => {\n each$2(elements, (x, i) => {\n const e = i === 0 ? marker : elements[i - 1];\n after$5(e, x);\n });\n };\n const append = (parent, elements) => {\n each$2(elements, x => {\n append$1(parent, x);\n });\n };\n\n const empty = element => {\n element.dom.textContent = '';\n each$2(children$2(element), rogue => {\n remove$6(rogue);\n });\n };\n const remove$6 = element => {\n const dom = element.dom;\n if (dom.parentNode !== null) {\n dom.parentNode.removeChild(dom);\n }\n };\n const unwrap = wrapper => {\n const children = children$2(wrapper);\n if (children.length > 0) {\n after$4(wrapper, children);\n }\n remove$6(wrapper);\n };\n\n const clone$1 = (original, isDeep) => SugarElement.fromDom(original.dom.cloneNode(isDeep));\n const shallow = original => clone$1(original, false);\n const deep = original => clone$1(original, true);\n const shallowAs = (original, tag) => {\n const nu = SugarElement.fromTag(tag);\n const attributes = clone$2(original);\n setAll$1(nu, attributes);\n return nu;\n };\n const copy$2 = (original, tag) => {\n const nu = shallowAs(original, tag);\n const cloneChildren = children$2(deep(original));\n append(nu, cloneChildren);\n return nu;\n };\n const mutate$1 = (original, tag) => {\n const nu = shallowAs(original, tag);\n after$5(original, nu);\n const children = children$2(original);\n append(nu, children);\n remove$6(original);\n return nu;\n };\n\n const validSectionList = [\n 'tfoot',\n 'thead',\n 'tbody',\n 'colgroup'\n ];\n const isValidSection = parentName => contains$2(validSectionList, parentName);\n const grid = (rows, columns) => ({\n rows,\n columns\n });\n const address = (row, column) => ({\n row,\n column\n });\n const detail = (element, rowspan, colspan) => ({\n element,\n rowspan,\n colspan\n });\n const detailnew = (element, rowspan, colspan, isNew) => ({\n element,\n rowspan,\n colspan,\n isNew\n });\n const extended = (element, rowspan, colspan, row, column, isLocked) => ({\n element,\n rowspan,\n colspan,\n row,\n column,\n isLocked\n });\n const rowdetail = (element, cells, section) => ({\n element,\n cells,\n section\n });\n const rowdetailnew = (element, cells, section, isNew) => ({\n element,\n cells,\n section,\n isNew\n });\n const elementnew = (element, isNew, isLocked) => ({\n element,\n isNew,\n isLocked\n });\n const rowcells = (element, cells, section, isNew) => ({\n element,\n cells,\n section,\n isNew\n });\n const bounds = (startRow, startCol, finishRow, finishCol) => ({\n startRow,\n startCol,\n finishRow,\n finishCol\n });\n const columnext = (element, colspan, column) => ({\n element,\n colspan,\n column\n });\n const colgroup = (element, columns) => ({\n element,\n columns\n });\n\n const isShadowRoot = dos => isDocumentFragment(dos) && isNonNullable(dos.dom.host);\n const supported = isFunction(Element.prototype.attachShadow) && isFunction(Node.prototype.getRootNode);\n const isSupported$1 = constant(supported);\n const getRootNode = supported ? e => SugarElement.fromDom(e.dom.getRootNode()) : documentOrOwner;\n const getShadowRoot = e => {\n const r = getRootNode(e);\n return isShadowRoot(r) ? Optional.some(r) : Optional.none();\n };\n const getShadowHost = e => SugarElement.fromDom(e.dom.host);\n const getOriginalEventTarget = event => {\n if (isSupported$1() && isNonNullable(event.target)) {\n const el = SugarElement.fromDom(event.target);\n if (isElement(el) && isOpenShadowHost(el)) {\n if (event.composed && event.composedPath) {\n const composedPath = event.composedPath();\n if (composedPath) {\n return head(composedPath);\n }\n }\n }\n }\n return Optional.from(event.target);\n };\n const isOpenShadowHost = element => isNonNullable(element.dom.shadowRoot);\n\n const inBody = element => {\n const dom = isText(element) ? element.dom.parentNode : element.dom;\n if (dom === undefined || dom === null || dom.ownerDocument === null) {\n return false;\n }\n const doc = dom.ownerDocument;\n return getShadowRoot(SugarElement.fromDom(dom)).fold(() => doc.body.contains(dom), compose1(inBody, getShadowHost));\n };\n const body$1 = () => getBody$1(SugarElement.fromDom(document));\n const getBody$1 = doc => {\n const b = doc.dom.body;\n if (b === null || b === undefined) {\n throw new Error('Body is not available yet');\n }\n return SugarElement.fromDom(b);\n };\n\n const ancestors$4 = (scope, predicate, isRoot) => filter$2(parents(scope, isRoot), predicate);\n const children$1 = (scope, predicate) => filter$2(children$2(scope), predicate);\n const descendants$1 = (scope, predicate) => {\n let result = [];\n each$2(children$2(scope), x => {\n if (predicate(x)) {\n result = result.concat([x]);\n }\n result = result.concat(descendants$1(x, predicate));\n });\n return result;\n };\n\n const ancestors$3 = (scope, selector, isRoot) => ancestors$4(scope, e => is$2(e, selector), isRoot);\n const children = (scope, selector) => children$1(scope, e => is$2(e, selector));\n const descendants = (scope, selector) => all$1(selector, scope);\n\n var ClosestOrAncestor = (is, ancestor, scope, a, isRoot) => {\n if (is(scope, a)) {\n return Optional.some(scope);\n } else if (isFunction(isRoot) && isRoot(scope)) {\n return Optional.none();\n } else {\n return ancestor(scope, a, isRoot);\n }\n };\n\n const ancestor$2 = (scope, predicate, isRoot) => {\n let element = scope.dom;\n const stop = isFunction(isRoot) ? isRoot : never;\n while (element.parentNode) {\n element = element.parentNode;\n const el = SugarElement.fromDom(element);\n if (predicate(el)) {\n return Optional.some(el);\n } else if (stop(el)) {\n break;\n }\n }\n return Optional.none();\n };\n const closest$2 = (scope, predicate, isRoot) => {\n const is = (s, test) => test(s);\n return ClosestOrAncestor(is, ancestor$2, scope, predicate, isRoot);\n };\n const child$1 = (scope, predicate) => {\n const pred = node => predicate(SugarElement.fromDom(node));\n const result = find$1(scope.dom.childNodes, pred);\n return result.map(SugarElement.fromDom);\n };\n const descendant$1 = (scope, predicate) => {\n const descend = node => {\n for (let i = 0; i < node.childNodes.length; i++) {\n const child = SugarElement.fromDom(node.childNodes[i]);\n if (predicate(child)) {\n return Optional.some(child);\n }\n const res = descend(node.childNodes[i]);\n if (res.isSome()) {\n return res;\n }\n }\n return Optional.none();\n };\n return descend(scope.dom);\n };\n\n const ancestor$1 = (scope, selector, isRoot) => ancestor$2(scope, e => is$2(e, selector), isRoot);\n const child = (scope, selector) => child$1(scope, e => is$2(e, selector));\n const descendant = (scope, selector) => one(selector, scope);\n const closest$1 = (scope, selector, isRoot) => {\n const is = (element, selector) => is$2(element, selector);\n return ClosestOrAncestor(is, ancestor$1, scope, selector, isRoot);\n };\n\n const is = (lhs, rhs, comparator = tripleEquals) => lhs.exists(left => comparator(left, rhs));\n const cat = arr => {\n const r = [];\n const push = x => {\n r.push(x);\n };\n for (let i = 0; i < arr.length; i++) {\n arr[i].each(push);\n }\n return r;\n };\n const bindFrom = (a, f) => a !== undefined && a !== null ? f(a) : Optional.none();\n const someIf = (b, a) => b ? Optional.some(a) : Optional.none();\n\n const checkRange = (str, substr, start) => substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr;\n const contains = (str, substr, start = 0, end) => {\n const idx = str.indexOf(substr, start);\n if (idx !== -1) {\n return isUndefined(end) ? true : idx + substr.length <= end;\n } else {\n return false;\n }\n };\n const startsWith = (str, prefix) => {\n return checkRange(str, prefix, 0);\n };\n const endsWith = (str, suffix) => {\n return checkRange(str, suffix, str.length - suffix.length);\n };\n const blank = r => s => s.replace(r, '');\n const trim = blank(/^\\s+|\\s+$/g);\n const isNotEmpty = s => s.length > 0;\n const toFloat = value => {\n const num = parseFloat(value);\n return isNaN(num) ? Optional.none() : Optional.some(num);\n };\n\n const isSupported = dom => dom.style !== undefined && isFunction(dom.style.getPropertyValue);\n\n const internalSet = (dom, property, value) => {\n if (!isString(value)) {\n console.error('Invalid call to CSS.set. Property ', property, ':: Value ', value, ':: Element ', dom);\n throw new Error('CSS value must be a string: ' + value);\n }\n if (isSupported(dom)) {\n dom.style.setProperty(property, value);\n }\n };\n const internalRemove = (dom, property) => {\n if (isSupported(dom)) {\n dom.style.removeProperty(property);\n }\n };\n const set$1 = (element, property, value) => {\n const dom = element.dom;\n internalSet(dom, property, value);\n };\n const setAll = (element, css) => {\n const dom = element.dom;\n each$1(css, (v, k) => {\n internalSet(dom, k, v);\n });\n };\n const get$a = (element, property) => {\n const dom = element.dom;\n const styles = window.getComputedStyle(dom);\n const r = styles.getPropertyValue(property);\n return r === '' && !inBody(element) ? getUnsafeProperty(dom, property) : r;\n };\n const getUnsafeProperty = (dom, property) => isSupported(dom) ? dom.style.getPropertyValue(property) : '';\n const getRaw$2 = (element, property) => {\n const dom = element.dom;\n const raw = getUnsafeProperty(dom, property);\n return Optional.from(raw).filter(r => r.length > 0);\n };\n const remove$5 = (element, property) => {\n const dom = element.dom;\n internalRemove(dom, property);\n if (is(getOpt(element, 'style').map(trim), '')) {\n remove$7(element, 'style');\n }\n };\n const copy$1 = (source, target) => {\n const sourceDom = source.dom;\n const targetDom = target.dom;\n if (isSupported(sourceDom) && isSupported(targetDom)) {\n targetDom.style.cssText = sourceDom.style.cssText;\n }\n };\n\n const getAttrValue = (cell, name, fallback = 0) => getOpt(cell, name).map(value => parseInt(value, 10)).getOr(fallback);\n const getSpan = (cell, type) => getAttrValue(cell, type, 1);\n const hasColspan = cellOrCol => {\n if (isTag('col')(cellOrCol)) {\n return getAttrValue(cellOrCol, 'span', 1) > 1;\n } else {\n return getSpan(cellOrCol, 'colspan') > 1;\n }\n };\n const hasRowspan = cell => getSpan(cell, 'rowspan') > 1;\n const getCssValue = (element, property) => parseInt(get$a(element, property), 10);\n const minWidth = constant(10);\n const minHeight = constant(10);\n\n const firstLayer = (scope, selector) => {\n return filterFirstLayer(scope, selector, always);\n };\n const filterFirstLayer = (scope, selector, predicate) => {\n return bind$2(children$2(scope), x => {\n if (is$2(x, selector)) {\n return predicate(x) ? [x] : [];\n } else {\n return filterFirstLayer(x, selector, predicate);\n }\n });\n };\n\n const lookup = (tags, element, isRoot = never) => {\n if (isRoot(element)) {\n return Optional.none();\n }\n if (contains$2(tags, name(element))) {\n return Optional.some(element);\n }\n const isRootOrUpperTable = elm => is$2(elm, 'table') || isRoot(elm);\n return ancestor$1(element, tags.join(','), isRootOrUpperTable);\n };\n const cell = (element, isRoot) => lookup([\n 'td',\n 'th'\n ], element, isRoot);\n const cells$1 = ancestor => firstLayer(ancestor, 'th,td');\n const columns$1 = ancestor => {\n if (is$2(ancestor, 'colgroup')) {\n return children(ancestor, 'col');\n } else {\n return bind$2(columnGroups(ancestor), columnGroup => children(columnGroup, 'col'));\n }\n };\n const table = (element, isRoot) => closest$1(element, 'table', isRoot);\n const rows$1 = ancestor => firstLayer(ancestor, 'tr');\n const columnGroups = ancestor => table(ancestor).fold(constant([]), table => children(table, 'colgroup'));\n\n const fromRowsOrColGroups = (elems, getSection) => map$1(elems, row => {\n if (name(row) === 'colgroup') {\n const cells = map$1(columns$1(row), column => {\n const colspan = getAttrValue(column, 'span', 1);\n return detail(column, 1, colspan);\n });\n return rowdetail(row, cells, 'colgroup');\n } else {\n const cells = map$1(cells$1(row), cell => {\n const rowspan = getAttrValue(cell, 'rowspan', 1);\n const colspan = getAttrValue(cell, 'colspan', 1);\n return detail(cell, rowspan, colspan);\n });\n return rowdetail(row, cells, getSection(row));\n }\n });\n const getParentSection = group => parent(group).map(parent => {\n const parentName = name(parent);\n return isValidSection(parentName) ? parentName : 'tbody';\n }).getOr('tbody');\n const fromTable$1 = table => {\n const rows = rows$1(table);\n const columnGroups$1 = columnGroups(table);\n const elems = [\n ...columnGroups$1,\n ...rows\n ];\n return fromRowsOrColGroups(elems, getParentSection);\n };\n const fromPastedRows = (elems, section) => fromRowsOrColGroups(elems, () => section);\n\n const cached = f => {\n let called = false;\n let r;\n return (...args) => {\n if (!called) {\n called = true;\n r = f.apply(null, args);\n }\n return r;\n };\n };\n\n const DeviceType = (os, browser, userAgent, mediaMatch) => {\n const isiPad = os.isiOS() && /ipad/i.test(userAgent) === true;\n const isiPhone = os.isiOS() && !isiPad;\n const isMobile = os.isiOS() || os.isAndroid();\n const isTouch = isMobile || mediaMatch('(pointer:coarse)');\n const isTablet = isiPad || !isiPhone && isMobile && mediaMatch('(min-device-width:768px)');\n const isPhone = isiPhone || isMobile && !isTablet;\n const iOSwebview = browser.isSafari() && os.isiOS() && /safari/i.test(userAgent) === false;\n const isDesktop = !isPhone && !isTablet && !iOSwebview;\n return {\n isiPad: constant(isiPad),\n isiPhone: constant(isiPhone),\n isTablet: constant(isTablet),\n isPhone: constant(isPhone),\n isTouch: constant(isTouch),\n isAndroid: os.isAndroid,\n isiOS: os.isiOS,\n isWebView: constant(iOSwebview),\n isDesktop: constant(isDesktop)\n };\n };\n\n const firstMatch = (regexes, s) => {\n for (let i = 0; i < regexes.length; i++) {\n const x = regexes[i];\n if (x.test(s)) {\n return x;\n }\n }\n return undefined;\n };\n const find = (regexes, agent) => {\n const r = firstMatch(regexes, agent);\n if (!r) {\n return {\n major: 0,\n minor: 0\n };\n }\n const group = i => {\n return Number(agent.replace(r, '$' + i));\n };\n return nu$2(group(1), group(2));\n };\n const detect$5 = (versionRegexes, agent) => {\n const cleanedAgent = String(agent).toLowerCase();\n if (versionRegexes.length === 0) {\n return unknown$2();\n }\n return find(versionRegexes, cleanedAgent);\n };\n const unknown$2 = () => {\n return nu$2(0, 0);\n };\n const nu$2 = (major, minor) => {\n return {\n major,\n minor\n };\n };\n const Version = {\n nu: nu$2,\n detect: detect$5,\n unknown: unknown$2\n };\n\n const detectBrowser$1 = (browsers, userAgentData) => {\n return findMap(userAgentData.brands, uaBrand => {\n const lcBrand = uaBrand.brand.toLowerCase();\n return find$1(browsers, browser => {\n var _a;\n return lcBrand === ((_a = browser.brand) === null || _a === void 0 ? void 0 : _a.toLowerCase());\n }).map(info => ({\n current: info.name,\n version: Version.nu(parseInt(uaBrand.version, 10), 0)\n }));\n });\n };\n\n const detect$4 = (candidates, userAgent) => {\n const agent = String(userAgent).toLowerCase();\n return find$1(candidates, candidate => {\n return candidate.search(agent);\n });\n };\n const detectBrowser = (browsers, userAgent) => {\n return detect$4(browsers, userAgent).map(browser => {\n const version = Version.detect(browser.versionRegexes, userAgent);\n return {\n current: browser.name,\n version\n };\n });\n };\n const detectOs = (oses, userAgent) => {\n return detect$4(oses, userAgent).map(os => {\n const version = Version.detect(os.versionRegexes, userAgent);\n return {\n current: os.name,\n version\n };\n });\n };\n\n const normalVersionRegex = /.*?version\\/\\ ?([0-9]+)\\.([0-9]+).*/;\n const checkContains = target => {\n return uastring => {\n return contains(uastring, target);\n };\n };\n const browsers = [\n {\n name: 'Edge',\n versionRegexes: [/.*?edge\\/ ?([0-9]+)\\.([0-9]+)$/],\n search: uastring => {\n return contains(uastring, 'edge/') && contains(uastring, 'chrome') && contains(uastring, 'safari') && contains(uastring, 'applewebkit');\n }\n },\n {\n name: 'Chromium',\n brand: 'Chromium',\n versionRegexes: [\n /.*?chrome\\/([0-9]+)\\.([0-9]+).*/,\n normalVersionRegex\n ],\n search: uastring => {\n return contains(uastring, 'chrome') && !contains(uastring, 'chromeframe');\n }\n },\n {\n name: 'IE',\n versionRegexes: [\n /.*?msie\\ ?([0-9]+)\\.([0-9]+).*/,\n /.*?rv:([0-9]+)\\.([0-9]+).*/\n ],\n search: uastring => {\n return contains(uastring, 'msie') || contains(uastring, 'trident');\n }\n },\n {\n name: 'Opera',\n versionRegexes: [\n normalVersionRegex,\n /.*?opera\\/([0-9]+)\\.([0-9]+).*/\n ],\n search: checkContains('opera')\n },\n {\n name: 'Firefox',\n versionRegexes: [/.*?firefox\\/\\ ?([0-9]+)\\.([0-9]+).*/],\n search: checkContains('firefox')\n },\n {\n name: 'Safari',\n versionRegexes: [\n normalVersionRegex,\n /.*?cpu os ([0-9]+)_([0-9]+).*/\n ],\n search: uastring => {\n return (contains(uastring, 'safari') || contains(uastring, 'mobile/')) && contains(uastring, 'applewebkit');\n }\n }\n ];\n const oses = [\n {\n name: 'Windows',\n search: checkContains('win'),\n versionRegexes: [/.*?windows\\ nt\\ ?([0-9]+)\\.([0-9]+).*/]\n },\n {\n name: 'iOS',\n search: uastring => {\n return contains(uastring, 'iphone') || contains(uastring, 'ipad');\n },\n versionRegexes: [\n /.*?version\\/\\ ?([0-9]+)\\.([0-9]+).*/,\n /.*cpu os ([0-9]+)_([0-9]+).*/,\n /.*cpu iphone os ([0-9]+)_([0-9]+).*/\n ]\n },\n {\n name: 'Android',\n search: checkContains('android'),\n versionRegexes: [/.*?android\\ ?([0-9]+)\\.([0-9]+).*/]\n },\n {\n name: 'macOS',\n search: checkContains('mac os x'),\n versionRegexes: [/.*?mac\\ os\\ x\\ ?([0-9]+)_([0-9]+).*/]\n },\n {\n name: 'Linux',\n search: checkContains('linux'),\n versionRegexes: []\n },\n {\n name: 'Solaris',\n search: checkContains('sunos'),\n versionRegexes: []\n },\n {\n name: 'FreeBSD',\n search: checkContains('freebsd'),\n versionRegexes: []\n },\n {\n name: 'ChromeOS',\n search: checkContains('cros'),\n versionRegexes: [/.*?chrome\\/([0-9]+)\\.([0-9]+).*/]\n }\n ];\n const PlatformInfo = {\n browsers: constant(browsers),\n oses: constant(oses)\n };\n\n const edge = 'Edge';\n const chromium = 'Chromium';\n const ie = 'IE';\n const opera = 'Opera';\n const firefox = 'Firefox';\n const safari = 'Safari';\n const unknown$1 = () => {\n return nu$1({\n current: undefined,\n version: Version.unknown()\n });\n };\n const nu$1 = info => {\n const current = info.current;\n const version = info.version;\n const isBrowser = name => () => current === name;\n return {\n current,\n version,\n isEdge: isBrowser(edge),\n isChromium: isBrowser(chromium),\n isIE: isBrowser(ie),\n isOpera: isBrowser(opera),\n isFirefox: isBrowser(firefox),\n isSafari: isBrowser(safari)\n };\n };\n const Browser = {\n unknown: unknown$1,\n nu: nu$1,\n edge: constant(edge),\n chromium: constant(chromium),\n ie: constant(ie),\n opera: constant(opera),\n firefox: constant(firefox),\n safari: constant(safari)\n };\n\n const windows = 'Windows';\n const ios = 'iOS';\n const android = 'Android';\n const linux = 'Linux';\n const macos = 'macOS';\n const solaris = 'Solaris';\n const freebsd = 'FreeBSD';\n const chromeos = 'ChromeOS';\n const unknown = () => {\n return nu({\n current: undefined,\n version: Version.unknown()\n });\n };\n const nu = info => {\n const current = info.current;\n const version = info.version;\n const isOS = name => () => current === name;\n return {\n current,\n version,\n isWindows: isOS(windows),\n isiOS: isOS(ios),\n isAndroid: isOS(android),\n isMacOS: isOS(macos),\n isLinux: isOS(linux),\n isSolaris: isOS(solaris),\n isFreeBSD: isOS(freebsd),\n isChromeOS: isOS(chromeos)\n };\n };\n const OperatingSystem = {\n unknown,\n nu,\n windows: constant(windows),\n ios: constant(ios),\n android: constant(android),\n linux: constant(linux),\n macos: constant(macos),\n solaris: constant(solaris),\n freebsd: constant(freebsd),\n chromeos: constant(chromeos)\n };\n\n const detect$3 = (userAgent, userAgentDataOpt, mediaMatch) => {\n const browsers = PlatformInfo.browsers();\n const oses = PlatformInfo.oses();\n const browser = userAgentDataOpt.bind(userAgentData => detectBrowser$1(browsers, userAgentData)).orThunk(() => detectBrowser(browsers, userAgent)).fold(Browser.unknown, Browser.nu);\n const os = detectOs(oses, userAgent).fold(OperatingSystem.unknown, OperatingSystem.nu);\n const deviceType = DeviceType(os, browser, userAgent, mediaMatch);\n return {\n browser,\n os,\n deviceType\n };\n };\n const PlatformDetection = { detect: detect$3 };\n\n const mediaMatch = query => window.matchMedia(query).matches;\n let platform = cached(() => PlatformDetection.detect(navigator.userAgent, Optional.from(navigator.userAgentData), mediaMatch));\n const detect$2 = () => platform();\n\n const Dimension = (name, getOffset) => {\n const set = (element, h) => {\n if (!isNumber(h) && !h.match(/^[0-9]+$/)) {\n throw new Error(name + '.set accepts only positive integer values. Value was ' + h);\n }\n const dom = element.dom;\n if (isSupported(dom)) {\n dom.style[name] = h + 'px';\n }\n };\n const get = element => {\n const r = getOffset(element);\n if (r <= 0 || r === null) {\n const css = get$a(element, name);\n return parseFloat(css) || 0;\n }\n return r;\n };\n const getOuter = get;\n const aggregate = (element, properties) => foldl(properties, (acc, property) => {\n const val = get$a(element, property);\n const value = val === undefined ? 0 : parseInt(val, 10);\n return isNaN(value) ? acc : acc + value;\n }, 0);\n const max = (element, value, properties) => {\n const cumulativeInclusions = aggregate(element, properties);\n const absoluteMax = value > cumulativeInclusions ? value - cumulativeInclusions : 0;\n return absoluteMax;\n };\n return {\n set,\n get,\n getOuter,\n aggregate,\n max\n };\n };\n\n const toNumber = (px, fallback) => toFloat(px).getOr(fallback);\n const getProp = (element, name, fallback) => toNumber(get$a(element, name), fallback);\n const calcContentBoxSize = (element, size, upper, lower) => {\n const paddingUpper = getProp(element, `padding-${ upper }`, 0);\n const paddingLower = getProp(element, `padding-${ lower }`, 0);\n const borderUpper = getProp(element, `border-${ upper }-width`, 0);\n const borderLower = getProp(element, `border-${ lower }-width`, 0);\n return size - paddingUpper - paddingLower - borderUpper - borderLower;\n };\n const getCalculatedWidth = (element, boxSizing) => {\n const dom = element.dom;\n const width = dom.getBoundingClientRect().width || dom.offsetWidth;\n return boxSizing === 'border-box' ? width : calcContentBoxSize(element, width, 'left', 'right');\n };\n const getHeight$1 = element => getProp(element, 'height', element.dom.offsetHeight);\n const getWidth = element => getProp(element, 'width', element.dom.offsetWidth);\n const getInnerWidth = element => getCalculatedWidth(element, 'content-box');\n\n const api$2 = Dimension('width', element => element.dom.offsetWidth);\n const get$9 = element => api$2.get(element);\n const getOuter$2 = element => api$2.getOuter(element);\n const getInner = getInnerWidth;\n const getRuntime$1 = getWidth;\n\n const addCells = (gridRow, index, cells) => {\n const existingCells = gridRow.cells;\n const before = existingCells.slice(0, index);\n const after = existingCells.slice(index);\n const newCells = before.concat(cells).concat(after);\n return setCells(gridRow, newCells);\n };\n const addCell = (gridRow, index, cell) => addCells(gridRow, index, [cell]);\n const mutateCell = (gridRow, index, cell) => {\n const cells = gridRow.cells;\n cells[index] = cell;\n };\n const setCells = (gridRow, cells) => rowcells(gridRow.element, cells, gridRow.section, gridRow.isNew);\n const mapCells = (gridRow, f) => {\n const cells = gridRow.cells;\n const r = map$1(cells, f);\n return rowcells(gridRow.element, r, gridRow.section, gridRow.isNew);\n };\n const getCell = (gridRow, index) => gridRow.cells[index];\n const getCellElement = (gridRow, index) => getCell(gridRow, index).element;\n const cellLength = gridRow => gridRow.cells.length;\n const extractGridDetails = grid => {\n const result = partition(grid, row => row.section === 'colgroup');\n return {\n rows: result.fail,\n cols: result.pass\n };\n };\n const clone = (gridRow, cloneRow, cloneCell) => {\n const newCells = map$1(gridRow.cells, cloneCell);\n return rowcells(cloneRow(gridRow.element), newCells, gridRow.section, true);\n };\n\n const LOCKED_COL_ATTR = 'data-snooker-locked-cols';\n const getLockedColumnsFromTable = table => getOpt(table, LOCKED_COL_ATTR).bind(lockedColStr => Optional.from(lockedColStr.match(/\\d+/g))).map(lockedCols => mapToObject(lockedCols, always));\n const getLockedColumnsFromGrid = grid => {\n const locked = foldl(extractGridDetails(grid).rows, (acc, row) => {\n each$2(row.cells, (cell, idx) => {\n if (cell.isLocked) {\n acc[idx] = true;\n }\n });\n return acc;\n }, {});\n const lockedArr = mapToArray(locked, (_val, key) => parseInt(key, 10));\n return sort$1(lockedArr);\n };\n\n const key = (row, column) => {\n return row + ',' + column;\n };\n const getAt = (warehouse, row, column) => Optional.from(warehouse.access[key(row, column)]);\n const findItem = (warehouse, item, comparator) => {\n const filtered = filterItems(warehouse, detail => {\n return comparator(item, detail.element);\n });\n return filtered.length > 0 ? Optional.some(filtered[0]) : Optional.none();\n };\n const filterItems = (warehouse, predicate) => {\n const all = bind$2(warehouse.all, r => {\n return r.cells;\n });\n return filter$2(all, predicate);\n };\n const generateColumns = rowData => {\n const columnsGroup = {};\n let index = 0;\n each$2(rowData.cells, column => {\n const colspan = column.colspan;\n range$1(colspan, columnIndex => {\n const colIndex = index + columnIndex;\n columnsGroup[colIndex] = columnext(column.element, colspan, colIndex);\n });\n index += colspan;\n });\n return columnsGroup;\n };\n const generate$1 = list => {\n const access = {};\n const cells = [];\n const tableOpt = head(list).map(rowData => rowData.element).bind(table);\n const lockedColumns = tableOpt.bind(getLockedColumnsFromTable).getOr({});\n let maxRows = 0;\n let maxColumns = 0;\n let rowCount = 0;\n const {\n pass: colgroupRows,\n fail: rows\n } = partition(list, rowData => rowData.section === 'colgroup');\n each$2(rows, rowData => {\n const currentRow = [];\n each$2(rowData.cells, rowCell => {\n let start = 0;\n while (access[key(rowCount, start)] !== undefined) {\n start++;\n }\n const isLocked = hasNonNullableKey(lockedColumns, start.toString());\n const current = extended(rowCell.element, rowCell.rowspan, rowCell.colspan, rowCount, start, isLocked);\n for (let occupiedColumnPosition = 0; occupiedColumnPosition < rowCell.colspan; occupiedColumnPosition++) {\n for (let occupiedRowPosition = 0; occupiedRowPosition < rowCell.rowspan; occupiedRowPosition++) {\n const rowPosition = rowCount + occupiedRowPosition;\n const columnPosition = start + occupiedColumnPosition;\n const newpos = key(rowPosition, columnPosition);\n access[newpos] = current;\n maxColumns = Math.max(maxColumns, columnPosition + 1);\n }\n }\n currentRow.push(current);\n });\n maxRows++;\n cells.push(rowdetail(rowData.element, currentRow, rowData.section));\n rowCount++;\n });\n const {columns, colgroups} = last$2(colgroupRows).map(rowData => {\n const columns = generateColumns(rowData);\n const colgroup$1 = colgroup(rowData.element, values(columns));\n return {\n colgroups: [colgroup$1],\n columns\n };\n }).getOrThunk(() => ({\n colgroups: [],\n columns: {}\n }));\n const grid$1 = grid(maxRows, maxColumns);\n return {\n grid: grid$1,\n access,\n all: cells,\n columns,\n colgroups\n };\n };\n const fromTable = table => {\n const list = fromTable$1(table);\n return generate$1(list);\n };\n const justCells = warehouse => bind$2(warehouse.all, w => w.cells);\n const justColumns = warehouse => values(warehouse.columns);\n const hasColumns = warehouse => keys(warehouse.columns).length > 0;\n const getColumnAt = (warehouse, columnIndex) => Optional.from(warehouse.columns[columnIndex]);\n const Warehouse = {\n fromTable,\n generate: generate$1,\n getAt,\n findItem,\n filterItems,\n justCells,\n justColumns,\n hasColumns,\n getColumnAt\n };\n\n const columns = (warehouse, isValidCell = always) => {\n const grid = warehouse.grid;\n const cols = range$1(grid.columns, identity);\n const rowsArr = range$1(grid.rows, identity);\n return map$1(cols, col => {\n const getBlock = () => bind$2(rowsArr, r => Warehouse.getAt(warehouse, r, col).filter(detail => detail.column === col).toArray());\n const isValid = detail => detail.colspan === 1 && isValidCell(detail.element);\n const getFallback = () => Warehouse.getAt(warehouse, 0, col);\n return decide(getBlock, isValid, getFallback);\n });\n };\n const decide = (getBlock, isValid, getFallback) => {\n const inBlock = getBlock();\n const validInBlock = find$1(inBlock, isValid);\n const detailOption = validInBlock.orThunk(() => Optional.from(inBlock[0]).orThunk(getFallback));\n return detailOption.map(detail => detail.element);\n };\n const rows = warehouse => {\n const grid = warehouse.grid;\n const rowsArr = range$1(grid.rows, identity);\n const cols = range$1(grid.columns, identity);\n return map$1(rowsArr, row => {\n const getBlock = () => bind$2(cols, c => Warehouse.getAt(warehouse, row, c).filter(detail => detail.row === row).fold(constant([]), detail => [detail]));\n const isSingle = detail => detail.rowspan === 1;\n const getFallback = () => Warehouse.getAt(warehouse, row, 0);\n return decide(getBlock, isSingle, getFallback);\n });\n };\n\n const deduce = (xs, index) => {\n if (index < 0 || index >= xs.length - 1) {\n return Optional.none();\n }\n const current = xs[index].fold(() => {\n const rest = reverse(xs.slice(0, index));\n return findMap(rest, (a, i) => a.map(aa => ({\n value: aa,\n delta: i + 1\n })));\n }, c => Optional.some({\n value: c,\n delta: 0\n }));\n const next = xs[index + 1].fold(() => {\n const rest = xs.slice(index + 1);\n return findMap(rest, (a, i) => a.map(aa => ({\n value: aa,\n delta: i + 1\n })));\n }, n => Optional.some({\n value: n,\n delta: 1\n }));\n return current.bind(c => next.map(n => {\n const extras = n.delta + c.delta;\n return Math.abs(n.value - c.value) / extras;\n }));\n };\n\n const onDirection = (isLtr, isRtl) => element => getDirection(element) === 'rtl' ? isRtl : isLtr;\n const getDirection = element => get$a(element, 'direction') === 'rtl' ? 'rtl' : 'ltr';\n\n const api$1 = Dimension('height', element => {\n const dom = element.dom;\n return inBody(element) ? dom.getBoundingClientRect().height : dom.offsetHeight;\n });\n const get$8 = element => api$1.get(element);\n const getOuter$1 = element => api$1.getOuter(element);\n const getRuntime = getHeight$1;\n\n const r = (left, top) => {\n const translate = (x, y) => r(left + x, top + y);\n return {\n left,\n top,\n translate\n };\n };\n const SugarPosition = r;\n\n const boxPosition = dom => {\n const box = dom.getBoundingClientRect();\n return SugarPosition(box.left, box.top);\n };\n const firstDefinedOrZero = (a, b) => {\n if (a !== undefined) {\n return a;\n } else {\n return b !== undefined ? b : 0;\n }\n };\n const absolute = element => {\n const doc = element.dom.ownerDocument;\n const body = doc.body;\n const win = doc.defaultView;\n const html = doc.documentElement;\n if (body === element.dom) {\n return SugarPosition(body.offsetLeft, body.offsetTop);\n }\n const scrollTop = firstDefinedOrZero(win === null || win === void 0 ? void 0 : win.pageYOffset, html.scrollTop);\n const scrollLeft = firstDefinedOrZero(win === null || win === void 0 ? void 0 : win.pageXOffset, html.scrollLeft);\n const clientTop = firstDefinedOrZero(html.clientTop, body.clientTop);\n const clientLeft = firstDefinedOrZero(html.clientLeft, body.clientLeft);\n return viewport(element).translate(scrollLeft - clientLeft, scrollTop - clientTop);\n };\n const viewport = element => {\n const dom = element.dom;\n const doc = dom.ownerDocument;\n const body = doc.body;\n if (body === dom) {\n return SugarPosition(body.offsetLeft, body.offsetTop);\n }\n if (!inBody(element)) {\n return SugarPosition(0, 0);\n }\n return boxPosition(dom);\n };\n\n const rowInfo = (row, y) => ({\n row,\n y\n });\n const colInfo = (col, x) => ({\n col,\n x\n });\n const rtlEdge = cell => {\n const pos = absolute(cell);\n return pos.left + getOuter$2(cell);\n };\n const ltrEdge = cell => {\n return absolute(cell).left;\n };\n const getLeftEdge = (index, cell) => {\n return colInfo(index, ltrEdge(cell));\n };\n const getRightEdge = (index, cell) => {\n return colInfo(index, rtlEdge(cell));\n };\n const getTop$1 = cell => {\n return absolute(cell).top;\n };\n const getTopEdge = (index, cell) => {\n return rowInfo(index, getTop$1(cell));\n };\n const getBottomEdge = (index, cell) => {\n return rowInfo(index, getTop$1(cell) + getOuter$1(cell));\n };\n const findPositions = (getInnerEdge, getOuterEdge, array) => {\n if (array.length === 0) {\n return [];\n }\n const lines = map$1(array.slice(1), (cellOption, index) => {\n return cellOption.map(cell => {\n return getInnerEdge(index, cell);\n });\n });\n const lastLine = array[array.length - 1].map(cell => {\n return getOuterEdge(array.length - 1, cell);\n });\n return lines.concat([lastLine]);\n };\n const negate = step => {\n return -step;\n };\n const height = {\n delta: identity,\n positions: optElements => findPositions(getTopEdge, getBottomEdge, optElements),\n edge: getTop$1\n };\n const ltr$1 = {\n delta: identity,\n edge: ltrEdge,\n positions: optElements => findPositions(getLeftEdge, getRightEdge, optElements)\n };\n const rtl$1 = {\n delta: negate,\n edge: rtlEdge,\n positions: optElements => findPositions(getRightEdge, getLeftEdge, optElements)\n };\n const detect$1 = onDirection(ltr$1, rtl$1);\n const width = {\n delta: (amount, table) => detect$1(table).delta(amount, table),\n positions: (cols, table) => detect$1(table).positions(cols, table),\n edge: cell => detect$1(cell).edge(cell)\n };\n\n const units = {\n unsupportedLength: [\n 'em',\n 'ex',\n 'cap',\n 'ch',\n 'ic',\n 'rem',\n 'lh',\n 'rlh',\n 'vw',\n 'vh',\n 'vi',\n 'vb',\n 'vmin',\n 'vmax',\n 'cm',\n 'mm',\n 'Q',\n 'in',\n 'pc',\n 'pt',\n 'px'\n ],\n fixed: [\n 'px',\n 'pt'\n ],\n relative: ['%'],\n empty: ['']\n };\n const pattern = (() => {\n const decimalDigits = '[0-9]+';\n const signedInteger = '[+-]?' + decimalDigits;\n const exponentPart = '[eE]' + signedInteger;\n const dot = '\\\\.';\n const opt = input => `(?:${ input })?`;\n const unsignedDecimalLiteral = [\n 'Infinity',\n decimalDigits + dot + opt(decimalDigits) + opt(exponentPart),\n dot + decimalDigits + opt(exponentPart),\n decimalDigits + opt(exponentPart)\n ].join('|');\n const float = `[+-]?(?:${ unsignedDecimalLiteral })`;\n return new RegExp(`^(${ float })(.*)$`);\n })();\n const isUnit = (unit, accepted) => exists(accepted, acc => exists(units[acc], check => unit === check));\n const parse = (input, accepted) => {\n const match = Optional.from(pattern.exec(input));\n return match.bind(array => {\n const value = Number(array[1]);\n const unitRaw = array[2];\n if (isUnit(unitRaw, accepted)) {\n return Optional.some({\n value,\n unit: unitRaw\n });\n } else {\n return Optional.none();\n }\n });\n };\n\n const rPercentageBasedSizeRegex = /(\\d+(\\.\\d+)?)%/;\n const rPixelBasedSizeRegex = /(\\d+(\\.\\d+)?)px|em/;\n const isCol$2 = isTag('col');\n const getPercentSize = (elm, outerGetter, innerGetter) => {\n const relativeParent = parentElement(elm).getOrThunk(() => getBody$1(owner(elm)));\n return outerGetter(elm) / innerGetter(relativeParent) * 100;\n };\n const setPixelWidth = (cell, amount) => {\n set$1(cell, 'width', amount + 'px');\n };\n const setPercentageWidth = (cell, amount) => {\n set$1(cell, 'width', amount + '%');\n };\n const setHeight = (cell, amount) => {\n set$1(cell, 'height', amount + 'px');\n };\n const getHeightValue = cell => getRuntime(cell) + 'px';\n const convert = (cell, number, getter, setter) => {\n const newSize = table(cell).map(table => {\n const total = getter(table);\n return Math.floor(number / 100 * total);\n }).getOr(number);\n setter(cell, newSize);\n return newSize;\n };\n const normalizePixelSize = (value, cell, getter, setter) => {\n const number = parseFloat(value);\n return endsWith(value, '%') && name(cell) !== 'table' ? convert(cell, number, getter, setter) : number;\n };\n const getTotalHeight = cell => {\n const value = getHeightValue(cell);\n if (!value) {\n return get$8(cell);\n }\n return normalizePixelSize(value, cell, get$8, setHeight);\n };\n const get$7 = (cell, type, f) => {\n const v = f(cell);\n const span = getSpan(cell, type);\n return v / span;\n };\n const getRaw$1 = (element, prop) => {\n return getRaw$2(element, prop).orThunk(() => {\n return getOpt(element, prop).map(val => val + 'px');\n });\n };\n const getRawWidth$1 = element => getRaw$1(element, 'width');\n const getRawHeight = element => getRaw$1(element, 'height');\n const getPercentageWidth = cell => getPercentSize(cell, get$9, getInner);\n const getPixelWidth$1 = cell => isCol$2(cell) ? get$9(cell) : getRuntime$1(cell);\n const getHeight = cell => {\n return get$7(cell, 'rowspan', getTotalHeight);\n };\n const getGenericWidth = cell => {\n const width = getRawWidth$1(cell);\n return width.bind(w => parse(w, [\n 'fixed',\n 'relative',\n 'empty'\n ]));\n };\n const setGenericWidth = (cell, amount, unit) => {\n set$1(cell, 'width', amount + unit);\n };\n const getPixelTableWidth = table => get$9(table) + 'px';\n const getPercentTableWidth = table => getPercentSize(table, get$9, getInner) + '%';\n const isPercentSizing$1 = table => getRawWidth$1(table).exists(size => rPercentageBasedSizeRegex.test(size));\n const isPixelSizing$1 = table => getRawWidth$1(table).exists(size => rPixelBasedSizeRegex.test(size));\n const isNoneSizing$1 = table => getRawWidth$1(table).isNone();\n const percentageBasedSizeRegex = constant(rPercentageBasedSizeRegex);\n\n const isCol$1 = isTag('col');\n const getRawW = cell => {\n return getRawWidth$1(cell).getOrThunk(() => getPixelWidth$1(cell) + 'px');\n };\n const getRawH = cell => {\n return getRawHeight(cell).getOrThunk(() => getHeight(cell) + 'px');\n };\n const justCols = warehouse => map$1(Warehouse.justColumns(warehouse), column => Optional.from(column.element));\n const isValidColumn = cell => {\n const browser = detect$2().browser;\n const supportsColWidths = browser.isChromium() || browser.isFirefox();\n return isCol$1(cell) ? supportsColWidths : true;\n };\n const getDimension = (cellOpt, index, backups, filter, getter, fallback) => cellOpt.filter(filter).fold(() => fallback(deduce(backups, index)), cell => getter(cell));\n const getWidthFrom = (warehouse, table, getWidth, fallback) => {\n const columnCells = columns(warehouse);\n const columns$1 = Warehouse.hasColumns(warehouse) ? justCols(warehouse) : columnCells;\n const backups = [Optional.some(width.edge(table))].concat(map$1(width.positions(columnCells, table), pos => pos.map(p => p.x)));\n const colFilter = not(hasColspan);\n return map$1(columns$1, (cellOption, c) => {\n return getDimension(cellOption, c, backups, colFilter, column => {\n if (isValidColumn(column)) {\n return getWidth(column);\n } else {\n const cell = bindFrom(columnCells[c], identity);\n return getDimension(cell, c, backups, colFilter, cell => fallback(Optional.some(get$9(cell))), fallback);\n }\n }, fallback);\n });\n };\n const getDeduced = deduced => {\n return deduced.map(d => {\n return d + 'px';\n }).getOr('');\n };\n const getRawWidths = (warehouse, table) => {\n return getWidthFrom(warehouse, table, getRawW, getDeduced);\n };\n const getPercentageWidths = (warehouse, table, tableSize) => {\n return getWidthFrom(warehouse, table, getPercentageWidth, deduced => {\n return deduced.fold(() => {\n return tableSize.minCellWidth();\n }, cellWidth => {\n return cellWidth / tableSize.pixelWidth() * 100;\n });\n });\n };\n const getPixelWidths = (warehouse, table, tableSize) => {\n return getWidthFrom(warehouse, table, getPixelWidth$1, deduced => {\n return deduced.getOrThunk(tableSize.minCellWidth);\n });\n };\n const getHeightFrom = (warehouse, table, direction, getHeight, fallback) => {\n const rows$1 = rows(warehouse);\n const backups = [Optional.some(direction.edge(table))].concat(map$1(direction.positions(rows$1, table), pos => pos.map(p => p.y)));\n return map$1(rows$1, (cellOption, c) => {\n return getDimension(cellOption, c, backups, not(hasRowspan), getHeight, fallback);\n });\n };\n const getPixelHeights = (warehouse, table, direction) => {\n return getHeightFrom(warehouse, table, direction, getHeight, deduced => {\n return deduced.getOrThunk(minHeight);\n });\n };\n const getRawHeights = (warehouse, table, direction) => {\n return getHeightFrom(warehouse, table, direction, getRawH, getDeduced);\n };\n\n const widthLookup = (table, getter) => () => {\n if (inBody(table)) {\n return getter(table);\n } else {\n return parseFloat(getRaw$2(table, 'width').getOr('0'));\n }\n };\n const noneSize = table => {\n const getWidth = widthLookup(table, get$9);\n const zero = constant(0);\n const getWidths = (warehouse, tableSize) => getPixelWidths(warehouse, table, tableSize);\n return {\n width: getWidth,\n pixelWidth: getWidth,\n getWidths,\n getCellDelta: zero,\n singleColumnWidth: constant([0]),\n minCellWidth: zero,\n setElementWidth: noop,\n adjustTableWidth: noop,\n isRelative: true,\n label: 'none'\n };\n };\n const percentageSize = table => {\n const getFloatWidth = widthLookup(table, elem => parseFloat(getPercentTableWidth(elem)));\n const getWidth = widthLookup(table, get$9);\n const getCellDelta = delta => delta / getWidth() * 100;\n const singleColumnWidth = (w, _delta) => [100 - w];\n const minCellWidth = () => minWidth() / getWidth() * 100;\n const adjustTableWidth = delta => {\n const currentWidth = getFloatWidth();\n const change = delta / 100 * currentWidth;\n const newWidth = currentWidth + change;\n setPercentageWidth(table, newWidth);\n };\n const getWidths = (warehouse, tableSize) => getPercentageWidths(warehouse, table, tableSize);\n return {\n width: getFloatWidth,\n pixelWidth: getWidth,\n getWidths,\n getCellDelta,\n singleColumnWidth,\n minCellWidth,\n setElementWidth: setPercentageWidth,\n adjustTableWidth,\n isRelative: true,\n label: 'percent'\n };\n };\n const pixelSize = table => {\n const getWidth = widthLookup(table, get$9);\n const getCellDelta = identity;\n const singleColumnWidth = (w, delta) => {\n const newNext = Math.max(minWidth(), w + delta);\n return [newNext - w];\n };\n const adjustTableWidth = delta => {\n const newWidth = getWidth() + delta;\n setPixelWidth(table, newWidth);\n };\n const getWidths = (warehouse, tableSize) => getPixelWidths(warehouse, table, tableSize);\n return {\n width: getWidth,\n pixelWidth: getWidth,\n getWidths,\n getCellDelta,\n singleColumnWidth,\n minCellWidth: minWidth,\n setElementWidth: setPixelWidth,\n adjustTableWidth,\n isRelative: false,\n label: 'pixel'\n };\n };\n const chooseSize = (element, width) => {\n const percentMatch = percentageBasedSizeRegex().exec(width);\n if (percentMatch !== null) {\n return percentageSize(element);\n } else {\n return pixelSize(element);\n }\n };\n const getTableSize = table => {\n const width = getRawWidth$1(table);\n return width.fold(() => noneSize(table), w => chooseSize(table, w));\n };\n const TableSize = {\n getTableSize,\n pixelSize,\n percentageSize,\n noneSize\n };\n\n const statsStruct = (minRow, minCol, maxRow, maxCol, allCells, selectedCells) => ({\n minRow,\n minCol,\n maxRow,\n maxCol,\n allCells,\n selectedCells\n });\n const findSelectedStats = (house, isSelected) => {\n const totalColumns = house.grid.columns;\n const totalRows = house.grid.rows;\n let minRow = totalRows;\n let minCol = totalColumns;\n let maxRow = 0;\n let maxCol = 0;\n const allCells = [];\n const selectedCells = [];\n each$1(house.access, detail => {\n allCells.push(detail);\n if (isSelected(detail)) {\n selectedCells.push(detail);\n const startRow = detail.row;\n const endRow = startRow + detail.rowspan - 1;\n const startCol = detail.column;\n const endCol = startCol + detail.colspan - 1;\n if (startRow < minRow) {\n minRow = startRow;\n } else if (endRow > maxRow) {\n maxRow = endRow;\n }\n if (startCol < minCol) {\n minCol = startCol;\n } else if (endCol > maxCol) {\n maxCol = endCol;\n }\n }\n });\n return statsStruct(minRow, minCol, maxRow, maxCol, allCells, selectedCells);\n };\n const makeCell = (list, seenSelected, rowIndex) => {\n const row = list[rowIndex].element;\n const td = SugarElement.fromTag('td');\n append$1(td, SugarElement.fromTag('br'));\n const f = seenSelected ? append$1 : prepend;\n f(row, td);\n };\n const fillInGaps = (list, house, stats, isSelected) => {\n const rows = filter$2(list, row => row.section !== 'colgroup');\n const totalColumns = house.grid.columns;\n const totalRows = house.grid.rows;\n for (let i = 0; i < totalRows; i++) {\n let seenSelected = false;\n for (let j = 0; j < totalColumns; j++) {\n if (!(i < stats.minRow || i > stats.maxRow || j < stats.minCol || j > stats.maxCol)) {\n const needCell = Warehouse.getAt(house, i, j).filter(isSelected).isNone();\n if (needCell) {\n makeCell(rows, seenSelected, i);\n } else {\n seenSelected = true;\n }\n }\n }\n }\n };\n const clean = (replica, stats, house, widthDelta) => {\n each$1(house.columns, col => {\n if (col.column < stats.minCol || col.column > stats.maxCol) {\n remove$6(col.element);\n }\n });\n const emptyRows = filter$2(firstLayer(replica, 'tr'), row => row.dom.childElementCount === 0);\n each$2(emptyRows, remove$6);\n if (stats.minCol === stats.maxCol || stats.minRow === stats.maxRow) {\n each$2(firstLayer(replica, 'th,td'), cell => {\n remove$7(cell, 'rowspan');\n remove$7(cell, 'colspan');\n });\n }\n remove$7(replica, LOCKED_COL_ATTR);\n remove$7(replica, 'data-snooker-col-series');\n const tableSize = TableSize.getTableSize(replica);\n tableSize.adjustTableWidth(widthDelta);\n };\n const getTableWidthDelta = (table, warehouse, tableSize, stats) => {\n if (stats.minCol === 0 && warehouse.grid.columns === stats.maxCol + 1) {\n return 0;\n }\n const colWidths = getPixelWidths(warehouse, table, tableSize);\n const allColsWidth = foldl(colWidths, (acc, width) => acc + width, 0);\n const selectedColsWidth = foldl(colWidths.slice(stats.minCol, stats.maxCol + 1), (acc, width) => acc + width, 0);\n const newWidth = selectedColsWidth / allColsWidth * tableSize.pixelWidth();\n const delta = newWidth - tableSize.pixelWidth();\n return tableSize.getCellDelta(delta);\n };\n const extract$1 = (table, selectedSelector) => {\n const isSelected = detail => is$2(detail.element, selectedSelector);\n const replica = deep(table);\n const list = fromTable$1(replica);\n const tableSize = TableSize.getTableSize(table);\n const replicaHouse = Warehouse.generate(list);\n const replicaStats = findSelectedStats(replicaHouse, isSelected);\n const selector = 'th:not(' + selectedSelector + ')' + ',td:not(' + selectedSelector + ')';\n const unselectedCells = filterFirstLayer(replica, 'th,td', cell => is$2(cell, selector));\n each$2(unselectedCells, remove$6);\n fillInGaps(list, replicaHouse, replicaStats, isSelected);\n const house = Warehouse.fromTable(table);\n const widthDelta = getTableWidthDelta(table, house, tableSize, replicaStats);\n clean(replica, replicaStats, replicaHouse, widthDelta);\n return replica;\n };\n\n const nbsp = '\\xA0';\n\n const NodeValue = (is, name) => {\n const get = element => {\n if (!is(element)) {\n throw new Error('Can only get ' + name + ' value of a ' + name + ' node');\n }\n return getOption(element).getOr('');\n };\n const getOption = element => is(element) ? Optional.from(element.dom.nodeValue) : Optional.none();\n const set = (element, value) => {\n if (!is(element)) {\n throw new Error('Can only set raw ' + name + ' value of a ' + name + ' node');\n }\n element.dom.nodeValue = value;\n };\n return {\n get,\n getOption,\n set\n };\n };\n\n const api = NodeValue(isText, 'text');\n const get$6 = element => api.get(element);\n const getOption = element => api.getOption(element);\n const set = (element, value) => api.set(element, value);\n\n const getEnd = element => name(element) === 'img' ? 1 : getOption(element).fold(() => children$2(element).length, v => v.length);\n const isTextNodeWithCursorPosition = el => getOption(el).filter(text => text.trim().length !== 0 || text.indexOf(nbsp) > -1).isSome();\n const isContentEditableFalse = elem => isHTMLElement(elem) && get$b(elem, 'contenteditable') === 'false';\n const elementsWithCursorPosition = [\n 'img',\n 'br'\n ];\n const isCursorPosition = elem => {\n const hasCursorPosition = isTextNodeWithCursorPosition(elem);\n return hasCursorPosition || contains$2(elementsWithCursorPosition, name(elem)) || isContentEditableFalse(elem);\n };\n\n const first = element => descendant$1(element, isCursorPosition);\n const last$1 = element => descendantRtl(element, isCursorPosition);\n const descendantRtl = (scope, predicate) => {\n const descend = element => {\n const children = children$2(element);\n for (let i = children.length - 1; i >= 0; i--) {\n const child = children[i];\n if (predicate(child)) {\n return Optional.some(child);\n }\n const res = descend(child);\n if (res.isSome()) {\n return res;\n }\n }\n return Optional.none();\n };\n return descend(scope);\n };\n\n const transferableAttributes = {\n scope: [\n 'row',\n 'col'\n ]\n };\n const createCell = doc => () => {\n const td = SugarElement.fromTag('td', doc.dom);\n append$1(td, SugarElement.fromTag('br', doc.dom));\n return td;\n };\n const createCol = doc => () => {\n return SugarElement.fromTag('col', doc.dom);\n };\n const createColgroup = doc => () => {\n return SugarElement.fromTag('colgroup', doc.dom);\n };\n const createRow$1 = doc => () => {\n return SugarElement.fromTag('tr', doc.dom);\n };\n const replace$1 = (cell, tag, attrs) => {\n const replica = copy$2(cell, tag);\n each$1(attrs, (v, k) => {\n if (v === null) {\n remove$7(replica, k);\n } else {\n set$2(replica, k, v);\n }\n });\n return replica;\n };\n const pasteReplace = cell => {\n return cell;\n };\n const cloneFormats = (oldCell, newCell, formats) => {\n const first$1 = first(oldCell);\n return first$1.map(firstText => {\n const formatSelector = formats.join(',');\n const parents = ancestors$3(firstText, formatSelector, element => {\n return eq$1(element, oldCell);\n });\n return foldr(parents, (last, parent) => {\n const clonedFormat = shallow(parent);\n append$1(last, clonedFormat);\n return clonedFormat;\n }, newCell);\n }).getOr(newCell);\n };\n const cloneAppropriateAttributes = (original, clone) => {\n each$1(transferableAttributes, (validAttributes, attributeName) => getOpt(original, attributeName).filter(attribute => contains$2(validAttributes, attribute)).each(attribute => set$2(clone, attributeName, attribute)));\n };\n const cellOperations = (mutate, doc, formatsToClone) => {\n const cloneCss = (prev, clone) => {\n copy$1(prev.element, clone);\n remove$5(clone, 'height');\n if (prev.colspan !== 1) {\n remove$5(clone, 'width');\n }\n };\n const newCell = prev => {\n const td = SugarElement.fromTag(name(prev.element), doc.dom);\n const formats = formatsToClone.getOr([\n 'strong',\n 'em',\n 'b',\n 'i',\n 'span',\n 'font',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'p',\n 'div'\n ]);\n const lastNode = formats.length > 0 ? cloneFormats(prev.element, td, formats) : td;\n append$1(lastNode, SugarElement.fromTag('br'));\n cloneCss(prev, td);\n cloneAppropriateAttributes(prev.element, td);\n mutate(prev.element, td);\n return td;\n };\n const newCol = prev => {\n const col = SugarElement.fromTag(name(prev.element), doc.dom);\n cloneCss(prev, col);\n mutate(prev.element, col);\n return col;\n };\n return {\n col: newCol,\n colgroup: createColgroup(doc),\n row: createRow$1(doc),\n cell: newCell,\n replace: replace$1,\n colGap: createCol(doc),\n gap: createCell(doc)\n };\n };\n const paste$1 = doc => {\n return {\n col: createCol(doc),\n colgroup: createColgroup(doc),\n row: createRow$1(doc),\n cell: createCell(doc),\n replace: pasteReplace,\n colGap: createCol(doc),\n gap: createCell(doc)\n };\n };\n\n const fromHtml = (html, scope) => {\n const doc = scope || document;\n const div = doc.createElement('div');\n div.innerHTML = html;\n return children$2(SugarElement.fromDom(div));\n };\n const fromDom = nodes => map$1(nodes, SugarElement.fromDom);\n\n const option = name => editor => editor.options.get(name);\n const defaultWidth = '100%';\n const getPixelForcedWidth = editor => {\n var _a;\n const dom = editor.dom;\n const parentBlock = (_a = dom.getParent(editor.selection.getStart(), dom.isBlock)) !== null && _a !== void 0 ? _a : editor.getBody();\n return getInner(SugarElement.fromDom(parentBlock)) + 'px';\n };\n const determineDefaultTableStyles = (editor, defaultStyles) => {\n if (isTableResponsiveForced(editor) || !shouldStyleWithCss(editor)) {\n return defaultStyles;\n } else if (isTablePixelsForced(editor)) {\n return {\n ...defaultStyles,\n width: getPixelForcedWidth(editor)\n };\n } else {\n return {\n ...defaultStyles,\n width: defaultWidth\n };\n }\n };\n const determineDefaultTableAttributes = (editor, defaultAttributes) => {\n if (isTableResponsiveForced(editor) || shouldStyleWithCss(editor)) {\n return defaultAttributes;\n } else if (isTablePixelsForced(editor)) {\n return {\n ...defaultAttributes,\n width: getPixelForcedWidth(editor)\n };\n } else {\n return {\n ...defaultAttributes,\n width: defaultWidth\n };\n }\n };\n const register = editor => {\n const registerOption = editor.options.register;\n registerOption('table_clone_elements', { processor: 'string[]' });\n registerOption('table_use_colgroups', {\n processor: 'boolean',\n default: true\n });\n registerOption('table_header_type', {\n processor: value => {\n const valid = contains$2([\n 'section',\n 'cells',\n 'sectionCells',\n 'auto'\n ], value);\n return valid ? {\n value,\n valid\n } : {\n valid: false,\n message: 'Must be one of: section, cells, sectionCells or auto.'\n };\n },\n default: 'section'\n });\n registerOption('table_sizing_mode', {\n processor: 'string',\n default: 'auto'\n });\n registerOption('table_default_attributes', {\n processor: 'object',\n default: { border: '1' }\n });\n registerOption('table_default_styles', {\n processor: 'object',\n default: { 'border-collapse': 'collapse' }\n });\n registerOption('table_column_resizing', {\n processor: value => {\n const valid = contains$2([\n 'preservetable',\n 'resizetable'\n ], value);\n return valid ? {\n value,\n valid\n } : {\n valid: false,\n message: 'Must be preservetable, or resizetable.'\n };\n },\n default: 'preservetable'\n });\n registerOption('table_resize_bars', {\n processor: 'boolean',\n default: true\n });\n registerOption('table_style_by_css', {\n processor: 'boolean',\n default: true\n });\n registerOption('table_merge_content_on_paste', {\n processor: 'boolean',\n default: true\n });\n };\n const getTableCloneElements = editor => {\n return Optional.from(editor.options.get('table_clone_elements'));\n };\n const hasTableObjectResizing = editor => {\n const objectResizing = editor.options.get('object_resizing');\n return contains$2(objectResizing.split(','), 'table');\n };\n const getTableHeaderType = option('table_header_type');\n const getTableColumnResizingBehaviour = option('table_column_resizing');\n const isPreserveTableColumnResizing = editor => getTableColumnResizingBehaviour(editor) === 'preservetable';\n const isResizeTableColumnResizing = editor => getTableColumnResizingBehaviour(editor) === 'resizetable';\n const getTableSizingMode = option('table_sizing_mode');\n const isTablePercentagesForced = editor => getTableSizingMode(editor) === 'relative';\n const isTablePixelsForced = editor => getTableSizingMode(editor) === 'fixed';\n const isTableResponsiveForced = editor => getTableSizingMode(editor) === 'responsive';\n const hasTableResizeBars = option('table_resize_bars');\n const shouldStyleWithCss = option('table_style_by_css');\n const shouldMergeContentOnPaste = option('table_merge_content_on_paste');\n const getTableDefaultAttributes = editor => {\n const options = editor.options;\n const defaultAttributes = options.get('table_default_attributes');\n return options.isSet('table_default_attributes') ? defaultAttributes : determineDefaultTableAttributes(editor, defaultAttributes);\n };\n const getTableDefaultStyles = editor => {\n const options = editor.options;\n const defaultStyles = options.get('table_default_styles');\n return options.isSet('table_default_styles') ? defaultStyles : determineDefaultTableStyles(editor, defaultStyles);\n };\n const tableUseColumnGroup = option('table_use_colgroups');\n\n const closest = target => closest$1(target, '[contenteditable]');\n const isEditable$1 = (element, assumeEditable = false) => {\n if (inBody(element)) {\n return element.dom.isContentEditable;\n } else {\n return closest(element).fold(constant(assumeEditable), editable => getRaw(editable) === 'true');\n }\n };\n const getRaw = element => element.dom.contentEditable;\n\n const getBody = editor => SugarElement.fromDom(editor.getBody());\n const getIsRoot = editor => element => eq$1(element, getBody(editor));\n const removeDataStyle = table => {\n remove$7(table, 'data-mce-style');\n const removeStyleAttribute = element => remove$7(element, 'data-mce-style');\n each$2(cells$1(table), removeStyleAttribute);\n each$2(columns$1(table), removeStyleAttribute);\n each$2(rows$1(table), removeStyleAttribute);\n };\n const getSelectionStart = editor => SugarElement.fromDom(editor.selection.getStart());\n const getPixelWidth = elm => elm.getBoundingClientRect().width;\n const getPixelHeight = elm => elm.getBoundingClientRect().height;\n const getRawWidth = (editor, elm) => {\n const raw = editor.dom.getStyle(elm, 'width') || editor.dom.getAttrib(elm, 'width');\n return Optional.from(raw).filter(isNotEmpty);\n };\n const isPercentage$1 = value => /^(\\d+(\\.\\d+)?)%$/.test(value);\n const isPixel = value => /^(\\d+(\\.\\d+)?)px$/.test(value);\n const isInEditableContext$1 = cell => closest$2(cell, isTag('table')).exists(isEditable$1);\n\n const inSelection = (bounds, detail) => {\n const leftEdge = detail.column;\n const rightEdge = detail.column + detail.colspan - 1;\n const topEdge = detail.row;\n const bottomEdge = detail.row + detail.rowspan - 1;\n return leftEdge <= bounds.finishCol && rightEdge >= bounds.startCol && (topEdge <= bounds.finishRow && bottomEdge >= bounds.startRow);\n };\n const isWithin = (bounds, detail) => {\n return detail.column >= bounds.startCol && detail.column + detail.colspan - 1 <= bounds.finishCol && detail.row >= bounds.startRow && detail.row + detail.rowspan - 1 <= bounds.finishRow;\n };\n const isRectangular = (warehouse, bounds) => {\n let isRect = true;\n const detailIsWithin = curry(isWithin, bounds);\n for (let i = bounds.startRow; i <= bounds.finishRow; i++) {\n for (let j = bounds.startCol; j <= bounds.finishCol; j++) {\n isRect = isRect && Warehouse.getAt(warehouse, i, j).exists(detailIsWithin);\n }\n }\n return isRect ? Optional.some(bounds) : Optional.none();\n };\n\n const getBounds = (detailA, detailB) => {\n return bounds(Math.min(detailA.row, detailB.row), Math.min(detailA.column, detailB.column), Math.max(detailA.row + detailA.rowspan - 1, detailB.row + detailB.rowspan - 1), Math.max(detailA.column + detailA.colspan - 1, detailB.column + detailB.colspan - 1));\n };\n const getAnyBox = (warehouse, startCell, finishCell) => {\n const startCoords = Warehouse.findItem(warehouse, startCell, eq$1);\n const finishCoords = Warehouse.findItem(warehouse, finishCell, eq$1);\n return startCoords.bind(sc => {\n return finishCoords.map(fc => {\n return getBounds(sc, fc);\n });\n });\n };\n const getBox$1 = (warehouse, startCell, finishCell) => {\n return getAnyBox(warehouse, startCell, finishCell).bind(bounds => {\n return isRectangular(warehouse, bounds);\n });\n };\n\n const moveBy$1 = (warehouse, cell, row, column) => {\n return Warehouse.findItem(warehouse, cell, eq$1).bind(detail => {\n const startRow = row > 0 ? detail.row + detail.rowspan - 1 : detail.row;\n const startCol = column > 0 ? detail.column + detail.colspan - 1 : detail.column;\n const dest = Warehouse.getAt(warehouse, startRow + row, startCol + column);\n return dest.map(d => {\n return d.element;\n });\n });\n };\n const intercepts$1 = (warehouse, start, finish) => {\n return getAnyBox(warehouse, start, finish).map(bounds => {\n const inside = Warehouse.filterItems(warehouse, curry(inSelection, bounds));\n return map$1(inside, detail => {\n return detail.element;\n });\n });\n };\n const parentCell = (warehouse, innerCell) => {\n const isContainedBy = (c1, c2) => {\n return contains$1(c2, c1);\n };\n return Warehouse.findItem(warehouse, innerCell, isContainedBy).map(detail => {\n return detail.element;\n });\n };\n\n const moveBy = (cell, deltaRow, deltaColumn) => {\n return table(cell).bind(table => {\n const warehouse = getWarehouse(table);\n return moveBy$1(warehouse, cell, deltaRow, deltaColumn);\n });\n };\n const intercepts = (table, first, last) => {\n const warehouse = getWarehouse(table);\n return intercepts$1(warehouse, first, last);\n };\n const nestedIntercepts = (table, first, firstTable, last, lastTable) => {\n const warehouse = getWarehouse(table);\n const optStartCell = eq$1(table, firstTable) ? Optional.some(first) : parentCell(warehouse, first);\n const optLastCell = eq$1(table, lastTable) ? Optional.some(last) : parentCell(warehouse, last);\n return optStartCell.bind(startCell => optLastCell.bind(lastCell => intercepts$1(warehouse, startCell, lastCell)));\n };\n const getBox = (table, first, last) => {\n const warehouse = getWarehouse(table);\n return getBox$1(warehouse, first, last);\n };\n const getWarehouse = Warehouse.fromTable;\n\n var TagBoundaries = [\n 'body',\n 'p',\n 'div',\n 'article',\n 'aside',\n 'figcaption',\n 'figure',\n 'footer',\n 'header',\n 'nav',\n 'section',\n 'ol',\n 'ul',\n 'li',\n 'table',\n 'thead',\n 'tbody',\n 'tfoot',\n 'caption',\n 'tr',\n 'td',\n 'th',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'blockquote',\n 'pre',\n 'address'\n ];\n\n var DomUniverse = () => {\n const clone = element => {\n return SugarElement.fromDom(element.dom.cloneNode(false));\n };\n const document = element => documentOrOwner(element).dom;\n const isBoundary = element => {\n if (!isElement(element)) {\n return false;\n }\n if (name(element) === 'body') {\n return true;\n }\n return contains$2(TagBoundaries, name(element));\n };\n const isEmptyTag = element => {\n if (!isElement(element)) {\n return false;\n }\n return contains$2([\n 'br',\n 'img',\n 'hr',\n 'input'\n ], name(element));\n };\n const isNonEditable = element => isElement(element) && get$b(element, 'contenteditable') === 'false';\n const comparePosition = (element, other) => {\n return element.dom.compareDocumentPosition(other.dom);\n };\n const copyAttributesTo = (source, destination) => {\n const as = clone$2(source);\n setAll$1(destination, as);\n };\n const isSpecial = element => {\n const tag = name(element);\n return contains$2([\n 'script',\n 'noscript',\n 'iframe',\n 'noframes',\n 'noembed',\n 'title',\n 'style',\n 'textarea',\n 'xmp'\n ], tag);\n };\n const getLanguage = element => isElement(element) ? getOpt(element, 'lang') : Optional.none();\n return {\n up: constant({\n selector: ancestor$1,\n closest: closest$1,\n predicate: ancestor$2,\n all: parents\n }),\n down: constant({\n selector: descendants,\n predicate: descendants$1\n }),\n styles: constant({\n get: get$a,\n getRaw: getRaw$2,\n set: set$1,\n remove: remove$5\n }),\n attrs: constant({\n get: get$b,\n set: set$2,\n remove: remove$7,\n copyTo: copyAttributesTo\n }),\n insert: constant({\n before: before$3,\n after: after$5,\n afterAll: after$4,\n append: append$1,\n appendAll: append,\n prepend: prepend,\n wrap: wrap\n }),\n remove: constant({\n unwrap: unwrap,\n remove: remove$6\n }),\n create: constant({\n nu: SugarElement.fromTag,\n clone,\n text: SugarElement.fromText\n }),\n query: constant({\n comparePosition,\n prevSibling: prevSibling,\n nextSibling: nextSibling\n }),\n property: constant({\n children: children$2,\n name: name,\n parent: parent,\n document,\n isText: isText,\n isComment: isComment,\n isElement: isElement,\n isSpecial,\n getLanguage,\n getText: get$6,\n setText: set,\n isBoundary,\n isEmptyTag,\n isNonEditable\n }),\n eq: eq$1,\n is: is$1\n };\n };\n\n const all = (universe, look, elements, f) => {\n const head = elements[0];\n const tail = elements.slice(1);\n return f(universe, look, head, tail);\n };\n const oneAll = (universe, look, elements) => {\n return elements.length > 0 ? all(universe, look, elements, unsafeOne) : Optional.none();\n };\n const unsafeOne = (universe, look, head, tail) => {\n const start = look(universe, head);\n return foldr(tail, (b, a) => {\n const current = look(universe, a);\n return commonElement(universe, b, current);\n }, start);\n };\n const commonElement = (universe, start, end) => {\n return start.bind(s => {\n return end.filter(curry(universe.eq, s));\n });\n };\n\n const eq = (universe, item) => {\n return curry(universe.eq, item);\n };\n const ancestors$2 = (universe, start, end, isRoot = never) => {\n const ps1 = [start].concat(universe.up().all(start));\n const ps2 = [end].concat(universe.up().all(end));\n const prune = path => {\n const index = findIndex(path, isRoot);\n return index.fold(() => {\n return path;\n }, ind => {\n return path.slice(0, ind + 1);\n });\n };\n const pruned1 = prune(ps1);\n const pruned2 = prune(ps2);\n const shared = find$1(pruned1, x => {\n return exists(pruned2, eq(universe, x));\n });\n return {\n firstpath: pruned1,\n secondpath: pruned2,\n shared\n };\n };\n\n const sharedOne$1 = oneAll;\n const ancestors$1 = ancestors$2;\n\n const universe$3 = DomUniverse();\n const sharedOne = (look, elements) => {\n return sharedOne$1(universe$3, (_universe, element) => {\n return look(element);\n }, elements);\n };\n const ancestors = (start, finish, isRoot) => {\n return ancestors$1(universe$3, start, finish, isRoot);\n };\n\n const lookupTable = container => {\n return ancestor$1(container, 'table');\n };\n const identify = (start, finish, isRoot) => {\n const getIsRoot = rootTable => {\n return element => {\n return isRoot !== undefined && isRoot(element) || eq$1(element, rootTable);\n };\n };\n if (eq$1(start, finish)) {\n return Optional.some({\n boxes: Optional.some([start]),\n start,\n finish\n });\n } else {\n return lookupTable(start).bind(startTable => {\n return lookupTable(finish).bind(finishTable => {\n if (eq$1(startTable, finishTable)) {\n return Optional.some({\n boxes: intercepts(startTable, start, finish),\n start,\n finish\n });\n } else if (contains$1(startTable, finishTable)) {\n const ancestorCells = ancestors$3(finish, 'td,th', getIsRoot(startTable));\n const finishCell = ancestorCells.length > 0 ? ancestorCells[ancestorCells.length - 1] : finish;\n return Optional.some({\n boxes: nestedIntercepts(startTable, start, startTable, finish, finishTable),\n start,\n finish: finishCell\n });\n } else if (contains$1(finishTable, startTable)) {\n const ancestorCells = ancestors$3(start, 'td,th', getIsRoot(finishTable));\n const startCell = ancestorCells.length > 0 ? ancestorCells[ancestorCells.length - 1] : start;\n return Optional.some({\n boxes: nestedIntercepts(finishTable, start, startTable, finish, finishTable),\n start,\n finish: startCell\n });\n } else {\n return ancestors(start, finish).shared.bind(lca => {\n return closest$1(lca, 'table', isRoot).bind(lcaTable => {\n const finishAncestorCells = ancestors$3(finish, 'td,th', getIsRoot(lcaTable));\n const finishCell = finishAncestorCells.length > 0 ? finishAncestorCells[finishAncestorCells.length - 1] : finish;\n const startAncestorCells = ancestors$3(start, 'td,th', getIsRoot(lcaTable));\n const startCell = startAncestorCells.length > 0 ? startAncestorCells[startAncestorCells.length - 1] : start;\n return Optional.some({\n boxes: nestedIntercepts(lcaTable, start, startTable, finish, finishTable),\n start: startCell,\n finish: finishCell\n });\n });\n });\n }\n });\n });\n }\n };\n const retrieve$1 = (container, selector) => {\n const sels = descendants(container, selector);\n return sels.length > 0 ? Optional.some(sels) : Optional.none();\n };\n const getLast = (boxes, lastSelectedSelector) => {\n return find$1(boxes, box => {\n return is$2(box, lastSelectedSelector);\n });\n };\n const getEdges = (container, firstSelectedSelector, lastSelectedSelector) => {\n return descendant(container, firstSelectedSelector).bind(first => {\n return descendant(container, lastSelectedSelector).bind(last => {\n return sharedOne(lookupTable, [\n first,\n last\n ]).map(table => {\n return {\n first,\n last,\n table\n };\n });\n });\n });\n };\n const expandTo = (finish, firstSelectedSelector) => {\n return ancestor$1(finish, 'table').bind(table => {\n return descendant(table, firstSelectedSelector).bind(start => {\n return identify(start, finish).bind(identified => {\n return identified.boxes.map(boxes => {\n return {\n boxes,\n start: identified.start,\n finish: identified.finish\n };\n });\n });\n });\n });\n };\n const shiftSelection = (boxes, deltaRow, deltaColumn, firstSelectedSelector, lastSelectedSelector) => {\n return getLast(boxes, lastSelectedSelector).bind(last => {\n return moveBy(last, deltaRow, deltaColumn).bind(finish => {\n return expandTo(finish, firstSelectedSelector);\n });\n });\n };\n\n const retrieve = (container, selector) => {\n return retrieve$1(container, selector);\n };\n const retrieveBox = (container, firstSelectedSelector, lastSelectedSelector) => {\n return getEdges(container, firstSelectedSelector, lastSelectedSelector).bind(edges => {\n const isRoot = ancestor => {\n return eq$1(container, ancestor);\n };\n const sectionSelector = 'thead,tfoot,tbody,table';\n const firstAncestor = ancestor$1(edges.first, sectionSelector, isRoot);\n const lastAncestor = ancestor$1(edges.last, sectionSelector, isRoot);\n return firstAncestor.bind(fA => {\n return lastAncestor.bind(lA => {\n return eq$1(fA, lA) ? getBox(edges.table, edges.first, edges.last) : Optional.none();\n });\n });\n });\n };\n\n const selection = identity;\n const unmergable = selectedCells => {\n const hasSpan = (elem, type) => getOpt(elem, type).exists(span => parseInt(span, 10) > 1);\n const hasRowOrColSpan = elem => hasSpan(elem, 'rowspan') || hasSpan(elem, 'colspan');\n return selectedCells.length > 0 && forall(selectedCells, hasRowOrColSpan) ? Optional.some(selectedCells) : Optional.none();\n };\n const mergable = (table, selectedCells, ephemera) => {\n if (selectedCells.length <= 1) {\n return Optional.none();\n } else {\n return retrieveBox(table, ephemera.firstSelectedSelector, ephemera.lastSelectedSelector).map(bounds => ({\n bounds,\n cells: selectedCells\n }));\n }\n };\n\n const strSelected = 'data-mce-selected';\n const strSelectedSelector = 'td[' + strSelected + '],th[' + strSelected + ']';\n const strAttributeSelector = '[' + strSelected + ']';\n const strFirstSelected = 'data-mce-first-selected';\n const strFirstSelectedSelector = 'td[' + strFirstSelected + '],th[' + strFirstSelected + ']';\n const strLastSelected = 'data-mce-last-selected';\n const strLastSelectedSelector = 'td[' + strLastSelected + '],th[' + strLastSelected + ']';\n const attributeSelector = strAttributeSelector;\n const ephemera = {\n selected: strSelected,\n selectedSelector: strSelectedSelector,\n firstSelected: strFirstSelected,\n firstSelectedSelector: strFirstSelectedSelector,\n lastSelected: strLastSelected,\n lastSelectedSelector: strLastSelectedSelector\n };\n\n const forMenu = (selectedCells, table, cell) => ({\n element: cell,\n mergable: mergable(table, selectedCells, ephemera),\n unmergable: unmergable(selectedCells),\n selection: selection(selectedCells)\n });\n const paste = (element, clipboard, generators) => ({\n element,\n clipboard,\n generators\n });\n const pasteRows = (selectedCells, _cell, clipboard, generators) => ({\n selection: selection(selectedCells),\n clipboard,\n generators\n });\n\n const getSelectionCellFallback = element => table(element).bind(table => retrieve(table, ephemera.firstSelectedSelector)).fold(constant(element), cells => cells[0]);\n const getSelectionFromSelector = selector => (initCell, isRoot) => {\n const cellName = name(initCell);\n const cell = cellName === 'col' || cellName === 'colgroup' ? getSelectionCellFallback(initCell) : initCell;\n return closest$1(cell, selector, isRoot);\n };\n const getSelectionCellOrCaption = getSelectionFromSelector('th,td,caption');\n const getSelectionCell = getSelectionFromSelector('th,td');\n const getCellsFromSelection = editor => fromDom(editor.model.table.getSelectedCells());\n const getCellsFromFakeSelection = editor => filter$2(getCellsFromSelection(editor), cell => is$2(cell, ephemera.selectedSelector));\n\n const extractSelected = cells => {\n return table(cells[0]).map(table => {\n const replica = extract$1(table, attributeSelector);\n removeDataStyle(replica);\n return [replica];\n });\n };\n const serializeElements = (editor, elements) => map$1(elements, elm => editor.selection.serializer.serialize(elm.dom, {})).join('');\n const getTextContent = elements => map$1(elements, element => element.dom.innerText).join('');\n const registerEvents = (editor, actions) => {\n editor.on('BeforeGetContent', e => {\n const multiCellContext = cells => {\n e.preventDefault();\n extractSelected(cells).each(elements => {\n e.content = e.format === 'text' ? getTextContent(elements) : serializeElements(editor, elements);\n });\n };\n if (e.selection === true) {\n const cells = getCellsFromFakeSelection(editor);\n if (cells.length >= 1) {\n multiCellContext(cells);\n }\n }\n });\n editor.on('BeforeSetContent', e => {\n if (e.selection === true && e.paste === true) {\n const selectedCells = getCellsFromSelection(editor);\n head(selectedCells).each(cell => {\n table(cell).each(table => {\n const elements = filter$2(fromHtml(e.content), content => {\n return name(content) !== 'meta';\n });\n const isTable = isTag('table');\n if (shouldMergeContentOnPaste(editor) && elements.length === 1 && isTable(elements[0])) {\n e.preventDefault();\n const doc = SugarElement.fromDom(editor.getDoc());\n const generators = paste$1(doc);\n const targets = paste(cell, elements[0], generators);\n actions.pasteCells(table, targets).each(() => {\n editor.focus();\n });\n }\n });\n });\n }\n });\n };\n\n const point = (element, offset) => ({\n element,\n offset\n });\n\n const scan$1 = (universe, element, direction) => {\n if (universe.property().isText(element) && universe.property().getText(element).trim().length === 0 || universe.property().isComment(element)) {\n return direction(element).bind(elem => {\n return scan$1(universe, elem, direction).orThunk(() => {\n return Optional.some(elem);\n });\n });\n } else {\n return Optional.none();\n }\n };\n const toEnd = (universe, element) => {\n if (universe.property().isText(element)) {\n return universe.property().getText(element).length;\n }\n const children = universe.property().children(element);\n return children.length;\n };\n const freefallRtl$2 = (universe, element) => {\n const candidate = scan$1(universe, element, universe.query().prevSibling).getOr(element);\n if (universe.property().isText(candidate)) {\n return point(candidate, toEnd(universe, candidate));\n }\n const children = universe.property().children(candidate);\n return children.length > 0 ? freefallRtl$2(universe, children[children.length - 1]) : point(candidate, toEnd(universe, candidate));\n };\n\n const freefallRtl$1 = freefallRtl$2;\n\n const universe$2 = DomUniverse();\n const freefallRtl = element => {\n return freefallRtl$1(universe$2, element);\n };\n\n const halve = (main, other) => {\n if (!hasColspan(main)) {\n const width = getGenericWidth(main);\n width.each(w => {\n const newWidth = w.value / 2;\n setGenericWidth(main, newWidth, w.unit);\n setGenericWidth(other, newWidth, w.unit);\n });\n }\n };\n\n const zero = array => map$1(array, constant(0));\n const surround = (sizes, startIndex, endIndex, results, f) => f(sizes.slice(0, startIndex)).concat(results).concat(f(sizes.slice(endIndex)));\n const clampDeltaHelper = predicate => (sizes, index, delta, minCellSize) => {\n if (!predicate(delta)) {\n return delta;\n } else {\n const newSize = Math.max(minCellSize, sizes[index] - Math.abs(delta));\n const diff = Math.abs(newSize - sizes[index]);\n return delta >= 0 ? diff : -diff;\n }\n };\n const clampNegativeDelta = clampDeltaHelper(delta => delta < 0);\n const clampDelta = clampDeltaHelper(always);\n const resizeTable = () => {\n const calcFixedDeltas = (sizes, index, next, delta, minCellSize) => {\n const clampedDelta = clampNegativeDelta(sizes, index, delta, minCellSize);\n return surround(sizes, index, next + 1, [\n clampedDelta,\n 0\n ], zero);\n };\n const calcRelativeDeltas = (sizes, index, delta, minCellSize) => {\n const ratio = (100 + delta) / 100;\n const newThis = Math.max(minCellSize, (sizes[index] + delta) / ratio);\n return map$1(sizes, (size, idx) => {\n const newSize = idx === index ? newThis : size / ratio;\n return newSize - size;\n });\n };\n const calcLeftEdgeDeltas = (sizes, index, next, delta, minCellSize, isRelative) => {\n if (isRelative) {\n return calcRelativeDeltas(sizes, index, delta, minCellSize);\n } else {\n return calcFixedDeltas(sizes, index, next, delta, minCellSize);\n }\n };\n const calcMiddleDeltas = (sizes, _prev, index, next, delta, minCellSize, isRelative) => calcLeftEdgeDeltas(sizes, index, next, delta, minCellSize, isRelative);\n const resizeTable = (resizer, delta) => resizer(delta);\n const calcRightEdgeDeltas = (sizes, _prev, index, delta, minCellSize, isRelative) => {\n if (isRelative) {\n return calcRelativeDeltas(sizes, index, delta, minCellSize);\n } else {\n const clampedDelta = clampNegativeDelta(sizes, index, delta, minCellSize);\n return zero(sizes.slice(0, index)).concat([clampedDelta]);\n }\n };\n const calcRedestributedWidths = (sizes, totalWidth, pixelDelta, isRelative) => {\n if (isRelative) {\n const tableWidth = totalWidth + pixelDelta;\n const ratio = tableWidth / totalWidth;\n const newSizes = map$1(sizes, size => size / ratio);\n return {\n delta: ratio * 100 - 100,\n newSizes\n };\n } else {\n return {\n delta: pixelDelta,\n newSizes: sizes\n };\n }\n };\n return {\n resizeTable,\n clampTableDelta: clampNegativeDelta,\n calcLeftEdgeDeltas,\n calcMiddleDeltas,\n calcRightEdgeDeltas,\n calcRedestributedWidths\n };\n };\n const preserveTable = () => {\n const calcLeftEdgeDeltas = (sizes, index, next, delta, minCellSize) => {\n const idx = delta >= 0 ? next : index;\n const clampedDelta = clampDelta(sizes, idx, delta, minCellSize);\n return surround(sizes, index, next + 1, [\n clampedDelta,\n -clampedDelta\n ], zero);\n };\n const calcMiddleDeltas = (sizes, _prev, index, next, delta, minCellSize) => calcLeftEdgeDeltas(sizes, index, next, delta, minCellSize);\n const resizeTable = (resizer, delta, isLastColumn) => {\n if (isLastColumn) {\n resizer(delta);\n }\n };\n const calcRightEdgeDeltas = (sizes, _prev, _index, delta, _minCellSize, isRelative) => {\n if (isRelative) {\n return zero(sizes);\n } else {\n const diff = delta / sizes.length;\n return map$1(sizes, constant(diff));\n }\n };\n const clampTableDelta = (sizes, index, delta, minCellSize, isLastColumn) => {\n if (isLastColumn) {\n if (delta >= 0) {\n return delta;\n } else {\n const maxDelta = foldl(sizes, (a, b) => a + b - minCellSize, 0);\n return Math.max(-maxDelta, delta);\n }\n } else {\n return clampNegativeDelta(sizes, index, delta, minCellSize);\n }\n };\n const calcRedestributedWidths = (sizes, _totalWidth, _pixelDelta, _isRelative) => ({\n delta: 0,\n newSizes: sizes\n });\n return {\n resizeTable,\n clampTableDelta,\n calcLeftEdgeDeltas,\n calcMiddleDeltas,\n calcRightEdgeDeltas,\n calcRedestributedWidths\n };\n };\n\n const getGridSize = table => {\n const warehouse = Warehouse.fromTable(table);\n return warehouse.grid;\n };\n\n const isHeaderCell = isTag('th');\n const isHeaderCells = cells => forall(cells, cell => isHeaderCell(cell.element));\n const getRowHeaderType = (isHeaderRow, isHeaderCells) => {\n if (isHeaderRow && isHeaderCells) {\n return 'sectionCells';\n } else if (isHeaderRow) {\n return 'section';\n } else {\n return 'cells';\n }\n };\n const getRowType = row => {\n const isHeaderRow = row.section === 'thead';\n const isHeaderCells = is(findCommonCellType(row.cells), 'th');\n if (row.section === 'tfoot') {\n return { type: 'footer' };\n } else if (isHeaderRow || isHeaderCells) {\n return {\n type: 'header',\n subType: getRowHeaderType(isHeaderRow, isHeaderCells)\n };\n } else {\n return { type: 'body' };\n }\n };\n const findCommonCellType = cells => {\n const headerCells = filter$2(cells, cell => isHeaderCell(cell.element));\n if (headerCells.length === 0) {\n return Optional.some('td');\n } else if (headerCells.length === cells.length) {\n return Optional.some('th');\n } else {\n return Optional.none();\n }\n };\n const findCommonRowType = rows => {\n const rowTypes = map$1(rows, row => getRowType(row).type);\n const hasHeader = contains$2(rowTypes, 'header');\n const hasFooter = contains$2(rowTypes, 'footer');\n if (!hasHeader && !hasFooter) {\n return Optional.some('body');\n } else {\n const hasBody = contains$2(rowTypes, 'body');\n if (hasHeader && !hasBody && !hasFooter) {\n return Optional.some('header');\n } else if (!hasHeader && !hasBody && hasFooter) {\n return Optional.some('footer');\n } else {\n return Optional.none();\n }\n }\n };\n const findTableRowHeaderType = warehouse => findMap(warehouse.all, row => {\n const rowType = getRowType(row);\n return rowType.type === 'header' ? Optional.from(rowType.subType) : Optional.none();\n });\n\n const transformCell = (cell, comparator, substitution) => elementnew(substitution(cell.element, comparator), true, cell.isLocked);\n const transformRow = (row, section) => row.section !== section ? rowcells(row.element, row.cells, section, row.isNew) : row;\n const section = () => ({\n transformRow,\n transformCell: (cell, comparator, substitution) => {\n const newCell = substitution(cell.element, comparator);\n const fixedCell = name(newCell) !== 'td' ? mutate$1(newCell, 'td') : newCell;\n return elementnew(fixedCell, cell.isNew, cell.isLocked);\n }\n });\n const sectionCells = () => ({\n transformRow,\n transformCell\n });\n const cells = () => ({\n transformRow: (row, section) => {\n const newSection = section === 'thead' ? 'tbody' : section;\n return transformRow(row, newSection);\n },\n transformCell\n });\n const fallback = () => ({\n transformRow: identity,\n transformCell\n });\n const getTableSectionType = (table, fallback) => {\n const warehouse = Warehouse.fromTable(table);\n const type = findTableRowHeaderType(warehouse).getOr(fallback);\n switch (type) {\n case 'section':\n return section();\n case 'sectionCells':\n return sectionCells();\n case 'cells':\n return cells();\n }\n };\n const TableSection = {\n getTableSectionType,\n section,\n sectionCells,\n cells,\n fallback\n };\n\n const setIfNot = (element, property, value, ignore) => {\n if (value === ignore) {\n remove$7(element, property);\n } else {\n set$2(element, property, value);\n }\n };\n const insert$1 = (table, selector, element) => {\n last$2(children(table, selector)).fold(() => prepend(table, element), child => after$5(child, element));\n };\n const generateSection = (table, sectionName) => {\n const section = child(table, sectionName).getOrThunk(() => {\n const newSection = SugarElement.fromTag(sectionName, owner(table).dom);\n if (sectionName === 'thead') {\n insert$1(table, 'caption,colgroup', newSection);\n } else if (sectionName === 'colgroup') {\n insert$1(table, 'caption', newSection);\n } else {\n append$1(table, newSection);\n }\n return newSection;\n });\n empty(section);\n return section;\n };\n const render$1 = (table, grid) => {\n const newRows = [];\n const newCells = [];\n const syncRows = gridSection => map$1(gridSection, row => {\n if (row.isNew) {\n newRows.push(row.element);\n }\n const tr = row.element;\n empty(tr);\n each$2(row.cells, cell => {\n if (cell.isNew) {\n newCells.push(cell.element);\n }\n setIfNot(cell.element, 'colspan', cell.colspan, 1);\n setIfNot(cell.element, 'rowspan', cell.rowspan, 1);\n append$1(tr, cell.element);\n });\n return tr;\n });\n const syncColGroup = gridSection => bind$2(gridSection, colGroup => map$1(colGroup.cells, col => {\n setIfNot(col.element, 'span', col.colspan, 1);\n return col.element;\n }));\n const renderSection = (gridSection, sectionName) => {\n const section = generateSection(table, sectionName);\n const sync = sectionName === 'colgroup' ? syncColGroup : syncRows;\n const sectionElems = sync(gridSection);\n append(section, sectionElems);\n };\n const removeSection = sectionName => {\n child(table, sectionName).each(remove$6);\n };\n const renderOrRemoveSection = (gridSection, sectionName) => {\n if (gridSection.length > 0) {\n renderSection(gridSection, sectionName);\n } else {\n removeSection(sectionName);\n }\n };\n const headSection = [];\n const bodySection = [];\n const footSection = [];\n const columnGroupsSection = [];\n each$2(grid, row => {\n switch (row.section) {\n case 'thead':\n headSection.push(row);\n break;\n case 'tbody':\n bodySection.push(row);\n break;\n case 'tfoot':\n footSection.push(row);\n break;\n case 'colgroup':\n columnGroupsSection.push(row);\n break;\n }\n });\n renderOrRemoveSection(columnGroupsSection, 'colgroup');\n renderOrRemoveSection(headSection, 'thead');\n renderOrRemoveSection(bodySection, 'tbody');\n renderOrRemoveSection(footSection, 'tfoot');\n return {\n newRows,\n newCells\n };\n };\n const copy = grid => map$1(grid, row => {\n const tr = shallow(row.element);\n each$2(row.cells, cell => {\n const clonedCell = deep(cell.element);\n setIfNot(clonedCell, 'colspan', cell.colspan, 1);\n setIfNot(clonedCell, 'rowspan', cell.rowspan, 1);\n append$1(tr, clonedCell);\n });\n return tr;\n });\n\n const getColumn = (grid, index) => {\n return map$1(grid, row => {\n return getCell(row, index);\n });\n };\n const getRow = (grid, index) => {\n return grid[index];\n };\n const findDiff = (xs, comp) => {\n if (xs.length === 0) {\n return 0;\n }\n const first = xs[0];\n const index = findIndex(xs, x => {\n return !comp(first.element, x.element);\n });\n return index.getOr(xs.length);\n };\n const subgrid = (grid, row, column, comparator) => {\n const gridRow = getRow(grid, row);\n const isColRow = gridRow.section === 'colgroup';\n const colspan = findDiff(gridRow.cells.slice(column), comparator);\n const rowspan = isColRow ? 1 : findDiff(getColumn(grid.slice(row), column), comparator);\n return {\n colspan,\n rowspan\n };\n };\n\n const toDetails = (grid, comparator) => {\n const seen = map$1(grid, row => map$1(row.cells, never));\n const updateSeen = (rowIndex, columnIndex, rowspan, colspan) => {\n for (let row = rowIndex; row < rowIndex + rowspan; row++) {\n for (let column = columnIndex; column < columnIndex + colspan; column++) {\n seen[row][column] = true;\n }\n }\n };\n return map$1(grid, (row, rowIndex) => {\n const details = bind$2(row.cells, (cell, columnIndex) => {\n if (seen[rowIndex][columnIndex] === false) {\n const result = subgrid(grid, rowIndex, columnIndex, comparator);\n updateSeen(rowIndex, columnIndex, result.rowspan, result.colspan);\n return [detailnew(cell.element, result.rowspan, result.colspan, cell.isNew)];\n } else {\n return [];\n }\n });\n return rowdetailnew(row.element, details, row.section, row.isNew);\n });\n };\n const toGrid = (warehouse, generators, isNew) => {\n const grid = [];\n each$2(warehouse.colgroups, colgroup => {\n const colgroupCols = [];\n for (let columnIndex = 0; columnIndex < warehouse.grid.columns; columnIndex++) {\n const element = Warehouse.getColumnAt(warehouse, columnIndex).map(column => elementnew(column.element, isNew, false)).getOrThunk(() => elementnew(generators.colGap(), true, false));\n colgroupCols.push(element);\n }\n grid.push(rowcells(colgroup.element, colgroupCols, 'colgroup', isNew));\n });\n for (let rowIndex = 0; rowIndex < warehouse.grid.rows; rowIndex++) {\n const rowCells = [];\n for (let columnIndex = 0; columnIndex < warehouse.grid.columns; columnIndex++) {\n const element = Warehouse.getAt(warehouse, rowIndex, columnIndex).map(item => elementnew(item.element, isNew, item.isLocked)).getOrThunk(() => elementnew(generators.gap(), true, false));\n rowCells.push(element);\n }\n const rowDetail = warehouse.all[rowIndex];\n const row = rowcells(rowDetail.element, rowCells, rowDetail.section, isNew);\n grid.push(row);\n }\n return grid;\n };\n\n const fromWarehouse = (warehouse, generators) => toGrid(warehouse, generators, false);\n const toDetailList = grid => toDetails(grid, eq$1);\n const findInWarehouse = (warehouse, element) => findMap(warehouse.all, r => find$1(r.cells, e => eq$1(element, e.element)));\n const extractCells = (warehouse, target, predicate) => {\n const details = map$1(target.selection, cell$1 => {\n return cell(cell$1).bind(lc => findInWarehouse(warehouse, lc)).filter(predicate);\n });\n const cells = cat(details);\n return someIf(cells.length > 0, cells);\n };\n const run = (operation, extract, adjustment, postAction, genWrappers) => (table, target, generators, behaviours) => {\n const warehouse = Warehouse.fromTable(table);\n const tableSection = Optional.from(behaviours === null || behaviours === void 0 ? void 0 : behaviours.section).getOrThunk(TableSection.fallback);\n const output = extract(warehouse, target).map(info => {\n const model = fromWarehouse(warehouse, generators);\n const result = operation(model, info, eq$1, genWrappers(generators), tableSection);\n const lockedColumns = getLockedColumnsFromGrid(result.grid);\n const grid = toDetailList(result.grid);\n return {\n info,\n grid,\n cursor: result.cursor,\n lockedColumns\n };\n });\n return output.bind(out => {\n const newElements = render$1(table, out.grid);\n const tableSizing = Optional.from(behaviours === null || behaviours === void 0 ? void 0 : behaviours.sizing).getOrThunk(() => TableSize.getTableSize(table));\n const resizing = Optional.from(behaviours === null || behaviours === void 0 ? void 0 : behaviours.resize).getOrThunk(preserveTable);\n adjustment(table, out.grid, out.info, {\n sizing: tableSizing,\n resize: resizing,\n section: tableSection\n });\n postAction(table);\n remove$7(table, LOCKED_COL_ATTR);\n if (out.lockedColumns.length > 0) {\n set$2(table, LOCKED_COL_ATTR, out.lockedColumns.join(','));\n }\n return Optional.some({\n cursor: out.cursor,\n newRows: newElements.newRows,\n newCells: newElements.newCells\n });\n });\n };\n const onPaste = (warehouse, target) => cell(target.element).bind(cell => findInWarehouse(warehouse, cell).map(details => {\n const value = {\n ...details,\n generators: target.generators,\n clipboard: target.clipboard\n };\n return value;\n }));\n const onPasteByEditor = (warehouse, target) => extractCells(warehouse, target, always).map(cells => ({\n cells,\n generators: target.generators,\n clipboard: target.clipboard\n }));\n const onMergable = (_warehouse, target) => target.mergable;\n const onUnmergable = (_warehouse, target) => target.unmergable;\n const onCells = (warehouse, target) => extractCells(warehouse, target, always);\n const onUnlockedCells = (warehouse, target) => extractCells(warehouse, target, detail => !detail.isLocked);\n const isUnlockedTableCell = (warehouse, cell) => findInWarehouse(warehouse, cell).exists(detail => !detail.isLocked);\n const allUnlocked = (warehouse, cells) => forall(cells, cell => isUnlockedTableCell(warehouse, cell));\n const onUnlockedMergable = (warehouse, target) => onMergable(warehouse, target).filter(mergeable => allUnlocked(warehouse, mergeable.cells));\n const onUnlockedUnmergable = (warehouse, target) => onUnmergable(warehouse, target).filter(cells => allUnlocked(warehouse, cells));\n\n const merge$2 = (grid, bounds, comparator, substitution) => {\n const rows = extractGridDetails(grid).rows;\n if (rows.length === 0) {\n return grid;\n }\n for (let i = bounds.startRow; i <= bounds.finishRow; i++) {\n for (let j = bounds.startCol; j <= bounds.finishCol; j++) {\n const row = rows[i];\n const isLocked = getCell(row, j).isLocked;\n mutateCell(row, j, elementnew(substitution(), false, isLocked));\n }\n }\n return grid;\n };\n const unmerge = (grid, target, comparator, substitution) => {\n const rows = extractGridDetails(grid).rows;\n let first = true;\n for (let i = 0; i < rows.length; i++) {\n for (let j = 0; j < cellLength(rows[0]); j++) {\n const row = rows[i];\n const currentCell = getCell(row, j);\n const currentCellElm = currentCell.element;\n const isToReplace = comparator(currentCellElm, target);\n if (isToReplace && !first) {\n mutateCell(row, j, elementnew(substitution(), true, currentCell.isLocked));\n } else if (isToReplace) {\n first = false;\n }\n }\n }\n return grid;\n };\n const uniqueCells = (row, comparator) => {\n return foldl(row, (rest, cell) => {\n return exists(rest, currentCell => {\n return comparator(currentCell.element, cell.element);\n }) ? rest : rest.concat([cell]);\n }, []);\n };\n const splitCols = (grid, index, comparator, substitution) => {\n if (index > 0 && index < grid[0].cells.length) {\n each$2(grid, row => {\n const prevCell = row.cells[index - 1];\n let offset = 0;\n const substitute = substitution();\n while (row.cells.length > index + offset && comparator(prevCell.element, row.cells[index + offset].element)) {\n mutateCell(row, index + offset, elementnew(substitute, true, row.cells[index + offset].isLocked));\n offset++;\n }\n });\n }\n return grid;\n };\n const splitRows = (grid, index, comparator, substitution) => {\n const rows = extractGridDetails(grid).rows;\n if (index > 0 && index < rows.length) {\n const rowPrevCells = rows[index - 1].cells;\n const cells = uniqueCells(rowPrevCells, comparator);\n each$2(cells, cell => {\n let replacement = Optional.none();\n for (let i = index; i < rows.length; i++) {\n for (let j = 0; j < cellLength(rows[0]); j++) {\n const row = rows[i];\n const current = getCell(row, j);\n const isToReplace = comparator(current.element, cell.element);\n if (isToReplace) {\n if (replacement.isNone()) {\n replacement = Optional.some(substitution());\n }\n replacement.each(sub => {\n mutateCell(row, j, elementnew(sub, true, current.isLocked));\n });\n }\n }\n }\n });\n }\n return grid;\n };\n\n const value$1 = value => {\n const applyHelper = fn => fn(value);\n const constHelper = constant(value);\n const outputHelper = () => output;\n const output = {\n tag: true,\n inner: value,\n fold: (_onError, onValue) => onValue(value),\n isValue: always,\n isError: never,\n map: mapper => Result.value(mapper(value)),\n mapError: outputHelper,\n bind: applyHelper,\n exists: applyHelper,\n forall: applyHelper,\n getOr: constHelper,\n or: outputHelper,\n getOrThunk: constHelper,\n orThunk: outputHelper,\n getOrDie: constHelper,\n each: fn => {\n fn(value);\n },\n toOptional: () => Optional.some(value)\n };\n return output;\n };\n const error = error => {\n const outputHelper = () => output;\n const output = {\n tag: false,\n inner: error,\n fold: (onError, _onValue) => onError(error),\n isValue: never,\n isError: always,\n map: outputHelper,\n mapError: mapper => Result.error(mapper(error)),\n bind: outputHelper,\n exists: never,\n forall: always,\n getOr: identity,\n or: identity,\n getOrThunk: apply,\n orThunk: apply,\n getOrDie: die(String(error)),\n each: noop,\n toOptional: Optional.none\n };\n return output;\n };\n const fromOption = (optional, err) => optional.fold(() => error(err), value$1);\n const Result = {\n value: value$1,\n error,\n fromOption\n };\n\n const measure = (startAddress, gridA, gridB) => {\n if (startAddress.row >= gridA.length || startAddress.column > cellLength(gridA[0])) {\n return Result.error('invalid start address out of table bounds, row: ' + startAddress.row + ', column: ' + startAddress.column);\n }\n const rowRemainder = gridA.slice(startAddress.row);\n const colRemainder = rowRemainder[0].cells.slice(startAddress.column);\n const colRequired = cellLength(gridB[0]);\n const rowRequired = gridB.length;\n return Result.value({\n rowDelta: rowRemainder.length - rowRequired,\n colDelta: colRemainder.length - colRequired\n });\n };\n const measureWidth = (gridA, gridB) => {\n const colLengthA = cellLength(gridA[0]);\n const colLengthB = cellLength(gridB[0]);\n return {\n rowDelta: 0,\n colDelta: colLengthA - colLengthB\n };\n };\n const measureHeight = (gridA, gridB) => {\n const rowLengthA = gridA.length;\n const rowLengthB = gridB.length;\n return {\n rowDelta: rowLengthA - rowLengthB,\n colDelta: 0\n };\n };\n const generateElements = (amount, row, generators, isLocked) => {\n const generator = row.section === 'colgroup' ? generators.col : generators.cell;\n return range$1(amount, idx => elementnew(generator(), true, isLocked(idx)));\n };\n const rowFill = (grid, amount, generators, lockedColumns) => {\n const exampleRow = grid[grid.length - 1];\n return grid.concat(range$1(amount, () => {\n const generator = exampleRow.section === 'colgroup' ? generators.colgroup : generators.row;\n const row = clone(exampleRow, generator, identity);\n const elements = generateElements(row.cells.length, row, generators, idx => has$1(lockedColumns, idx.toString()));\n return setCells(row, elements);\n }));\n };\n const colFill = (grid, amount, generators, startIndex) => map$1(grid, row => {\n const newChildren = generateElements(amount, row, generators, never);\n return addCells(row, startIndex, newChildren);\n });\n const lockedColFill = (grid, generators, lockedColumns) => map$1(grid, row => {\n return foldl(lockedColumns, (acc, colNum) => {\n const newChild = generateElements(1, row, generators, always)[0];\n return addCell(acc, colNum, newChild);\n }, row);\n });\n const tailor = (gridA, delta, generators) => {\n const fillCols = delta.colDelta < 0 ? colFill : identity;\n const fillRows = delta.rowDelta < 0 ? rowFill : identity;\n const lockedColumns = getLockedColumnsFromGrid(gridA);\n const gridWidth = cellLength(gridA[0]);\n const isLastColLocked = exists(lockedColumns, locked => locked === gridWidth - 1);\n const modifiedCols = fillCols(gridA, Math.abs(delta.colDelta), generators, isLastColLocked ? gridWidth - 1 : gridWidth);\n const newLockedColumns = getLockedColumnsFromGrid(modifiedCols);\n return fillRows(modifiedCols, Math.abs(delta.rowDelta), generators, mapToObject(newLockedColumns, always));\n };\n\n const isSpanning = (grid, row, col, comparator) => {\n const candidate = getCell(grid[row], col);\n const matching = curry(comparator, candidate.element);\n const currentRow = grid[row];\n return grid.length > 1 && cellLength(currentRow) > 1 && (col > 0 && matching(getCellElement(currentRow, col - 1)) || col < currentRow.cells.length - 1 && matching(getCellElement(currentRow, col + 1)) || row > 0 && matching(getCellElement(grid[row - 1], col)) || row < grid.length - 1 && matching(getCellElement(grid[row + 1], col)));\n };\n const mergeTables = (startAddress, gridA, gridBRows, generator, comparator, lockedColumns) => {\n const startRow = startAddress.row;\n const startCol = startAddress.column;\n const mergeHeight = gridBRows.length;\n const mergeWidth = cellLength(gridBRows[0]);\n const endRow = startRow + mergeHeight;\n const endCol = startCol + mergeWidth + lockedColumns.length;\n const lockedColumnObj = mapToObject(lockedColumns, always);\n for (let r = startRow; r < endRow; r++) {\n let skippedCol = 0;\n for (let c = startCol; c < endCol; c++) {\n if (lockedColumnObj[c]) {\n skippedCol++;\n continue;\n }\n if (isSpanning(gridA, r, c, comparator)) {\n unmerge(gridA, getCellElement(gridA[r], c), comparator, generator.cell);\n }\n const gridBColIndex = c - startCol - skippedCol;\n const newCell = getCell(gridBRows[r - startRow], gridBColIndex);\n const newCellElm = newCell.element;\n const replacement = generator.replace(newCellElm);\n mutateCell(gridA[r], c, elementnew(replacement, true, newCell.isLocked));\n }\n }\n return gridA;\n };\n const getValidStartAddress = (currentStartAddress, grid, lockedColumns) => {\n const gridColLength = cellLength(grid[0]);\n const adjustedRowAddress = extractGridDetails(grid).cols.length + currentStartAddress.row;\n const possibleColAddresses = range$1(gridColLength - currentStartAddress.column, num => num + currentStartAddress.column);\n const validColAddress = find$1(possibleColAddresses, num => forall(lockedColumns, col => col !== num)).getOr(gridColLength - 1);\n return {\n row: adjustedRowAddress,\n column: validColAddress\n };\n };\n const getLockedColumnsWithinBounds = (startAddress, rows, lockedColumns) => filter$2(lockedColumns, colNum => colNum >= startAddress.column && colNum <= cellLength(rows[0]) + startAddress.column);\n const merge$1 = (startAddress, gridA, gridB, generator, comparator) => {\n const lockedColumns = getLockedColumnsFromGrid(gridA);\n const validStartAddress = getValidStartAddress(startAddress, gridA, lockedColumns);\n const gridBRows = extractGridDetails(gridB).rows;\n const lockedColumnsWithinBounds = getLockedColumnsWithinBounds(validStartAddress, gridBRows, lockedColumns);\n const result = measure(validStartAddress, gridA, gridBRows);\n return result.map(diff => {\n const delta = {\n ...diff,\n colDelta: diff.colDelta - lockedColumnsWithinBounds.length\n };\n const fittedGrid = tailor(gridA, delta, generator);\n const newLockedColumns = getLockedColumnsFromGrid(fittedGrid);\n const newLockedColumnsWithinBounds = getLockedColumnsWithinBounds(validStartAddress, gridBRows, newLockedColumns);\n return mergeTables(validStartAddress, fittedGrid, gridBRows, generator, comparator, newLockedColumnsWithinBounds);\n });\n };\n const insertCols = (index, gridA, gridB, generator, comparator) => {\n splitCols(gridA, index, comparator, generator.cell);\n const delta = measureHeight(gridB, gridA);\n const fittedNewGrid = tailor(gridB, delta, generator);\n const secondDelta = measureHeight(gridA, fittedNewGrid);\n const fittedOldGrid = tailor(gridA, secondDelta, generator);\n return map$1(fittedOldGrid, (gridRow, i) => {\n return addCells(gridRow, index, fittedNewGrid[i].cells);\n });\n };\n const insertRows = (index, gridA, gridB, generator, comparator) => {\n splitRows(gridA, index, comparator, generator.cell);\n const locked = getLockedColumnsFromGrid(gridA);\n const diff = measureWidth(gridA, gridB);\n const delta = {\n ...diff,\n colDelta: diff.colDelta - locked.length\n };\n const fittedOldGrid = tailor(gridA, delta, generator);\n const {\n cols: oldCols,\n rows: oldRows\n } = extractGridDetails(fittedOldGrid);\n const newLocked = getLockedColumnsFromGrid(fittedOldGrid);\n const secondDiff = measureWidth(gridB, gridA);\n const secondDelta = {\n ...secondDiff,\n colDelta: secondDiff.colDelta + newLocked.length\n };\n const fittedGridB = lockedColFill(gridB, generator, newLocked);\n const fittedNewGrid = tailor(fittedGridB, secondDelta, generator);\n return [\n ...oldCols,\n ...oldRows.slice(0, index),\n ...fittedNewGrid,\n ...oldRows.slice(index, oldRows.length)\n ];\n };\n\n const cloneRow = (row, cloneCell, comparator, substitution) => clone(row, elem => substitution(elem, comparator), cloneCell);\n const insertRowAt = (grid, index, example, comparator, substitution) => {\n const {rows, cols} = extractGridDetails(grid);\n const before = rows.slice(0, index);\n const after = rows.slice(index);\n const newRow = cloneRow(rows[example], (ex, c) => {\n const withinSpan = index > 0 && index < rows.length && comparator(getCellElement(rows[index - 1], c), getCellElement(rows[index], c));\n const ret = withinSpan ? getCell(rows[index], c) : elementnew(substitution(ex.element, comparator), true, ex.isLocked);\n return ret;\n }, comparator, substitution);\n return [\n ...cols,\n ...before,\n newRow,\n ...after\n ];\n };\n const getElementFor = (row, column, section, withinSpan, example, comparator, substitution) => {\n if (section === 'colgroup' || !withinSpan) {\n const cell = getCell(row, example);\n return elementnew(substitution(cell.element, comparator), true, false);\n } else {\n return getCell(row, column);\n }\n };\n const insertColumnAt = (grid, index, example, comparator, substitution) => map$1(grid, row => {\n const withinSpan = index > 0 && index < cellLength(row) && comparator(getCellElement(row, index - 1), getCellElement(row, index));\n const sub = getElementFor(row, index, row.section, withinSpan, example, comparator, substitution);\n return addCell(row, index, sub);\n });\n const deleteColumnsAt = (grid, columns) => bind$2(grid, row => {\n const existingCells = row.cells;\n const cells = foldr(columns, (acc, column) => column >= 0 && column < acc.length ? acc.slice(0, column).concat(acc.slice(column + 1)) : acc, existingCells);\n return cells.length > 0 ? [rowcells(row.element, cells, row.section, row.isNew)] : [];\n });\n const deleteRowsAt = (grid, start, finish) => {\n const {rows, cols} = extractGridDetails(grid);\n return [\n ...cols,\n ...rows.slice(0, start),\n ...rows.slice(finish + 1)\n ];\n };\n\n const notInStartRow = (grid, rowIndex, colIndex, comparator) => getCellElement(grid[rowIndex], colIndex) !== undefined && (rowIndex > 0 && comparator(getCellElement(grid[rowIndex - 1], colIndex), getCellElement(grid[rowIndex], colIndex)));\n const notInStartColumn = (row, index, comparator) => index > 0 && comparator(getCellElement(row, index - 1), getCellElement(row, index));\n const isDuplicatedCell = (grid, rowIndex, colIndex, comparator) => notInStartRow(grid, rowIndex, colIndex, comparator) || notInStartColumn(grid[rowIndex], colIndex, comparator);\n const rowReplacerPredicate = (targetRow, columnHeaders) => {\n const entireTableIsHeader = forall(columnHeaders, identity) && isHeaderCells(targetRow.cells);\n return entireTableIsHeader ? always : (cell, _rowIndex, colIndex) => {\n const type = name(cell.element);\n return !(type === 'th' && columnHeaders[colIndex]);\n };\n };\n const columnReplacePredicate = (targetColumn, rowHeaders) => {\n const entireTableIsHeader = forall(rowHeaders, identity) && isHeaderCells(targetColumn);\n return entireTableIsHeader ? always : (cell, rowIndex, _colIndex) => {\n const type = name(cell.element);\n return !(type === 'th' && rowHeaders[rowIndex]);\n };\n };\n const determineScope = (applyScope, cell, newScope, isInHeader) => {\n const hasSpan = scope => scope === 'row' ? hasRowspan(cell) : hasColspan(cell);\n const getScope = scope => hasSpan(scope) ? `${ scope }group` : scope;\n if (applyScope) {\n return isHeaderCell(cell) ? getScope(newScope) : null;\n } else if (isInHeader && isHeaderCell(cell)) {\n const oppositeScope = newScope === 'row' ? 'col' : 'row';\n return getScope(oppositeScope);\n } else {\n return null;\n }\n };\n const rowScopeGenerator = (applyScope, columnHeaders) => (cell, rowIndex, columnIndex) => Optional.some(determineScope(applyScope, cell.element, 'col', columnHeaders[columnIndex]));\n const columnScopeGenerator = (applyScope, rowHeaders) => (cell, rowIndex) => Optional.some(determineScope(applyScope, cell.element, 'row', rowHeaders[rowIndex]));\n const replace = (cell, comparator, substitute) => elementnew(substitute(cell.element, comparator), true, cell.isLocked);\n const replaceIn = (grid, targets, comparator, substitute, replacer, genScope, shouldReplace) => {\n const isTarget = cell => {\n return exists(targets, target => {\n return comparator(cell.element, target.element);\n });\n };\n return map$1(grid, (row, rowIndex) => {\n return mapCells(row, (cell, colIndex) => {\n if (isTarget(cell)) {\n const newCell = shouldReplace(cell, rowIndex, colIndex) ? replacer(cell, comparator, substitute) : cell;\n genScope(newCell, rowIndex, colIndex).each(scope => {\n setOptions(newCell.element, { scope: Optional.from(scope) });\n });\n return newCell;\n } else {\n return cell;\n }\n });\n });\n };\n const getColumnCells = (rows, columnIndex, comparator) => bind$2(rows, (row, i) => {\n return isDuplicatedCell(rows, i, columnIndex, comparator) ? [] : [getCell(row, columnIndex)];\n });\n const getRowCells = (rows, rowIndex, comparator) => {\n const targetRow = rows[rowIndex];\n return bind$2(targetRow.cells, (item, i) => {\n return isDuplicatedCell(rows, rowIndex, i, comparator) ? [] : [item];\n });\n };\n const replaceColumns = (grid, indexes, applyScope, comparator, substitution) => {\n const rows = extractGridDetails(grid).rows;\n const targets = bind$2(indexes, index => getColumnCells(rows, index, comparator));\n const rowHeaders = map$1(rows, row => isHeaderCells(row.cells));\n const shouldReplaceCell = columnReplacePredicate(targets, rowHeaders);\n const scopeGenerator = columnScopeGenerator(applyScope, rowHeaders);\n return replaceIn(grid, targets, comparator, substitution, replace, scopeGenerator, shouldReplaceCell);\n };\n const replaceRows = (grid, indexes, section, applyScope, comparator, substitution, tableSection) => {\n const {cols, rows} = extractGridDetails(grid);\n const targetRow = rows[indexes[0]];\n const targets = bind$2(indexes, index => getRowCells(rows, index, comparator));\n const columnHeaders = map$1(targetRow.cells, (_cell, index) => isHeaderCells(getColumnCells(rows, index, comparator)));\n const newRows = [...rows];\n each$2(indexes, index => {\n newRows[index] = tableSection.transformRow(rows[index], section);\n });\n const newGrid = [\n ...cols,\n ...newRows\n ];\n const shouldReplaceCell = rowReplacerPredicate(targetRow, columnHeaders);\n const scopeGenerator = rowScopeGenerator(applyScope, columnHeaders);\n return replaceIn(newGrid, targets, comparator, substitution, tableSection.transformCell, scopeGenerator, shouldReplaceCell);\n };\n const replaceCells = (grid, details, comparator, substitution) => {\n const rows = extractGridDetails(grid).rows;\n const targetCells = map$1(details, detail => getCell(rows[detail.row], detail.column));\n return replaceIn(grid, targetCells, comparator, substitution, replace, Optional.none, always);\n };\n\n const generate = cases => {\n if (!isArray(cases)) {\n throw new Error('cases must be an array');\n }\n if (cases.length === 0) {\n throw new Error('there must be at least one case');\n }\n const constructors = [];\n const adt = {};\n each$2(cases, (acase, count) => {\n const keys$1 = keys(acase);\n if (keys$1.length !== 1) {\n throw new Error('one and only one name per case');\n }\n const key = keys$1[0];\n const value = acase[key];\n if (adt[key] !== undefined) {\n throw new Error('duplicate key detected:' + key);\n } else if (key === 'cata') {\n throw new Error('cannot have a case named cata (sorry)');\n } else if (!isArray(value)) {\n throw new Error('case arguments must be an array');\n }\n constructors.push(key);\n adt[key] = (...args) => {\n const argLength = args.length;\n if (argLength !== value.length) {\n throw new Error('Wrong number of arguments to case ' + key + '. Expected ' + value.length + ' (' + value + '), got ' + argLength);\n }\n const match = branches => {\n const branchKeys = keys(branches);\n if (constructors.length !== branchKeys.length) {\n throw new Error('Wrong number of arguments to match. Expected: ' + constructors.join(',') + '\\nActual: ' + branchKeys.join(','));\n }\n const allReqd = forall(constructors, reqKey => {\n return contains$2(branchKeys, reqKey);\n });\n if (!allReqd) {\n throw new Error('Not all branches were specified when using match. Specified: ' + branchKeys.join(', ') + '\\nRequired: ' + constructors.join(', '));\n }\n return branches[key].apply(null, args);\n };\n return {\n fold: (...foldArgs) => {\n if (foldArgs.length !== cases.length) {\n throw new Error('Wrong number of arguments to fold. Expected ' + cases.length + ', got ' + foldArgs.length);\n }\n const target = foldArgs[count];\n return target.apply(null, args);\n },\n match,\n log: label => {\n console.log(label, {\n constructors,\n constructor: key,\n params: args\n });\n }\n };\n };\n });\n return adt;\n };\n const Adt = { generate };\n\n const adt$6 = Adt.generate([\n { none: [] },\n { only: ['index'] },\n {\n left: [\n 'index',\n 'next'\n ]\n },\n {\n middle: [\n 'prev',\n 'index',\n 'next'\n ]\n },\n {\n right: [\n 'prev',\n 'index'\n ]\n }\n ]);\n const ColumnContext = { ...adt$6 };\n\n const neighbours = (input, index) => {\n if (input.length === 0) {\n return ColumnContext.none();\n }\n if (input.length === 1) {\n return ColumnContext.only(0);\n }\n if (index === 0) {\n return ColumnContext.left(0, 1);\n }\n if (index === input.length - 1) {\n return ColumnContext.right(index - 1, index);\n }\n if (index > 0 && index < input.length - 1) {\n return ColumnContext.middle(index - 1, index, index + 1);\n }\n return ColumnContext.none();\n };\n const determine = (input, column, step, tableSize, resize) => {\n const result = input.slice(0);\n const context = neighbours(input, column);\n const onNone = constant(map$1(result, constant(0)));\n const onOnly = index => tableSize.singleColumnWidth(result[index], step);\n const onLeft = (index, next) => resize.calcLeftEdgeDeltas(result, index, next, step, tableSize.minCellWidth(), tableSize.isRelative);\n const onMiddle = (prev, index, next) => resize.calcMiddleDeltas(result, prev, index, next, step, tableSize.minCellWidth(), tableSize.isRelative);\n const onRight = (prev, index) => resize.calcRightEdgeDeltas(result, prev, index, step, tableSize.minCellWidth(), tableSize.isRelative);\n return context.fold(onNone, onOnly, onLeft, onMiddle, onRight);\n };\n\n const total = (start, end, measures) => {\n let r = 0;\n for (let i = start; i < end; i++) {\n r += measures[i] !== undefined ? measures[i] : 0;\n }\n return r;\n };\n const recalculateWidthForCells = (warehouse, widths) => {\n const all = Warehouse.justCells(warehouse);\n return map$1(all, cell => {\n const width = total(cell.column, cell.column + cell.colspan, widths);\n return {\n element: cell.element,\n width,\n colspan: cell.colspan\n };\n });\n };\n const recalculateWidthForColumns = (warehouse, widths) => {\n const groups = Warehouse.justColumns(warehouse);\n return map$1(groups, (column, index) => ({\n element: column.element,\n width: widths[index],\n colspan: column.colspan\n }));\n };\n const recalculateHeightForCells = (warehouse, heights) => {\n const all = Warehouse.justCells(warehouse);\n return map$1(all, cell => {\n const height = total(cell.row, cell.row + cell.rowspan, heights);\n return {\n element: cell.element,\n height,\n rowspan: cell.rowspan\n };\n });\n };\n const matchRowHeight = (warehouse, heights) => {\n return map$1(warehouse.all, (row, i) => {\n return {\n element: row.element,\n height: heights[i]\n };\n });\n };\n\n const sumUp = newSize => foldr(newSize, (b, a) => b + a, 0);\n const recalculate = (warehouse, widths) => {\n if (Warehouse.hasColumns(warehouse)) {\n return recalculateWidthForColumns(warehouse, widths);\n } else {\n return recalculateWidthForCells(warehouse, widths);\n }\n };\n const recalculateAndApply = (warehouse, widths, tableSize) => {\n const newSizes = recalculate(warehouse, widths);\n each$2(newSizes, cell => {\n tableSize.setElementWidth(cell.element, cell.width);\n });\n };\n const adjustWidth = (table, delta, index, resizing, tableSize) => {\n const warehouse = Warehouse.fromTable(table);\n const step = tableSize.getCellDelta(delta);\n const widths = tableSize.getWidths(warehouse, tableSize);\n const isLastColumn = index === warehouse.grid.columns - 1;\n const clampedStep = resizing.clampTableDelta(widths, index, step, tableSize.minCellWidth(), isLastColumn);\n const deltas = determine(widths, index, clampedStep, tableSize, resizing);\n const newWidths = map$1(deltas, (dx, i) => dx + widths[i]);\n recalculateAndApply(warehouse, newWidths, tableSize);\n resizing.resizeTable(tableSize.adjustTableWidth, clampedStep, isLastColumn);\n };\n const adjustHeight = (table, delta, index, direction) => {\n const warehouse = Warehouse.fromTable(table);\n const heights = getPixelHeights(warehouse, table, direction);\n const newHeights = map$1(heights, (dy, i) => index === i ? Math.max(delta + dy, minHeight()) : dy);\n const newCellSizes = recalculateHeightForCells(warehouse, newHeights);\n const newRowSizes = matchRowHeight(warehouse, newHeights);\n each$2(newRowSizes, row => {\n setHeight(row.element, row.height);\n });\n each$2(newCellSizes, cell => {\n setHeight(cell.element, cell.height);\n });\n const total = sumUp(newHeights);\n setHeight(table, total);\n };\n const adjustAndRedistributeWidths$1 = (_table, list, details, tableSize, resizeBehaviour) => {\n const warehouse = Warehouse.generate(list);\n const sizes = tableSize.getWidths(warehouse, tableSize);\n const tablePixelWidth = tableSize.pixelWidth();\n const {newSizes, delta} = resizeBehaviour.calcRedestributedWidths(sizes, tablePixelWidth, details.pixelDelta, tableSize.isRelative);\n recalculateAndApply(warehouse, newSizes, tableSize);\n tableSize.adjustTableWidth(delta);\n };\n const adjustWidthTo = (_table, list, _info, tableSize) => {\n const warehouse = Warehouse.generate(list);\n const widths = tableSize.getWidths(warehouse, tableSize);\n recalculateAndApply(warehouse, widths, tableSize);\n };\n\n const uniqueColumns = details => {\n const uniqueCheck = (rest, detail) => {\n const columnExists = exists(rest, currentDetail => currentDetail.column === detail.column);\n return columnExists ? rest : rest.concat([detail]);\n };\n return foldl(details, uniqueCheck, []).sort((detailA, detailB) => detailA.column - detailB.column);\n };\n\n const isCol = isTag('col');\n const isColgroup = isTag('colgroup');\n const isRow$1 = element => name(element) === 'tr' || isColgroup(element);\n const elementToData = element => {\n const colspan = getAttrValue(element, 'colspan', 1);\n const rowspan = getAttrValue(element, 'rowspan', 1);\n return {\n element,\n colspan,\n rowspan\n };\n };\n const modification = (generators, toData = elementToData) => {\n const nuCell = data => isCol(data.element) ? generators.col(data) : generators.cell(data);\n const nuRow = data => isColgroup(data.element) ? generators.colgroup(data) : generators.row(data);\n const add = element => {\n if (isRow$1(element)) {\n return nuRow({ element });\n } else {\n const cell = element;\n const replacement = nuCell(toData(cell));\n recent = Optional.some({\n item: cell,\n replacement\n });\n return replacement;\n }\n };\n let recent = Optional.none();\n const getOrInit = (element, comparator) => {\n return recent.fold(() => {\n return add(element);\n }, p => {\n return comparator(element, p.item) ? p.replacement : add(element);\n });\n };\n return { getOrInit };\n };\n const transform$1 = tag => {\n return generators => {\n const list = [];\n const find = (element, comparator) => {\n return find$1(list, x => {\n return comparator(x.item, element);\n });\n };\n const makeNew = element => {\n const attrs = tag === 'td' ? { scope: null } : {};\n const cell = generators.replace(element, tag, attrs);\n list.push({\n item: element,\n sub: cell\n });\n return cell;\n };\n const replaceOrInit = (element, comparator) => {\n if (isRow$1(element) || isCol(element)) {\n return element;\n } else {\n const cell = element;\n return find(cell, comparator).fold(() => {\n return makeNew(cell);\n }, p => {\n return comparator(element, p.item) ? p.sub : makeNew(cell);\n });\n }\n };\n return { replaceOrInit };\n };\n };\n const getScopeAttribute = cell => getOpt(cell, 'scope').map(attribute => attribute.substr(0, 3));\n const merging = generators => {\n const unmerge = cell => {\n const scope = getScopeAttribute(cell);\n scope.each(attribute => set$2(cell, 'scope', attribute));\n return () => {\n const raw = generators.cell({\n element: cell,\n colspan: 1,\n rowspan: 1\n });\n remove$5(raw, 'width');\n remove$5(cell, 'width');\n scope.each(attribute => set$2(raw, 'scope', attribute));\n return raw;\n };\n };\n const merge = cells => {\n const getScopeProperty = () => {\n const stringAttributes = cat(map$1(cells, getScopeAttribute));\n if (stringAttributes.length === 0) {\n return Optional.none();\n } else {\n const baseScope = stringAttributes[0];\n const scopes = [\n 'row',\n 'col'\n ];\n const isMixed = exists(stringAttributes, attribute => {\n return attribute !== baseScope && contains$2(scopes, attribute);\n });\n return isMixed ? Optional.none() : Optional.from(baseScope);\n }\n };\n remove$5(cells[0], 'width');\n getScopeProperty().fold(() => remove$7(cells[0], 'scope'), attribute => set$2(cells[0], 'scope', attribute + 'group'));\n return constant(cells[0]);\n };\n return {\n unmerge,\n merge\n };\n };\n const Generators = {\n modification,\n transform: transform$1,\n merging\n };\n\n const blockList = [\n 'body',\n 'p',\n 'div',\n 'article',\n 'aside',\n 'figcaption',\n 'figure',\n 'footer',\n 'header',\n 'nav',\n 'section',\n 'ol',\n 'ul',\n 'table',\n 'thead',\n 'tfoot',\n 'tbody',\n 'caption',\n 'tr',\n 'td',\n 'th',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'blockquote',\n 'pre',\n 'address'\n ];\n const isList$1 = (universe, item) => {\n const tagName = universe.property().name(item);\n return contains$2([\n 'ol',\n 'ul'\n ], tagName);\n };\n const isBlock$1 = (universe, item) => {\n const tagName = universe.property().name(item);\n return contains$2(blockList, tagName);\n };\n const isEmptyTag$1 = (universe, item) => {\n return contains$2([\n 'br',\n 'img',\n 'hr',\n 'input'\n ], universe.property().name(item));\n };\n\n const universe$1 = DomUniverse();\n const isBlock = element => {\n return isBlock$1(universe$1, element);\n };\n const isList = element => {\n return isList$1(universe$1, element);\n };\n const isEmptyTag = element => {\n return isEmptyTag$1(universe$1, element);\n };\n\n const merge = cells => {\n const isBr = isTag('br');\n const advancedBr = children => {\n return forall(children, c => {\n return isBr(c) || isText(c) && get$6(c).trim().length === 0;\n });\n };\n const isListItem = el => {\n return name(el) === 'li' || ancestor$2(el, isList).isSome();\n };\n const siblingIsBlock = el => {\n return nextSibling(el).map(rightSibling => {\n if (isBlock(rightSibling)) {\n return true;\n }\n if (isEmptyTag(rightSibling)) {\n return name(rightSibling) === 'img' ? false : true;\n }\n return false;\n }).getOr(false);\n };\n const markCell = cell => {\n return last$1(cell).bind(rightEdge => {\n const rightSiblingIsBlock = siblingIsBlock(rightEdge);\n return parent(rightEdge).map(parent => {\n return rightSiblingIsBlock === true || isListItem(parent) || isBr(rightEdge) || isBlock(parent) && !eq$1(cell, parent) ? [] : [SugarElement.fromTag('br')];\n });\n }).getOr([]);\n };\n const markContent = () => {\n const content = bind$2(cells, cell => {\n const children = children$2(cell);\n return advancedBr(children) ? [] : children.concat(markCell(cell));\n });\n return content.length === 0 ? [SugarElement.fromTag('br')] : content;\n };\n const contents = markContent();\n empty(cells[0]);\n append(cells[0], contents);\n };\n\n const isEditable = elem => isEditable$1(elem, true);\n const prune = table => {\n const cells = cells$1(table);\n if (cells.length === 0) {\n remove$6(table);\n }\n };\n const outcome = (grid, cursor) => ({\n grid,\n cursor\n });\n const findEditableCursorPosition = rows => findMap(rows, row => findMap(row.cells, cell => {\n const elem = cell.element;\n return someIf(isEditable(elem), elem);\n }));\n const elementFromGrid = (grid, row, column) => {\n var _a, _b;\n const rows = extractGridDetails(grid).rows;\n return Optional.from((_b = (_a = rows[row]) === null || _a === void 0 ? void 0 : _a.cells[column]) === null || _b === void 0 ? void 0 : _b.element).filter(isEditable).orThunk(() => findEditableCursorPosition(rows));\n };\n const bundle = (grid, row, column) => {\n const cursorElement = elementFromGrid(grid, row, column);\n return outcome(grid, cursorElement);\n };\n const uniqueRows = details => {\n const rowCompilation = (rest, detail) => {\n const rowExists = exists(rest, currentDetail => currentDetail.row === detail.row);\n return rowExists ? rest : rest.concat([detail]);\n };\n return foldl(details, rowCompilation, []).sort((detailA, detailB) => detailA.row - detailB.row);\n };\n const opInsertRowsBefore = (grid, details, comparator, genWrappers) => {\n const targetIndex = details[0].row;\n const rows = uniqueRows(details);\n const newGrid = foldr(rows, (acc, row) => {\n const newG = insertRowAt(acc.grid, targetIndex, row.row + acc.delta, comparator, genWrappers.getOrInit);\n return {\n grid: newG,\n delta: acc.delta + 1\n };\n }, {\n grid,\n delta: 0\n }).grid;\n return bundle(newGrid, targetIndex, details[0].column);\n };\n const opInsertRowsAfter = (grid, details, comparator, genWrappers) => {\n const rows = uniqueRows(details);\n const target = rows[rows.length - 1];\n const targetIndex = target.row + target.rowspan;\n const newGrid = foldr(rows, (newG, row) => {\n return insertRowAt(newG, targetIndex, row.row, comparator, genWrappers.getOrInit);\n }, grid);\n return bundle(newGrid, targetIndex, details[0].column);\n };\n const opInsertColumnsBefore = (grid, extractDetail, comparator, genWrappers) => {\n const details = extractDetail.details;\n const columns = uniqueColumns(details);\n const targetIndex = columns[0].column;\n const newGrid = foldr(columns, (acc, col) => {\n const newG = insertColumnAt(acc.grid, targetIndex, col.column + acc.delta, comparator, genWrappers.getOrInit);\n return {\n grid: newG,\n delta: acc.delta + 1\n };\n }, {\n grid,\n delta: 0\n }).grid;\n return bundle(newGrid, details[0].row, targetIndex);\n };\n const opInsertColumnsAfter = (grid, extractDetail, comparator, genWrappers) => {\n const details = extractDetail.details;\n const target = details[details.length - 1];\n const targetIndex = target.column + target.colspan;\n const columns = uniqueColumns(details);\n const newGrid = foldr(columns, (newG, col) => {\n return insertColumnAt(newG, targetIndex, col.column, comparator, genWrappers.getOrInit);\n }, grid);\n return bundle(newGrid, details[0].row, targetIndex);\n };\n const opMakeColumnsHeader = (initialGrid, details, comparator, genWrappers) => {\n const columns = uniqueColumns(details);\n const columnIndexes = map$1(columns, detail => detail.column);\n const newGrid = replaceColumns(initialGrid, columnIndexes, true, comparator, genWrappers.replaceOrInit);\n return bundle(newGrid, details[0].row, details[0].column);\n };\n const opMakeCellsHeader = (initialGrid, details, comparator, genWrappers) => {\n const newGrid = replaceCells(initialGrid, details, comparator, genWrappers.replaceOrInit);\n return bundle(newGrid, details[0].row, details[0].column);\n };\n const opUnmakeColumnsHeader = (initialGrid, details, comparator, genWrappers) => {\n const columns = uniqueColumns(details);\n const columnIndexes = map$1(columns, detail => detail.column);\n const newGrid = replaceColumns(initialGrid, columnIndexes, false, comparator, genWrappers.replaceOrInit);\n return bundle(newGrid, details[0].row, details[0].column);\n };\n const opUnmakeCellsHeader = (initialGrid, details, comparator, genWrappers) => {\n const newGrid = replaceCells(initialGrid, details, comparator, genWrappers.replaceOrInit);\n return bundle(newGrid, details[0].row, details[0].column);\n };\n const makeRowsSection = (section, applyScope) => (initialGrid, details, comparator, genWrappers, tableSection) => {\n const rows = uniqueRows(details);\n const rowIndexes = map$1(rows, detail => detail.row);\n const newGrid = replaceRows(initialGrid, rowIndexes, section, applyScope, comparator, genWrappers.replaceOrInit, tableSection);\n return bundle(newGrid, details[0].row, details[0].column);\n };\n const opMakeRowsHeader = makeRowsSection('thead', true);\n const opMakeRowsBody = makeRowsSection('tbody', false);\n const opMakeRowsFooter = makeRowsSection('tfoot', false);\n const opEraseColumns = (grid, extractDetail, _comparator, _genWrappers) => {\n const columns = uniqueColumns(extractDetail.details);\n const newGrid = deleteColumnsAt(grid, map$1(columns, column => column.column));\n const maxColIndex = newGrid.length > 0 ? newGrid[0].cells.length - 1 : 0;\n return bundle(newGrid, columns[0].row, Math.min(columns[0].column, maxColIndex));\n };\n const opEraseRows = (grid, details, _comparator, _genWrappers) => {\n const rows = uniqueRows(details);\n const newGrid = deleteRowsAt(grid, rows[0].row, rows[rows.length - 1].row);\n const maxRowIndex = newGrid.length > 0 ? newGrid.length - 1 : 0;\n return bundle(newGrid, Math.min(details[0].row, maxRowIndex), details[0].column);\n };\n const opMergeCells = (grid, mergable, comparator, genWrappers) => {\n const cells = mergable.cells;\n merge(cells);\n const newGrid = merge$2(grid, mergable.bounds, comparator, genWrappers.merge(cells));\n return outcome(newGrid, Optional.from(cells[0]));\n };\n const opUnmergeCells = (grid, unmergable, comparator, genWrappers) => {\n const unmerge$1 = (b, cell) => unmerge(b, cell, comparator, genWrappers.unmerge(cell));\n const newGrid = foldr(unmergable, unmerge$1, grid);\n return outcome(newGrid, Optional.from(unmergable[0]));\n };\n const opPasteCells = (grid, pasteDetails, comparator, _genWrappers) => {\n const gridify = (table, generators) => {\n const wh = Warehouse.fromTable(table);\n return toGrid(wh, generators, true);\n };\n const gridB = gridify(pasteDetails.clipboard, pasteDetails.generators);\n const startAddress = address(pasteDetails.row, pasteDetails.column);\n const mergedGrid = merge$1(startAddress, grid, gridB, pasteDetails.generators, comparator);\n return mergedGrid.fold(() => outcome(grid, Optional.some(pasteDetails.element)), newGrid => {\n return bundle(newGrid, pasteDetails.row, pasteDetails.column);\n });\n };\n const gridifyRows = (rows, generators, context) => {\n const pasteDetails = fromPastedRows(rows, context.section);\n const wh = Warehouse.generate(pasteDetails);\n return toGrid(wh, generators, true);\n };\n const opPasteColsBefore = (grid, pasteDetails, comparator, _genWrappers) => {\n const rows = extractGridDetails(grid).rows;\n const index = pasteDetails.cells[0].column;\n const context = rows[pasteDetails.cells[0].row];\n const gridB = gridifyRows(pasteDetails.clipboard, pasteDetails.generators, context);\n const mergedGrid = insertCols(index, grid, gridB, pasteDetails.generators, comparator);\n return bundle(mergedGrid, pasteDetails.cells[0].row, pasteDetails.cells[0].column);\n };\n const opPasteColsAfter = (grid, pasteDetails, comparator, _genWrappers) => {\n const rows = extractGridDetails(grid).rows;\n const index = pasteDetails.cells[pasteDetails.cells.length - 1].column + pasteDetails.cells[pasteDetails.cells.length - 1].colspan;\n const context = rows[pasteDetails.cells[0].row];\n const gridB = gridifyRows(pasteDetails.clipboard, pasteDetails.generators, context);\n const mergedGrid = insertCols(index, grid, gridB, pasteDetails.generators, comparator);\n return bundle(mergedGrid, pasteDetails.cells[0].row, pasteDetails.cells[0].column);\n };\n const opPasteRowsBefore = (grid, pasteDetails, comparator, _genWrappers) => {\n const rows = extractGridDetails(grid).rows;\n const index = pasteDetails.cells[0].row;\n const context = rows[index];\n const gridB = gridifyRows(pasteDetails.clipboard, pasteDetails.generators, context);\n const mergedGrid = insertRows(index, grid, gridB, pasteDetails.generators, comparator);\n return bundle(mergedGrid, pasteDetails.cells[0].row, pasteDetails.cells[0].column);\n };\n const opPasteRowsAfter = (grid, pasteDetails, comparator, _genWrappers) => {\n const rows = extractGridDetails(grid).rows;\n const index = pasteDetails.cells[pasteDetails.cells.length - 1].row + pasteDetails.cells[pasteDetails.cells.length - 1].rowspan;\n const context = rows[pasteDetails.cells[0].row];\n const gridB = gridifyRows(pasteDetails.clipboard, pasteDetails.generators, context);\n const mergedGrid = insertRows(index, grid, gridB, pasteDetails.generators, comparator);\n return bundle(mergedGrid, pasteDetails.cells[0].row, pasteDetails.cells[0].column);\n };\n const opGetColumnsType = (table, target) => {\n const house = Warehouse.fromTable(table);\n const details = onCells(house, target);\n return details.bind(selectedCells => {\n const lastSelectedCell = selectedCells[selectedCells.length - 1];\n const minColRange = selectedCells[0].column;\n const maxColRange = lastSelectedCell.column + lastSelectedCell.colspan;\n const selectedColumnCells = flatten(map$1(house.all, row => filter$2(row.cells, cell => cell.column >= minColRange && cell.column < maxColRange)));\n return findCommonCellType(selectedColumnCells);\n }).getOr('');\n };\n const opGetCellsType = (table, target) => {\n const house = Warehouse.fromTable(table);\n const details = onCells(house, target);\n return details.bind(findCommonCellType).getOr('');\n };\n const opGetRowsType = (table, target) => {\n const house = Warehouse.fromTable(table);\n const details = onCells(house, target);\n return details.bind(selectedCells => {\n const lastSelectedCell = selectedCells[selectedCells.length - 1];\n const minRowRange = selectedCells[0].row;\n const maxRowRange = lastSelectedCell.row + lastSelectedCell.rowspan;\n const selectedRows = house.all.slice(minRowRange, maxRowRange);\n return findCommonRowType(selectedRows);\n }).getOr('');\n };\n const resize = (table, list, details, behaviours) => adjustWidthTo(table, list, details, behaviours.sizing);\n const adjustAndRedistributeWidths = (table, list, details, behaviours) => adjustAndRedistributeWidths$1(table, list, details, behaviours.sizing, behaviours.resize);\n const firstColumnIsLocked = (_warehouse, details) => exists(details, detail => detail.column === 0 && detail.isLocked);\n const lastColumnIsLocked = (warehouse, details) => exists(details, detail => detail.column + detail.colspan >= warehouse.grid.columns && detail.isLocked);\n const getColumnsWidth = (warehouse, details) => {\n const columns$1 = columns(warehouse);\n const uniqueCols = uniqueColumns(details);\n return foldl(uniqueCols, (acc, detail) => {\n const column = columns$1[detail.column];\n const colWidth = column.map(getOuter$2).getOr(0);\n return acc + colWidth;\n }, 0);\n };\n const insertColumnsExtractor = before => (warehouse, target) => onCells(warehouse, target).filter(details => {\n const checkLocked = before ? firstColumnIsLocked : lastColumnIsLocked;\n return !checkLocked(warehouse, details);\n }).map(details => ({\n details,\n pixelDelta: getColumnsWidth(warehouse, details)\n }));\n const eraseColumnsExtractor = (warehouse, target) => onUnlockedCells(warehouse, target).map(details => ({\n details,\n pixelDelta: -getColumnsWidth(warehouse, details)\n }));\n const pasteColumnsExtractor = before => (warehouse, target) => onPasteByEditor(warehouse, target).filter(details => {\n const checkLocked = before ? firstColumnIsLocked : lastColumnIsLocked;\n return !checkLocked(warehouse, details.cells);\n });\n const headerCellGenerator = Generators.transform('th');\n const bodyCellGenerator = Generators.transform('td');\n const insertRowsBefore = run(opInsertRowsBefore, onCells, noop, noop, Generators.modification);\n const insertRowsAfter = run(opInsertRowsAfter, onCells, noop, noop, Generators.modification);\n const insertColumnsBefore = run(opInsertColumnsBefore, insertColumnsExtractor(true), adjustAndRedistributeWidths, noop, Generators.modification);\n const insertColumnsAfter = run(opInsertColumnsAfter, insertColumnsExtractor(false), adjustAndRedistributeWidths, noop, Generators.modification);\n const eraseColumns = run(opEraseColumns, eraseColumnsExtractor, adjustAndRedistributeWidths, prune, Generators.modification);\n const eraseRows = run(opEraseRows, onCells, noop, prune, Generators.modification);\n const makeColumnsHeader = run(opMakeColumnsHeader, onUnlockedCells, noop, noop, headerCellGenerator);\n const unmakeColumnsHeader = run(opUnmakeColumnsHeader, onUnlockedCells, noop, noop, bodyCellGenerator);\n const makeRowsHeader = run(opMakeRowsHeader, onUnlockedCells, noop, noop, headerCellGenerator);\n const makeRowsBody = run(opMakeRowsBody, onUnlockedCells, noop, noop, bodyCellGenerator);\n const makeRowsFooter = run(opMakeRowsFooter, onUnlockedCells, noop, noop, bodyCellGenerator);\n const makeCellsHeader = run(opMakeCellsHeader, onUnlockedCells, noop, noop, headerCellGenerator);\n const unmakeCellsHeader = run(opUnmakeCellsHeader, onUnlockedCells, noop, noop, bodyCellGenerator);\n const mergeCells = run(opMergeCells, onUnlockedMergable, resize, noop, Generators.merging);\n const unmergeCells = run(opUnmergeCells, onUnlockedUnmergable, resize, noop, Generators.merging);\n const pasteCells = run(opPasteCells, onPaste, resize, noop, Generators.modification);\n const pasteColsBefore = run(opPasteColsBefore, pasteColumnsExtractor(true), noop, noop, Generators.modification);\n const pasteColsAfter = run(opPasteColsAfter, pasteColumnsExtractor(false), noop, noop, Generators.modification);\n const pasteRowsBefore = run(opPasteRowsBefore, onPasteByEditor, noop, noop, Generators.modification);\n const pasteRowsAfter = run(opPasteRowsAfter, onPasteByEditor, noop, noop, Generators.modification);\n const getColumnsType = opGetColumnsType;\n const getCellsType = opGetCellsType;\n const getRowsType = opGetRowsType;\n\n const fireNewRow = (editor, row) => editor.dispatch('NewRow', { node: row });\n const fireNewCell = (editor, cell) => editor.dispatch('NewCell', { node: cell });\n const fireTableModified = (editor, table, data) => {\n editor.dispatch('TableModified', {\n ...data,\n table\n });\n };\n const fireTableSelectionChange = (editor, cells, start, finish, otherCells) => {\n editor.dispatch('TableSelectionChange', {\n cells,\n start,\n finish,\n otherCells\n });\n };\n const fireTableSelectionClear = editor => {\n editor.dispatch('TableSelectionClear');\n };\n const fireObjectResizeStart = (editor, target, width, height, origin) => {\n editor.dispatch('ObjectResizeStart', {\n target,\n width,\n height,\n origin\n });\n };\n const fireObjectResized = (editor, target, width, height, origin) => {\n editor.dispatch('ObjectResized', {\n target,\n width,\n height,\n origin\n });\n };\n const styleModified = {\n structure: false,\n style: true\n };\n const structureModified = {\n structure: true,\n style: false\n };\n const styleAndStructureModified = {\n structure: true,\n style: true\n };\n\n const get$5 = (editor, table) => {\n if (isTablePercentagesForced(editor)) {\n return TableSize.percentageSize(table);\n } else if (isTablePixelsForced(editor)) {\n return TableSize.pixelSize(table);\n } else {\n return TableSize.getTableSize(table);\n }\n };\n\n const TableActions = (editor, resizeHandler, cellSelectionHandler) => {\n const isTableBody = editor => name(getBody(editor)) === 'table';\n const lastRowGuard = table => !isTableBody(editor) || getGridSize(table).rows > 1;\n const lastColumnGuard = table => !isTableBody(editor) || getGridSize(table).columns > 1;\n const cloneFormats = getTableCloneElements(editor);\n const colMutationOp = isResizeTableColumnResizing(editor) ? noop : halve;\n const getTableSectionType = table => {\n switch (getTableHeaderType(editor)) {\n case 'section':\n return TableSection.section();\n case 'sectionCells':\n return TableSection.sectionCells();\n case 'cells':\n return TableSection.cells();\n default:\n return TableSection.getTableSectionType(table, 'section');\n }\n };\n const setSelectionFromAction = (table, result) => result.cursor.fold(() => {\n const cells = cells$1(table);\n return head(cells).filter(inBody).map(firstCell => {\n cellSelectionHandler.clearSelectedCells(table.dom);\n const rng = editor.dom.createRng();\n rng.selectNode(firstCell.dom);\n editor.selection.setRng(rng);\n set$2(firstCell, 'data-mce-selected', '1');\n return rng;\n });\n }, cell => {\n const des = freefallRtl(cell);\n const rng = editor.dom.createRng();\n rng.setStart(des.element.dom, des.offset);\n rng.setEnd(des.element.dom, des.offset);\n editor.selection.setRng(rng);\n cellSelectionHandler.clearSelectedCells(table.dom);\n return Optional.some(rng);\n });\n const execute = (operation, guard, mutate, effect) => (table, target, noEvents = false) => {\n removeDataStyle(table);\n const doc = SugarElement.fromDom(editor.getDoc());\n const generators = cellOperations(mutate, doc, cloneFormats);\n const behaviours = {\n sizing: get$5(editor, table),\n resize: isResizeTableColumnResizing(editor) ? resizeTable() : preserveTable(),\n section: getTableSectionType(table)\n };\n return guard(table) ? operation(table, target, generators, behaviours).bind(result => {\n resizeHandler.refresh(table.dom);\n each$2(result.newRows, row => {\n fireNewRow(editor, row.dom);\n });\n each$2(result.newCells, cell => {\n fireNewCell(editor, cell.dom);\n });\n const range = setSelectionFromAction(table, result);\n if (inBody(table)) {\n removeDataStyle(table);\n if (!noEvents) {\n fireTableModified(editor, table.dom, effect);\n }\n }\n return range.map(rng => ({\n rng,\n effect\n }));\n }) : Optional.none();\n };\n const deleteRow = execute(eraseRows, lastRowGuard, noop, structureModified);\n const deleteColumn = execute(eraseColumns, lastColumnGuard, noop, structureModified);\n const insertRowsBefore$1 = execute(insertRowsBefore, always, noop, structureModified);\n const insertRowsAfter$1 = execute(insertRowsAfter, always, noop, structureModified);\n const insertColumnsBefore$1 = execute(insertColumnsBefore, always, colMutationOp, structureModified);\n const insertColumnsAfter$1 = execute(insertColumnsAfter, always, colMutationOp, structureModified);\n const mergeCells$1 = execute(mergeCells, always, noop, structureModified);\n const unmergeCells$1 = execute(unmergeCells, always, noop, structureModified);\n const pasteColsBefore$1 = execute(pasteColsBefore, always, noop, structureModified);\n const pasteColsAfter$1 = execute(pasteColsAfter, always, noop, structureModified);\n const pasteRowsBefore$1 = execute(pasteRowsBefore, always, noop, structureModified);\n const pasteRowsAfter$1 = execute(pasteRowsAfter, always, noop, structureModified);\n const pasteCells$1 = execute(pasteCells, always, noop, styleAndStructureModified);\n const makeCellsHeader$1 = execute(makeCellsHeader, always, noop, structureModified);\n const unmakeCellsHeader$1 = execute(unmakeCellsHeader, always, noop, structureModified);\n const makeColumnsHeader$1 = execute(makeColumnsHeader, always, noop, structureModified);\n const unmakeColumnsHeader$1 = execute(unmakeColumnsHeader, always, noop, structureModified);\n const makeRowsHeader$1 = execute(makeRowsHeader, always, noop, structureModified);\n const makeRowsBody$1 = execute(makeRowsBody, always, noop, structureModified);\n const makeRowsFooter$1 = execute(makeRowsFooter, always, noop, structureModified);\n const getTableCellType = getCellsType;\n const getTableColType = getColumnsType;\n const getTableRowType = getRowsType;\n return {\n deleteRow,\n deleteColumn,\n insertRowsBefore: insertRowsBefore$1,\n insertRowsAfter: insertRowsAfter$1,\n insertColumnsBefore: insertColumnsBefore$1,\n insertColumnsAfter: insertColumnsAfter$1,\n mergeCells: mergeCells$1,\n unmergeCells: unmergeCells$1,\n pasteColsBefore: pasteColsBefore$1,\n pasteColsAfter: pasteColsAfter$1,\n pasteRowsBefore: pasteRowsBefore$1,\n pasteRowsAfter: pasteRowsAfter$1,\n pasteCells: pasteCells$1,\n makeCellsHeader: makeCellsHeader$1,\n unmakeCellsHeader: unmakeCellsHeader$1,\n makeColumnsHeader: makeColumnsHeader$1,\n unmakeColumnsHeader: unmakeColumnsHeader$1,\n makeRowsHeader: makeRowsHeader$1,\n makeRowsBody: makeRowsBody$1,\n makeRowsFooter: makeRowsFooter$1,\n getTableRowType,\n getTableCellType,\n getTableColType\n };\n };\n\n const constrainSpan = (element, property, value) => {\n const currentColspan = getAttrValue(element, property, 1);\n if (value === 1 || currentColspan <= 1) {\n remove$7(element, property);\n } else {\n set$2(element, property, Math.min(value, currentColspan));\n }\n };\n const isColInRange = (minColRange, maxColRange) => cell => {\n const endCol = cell.column + cell.colspan - 1;\n const startCol = cell.column;\n return endCol >= minColRange && startCol < maxColRange;\n };\n const generateColGroup = (house, minColRange, maxColRange) => {\n if (Warehouse.hasColumns(house)) {\n const colsToCopy = filter$2(Warehouse.justColumns(house), isColInRange(minColRange, maxColRange));\n const copiedCols = map$1(colsToCopy, c => {\n const clonedCol = deep(c.element);\n constrainSpan(clonedCol, 'span', maxColRange - minColRange);\n return clonedCol;\n });\n const fakeColgroup = SugarElement.fromTag('colgroup');\n append(fakeColgroup, copiedCols);\n return [fakeColgroup];\n } else {\n return [];\n }\n };\n const generateRows = (house, minColRange, maxColRange) => map$1(house.all, row => {\n const cellsToCopy = filter$2(row.cells, isColInRange(minColRange, maxColRange));\n const copiedCells = map$1(cellsToCopy, cell => {\n const clonedCell = deep(cell.element);\n constrainSpan(clonedCell, 'colspan', maxColRange - minColRange);\n return clonedCell;\n });\n const fakeTR = SugarElement.fromTag('tr');\n append(fakeTR, copiedCells);\n return fakeTR;\n });\n const copyCols = (table, target) => {\n const house = Warehouse.fromTable(table);\n const details = onUnlockedCells(house, target);\n return details.map(selectedCells => {\n const lastSelectedCell = selectedCells[selectedCells.length - 1];\n const minColRange = selectedCells[0].column;\n const maxColRange = lastSelectedCell.column + lastSelectedCell.colspan;\n const fakeColGroups = generateColGroup(house, minColRange, maxColRange);\n const fakeRows = generateRows(house, minColRange, maxColRange);\n return [\n ...fakeColGroups,\n ...fakeRows\n ];\n });\n };\n\n const copyRows = (table, target, generators) => {\n const warehouse = Warehouse.fromTable(table);\n const details = onCells(warehouse, target);\n return details.bind(selectedCells => {\n const grid = toGrid(warehouse, generators, false);\n const rows = extractGridDetails(grid).rows;\n const slicedGrid = rows.slice(selectedCells[0].row, selectedCells[selectedCells.length - 1].row + selectedCells[selectedCells.length - 1].rowspan);\n const filteredGrid = bind$2(slicedGrid, row => {\n const newCells = filter$2(row.cells, cell => !cell.isLocked);\n return newCells.length > 0 ? [{\n ...row,\n cells: newCells\n }] : [];\n });\n const slicedDetails = toDetailList(filteredGrid);\n return someIf(slicedDetails.length > 0, slicedDetails);\n }).map(slicedDetails => copy(slicedDetails));\n };\n\n const adt$5 = Adt.generate([\n { invalid: ['raw'] },\n { pixels: ['value'] },\n { percent: ['value'] }\n ]);\n const validateFor = (suffix, type, value) => {\n const rawAmount = value.substring(0, value.length - suffix.length);\n const amount = parseFloat(rawAmount);\n return rawAmount === amount.toString() ? type(amount) : adt$5.invalid(value);\n };\n const from = value => {\n if (endsWith(value, '%')) {\n return validateFor('%', adt$5.percent, value);\n }\n if (endsWith(value, 'px')) {\n return validateFor('px', adt$5.pixels, value);\n }\n return adt$5.invalid(value);\n };\n const Size = {\n ...adt$5,\n from\n };\n\n const redistributeToPercent = (widths, totalWidth) => {\n return map$1(widths, w => {\n const colType = Size.from(w);\n return colType.fold(() => {\n return w;\n }, px => {\n const ratio = px / totalWidth * 100;\n return ratio + '%';\n }, pc => {\n return pc + '%';\n });\n });\n };\n const redistributeToPx = (widths, totalWidth, newTotalWidth) => {\n const scale = newTotalWidth / totalWidth;\n return map$1(widths, w => {\n const colType = Size.from(w);\n return colType.fold(() => {\n return w;\n }, px => {\n return px * scale + 'px';\n }, pc => {\n return pc / 100 * newTotalWidth + 'px';\n });\n });\n };\n const redistributeEmpty = (newWidthType, columns) => {\n const f = newWidthType.fold(() => constant(''), pixels => {\n const num = pixels / columns;\n return constant(num + 'px');\n }, () => {\n const num = 100 / columns;\n return constant(num + '%');\n });\n return range$1(columns, f);\n };\n const redistributeValues = (newWidthType, widths, totalWidth) => {\n return newWidthType.fold(() => {\n return widths;\n }, px => {\n return redistributeToPx(widths, totalWidth, px);\n }, _pc => {\n return redistributeToPercent(widths, totalWidth);\n });\n };\n const redistribute$1 = (widths, totalWidth, newWidth) => {\n const newType = Size.from(newWidth);\n const floats = forall(widths, s => {\n return s === '0px';\n }) ? redistributeEmpty(newType, widths.length) : redistributeValues(newType, widths, totalWidth);\n return normalize(floats);\n };\n const sum = (values, fallback) => {\n if (values.length === 0) {\n return fallback;\n }\n return foldr(values, (rest, v) => {\n return Size.from(v).fold(constant(0), identity, identity) + rest;\n }, 0);\n };\n const roundDown = (num, unit) => {\n const floored = Math.floor(num);\n return {\n value: floored + unit,\n remainder: num - floored\n };\n };\n const add$3 = (value, amount) => {\n return Size.from(value).fold(constant(value), px => {\n return px + amount + 'px';\n }, pc => {\n return pc + amount + '%';\n });\n };\n const normalize = values => {\n if (values.length === 0) {\n return values;\n }\n const scan = foldr(values, (rest, value) => {\n const info = Size.from(value).fold(() => ({\n value,\n remainder: 0\n }), num => roundDown(num, 'px'), num => ({\n value: num + '%',\n remainder: 0\n }));\n return {\n output: [info.value].concat(rest.output),\n remainder: rest.remainder + info.remainder\n };\n }, {\n output: [],\n remainder: 0\n });\n const r = scan.output;\n return r.slice(0, r.length - 1).concat([add$3(r[r.length - 1], Math.round(scan.remainder))]);\n };\n const validate = Size.from;\n\n const redistributeToW = (newWidths, cells, unit) => {\n each$2(cells, cell => {\n const widths = newWidths.slice(cell.column, cell.colspan + cell.column);\n const w = sum(widths, minWidth());\n set$1(cell.element, 'width', w + unit);\n });\n };\n const redistributeToColumns = (newWidths, columns, unit) => {\n each$2(columns, (column, index) => {\n const width = sum([newWidths[index]], minWidth());\n set$1(column.element, 'width', width + unit);\n });\n };\n const redistributeToH = (newHeights, rows, cells, unit) => {\n each$2(cells, cell => {\n const heights = newHeights.slice(cell.row, cell.rowspan + cell.row);\n const h = sum(heights, minHeight());\n set$1(cell.element, 'height', h + unit);\n });\n each$2(rows, (row, i) => {\n set$1(row.element, 'height', newHeights[i]);\n });\n };\n const getUnit = newSize => {\n return validate(newSize).fold(constant('px'), constant('px'), constant('%'));\n };\n const redistribute = (table, optWidth, optHeight) => {\n const warehouse = Warehouse.fromTable(table);\n const rows = warehouse.all;\n const cells = Warehouse.justCells(warehouse);\n const columns = Warehouse.justColumns(warehouse);\n optWidth.each(newWidth => {\n const widthUnit = getUnit(newWidth);\n const totalWidth = get$9(table);\n const oldWidths = getRawWidths(warehouse, table);\n const nuWidths = redistribute$1(oldWidths, totalWidth, newWidth);\n if (Warehouse.hasColumns(warehouse)) {\n redistributeToColumns(nuWidths, columns, widthUnit);\n } else {\n redistributeToW(nuWidths, cells, widthUnit);\n }\n set$1(table, 'width', newWidth);\n });\n optHeight.each(newHeight => {\n const hUnit = getUnit(newHeight);\n const totalHeight = get$8(table);\n const oldHeights = getRawHeights(warehouse, table, height);\n const nuHeights = redistribute$1(oldHeights, totalHeight, newHeight);\n redistributeToH(nuHeights, rows, cells, hUnit);\n set$1(table, 'height', newHeight);\n });\n };\n const isPercentSizing = isPercentSizing$1;\n const isPixelSizing = isPixelSizing$1;\n const isNoneSizing = isNoneSizing$1;\n\n const cleanupLegacyAttributes = element => {\n remove$7(element, 'width');\n };\n const convertToPercentSize = table => {\n const newWidth = getPercentTableWidth(table);\n redistribute(table, Optional.some(newWidth), Optional.none());\n cleanupLegacyAttributes(table);\n };\n const convertToPixelSize = table => {\n const newWidth = getPixelTableWidth(table);\n redistribute(table, Optional.some(newWidth), Optional.none());\n cleanupLegacyAttributes(table);\n };\n const convertToNoneSize = table => {\n remove$5(table, 'width');\n const columns = columns$1(table);\n const rowElements = columns.length > 0 ? columns : cells$1(table);\n each$2(rowElements, cell => {\n remove$5(cell, 'width');\n cleanupLegacyAttributes(cell);\n });\n cleanupLegacyAttributes(table);\n };\n\n const DefaultRenderOptions = {\n styles: {\n 'border-collapse': 'collapse',\n 'width': '100%'\n },\n attributes: { border: '1' },\n colGroups: false\n };\n const tableHeaderCell = () => SugarElement.fromTag('th');\n const tableCell = () => SugarElement.fromTag('td');\n const tableColumn = () => SugarElement.fromTag('col');\n const createRow = (columns, rowHeaders, columnHeaders, rowIndex) => {\n const tr = SugarElement.fromTag('tr');\n for (let j = 0; j < columns; j++) {\n const td = rowIndex < rowHeaders || j < columnHeaders ? tableHeaderCell() : tableCell();\n if (j < columnHeaders) {\n set$2(td, 'scope', 'row');\n }\n if (rowIndex < rowHeaders) {\n set$2(td, 'scope', 'col');\n }\n append$1(td, SugarElement.fromTag('br'));\n append$1(tr, td);\n }\n return tr;\n };\n const createGroupRow = columns => {\n const columnGroup = SugarElement.fromTag('colgroup');\n range$1(columns, () => append$1(columnGroup, tableColumn()));\n return columnGroup;\n };\n const createRows = (rows, columns, rowHeaders, columnHeaders) => range$1(rows, r => createRow(columns, rowHeaders, columnHeaders, r));\n const render = (rows, columns, rowHeaders, columnHeaders, headerType, renderOpts = DefaultRenderOptions) => {\n const table = SugarElement.fromTag('table');\n const rowHeadersGoInThead = headerType !== 'cells';\n setAll(table, renderOpts.styles);\n setAll$1(table, renderOpts.attributes);\n if (renderOpts.colGroups) {\n append$1(table, createGroupRow(columns));\n }\n const actualRowHeaders = Math.min(rows, rowHeaders);\n if (rowHeadersGoInThead && rowHeaders > 0) {\n const thead = SugarElement.fromTag('thead');\n append$1(table, thead);\n const theadRowHeaders = headerType === 'sectionCells' ? actualRowHeaders : 0;\n const theadRows = createRows(rowHeaders, columns, theadRowHeaders, columnHeaders);\n append(thead, theadRows);\n }\n const tbody = SugarElement.fromTag('tbody');\n append$1(table, tbody);\n const numRows = rowHeadersGoInThead ? rows - actualRowHeaders : rows;\n const numRowHeaders = rowHeadersGoInThead ? 0 : rowHeaders;\n const tbodyRows = createRows(numRows, columns, numRowHeaders, columnHeaders);\n append(tbody, tbodyRows);\n return table;\n };\n\n const get$4 = element => element.dom.innerHTML;\n const getOuter = element => {\n const container = SugarElement.fromTag('div');\n const clone = SugarElement.fromDom(element.dom.cloneNode(true));\n append$1(container, clone);\n return get$4(container);\n };\n\n const placeCaretInCell = (editor, cell) => {\n editor.selection.select(cell.dom, true);\n editor.selection.collapse(true);\n };\n const selectFirstCellInTable = (editor, tableElm) => {\n descendant(tableElm, 'td,th').each(curry(placeCaretInCell, editor));\n };\n const fireEvents = (editor, table) => {\n each$2(descendants(table, 'tr'), row => {\n fireNewRow(editor, row.dom);\n each$2(descendants(row, 'th,td'), cell => {\n fireNewCell(editor, cell.dom);\n });\n });\n };\n const isPercentage = width => isString(width) && width.indexOf('%') !== -1;\n const insert = (editor, columns, rows, colHeaders, rowHeaders) => {\n const defaultStyles = getTableDefaultStyles(editor);\n const options = {\n styles: defaultStyles,\n attributes: getTableDefaultAttributes(editor),\n colGroups: tableUseColumnGroup(editor)\n };\n editor.undoManager.ignore(() => {\n const table = render(rows, columns, rowHeaders, colHeaders, getTableHeaderType(editor), options);\n set$2(table, 'data-mce-id', '__mce');\n const html = getOuter(table);\n editor.insertContent(html);\n editor.addVisual();\n });\n return descendant(getBody(editor), 'table[data-mce-id=\"__mce\"]').map(table => {\n if (isTablePixelsForced(editor)) {\n convertToPixelSize(table);\n } else if (isTableResponsiveForced(editor)) {\n convertToNoneSize(table);\n } else if (isTablePercentagesForced(editor) || isPercentage(defaultStyles.width)) {\n convertToPercentSize(table);\n }\n removeDataStyle(table);\n remove$7(table, 'data-mce-id');\n fireEvents(editor, table);\n selectFirstCellInTable(editor, table);\n return table.dom;\n }).getOrNull();\n };\n const insertTable = (editor, rows, columns, options = {}) => {\n const checkInput = val => isNumber(val) && val > 0;\n if (checkInput(rows) && checkInput(columns)) {\n const headerRows = options.headerRows || 0;\n const headerColumns = options.headerColumns || 0;\n return insert(editor, columns, rows, headerColumns, headerRows);\n } else {\n console.error('Invalid values for mceInsertTable - rows and columns values are required to insert a table.');\n return null;\n }\n };\n\n var global = tinymce.util.Tools.resolve('tinymce.FakeClipboard');\n\n const tableTypeBase = 'x-tinymce/dom-table-';\n const tableTypeRow = tableTypeBase + 'rows';\n const tableTypeColumn = tableTypeBase + 'columns';\n const setData = items => {\n const fakeClipboardItem = global.FakeClipboardItem(items);\n global.write([fakeClipboardItem]);\n };\n const getData = type => {\n var _a;\n const items = (_a = global.read()) !== null && _a !== void 0 ? _a : [];\n return findMap(items, item => Optional.from(item.getType(type)));\n };\n const clearData = type => {\n if (getData(type).isSome()) {\n global.clear();\n }\n };\n const setRows = rowsOpt => {\n rowsOpt.fold(clearRows, rows => setData({ [tableTypeRow]: rows }));\n };\n const getRows = () => getData(tableTypeRow);\n const clearRows = () => clearData(tableTypeRow);\n const setColumns = columnsOpt => {\n columnsOpt.fold(clearColumns, columns => setData({ [tableTypeColumn]: columns }));\n };\n const getColumns = () => getData(tableTypeColumn);\n const clearColumns = () => clearData(tableTypeColumn);\n\n const getSelectionStartCellOrCaption = editor => getSelectionCellOrCaption(getSelectionStart(editor), getIsRoot(editor)).filter(isInEditableContext$1);\n const getSelectionStartCell = editor => getSelectionCell(getSelectionStart(editor), getIsRoot(editor)).filter(isInEditableContext$1);\n const registerCommands = (editor, actions) => {\n const isRoot = getIsRoot(editor);\n const eraseTable = () => getSelectionStartCellOrCaption(editor).each(cellOrCaption => {\n table(cellOrCaption, isRoot).filter(not(isRoot)).each(table => {\n const cursor = SugarElement.fromText('');\n after$5(table, cursor);\n remove$6(table);\n if (editor.dom.isEmpty(editor.getBody())) {\n editor.setContent('');\n editor.selection.setCursorLocation();\n } else {\n const rng = editor.dom.createRng();\n rng.setStart(cursor.dom, 0);\n rng.setEnd(cursor.dom, 0);\n editor.selection.setRng(rng);\n editor.nodeChanged();\n }\n });\n });\n const setSizingMode = sizing => getSelectionStartCellOrCaption(editor).each(cellOrCaption => {\n const isForcedSizing = isTableResponsiveForced(editor) || isTablePixelsForced(editor) || isTablePercentagesForced(editor);\n if (!isForcedSizing) {\n table(cellOrCaption, isRoot).each(table => {\n if (sizing === 'relative' && !isPercentSizing(table)) {\n convertToPercentSize(table);\n } else if (sizing === 'fixed' && !isPixelSizing(table)) {\n convertToPixelSize(table);\n } else if (sizing === 'responsive' && !isNoneSizing(table)) {\n convertToNoneSize(table);\n }\n removeDataStyle(table);\n fireTableModified(editor, table.dom, structureModified);\n });\n }\n });\n const getTableFromCell = cell => table(cell, isRoot);\n const performActionOnSelection = action => getSelectionStartCell(editor).bind(cell => getTableFromCell(cell).map(table => action(table, cell)));\n const toggleTableClass = (_ui, clazz) => {\n performActionOnSelection(table => {\n editor.formatter.toggle('tableclass', { value: clazz }, table.dom);\n fireTableModified(editor, table.dom, styleModified);\n });\n };\n const toggleTableCellClass = (_ui, clazz) => {\n performActionOnSelection(table => {\n const selectedCells = getCellsFromSelection(editor);\n const allHaveClass = forall(selectedCells, cell => editor.formatter.match('tablecellclass', { value: clazz }, cell.dom));\n const formatterAction = allHaveClass ? editor.formatter.remove : editor.formatter.apply;\n each$2(selectedCells, cell => formatterAction('tablecellclass', { value: clazz }, cell.dom));\n fireTableModified(editor, table.dom, styleModified);\n });\n };\n const toggleCaption = () => {\n getSelectionStartCellOrCaption(editor).each(cellOrCaption => {\n table(cellOrCaption, isRoot).each(table => {\n child(table, 'caption').fold(() => {\n const caption = SugarElement.fromTag('caption');\n append$1(caption, SugarElement.fromText('Caption'));\n appendAt(table, caption, 0);\n editor.selection.setCursorLocation(caption.dom, 0);\n }, caption => {\n if (isTag('caption')(cellOrCaption)) {\n one('td', table).each(td => editor.selection.setCursorLocation(td.dom, 0));\n }\n remove$6(caption);\n });\n fireTableModified(editor, table.dom, structureModified);\n });\n });\n };\n const postExecute = _data => {\n editor.focus();\n };\n const actOnSelection = (execute, noEvents = false) => performActionOnSelection((table, startCell) => {\n const targets = forMenu(getCellsFromSelection(editor), table, startCell);\n execute(table, targets, noEvents).each(postExecute);\n });\n const copyRowSelection = () => performActionOnSelection((table, startCell) => {\n const targets = forMenu(getCellsFromSelection(editor), table, startCell);\n const generators = cellOperations(noop, SugarElement.fromDom(editor.getDoc()), Optional.none());\n return copyRows(table, targets, generators);\n });\n const copyColSelection = () => performActionOnSelection((table, startCell) => {\n const targets = forMenu(getCellsFromSelection(editor), table, startCell);\n return copyCols(table, targets);\n });\n const pasteOnSelection = (execute, getRows) => getRows().each(rows => {\n const clonedRows = map$1(rows, row => deep(row));\n performActionOnSelection((table, startCell) => {\n const generators = paste$1(SugarElement.fromDom(editor.getDoc()));\n const targets = pasteRows(getCellsFromSelection(editor), startCell, clonedRows, generators);\n execute(table, targets).each(postExecute);\n });\n });\n const actOnType = getAction => (_ui, args) => get$c(args, 'type').each(type => {\n actOnSelection(getAction(type), args.no_events);\n });\n each$1({\n mceTableSplitCells: () => actOnSelection(actions.unmergeCells),\n mceTableMergeCells: () => actOnSelection(actions.mergeCells),\n mceTableInsertRowBefore: () => actOnSelection(actions.insertRowsBefore),\n mceTableInsertRowAfter: () => actOnSelection(actions.insertRowsAfter),\n mceTableInsertColBefore: () => actOnSelection(actions.insertColumnsBefore),\n mceTableInsertColAfter: () => actOnSelection(actions.insertColumnsAfter),\n mceTableDeleteCol: () => actOnSelection(actions.deleteColumn),\n mceTableDeleteRow: () => actOnSelection(actions.deleteRow),\n mceTableCutCol: () => copyColSelection().each(selection => {\n setColumns(selection);\n actOnSelection(actions.deleteColumn);\n }),\n mceTableCutRow: () => copyRowSelection().each(selection => {\n setRows(selection);\n actOnSelection(actions.deleteRow);\n }),\n mceTableCopyCol: () => copyColSelection().each(selection => setColumns(selection)),\n mceTableCopyRow: () => copyRowSelection().each(selection => setRows(selection)),\n mceTablePasteColBefore: () => pasteOnSelection(actions.pasteColsBefore, getColumns),\n mceTablePasteColAfter: () => pasteOnSelection(actions.pasteColsAfter, getColumns),\n mceTablePasteRowBefore: () => pasteOnSelection(actions.pasteRowsBefore, getRows),\n mceTablePasteRowAfter: () => pasteOnSelection(actions.pasteRowsAfter, getRows),\n mceTableDelete: eraseTable,\n mceTableCellToggleClass: toggleTableCellClass,\n mceTableToggleClass: toggleTableClass,\n mceTableToggleCaption: toggleCaption,\n mceTableSizingMode: (_ui, sizing) => setSizingMode(sizing),\n mceTableCellType: actOnType(type => type === 'th' ? actions.makeCellsHeader : actions.unmakeCellsHeader),\n mceTableColType: actOnType(type => type === 'th' ? actions.makeColumnsHeader : actions.unmakeColumnsHeader),\n mceTableRowType: actOnType(type => {\n switch (type) {\n case 'header':\n return actions.makeRowsHeader;\n case 'footer':\n return actions.makeRowsFooter;\n default:\n return actions.makeRowsBody;\n }\n })\n }, (func, name) => editor.addCommand(name, func));\n editor.addCommand('mceInsertTable', (_ui, args) => {\n insertTable(editor, args.rows, args.columns, args.options);\n });\n editor.addCommand('mceTableApplyCellStyle', (_ui, args) => {\n const getFormatName = style => 'tablecell' + style.toLowerCase().replace('-', '');\n if (!isObject(args)) {\n return;\n }\n const cells = filter$2(getCellsFromSelection(editor), isInEditableContext$1);\n if (cells.length === 0) {\n return;\n }\n const validArgs = filter$1(args, (value, style) => editor.formatter.has(getFormatName(style)) && isString(value));\n if (isEmpty(validArgs)) {\n return;\n }\n each$1(validArgs, (value, style) => {\n const formatName = getFormatName(style);\n each$2(cells, cell => {\n if (value === '') {\n editor.formatter.remove(formatName, { value: null }, cell.dom, true);\n } else {\n editor.formatter.apply(formatName, { value }, cell.dom);\n }\n });\n });\n getTableFromCell(cells[0]).each(table => fireTableModified(editor, table.dom, styleModified));\n });\n };\n\n const registerQueryCommands = (editor, actions) => {\n const isRoot = getIsRoot(editor);\n const lookupOnSelection = action => getSelectionCell(getSelectionStart(editor)).bind(cell => table(cell, isRoot).map(table => {\n const targets = forMenu(getCellsFromSelection(editor), table, cell);\n return action(table, targets);\n })).getOr('');\n each$1({\n mceTableRowType: () => lookupOnSelection(actions.getTableRowType),\n mceTableCellType: () => lookupOnSelection(actions.getTableCellType),\n mceTableColType: () => lookupOnSelection(actions.getTableColType)\n }, (func, name) => editor.addQueryValueHandler(name, func));\n };\n\n const adt$4 = Adt.generate([\n { before: ['element'] },\n {\n on: [\n 'element',\n 'offset'\n ]\n },\n { after: ['element'] }\n ]);\n const cata$1 = (subject, onBefore, onOn, onAfter) => subject.fold(onBefore, onOn, onAfter);\n const getStart$1 = situ => situ.fold(identity, identity, identity);\n const before$2 = adt$4.before;\n const on = adt$4.on;\n const after$3 = adt$4.after;\n const Situ = {\n before: before$2,\n on,\n after: after$3,\n cata: cata$1,\n getStart: getStart$1\n };\n\n const create$4 = (selection, kill) => ({\n selection,\n kill\n });\n const Response = { create: create$4 };\n\n const selectNode = (win, element) => {\n const rng = win.document.createRange();\n rng.selectNode(element.dom);\n return rng;\n };\n const selectNodeContents = (win, element) => {\n const rng = win.document.createRange();\n selectNodeContentsUsing(rng, element);\n return rng;\n };\n const selectNodeContentsUsing = (rng, element) => rng.selectNodeContents(element.dom);\n const setStart = (rng, situ) => {\n situ.fold(e => {\n rng.setStartBefore(e.dom);\n }, (e, o) => {\n rng.setStart(e.dom, o);\n }, e => {\n rng.setStartAfter(e.dom);\n });\n };\n const setFinish = (rng, situ) => {\n situ.fold(e => {\n rng.setEndBefore(e.dom);\n }, (e, o) => {\n rng.setEnd(e.dom, o);\n }, e => {\n rng.setEndAfter(e.dom);\n });\n };\n const relativeToNative = (win, startSitu, finishSitu) => {\n const range = win.document.createRange();\n setStart(range, startSitu);\n setFinish(range, finishSitu);\n return range;\n };\n const exactToNative = (win, start, soffset, finish, foffset) => {\n const rng = win.document.createRange();\n rng.setStart(start.dom, soffset);\n rng.setEnd(finish.dom, foffset);\n return rng;\n };\n const toRect = rect => ({\n left: rect.left,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n width: rect.width,\n height: rect.height\n });\n const getFirstRect$1 = rng => {\n const rects = rng.getClientRects();\n const rect = rects.length > 0 ? rects[0] : rng.getBoundingClientRect();\n return rect.width > 0 || rect.height > 0 ? Optional.some(rect).map(toRect) : Optional.none();\n };\n\n const adt$3 = Adt.generate([\n {\n ltr: [\n 'start',\n 'soffset',\n 'finish',\n 'foffset'\n ]\n },\n {\n rtl: [\n 'start',\n 'soffset',\n 'finish',\n 'foffset'\n ]\n }\n ]);\n const fromRange = (win, type, range) => type(SugarElement.fromDom(range.startContainer), range.startOffset, SugarElement.fromDom(range.endContainer), range.endOffset);\n const getRanges = (win, selection) => selection.match({\n domRange: rng => {\n return {\n ltr: constant(rng),\n rtl: Optional.none\n };\n },\n relative: (startSitu, finishSitu) => {\n return {\n ltr: cached(() => relativeToNative(win, startSitu, finishSitu)),\n rtl: cached(() => Optional.some(relativeToNative(win, finishSitu, startSitu)))\n };\n },\n exact: (start, soffset, finish, foffset) => {\n return {\n ltr: cached(() => exactToNative(win, start, soffset, finish, foffset)),\n rtl: cached(() => Optional.some(exactToNative(win, finish, foffset, start, soffset)))\n };\n }\n });\n const doDiagnose = (win, ranges) => {\n const rng = ranges.ltr();\n if (rng.collapsed) {\n const reversed = ranges.rtl().filter(rev => rev.collapsed === false);\n return reversed.map(rev => adt$3.rtl(SugarElement.fromDom(rev.endContainer), rev.endOffset, SugarElement.fromDom(rev.startContainer), rev.startOffset)).getOrThunk(() => fromRange(win, adt$3.ltr, rng));\n } else {\n return fromRange(win, adt$3.ltr, rng);\n }\n };\n const diagnose = (win, selection) => {\n const ranges = getRanges(win, selection);\n return doDiagnose(win, ranges);\n };\n const asLtrRange = (win, selection) => {\n const diagnosis = diagnose(win, selection);\n return diagnosis.match({\n ltr: (start, soffset, finish, foffset) => {\n const rng = win.document.createRange();\n rng.setStart(start.dom, soffset);\n rng.setEnd(finish.dom, foffset);\n return rng;\n },\n rtl: (start, soffset, finish, foffset) => {\n const rng = win.document.createRange();\n rng.setStart(finish.dom, foffset);\n rng.setEnd(start.dom, soffset);\n return rng;\n }\n });\n };\n adt$3.ltr;\n adt$3.rtl;\n\n const create$3 = (start, soffset, finish, foffset) => ({\n start,\n soffset,\n finish,\n foffset\n });\n const SimRange = { create: create$3 };\n\n const create$2 = (start, soffset, finish, foffset) => {\n return {\n start: Situ.on(start, soffset),\n finish: Situ.on(finish, foffset)\n };\n };\n const Situs = { create: create$2 };\n\n const convertToRange = (win, selection) => {\n const rng = asLtrRange(win, selection);\n return SimRange.create(SugarElement.fromDom(rng.startContainer), rng.startOffset, SugarElement.fromDom(rng.endContainer), rng.endOffset);\n };\n const makeSitus = Situs.create;\n\n const sync = (container, isRoot, start, soffset, finish, foffset, selectRange) => {\n if (!(eq$1(start, finish) && soffset === foffset)) {\n return closest$1(start, 'td,th', isRoot).bind(s => {\n return closest$1(finish, 'td,th', isRoot).bind(f => {\n return detect(container, isRoot, s, f, selectRange);\n });\n });\n } else {\n return Optional.none();\n }\n };\n const detect = (container, isRoot, start, finish, selectRange) => {\n if (!eq$1(start, finish)) {\n return identify(start, finish, isRoot).bind(cellSel => {\n const boxes = cellSel.boxes.getOr([]);\n if (boxes.length > 1) {\n selectRange(container, boxes, cellSel.start, cellSel.finish);\n return Optional.some(Response.create(Optional.some(makeSitus(start, 0, start, getEnd(start))), true));\n } else {\n return Optional.none();\n }\n });\n } else {\n return Optional.none();\n }\n };\n const update = (rows, columns, container, selected, annotations) => {\n const updateSelection = newSels => {\n annotations.clearBeforeUpdate(container);\n annotations.selectRange(container, newSels.boxes, newSels.start, newSels.finish);\n return newSels.boxes;\n };\n return shiftSelection(selected, rows, columns, annotations.firstSelectedSelector, annotations.lastSelectedSelector).map(updateSelection);\n };\n\n const traverse = (item, mode) => ({\n item,\n mode\n });\n const backtrack = (universe, item, _direction, transition = sidestep) => {\n return universe.property().parent(item).map(p => {\n return traverse(p, transition);\n });\n };\n const sidestep = (universe, item, direction, transition = advance) => {\n return direction.sibling(universe, item).map(p => {\n return traverse(p, transition);\n });\n };\n const advance = (universe, item, direction, transition = advance) => {\n const children = universe.property().children(item);\n const result = direction.first(children);\n return result.map(r => {\n return traverse(r, transition);\n });\n };\n const successors = [\n {\n current: backtrack,\n next: sidestep,\n fallback: Optional.none()\n },\n {\n current: sidestep,\n next: advance,\n fallback: Optional.some(backtrack)\n },\n {\n current: advance,\n next: advance,\n fallback: Optional.some(sidestep)\n }\n ];\n const go = (universe, item, mode, direction, rules = successors) => {\n const ruleOpt = find$1(rules, succ => {\n return succ.current === mode;\n });\n return ruleOpt.bind(rule => {\n return rule.current(universe, item, direction, rule.next).orThunk(() => {\n return rule.fallback.bind(fb => {\n return go(universe, item, fb, direction);\n });\n });\n });\n };\n\n const left$1 = () => {\n const sibling = (universe, item) => {\n return universe.query().prevSibling(item);\n };\n const first = children => {\n return children.length > 0 ? Optional.some(children[children.length - 1]) : Optional.none();\n };\n return {\n sibling,\n first\n };\n };\n const right$1 = () => {\n const sibling = (universe, item) => {\n return universe.query().nextSibling(item);\n };\n const first = children => {\n return children.length > 0 ? Optional.some(children[0]) : Optional.none();\n };\n return {\n sibling,\n first\n };\n };\n const Walkers = {\n left: left$1,\n right: right$1\n };\n\n const hone = (universe, item, predicate, mode, direction, isRoot) => {\n const next = go(universe, item, mode, direction);\n return next.bind(n => {\n if (isRoot(n.item)) {\n return Optional.none();\n } else {\n return predicate(n.item) ? Optional.some(n.item) : hone(universe, n.item, predicate, n.mode, direction, isRoot);\n }\n });\n };\n const left = (universe, item, predicate, isRoot) => {\n return hone(universe, item, predicate, sidestep, Walkers.left(), isRoot);\n };\n const right = (universe, item, predicate, isRoot) => {\n return hone(universe, item, predicate, sidestep, Walkers.right(), isRoot);\n };\n\n const isLeaf = universe => element => universe.property().children(element).length === 0;\n const before$1 = (universe, item, isRoot) => {\n return seekLeft$1(universe, item, isLeaf(universe), isRoot);\n };\n const after$2 = (universe, item, isRoot) => {\n return seekRight$1(universe, item, isLeaf(universe), isRoot);\n };\n const seekLeft$1 = left;\n const seekRight$1 = right;\n\n const universe = DomUniverse();\n const before = (element, isRoot) => {\n return before$1(universe, element, isRoot);\n };\n const after$1 = (element, isRoot) => {\n return after$2(universe, element, isRoot);\n };\n const seekLeft = (element, predicate, isRoot) => {\n return seekLeft$1(universe, element, predicate, isRoot);\n };\n const seekRight = (element, predicate, isRoot) => {\n return seekRight$1(universe, element, predicate, isRoot);\n };\n\n const ancestor = (scope, predicate, isRoot) => ancestor$2(scope, predicate, isRoot).isSome();\n\n const adt$2 = Adt.generate([\n { none: ['message'] },\n { success: [] },\n { failedUp: ['cell'] },\n { failedDown: ['cell'] }\n ]);\n const isOverlapping = (bridge, before, after) => {\n const beforeBounds = bridge.getRect(before);\n const afterBounds = bridge.getRect(after);\n return afterBounds.right > beforeBounds.left && afterBounds.left < beforeBounds.right;\n };\n const isRow = elem => {\n return closest$1(elem, 'tr');\n };\n const verify = (bridge, before, beforeOffset, after, afterOffset, failure, isRoot) => {\n return closest$1(after, 'td,th', isRoot).bind(afterCell => {\n return closest$1(before, 'td,th', isRoot).map(beforeCell => {\n if (!eq$1(afterCell, beforeCell)) {\n return sharedOne(isRow, [\n afterCell,\n beforeCell\n ]).fold(() => {\n return isOverlapping(bridge, beforeCell, afterCell) ? adt$2.success() : failure(beforeCell);\n }, _sharedRow => {\n return failure(beforeCell);\n });\n } else {\n return eq$1(after, afterCell) && getEnd(afterCell) === afterOffset ? failure(beforeCell) : adt$2.none('in same cell');\n }\n });\n }).getOr(adt$2.none('default'));\n };\n const cata = (subject, onNone, onSuccess, onFailedUp, onFailedDown) => {\n return subject.fold(onNone, onSuccess, onFailedUp, onFailedDown);\n };\n const BeforeAfter = {\n ...adt$2,\n verify,\n cata\n };\n\n const inParent = (parent, children, element, index) => ({\n parent,\n children,\n element,\n index\n });\n const indexInParent = element => parent(element).bind(parent => {\n const children = children$2(parent);\n return indexOf(children, element).map(index => inParent(parent, children, element, index));\n });\n const indexOf = (elements, element) => findIndex(elements, curry(eq$1, element));\n\n const isBr = isTag('br');\n const gatherer = (cand, gather, isRoot) => {\n return gather(cand, isRoot).bind(target => {\n return isText(target) && get$6(target).trim().length === 0 ? gatherer(target, gather, isRoot) : Optional.some(target);\n });\n };\n const handleBr = (isRoot, element, direction) => {\n return direction.traverse(element).orThunk(() => {\n return gatherer(element, direction.gather, isRoot);\n }).map(direction.relative);\n };\n const findBr = (element, offset) => {\n return child$2(element, offset).filter(isBr).orThunk(() => {\n return child$2(element, offset - 1).filter(isBr);\n });\n };\n const handleParent = (isRoot, element, offset, direction) => {\n return findBr(element, offset).bind(br => {\n return direction.traverse(br).fold(() => {\n return gatherer(br, direction.gather, isRoot).map(direction.relative);\n }, adjacent => {\n return indexInParent(adjacent).map(info => {\n return Situ.on(info.parent, info.index);\n });\n });\n });\n };\n const tryBr = (isRoot, element, offset, direction) => {\n const target = isBr(element) ? handleBr(isRoot, element, direction) : handleParent(isRoot, element, offset, direction);\n return target.map(tgt => {\n return {\n start: tgt,\n finish: tgt\n };\n });\n };\n const process = analysis => {\n return BeforeAfter.cata(analysis, _message => {\n return Optional.none();\n }, () => {\n return Optional.none();\n }, cell => {\n return Optional.some(point(cell, 0));\n }, cell => {\n return Optional.some(point(cell, getEnd(cell)));\n });\n };\n\n const moveDown = (caret, amount) => {\n return {\n left: caret.left,\n top: caret.top + amount,\n right: caret.right,\n bottom: caret.bottom + amount\n };\n };\n const moveUp = (caret, amount) => {\n return {\n left: caret.left,\n top: caret.top - amount,\n right: caret.right,\n bottom: caret.bottom - amount\n };\n };\n const translate = (caret, xDelta, yDelta) => {\n return {\n left: caret.left + xDelta,\n top: caret.top + yDelta,\n right: caret.right + xDelta,\n bottom: caret.bottom + yDelta\n };\n };\n const getTop = caret => {\n return caret.top;\n };\n const getBottom = caret => {\n return caret.bottom;\n };\n\n const getPartialBox = (bridge, element, offset) => {\n if (offset >= 0 && offset < getEnd(element)) {\n return bridge.getRangedRect(element, offset, element, offset + 1);\n } else if (offset > 0) {\n return bridge.getRangedRect(element, offset - 1, element, offset);\n }\n return Optional.none();\n };\n const toCaret = rect => ({\n left: rect.left,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom\n });\n const getElemBox = (bridge, element) => {\n return Optional.some(bridge.getRect(element));\n };\n const getBoxAt = (bridge, element, offset) => {\n if (isElement(element)) {\n return getElemBox(bridge, element).map(toCaret);\n } else if (isText(element)) {\n return getPartialBox(bridge, element, offset).map(toCaret);\n } else {\n return Optional.none();\n }\n };\n const getEntireBox = (bridge, element) => {\n if (isElement(element)) {\n return getElemBox(bridge, element).map(toCaret);\n } else if (isText(element)) {\n return bridge.getRangedRect(element, 0, element, getEnd(element)).map(toCaret);\n } else {\n return Optional.none();\n }\n };\n\n const JUMP_SIZE = 5;\n const NUM_RETRIES = 100;\n const adt$1 = Adt.generate([\n { none: [] },\n { retry: ['caret'] }\n ]);\n const isOutside = (caret, box) => {\n return caret.left < box.left || Math.abs(box.right - caret.left) < 1 || caret.left > box.right;\n };\n const inOutsideBlock = (bridge, element, caret) => {\n return closest$2(element, isBlock).fold(never, cell => {\n return getEntireBox(bridge, cell).exists(box => {\n return isOutside(caret, box);\n });\n });\n };\n const adjustDown = (bridge, element, guessBox, original, caret) => {\n const lowerCaret = moveDown(caret, JUMP_SIZE);\n if (Math.abs(guessBox.bottom - original.bottom) < 1) {\n return adt$1.retry(lowerCaret);\n } else if (guessBox.top > caret.bottom) {\n return adt$1.retry(lowerCaret);\n } else if (guessBox.top === caret.bottom) {\n return adt$1.retry(moveDown(caret, 1));\n } else {\n return inOutsideBlock(bridge, element, caret) ? adt$1.retry(translate(lowerCaret, JUMP_SIZE, 0)) : adt$1.none();\n }\n };\n const adjustUp = (bridge, element, guessBox, original, caret) => {\n const higherCaret = moveUp(caret, JUMP_SIZE);\n if (Math.abs(guessBox.top - original.top) < 1) {\n return adt$1.retry(higherCaret);\n } else if (guessBox.bottom < caret.top) {\n return adt$1.retry(higherCaret);\n } else if (guessBox.bottom === caret.top) {\n return adt$1.retry(moveUp(caret, 1));\n } else {\n return inOutsideBlock(bridge, element, caret) ? adt$1.retry(translate(higherCaret, JUMP_SIZE, 0)) : adt$1.none();\n }\n };\n const upMovement = {\n point: getTop,\n adjuster: adjustUp,\n move: moveUp,\n gather: before\n };\n const downMovement = {\n point: getBottom,\n adjuster: adjustDown,\n move: moveDown,\n gather: after$1\n };\n const isAtTable = (bridge, x, y) => {\n return bridge.elementFromPoint(x, y).filter(elm => {\n return name(elm) === 'table';\n }).isSome();\n };\n const adjustForTable = (bridge, movement, original, caret, numRetries) => {\n return adjustTil(bridge, movement, original, movement.move(caret, JUMP_SIZE), numRetries);\n };\n const adjustTil = (bridge, movement, original, caret, numRetries) => {\n if (numRetries === 0) {\n return Optional.some(caret);\n }\n if (isAtTable(bridge, caret.left, movement.point(caret))) {\n return adjustForTable(bridge, movement, original, caret, numRetries - 1);\n }\n return bridge.situsFromPoint(caret.left, movement.point(caret)).bind(guess => {\n return guess.start.fold(Optional.none, element => {\n return getEntireBox(bridge, element).bind(guessBox => {\n return movement.adjuster(bridge, element, guessBox, original, caret).fold(Optional.none, newCaret => {\n return adjustTil(bridge, movement, original, newCaret, numRetries - 1);\n });\n }).orThunk(() => {\n return Optional.some(caret);\n });\n }, Optional.none);\n });\n };\n const checkScroll = (movement, adjusted, bridge) => {\n if (movement.point(adjusted) > bridge.getInnerHeight()) {\n return Optional.some(movement.point(adjusted) - bridge.getInnerHeight());\n } else if (movement.point(adjusted) < 0) {\n return Optional.some(-movement.point(adjusted));\n } else {\n return Optional.none();\n }\n };\n const retry = (movement, bridge, caret) => {\n const moved = movement.move(caret, JUMP_SIZE);\n const adjusted = adjustTil(bridge, movement, caret, moved, NUM_RETRIES).getOr(moved);\n return checkScroll(movement, adjusted, bridge).fold(() => {\n return bridge.situsFromPoint(adjusted.left, movement.point(adjusted));\n }, delta => {\n bridge.scrollBy(0, delta);\n return bridge.situsFromPoint(adjusted.left, movement.point(adjusted) - delta);\n });\n };\n const Retries = {\n tryUp: curry(retry, upMovement),\n tryDown: curry(retry, downMovement),\n getJumpSize: constant(JUMP_SIZE)\n };\n\n const MAX_RETRIES = 20;\n const findSpot = (bridge, isRoot, direction) => {\n return bridge.getSelection().bind(sel => {\n return tryBr(isRoot, sel.finish, sel.foffset, direction).fold(() => {\n return Optional.some(point(sel.finish, sel.foffset));\n }, brNeighbour => {\n const range = bridge.fromSitus(brNeighbour);\n const analysis = BeforeAfter.verify(bridge, sel.finish, sel.foffset, range.finish, range.foffset, direction.failure, isRoot);\n return process(analysis);\n });\n });\n };\n const scan = (bridge, isRoot, element, offset, direction, numRetries) => {\n if (numRetries === 0) {\n return Optional.none();\n }\n return tryCursor(bridge, isRoot, element, offset, direction).bind(situs => {\n const range = bridge.fromSitus(situs);\n const analysis = BeforeAfter.verify(bridge, element, offset, range.finish, range.foffset, direction.failure, isRoot);\n return BeforeAfter.cata(analysis, () => {\n return Optional.none();\n }, () => {\n return Optional.some(situs);\n }, cell => {\n if (eq$1(element, cell) && offset === 0) {\n return tryAgain(bridge, element, offset, moveUp, direction);\n } else {\n return scan(bridge, isRoot, cell, 0, direction, numRetries - 1);\n }\n }, cell => {\n if (eq$1(element, cell) && offset === getEnd(cell)) {\n return tryAgain(bridge, element, offset, moveDown, direction);\n } else {\n return scan(bridge, isRoot, cell, getEnd(cell), direction, numRetries - 1);\n }\n });\n });\n };\n const tryAgain = (bridge, element, offset, move, direction) => {\n return getBoxAt(bridge, element, offset).bind(box => {\n return tryAt(bridge, direction, move(box, Retries.getJumpSize()));\n });\n };\n const tryAt = (bridge, direction, box) => {\n const browser = detect$2().browser;\n if (browser.isChromium() || browser.isSafari() || browser.isFirefox()) {\n return direction.retry(bridge, box);\n } else {\n return Optional.none();\n }\n };\n const tryCursor = (bridge, isRoot, element, offset, direction) => {\n return getBoxAt(bridge, element, offset).bind(box => {\n return tryAt(bridge, direction, box);\n });\n };\n const handle$1 = (bridge, isRoot, direction) => {\n return findSpot(bridge, isRoot, direction).bind(spot => {\n return scan(bridge, isRoot, spot.element, spot.offset, direction, MAX_RETRIES).map(bridge.fromSitus);\n });\n };\n\n const inSameTable = (elem, table) => {\n return ancestor(elem, e => {\n return parent(e).exists(p => {\n return eq$1(p, table);\n });\n });\n };\n const simulate = (bridge, isRoot, direction, initial, anchor) => {\n return closest$1(initial, 'td,th', isRoot).bind(start => {\n return closest$1(start, 'table', isRoot).bind(table => {\n if (!inSameTable(anchor, table)) {\n return Optional.none();\n }\n return handle$1(bridge, isRoot, direction).bind(range => {\n return closest$1(range.finish, 'td,th', isRoot).map(finish => {\n return {\n start,\n finish,\n range\n };\n });\n });\n });\n });\n };\n const navigate = (bridge, isRoot, direction, initial, anchor, precheck) => {\n return precheck(initial, isRoot).orThunk(() => {\n return simulate(bridge, isRoot, direction, initial, anchor).map(info => {\n const range = info.range;\n return Response.create(Optional.some(makeSitus(range.start, range.soffset, range.finish, range.foffset)), true);\n });\n });\n };\n const firstUpCheck = (initial, isRoot) => {\n return closest$1(initial, 'tr', isRoot).bind(startRow => {\n return closest$1(startRow, 'table', isRoot).bind(table => {\n const rows = descendants(table, 'tr');\n if (eq$1(startRow, rows[0])) {\n return seekLeft(table, element => {\n return last$1(element).isSome();\n }, isRoot).map(last => {\n const lastOffset = getEnd(last);\n return Response.create(Optional.some(makeSitus(last, lastOffset, last, lastOffset)), true);\n });\n } else {\n return Optional.none();\n }\n });\n });\n };\n const lastDownCheck = (initial, isRoot) => {\n return closest$1(initial, 'tr', isRoot).bind(startRow => {\n return closest$1(startRow, 'table', isRoot).bind(table => {\n const rows = descendants(table, 'tr');\n if (eq$1(startRow, rows[rows.length - 1])) {\n return seekRight(table, element => {\n return first(element).isSome();\n }, isRoot).map(first => {\n return Response.create(Optional.some(makeSitus(first, 0, first, 0)), true);\n });\n } else {\n return Optional.none();\n }\n });\n });\n };\n const select = (bridge, container, isRoot, direction, initial, anchor, selectRange) => {\n return simulate(bridge, isRoot, direction, initial, anchor).bind(info => {\n return detect(container, isRoot, info.start, info.finish, selectRange);\n });\n };\n\n const Cell = initial => {\n let value = initial;\n const get = () => {\n return value;\n };\n const set = v => {\n value = v;\n };\n return {\n get,\n set\n };\n };\n\n const singleton = doRevoke => {\n const subject = Cell(Optional.none());\n const revoke = () => subject.get().each(doRevoke);\n const clear = () => {\n revoke();\n subject.set(Optional.none());\n };\n const isSet = () => subject.get().isSome();\n const get = () => subject.get();\n const set = s => {\n revoke();\n subject.set(Optional.some(s));\n };\n return {\n clear,\n isSet,\n get,\n set\n };\n };\n const value = () => {\n const subject = singleton(noop);\n const on = f => subject.get().each(f);\n return {\n ...subject,\n on\n };\n };\n\n const findCell = (target, isRoot) => closest$1(target, 'td,th', isRoot);\n const isInEditableContext = cell => parentElement(cell).exists(isEditable$1);\n const MouseSelection = (bridge, container, isRoot, annotations) => {\n const cursor = value();\n const clearstate = cursor.clear;\n const applySelection = event => {\n cursor.on(start => {\n annotations.clearBeforeUpdate(container);\n findCell(event.target, isRoot).each(finish => {\n identify(start, finish, isRoot).each(cellSel => {\n const boxes = cellSel.boxes.getOr([]);\n if (boxes.length === 1) {\n const singleCell = boxes[0];\n const isNonEditableCell = getRaw(singleCell) === 'false';\n const isCellClosestContentEditable = is(closest(event.target), singleCell, eq$1);\n if (isNonEditableCell && isCellClosestContentEditable) {\n annotations.selectRange(container, boxes, singleCell, singleCell);\n bridge.selectContents(singleCell);\n }\n } else if (boxes.length > 1) {\n annotations.selectRange(container, boxes, cellSel.start, cellSel.finish);\n bridge.selectContents(finish);\n }\n });\n });\n });\n };\n const mousedown = event => {\n annotations.clear(container);\n findCell(event.target, isRoot).filter(isInEditableContext).each(cursor.set);\n };\n const mouseover = event => {\n applySelection(event);\n };\n const mouseup = event => {\n applySelection(event);\n clearstate();\n };\n return {\n clearstate,\n mousedown,\n mouseover,\n mouseup\n };\n };\n\n const down = {\n traverse: nextSibling,\n gather: after$1,\n relative: Situ.before,\n retry: Retries.tryDown,\n failure: BeforeAfter.failedDown\n };\n const up = {\n traverse: prevSibling,\n gather: before,\n relative: Situ.before,\n retry: Retries.tryUp,\n failure: BeforeAfter.failedUp\n };\n\n const isKey = key => {\n return keycode => {\n return keycode === key;\n };\n };\n const isUp = isKey(38);\n const isDown = isKey(40);\n const isNavigation = keycode => {\n return keycode >= 37 && keycode <= 40;\n };\n const ltr = {\n isBackward: isKey(37),\n isForward: isKey(39)\n };\n const rtl = {\n isBackward: isKey(39),\n isForward: isKey(37)\n };\n\n const get$3 = _DOC => {\n const doc = _DOC !== undefined ? _DOC.dom : document;\n const x = doc.body.scrollLeft || doc.documentElement.scrollLeft;\n const y = doc.body.scrollTop || doc.documentElement.scrollTop;\n return SugarPosition(x, y);\n };\n const by = (x, y, _DOC) => {\n const doc = _DOC !== undefined ? _DOC.dom : document;\n const win = doc.defaultView;\n if (win) {\n win.scrollBy(x, y);\n }\n };\n\n const adt = Adt.generate([\n { domRange: ['rng'] },\n {\n relative: [\n 'startSitu',\n 'finishSitu'\n ]\n },\n {\n exact: [\n 'start',\n 'soffset',\n 'finish',\n 'foffset'\n ]\n }\n ]);\n const exactFromRange = simRange => adt.exact(simRange.start, simRange.soffset, simRange.finish, simRange.foffset);\n const getStart = selection => selection.match({\n domRange: rng => SugarElement.fromDom(rng.startContainer),\n relative: (startSitu, _finishSitu) => Situ.getStart(startSitu),\n exact: (start, _soffset, _finish, _foffset) => start\n });\n const domRange = adt.domRange;\n const relative = adt.relative;\n const exact = adt.exact;\n const getWin = selection => {\n const start = getStart(selection);\n return defaultView(start);\n };\n const range = SimRange.create;\n const SimSelection = {\n domRange,\n relative,\n exact,\n exactFromRange,\n getWin,\n range\n };\n\n const caretPositionFromPoint = (doc, x, y) => {\n var _a, _b;\n return Optional.from((_b = (_a = doc.dom).caretPositionFromPoint) === null || _b === void 0 ? void 0 : _b.call(_a, x, y)).bind(pos => {\n if (pos.offsetNode === null) {\n return Optional.none();\n }\n const r = doc.dom.createRange();\n r.setStart(pos.offsetNode, pos.offset);\n r.collapse();\n return Optional.some(r);\n });\n };\n const caretRangeFromPoint = (doc, x, y) => {\n var _a, _b;\n return Optional.from((_b = (_a = doc.dom).caretRangeFromPoint) === null || _b === void 0 ? void 0 : _b.call(_a, x, y));\n };\n const availableSearch = (() => {\n if (document.caretPositionFromPoint) {\n return caretPositionFromPoint;\n } else if (document.caretRangeFromPoint) {\n return caretRangeFromPoint;\n } else {\n return Optional.none;\n }\n })();\n const fromPoint = (win, x, y) => {\n const doc = SugarElement.fromDom(win.document);\n return availableSearch(doc, x, y).map(rng => SimRange.create(SugarElement.fromDom(rng.startContainer), rng.startOffset, SugarElement.fromDom(rng.endContainer), rng.endOffset));\n };\n\n const beforeSpecial = (element, offset) => {\n const name$1 = name(element);\n if ('input' === name$1) {\n return Situ.after(element);\n } else if (!contains$2([\n 'br',\n 'img'\n ], name$1)) {\n return Situ.on(element, offset);\n } else {\n return offset === 0 ? Situ.before(element) : Situ.after(element);\n }\n };\n const preprocessRelative = (startSitu, finishSitu) => {\n const start = startSitu.fold(Situ.before, beforeSpecial, Situ.after);\n const finish = finishSitu.fold(Situ.before, beforeSpecial, Situ.after);\n return SimSelection.relative(start, finish);\n };\n const preprocessExact = (start, soffset, finish, foffset) => {\n const startSitu = beforeSpecial(start, soffset);\n const finishSitu = beforeSpecial(finish, foffset);\n return SimSelection.relative(startSitu, finishSitu);\n };\n\n const makeRange = (start, soffset, finish, foffset) => {\n const doc = owner(start);\n const rng = doc.dom.createRange();\n rng.setStart(start.dom, soffset);\n rng.setEnd(finish.dom, foffset);\n return rng;\n };\n const after = (start, soffset, finish, foffset) => {\n const r = makeRange(start, soffset, finish, foffset);\n const same = eq$1(start, finish) && soffset === foffset;\n return r.collapsed && !same;\n };\n\n const getNativeSelection = win => Optional.from(win.getSelection());\n const doSetNativeRange = (win, rng) => {\n getNativeSelection(win).each(selection => {\n selection.removeAllRanges();\n selection.addRange(rng);\n });\n };\n const doSetRange = (win, start, soffset, finish, foffset) => {\n const rng = exactToNative(win, start, soffset, finish, foffset);\n doSetNativeRange(win, rng);\n };\n const setLegacyRtlRange = (win, selection, start, soffset, finish, foffset) => {\n selection.collapse(start.dom, soffset);\n selection.extend(finish.dom, foffset);\n };\n const setRangeFromRelative = (win, relative) => diagnose(win, relative).match({\n ltr: (start, soffset, finish, foffset) => {\n doSetRange(win, start, soffset, finish, foffset);\n },\n rtl: (start, soffset, finish, foffset) => {\n getNativeSelection(win).each(selection => {\n if (selection.setBaseAndExtent) {\n selection.setBaseAndExtent(start.dom, soffset, finish.dom, foffset);\n } else if (selection.extend) {\n try {\n setLegacyRtlRange(win, selection, start, soffset, finish, foffset);\n } catch (e) {\n doSetRange(win, finish, foffset, start, soffset);\n }\n } else {\n doSetRange(win, finish, foffset, start, soffset);\n }\n });\n }\n });\n const setExact = (win, start, soffset, finish, foffset) => {\n const relative = preprocessExact(start, soffset, finish, foffset);\n setRangeFromRelative(win, relative);\n };\n const setRelative = (win, startSitu, finishSitu) => {\n const relative = preprocessRelative(startSitu, finishSitu);\n setRangeFromRelative(win, relative);\n };\n const readRange = selection => {\n if (selection.rangeCount > 0) {\n const firstRng = selection.getRangeAt(0);\n const lastRng = selection.getRangeAt(selection.rangeCount - 1);\n return Optional.some(SimRange.create(SugarElement.fromDom(firstRng.startContainer), firstRng.startOffset, SugarElement.fromDom(lastRng.endContainer), lastRng.endOffset));\n } else {\n return Optional.none();\n }\n };\n const doGetExact = selection => {\n if (selection.anchorNode === null || selection.focusNode === null) {\n return readRange(selection);\n } else {\n const anchor = SugarElement.fromDom(selection.anchorNode);\n const focus = SugarElement.fromDom(selection.focusNode);\n return after(anchor, selection.anchorOffset, focus, selection.focusOffset) ? Optional.some(SimRange.create(anchor, selection.anchorOffset, focus, selection.focusOffset)) : readRange(selection);\n }\n };\n const setToElement = (win, element, selectNodeContents$1 = true) => {\n const rngGetter = selectNodeContents$1 ? selectNodeContents : selectNode;\n const rng = rngGetter(win, element);\n doSetNativeRange(win, rng);\n };\n const getExact = win => getNativeSelection(win).filter(sel => sel.rangeCount > 0).bind(doGetExact);\n const get$2 = win => getExact(win).map(range => SimSelection.exact(range.start, range.soffset, range.finish, range.foffset));\n const getFirstRect = (win, selection) => {\n const rng = asLtrRange(win, selection);\n return getFirstRect$1(rng);\n };\n const getAtPoint = (win, x, y) => fromPoint(win, x, y);\n const clear = win => {\n getNativeSelection(win).each(selection => selection.removeAllRanges());\n };\n\n const WindowBridge = win => {\n const elementFromPoint = (x, y) => {\n return SugarElement.fromPoint(SugarElement.fromDom(win.document), x, y);\n };\n const getRect = element => {\n return element.dom.getBoundingClientRect();\n };\n const getRangedRect = (start, soffset, finish, foffset) => {\n const sel = SimSelection.exact(start, soffset, finish, foffset);\n return getFirstRect(win, sel);\n };\n const getSelection = () => {\n return get$2(win).map(exactAdt => {\n return convertToRange(win, exactAdt);\n });\n };\n const fromSitus = situs => {\n const relative = SimSelection.relative(situs.start, situs.finish);\n return convertToRange(win, relative);\n };\n const situsFromPoint = (x, y) => {\n return getAtPoint(win, x, y).map(exact => {\n return Situs.create(exact.start, exact.soffset, exact.finish, exact.foffset);\n });\n };\n const clearSelection = () => {\n clear(win);\n };\n const collapseSelection = (toStart = false) => {\n get$2(win).each(sel => sel.fold(rng => rng.collapse(toStart), (startSitu, finishSitu) => {\n const situ = toStart ? startSitu : finishSitu;\n setRelative(win, situ, situ);\n }, (start, soffset, finish, foffset) => {\n const node = toStart ? start : finish;\n const offset = toStart ? soffset : foffset;\n setExact(win, node, offset, node, offset);\n }));\n };\n const selectNode = element => {\n setToElement(win, element, false);\n };\n const selectContents = element => {\n setToElement(win, element);\n };\n const setSelection = sel => {\n setExact(win, sel.start, sel.soffset, sel.finish, sel.foffset);\n };\n const setRelativeSelection = (start, finish) => {\n setRelative(win, start, finish);\n };\n const getInnerHeight = () => {\n return win.innerHeight;\n };\n const getScrollY = () => {\n const pos = get$3(SugarElement.fromDom(win.document));\n return pos.top;\n };\n const scrollBy = (x, y) => {\n by(x, y, SugarElement.fromDom(win.document));\n };\n return {\n elementFromPoint,\n getRect,\n getRangedRect,\n getSelection,\n fromSitus,\n situsFromPoint,\n clearSelection,\n collapseSelection,\n setSelection,\n setRelativeSelection,\n selectNode,\n selectContents,\n getInnerHeight,\n getScrollY,\n scrollBy\n };\n };\n\n const rc = (rows, cols) => ({\n rows,\n cols\n });\n const mouse = (win, container, isRoot, annotations) => {\n const bridge = WindowBridge(win);\n const handlers = MouseSelection(bridge, container, isRoot, annotations);\n return {\n clearstate: handlers.clearstate,\n mousedown: handlers.mousedown,\n mouseover: handlers.mouseover,\n mouseup: handlers.mouseup\n };\n };\n const isEditableNode = node => closest$2(node, isHTMLElement).exists(isEditable$1);\n const isEditableSelection = (start, finish) => isEditableNode(start) || isEditableNode(finish);\n const keyboard = (win, container, isRoot, annotations) => {\n const bridge = WindowBridge(win);\n const clearToNavigate = () => {\n annotations.clear(container);\n return Optional.none();\n };\n const keydown = (event, start, soffset, finish, foffset, direction) => {\n const realEvent = event.raw;\n const keycode = realEvent.which;\n const shiftKey = realEvent.shiftKey === true;\n const handler = retrieve$1(container, annotations.selectedSelector).fold(() => {\n if (isNavigation(keycode) && !shiftKey) {\n annotations.clearBeforeUpdate(container);\n }\n if (isNavigation(keycode) && shiftKey && !isEditableSelection(start, finish)) {\n return Optional.none;\n } else if (isDown(keycode) && shiftKey) {\n return curry(select, bridge, container, isRoot, down, finish, start, annotations.selectRange);\n } else if (isUp(keycode) && shiftKey) {\n return curry(select, bridge, container, isRoot, up, finish, start, annotations.selectRange);\n } else if (isDown(keycode)) {\n return curry(navigate, bridge, isRoot, down, finish, start, lastDownCheck);\n } else if (isUp(keycode)) {\n return curry(navigate, bridge, isRoot, up, finish, start, firstUpCheck);\n } else {\n return Optional.none;\n }\n }, selected => {\n const update$1 = attempts => {\n return () => {\n const navigation = findMap(attempts, delta => {\n return update(delta.rows, delta.cols, container, selected, annotations);\n });\n return navigation.fold(() => {\n return getEdges(container, annotations.firstSelectedSelector, annotations.lastSelectedSelector).map(edges => {\n const relative = isDown(keycode) || direction.isForward(keycode) ? Situ.after : Situ.before;\n bridge.setRelativeSelection(Situ.on(edges.first, 0), relative(edges.table));\n annotations.clear(container);\n return Response.create(Optional.none(), true);\n });\n }, _ => {\n return Optional.some(Response.create(Optional.none(), true));\n });\n };\n };\n if (isNavigation(keycode) && shiftKey && !isEditableSelection(start, finish)) {\n return Optional.none;\n } else if (isDown(keycode) && shiftKey) {\n return update$1([rc(+1, 0)]);\n } else if (isUp(keycode) && shiftKey) {\n return update$1([rc(-1, 0)]);\n } else if (direction.isBackward(keycode) && shiftKey) {\n return update$1([\n rc(0, -1),\n rc(-1, 0)\n ]);\n } else if (direction.isForward(keycode) && shiftKey) {\n return update$1([\n rc(0, +1),\n rc(+1, 0)\n ]);\n } else if (isNavigation(keycode) && !shiftKey) {\n return clearToNavigate;\n } else {\n return Optional.none;\n }\n });\n return handler();\n };\n const keyup = (event, start, soffset, finish, foffset) => {\n return retrieve$1(container, annotations.selectedSelector).fold(() => {\n const realEvent = event.raw;\n const keycode = realEvent.which;\n const shiftKey = realEvent.shiftKey === true;\n if (!shiftKey) {\n return Optional.none();\n }\n if (isNavigation(keycode) && isEditableSelection(start, finish)) {\n return sync(container, isRoot, start, soffset, finish, foffset, annotations.selectRange);\n } else {\n return Optional.none();\n }\n }, Optional.none);\n };\n return {\n keydown,\n keyup\n };\n };\n const external = (win, container, isRoot, annotations) => {\n const bridge = WindowBridge(win);\n return (start, finish) => {\n annotations.clearBeforeUpdate(container);\n identify(start, finish, isRoot).each(cellSel => {\n const boxes = cellSel.boxes.getOr([]);\n annotations.selectRange(container, boxes, cellSel.start, cellSel.finish);\n bridge.selectContents(finish);\n bridge.collapseSelection();\n });\n };\n };\n\n const read = (element, attr) => {\n const value = get$b(element, attr);\n return value === undefined || value === '' ? [] : value.split(' ');\n };\n const add$2 = (element, attr, id) => {\n const old = read(element, attr);\n const nu = old.concat([id]);\n set$2(element, attr, nu.join(' '));\n return true;\n };\n const remove$4 = (element, attr, id) => {\n const nu = filter$2(read(element, attr), v => v !== id);\n if (nu.length > 0) {\n set$2(element, attr, nu.join(' '));\n } else {\n remove$7(element, attr);\n }\n return false;\n };\n\n const supports = element => element.dom.classList !== undefined;\n const get$1 = element => read(element, 'class');\n const add$1 = (element, clazz) => add$2(element, 'class', clazz);\n const remove$3 = (element, clazz) => remove$4(element, 'class', clazz);\n\n const add = (element, clazz) => {\n if (supports(element)) {\n element.dom.classList.add(clazz);\n } else {\n add$1(element, clazz);\n }\n };\n const cleanClass = element => {\n const classList = supports(element) ? element.dom.classList : get$1(element);\n if (classList.length === 0) {\n remove$7(element, 'class');\n }\n };\n const remove$2 = (element, clazz) => {\n if (supports(element)) {\n const classList = element.dom.classList;\n classList.remove(clazz);\n } else {\n remove$3(element, clazz);\n }\n cleanClass(element);\n };\n const has = (element, clazz) => supports(element) && element.dom.classList.contains(clazz);\n\n const remove$1 = (element, classes) => {\n each$2(classes, x => {\n remove$2(element, x);\n });\n };\n\n const addClass = clazz => element => {\n add(element, clazz);\n };\n const removeClasses = classes => element => {\n remove$1(element, classes);\n };\n\n const byClass = ephemera => {\n const addSelectionClass = addClass(ephemera.selected);\n const removeSelectionClasses = removeClasses([\n ephemera.selected,\n ephemera.lastSelected,\n ephemera.firstSelected\n ]);\n const clear = container => {\n const sels = descendants(container, ephemera.selectedSelector);\n each$2(sels, removeSelectionClasses);\n };\n const selectRange = (container, cells, start, finish) => {\n clear(container);\n each$2(cells, addSelectionClass);\n add(start, ephemera.firstSelected);\n add(finish, ephemera.lastSelected);\n };\n return {\n clearBeforeUpdate: clear,\n clear,\n selectRange,\n selectedSelector: ephemera.selectedSelector,\n firstSelectedSelector: ephemera.firstSelectedSelector,\n lastSelectedSelector: ephemera.lastSelectedSelector\n };\n };\n const byAttr = (ephemera, onSelection, onClear) => {\n const removeSelectionAttributes = element => {\n remove$7(element, ephemera.selected);\n remove$7(element, ephemera.firstSelected);\n remove$7(element, ephemera.lastSelected);\n };\n const addSelectionAttribute = element => {\n set$2(element, ephemera.selected, '1');\n };\n const clear = container => {\n clearBeforeUpdate(container);\n onClear();\n };\n const clearBeforeUpdate = container => {\n const sels = descendants(container, `${ ephemera.selectedSelector },${ ephemera.firstSelectedSelector },${ ephemera.lastSelectedSelector }`);\n each$2(sels, removeSelectionAttributes);\n };\n const selectRange = (container, cells, start, finish) => {\n clear(container);\n each$2(cells, addSelectionAttribute);\n set$2(start, ephemera.firstSelected, '1');\n set$2(finish, ephemera.lastSelected, '1');\n onSelection(cells, start, finish);\n };\n return {\n clearBeforeUpdate,\n clear,\n selectRange,\n selectedSelector: ephemera.selectedSelector,\n firstSelectedSelector: ephemera.firstSelectedSelector,\n lastSelectedSelector: ephemera.lastSelectedSelector\n };\n };\n const SelectionAnnotation = {\n byClass,\n byAttr\n };\n\n const fold = (subject, onNone, onMultiple, onSingle) => {\n switch (subject.tag) {\n case 'none':\n return onNone();\n case 'single':\n return onSingle(subject.element);\n case 'multiple':\n return onMultiple(subject.elements);\n }\n };\n const none = () => ({ tag: 'none' });\n const multiple = elements => ({\n tag: 'multiple',\n elements\n });\n const single = element => ({\n tag: 'single',\n element\n });\n\n const Selections = (lazyRoot, getStart, selectedSelector) => {\n const get = () => retrieve(lazyRoot(), selectedSelector).fold(() => getStart().fold(none, single), multiple);\n return { get };\n };\n\n const getUpOrLeftCells = (grid, selectedCells) => {\n const upGrid = grid.slice(0, selectedCells[selectedCells.length - 1].row + 1);\n const upDetails = toDetailList(upGrid);\n return bind$2(upDetails, detail => {\n const slicedCells = detail.cells.slice(0, selectedCells[selectedCells.length - 1].column + 1);\n return map$1(slicedCells, cell => cell.element);\n });\n };\n const getDownOrRightCells = (grid, selectedCells) => {\n const downGrid = grid.slice(selectedCells[0].row + selectedCells[0].rowspan - 1, grid.length);\n const downDetails = toDetailList(downGrid);\n return bind$2(downDetails, detail => {\n const slicedCells = detail.cells.slice(selectedCells[0].column + selectedCells[0].colspan - 1, detail.cells.length);\n return map$1(slicedCells, cell => cell.element);\n });\n };\n const getOtherCells = (table, target, generators) => {\n const warehouse = Warehouse.fromTable(table);\n const details = onCells(warehouse, target);\n return details.map(selectedCells => {\n const grid = toGrid(warehouse, generators, false);\n const {rows} = extractGridDetails(grid);\n const upOrLeftCells = getUpOrLeftCells(rows, selectedCells);\n const downOrRightCells = getDownOrRightCells(rows, selectedCells);\n return {\n upOrLeftCells,\n downOrRightCells\n };\n });\n };\n\n const mkEvent = (target, x, y, stop, prevent, kill, raw) => ({\n target,\n x,\n y,\n stop,\n prevent,\n kill,\n raw\n });\n const fromRawEvent$1 = rawEvent => {\n const target = SugarElement.fromDom(getOriginalEventTarget(rawEvent).getOr(rawEvent.target));\n const stop = () => rawEvent.stopPropagation();\n const prevent = () => rawEvent.preventDefault();\n const kill = compose(prevent, stop);\n return mkEvent(target, rawEvent.clientX, rawEvent.clientY, stop, prevent, kill, rawEvent);\n };\n const handle = (filter, handler) => rawEvent => {\n if (filter(rawEvent)) {\n handler(fromRawEvent$1(rawEvent));\n }\n };\n const binder = (element, event, filter, handler, useCapture) => {\n const wrapped = handle(filter, handler);\n element.dom.addEventListener(event, wrapped, useCapture);\n return { unbind: curry(unbind, element, event, wrapped, useCapture) };\n };\n const bind$1 = (element, event, filter, handler) => binder(element, event, filter, handler, false);\n const unbind = (element, event, handler, useCapture) => {\n element.dom.removeEventListener(event, handler, useCapture);\n };\n\n const filter = always;\n const bind = (element, event, handler) => bind$1(element, event, filter, handler);\n const fromRawEvent = fromRawEvent$1;\n\n const hasInternalTarget = e => !has(SugarElement.fromDom(e.target), 'ephox-snooker-resizer-bar');\n const TableCellSelectionHandler = (editor, resizeHandler) => {\n const cellSelection = Selections(() => SugarElement.fromDom(editor.getBody()), () => getSelectionCell(getSelectionStart(editor), getIsRoot(editor)), ephemera.selectedSelector);\n const onSelection = (cells, start, finish) => {\n const tableOpt = table(start);\n tableOpt.each(table => {\n const cloneFormats = getTableCloneElements(editor);\n const generators = cellOperations(noop, SugarElement.fromDom(editor.getDoc()), cloneFormats);\n const selectedCells = getCellsFromSelection(editor);\n const otherCells = getOtherCells(table, { selection: selectedCells }, generators);\n fireTableSelectionChange(editor, cells, start, finish, otherCells);\n });\n };\n const onClear = () => fireTableSelectionClear(editor);\n const annotations = SelectionAnnotation.byAttr(ephemera, onSelection, onClear);\n editor.on('init', _e => {\n const win = editor.getWin();\n const body = getBody(editor);\n const isRoot = getIsRoot(editor);\n const syncSelection = () => {\n const sel = editor.selection;\n const start = SugarElement.fromDom(sel.getStart());\n const end = SugarElement.fromDom(sel.getEnd());\n const shared = sharedOne(table, [\n start,\n end\n ]);\n shared.fold(() => annotations.clear(body), noop);\n };\n const mouseHandlers = mouse(win, body, isRoot, annotations);\n const keyHandlers = keyboard(win, body, isRoot, annotations);\n const external$1 = external(win, body, isRoot, annotations);\n const hasShiftKey = event => event.raw.shiftKey === true;\n editor.on('TableSelectorChange', e => external$1(e.start, e.finish));\n const handleResponse = (event, response) => {\n if (!hasShiftKey(event)) {\n return;\n }\n if (response.kill) {\n event.kill();\n }\n response.selection.each(ns => {\n const relative = SimSelection.relative(ns.start, ns.finish);\n const rng = asLtrRange(win, relative);\n editor.selection.setRng(rng);\n });\n };\n const keyup = event => {\n const wrappedEvent = fromRawEvent(event);\n if (wrappedEvent.raw.shiftKey && isNavigation(wrappedEvent.raw.which)) {\n const rng = editor.selection.getRng();\n const start = SugarElement.fromDom(rng.startContainer);\n const end = SugarElement.fromDom(rng.endContainer);\n keyHandlers.keyup(wrappedEvent, start, rng.startOffset, end, rng.endOffset).each(response => {\n handleResponse(wrappedEvent, response);\n });\n }\n };\n const keydown = event => {\n const wrappedEvent = fromRawEvent(event);\n resizeHandler.hide();\n const rng = editor.selection.getRng();\n const start = SugarElement.fromDom(rng.startContainer);\n const end = SugarElement.fromDom(rng.endContainer);\n const direction = onDirection(ltr, rtl)(SugarElement.fromDom(editor.selection.getStart()));\n keyHandlers.keydown(wrappedEvent, start, rng.startOffset, end, rng.endOffset, direction).each(response => {\n handleResponse(wrappedEvent, response);\n });\n resizeHandler.show();\n };\n const isLeftMouse = raw => raw.button === 0;\n const isLeftButtonPressed = raw => {\n if (raw.buttons === undefined) {\n return true;\n }\n return (raw.buttons & 1) !== 0;\n };\n const dragStart = _e => {\n mouseHandlers.clearstate();\n };\n const mouseDown = e => {\n if (isLeftMouse(e) && hasInternalTarget(e)) {\n mouseHandlers.mousedown(fromRawEvent(e));\n }\n };\n const mouseOver = e => {\n if (isLeftButtonPressed(e) && hasInternalTarget(e)) {\n mouseHandlers.mouseover(fromRawEvent(e));\n }\n };\n const mouseUp = e => {\n if (isLeftMouse(e) && hasInternalTarget(e)) {\n mouseHandlers.mouseup(fromRawEvent(e));\n }\n };\n const getDoubleTap = () => {\n const lastTarget = Cell(SugarElement.fromDom(body));\n const lastTimeStamp = Cell(0);\n const touchEnd = t => {\n const target = SugarElement.fromDom(t.target);\n if (isTag('td')(target) || isTag('th')(target)) {\n const lT = lastTarget.get();\n const lTS = lastTimeStamp.get();\n if (eq$1(lT, target) && t.timeStamp - lTS < 300) {\n t.preventDefault();\n external$1(target, target);\n }\n }\n lastTarget.set(target);\n lastTimeStamp.set(t.timeStamp);\n };\n return { touchEnd };\n };\n const doubleTap = getDoubleTap();\n editor.on('dragstart', dragStart);\n editor.on('mousedown', mouseDown);\n editor.on('mouseover', mouseOver);\n editor.on('mouseup', mouseUp);\n editor.on('touchend', doubleTap.touchEnd);\n editor.on('keyup', keyup);\n editor.on('keydown', keydown);\n editor.on('NodeChange', syncSelection);\n });\n editor.on('PreInit', () => {\n editor.serializer.addTempAttr(ephemera.firstSelected);\n editor.serializer.addTempAttr(ephemera.lastSelected);\n });\n const clearSelectedCells = container => annotations.clear(SugarElement.fromDom(container));\n const getSelectedCells = () => fold(cellSelection.get(), constant([]), cells => {\n return map$1(cells, cell => cell.dom);\n }, cell => [cell.dom]);\n return {\n getSelectedCells,\n clearSelectedCells\n };\n };\n\n const Event = fields => {\n let handlers = [];\n const bind = handler => {\n if (handler === undefined) {\n throw new Error('Event bind error: undefined handler');\n }\n handlers.push(handler);\n };\n const unbind = handler => {\n handlers = filter$2(handlers, h => {\n return h !== handler;\n });\n };\n const trigger = (...args) => {\n const event = {};\n each$2(fields, (name, i) => {\n event[name] = args[i];\n });\n each$2(handlers, handler => {\n handler(event);\n });\n };\n return {\n bind,\n unbind,\n trigger\n };\n };\n\n const create$1 = typeDefs => {\n const registry = map(typeDefs, event => {\n return {\n bind: event.bind,\n unbind: event.unbind\n };\n });\n const trigger = map(typeDefs, event => {\n return event.trigger;\n });\n return {\n registry,\n trigger\n };\n };\n\n const last = (fn, rate) => {\n let timer = null;\n const cancel = () => {\n if (!isNull(timer)) {\n clearTimeout(timer);\n timer = null;\n }\n };\n const throttle = (...args) => {\n cancel();\n timer = setTimeout(() => {\n timer = null;\n fn.apply(null, args);\n }, rate);\n };\n return {\n cancel,\n throttle\n };\n };\n\n const sort = arr => {\n return arr.slice(0).sort();\n };\n const reqMessage = (required, keys) => {\n throw new Error('All required keys (' + sort(required).join(', ') + ') were not specified. Specified keys were: ' + sort(keys).join(', ') + '.');\n };\n const unsuppMessage = unsupported => {\n throw new Error('Unsupported keys for object: ' + sort(unsupported).join(', '));\n };\n const validateStrArr = (label, array) => {\n if (!isArray(array)) {\n throw new Error('The ' + label + ' fields must be an array. Was: ' + array + '.');\n }\n each$2(array, a => {\n if (!isString(a)) {\n throw new Error('The value ' + a + ' in the ' + label + ' fields was not a string.');\n }\n });\n };\n const invalidTypeMessage = (incorrect, type) => {\n throw new Error('All values need to be of type: ' + type + '. Keys (' + sort(incorrect).join(', ') + ') were not.');\n };\n const checkDupes = everything => {\n const sorted = sort(everything);\n const dupe = find$1(sorted, (s, i) => {\n return i < sorted.length - 1 && s === sorted[i + 1];\n });\n dupe.each(d => {\n throw new Error('The field: ' + d + ' occurs more than once in the combined fields: [' + sorted.join(', ') + '].');\n });\n };\n\n const base = (handleUnsupported, required) => {\n return baseWith(handleUnsupported, required, {\n validate: isFunction,\n label: 'function'\n });\n };\n const baseWith = (handleUnsupported, required, pred) => {\n if (required.length === 0) {\n throw new Error('You must specify at least one required field.');\n }\n validateStrArr('required', required);\n checkDupes(required);\n return obj => {\n const keys$1 = keys(obj);\n const allReqd = forall(required, req => {\n return contains$2(keys$1, req);\n });\n if (!allReqd) {\n reqMessage(required, keys$1);\n }\n handleUnsupported(required, keys$1);\n const invalidKeys = filter$2(required, key => {\n return !pred.validate(obj[key], key);\n });\n if (invalidKeys.length > 0) {\n invalidTypeMessage(invalidKeys, pred.label);\n }\n return obj;\n };\n };\n const handleExact = (required, keys) => {\n const unsupported = filter$2(keys, key => {\n return !contains$2(required, key);\n });\n if (unsupported.length > 0) {\n unsuppMessage(unsupported);\n }\n };\n const exactly = required => base(handleExact, required);\n\n const DragMode = exactly([\n 'compare',\n 'extract',\n 'mutate',\n 'sink'\n ]);\n const DragSink = exactly([\n 'element',\n 'start',\n 'stop',\n 'destroy'\n ]);\n const DragApi = exactly([\n 'forceDrop',\n 'drop',\n 'move',\n 'delayDrop'\n ]);\n\n const InDrag = () => {\n let previous = Optional.none();\n const reset = () => {\n previous = Optional.none();\n };\n const update = (mode, nu) => {\n const result = previous.map(old => {\n return mode.compare(old, nu);\n });\n previous = Optional.some(nu);\n return result;\n };\n const onEvent = (event, mode) => {\n const dataOption = mode.extract(event);\n dataOption.each(data => {\n const offset = update(mode, data);\n offset.each(d => {\n events.trigger.move(d);\n });\n });\n };\n const events = create$1({ move: Event(['info']) });\n return {\n onEvent,\n reset,\n events: events.registry\n };\n };\n\n const NoDrag = () => {\n const events = create$1({ move: Event(['info']) });\n return {\n onEvent: noop,\n reset: noop,\n events: events.registry\n };\n };\n\n const Movement = () => {\n const noDragState = NoDrag();\n const inDragState = InDrag();\n let dragState = noDragState;\n const on = () => {\n dragState.reset();\n dragState = inDragState;\n };\n const off = () => {\n dragState.reset();\n dragState = noDragState;\n };\n const onEvent = (event, mode) => {\n dragState.onEvent(event, mode);\n };\n const isOn = () => {\n return dragState === inDragState;\n };\n return {\n on,\n off,\n isOn,\n onEvent,\n events: inDragState.events\n };\n };\n\n const setup = (mutation, mode, settings) => {\n let active = false;\n const events = create$1({\n start: Event([]),\n stop: Event([])\n });\n const movement = Movement();\n const drop = () => {\n sink.stop();\n if (movement.isOn()) {\n movement.off();\n events.trigger.stop();\n }\n };\n const throttledDrop = last(drop, 200);\n const go = parent => {\n sink.start(parent);\n movement.on();\n events.trigger.start();\n };\n const mousemove = event => {\n throttledDrop.cancel();\n movement.onEvent(event, mode);\n };\n movement.events.move.bind(event => {\n mode.mutate(mutation, event.info);\n });\n const on = () => {\n active = true;\n };\n const off = () => {\n active = false;\n };\n const isActive = () => active;\n const runIfActive = f => {\n return (...args) => {\n if (active) {\n f.apply(null, args);\n }\n };\n };\n const sink = mode.sink(DragApi({\n forceDrop: drop,\n drop: runIfActive(drop),\n move: runIfActive(mousemove),\n delayDrop: runIfActive(throttledDrop.throttle)\n }), settings);\n const destroy = () => {\n sink.destroy();\n };\n return {\n element: sink.element,\n go,\n on,\n off,\n isActive,\n destroy,\n events: events.registry\n };\n };\n\n const css = namespace => {\n const dashNamespace = namespace.replace(/\\./g, '-');\n const resolve = str => {\n return dashNamespace + '-' + str;\n };\n return { resolve };\n };\n\n const styles$1 = css('ephox-dragster');\n const resolve$1 = styles$1.resolve;\n\n const Blocker = options => {\n const settings = {\n layerClass: resolve$1('blocker'),\n ...options\n };\n const div = SugarElement.fromTag('div');\n set$2(div, 'role', 'presentation');\n setAll(div, {\n position: 'fixed',\n left: '0px',\n top: '0px',\n width: '100%',\n height: '100%'\n });\n add(div, resolve$1('blocker'));\n add(div, settings.layerClass);\n const element = constant(div);\n const destroy = () => {\n remove$6(div);\n };\n return {\n element,\n destroy\n };\n };\n\n const compare = (old, nu) => {\n return SugarPosition(nu.left - old.left, nu.top - old.top);\n };\n const extract = event => {\n return Optional.some(SugarPosition(event.x, event.y));\n };\n const mutate = (mutation, info) => {\n mutation.mutate(info.left, info.top);\n };\n const sink = (dragApi, settings) => {\n const blocker = Blocker(settings);\n const mdown = bind(blocker.element(), 'mousedown', dragApi.forceDrop);\n const mup = bind(blocker.element(), 'mouseup', dragApi.drop);\n const mmove = bind(blocker.element(), 'mousemove', dragApi.move);\n const mout = bind(blocker.element(), 'mouseout', dragApi.delayDrop);\n const destroy = () => {\n blocker.destroy();\n mup.unbind();\n mmove.unbind();\n mout.unbind();\n mdown.unbind();\n };\n const start = parent => {\n append$1(parent, blocker.element());\n };\n const stop = () => {\n remove$6(blocker.element());\n };\n return DragSink({\n element: blocker.element,\n start,\n stop,\n destroy\n });\n };\n var MouseDrag = DragMode({\n compare,\n extract,\n sink,\n mutate\n });\n\n const transform = (mutation, settings = {}) => {\n var _a;\n const mode = (_a = settings.mode) !== null && _a !== void 0 ? _a : MouseDrag;\n return setup(mutation, mode, settings);\n };\n\n const styles = css('ephox-snooker');\n const resolve = styles.resolve;\n\n const Mutation = () => {\n const events = create$1({\n drag: Event([\n 'xDelta',\n 'yDelta'\n ])\n });\n const mutate = (x, y) => {\n events.trigger.drag(x, y);\n };\n return {\n mutate,\n events: events.registry\n };\n };\n\n const BarMutation = () => {\n const events = create$1({\n drag: Event([\n 'xDelta',\n 'yDelta',\n 'target'\n ])\n });\n let target = Optional.none();\n const delegate = Mutation();\n delegate.events.drag.bind(event => {\n target.each(t => {\n events.trigger.drag(event.xDelta, event.yDelta, t);\n });\n });\n const assign = t => {\n target = Optional.some(t);\n };\n const get = () => {\n return target;\n };\n return {\n assign,\n get,\n mutate: delegate.mutate,\n events: events.registry\n };\n };\n\n const col = (column, x, y, w, h) => {\n const bar = SugarElement.fromTag('div');\n setAll(bar, {\n position: 'absolute',\n left: x - w / 2 + 'px',\n top: y + 'px',\n height: h + 'px',\n width: w + 'px'\n });\n setAll$1(bar, {\n 'data-column': column,\n 'role': 'presentation'\n });\n return bar;\n };\n const row = (r, x, y, w, h) => {\n const bar = SugarElement.fromTag('div');\n setAll(bar, {\n position: 'absolute',\n left: x + 'px',\n top: y - h / 2 + 'px',\n height: h + 'px',\n width: w + 'px'\n });\n setAll$1(bar, {\n 'data-row': r,\n 'role': 'presentation'\n });\n return bar;\n };\n\n const resizeBar = resolve('resizer-bar');\n const resizeRowBar = resolve('resizer-rows');\n const resizeColBar = resolve('resizer-cols');\n const BAR_THICKNESS = 7;\n const resizableRows = (warehouse, isResizable) => bind$2(warehouse.all, (row, i) => isResizable(row.element) ? [i] : []);\n const resizableColumns = (warehouse, isResizable) => {\n const resizableCols = [];\n range$1(warehouse.grid.columns, index => {\n const colElmOpt = Warehouse.getColumnAt(warehouse, index).map(col => col.element);\n if (colElmOpt.forall(isResizable)) {\n resizableCols.push(index);\n }\n });\n return filter$2(resizableCols, colIndex => {\n const columnCells = Warehouse.filterItems(warehouse, cell => cell.column === colIndex);\n return forall(columnCells, cell => isResizable(cell.element));\n });\n };\n const destroy = wire => {\n const previous = descendants(wire.parent(), '.' + resizeBar);\n each$2(previous, remove$6);\n };\n const drawBar = (wire, positions, create) => {\n const origin = wire.origin();\n each$2(positions, cpOption => {\n cpOption.each(cp => {\n const bar = create(origin, cp);\n add(bar, resizeBar);\n append$1(wire.parent(), bar);\n });\n });\n };\n const refreshCol = (wire, colPositions, position, tableHeight) => {\n drawBar(wire, colPositions, (origin, cp) => {\n const colBar = col(cp.col, cp.x - origin.left, position.top - origin.top, BAR_THICKNESS, tableHeight);\n add(colBar, resizeColBar);\n return colBar;\n });\n };\n const refreshRow = (wire, rowPositions, position, tableWidth) => {\n drawBar(wire, rowPositions, (origin, cp) => {\n const rowBar = row(cp.row, position.left - origin.left, cp.y - origin.top, tableWidth, BAR_THICKNESS);\n add(rowBar, resizeRowBar);\n return rowBar;\n });\n };\n const refreshGrid = (warhouse, wire, table, rows, cols) => {\n const position = absolute(table);\n const isResizable = wire.isResizable;\n const rowPositions = rows.length > 0 ? height.positions(rows, table) : [];\n const resizableRowBars = rowPositions.length > 0 ? resizableRows(warhouse, isResizable) : [];\n const resizableRowPositions = filter$2(rowPositions, (_pos, i) => exists(resizableRowBars, barIndex => i === barIndex));\n refreshRow(wire, resizableRowPositions, position, getOuter$2(table));\n const colPositions = cols.length > 0 ? width.positions(cols, table) : [];\n const resizableColBars = colPositions.length > 0 ? resizableColumns(warhouse, isResizable) : [];\n const resizableColPositions = filter$2(colPositions, (_pos, i) => exists(resizableColBars, barIndex => i === barIndex));\n refreshCol(wire, resizableColPositions, position, getOuter$1(table));\n };\n const refresh = (wire, table) => {\n destroy(wire);\n if (wire.isResizable(table)) {\n const warehouse = Warehouse.fromTable(table);\n const rows$1 = rows(warehouse);\n const cols = columns(warehouse);\n refreshGrid(warehouse, wire, table, rows$1, cols);\n }\n };\n const each = (wire, f) => {\n const bars = descendants(wire.parent(), '.' + resizeBar);\n each$2(bars, f);\n };\n const hide = wire => {\n each(wire, bar => {\n set$1(bar, 'display', 'none');\n });\n };\n const show = wire => {\n each(wire, bar => {\n set$1(bar, 'display', 'block');\n });\n };\n const isRowBar = element => {\n return has(element, resizeRowBar);\n };\n const isColBar = element => {\n return has(element, resizeColBar);\n };\n\n const resizeBarDragging = resolve('resizer-bar-dragging');\n const BarManager = wire => {\n const mutation = BarMutation();\n const resizing = transform(mutation, {});\n let hoverTable = Optional.none();\n const getResizer = (element, type) => {\n return Optional.from(get$b(element, type));\n };\n mutation.events.drag.bind(event => {\n getResizer(event.target, 'data-row').each(_dataRow => {\n const currentRow = getCssValue(event.target, 'top');\n set$1(event.target, 'top', currentRow + event.yDelta + 'px');\n });\n getResizer(event.target, 'data-column').each(_dataCol => {\n const currentCol = getCssValue(event.target, 'left');\n set$1(event.target, 'left', currentCol + event.xDelta + 'px');\n });\n });\n const getDelta = (target, dir) => {\n const newX = getCssValue(target, dir);\n const oldX = getAttrValue(target, 'data-initial-' + dir, 0);\n return newX - oldX;\n };\n resizing.events.stop.bind(() => {\n mutation.get().each(target => {\n hoverTable.each(table => {\n getResizer(target, 'data-row').each(row => {\n const delta = getDelta(target, 'top');\n remove$7(target, 'data-initial-top');\n events.trigger.adjustHeight(table, delta, parseInt(row, 10));\n });\n getResizer(target, 'data-column').each(column => {\n const delta = getDelta(target, 'left');\n remove$7(target, 'data-initial-left');\n events.trigger.adjustWidth(table, delta, parseInt(column, 10));\n });\n refresh(wire, table);\n });\n });\n });\n const handler = (target, dir) => {\n events.trigger.startAdjust();\n mutation.assign(target);\n set$2(target, 'data-initial-' + dir, getCssValue(target, dir));\n add(target, resizeBarDragging);\n set$1(target, 'opacity', '0.2');\n resizing.go(wire.parent());\n };\n const mousedown = bind(wire.parent(), 'mousedown', event => {\n if (isRowBar(event.target)) {\n handler(event.target, 'top');\n }\n if (isColBar(event.target)) {\n handler(event.target, 'left');\n }\n });\n const isRoot = e => {\n return eq$1(e, wire.view());\n };\n const findClosestEditableTable = target => closest$1(target, 'table', isRoot).filter(isEditable$1);\n const mouseover = bind(wire.view(), 'mouseover', event => {\n findClosestEditableTable(event.target).fold(() => {\n if (inBody(event.target)) {\n destroy(wire);\n }\n }, table => {\n if (resizing.isActive()) {\n hoverTable = Optional.some(table);\n refresh(wire, table);\n }\n });\n });\n const destroy$1 = () => {\n mousedown.unbind();\n mouseover.unbind();\n resizing.destroy();\n destroy(wire);\n };\n const refresh$1 = tbl => {\n refresh(wire, tbl);\n };\n const events = create$1({\n adjustHeight: Event([\n 'table',\n 'delta',\n 'row'\n ]),\n adjustWidth: Event([\n 'table',\n 'delta',\n 'column'\n ]),\n startAdjust: Event([])\n });\n return {\n destroy: destroy$1,\n refresh: refresh$1,\n on: resizing.on,\n off: resizing.off,\n hideBars: curry(hide, wire),\n showBars: curry(show, wire),\n events: events.registry\n };\n };\n\n const create = (wire, resizing, lazySizing) => {\n const hdirection = height;\n const vdirection = width;\n const manager = BarManager(wire);\n const events = create$1({\n beforeResize: Event([\n 'table',\n 'type'\n ]),\n afterResize: Event([\n 'table',\n 'type'\n ]),\n startDrag: Event([])\n });\n manager.events.adjustHeight.bind(event => {\n const table = event.table;\n events.trigger.beforeResize(table, 'row');\n const delta = hdirection.delta(event.delta, table);\n adjustHeight(table, delta, event.row, hdirection);\n events.trigger.afterResize(table, 'row');\n });\n manager.events.startAdjust.bind(_event => {\n events.trigger.startDrag();\n });\n manager.events.adjustWidth.bind(event => {\n const table = event.table;\n events.trigger.beforeResize(table, 'col');\n const delta = vdirection.delta(event.delta, table);\n const tableSize = lazySizing(table);\n adjustWidth(table, delta, event.column, resizing, tableSize);\n events.trigger.afterResize(table, 'col');\n });\n return {\n on: manager.on,\n off: manager.off,\n refreshBars: manager.refresh,\n hideBars: manager.hideBars,\n showBars: manager.showBars,\n destroy: manager.destroy,\n events: events.registry\n };\n };\n const TableResize = { create };\n\n const only = (element, isResizable) => {\n const parent = isDocument(element) ? documentElement(element) : element;\n return {\n parent: constant(parent),\n view: constant(element),\n origin: constant(SugarPosition(0, 0)),\n isResizable\n };\n };\n const detached = (editable, chrome, isResizable) => {\n const origin = () => absolute(chrome);\n return {\n parent: constant(chrome),\n view: constant(editable),\n origin,\n isResizable\n };\n };\n const body = (editable, chrome, isResizable) => {\n return {\n parent: constant(chrome),\n view: constant(editable),\n origin: constant(SugarPosition(0, 0)),\n isResizable\n };\n };\n const ResizeWire = {\n only,\n detached,\n body\n };\n\n const createContainer = () => {\n const container = SugarElement.fromTag('div');\n setAll(container, {\n position: 'static',\n height: '0',\n width: '0',\n padding: '0',\n margin: '0',\n border: '0'\n });\n append$1(body$1(), container);\n return container;\n };\n const get = (editor, isResizable) => {\n return editor.inline ? ResizeWire.body(SugarElement.fromDom(editor.getBody()), createContainer(), isResizable) : ResizeWire.only(SugarElement.fromDom(editor.getDoc()), isResizable);\n };\n const remove = (editor, wire) => {\n if (editor.inline) {\n remove$6(wire.parent());\n }\n };\n\n const isTable = node => isNonNullable(node) && node.nodeName === 'TABLE';\n const barResizerPrefix = 'bar-';\n const isResizable = elm => get$b(elm, 'data-mce-resize') !== 'false';\n const syncPixels = table => {\n const warehouse = Warehouse.fromTable(table);\n if (!Warehouse.hasColumns(warehouse)) {\n each$2(cells$1(table), cell => {\n const computedWidth = get$a(cell, 'width');\n set$1(cell, 'width', computedWidth);\n remove$7(cell, 'width');\n });\n }\n };\n const TableResizeHandler = editor => {\n const selectionRng = value();\n const tableResize = value();\n const resizeWire = value();\n let startW;\n let startRawW;\n const lazySizing = table => get$5(editor, table);\n const lazyResizingBehaviour = () => isPreserveTableColumnResizing(editor) ? preserveTable() : resizeTable();\n const getNumColumns = table => getGridSize(table).columns;\n const afterCornerResize = (table, origin, width) => {\n const isRightEdgeResize = endsWith(origin, 'e');\n if (startRawW === '') {\n convertToPercentSize(table);\n }\n if (width !== startW && startRawW !== '') {\n set$1(table, 'width', startRawW);\n const resizing = lazyResizingBehaviour();\n const tableSize = lazySizing(table);\n const col = isPreserveTableColumnResizing(editor) || isRightEdgeResize ? getNumColumns(table) - 1 : 0;\n adjustWidth(table, width - startW, col, resizing, tableSize);\n } else if (isPercentage$1(startRawW)) {\n const percentW = parseFloat(startRawW.replace('%', ''));\n const targetPercentW = width * percentW / startW;\n set$1(table, 'width', targetPercentW + '%');\n }\n if (isPixel(startRawW)) {\n syncPixels(table);\n }\n };\n const destroy = () => {\n tableResize.on(sz => {\n sz.destroy();\n });\n resizeWire.on(w => {\n remove(editor, w);\n });\n };\n editor.on('init', () => {\n const rawWire = get(editor, isResizable);\n resizeWire.set(rawWire);\n if (hasTableObjectResizing(editor) && hasTableResizeBars(editor)) {\n const resizing = lazyResizingBehaviour();\n const sz = TableResize.create(rawWire, resizing, lazySizing);\n sz.on();\n sz.events.startDrag.bind(_event => {\n selectionRng.set(editor.selection.getRng());\n });\n sz.events.beforeResize.bind(event => {\n const rawTable = event.table.dom;\n fireObjectResizeStart(editor, rawTable, getPixelWidth(rawTable), getPixelHeight(rawTable), barResizerPrefix + event.type);\n });\n sz.events.afterResize.bind(event => {\n const table = event.table;\n const rawTable = table.dom;\n removeDataStyle(table);\n selectionRng.on(rng => {\n editor.selection.setRng(rng);\n editor.focus();\n });\n fireObjectResized(editor, rawTable, getPixelWidth(rawTable), getPixelHeight(rawTable), barResizerPrefix + event.type);\n editor.undoManager.add();\n });\n tableResize.set(sz);\n }\n });\n editor.on('ObjectResizeStart', e => {\n const targetElm = e.target;\n if (isTable(targetElm)) {\n const table = SugarElement.fromDom(targetElm);\n each$2(editor.dom.select('.mce-clonedresizable'), clone => {\n editor.dom.addClass(clone, 'mce-' + getTableColumnResizingBehaviour(editor) + '-columns');\n });\n if (!isPixelSizing(table) && isTablePixelsForced(editor)) {\n convertToPixelSize(table);\n } else if (!isPercentSizing(table) && isTablePercentagesForced(editor)) {\n convertToPercentSize(table);\n }\n if (isNoneSizing(table) && startsWith(e.origin, barResizerPrefix)) {\n convertToPercentSize(table);\n }\n startW = e.width;\n startRawW = isTableResponsiveForced(editor) ? '' : getRawWidth(editor, targetElm).getOr('');\n }\n });\n editor.on('ObjectResized', e => {\n const targetElm = e.target;\n if (isTable(targetElm)) {\n const table = SugarElement.fromDom(targetElm);\n const origin = e.origin;\n if (startsWith(origin, 'corner-')) {\n afterCornerResize(table, origin, e.width);\n }\n removeDataStyle(table);\n fireTableModified(editor, table.dom, styleModified);\n }\n });\n editor.on('SwitchMode', () => {\n tableResize.on(resize => {\n if (editor.mode.isReadOnly()) {\n resize.hideBars();\n } else {\n resize.showBars();\n }\n });\n });\n editor.on('dragstart dragend', e => {\n tableResize.on(resize => {\n if (e.type === 'dragstart') {\n resize.hideBars();\n resize.off();\n } else {\n resize.on();\n resize.showBars();\n }\n });\n });\n editor.on('remove', () => {\n destroy();\n });\n const refresh = table => {\n tableResize.on(resize => resize.refreshBars(SugarElement.fromDom(table)));\n };\n const hide = () => {\n tableResize.on(resize => resize.hideBars());\n };\n const show = () => {\n tableResize.on(resize => resize.showBars());\n };\n return {\n refresh,\n hide,\n show\n };\n };\n\n const setupTable = editor => {\n register(editor);\n const resizeHandler = TableResizeHandler(editor);\n const cellSelectionHandler = TableCellSelectionHandler(editor, resizeHandler);\n const actions = TableActions(editor, resizeHandler, cellSelectionHandler);\n registerCommands(editor, actions);\n registerQueryCommands(editor, actions);\n registerEvents(editor, actions);\n return {\n getSelectedCells: cellSelectionHandler.getSelectedCells,\n clearSelectedCells: cellSelectionHandler.clearSelectedCells\n };\n };\n\n const DomModel = editor => {\n const table = setupTable(editor);\n return { table };\n };\n var Model = () => {\n global$1.add('dom', DomModel);\n };\n\n Model();\n\n})();\n"],"names":["global$1","tinymce","util","Tools","resolve","isType$1","type","value","x","t","Array","isArray","o","v","proto","constructor","String","prototype","isPrototypeOf","_a","name","typeOf","isSimpleType","eq$2","a","isString","isObject","isNull","isBoolean","isUndefined","undefined","isNonNullable","isNullable","isFunction","isNumber","noop","constant","identity","tripleEquals","b","curry","fn","initialArgs","restArgs","all","concat","apply","not","f","never","always","Optional","tag","this","some","none","singletonNone","fold","onNone","onSome","isSome","isNone","map","mapper","bind","binder","exists","predicate","forall","filter","getOr","replacement","or","getOrThunk","thunk","orThunk","getOrDie","message","Error","from","getOrNull","getOrUndefined","each","worker","toArray","toString","nativeSlice","slice","nativeIndexOf","indexOf","nativePush","push","contains$2","xs","rawIndexOf","ts","call","pred","i","len","length","range$1","num","r","map$1","each$2","partition","pass","fail","filter$2","foldr","acc","eachr","foldl","find$1","until","findUntil","findIndex","flatten","bind$2","mapToObject","get$d","head","last$2","findMap","arr","keys","Object","hasOwnProperty","each$1","obj","props","k","tupleMap","tuple","filter$1","onTrue","onFalse","internalFilter","objAcc","mapToArray","values","has$1","key","Global","window","Function","resolve$2","p","scope","parts","path","split","actual","unsafe","getPrototypeOf","sandHTMLElement","test","element","dom","nodeName","toLowerCase","nodeType","isType","isComment","isHTMLElement","isElement","isText","isDocument","isDocumentFragment","isTag","e","rawSet","console","error","setAttribute","set$2","setAll$1","attrs","get$b","getAttribute","getOpt","remove$7","removeAttribute","clone$2","attributes","attr","fromDom$1","node","SugarElement","fromHtml","html","div","document","createElement","innerHTML","hasChildNodes","childNodes","fromTag","fromText","text","createTextNode","fromDom","fromPoint","docElm","y","elementFromPoint","is$2","selector","elem","matches","msMatchesSelector","webkitMatchesSelector","mozMatchesSelector","bypassSelector","childElementCount","one","base","querySelector","eq$1","e1","e2","contains$1","d1","d2","contains","is$1","owner","ownerDocument","documentOrOwner","dos","parent","parentNode","parentElement","parents","isRoot","stop","ret","rawParent","prevSibling","previousSibling","nextSibling","children$2","child$2","index","cs","before$3","marker","insertBefore","after$5","append$1","prepend","firstChild$1","firstChild","appendChild","wrap","wrapper","after$4","elements","append","empty","textContent","rogue","remove$6","removeChild","unwrap","children","clone$1","original","isDeep","cloneNode","shallow","deep","shallowAs","nu","validSectionList","detail","rowspan","colspan","rowdetail","cells","section","elementnew","isNew","isLocked","rowcells","supported","Element","attachShadow","Node","getRootNode","isSupported$1","getShadowRoot","host","getShadowHost","isOpenShadowHost","shadowRoot","inBody","doc","body","fbc","fab","getBody$1","descendants$1","result","ancestors$3","ancestors$4","children$1","descendants","querySelectorAll","all$1","ClosestOrAncestor","is","ancestor","ancestor$2","el","closest$2","s","ancestor$1","child","child$1","descendant","closest$1","lhs","rhs","comparator","left","cat","someIf","checkRange","str","substr","start","end","idx","startsWith","prefix","endsWith","suffix","trim","replace","blank","isNotEmpty","isSupported","style","getPropertyValue","internalSet","property","setProperty","set$1","setAll","css","get$a","getComputedStyle","getUnsafeProperty","getRaw$2","raw","remove$5","removeProperty","internalRemove","getAttrValue","cell","fallback","parseInt","getSpan","hasColspan","cellOrCol","hasRowspan","getCssValue","minWidth","minHeight","firstLayer","filterFirstLayer","tags","join","elm","lookup","cells$1","columns$1","columnGroups","columnGroup","table","rows$1","fromRowsOrColGroups","elems","getSection","row","column","getParentSection","group","parentName","isValidSection","fromTable$1","rows","cached","called","args","unknown$2","nu$2","major","minor","Version","detect","versionRegexes","agent","cleanedAgent","regexes","firstMatch","Number","find","unknown","detect$4","candidates","userAgent","candidate","search","normalVersionRegex","checkContains","target","uastring","browsers","brand","oses","PlatformInfo","edge","chromium","opera","firefox","safari","nu$1","info","current","version","isBrowser","isEdge","isChromium","isIE","isOpera","isFirefox","isSafari","Browser","ie","windows","android","linux","macos","solaris","freebsd","chromeos","isOS","isWindows","isiOS","isAndroid","isMacOS","isLinux","isSolaris","isFreeBSD","isChromeOS","OperatingSystem","ios","PlatformDetection","userAgentDataOpt","mediaMatch","browser","userAgentData","brands","uaBrand","lcBrand","detectBrowser$1","detectBrowser","os","detectOs","deviceType","isiPad","isiPhone","isMobile","isTouch","isTablet","isPhone","iOSwebview","isDesktop","isWebView","DeviceType","query","matchMedia","platform","navigator","detect$2","Dimension","getOffset","get","parseFloat","aggregate","properties","val","isNaN","set","h","match","getOuter","max","cumulativeInclusions","toNumber","px","toFloat","getProp","getCalculatedWidth","boxSizing","width","getBoundingClientRect","offsetWidth","size","upper","lower","calcContentBoxSize","api$2","get$9","getOuter$2","getInner","getRuntime$1","addCells","gridRow","existingCells","before","after","newCells","setCells","addCell","mutateCell","getCell","getCellElement","cellLength","extractGridDetails","grid","cols","clone","cloneRow","cloneCell","LOCKED_COL_ATTR","getLockedColumnsFromTable","lockedColStr","lockedCols","getLockedColumnsFromGrid","locked","lockedArr","_val","copy","sort","sort$1","filterItems","warehouse","generate$1","list","access","lockedColumns","rowData","maxRows","maxColumns","rowCount","colgroupRows","currentRow","rowCell","hasNonNullableKey","extended","occupiedColumnPosition","occupiedRowPosition","columnPosition","newpos","Math","columns","colgroups","columnsGroup","columnIndex","colIndex","columnext","generateColumns","colgroup$1","colgroup","grid$1","Warehouse","fromTable","generate","getAt","findItem","item","filtered","justCells","w","justColumns","hasColumns","getColumnAt","isValidCell","rowsArr","col","decide","getBlock","isValid","getFallback","inBlock","c","deduce","rest","reverse","aa","delta","next","n","extras","abs","onDirection","isLtr","isRtl","getDirection","api$1","height","offsetHeight","get$8","getOuter$1","getRuntime","top","translate","SugarPosition","firstDefinedOrZero","absolute","win","defaultView","documentElement","offsetLeft","offsetTop","scrollTop","pageYOffset","scrollLeft","pageXOffset","clientTop","clientLeft","viewport","box","boxPosition","rowInfo","colInfo","rtlEdge","ltrEdge","getLeftEdge","getRightEdge","getTop$1","getTopEdge","getBottomEdge","findPositions","getInnerEdge","getOuterEdge","array","lines","cellOption","lastLine","positions","optElements","detect$1","step","amount","units","unsupportedLength","fixed","relative","pattern","decimalDigits","exponentPart","opt","input","unsignedDecimalLiteral","RegExp","parse","accepted","exec","unitRaw","unit","check","isUnit","rPercentageBasedSizeRegex","rPixelBasedSizeRegex","isCol$2","getPercentSize","outerGetter","innerGetter","relativeParent","setPixelWidth","setPercentageWidth","setHeight","normalizePixelSize","getter","setter","number","newSize","total","floor","convert","getTotalHeight","getHeightValue","getRaw$1","prop","getRawWidth$1","getPercentageWidth","getPixelWidth$1","getHeight","get$7","setGenericWidth","getPercentTableWidth","percentageBasedSizeRegex","isCol$1","getRawW","getRawH","getDimension","cellOpt","backups","getWidthFrom","getWidth","columnCells","justCols","pos","colFilter","supportsColWidths","isValidColumn","getDeduced","deduced","d","getPixelWidths","tableSize","minCellWidth","getHeightFrom","direction","widthLookup","noneSize","zero","pixelWidth","getWidths","getCellDelta","singleColumnWidth","setElementWidth","adjustTableWidth","isRelative","label","percentageSize","getFloatWidth","cellWidth","getPercentageWidths","_delta","currentWidth","pixelSize","newWidth","TableSize","chooseSize","makeCell","seenSelected","rowIndex","td","extract$1","selectedSelector","isSelected","replica","replicaHouse","replicaStats","house","totalColumns","minRow","minCol","maxRow","maxCol","allCells","selectedCells","startRow","endRow","startCol","endCol","statsStruct","findSelectedStats","unselectedCells","stats","totalRows","j","fillInGaps","widthDelta","colWidths","allColsWidth","selectedColsWidth","getTableWidthDelta","emptyRows","clean","api","getOption","nodeValue","NodeValue","get$6","getEnd","elementsWithCursorPosition","isCursorPosition","isContentEditableFalse","first","descend","res","descendant$1","last$1","descendantRtl","transferableAttributes","createCell","createCol","createColgroup","createRow$1","replace$1","cloneChildren","copy$2","pasteReplace","cellOperations","mutate","formatsToClone","cloneCss","prev","source","sourceDom","targetDom","cssText","copy$1","formats","lastNode","oldCell","newCell","firstText","formatSelector","last","clonedFormat","cloneFormats","validAttributes","attributeName","attribute","cloneAppropriateAttributes","colGap","gap","paste$1","option","editor","options","defaultWidth","getPixelForcedWidth","parentBlock","getParent","selection","getStart","isBlock","getBody","getTableCloneElements","getTableHeaderType","getTableColumnResizingBehaviour","isPreserveTableColumnResizing","isResizeTableColumnResizing","getTableSizingMode","isTablePercentagesForced","isTablePixelsForced","isTableResponsiveForced","hasTableResizeBars","shouldStyleWithCss","shouldMergeContentOnPaste","getTableDefaultAttributes","defaultAttributes","isSet","determineDefaultTableAttributes","getTableDefaultStyles","defaultStyles","determineDefaultTableStyles","tableUseColumnGroup","closest","isEditable$1","assumeEditable","isContentEditable","editable","getRaw","contentEditable","getIsRoot","removeDataStyle","removeStyleAttribute","getSelectionStart","getPixelWidth","getPixelHeight","isInEditableContext$1","inSelection","bounds","leftEdge","rightEdge","topEdge","bottomEdge","finishCol","finishRow","isWithin","getAnyBox","startCell","finishCell","startCoords","finishCoords","sc","fc","detailA","detailB","min","getBox$1","isRect","detailIsWithin","isRectangular","intercepts$1","finish","inside","parentCell","innerCell","c1","c2","moveBy","deltaRow","deltaColumn","moveBy$1","getWarehouse","intercepts","nestedIntercepts","firstTable","lastTable","optStartCell","optLastCell","lastCell","TagBoundaries","DomUniverse","up","down","styles","remove","copyTo","destination","as","insert","afterAll","appendAll","create","comparePosition","other","compareDocumentPosition","isSpecial","getLanguage","getText","setText","isBoundary","isEmptyTag","isNonEditable","eq","unsafeOne","universe","look","tail","commonElement","sharedOne$1","ancestors$1","ps1","ps2","prune","ind","pruned1","pruned2","shared","firstpath","secondpath","universe$3","sharedOne","_universe","lookupTable","container","identify","rootTable","boxes","startTable","finishTable","ancestorCells","ancestors","lca","lcaTable","finishAncestorCells","startAncestorCells","retrieve$1","sels","getEdges","firstSelectedSelector","lastSelectedSelector","shiftSelection","getLast","identified","expandTo","retrieve","retrieveBox","edges","sectionSelector","firstAncestor","lastAncestor","fA","lA","getBox","unmergable","hasSpan","span","mergable","ephemera","strSelected","strSelectedSelector","strAttributeSelector","strFirstSelected","strFirstSelectedSelector","strLastSelected","strLastSelectedSelector","attributeSelector","selected","firstSelected","lastSelected","forMenu","getSelectionFromSelector","initCell","cellName","getSelectionCellOrCaption","getSelectionCell","getCellsFromSelection","nodes","model","getSelectedCells","registerEvents","actions","on","multiCellContext","preventDefault","extractSelected","content","format","innerText","getTextContent","serializer","serialize","serializeElements","getCellsFromFakeSelection","paste","isTable","getDoc","generators","targets","clipboard","pasteCells","focus","point","offset","scan$1","toEnd","freefallRtl$2","freefallRtl$1","universe$2","halve","main","getGenericWidth","surround","sizes","startIndex","endIndex","results","clampDeltaHelper","minCellSize","diff","clampNegativeDelta","clampDelta","resizeTable","calcRelativeDeltas","ratio","newThis","calcLeftEdgeDeltas","clampedDelta","calcFixedDeltas","resizer","clampTableDelta","calcMiddleDeltas","_prev","calcRightEdgeDeltas","calcRedestributedWidths","totalWidth","pixelDelta","newSizes","preserveTable","isLastColumn","maxDelta","_index","_minCellSize","_totalWidth","_pixelDelta","_isRelative","getGridSize","isHeaderCell","isHeaderCells","getRowHeaderType","isHeaderRow","getRowType","findCommonCellType","subType","headerCells","transformCell","substitution","transformRow","fixedCell","mutate$1","sectionCells","TableSection","rowType","findTableRowHeaderType","setIfNot","ignore","insert$1","render$1","newRows","syncRows","gridSection","tr","syncColGroup","colGroup","renderSection","sectionName","newSection","generateSection","sectionElems","renderOrRemoveSection","removeSection","headSection","bodySection","footSection","columnGroupsSection","findDiff","comp","subgrid","getRow","isColRow","getColumn","toDetails","seen","details","updateSeen","rowdetailnew","toGrid","colgroupCols","rowCells","rowDetail","toDetailList","findInWarehouse","extractCells","cell$1","lc","run","operation","extract","adjustment","postAction","genWrappers","behaviours","tableSection","output","fromWarehouse","cursor","out","newElements","tableSizing","sizing","resizing","resize","onPasteByEditor","onCells","onUnlockedCells","allUnlocked","isUnlockedTableCell","unmerge","currentCell","isToReplace","splitRows","uniqueCells","sub","value$1","applyHelper","constHelper","outputHelper","inner","_onError","onValue","isValue","isError","Result","mapError","toOptional","onError","_onValue","msg","fromOption","optional","err","measureWidth","gridA","gridB","rowDelta","colDelta","measureHeight","generateElements","generator","rowFill","exampleRow","colFill","newChildren","tailor","fillCols","fillRows","gridWidth","isLastColLocked","modifiedCols","newLockedColumns","isSpanning","matching","getLockedColumnsWithinBounds","startAddress","colNum","merge$1","validStartAddress","currentStartAddress","gridColLength","adjustedRowAddress","possibleColAddresses","validColAddress","getValidStartAddress","gridBRows","lockedColumnsWithinBounds","rowRemainder","colRemainder","colRequired","rowRequired","measure","fittedGrid","newLockedColumnsWithinBounds","lockedColumnObj","skippedCol","gridBColIndex","newCellElm","mergeTables","insertCols","prevCell","substitute","splitCols","fittedNewGrid","secondDelta","fittedOldGrid","insertRows","oldCols","oldRows","newLocked","secondDiff","fittedGridB","newChild","lockedColFill","insertRowAt","example","newRow","ex","insertColumnAt","withinSpan","getElementFor","isDuplicatedCell","notInStartRow","notInStartColumn","determineScope","applyScope","newScope","isInHeader","getScope","replaceIn","replacer","genScope","shouldReplace","mapCells","isTarget","getColumnCells","replaceColumns","indexes","rowHeaders","shouldReplaceCell","targetColumn","_colIndex","columnReplacePredicate","scopeGenerator","columnScopeGenerator","replaceRows","targetRow","getRowCells","columnHeaders","_cell","newGrid","_rowIndex","rowReplacerPredicate","rowScopeGenerator","replaceCells","targetCells","Adt","cases","constructors","adt","acase","count","keys$1","argLength","foldArgs","branches","branchKeys","reqKey","log","params","ColumnContext","only","middle","right","determine","context","neighbours","measures","recalculateHeightForCells","heights","recalculate","widths","groups","recalculateWidthForColumns","recalculateWidthForCells","recalculateAndApply","adjustWidth","clampedStep","deltas","newWidths","dx","adjustHeight","getPixelHeights","newHeights","dy","newCellSizes","newRowSizes","matchRowHeight","uniqueColumns","currentDetail","isCol","isColgroup","isRow$1","elementToData","getScopeAttribute","Generators","toData","add","data","nuCell","recent","getOrInit","makeNew","replaceOrInit","merge","stringAttributes","baseScope","scopes","getScopeProperty","blockList","universe$1","tagName","isBlock$1","isList","isList$1","isEmptyTag$1","isBr","markCell","rightSiblingIsBlock","rightSibling","isListItem","contents","advancedBr","markContent","isEditable","outcome","elementFromGrid","_b","findEditableCursorPosition","bundle","cursorElement","uniqueRows","makeRowsSection","initialGrid","rowIndexes","opMakeRowsHeader","opMakeRowsBody","opMakeRowsFooter","gridifyRows","pasteDetails","fromPastedRows","wh","_table","_info","adjustWidthTo","adjustAndRedistributeWidths","resizeBehaviour","tablePixelWidth","adjustAndRedistributeWidths$1","firstColumnIsLocked","_warehouse","lastColumnIsLocked","getColumnsWidth","uniqueCols","insertColumnsExtractor","pasteColumnsExtractor","headerCellGenerator","bodyCellGenerator","insertRowsBefore","targetIndex","insertRowsAfter","newG","insertColumnsBefore","extractDetail","insertColumnsAfter","eraseColumns","_comparator","_genWrappers","deleteColumnsAt","maxColIndex","eraseRows","deleteRowsAt","maxRowIndex","makeColumnsHeader","columnIndexes","unmakeColumnsHeader","makeRowsHeader","makeRowsBody","makeRowsFooter","makeCellsHeader","unmakeCellsHeader","mergeCells","merge$2","onMergable","mergeable","unmergeCells","onUnmergable","gridify","address","pasteColsBefore","mergedGrid","pasteColsAfter","pasteRowsBefore","pasteRowsAfter","getColumnsType","lastSelectedCell","minColRange","maxColRange","selectedColumnCells","getCellsType","getRowsType","minRowRange","maxRowRange","rowTypes","hasHeader","hasFooter","hasBody","findCommonRowType","fireNewRow","dispatch","fireNewCell","fireTableModified","styleModified","structure","structureModified","styleAndStructureModified","get$5","TableActions","resizeHandler","cellSelectionHandler","isTableBody","colMutationOp","getTableSectionType","setSelectionFromAction","firstCell","clearSelectedCells","rng","createRng","selectNode","setRng","des","setStart","setEnd","execute","guard","effect","noEvents","refresh","range","deleteRow","deleteColumn","getTableRowType","getTableCellType","getTableColType","constrainSpan","currentColspan","isColInRange","copyCols","fakeColGroups","colsToCopy","copiedCols","clonedCol","fakeColgroup","generateColGroup","fakeRows","cellsToCopy","copiedCells","clonedCell","fakeTR","generateRows","copyRows","slicedGrid","filteredGrid","slicedDetails","adt$5","invalid","pixels","percent","validateFor","rawAmount","substring","Size","redistributeValues","newWidthType","newTotalWidth","scale","pc","redistributeToPx","_pc","redistributeToPercent","redistribute$1","newType","floats","redistributeEmpty","normalize","sum","add$3","scan","remainder","floored","roundDown","round","validate","getUnit","redistribute","optWidth","optHeight","widthUnit","oldWidths","getRawWidths","nuWidths","redistributeToColumns","redistributeToW","newHeight","hUnit","totalHeight","oldHeights","getRawHeights","redistributeToH","isPercentSizing","isPixelSizing","isNoneSizing","cleanupLegacyAttributes","convertToPercentSize","convertToPixelSize","getPixelTableWidth","convertToNoneSize","rowElements","DefaultRenderOptions","border","colGroups","createGroupRow","createRows","createRow","placeCaretInCell","select","collapse","colHeaders","undoManager","headerType","renderOpts","rowHeadersGoInThead","actualRowHeaders","thead","theadRows","tbody","tbodyRows","render","get$4","insertContent","addVisual","isPercentage","fireEvents","tableElm","selectFirstCellInTable","global","tableTypeBase","tableTypeRow","tableTypeColumn","setData","items","fakeClipboardItem","FakeClipboardItem","write","getData","read","getType","clearData","clear","setRows","rowsOpt","clearRows","getRows","setColumns","columnsOpt","clearColumns","getColumns","getSelectionStartCellOrCaption","registerCommands","getTableFromCell","performActionOnSelection","action","getSelectionStartCell","postExecute","_data","actOnSelection","copyRowSelection","copyColSelection","pasteOnSelection","clonedRows","pasteRows","actOnType","getAction","_ui","get$c","no_events","mceTableSplitCells","mceTableMergeCells","mceTableInsertRowBefore","mceTableInsertRowAfter","mceTableInsertColBefore","mceTableInsertColAfter","mceTableDeleteCol","mceTableDeleteRow","mceTableCutCol","mceTableCutRow","mceTableCopyCol","mceTableCopyRow","mceTablePasteColBefore","mceTablePasteColAfter","mceTablePasteRowBefore","mceTablePasteRowAfter","mceTableDelete","cellOrCaption","isEmpty","setContent","setCursorLocation","nodeChanged","mceTableCellToggleClass","clazz","allHaveClass","formatter","formatterAction","mceTableToggleClass","toggle","mceTableToggleCaption","caption","appendAt","mceTableSizingMode","setSizingMode","mceTableCellType","mceTableColType","mceTableRowType","func","addCommand","checkInput","headerRows","headerColumns","insertTable","getFormatName","validArgs","has","formatName","adt$4","Situ","cata","subject","onBefore","onOn","onAfter","situ","Response","kill","createRange","selectNodeContents","selectNodeContentsUsing","relativeToNative","startSitu","finishSitu","setStartBefore","setStartAfter","setEndBefore","setEndAfter","setFinish","exactToNative","soffset","foffset","toRect","rect","bottom","adt$3","ltr","rtl","fromRange","startContainer","startOffset","endContainer","endOffset","diagnose","ranges","domRange","exact","getRanges","collapsed","rev","doDiagnose","asLtrRange","SimRange","Situs","convertToRange","makeSitus","selectRange","cellSel","traverse","mode","backtrack","_direction","transition","sidestep","advance","sibling","successors","go","rules","succ","rule","fb","Walkers","hone","isLeaf","seekLeft$1","seekRight$1","before$1","after$1","after$2","adt$2","success","failedUp","failedDown","isRow","BeforeAfter","verify","bridge","beforeOffset","afterOffset","failure","afterCell","beforeCell","beforeBounds","getRect","afterBounds","isOverlapping","_sharedRow","onSuccess","onFailedUp","onFailedDown","gatherer","cand","gather","handleParent","findBr","br","adjacent","inParent","indexInParent","tryBr","handleBr","tgt","moveDown","caret","moveUp","xDelta","yDelta","toCaret","getElemBox","getBoxAt","getRangedRect","getPartialBox","getEntireBox","adt$1","retry","inOutsideBlock","isOutside","downMovement","adjuster","guessBox","lowerCaret","move","adjustTil","movement","numRetries","isAtTable","adjustForTable","situsFromPoint","guess","newCaret","moved","adjusted","getInnerHeight","checkScroll","scrollBy","Retries","tryUp","higherCaret","tryDown","getJumpSize","findSpot","getSelection","sel","brNeighbour","fromSitus","analysis","_message","process","tryCursor","situs","tryAgain","tryAt","inSameTable","simulate","initial","anchor","spot","handle$1","navigate","precheck","firstUpCheck","seekLeft","lastOffset","lastDownCheck","seekRight","Cell","doRevoke","revoke","singleton","findCell","isInEditableContext","isKey","keycode","isUp","isDown","isNavigation","isBackward","isForward","SimSelection","exactFromRange","simRange","getWin","_finishSitu","_soffset","_finish","_foffset","caretPositionFromPoint","offsetNode","caretRangeFromPoint","availableSearch","beforeSpecial","name$1","makeRange","same","getNativeSelection","doSetNativeRange","removeAllRanges","addRange","doSetRange","setRangeFromRelative","setBaseAndExtent","extend","setLegacyRtlRange","setExact","preprocessExact","setRelative","preprocessRelative","readRange","rangeCount","firstRng","getRangeAt","lastRng","doGetExact","anchorNode","focusNode","anchorOffset","focusOffset","setToElement","selectNodeContents$1","get$2","getExact","getFirstRect","rects","getClientRects","getFirstRect$1","getAtPoint","WindowBridge","exactAdt","clearSelection","collapseSelection","toStart","setSelection","setRelativeSelection","selectContents","innerHeight","getScrollY","_DOC","get$3","by","rc","mouse","annotations","handlers","clearstate","applySelection","event","clearBeforeUpdate","singleCell","isNonEditableCell","isCellClosestContentEditable","mousedown","mouseover","mouseup","MouseSelection","isEditableNode","isEditableSelection","keyboard","clearToNavigate","keydown","realEvent","which","shiftKey","handler","update$1","attempts","navigation","newSels","update","_","keyup","sync","supports","classList","add$1","id","add$2","SelectionAnnotation","onSelection","onClear","removeSelectionAttributes","addSelectionAttribute","multiple","single","getOtherCells","upOrLeftCells","upGrid","upDetails","slicedCells","getUpOrLeftCells","downOrRightCells","downGrid","downDetails","getDownOrRightCells","fromRawEvent$1","rawEvent","composed","composedPath","getOriginalEventTarget","stopPropagation","prevent","fa","mkEvent","clientX","clientY","useCapture","wrapped","handle","addEventListener","unbind","removeEventListener","bind$1","fromRawEvent","hasInternalTarget","TableCellSelectionHandler","cellSelection","lazyRoot","Selections","otherCells","fireTableSelectionChange","fireTableSelectionClear","_e","mouseHandlers","keyHandlers","external$1","external","handleResponse","response","hasShiftKey","ns","isLeftMouse","button","doubleTap","lastTarget","lastTimeStamp","touchEnd","lT","lTS","timeStamp","getDoubleTap","buttons","wrappedEvent","getRng","hide","show","addTempAttr","onMultiple","onSingle","Event","fields","trigger","create$1","typeDefs","registry","baseWith","handleUnsupported","required","validateStrArr","everything","sorted","checkDupes","req","reqMessage","invalidKeys","incorrect","invalidTypeMessage","handleExact","unsupported","unsuppMessage","exactly","DragMode","DragSink","DragApi","InDrag","previous","events","onEvent","old","compare","reset","Movement","noDragState","NoDrag","inDragState","dragState","off","isOn","setup","mutation","settings","active","drop","sink","throttledDrop","rate","timer","cancel","clearTimeout","throttle","setTimeout","runIfActive","forceDrop","delayDrop","isActive","destroy","namespace","dashNamespace","resolve$1","MouseDrag","dragApi","blocker","layerClass","position","Blocker","mdown","mup","mmove","mout","BarMutation","drag","delegate","Mutation","assign","resizeBar","resizeRowBar","resizeColBar","wire","drawBar","origin","cpOption","cp","bar","refreshCol","colPositions","tableHeight","colBar","role","refreshRow","rowPositions","tableWidth","rowBar","refreshGrid","warhouse","isResizable","resizableRowBars","resizableRows","resizableRowPositions","_pos","barIndex","resizableColBars","resizableCols","colElmOpt","resizableColumns","resizableColPositions","bars","resizeBarDragging","BarManager","transform","hoverTable","getResizer","_dataRow","_dataCol","currentCol","getDelta","dir","startAdjust","isColBar","view","tbl","hideBars","showBars","TableResize","lazySizing","hdirection","vdirection","manager","beforeResize","afterResize","startDrag","_event","refreshBars","ResizeWire","chrome","createContainer","padding","margin","barResizerPrefix","TableResizeHandler","selectionRng","tableResize","resizeWire","startW","startRawW","lazyResizingBehaviour","afterCornerResize","isRightEdgeResize","getNumColumns","isPercentage$1","percentW","isPixel","computedWidth","syncPixels","sz","inline","rawWire","objectResizing","hasTableObjectResizing","rawTable","fireObjectResizeStart","fireObjectResized","targetElm","addClass","getStyle","getAttrib","getRawWidth","isReadOnly","setupTable","registerOption","register","processor","default","valid","lookupOnSelection","addQueryValueHandler","registerQueryCommands","DomModel"],"mappings":"6FAIA,WAGI,IAAIA,EAAWC,QAAQC,KAAKC,MAAMC,QAAQ,wBAE1C,MAoBMC,EAAWC,GAAQC,GAZVC,KACb,MAAMC,SAAWD,EACjB,OAAU,OAANA,EACK,OACQ,WAANC,GAAkBC,MAAMC,QAAQH,GAClC,QACQ,WAANC,IAAuCG,EAdlCC,EAcsBL,EAAeM,GAdlCC,EAcsBC,QAZZC,UAYkCH,EAAMI,cAAcN,KAThD,QAAxBO,EAAKN,EAAEE,mBAAgC,IAAPI,OAAgB,EAASA,EAAGC,QAAUL,EAAYK,MAUpF,SAEAX,EAHwC,IAACG,EAAGE,EAdtC,IAACD,EAAGE,EACfI,CAiBV,EAEsCE,CAAOd,KAAWD,EAC9CgB,EAAehB,GAAQC,UAAgBA,IAAUD,EACjDiB,EAAOd,GAAKe,GAAKf,IAAMe,EACvBC,EAAWpB,EAAS,UACpBqB,EAAWrB,EAAS,UACpBM,EAAUN,EAAS,SACnBsB,EAASJ,EAAK,MACdK,EAAYN,EAAa,WACzBO,EAAcN,OAAKO,GAEnBC,EAAgBP,IADHA,IAAKA,QACIQ,CAAWR,GACjCS,EAAaX,EAAa,YAC1BY,EAAWZ,EAAa,UAExBa,EAAO,OAQPC,EAAW7B,GACR,IACEA,EAGL8B,EAAW7B,GACRA,EAEH8B,EAAe,CAACd,EAAGe,IAChBf,IAAMe,EAEf,SAASC,EAAMC,KAAOC,GACpB,MAAO,IAAIC,KACT,MAAMC,EAAMF,EAAYG,OAAOF,GAC/B,OAAOF,EAAGK,MAAM,KAAMF,EAAI,CAElC,CACI,MAAMG,EAAMC,GAAKvC,IAAMuC,EAAEvC,GAMnBqC,EAAQ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